Snap for 5713174 from 0127d50fc98f44f2daaa1cc767c4150c59e23b28 to qt-release
Change-Id: I7c7b30457bf33aad09d2063e3a5c5deebc7fd313
diff --git a/chromium.org/unstable/gaming-input/gaming-input-unstable-v2.xml b/chromium.org/unstable/gaming-input/gaming-input-unstable-v2.xml
index fca6ab5..7c70e4d 100644
--- a/chromium.org/unstable/gaming-input/gaming-input-unstable-v2.xml
+++ b/chromium.org/unstable/gaming-input/gaming-input-unstable-v2.xml
@@ -168,5 +168,28 @@
</description>
<arg name="time" type="uint" summary="timestamp with millisecond granularity"/>
</event>
+
+ <event name="axis_added">
+ <description summary="an axis is added">
+ Adds an axis to the gamepad. Only called when the gamepad was created by
+ gamepad_added_with_device_info. The values are compatible with
+ input_absinfo.
+ </description>
+ <arg name="index" type="uint" summary="An index of the axis" />
+ <arg name="min_value" type="int" summary="minimum value of the axis" />
+ <arg name="max_value" type="int" summary="maximum value of the axis" />
+ <arg name="flat" type="int" summary="input within this value are ignored" />
+ <arg name="fuzz" type="int" summary="used to filter noise" />
+ <arg name="resolution" type="int" summary="resolution of input in units per millimeter, or units per radian for rotational axes." />
+ </event>
+
+ <event name="activated">
+ <description summary="Gamepad activated">
+ Activates the gamepad i.e. the gamepad will be visible to applications
+ after this event is fired. All axis_added events should be sent before
+ this event. Only called when the gamepad was created by
+ gamepad_added_with_device_info.
+ </description>
+ </event>
</interface>
</protocol>
diff --git a/flinger_headers/ArcInputBridgeProtocol.h b/flinger_headers/ArcInputBridgeProtocol.h
index c6abbc1..ffc71ec 100644
--- a/flinger_headers/ArcInputBridgeProtocol.h
+++ b/flinger_headers/ArcInputBridgeProtocol.h
@@ -73,6 +73,8 @@
GAMEPAD_CONNECTED,
GAMEPAD_DISCONNECTED,
+ GAMEPAD_AXIS_INFO,
+ GAMEPAD_ACTIVATED,
GAMEPAD_AXIS,
GAMEPAD_BUTTON,
GAMEPAD_FRAME,
@@ -152,6 +154,18 @@
uint16_t version;
} __attribute__((packed));
+struct GamepadAxisInfoArgs {
+ int32_t id;
+ // evdev ABS_CNT axis index.
+ uint32_t index;
+ // For the definition of the variables below, see input_absinfo.
+ int32_t minValue;
+ int32_t maxValue;
+ int32_t flat;
+ int32_t fuzz;
+ int32_t resolution;
+} __attribute__((packed));
+
struct GamepadArgs {
int32_t id;
union {
@@ -206,6 +220,7 @@
GesturePinchArgs gesture_pinch;
GestureSwipeArgs gesture_swipe;
GamepadDeviceInfoArgs gamepad_device_info;
+ GamepadAxisInfoArgs gamepad_axis_info;
GamepadArgs gamepad;
SwitchArgs switches;
DisplayMetricsArgs display_metrics;