| xkbcommon.h | | xkbcommon.h | |
| | | | |
| skipping to change at line 200 | | skipping to change at line 200 | |
| */ | | */ | |
| typedef uint32_t xkb_keysym_t; | | typedef uint32_t xkb_keysym_t; | |
| | | | |
| /** | | /** | |
| * Index of a keyboard layout. | | * Index of a keyboard layout. | |
| * | | * | |
| * The layout index is a state component which detemines which <em>keyboard | | * The layout index is a state component which detemines which <em>keyboard | |
| * layout</em> is active. These may be different alphabets, different key | | * layout</em> is active. These may be different alphabets, different key | |
| * arrangements, etc. | | * arrangements, etc. | |
| * | | * | |
|
| * Layout indexes are consecutive. The first layout has index 0. | | * Layout indices are consecutive. The first layout has index 0. | |
| * | | * | |
| * Each layout is not required to have a name, and the names are not | | * Each layout is not required to have a name, and the names are not | |
| * guaranteed to be unique (though they are usually provided and unique). | | * guaranteed to be unique (though they are usually provided and unique). | |
| * Therefore, it is not safe to use the name as a unique identifier for a | | * Therefore, it is not safe to use the name as a unique identifier for a | |
| * layout. Layout names are case-sensitive. | | * layout. Layout names are case-sensitive. | |
| * | | * | |
| * Layouts are also called "groups" by XKB. | | * Layouts are also called "groups" by XKB. | |
| * | | * | |
| * @sa xkb_keymap_num_layouts() xkb_keymap_num_layouts_for_key() | | * @sa xkb_keymap_num_layouts() xkb_keymap_num_layouts_for_key() | |
| */ | | */ | |
| typedef uint32_t xkb_layout_index_t; | | typedef uint32_t xkb_layout_index_t; | |
|
| /** A mask of layout indexes. */ | | /** A mask of layout indices. */ | |
| typedef uint32_t xkb_layout_mask_t; | | typedef uint32_t xkb_layout_mask_t; | |
| | | | |
| /** | | /** | |
| * Index of a shift level. | | * Index of a shift level. | |
| * | | * | |
|
| * @todo Explain what are shift levels. | | * Any key, in any layout, can have several <em>shift levels</em>. Each | |
| | | * shift level can assign different keysyms to the key. The shift level | |
| | | * to use is chosen according to the current keyboard state; for example, | |
| | | * if no keys are pressed, the first level may be used; if the Left Shift | |
| | | * key is pressed, the second; if Num Lock is pressed, the third; and | |
| | | * many such combinations are possible (see xkb_mod_index_t). | |
| | | * | |
| | | * Level indices are consecutive. The first level has index 0. | |
| */ | | */ | |
| typedef uint32_t xkb_level_index_t; | | typedef uint32_t xkb_level_index_t; | |
| | | | |
| /** | | /** | |
| * Index of a modifier. | | * Index of a modifier. | |
| * | | * | |
| * A @e modifier is a state component which changes the way keys are | | * A @e modifier is a state component which changes the way keys are | |
| * interpreted. A keymap defines a set of modifiers, such as Alt, Shift, | | * interpreted. A keymap defines a set of modifiers, such as Alt, Shift, | |
| * Num Lock or Meta, and specifies which keys may @e activate which | | * Num Lock or Meta, and specifies which keys may @e activate which | |
| * modifiers (in a many-to-many relationship, i.e. a key can activate | | * modifiers (in a many-to-many relationship, i.e. a key can activate | |
| * several modifiers, and a modifier may be activated by several keys. | | * several modifiers, and a modifier may be activated by several keys. | |
| * Different keymaps do this differently). | | * Different keymaps do this differently). | |
| * | | * | |
| * When retrieving the keysyms for a key, the active modifier set is | | * When retrieving the keysyms for a key, the active modifier set is | |
| * consulted; this detemines the correct shift level to use within the | | * consulted; this detemines the correct shift level to use within the | |
| * currently active layout (see xkb_level_index_t). | | * currently active layout (see xkb_level_index_t). | |
| * | | * | |
|
| * Modifier indexes are consecutive. The first modifier has index 0. | | * Modifier indices are consecutive. The first modifier has index 0. | |
| * | | * | |
| * Each modifier must have a name, and the names are unique. Therefore, it | | * Each modifier must have a name, and the names are unique. Therefore, it | |
| * is safe to use the name as a unique identifier for a modifier. The name
s | | * is safe to use the name as a unique identifier for a modifier. The name
s | |
| * of some common modifiers are provided in the xkbcommon/xkbcommon-names.h | | * of some common modifiers are provided in the xkbcommon/xkbcommon-names.h | |
| * header file. Modifier names are case-sensitive. | | * header file. Modifier names are case-sensitive. | |
| * | | * | |
| * @sa xkb_keymap_num_mods() | | * @sa xkb_keymap_num_mods() | |
| */ | | */ | |
| typedef uint32_t xkb_mod_index_t; | | typedef uint32_t xkb_mod_index_t; | |
|
| /** A mask of modifier indexes. */ | | /** A mask of modifier indices. */ | |
| typedef uint32_t xkb_mod_mask_t; | | typedef uint32_t xkb_mod_mask_t; | |
| | | | |
| /** | | /** | |
| * Index of a keyboard LED. | | * Index of a keyboard LED. | |
| * | | * | |
|
| * @todo Explain what are LEDs. | | * LEDs are logical objects which may be @e active or @e inactive. They | |
| | | * typically correspond to the lights on the keyboard. Their state is | |
| | | * determined by the current keyboard state. | |
| * | | * | |
|
| * LED indexes are non-consecutive. The first LED has index 0. | | * LED indices are non-consecutive. The first LED has index 0. | |
| * | | * | |
| * Each LED must have a name, and the names are unique. Therefore, | | * Each LED must have a name, and the names are unique. Therefore, | |
| * it is safe to use the name as a unique identifier for a LED. The names | | * it is safe to use the name as a unique identifier for a LED. The names | |
| * of some common LEDs are provided in the xkbcommon/xkbcommon-names.h | | * of some common LEDs are provided in the xkbcommon/xkbcommon-names.h | |
| * header file. LED names are case-sensitive. | | * header file. LED names are case-sensitive. | |
| * | | * | |
| * @warning A given keymap may specify an exact index for a given LED. | | * @warning A given keymap may specify an exact index for a given LED. | |
| * Therefore, LED indexing is not necessarily sequential, as opposed to | | * Therefore, LED indexing is not necessarily sequential, as opposed to | |
| * modifiers and layouts. This means that when iterating over the LEDs | | * modifiers and layouts. This means that when iterating over the LEDs | |
|
| * in a keymap using e.g. xkb_keymap_num_leds(), some indexes might be | | * in a keymap using e.g. xkb_keymap_num_leds(), some indices might be | |
| * invalid. Given such an index, functions like xkb_keymap_led_get_name() | | * invalid. Given such an index, functions like xkb_keymap_led_get_name() | |
| * will return NULL, and xkb_state_led_index_is_active() will return -1. | | * will return NULL, and xkb_state_led_index_is_active() will return -1. | |
| * | | * | |
| * LEDs are also called "indicators" by XKB. | | * LEDs are also called "indicators" by XKB. | |
| * | | * | |
| * @sa xkb_keymap_num_leds() | | * @sa xkb_keymap_num_leds() | |
| */ | | */ | |
| typedef uint32_t xkb_led_index_t; | | typedef uint32_t xkb_led_index_t; | |
|
| /** A mask of LED indexes. */ | | /** A mask of LED indices. */ | |
| typedef uint32_t xkb_led_mask_t; | | typedef uint32_t xkb_led_mask_t; | |
| | | | |
| #define XKB_KEYCODE_INVALID (0xffffffff) | | #define XKB_KEYCODE_INVALID (0xffffffff) | |
| #define XKB_LAYOUT_INVALID (0xffffffff) | | #define XKB_LAYOUT_INVALID (0xffffffff) | |
| #define XKB_LEVEL_INVALID (0xffffffff) | | #define XKB_LEVEL_INVALID (0xffffffff) | |
| #define XKB_MOD_INVALID (0xffffffff) | | #define XKB_MOD_INVALID (0xffffffff) | |
| #define XKB_LED_INVALID (0xffffffff) | | #define XKB_LED_INVALID (0xffffffff) | |
| | | | |
| #define XKB_KEYCODE_MAX (0xffffffff - 1) | | #define XKB_KEYCODE_MAX (0xffffffff - 1) | |
| | | | |
| | | | |
| skipping to change at line 354 | | skipping to change at line 363 | |
| * You may check if truncation has occurred by comparing the return value | | * You may check if truncation has occurred by comparing the return value | |
| * with the length of buffer, similarly to the snprintf(3) function. | | * with the length of buffer, similarly to the snprintf(3) function. | |
| * | | * | |
| * @sa xkb_keysym_t | | * @sa xkb_keysym_t | |
| */ | | */ | |
| int | | int | |
| xkb_keysym_get_name(xkb_keysym_t keysym, char *buffer, size_t size); | | xkb_keysym_get_name(xkb_keysym_t keysym, char *buffer, size_t size); | |
| | | | |
| /** Flags for xkb_keysym_from_name(). */ | | /** Flags for xkb_keysym_from_name(). */ | |
| enum xkb_keysym_flags { | | enum xkb_keysym_flags { | |
|
| | | /** Do not apply any flags. */ | |
| | | XKB_KEYSYM_NO_FLAGS = 0, | |
| /** Find keysym by case-insensitive search. */ | | /** Find keysym by case-insensitive search. */ | |
| XKB_KEYSYM_CASE_INSENSITIVE = (1 << 0) | | XKB_KEYSYM_CASE_INSENSITIVE = (1 << 0) | |
| }; | | }; | |
| | | | |
| /** | | /** | |
| * Get a keysym from its name. | | * Get a keysym from its name. | |
| * | | * | |
| * @param name The name of a keysym. See remarks in xkb_keysym_get_name(); | | * @param name The name of a keysym. See remarks in xkb_keysym_get_name(); | |
| * this function will accept any name returned by that function. | | * this function will accept any name returned by that function. | |
| * @param flags A set of flags controlling how the search is done. If | | * @param flags A set of flags controlling how the search is done. If | |
| | | | |
| skipping to change at line 419 | | skipping to change at line 430 | |
| * Creating, destroying and using library contexts. | | * Creating, destroying and using library contexts. | |
| * | | * | |
| * Every keymap compilation request must have a context associated with | | * Every keymap compilation request must have a context associated with | |
| * it. The context keeps around state such as the include path. | | * it. The context keeps around state such as the include path. | |
| * | | * | |
| * @{ | | * @{ | |
| */ | | */ | |
| | | | |
| /** Flags for context creation. */ | | /** Flags for context creation. */ | |
| enum xkb_context_flags { | | enum xkb_context_flags { | |
|
| | | /** Do not apply any context flags. */ | |
| | | XKB_CONTEXT_NO_FLAGS = 0, | |
| /** Create this context with an empty include path. */ | | /** Create this context with an empty include path. */ | |
| XKB_CONTEXT_NO_DEFAULT_INCLUDES = (1 << 0), | | XKB_CONTEXT_NO_DEFAULT_INCLUDES = (1 << 0), | |
| /** Don't take RMLVO names from the environment. */ | | /** Don't take RMLVO names from the environment. */ | |
| XKB_CONTEXT_NO_ENVIRONMENT_NAMES = (1 << 1), | | XKB_CONTEXT_NO_ENVIRONMENT_NAMES = (1 << 1), | |
| }; | | }; | |
| | | | |
| /** | | /** | |
| * Create a new context. | | * Create a new context. | |
| * | | * | |
| * @param flags Optional flags for the context, or 0. | | * @param flags Optional flags for the context, or 0. | |
| | | | |
| skipping to change at line 670 | | skipping to change at line 683 | |
| | | | |
| /** | | /** | |
| * @defgroup keymap Keymap Creation | | * @defgroup keymap Keymap Creation | |
| * Creating and destroying keymaps. | | * Creating and destroying keymaps. | |
| * | | * | |
| * @{ | | * @{ | |
| */ | | */ | |
| | | | |
| /** Flags for keymap compilation. */ | | /** Flags for keymap compilation. */ | |
| enum xkb_keymap_compile_flags { | | enum xkb_keymap_compile_flags { | |
|
| | | /** Do not apply any flags. */ | |
| | | XKB_MAP_COMPILE_NO_FLAGS = 0, | |
| /** Apparently you can't have empty enums. What a drag. */ | | /** Apparently you can't have empty enums. What a drag. */ | |
| XKB_MAP_COMPILE_PLACEHOLDER = 0 | | XKB_MAP_COMPILE_PLACEHOLDER = 0 | |
| }; | | }; | |
| | | | |
| /** | | /** | |
| * Create a keymap from RMLVO names. | | * Create a keymap from RMLVO names. | |
| * | | * | |
| * The primary keymap entry point: creates a new XKB keymap from a set of | | * The primary keymap entry point: creates a new XKB keymap from a set of | |
| * RMLVO (Rules + Model + Layouts + Variants + Options) names. | | * RMLVO (Rules + Model + Layouts + Variants + Options) names. | |
| * | | * | |
| | | | |
| skipping to change at line 1044 | | skipping to change at line 1059 | |
| /** @} */ | | /** @} */ | |
| | | | |
| /** | | /** | |
| * @defgroup state Keyboard State | | * @defgroup state Keyboard State | |
| * Creating, destroying and manipulating keyboard state objects. | | * Creating, destroying and manipulating keyboard state objects. | |
| * | | * | |
| * @{ | | * @{ | |
| */ | | */ | |
| | | | |
| /** | | /** | |
|
| * Create a new keyboard state object for a keymap. | | * Create a new keyboard state object. | |
| * | | * | |
|
| * @param keymap The keymap for which to create the state. | | * @param keymap The keymap which the state will use. | |
| * | | * | |
| * @returns A new keyboard state object, or NULL on failure. | | * @returns A new keyboard state object, or NULL on failure. | |
| * | | * | |
| * @memberof xkb_state | | * @memberof xkb_state | |
| */ | | */ | |
| struct xkb_state * | | struct xkb_state * | |
| xkb_state_new(struct xkb_keymap *keymap); | | xkb_state_new(struct xkb_keymap *keymap); | |
| | | | |
| /** | | /** | |
| * Take a new reference on a keyboard state object. | | * Take a new reference on a keyboard state object. | |
| | | | |
| skipping to change at line 1076 | | skipping to change at line 1091 | |
| * Release a reference on a keybaord state object, and possibly free it. | | * Release a reference on a keybaord state object, and possibly free it. | |
| * | | * | |
| * @param state The state. If it is NULL, this function does nothing. | | * @param state The state. If it is NULL, this function does nothing. | |
| * | | * | |
| * @memberof xkb_state | | * @memberof xkb_state | |
| */ | | */ | |
| void | | void | |
| xkb_state_unref(struct xkb_state *state); | | xkb_state_unref(struct xkb_state *state); | |
| | | | |
| /** | | /** | |
|
| * Get the keymap from which a keyboard state object was created. | | * Get the keymap which a keyboard state object is using. | |
| * | | * | |
|
| * @returns The keymap which was used in xkb_state_new() to create this | | * @returns The keymap which was passed to xkb_state_new() when creating | |
| * state object. | | * this state object. | |
| * | | * | |
| * This function does not take a new reference on the keymap; you must | | * This function does not take a new reference on the keymap; you must | |
| * explicitly reference it yourself if you plan to use it beyond the | | * explicitly reference it yourself if you plan to use it beyond the | |
| * lifetime of the state. | | * lifetime of the state. | |
| * | | * | |
| * @memberof xkb_state | | * @memberof xkb_state | |
| */ | | */ | |
| struct xkb_keymap * | | struct xkb_keymap * | |
| xkb_state_get_keymap(struct xkb_state *state); | | xkb_state_get_keymap(struct xkb_state *state); | |
| | | | |
| | | | |
| skipping to change at line 1113 | | skipping to change at line 1128 | |
| enum xkb_state_component { | | enum xkb_state_component { | |
| /** Depressed modifiers, i.e. a key is physically holding them. */ | | /** Depressed modifiers, i.e. a key is physically holding them. */ | |
| XKB_STATE_MODS_DEPRESSED = (1 << 0), | | XKB_STATE_MODS_DEPRESSED = (1 << 0), | |
| /** Latched modifiers, i.e. will be unset after the next non-modifier | | /** Latched modifiers, i.e. will be unset after the next non-modifier | |
| * key press. */ | | * key press. */ | |
| XKB_STATE_MODS_LATCHED = (1 << 1), | | XKB_STATE_MODS_LATCHED = (1 << 1), | |
| /** Locked modifiers, i.e. will be unset after the key provoking the | | /** Locked modifiers, i.e. will be unset after the key provoking the | |
| * lock has been pressed again. */ | | * lock has been pressed again. */ | |
| XKB_STATE_MODS_LOCKED = (1 << 2), | | XKB_STATE_MODS_LOCKED = (1 << 2), | |
| /** Effective modifiers, i.e. currently active and affect key | | /** Effective modifiers, i.e. currently active and affect key | |
|
| * processing (derived from the other state components). */ | | * processing (derived from the other state components). | |
| | | * Use this unless you explictly care how the state came about. */ | |
| XKB_STATE_MODS_EFFECTIVE = (1 << 3), | | XKB_STATE_MODS_EFFECTIVE = (1 << 3), | |
| /** Depressed layout, i.e. a key is physically holding it. */ | | /** Depressed layout, i.e. a key is physically holding it. */ | |
| XKB_STATE_LAYOUT_DEPRESSED = (1 << 4), | | XKB_STATE_LAYOUT_DEPRESSED = (1 << 4), | |
| /** Latched layout, i.e. will be unset after the next non-modifier | | /** Latched layout, i.e. will be unset after the next non-modifier | |
| * key press. */ | | * key press. */ | |
| XKB_STATE_LAYOUT_LATCHED = (1 << 5), | | XKB_STATE_LAYOUT_LATCHED = (1 << 5), | |
| /** Locked layout, i.e. will be unset after the key provoking the lock | | /** Locked layout, i.e. will be unset after the key provoking the lock | |
| * has been pressed again. */ | | * has been pressed again. */ | |
| XKB_STATE_LAYOUT_LOCKED = (1 << 6), | | XKB_STATE_LAYOUT_LOCKED = (1 << 6), | |
| /** Effective layout, i.e. currently active and affects key processing | | /** Effective layout, i.e. currently active and affects key processing | |
|
| * (derived from the other state components). */ | | * (derived from the other state components). | |
| | | * Use this unless you explictly care how the state came about. */ | |
| XKB_STATE_LAYOUT_EFFECTIVE = (1 << 7), | | XKB_STATE_LAYOUT_EFFECTIVE = (1 << 7), | |
| /** LEDs (derived from the other state components). */ | | /** LEDs (derived from the other state components). */ | |
| XKB_STATE_LEDS = (1 << 8) | | XKB_STATE_LEDS = (1 << 8) | |
| }; | | }; | |
| | | | |
| /** | | /** | |
| * Update the keyboard state to reflect a given key being pressed or | | * Update the keyboard state to reflect a given key being pressed or | |
| * released. | | * released. | |
| * | | * | |
|
| | | * This entry point is intended for programs which track the keyboard state | |
| | | * explictly (like an evdev client). If the state is serialized to you by | |
| | | * a master process (like a Wayland compositor) using functions like | |
| | | * xkb_state_serialize_mods(), you should use xkb_state_update_mask() inste | |
| | | ad. | |
| | | * The two functins should not generally be used together. | |
| | | * | |
| | | * A series of calls to this function should be consistent; that is, a call | |
| | | * with XKB_KEY_DOWN for a key should be matched by an XKB_KEY_UP; if a key | |
| | | * is pressed twice, it should be released twice; etc. Otherwise (e.g. due | |
| | | * to missed input events), situations like "stuck modifiers" may occur. | |
| | | * | |
| * @returns A mask of state components that have changed as a result of | | * @returns A mask of state components that have changed as a result of | |
| * the update. If nothing in the state has changed, returns 0. | | * the update. If nothing in the state has changed, returns 0. | |
| * | | * | |
| * @memberof xkb_state | | * @memberof xkb_state | |
|
| | | * | |
| | | * @sa xkb_state_update_mask() | |
| */ | | */ | |
| enum xkb_state_component | | enum xkb_state_component | |
| xkb_state_update_key(struct xkb_state *state, xkb_keycode_t key, | | xkb_state_update_key(struct xkb_state *state, xkb_keycode_t key, | |
| enum xkb_key_direction direction); | | enum xkb_key_direction direction); | |
| | | | |
| /** | | /** | |
|
| | | * Update a keyboard state from a set of explicit masks. | |
| | | * | |
| | | * This entry point is intended for window systems and the like, where a | |
| | | * master process holds an xkb_state, then serializes it over a wire | |
| | | * protocol, and clients then use the serialization to feed in to their own | |
| | | * xkb_state. | |
| | | * | |
| | | * All parameters must always be passed, or the resulting state may be | |
| | | * incoherent. | |
| | | * | |
| | | * The serialization is lossy and will not survive round trips; it must onl | |
| | | y | |
| | | * be used to feed slave state objects, and must not be used to update the | |
| | | * master state. | |
| | | * | |
| | | * If you do not fit the description above, you should use | |
| | | * xkb_state_update_key() instead. The two functions should not generally | |
| | | be | |
| | | * used together. | |
| | | * | |
| | | * @returns A mask of state components that have changed as a result of | |
| | | * the update. If nothing in the state has changed, returns 0. | |
| | | * | |
| | | * @memberof xkb_state | |
| | | * | |
| | | * @sa xkb_state_component | |
| | | * @sa xkb_state_update_key | |
| | | */ | |
| | | enum xkb_state_component | |
| | | xkb_state_update_mask(struct xkb_state *state, | |
| | | xkb_mod_mask_t depressed_mods, | |
| | | xkb_mod_mask_t latched_mods, | |
| | | xkb_mod_mask_t locked_mods, | |
| | | xkb_layout_index_t depressed_layout, | |
| | | xkb_layout_index_t latched_layout, | |
| | | xkb_layout_index_t locked_layout); | |
| | | | |
| | | /** | |
| * Get the keysyms obtained from pressing a particular key in a given | | * Get the keysyms obtained from pressing a particular key in a given | |
| * keyboard state. | | * keyboard state. | |
| * | | * | |
| * Get the keysyms for a key according to the current active layout, | | * Get the keysyms for a key according to the current active layout, | |
| * modifiers and shift level for the key, as determined by a keyboard | | * modifiers and shift level for the key, as determined by a keyboard | |
| * state. | | * state. | |
| * | | * | |
| * @param[in] state The keyboard state object. | | * @param[in] state The keyboard state object. | |
| * @param[in] key The keycode of the key. | | * @param[in] key The keycode of the key. | |
| * @param[out] syms_out An immutable array of keysyms corresponding the | | * @param[out] syms_out An immutable array of keysyms corresponding the | |
| * key in the given keyboard state. | | * key in the given keyboard state. | |
| * | | * | |
| * As an extension to XKB, this function can return more than one keysym. | | * As an extension to XKB, this function can return more than one keysym. | |
|
| * If you do not want to handle this case, you can use | | * If you do not want to handle this case, you should use | |
| * xkb_state_key_get_one_sym(). | | * xkb_state_key_get_one_sym(), which additionally performs transformations | |
| | | * which are specific to the one-keysym case. | |
| * | | * | |
| * @returns The number of keysyms in the syms_out array. If no keysyms | | * @returns The number of keysyms in the syms_out array. If no keysyms | |
| * are produced by the key in the given keyboard state, returns 0 and sets | | * are produced by the key in the given keyboard state, returns 0 and sets | |
| * syms_out to NULL. | | * syms_out to NULL. | |
| * | | * | |
| * @memberof xkb_state | | * @memberof xkb_state | |
| */ | | */ | |
| int | | int | |
| xkb_state_key_get_syms(struct xkb_state *state, xkb_keycode_t key, | | xkb_state_key_get_syms(struct xkb_state *state, xkb_keycode_t key, | |
| const xkb_keysym_t **syms_out); | | const xkb_keysym_t **syms_out); | |
| | | | |
| /** | | /** | |
| * Get the single keysym obtained from pressing a particular key in a | | * Get the single keysym obtained from pressing a particular key in a | |
| * given keyboard state. | | * given keyboard state. | |
| * | | * | |
|
| * This function is similar to xkb_state_key_get_syms(), but with a | | * This function is similar to xkb_state_key_get_syms(), but intended | |
| * simplified interface for users which cannot or do not want to handle | | * for users which cannot or do not want to handle the case where | |
| * the case where multiple keysyms are returned. | | * multiple keysyms are returned (in which case this function is | |
| | | * preferred). | |
| * | | * | |
| * @returns The keysym. If the key does not have exactly one keysym, | | * @returns The keysym. If the key does not have exactly one keysym, | |
| * returns XKB_KEY_NoSymbol | | * returns XKB_KEY_NoSymbol | |
| * | | * | |
| * @sa xkb_state_key_get_syms() | | * @sa xkb_state_key_get_syms() | |
| * @memberof xkb_state | | * @memberof xkb_state | |
| */ | | */ | |
| xkb_keysym_t | | xkb_keysym_t | |
| xkb_state_key_get_one_sym(struct xkb_state *state, xkb_keycode_t key); | | xkb_state_key_get_one_sym(struct xkb_state *state, xkb_keycode_t key); | |
| | | | |
| | | | |
| skipping to change at line 1247 | | skipping to change at line 1315 | |
| /** Returns true if any of the modifiers are active. */ | | /** Returns true if any of the modifiers are active. */ | |
| XKB_STATE_MATCH_ANY = (1 << 0), | | XKB_STATE_MATCH_ANY = (1 << 0), | |
| /** Returns true if all of the modifiers are active. */ | | /** Returns true if all of the modifiers are active. */ | |
| XKB_STATE_MATCH_ALL = (1 << 1), | | XKB_STATE_MATCH_ALL = (1 << 1), | |
| /** Makes matching non-exclusive, i.e. will not return false if a | | /** Makes matching non-exclusive, i.e. will not return false if a | |
| * modifier not specified in the arguments is active. */ | | * modifier not specified in the arguments is active. */ | |
| XKB_STATE_MATCH_NON_EXCLUSIVE = (1 << 16) | | XKB_STATE_MATCH_NON_EXCLUSIVE = (1 << 16) | |
| }; | | }; | |
| | | | |
| /** | | /** | |
|
| * Update a keyboard state from a set of explicit masks. | | | |
| * | | | |
| * This entry point is really only for window systems and the like, where a | | | |
| * master process holds an xkb_state, then serializes it over a wire | | | |
| * protocol, and clients then use the serialization to feed in to their own | | | |
| * xkb_state. | | | |
| * | | | |
| * All parameters must always be passed, or the resulting state may be | | | |
| * incoherent. | | | |
| * | | | |
| * The serialization is lossy and will not survive round trips; it must onl | | | |
| y | | | |
| * be used to feed slave state objects, and must not be used to update the | | | |
| * master state. | | | |
| * | | | |
| * Please do not use this unless you fit the description above. | | | |
| * | | | |
| * @returns A mask of state components that have changed as a result of | | | |
| * the update. If nothing in the state has changed, returns 0. | | | |
| * | | | |
| * @memberof xkb_state | | | |
| * | | | |
| * @sa xkb_state_component | | | |
| */ | | | |
| enum xkb_state_component | | | |
| xkb_state_update_mask(struct xkb_state *state, | | | |
| xkb_mod_mask_t depressed_mods, | | | |
| xkb_mod_mask_t latched_mods, | | | |
| xkb_mod_mask_t locked_mods, | | | |
| xkb_layout_index_t depressed_layout, | | | |
| xkb_layout_index_t latched_layout, | | | |
| xkb_layout_index_t locked_layout); | | | |
| | | | |
| /** | | | |
| * The counterpart to xkb_state_update_mask for modifiers, to be used on | | * The counterpart to xkb_state_update_mask for modifiers, to be used on | |
| * the server side of serialization. | | * the server side of serialization. | |
| * | | * | |
| * @param state The keyboard state. | | * @param state The keyboard state. | |
| * @param components A mask of the modifier state components to serialize. | | * @param components A mask of the modifier state components to serialize. | |
| * State components other than XKB_STATE_MODS_* are ignored. | | * State components other than XKB_STATE_MODS_* are ignored. | |
| * If XKB_STATE_MODS_EFFECTIVE is included, all other state components are | | * If XKB_STATE_MODS_EFFECTIVE is included, all other state components are | |
| * ignored. | | * ignored. | |
| * | | * | |
| * @returns A xkb_mod_mask_t representing the given components of the | | * @returns A xkb_mod_mask_t representing the given components of the | |
| | | | |
| skipping to change at line 1379 | | skipping to change at line 1414 | |
| | | | |
| /** | | /** | |
| * Test whether a set of modifiers are active in a given keyboard state by | | * Test whether a set of modifiers are active in a given keyboard state by | |
| * index. | | * index. | |
| * | | * | |
| * @param state The keyboard state. | | * @param state The keyboard state. | |
| * @param type The component of the state against which to match the | | * @param type The component of the state against which to match the | |
| * given modifiers. | | * given modifiers. | |
| * @param match The manner by which to match the state against the | | * @param match The manner by which to match the state against the | |
| * given modifiers. | | * given modifiers. | |
|
| * @param ... The set of of modifier indexes to test, terminated by a | | * @param ... The set of of modifier indices to test, terminated by a | |
| * XKB_MOD_INVALID argument (sentinel). | | * XKB_MOD_INVALID argument (sentinel). | |
| * | | * | |
| * @returns 1 if the modifiers are active, 0 if they are not. If any of | | * @returns 1 if the modifiers are active, 0 if they are not. If any of | |
|
| * the modifier indexes are invalid in the keymap, returns -1. | | * the modifier indices are invalid in the keymap, returns -1. | |
| * | | * | |
| * @memberof xkb_state | | * @memberof xkb_state | |
| */ | | */ | |
| int | | int | |
| xkb_state_mod_indices_are_active(struct xkb_state *state, | | xkb_state_mod_indices_are_active(struct xkb_state *state, | |
| enum xkb_state_component type, | | enum xkb_state_component type, | |
| enum xkb_state_match match, | | enum xkb_state_match match, | |
| ...); | | ...); | |
| | | | |
| /** | | /** | |
| | | | |
End of changes. 26 change blocks. |
| 57 lines changed or deleted | | 94 lines changed or added | |
|