Treating some specific sensors as input devices. In particular adding support for wl_compass, wl_gyroscope and wl_accelerometer here.
We have requests to start and stop sensor event receiving as well as events to receive the different axis values for these sensors. Signed-off-by: Stefan Schmidt <s.schm...@samsung.com> --- protocol/wayland.xml | 123 ++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 123 insertions(+) diff --git a/protocol/wayland.xml b/protocol/wayland.xml index 3cfa953..066a718 100644 --- a/protocol/wayland.xml +++ b/protocol/wayland.xml @@ -1251,6 +1251,9 @@ <entry name="pointer" value="1" summary="The seat has pointer devices"/> <entry name="keyboard" value="2" summary="The seat has one or more keyboards"/> <entry name="touch" value="4" summary="The seat has touch devices"/> + <entry name="compass" value="8" summary="The seat has compass devices"/> + <entry name="gyroscope" value="16" summary="The seat has gyroscope devices"/> + <entry name="accelerometer" value="32" summary="The seat has accelerometer devices"/> </enum> <event name="capabilities"> @@ -1297,6 +1300,39 @@ <!-- Version 2 of additions --> + <request name="get_compass" since="2"> + <description summary="return compass object"> + The ID provided will be initialized to the wl_compass interface + for this seat. + + This request only takes effect if the seat has the compass + capability. + </description> + <arg name="id" type="new_id" interface="wl_compass"/> + </request> + + <request name="get_gyroscope" since="2"> + <description summary="return gyroscope object"> + The ID provided will be initialized to the wl_gyroscope interface + for this seat. + + This request only takes effect if the seat has the gyroscope + capability. + </description> + <arg name="id" type="new_id" interface="wl_gyroscope"/> + </request> + + <request name="get_accelerometer" since="2"> + <description summary="return accelerometer object"> + The ID provided will be initialized to the wl_accelerometer interface + for this seat. + + This request only takes effect if the seat has the accelerometer + capability. + </description> + <arg name="id" type="new_id" interface="wl_accelerometer"/> + </request> + <event name="name" since="2"> <description summary="unique identifier for this seat"> In a multiseat configuration this can be used by the client to help @@ -1605,6 +1641,93 @@ </event> </interface> + <interface name="wl_compass" version="2"> + <description summary="compass sensor device"> + The wl_compass interface represents a compass + associated with a seat. + </description> + + <request name="start"> + <description summary="Start receiving events"> + Sent to enable event receiving for the compass sensor. + </description> + </request> + + <request name="stop"> + <description summary="Stop receiving events"> + Sent to disable event receiving for the compass sensor. + </description> + </request> + + <event name="motion"> + <description summary="Motion event coming from the compass sensor"> + Updated sensor data available from compass + </description> + <arg name="x" type="fixed" summary="x-axis"/> + <arg name="y" type="fixed" summary="y-axis"/> + <arg name="z" type="fixed" summary="z-axis"/> + </event> + + </interface> + + <interface name="wl_gyroscope" version="2"> + <description summary="gyroscope sensor device"> + The wl_gyroscope interface represents a gyroscope + associated with a seat. + </description> + + <request name="start"> + <description summary="Start receiving events"> + Sent to enable event receiving for the gyroscope sensor. + </description> + </request> + + <request name="stop"> + <description summary="Stop receiving events"> + Sent to disable event receiving for the gyroscope sensor. + </description> + </request> + + <event name="motion"> + <description summary="Motion event coming from the gyroscope sensor"> + Updated sensor data available from gyroscope + </description> + <arg name="x" type="fixed" summary="x-axis"/> + <arg name="y" type="fixed" summary="y-axis"/> + <arg name="z" type="fixed" summary="z-axis"/> + </event> + + </interface> + + <interface name="wl_accelerometer" version="2"> + <description summary="accelerometer sensor device"> + The wl_accelerometer interface represents a accelerometer + associated with a seat. + </description> + + <request name="start"> + <description summary="Start receiving events"> + Sent to enable event receiving for the accelerometer sensor. + </description> + </request> + + <request name="stop"> + <description summary="Stop receiving events"> + Sent to disable event receiving for the accelerometer sensor. + </description> + </request> + + <event name="motion"> + <description summary="Motion event coming from the accelerometer sensor"> + Updated sensor data available from accelerometer + </description> + <arg name="x" type="fixed" summary="x-axis"/> + <arg name="y" type="fixed" summary="y-axis"/> + <arg name="z" type="fixed" summary="z-axis"/> + </event> + + </interface> + <interface name="wl_output" version="2"> <description summary="compositor output region"> An output describes part of the compositor geometry. The -- 1.7.9.5 _______________________________________________ wayland-devel mailing list wayland-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/wayland-devel