SDL  2.0
The wl_keyboard interface

The wl_keyboard interface represents one or more keyboards associated with a seat. More...

Data Structures

struct  wl_keyboard_listener
 

Macros

#define WL_KEYBOARD_KEYMAP_SINCE_VERSION   1
 
#define WL_KEYBOARD_ENTER_SINCE_VERSION   1
 
#define WL_KEYBOARD_LEAVE_SINCE_VERSION   1
 
#define WL_KEYBOARD_KEY_SINCE_VERSION   1
 
#define WL_KEYBOARD_MODIFIERS_SINCE_VERSION   1
 
#define WL_KEYBOARD_REPEAT_INFO_SINCE_VERSION   4
 
#define WL_KEYBOARD_RELEASE_SINCE_VERSION   3
 

Enumerations

enum  wl_keyboard_keymap_format {
  WL_KEYBOARD_KEYMAP_FORMAT_NO_KEYMAP = 0,
  WL_KEYBOARD_KEYMAP_FORMAT_XKB_V1 = 1
}
 
enum  wl_keyboard_key_state {
  WL_KEYBOARD_KEY_STATE_RELEASED = 0,
  WL_KEYBOARD_KEY_STATE_PRESSED = 1
}
 

Functions

static int wl_keyboard_add_listener (struct wl_keyboard *wl_keyboard, const struct wl_keyboard_listener *listener, void *data)
 
static void wl_keyboard_set_user_data (struct wl_keyboard *wl_keyboard, void *user_data)
 
static voidwl_keyboard_get_user_data (struct wl_keyboard *wl_keyboard)
 
static void wl_keyboard_destroy (struct wl_keyboard *wl_keyboard)
 
static void wl_keyboard_release (struct wl_keyboard *wl_keyboard)
 

Detailed Description

The wl_keyboard interface represents one or more keyboards associated with a seat.

Macro Definition Documentation

◆ WL_KEYBOARD_ENTER_SINCE_VERSION

#define WL_KEYBOARD_ENTER_SINCE_VERSION   1

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

◆ WL_KEYBOARD_KEY_SINCE_VERSION

#define WL_KEYBOARD_KEY_SINCE_VERSION   1

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

◆ WL_KEYBOARD_KEYMAP_SINCE_VERSION

#define WL_KEYBOARD_KEYMAP_SINCE_VERSION   1

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

◆ WL_KEYBOARD_LEAVE_SINCE_VERSION

#define WL_KEYBOARD_LEAVE_SINCE_VERSION   1

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

◆ WL_KEYBOARD_MODIFIERS_SINCE_VERSION

#define WL_KEYBOARD_MODIFIERS_SINCE_VERSION   1

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

◆ WL_KEYBOARD_RELEASE_SINCE_VERSION

#define WL_KEYBOARD_RELEASE_SINCE_VERSION   3

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

◆ WL_KEYBOARD_REPEAT_INFO_SINCE_VERSION

#define WL_KEYBOARD_REPEAT_INFO_SINCE_VERSION   4

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

Enumeration Type Documentation

◆ wl_keyboard_key_state

physical key state

Describes the physical state of a key that produced the key event.

Enumerator
WL_KEYBOARD_KEY_STATE_RELEASED 

key is not pressed

WL_KEYBOARD_KEY_STATE_PRESSED 

key is pressed

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

4544  {
4545  /**
4546  * key is not pressed
4547  */
4549  /**
4550  * key is pressed
4551  */
4553 };

◆ wl_keyboard_keymap_format

keyboard mapping format

This specifies the format of the keymap provided to the client with the wl_keyboard.keymap event.

Enumerator
WL_KEYBOARD_KEYMAP_FORMAT_NO_KEYMAP 

no keymap; client must understand how to interpret the raw keycode

WL_KEYBOARD_KEYMAP_FORMAT_XKB_V1 

libxkbcommon compatible; to determine the xkb keycode, clients must add 8 to the key event keycode

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

4524  {
4525  /**
4526  * no keymap; client must understand how to interpret the raw keycode
4527  */
4529  /**
4530  * libxkbcommon compatible; to determine the xkb keycode, clients must add 8 to the key event keycode
4531  */
4533 };

Function Documentation

◆ wl_keyboard_add_listener()

static int wl_keyboard_add_listener ( struct wl_keyboard *  wl_keyboard,
const struct wl_keyboard_listener listener,
void data 
)
inlinestatic

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

4670 {
4671  return wl_proxy_add_listener((struct wl_proxy *) wl_keyboard,
4672  (void (**)(void)) listener, data);
4673 }

◆ wl_keyboard_destroy()

static void wl_keyboard_destroy ( struct wl_keyboard *  wl_keyboard)
inlinestatic

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

4730 {
4731  wl_proxy_destroy((struct wl_proxy *) wl_keyboard);
4732 }

◆ wl_keyboard_get_user_data()

static void* wl_keyboard_get_user_data ( struct wl_keyboard *  wl_keyboard)
inlinestatic

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

4717 {
4718  return wl_proxy_get_user_data((struct wl_proxy *) wl_keyboard);
4719 }

◆ wl_keyboard_release()

static void wl_keyboard_release ( struct wl_keyboard *  wl_keyboard)
inlinestatic

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

4739 {
4740  wl_proxy_marshal_flags((struct wl_proxy *) wl_keyboard,
4741  WL_KEYBOARD_RELEASE, NULL, wl_proxy_get_version((struct wl_proxy *) wl_keyboard), WL_MARSHAL_FLAG_DESTROY);
4742 }

References NULL, and WL_KEYBOARD_RELEASE.

◆ wl_keyboard_set_user_data()

static void wl_keyboard_set_user_data ( struct wl_keyboard *  wl_keyboard,
void user_data 
)
inlinestatic

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

4710 {
4711  wl_proxy_set_user_data((struct wl_proxy *) wl_keyboard, user_data);
4712 }
WL_KEYBOARD_KEYMAP_FORMAT_XKB_V1
@ WL_KEYBOARD_KEYMAP_FORMAT_XKB_V1
Definition: wayland-client-protocol.h:4532
NULL
#define NULL
Definition: begin_code.h:167
WL_KEYBOARD_KEY_STATE_RELEASED
@ WL_KEYBOARD_KEY_STATE_RELEASED
Definition: wayland-client-protocol.h:4548
WL_KEYBOARD_KEY_STATE_PRESSED
@ WL_KEYBOARD_KEY_STATE_PRESSED
Definition: wayland-client-protocol.h:4552
WL_KEYBOARD_RELEASE
#define WL_KEYBOARD_RELEASE
Definition: wayland-client-protocol.h:4675
WL_KEYBOARD_KEYMAP_FORMAT_NO_KEYMAP
@ WL_KEYBOARD_KEYMAP_FORMAT_NO_KEYMAP
Definition: wayland-client-protocol.h:4528
data
GLint GLenum GLsizei GLsizei GLsizei GLint GLsizei const GLvoid * data
Definition: SDL_opengl.h:1974