break out bindings resets into functions based on their type for more fine-grained binding resets
SVN revision: 75649
This commit is contained in:
parent
6294cb8353
commit
e525ed8e61
|
@ -116,34 +116,11 @@ e_bindings_shutdown(void)
|
||||||
}
|
}
|
||||||
|
|
||||||
EAPI void
|
EAPI void
|
||||||
e_bindings_reset(void)
|
e_bindings_signal_reset(void)
|
||||||
{
|
{
|
||||||
E_Config_Binding_Signal *ebs;
|
E_Config_Binding_Signal *ebs;
|
||||||
E_Config_Binding_Mouse *ebm;
|
|
||||||
E_Config_Binding_Wheel *ebw;
|
|
||||||
E_Config_Binding_Edge *ebe;
|
|
||||||
E_Config_Binding_Key *ebk;
|
|
||||||
E_Config_Binding_Acpi *eba;
|
|
||||||
Eina_List *l;
|
Eina_List *l;
|
||||||
e_managers_keys_ungrab();
|
|
||||||
E_FREE_LIST(mouse_bindings, _e_bindings_mouse_free);
|
|
||||||
E_FREE_LIST(key_bindings, _e_bindings_key_free);
|
|
||||||
E_FREE_LIST(edge_bindings, _e_bindings_edge_free);
|
|
||||||
E_FREE_LIST(signal_bindings, _e_bindings_signal_free);
|
E_FREE_LIST(signal_bindings, _e_bindings_signal_free);
|
||||||
E_FREE_LIST(wheel_bindings, _e_bindings_wheel_free);
|
|
||||||
E_FREE_LIST(acpi_bindings, _e_bindings_acpi_free);
|
|
||||||
|
|
||||||
EINA_LIST_FOREACH(e_config->mouse_bindings, l, ebm)
|
|
||||||
e_bindings_mouse_add(ebm->context, ebm->button, ebm->modifiers,
|
|
||||||
ebm->any_mod, ebm->action, ebm->params);
|
|
||||||
|
|
||||||
EINA_LIST_FOREACH(e_config->key_bindings, l, ebk)
|
|
||||||
e_bindings_key_add(ebk->context, ebk->key, ebk->modifiers,
|
|
||||||
ebk->any_mod, ebk->action, ebk->params);
|
|
||||||
|
|
||||||
EINA_LIST_FOREACH(e_config->edge_bindings, l, ebe)
|
|
||||||
e_bindings_edge_add(ebe->context, ebe->edge, ebe->modifiers,
|
|
||||||
ebe->any_mod, ebe->action, ebe->params, ebe->delay);
|
|
||||||
|
|
||||||
EINA_LIST_FOREACH(e_config->signal_bindings, l, ebs)
|
EINA_LIST_FOREACH(e_config->signal_bindings, l, ebs)
|
||||||
{
|
{
|
||||||
|
@ -165,17 +142,86 @@ e_bindings_reset(void)
|
||||||
ebs->any_mod, "pointer_resize_pop", params);
|
ebs->any_mod, "pointer_resize_pop", params);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
EINA_LIST_FOREACH(e_config->wheel_bindings, l, ebw)
|
EAPI void
|
||||||
e_bindings_wheel_add(ebw->context, ebw->direction, ebw->z, ebw->modifiers,
|
e_bindings_acpi_reset(void)
|
||||||
ebw->any_mod, ebw->action, ebw->params);
|
{
|
||||||
|
E_Config_Binding_Acpi *eba;
|
||||||
|
Eina_List *l;
|
||||||
|
|
||||||
|
E_FREE_LIST(acpi_bindings, _e_bindings_acpi_free);
|
||||||
|
|
||||||
EINA_LIST_FOREACH(e_config->acpi_bindings, l, eba)
|
EINA_LIST_FOREACH(e_config->acpi_bindings, l, eba)
|
||||||
e_bindings_acpi_add(eba->context, eba->type, eba->status,
|
e_bindings_acpi_add(eba->context, eba->type, eba->status,
|
||||||
eba->action, eba->params);
|
eba->action, eba->params);
|
||||||
|
}
|
||||||
|
|
||||||
|
EAPI void
|
||||||
|
e_bindings_wheel_reset(void)
|
||||||
|
{
|
||||||
|
E_Config_Binding_Wheel *ebw;
|
||||||
|
Eina_List *l;
|
||||||
|
|
||||||
|
E_FREE_LIST(wheel_bindings, _e_bindings_wheel_free);
|
||||||
|
|
||||||
|
EINA_LIST_FOREACH(e_config->wheel_bindings, l, ebw)
|
||||||
|
e_bindings_wheel_add(ebw->context, ebw->direction, ebw->z, ebw->modifiers,
|
||||||
|
ebw->any_mod, ebw->action, ebw->params);
|
||||||
|
}
|
||||||
|
|
||||||
|
EAPI void
|
||||||
|
e_bindings_edge_reset(void)
|
||||||
|
{
|
||||||
|
E_Config_Binding_Edge *ebe;
|
||||||
|
Eina_List *l;
|
||||||
|
|
||||||
|
E_FREE_LIST(edge_bindings, _e_bindings_edge_free);
|
||||||
|
|
||||||
|
EINA_LIST_FOREACH(e_config->edge_bindings, l, ebe)
|
||||||
|
e_bindings_edge_add(ebe->context, ebe->edge, ebe->modifiers,
|
||||||
|
ebe->any_mod, ebe->action, ebe->params, ebe->delay);
|
||||||
|
}
|
||||||
|
|
||||||
|
EAPI void
|
||||||
|
e_bindings_mouse_reset(void)
|
||||||
|
{
|
||||||
|
E_Config_Binding_Mouse *ebm;
|
||||||
|
Eina_List *l;
|
||||||
|
|
||||||
|
E_FREE_LIST(mouse_bindings, _e_bindings_mouse_free);
|
||||||
|
|
||||||
|
EINA_LIST_FOREACH(e_config->mouse_bindings, l, ebm)
|
||||||
|
e_bindings_mouse_add(ebm->context, ebm->button, ebm->modifiers,
|
||||||
|
ebm->any_mod, ebm->action, ebm->params);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
EAPI void
|
||||||
|
e_bindings_key_reset(void)
|
||||||
|
{
|
||||||
|
E_Config_Binding_Key *ebk;
|
||||||
|
Eina_List *l;
|
||||||
|
|
||||||
|
e_managers_keys_ungrab();
|
||||||
|
E_FREE_LIST(key_bindings, _e_bindings_key_free);
|
||||||
|
|
||||||
|
EINA_LIST_FOREACH(e_config->key_bindings, l, ebk)
|
||||||
|
e_bindings_key_add(ebk->context, ebk->key, ebk->modifiers,
|
||||||
|
ebk->any_mod, ebk->action, ebk->params);
|
||||||
e_managers_keys_grab();
|
e_managers_keys_grab();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
EAPI void
|
||||||
|
e_bindings_reset(void)
|
||||||
|
{
|
||||||
|
e_bindings_signal_reset();
|
||||||
|
e_bindings_mouse_reset();
|
||||||
|
e_bindings_wheel_reset();
|
||||||
|
e_bindings_edge_reset();
|
||||||
|
e_bindings_key_reset();
|
||||||
|
}
|
||||||
|
|
||||||
EAPI void
|
EAPI void
|
||||||
e_bindings_mouse_add(E_Binding_Context ctxt, int button, E_Binding_Modifier mod, int any_mod, const char *action, const char *params)
|
e_bindings_mouse_add(E_Binding_Context ctxt, int button, E_Binding_Modifier mod, int any_mod, const char *action, const char *params)
|
||||||
{
|
{
|
||||||
|
|
|
@ -103,6 +103,11 @@ struct _E_Binding_Acpi
|
||||||
EINTERN int e_bindings_init(void);
|
EINTERN int e_bindings_init(void);
|
||||||
EINTERN int e_bindings_shutdown(void);
|
EINTERN int e_bindings_shutdown(void);
|
||||||
|
|
||||||
|
EAPI void e_bindings_mouse_reset(void);
|
||||||
|
EAPI void e_bindings_key_reset(void);
|
||||||
|
EAPI void e_bindings_wheel_reset(void);
|
||||||
|
EAPI void e_bindings_edge_reset(void);
|
||||||
|
EAPI void e_bindings_signal_reset(void);
|
||||||
EAPI void e_bindings_reset(void);
|
EAPI void e_bindings_reset(void);
|
||||||
|
|
||||||
EAPI void e_bindings_mouse_add(E_Binding_Context ctxt, int button, E_Binding_Modifier mod, int any_mod, const char *action, const char *params);
|
EAPI void e_bindings_mouse_add(E_Binding_Context ctxt, int button, E_Binding_Modifier mod, int any_mod, const char *action, const char *params);
|
||||||
|
|
Loading…
Reference in New Issue