devilhorns pushed a commit to branch master. http://git.enlightenment.org/core/efl.git/commit/?id=1a27f1274e12ce6c9dfeb6a0e7170d714917eb7c
commit 1a27f1274e12ce6c9dfeb6a0e7170d714917eb7c Author: JengHyun Kang <[email protected]> Date: Thu Mar 24 08:53:15 2016 -0400 ecore_wayland: Add a new API to get keymap - ecore_wl_input_keymap_get() Summary: Each Ecore_Wl_Input structure has there own keymap. This keymap is struct xkb_keymap used in libxkbcommon lib and the client can get this keymap from server in wayland system. So if the client want to get keymap and use some libxkbcommon APIs, use this API to get keymap. Test Plan: Use this api after initialize wayland system. Reviewers: raster, zmike, ManMower, devilhorns Reviewed By: devilhorns Subscribers: input.hacker, ohduna, cedric, jpeg Differential Revision: https://phab.enlightenment.org/D3819 --- src/lib/ecore_wayland/Ecore_Wayland.h | 7 +++++++ src/lib/ecore_wayland/ecore_wl_input.c | 10 ++++++++++ 2 files changed, 17 insertions(+) diff --git a/src/lib/ecore_wayland/Ecore_Wayland.h b/src/lib/ecore_wayland/Ecore_Wayland.h index 1735014..d422520 100644 --- a/src/lib/ecore_wayland/Ecore_Wayland.h +++ b/src/lib/ecore_wayland/Ecore_Wayland.h @@ -443,6 +443,13 @@ EAPI void ecore_wl_input_cursor_size_set(Ecore_Wl_Input *input, const int size); EAPI void ecore_wl_input_cursor_theme_name_set(Ecore_Wl_Input *input, const char *cursor_theme_name); /** + * @ingroup Ecore_Wl_Input_Group + * @since 1.17 + */ +EAPI struct xkb_keymap *ecore_wl_input_keymap_get(Ecore_Wl_Input *input); + + +/** * Retrieves the Wayland Globals Interface list used for the current Wayland connection. * * This call, if done after the ECORE_WL_EVENT_INTERFACES_BOUND event was diff --git a/src/lib/ecore_wayland/ecore_wl_input.c b/src/lib/ecore_wayland/ecore_wl_input.c index 90d5e49..4b08459 100644 --- a/src/lib/ecore_wayland/ecore_wl_input.c +++ b/src/lib/ecore_wayland/ecore_wl_input.c @@ -248,6 +248,16 @@ ecore_wl_input_cursor_theme_name_set(Ecore_Wl_Input *input, const char *cursor_t input->display->wl.shm); } +EAPI struct xkb_keymap * +ecore_wl_input_keymap_get(Ecore_Wl_Input *input) +{ + LOGFN(__FILE__, __LINE__, __FUNCTION__); + + EINA_SAFETY_ON_NULL_RETURN_VAL(input, NULL); + + return input->xkb.keymap; +} + static Eina_Bool _ecore_wl_input_cursor_update(void *data) { --
