Add xkb_state_get_map()
This is very useful because it avoids redundent pointers in structs and/or parameter passing in the application. Signed-off-by: Ran Benita <ran234@gmail.com>master
parent
8fbd44fde6
commit
1b9635dfb5
|
@ -423,6 +423,12 @@ xkb_state_ref(struct xkb_state *state);
|
||||||
void
|
void
|
||||||
xkb_state_unref(struct xkb_state *state);
|
xkb_state_unref(struct xkb_state *state);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get the keymap from which the state object was created.
|
||||||
|
*/
|
||||||
|
struct xkb_keymap *
|
||||||
|
xkb_state_get_map(struct xkb_state *state);
|
||||||
|
|
||||||
enum xkb_key_direction {
|
enum xkb_key_direction {
|
||||||
XKB_KEY_UP,
|
XKB_KEY_UP,
|
||||||
XKB_KEY_DOWN,
|
XKB_KEY_DOWN,
|
||||||
|
|
|
@ -494,6 +494,12 @@ xkb_state_unref(struct xkb_state *state)
|
||||||
free(state);
|
free(state);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
_X_EXPORT struct xkb_keymap *
|
||||||
|
xkb_state_get_map(struct xkb_state *state)
|
||||||
|
{
|
||||||
|
return state->xkb;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Update the LED state to match the rest of the xkb_state.
|
* Update the LED state to match the rest of the xkb_state.
|
||||||
*/
|
*/
|
||||||
|
|
Loading…
Reference in New Issue