On Wed, 21 Sep 2011 08:05:15 +0000 (GMT) 박성진 <[email protected]> said:
it would appear someone has committed this before i got it it :)
> Dear developers,
>
> Kindly review and provide your comments on this patch.
>
> - 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.
>
> Index: e/src/bin/e_bindings.c
> ===================================================================
> --- e/src/bin/e_bindings.c (revision 63506)
> +++ e/src/bin/e_bindings.c (working copy)
> @@ -306,6 +306,22 @@
> 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) {
> Index: e/src/bin/e_bindings.h
> ===================================================================
> --- e/src/bin/e_bindings.h (revision 63506)
> +++ e/src/bin/e_bindings.h (working copy)
> @@ -115,6 +115,7 @@
> 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);
>
> Best regards,
> Sung-Jin Park
--
------------- Codito, ergo sum - "I code, therefore I am" --------------
The Rasterman (Carsten Haitzler) [email protected]
------------------------------------------------------------------------------
All the data continuously generated in your IT infrastructure contains a
definitive record of customers, application performance, security
threats, fraudulent activity and more. Splunk takes this data and makes
sense of it. Business sense. IT sense. Common sense.
http://p.sf.net/sfu/splunk-d2dcopy1
_______________________________________________
enlightenment-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel