dom/gamepad/ipc/GamepadEventTypes.ipdlh
author Ethan Glasser-Camp <eglassercamp@mozilla.com>
Mon, 05 Sep 2016 13:18:25 -0400
changeset 313090 9377cc9dc164dcadcd76c881484617310a461161
parent 302841 050df9c81c1e80c03e75905716ec95343d83bf0f
child 318206 cf68c36df030b2ed0f0dd65199a681e7b6fef74f
permissions -rw-r--r--
Bug 1300591 - Update Kinto.js to v4.0.4, r=MattN MozReview-Commit-ID: B5pB3AmjjAL

/* This Source Code Form is subject to the terms of the Mozilla Public
 * License, v. 2.0. If a copy of the MPL was not distributed with this file,
 * You can obtain one at http://mozilla.org/MPL/2.0/. */

namespace mozilla {
namespace dom {

struct GamepadAdded {
  nsString id;
  uint32_t index;
  uint32_t mapping;
  uint32_t num_buttons;
  uint32_t num_axes;
};

struct GamepadRemoved {
  uint32_t index;
};

struct GamepadAxisInformation {
  uint32_t index;
  uint32_t axis;
  double value;
};

struct GamepadButtonInformation {
  uint32_t index;
  uint32_t button;
  bool pressed;
  double value;
};

union GamepadChangeEvent {
  GamepadAdded;
  GamepadRemoved;
  GamepadAxisInformation;
  GamepadButtonInformation;
};

} // namespace dom
} // namespace mozilla