SDL  2.0
The wl_keyboard interface

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

◆ WL_KEYBOARD_KEY_SINCE_VERSION

#define WL_KEYBOARD_KEY_SINCE_VERSION   1

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

◆ WL_KEYBOARD_KEYMAP_SINCE_VERSION

#define WL_KEYBOARD_KEYMAP_SINCE_VERSION   1

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

◆ WL_KEYBOARD_LEAVE_SINCE_VERSION

#define WL_KEYBOARD_LEAVE_SINCE_VERSION   1

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

◆ WL_KEYBOARD_MODIFIERS_SINCE_VERSION

#define WL_KEYBOARD_MODIFIERS_SINCE_VERSION   1

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

◆ WL_KEYBOARD_RELEASE_SINCE_VERSION

#define WL_KEYBOARD_RELEASE_SINCE_VERSION   3

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

◆ WL_KEYBOARD_REPEAT_INFO_SINCE_VERSION

#define WL_KEYBOARD_REPEAT_INFO_SINCE_VERSION   4

Definition at line 4645 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 4489 of file wayland-client-protocol.h.

4489  {
4490  /**
4491  * key is not pressed
4492  */
4494  /**
4495  * key is pressed
4496  */
4498 };

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

4469  {
4470  /**
4471  * no keymap; client must understand how to interpret the raw keycode
4472  */
4474  /**
4475  * libxkbcommon compatible; to determine the xkb keycode, clients must add 8 to the key event keycode
4476  */
4478 };

Function Documentation

◆ wl_keyboard_destroy()

static void wl_keyboard_destroy ( struct wl_keyboard *  wl_keyboard)
inlinestatic

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

4675 {
4676  wl_proxy_destroy((struct wl_proxy *) wl_keyboard);
4677 }

◆ wl_keyboard_get_user_data()

static void* wl_keyboard_get_user_data ( struct wl_keyboard *  wl_keyboard)
inlinestatic

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

4662 {
4663  return wl_proxy_get_user_data((struct wl_proxy *) wl_keyboard);
4664 }

◆ wl_keyboard_release()

static void wl_keyboard_release ( struct wl_keyboard *  wl_keyboard)
inlinestatic

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

References WL_KEYBOARD_RELEASE.

4684 {
4685  wl_proxy_marshal((struct wl_proxy *) wl_keyboard,
4687 
4688  wl_proxy_destroy((struct wl_proxy *) wl_keyboard);
4689 }
#define 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 4654 of file wayland-client-protocol.h.

4655 {
4656  wl_proxy_set_user_data((struct wl_proxy *) wl_keyboard, user_data);
4657 }