libxkbcommon 0.4.0

- Main Page
- Modules
- Data Structures
- Files

- File List
- Globals

xkbcommon-x11.h
Go to the documentation of this file.
1 /*
2 * Copyright © 2013 Ran Benita
3 *
4 * Permission is hereby granted, free of charge, to any person obtaining a
5 * copy of this software and associated documentation files (the "Software"),
6 * to deal in the Software without restriction, including without limitation
7 * the rights to use, copy, modify, merge, publish, distribute, sublicense,
8 * and/or sell copies of the Software, and to permit persons to whom the
9 * Software is furnished to do so, subject to the following conditions:
10 *
11 * The above copyright notice and this permission notice (including the next
12 * paragraph) shall be included in all copies or substantial portions of the
13 * Software.
14 *
15 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
18 * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
20 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
21 * DEALINGS IN THE SOFTWARE.
22 */
23
24 #ifndef _XKBCOMMON_X11_H
25 #define _XKBCOMMON_X11_H
26
27 #include <xcb/xcb.h>
28 #include <xkbcommon/xkbcommon.h>
29
46 #define XKB_X11_MIN_MAJOR_XKB_VERSION 1
47
51 #define XKB_X11_MIN_MINOR_XKB_VERSION 0
52
54 enum xkb_x11_setup_xkb_extension_flags {
56 XKB_X11_SETUP_XKB_EXTENSION_NO_FLAGS = 0
57 };
58
93 int
94 xkb_x11_setup_xkb_extension(xcb_connection_t *connection,
95 uint16_t major_xkb_version,
96 uint16_t minor_xkb_version,
97 enum xkb_x11_setup_xkb_extension_flags flags,
98 uint16_t *major_xkb_version_out,
99 uint16_t *minor_xkb_version_out,
100 uint8_t *base_event_out,
101 uint8_t *base_error_out);
102
111 int32_t
112 xkb_x11_get_core_keyboard_device_id(xcb_connection_t *connection);
113
135 struct xkb_keymap *
136 xkb_x11_keymap_new_from_device(struct xkb_context *context,
137 xcb_connection_t *connection,
138 int32_t device_id,
139 enum xkb_keymap_compile_flags flags);
140
159 struct xkb_state *
160 xkb_x11_state_new_from_device(struct xkb_keymap *keymap,
161 xcb_connection_t *connection,
162 int32_t device_id);
163
166 #endif
xkb_state::xkb_x11_state_new_from_device
struct xkb_state * xkb_x11_state_new_from_device(struct xkb_keymap *keymap, xcb_connection_t *connection, int32_t device_id)
Create a new keyboard state object from an X11 keyboard device.
xkb_x11_get_core_keyboard_device_id
int32_t xkb_x11_get_core_keyboard_device_id(xcb_connection_t *connection)
Get the keyboard device ID of the core X11 keyboard.
xkb_x11_setup_xkb_extension
int xkb_x11_setup_xkb_extension(xcb_connection_t *connection, uint16_t major_xkb_version, uint16_t minor_xkb_version, enum xkb_x11_setup_xkb_extension_flags flags, uint16_t *major_xkb_version_out, uint16_t *minor_xkb_version_out, uint8_t *base_event_out, uint8_t *base_error_out)
Setup the XKB X11 extension for this X client.
xkbcommon.h
Main libxkbcommon API.
XKB_X11_SETUP_XKB_EXTENSION_NO_FLAGS
Do not apply any flags.
Definition: xkbcommon-x11.h:56
xkb_context
Opaque top level library context object.
xkb_keymap_compile_flags
xkb_keymap_compile_flags
Flags for keymap compilation.
Definition: xkbcommon.h:682
xkb_state
Opaque keyboard state object.
Definition: xkbcommon.h:123
xkb_keymap
Opaque compiled keymap object.
Definition: xkbcommon.h:111
xkb_x11_setup_xkb_extension_flags
xkb_x11_setup_xkb_extension_flags
Flags for the xkb_x11_setup_xkb_extension() function.
Definition: xkbcommon-x11.h:54
xkb_keymap::xkb_x11_keymap_new_from_device
struct xkb_keymap * xkb_x11_keymap_new_from_device(struct xkb_context *context, xcb_connection_t *connection, int32_t device_id, enum xkb_keymap_compile_flags flags)
Create a keymap from an X11 keyboard device.