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

◆ WL_KEYBOARD_KEY_SINCE_VERSION

#define WL_KEYBOARD_KEY_SINCE_VERSION   1

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

◆ WL_KEYBOARD_KEYMAP_SINCE_VERSION

#define WL_KEYBOARD_KEYMAP_SINCE_VERSION   1

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

◆ WL_KEYBOARD_LEAVE_SINCE_VERSION

#define WL_KEYBOARD_LEAVE_SINCE_VERSION   1

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

◆ WL_KEYBOARD_MODIFIERS_SINCE_VERSION

#define WL_KEYBOARD_MODIFIERS_SINCE_VERSION   1

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

◆ WL_KEYBOARD_RELEASE_SINCE_VERSION

#define WL_KEYBOARD_RELEASE_SINCE_VERSION   3

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

◆ WL_KEYBOARD_REPEAT_INFO_SINCE_VERSION

#define WL_KEYBOARD_REPEAT_INFO_SINCE_VERSION   4

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

4506  {
4507  /**
4508  * key is not pressed
4509  */
4511  /**
4512  * key is pressed
4513  */
4515 };

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

4486  {
4487  /**
4488  * no keymap; client must understand how to interpret the raw keycode
4489  */
4491  /**
4492  * libxkbcommon compatible; to determine the xkb keycode, clients must add 8 to the key event keycode
4493  */
4495 };

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

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

◆ wl_keyboard_destroy()

static void wl_keyboard_destroy ( struct wl_keyboard *  wl_keyboard)
inlinestatic

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

4692 {
4693  wl_proxy_destroy((struct wl_proxy *) wl_keyboard);
4694 }

◆ wl_keyboard_get_user_data()

static void* wl_keyboard_get_user_data ( struct wl_keyboard *  wl_keyboard)
inlinestatic

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

4679 {
4680  return wl_proxy_get_user_data((struct wl_proxy *) wl_keyboard);
4681 }

◆ wl_keyboard_release()

static void wl_keyboard_release ( struct wl_keyboard *  wl_keyboard)
inlinestatic

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

References WL_KEYBOARD_RELEASE.

4701 {
4702  wl_proxy_marshal((struct wl_proxy *) wl_keyboard,
4704 
4705  wl_proxy_destroy((struct wl_proxy *) wl_keyboard);
4706 }
#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 4671 of file wayland-client-protocol.h.

4672 {
4673  wl_proxy_set_user_data((struct wl_proxy *) wl_keyboard, user_data);
4674 }