forked from enlightenment/enlightenment
Patch from Sung-Jin Park to add function for easy searching of
key_bindings. - Add e_bindings_key_find() in e This patch is to provide a convenient function to find out key bindings by matching a combination of keyname and modifier without walking and matching e_config->key_bindings. This will be convenient function like existing e_bindings_key_get() in e. SVN revision: 63515
This commit is contained in:
parent
7191b735e5
commit
b74c7ea0ca
|
@ -306,6 +306,24 @@ e_bindings_key_get(const char *action)
|
|||
return NULL;
|
||||
}
|
||||
|
||||
EAPI E_Binding_Key *
|
||||
e_bindings_key_find(const char *key, E_Binding_Modifier mod, int any_mod)
|
||||
{
|
||||
E_Binding_Key *bind;
|
||||
Eina_List *l;
|
||||
|
||||
if (!key) return NULL;
|
||||
|
||||
EINA_LIST_FOREACH(key_bindings, l, bind)
|
||||
{
|
||||
if ((bind->key) && (!strcmp(key, bind->key)) &&
|
||||
(bind->mod == mod) && (bind->any_mod == any_mod))
|
||||
return bind;
|
||||
}
|
||||
|
||||
return NULL;
|
||||
}
|
||||
|
||||
EAPI void
|
||||
e_bindings_key_del(E_Binding_Context ctxt, const char *key, E_Binding_Modifier mod, int any_mod, const char *action, const char *params)
|
||||
{
|
||||
|
|
|
@ -115,6 +115,7 @@ EAPI E_Action *e_bindings_mouse_up_event_handle(E_Binding_Context ctxt, E_Obje
|
|||
EAPI void e_bindings_key_add(E_Binding_Context ctxt, const char *key, E_Binding_Modifier mod, int any_mod, const char *action, const char *params);
|
||||
EAPI void e_bindings_key_del(E_Binding_Context ctxt, const char *key, E_Binding_Modifier mod, int any_mod, const char *action, const char *params);
|
||||
EAPI E_Binding_Key *e_bindings_key_get(const char *action);
|
||||
EAPI E_Binding_Key *e_bindings_key_find(const char *key, E_Binding_Modifier mod, int any_mod);
|
||||
EAPI void e_bindings_key_grab(E_Binding_Context ctxt, Ecore_X_Window win);
|
||||
EAPI void e_bindings_key_ungrab(E_Binding_Context ctxt, Ecore_X_Window win);
|
||||
EAPI E_Action *e_bindings_key_down_event_handle(E_Binding_Context ctxt, E_Object *obj, Ecore_Event_Key *ev);
|
||||
|
|
Loading…
Reference in New Issue