SDL  2.0
The wl_seat interface

A seat is a group of keyboards, pointer 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. More...

Data Structures

struct  wl_seat_listener
 

Macros

#define WL_SEAT_CAPABILITIES_SINCE_VERSION   1
 
#define WL_SEAT_NAME_SINCE_VERSION   2
 
#define WL_SEAT_GET_POINTER_SINCE_VERSION   1
 
#define WL_SEAT_GET_KEYBOARD_SINCE_VERSION   1
 
#define WL_SEAT_GET_TOUCH_SINCE_VERSION   1
 
#define WL_SEAT_RELEASE_SINCE_VERSION   5
 

Enumerations

enum  wl_seat_capability {
  WL_SEAT_CAPABILITY_POINTER = 1,
  WL_SEAT_CAPABILITY_KEYBOARD = 2,
  WL_SEAT_CAPABILITY_TOUCH = 4
}
 

Functions

static int wl_seat_add_listener (struct wl_seat *wl_seat, const struct wl_seat_listener *listener, void *data)
 
static void wl_seat_set_user_data (struct wl_seat *wl_seat, void *user_data)
 
static voidwl_seat_get_user_data (struct wl_seat *wl_seat)
 
static void wl_seat_destroy (struct wl_seat *wl_seat)
 
static struct wl_pointer * wl_seat_get_pointer (struct wl_seat *wl_seat)
 
static struct wl_keyboard * wl_seat_get_keyboard (struct wl_seat *wl_seat)
 
static struct wl_touch * wl_seat_get_touch (struct wl_seat *wl_seat)
 
static void wl_seat_release (struct wl_seat *wl_seat)
 

Detailed Description

A seat is a group of keyboards, pointer 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.

Macro Definition Documentation

◆ WL_SEAT_CAPABILITIES_SINCE_VERSION

#define WL_SEAT_CAPABILITIES_SINCE_VERSION   1

Definition at line 3892 of file wayland-client-protocol.h.

◆ WL_SEAT_GET_KEYBOARD_SINCE_VERSION

#define WL_SEAT_GET_KEYBOARD_SINCE_VERSION   1

Definition at line 3905 of file wayland-client-protocol.h.

◆ WL_SEAT_GET_POINTER_SINCE_VERSION

#define WL_SEAT_GET_POINTER_SINCE_VERSION   1

Definition at line 3901 of file wayland-client-protocol.h.

◆ WL_SEAT_GET_TOUCH_SINCE_VERSION

#define WL_SEAT_GET_TOUCH_SINCE_VERSION   1

Definition at line 3909 of file wayland-client-protocol.h.

◆ WL_SEAT_NAME_SINCE_VERSION

#define WL_SEAT_NAME_SINCE_VERSION   2

Definition at line 3896 of file wayland-client-protocol.h.

◆ WL_SEAT_RELEASE_SINCE_VERSION

#define WL_SEAT_RELEASE_SINCE_VERSION   5

Definition at line 3913 of file wayland-client-protocol.h.

Enumeration Type Documentation

◆ wl_seat_capability

seat capability bitmask

This is a bitmask of capabilities this seat has; if a member is set, then it is present on the seat.

Enumerator
WL_SEAT_CAPABILITY_POINTER 

the seat has pointer devices

WL_SEAT_CAPABILITY_KEYBOARD 

the seat has one or more keyboards

WL_SEAT_CAPABILITY_TOUCH 

the seat has touch devices

Definition at line 3805 of file wayland-client-protocol.h.

3805  {
3806  /**
3807  * the seat has pointer devices
3808  */
3810  /**
3811  * the seat has one or more keyboards
3812  */
3814  /**
3815  * the seat has touch devices
3816  */
3818 };

Function Documentation

◆ wl_seat_add_listener()

static int wl_seat_add_listener ( struct wl_seat *  wl_seat,
const struct wl_seat_listener listener,
void data 
)
inlinestatic

Definition at line 3877 of file wayland-client-protocol.h.

3879 {
3880  return wl_proxy_add_listener((struct wl_proxy *) wl_seat,
3881  (void (**)(void)) listener, data);
3882 }

◆ wl_seat_destroy()

static void wl_seat_destroy ( struct wl_seat *  wl_seat)
inlinestatic

Definition at line 3937 of file wayland-client-protocol.h.

3938 {
3939  wl_proxy_destroy((struct wl_proxy *) wl_seat);
3940 }

◆ wl_seat_get_keyboard()

static struct wl_keyboard* wl_seat_get_keyboard ( struct wl_seat *  wl_seat)
inlinestatic

The ID provided will be initialized to the wl_keyboard interface for this seat.

This request only takes effect if the seat has the keyboard capability, or has had the keyboard capability in the past. It is a protocol violation to issue this request on a seat that has never had the keyboard capability.

Definition at line 3976 of file wayland-client-protocol.h.

