The wl_seat interface

## 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 void * | wl_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 3838 of file wayland-client-protocol.h.

## WL_SEAT_GET_KEYBOARD_SINCE_VERSION

#define WL_SEAT_GET_KEYBOARD_SINCE_VERSION 1

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

## WL_SEAT_GET_POINTER_SINCE_VERSION

#define WL_SEAT_GET_POINTER_SINCE_VERSION 1

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

## WL_SEAT_GET_TOUCH_SINCE_VERSION

#define WL_SEAT_GET_TOUCH_SINCE_VERSION 1

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

## WL_SEAT_NAME_SINCE_VERSION

#define WL_SEAT_NAME_SINCE_VERSION 2

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

## WL_SEAT_RELEASE_SINCE_VERSION

#define WL_SEAT_RELEASE_SINCE_VERSION 5

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

## Enumeration Type Documentation

## wl_seat_capability

enum 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 3751 of file wayland-client-protocol.h.

{
/**
* the seat has pointer devices
*/
WL_SEAT_CAPABILITY_POINTER = 1,
/**
* the seat has one or more keyboards
*/
WL_SEAT_CAPABILITY_KEYBOARD = 2,
/**
* the seat has touch devices
*/
WL_SEAT_CAPABILITY_TOUCH = 4,
};
WL_SEAT_CAPABILITY_KEYBOARD
Definition: wayland-client-protocol.h:3759
WL_SEAT_CAPABILITY_TOUCH
Definition: wayland-client-protocol.h:3763
WL_SEAT_CAPABILITY_POINTER
Definition: wayland-client-protocol.h:3755

## 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
| ) |  |

inline static

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

{
return wl_proxy_add_listener((struct wl_proxy *) wl_seat,
(void (**)(void)) listener, data);
}
data
GLint GLenum GLsizei GLsizei GLsizei GLint GLsizei const GLvoid * data
Definition: SDL_opengl.h:1974

## wl_seat_destroy()

static void wl_seat_destroy | ( | struct wl_seat * | wl_seat | ) |

inline static

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

{
wl_proxy_destroy((struct wl_proxy *) wl_seat);
}

## wl_seat_get_keyboard()

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

static

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 3922 of file wayland-client-protocol.h.

References NULL, wl_keyboard_interface, and WL_SEAT_GET_KEYBOARD.

{
struct wl_proxy *id;
id = wl_proxy_marshal_constructor((struct wl_proxy *) wl_seat,
WL_SEAT_GET_KEYBOARD, &wl_keyboard_interface, NULL);
return (struct wl_keyboard *) id;
}
id
GLuint id
Definition: SDL_opengl_glext.h:528
wl_keyboard_interface
const struct wl_interface wl_keyboard_interface
Definition: wayland-protocol.c:427
WL_SEAT_GET_KEYBOARD
#define WL_SEAT_GET_KEYBOARD
Definition: wayland-client-protocol.h:3831
NULL
#define NULL
Definition: begin_code.h:164

## wl_seat_get_pointer()

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

static

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 3900 of file wayland-client-protocol.h.

References NULL, wl_pointer_interface, and WL_SEAT_GET_POINTER.

{
struct wl_proxy *id;
id = wl_proxy_marshal_constructor((struct wl_proxy *) wl_seat,
WL_SEAT_GET_POINTER, &wl_pointer_interface, NULL);
return (struct wl_pointer *) id;
}
id
GLuint id
Definition: SDL_opengl_glext.h:528
wl_pointer_interface
const struct wl_interface wl_pointer_interface
NULL
#define NULL
Definition: begin_code.h:164
WL_SEAT_GET_POINTER
#define WL_SEAT_GET_POINTER
Definition: wayland-client-protocol.h:3830

## wl_seat_get_touch()

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

static

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 3944 of file wayland-client-protocol.h.

References NULL, WL_SEAT_GET_TOUCH, and wl_touch_interface.

{
struct wl_proxy *id;
id = wl_proxy_marshal_constructor((struct wl_proxy *) wl_seat,
WL_SEAT_GET_TOUCH, &wl_touch_interface, NULL);
return (struct wl_touch *) id;
}
id
GLuint id
Definition: SDL_opengl_glext.h:528
wl_touch_interface
const struct wl_interface wl_touch_interface
Definition: wayland-protocol.c:447
WL_SEAT_GET_TOUCH
#define WL_SEAT_GET_TOUCH
Definition: wayland-client-protocol.h:3832
NULL
#define NULL
Definition: begin_code.h:164

## wl_seat_get_user_data()

static void* wl_seat_get_user_data | ( | struct wl_seat * | wl_seat | ) |

inline static

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

{
return wl_proxy_get_user_data((struct wl_proxy *) wl_seat);
}

## wl_seat_release()

static void wl_seat_release | ( | struct wl_seat * | wl_seat | ) |

inline static

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

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

References WL_SEAT_RELEASE.

{
wl_proxy_marshal((struct wl_proxy *) wl_seat,
WL_SEAT_RELEASE);
wl_proxy_destroy((struct wl_proxy *) wl_seat);
}
WL_SEAT_RELEASE
#define WL_SEAT_RELEASE
Definition: wayland-client-protocol.h:3833

## wl_seat_set_user_data()

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

inline static

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

{
wl_proxy_set_user_data((struct wl_proxy *) wl_seat, user_data);
}