[RFC] protocol: Extend wayland seat with interfaces for sensor inputs.
Stefan Schmidt
s.schmidt at samsung.com
Mon Aug 12 06:43:53 PDT 2013
Hello.
On 08/01/2013 09:39 AM, Stefan Schmidt wrote:
> 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.schmidt at samsung.com>
To stir up some discussions on this I might elaborate a bit on it.
This came up on a face to face meeting between soem Intel and Samsung
folks. It is driven by the idea that some sensor are used, or at least
can be used, as input devices for games or even normal operation.
We started with many more sensors but brought it down to these three as
they seem to make the most sense. I kept the proposal small regarding
exposed requests and events to not over-engineer it from the beginning.
Right now I'm working on integrating this in weston to see how feasible
it is and have a reference implementation. Rob asked me to send this out
early to get some early feedback regarding the protocol and so I did.
Lets see if anyone has something to say about this. :)
regards
Stefan Schmidt
> 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
>
More information about the wayland-devel
mailing list