3977 {
3978  struct wl_proxy *id;
3979 
3980  id = wl_proxy_marshal_flags((struct wl_proxy *) wl_seat,
3981  WL_SEAT_GET_KEYBOARD, &wl_keyboard_interface, wl_proxy_get_version((struct wl_proxy *) wl_seat), 0, NULL);
3982 
3983  return (struct wl_keyboard *) id;
3984 }

References NULL, wl_keyboard_interface, and WL_SEAT_GET_KEYBOARD.

◆ wl_seat_get_pointer()

static struct wl_pointer* wl_seat_get_pointer ( struct wl_seat *  wl_seat)
inlinestatic

The ID provided will be initialized to the wl_pointer interface for this seat.

This request only takes effect if the seat has the pointer capability, or has had the pointer capability in the past. It is a protocol violation to issue this request on a seat that has never had the pointer capability.

Definition at line 3954 of file wayland-client-protocol.h.

3955 {
3956  struct wl_proxy *id;
3957 
3958  id = wl_proxy_marshal_flags((struct wl_proxy *) wl_seat,
3959  WL_SEAT_GET_POINTER, &wl_pointer_interface, wl_proxy_get_version((struct wl_proxy *) wl_seat), 0, NULL);
3960 
3961  return (struct wl_pointer *) id;
3962 }

References NULL, wl_pointer_interface, and WL_SEAT_GET_POINTER.

◆ wl_seat_get_touch()

static struct wl_touch* wl_seat_get_touch ( struct wl_seat *  wl_seat)
inlinestatic

The ID provided will be initialized to the wl_touch interface for this seat.

This request only takes effect if the seat has the touch capability, or has had the touch capability in the past. It is a protocol violation to issue this request on a seat that has never had the touch capability.

Definition at line 3998 of file wayland-client-protocol.h.

3999 {
4000  struct wl_proxy *id;
4001 
4002  id = wl_proxy_marshal_flags((struct wl_proxy *) wl_seat,
4003  WL_SEAT_GET_TOUCH, &wl_touch_interface, wl_proxy_get_version((struct wl_proxy *) wl_seat), 0, NULL);
4004 
4005  return (struct wl_touch *) id;
4006 }

References NULL, WL_SEAT_GET_TOUCH, and wl_touch_interface.

◆ wl_seat_get_user_data()

static void* wl_seat_get_user_data ( struct wl_seat *  wl_seat)
inlinestatic

Definition at line 3924 of file wayland-client-protocol.h.

3925 {
3926  return wl_proxy_get_user_data((struct wl_proxy *) wl_seat);
3927 }

◆ wl_seat_release()

static void wl_seat_release ( struct wl_seat *  wl_seat)
inlinestatic

Using this request a client can tell the server that it is not going to use the seat object anymore.

Definition at line 4015 of file wayland-client-protocol.h.

4016 {
4017  wl_proxy_marshal_flags((struct wl_proxy *) wl_seat,
4018  WL_SEAT_RELEASE, NULL, wl_proxy_get_version((struct wl_proxy *) wl_seat), WL_MARSHAL_FLAG_DESTROY);
4019 }

References NULL, and WL_SEAT_RELEASE.

◆ wl_seat_set_user_data()

static void wl_seat_set_user_data ( struct wl_seat *  wl_seat,
void user_data 
)
inlinestatic

Definition at line 3917 of file wayland-client-protocol.h.

3918 {
3919  wl_proxy_set_user_data((struct wl_proxy *) wl_seat, user_data);
3920 }
wl_pointer_interface
const struct wl_interface wl_pointer_interface
Definition: wayland-protocol.c:408
WL_SEAT_CAPABILITY_KEYBOARD
@ WL_SEAT_CAPABILITY_KEYBOARD
Definition: wayland-client-protocol.h:3813
NULL
#define NULL
Definition: begin_code.h:167
data
GLint GLenum GLsizei GLsizei GLsizei GLint GLsizei const GLvoid * data
Definition: SDL_opengl.h:1974
WL_SEAT_GET_TOUCH
#define WL_SEAT_GET_TOUCH
Definition: wayland-client-protocol.h:3886
WL_SEAT_CAPABILITY_TOUCH
@ WL_SEAT_CAPABILITY_TOUCH
Definition: wayland-client-protocol.h:3817
id
GLuint id
Definition: SDL_opengl_glext.h:528
WL_SEAT_GET_KEYBOARD
#define WL_SEAT_GET_KEYBOARD
Definition: wayland-client-protocol.h:3885
WL_SEAT_CAPABILITY_POINTER
@ WL_SEAT_CAPABILITY_POINTER
Definition: wayland-client-protocol.h:3809
wl_touch_interface
const struct wl_interface wl_touch_interface
Definition: wayland-protocol.c:447
WL_SEAT_GET_POINTER
#define WL_SEAT_GET_POINTER
Definition: wayland-client-protocol.h:3884
WL_SEAT_RELEASE
#define WL_SEAT_RELEASE
Definition: wayland-client-protocol.h:3887
wl_keyboard_interface
const struct wl_interface wl_keyboard_interface
Definition: wayland-protocol.c:427