diff options
author | JengHyun Kang <jhyuni.kang@samsung.com> | 2016-01-04 08:47:43 -0500 |
---|---|---|
committer | Chris Michael <cpmichael@osg.samsung.com> | 2016-01-04 08:47:58 -0500 |
commit | b3dc27345a59dc21b115fe55bb15e7af092eacbe (patch) | |
tree | 8f66f5941ab4efd09eaadb2cfca12825f09da55a /src/lib/ecore_drm/Ecore_Drm.h | |
parent | fe70f0c080d2f168b5674cd4aa804ec95617739d (diff) |
ecore-drm: Add a new API for keymap cache
Summary:
Originally, each keyboard devices could have their own keymap.
The one keyboard's keymap could different with others.
But for this, Ecore_Drm compile a new keymap when a keyboard is connected.
But this is a burden for some people who doesn't manage keymap for each keyboard.
They want to maintain only one keymap for system.
So, I added cached context/keymap and just ref/unref for each keyboard device.
People who want to different keymap for each keyboard just do not set cached
context/keymap. Then Ecore_Drm maintain keymaps about each keyboard devices.
Test Plan:
Connect a keyboard device and watch flow of ioctl.
Originally Ecore_Drm opened xkb data and compile keymap,
but after patch, that ioctl is disppeared.
@feature
Reviewers: raster, devilhorns, ManMower
Reviewed By: devilhorns, ManMower
Subscribers: cedric, input.hacker, ohduna, jpeg
Differential Revision: https://phab.enlightenment.org/D3503
Diffstat (limited to 'src/lib/ecore_drm/Ecore_Drm.h')
-rw-r--r-- | src/lib/ecore_drm/Ecore_Drm.h | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/src/lib/ecore_drm/Ecore_Drm.h b/src/lib/ecore_drm/Ecore_Drm.h index 1f110efd28..5c50f1022d 100644 --- a/src/lib/ecore_drm/Ecore_Drm.h +++ b/src/lib/ecore_drm/Ecore_Drm.h | |||
@@ -6,6 +6,7 @@ | |||
6 | # include <drm_fourcc.h> | 6 | # include <drm_fourcc.h> |
7 | # include <Ecore.h> | 7 | # include <Ecore.h> |
8 | # include <Eeze.h> | 8 | # include <Eeze.h> |
9 | # include <xkbcommon/xkbcommon.h> | ||
9 | 10 | ||
10 | # ifdef EAPI | 11 | # ifdef EAPI |
11 | # undef EAPI | 12 | # undef EAPI |
@@ -382,6 +383,32 @@ EAPI Eina_Bool ecore_drm_device_software_setup(Ecore_Drm_Device *dev); | |||
382 | EAPI Eina_Bool ecore_drm_device_pointer_left_handed_set(Ecore_Drm_Device *dev, Eina_Bool left_handed); | 383 | EAPI Eina_Bool ecore_drm_device_pointer_left_handed_set(Ecore_Drm_Device *dev, Eina_Bool left_handed); |
383 | 384 | ||
384 | /** | 385 | /** |
386 | * Setup a cached context to use same context for each devices | ||
387 | * | ||
388 | * This function will setup a cached context to use same context for each devices | ||
389 | * This function will be called before initialize Ecore_Drm. | ||
390 | * | ||
391 | * @param ctx struct xkb_context used in libxkbcommon | ||
392 | * | ||
393 | * @ingroup Ecore_Drm_Device_Group | ||
394 | * @since 1.17 | ||
395 | */ | ||
396 | EAPI void ecore_drm_device_keyboard_cached_context_set(struct xkb_context *ctx); | ||
397 | |||
398 | /** | ||
399 | * Setup a cached keymap to use same keymap for each devices | ||
400 | * | ||
401 | * This function will setup a cached keymap to use same keymap for each devices | ||
402 | * This function will be called before initialize Ecore_Drm. | ||
403 | * | ||
404 | * @param map struct xkb_keymap used in libxkbcommon | ||
405 | * | ||
406 | * @ingroup Ecore_Drm_Device_Group | ||
407 | * @since 1.17 | ||
408 | */ | ||
409 | EAPI void ecore_drm_device_keyboard_cached_keymap_set(struct xkb_keymap *map); | ||
410 | |||
411 | /** | ||
385 | * Find an Ecore_Drm_Output at the given coordinates | 412 | * Find an Ecore_Drm_Output at the given coordinates |
386 | * | 413 | * |
387 | * This function will loop all the existing outputs in Ecore_Drm_Device and | 414 | * This function will loop all the existing outputs in Ecore_Drm_Device and |