forked from enlightenment/efl
ecore-x: add ecore_x_keysym_get()
this is a less invasive solution for retrieving a keysym. X keysyms are not portable, and so this function should not be used for any code which is meant to run on other platforms. @feature
This commit is contained in:
parent
4d41778251
commit
476ebdc0a1
|
@ -2520,6 +2520,16 @@ EAPI const char *ecore_x_keysym_string_get(int keysym);
|
|||
*/
|
||||
EAPI int ecore_x_keysym_keycode_get(const char *keyname);
|
||||
|
||||
/**
|
||||
* Return the X-specific keysym for a given key string
|
||||
* @param string The key to get the keysym for
|
||||
* @return the keysym value
|
||||
*
|
||||
* @since 1.15
|
||||
* @note The returned value is not portable.
|
||||
*/
|
||||
EAPI unsigned int ecore_x_keysym_get(const char *string);
|
||||
|
||||
typedef struct _Ecore_X_Image Ecore_X_Image;
|
||||
|
||||
EAPI Ecore_X_Image *ecore_x_image_new(int w, int h, Ecore_X_Visual vis, int depth);
|
||||
|
|
|
@ -330,6 +330,12 @@ ecore_x_keysym_keycode_get(const char *keyname)
|
|||
return _ecore_xcb_keymap_string_to_keycode(keyname);
|
||||
}
|
||||
|
||||
EAPI unsigned int
|
||||
ecore_x_keysym_get(const char *string)
|
||||
{
|
||||
return _ecore_xcb_keymap_string_to_keysym(string);
|
||||
}
|
||||
|
||||
/* local functions */
|
||||
static int
|
||||
_ecore_xcb_keymap_mask_get(void *reply,
|
||||
|
|
|
@ -165,3 +165,9 @@ ecore_x_keysym_keycode_get(const char *keyname)
|
|||
|
||||
return keycode;
|
||||
}
|
||||
|
||||
EAPI unsigned int
|
||||
ecore_x_keysym_get(const char *string)
|
||||
{
|
||||
return XStringToKeysym(string);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue