mirror of
https://gitlab.freedesktop.org/wayland/wayland.git
synced 2025-11-25 06:59:46 -05:00
Convert wl_input_device to wl_seat (and friends)
wl_input_device has been both renamed and split. wl_seat is now a virtual object representing a group of logically related input devices with related focus. It now only generates one event: to let clients know that it has new capabilities. It takes requests which hand back objects for the wl_pointer, wl_keyboard and wl_touch interfaces it exposes which all provide the old input interface, just under different names. Signed-off-by: Daniel Stone <daniel@fooishbar.org>
This commit is contained in:
parent
6d1902b85c
commit
aa0fb0f49c
5 changed files with 498 additions and 310 deletions
|
|
@ -383,7 +383,7 @@
|
|||
|
||||
<request name="get_data_device">
|
||||
<arg name="id" type="new_id" interface="wl_data_device"/>
|
||||
<arg name="input_device" type="object" interface="wl_input_device"/>
|
||||
<arg name="seat" type="object" interface="wl_seat"/>
|
||||
</request>
|
||||
</interface>
|
||||
|
||||
|
|
@ -412,7 +412,7 @@
|
|||
</request>
|
||||
|
||||
<request name="move">
|
||||
<arg name="input_device" type="object" interface="wl_input_device"/>
|
||||
<arg name="seat" type="object" interface="wl_seat"/>
|
||||
<arg name="serial" type="uint"/>
|
||||
</request>
|
||||
|
||||
|
|
@ -429,7 +429,7 @@
|
|||
</enum>
|
||||
|
||||
<request name="resize">
|
||||
<arg name="input_device" type="object" interface="wl_input_device"/>
|
||||
<arg name="seat" type="object" interface="wl_seat"/>
|
||||
<arg name="serial" type="uint"/>
|
||||
<arg name="edges" type="uint"/>
|
||||
</request>
|
||||
|
|
@ -525,7 +525,7 @@
|
|||
inside or outside the surface?
|
||||
</description>
|
||||
|
||||
<arg name="input_device" type="object" interface="wl_input_device"/>
|
||||
<arg name="seat" type="object" interface="wl_seat"/>
|
||||
<arg name="serial" type="uint"/>
|
||||
<arg name="parent" type="object" interface="wl_shell_surface"/>
|
||||
<arg name="x" type="int"/>
|
||||
|
|
@ -697,15 +697,60 @@
|
|||
</event>
|
||||
</interface>
|
||||
|
||||
<interface name="wl_input_device" version="1">
|
||||
<description summary="input device group">
|
||||
A group of keyboards and pointer devices (mice, for
|
||||
example). This object is published as a global during start up,
|
||||
or when such a device is hot plugged. A input_device group
|
||||
typically has a pointer and maintains a keyboard_focus and a
|
||||
pointer_focus.
|
||||
<interface name="wl_seat" version="1">
|
||||
<description summary="seat">
|
||||
A group of keyboards, pointer (mice, for example) and touch
|
||||
devices . This object is published as a global during start up,
|
||||
or when such a device is hot plugged. A seat typically has a
|
||||
pointer and maintains a keyboard_focus and a pointer_focus.
|
||||
</description>
|
||||
|
||||
<enum name="capability">
|
||||
<description summary="seat capability bitmask">
|
||||
This is a bitmask of capabilities this seat has; if a member is
|
||||
set, then it is present on the seat.
|
||||
</description>
|
||||
<entry name="pointer" value="1" summary="wl_pointer"/>
|
||||
<entry name="keyboard" value="2" summary="wl_keyboard"/>
|
||||
<entry name="touch" value="4" summary="wl_touch"/>
|
||||
</enum>
|
||||
|
||||
|
||||
<event name="capabilities">
|
||||
<description summary="seat capabilities changed">
|
||||
This is emitted whenever a seat gains or loses the pointer,
|
||||
keyboard or touch capabilities. The argument is a wl_seat_caps_mask
|
||||
enum containing the complete set of capabilities this seat has.
|
||||
</description>
|
||||
<arg name="capabilities" type="uint"/>
|
||||
</event>
|
||||
|
||||
<request name="get_pointer">
|
||||
<description summary="return pointer object">
|
||||
The ID provided will be initialized to the wl_pointer interface
|
||||
for this seat.
|
||||
</description>
|
||||
<arg name="id" type="new_id" interface="wl_pointer"/>
|
||||
</request>
|
||||
|
||||
<request name="get_keyboard">
|
||||
<description summary="return pointer object">
|
||||
The ID provided will be initialized to the wl_keyboard interface
|
||||
for this seat.
|
||||
</description>
|
||||
<arg name="id" type="new_id" interface="wl_keyboard"/>
|
||||
</request>
|
||||
|
||||
<request name="get_touch">
|
||||
<description summary="return pointer object">
|
||||
The ID provided will be initialized to the wl_touch interface
|
||||
for this seat.
|
||||
</description>
|
||||
<arg name="id" type="new_id" interface="wl_touch"/>
|
||||
</request>
|
||||
</interface>
|
||||
|
||||
<interface name="wl_pointer" version="1">
|
||||
<request name="attach">
|
||||
<description summary="set the pointer image">
|
||||
Set the pointer's image. This request only takes effect if
|
||||
|
|
@ -719,6 +764,27 @@
|
|||
<arg name="hotspot_y" type="int"/>
|
||||
</request>
|
||||
|
||||
<event name="enter">
|
||||
<description summary="enter event">
|
||||
Notification that this seat's pointer is focused on a certain
|
||||
surface. When an seat's focus enters a surface, the pointer image
|
||||
is undefined and a client should respond to this event by setting
|
||||
an appropriate pointer image.
|
||||
</description>
|
||||
|
||||
<arg name="serial" type="uint"/>
|
||||
<arg name="surface" type="object" interface="wl_surface"/>
|
||||
<arg name="surface_x" type="fixed"/>
|
||||
<arg name="surface_y" type="fixed"/>
|
||||
</event>
|
||||
|
||||
<event name="leave">
|
||||
<description summary="leave event">
|
||||
</description>
|
||||
<arg name="serial" type="uint"/>
|
||||
<arg name="surface" type="object" interface="wl_surface"/>
|
||||
</event>
|
||||
|
||||
<event name="motion">
|
||||
<description summary="pointer motion event">
|
||||
Notification of pointer location change. The arguments surface_[xy]
|
||||
|
|
@ -757,6 +823,22 @@
|
|||
<arg name="axis" type="uint"/>
|
||||
<arg name="value" type="int"/>
|
||||
</event>
|
||||
</interface>
|
||||
|
||||
<interface name="wl_keyboard" version="1">
|
||||
<description summary="keyboard input device">
|
||||
</description>
|
||||
|
||||
<event name="enter">
|
||||
<arg name="serial" type="uint"/>
|
||||
<arg name="surface" type="object" interface="wl_surface"/>
|
||||
<arg name="keys" type="array"/>
|
||||
</event>
|
||||
|
||||
<event name="leave">
|
||||
<arg name="serial" type="uint"/>
|
||||
<arg name="surface" type="object" interface="wl_surface"/>
|
||||
</event>
|
||||
|
||||
<event name="key">
|
||||
<description summary="key event">
|
||||
|
|
@ -768,40 +850,13 @@
|
|||
<arg name="key" type="uint"/>
|
||||
<arg name="state" type="uint"/>
|
||||
</event>
|
||||
</interface>
|
||||
|
||||
<event name="pointer_enter">
|
||||
<description summary="pointer enter event">
|
||||
Notification that this input device's pointer is focused on
|
||||
certain surface. When an input_device enters a surface, the
|
||||
pointer image is undefined and a client should respond to this
|
||||
event by setting an appropriate pointer image.
|
||||
</description>
|
||||
<interface name="wl_touch" version="1">
|
||||
<description summary="touch screen input device">
|
||||
</description>
|
||||
|
||||
<arg name="serial" type="uint"/>
|
||||
<arg name="surface" type="object" interface="wl_surface"/>
|
||||
<arg name="surface_x" type="fixed"/>
|
||||
<arg name="surface_y" type="fixed"/>
|
||||
</event>
|
||||
|
||||
<event name="pointer_leave">
|
||||
<description summary="pointer leave event">
|
||||
</description>
|
||||
<arg name="serial" type="uint"/>
|
||||
<arg name="surface" type="object" interface="wl_surface"/>
|
||||
</event>
|
||||
|
||||
<event name="keyboard_enter">
|
||||
<arg name="serial" type="uint"/>
|
||||
<arg name="surface" type="object" interface="wl_surface"/>
|
||||
<arg name="keys" type="array"/>
|
||||
</event>
|
||||
|
||||
<event name="keyboard_leave">
|
||||
<arg name="serial" type="uint"/>
|
||||
<arg name="surface" type="object" interface="wl_surface"/>
|
||||
</event>
|
||||
|
||||
<event name="touch_down">
|
||||
<event name="down">
|
||||
<arg name="serial" type="uint"/>
|
||||
<arg name="time" type="uint"/>
|
||||
<arg name="surface" type="object" interface="wl_surface"/>
|
||||
|
|
@ -810,26 +865,26 @@
|
|||
<arg name="y" type="fixed" />
|
||||
</event>
|
||||
|
||||
<event name="touch_up">
|
||||
<event name="up">
|
||||
<arg name="serial" type="uint"/>
|
||||
<arg name="time" type="uint"/>
|
||||
<arg name="id" type="int" />
|
||||
</event>
|
||||
|
||||
<event name="touch_motion">
|
||||
<event name="motion">
|
||||
<arg name="time" type="uint"/>
|
||||
<arg name="id" type="int" />
|
||||
<arg name="x" type="fixed" />
|
||||
<arg name="y" type="fixed" />
|
||||
</event>
|
||||
|
||||
<event name="touch_frame">
|
||||
<event name="frame">
|
||||
<description summary="end of touch frame event">
|
||||
Indicates the end of a contact point list.
|
||||
</description>
|
||||
</event>
|
||||
|
||||
<event name="touch_cancel">
|
||||
<event name="cancel">
|
||||
<description summary="touch session cancelled">
|
||||
Sent if the compositor decides the touch stream is a global
|
||||
gesture. No further events are sent to the clients from that
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue