Config for wheel and signal bindings.

NEW CONFIG VERSION!!


SVN revision: 16853
devs/princeamd/enlightenment-0.17-elive
sebastid 18 years ago committed by sebastid
parent 06ec0ea970
commit d0cb4b111a
  1. 147
      src/bin/e_bindings.c
  2. 468
      src/bin/e_config.c
  3. 34
      src/bin/e_config.h
  4. 126
      src/bin/e_ipc_codec.c
  5. 24
      src/bin/e_ipc_codec.h
  6. 837
      src/bin/e_ipc_handlers.h
  7. 9
      src/bin/e_ipc_handlers_list.h
  8. 11
      src/bin/e_zone.c
  9. 41
      src/lib/E_Lib.h

@ -42,135 +42,24 @@ e_bindings_init(void)
e_bindings_key_add(eb->context, eb->key, eb->modifiers,
eb->any_mod, eb->action, eb->params);
}
/* FIXME: these need to be come normal e_config bindings that you can
* modify via ipc and are saved/loaded to/from the user's config
*/
/* wheel events.. anywhere! :) */
e_bindings_wheel_add(E_BINDING_CONTEXT_CONTAINER,
0, -1, E_BINDING_MODIFIER_NONE, 1,
"desk_linear_flip_by", "-1");
e_bindings_wheel_add(E_BINDING_CONTEXT_CONTAINER,
1, -1, E_BINDING_MODIFIER_NONE, 1,
"desk_linear_flip_by", "-1");
e_bindings_wheel_add(E_BINDING_CONTEXT_CONTAINER,
0, 1, E_BINDING_MODIFIER_NONE, 1,
"desk_linear_flip_by", "1");
e_bindings_wheel_add(E_BINDING_CONTEXT_CONTAINER,
1, 1, E_BINDING_MODIFIER_NONE, 1,
"desk_linear_flip_by", "1");
e_bindings_wheel_add(E_BINDING_CONTEXT_POPUP,
0, -1, E_BINDING_MODIFIER_NONE, 1,
"desk_linear_flip_by", "-1");
e_bindings_wheel_add(E_BINDING_CONTEXT_POPUP,
1, -1, E_BINDING_MODIFIER_NONE, 1,
"desk_linear_flip_by", "-1");
e_bindings_wheel_add(E_BINDING_CONTEXT_POPUP,
0, 1, E_BINDING_MODIFIER_NONE, 1,
"desk_linear_flip_by", "1");
e_bindings_wheel_add(E_BINDING_CONTEXT_POPUP,
1, 1, E_BINDING_MODIFIER_NONE, 1,
"desk_linear_flip_by", "1");
e_bindings_wheel_add(E_BINDING_CONTEXT_BORDER,
0, -1, E_BINDING_MODIFIER_ALT, 0,
"desk_linear_flip_by", "-1");
e_bindings_wheel_add(E_BINDING_CONTEXT_BORDER,
1, -1, E_BINDING_MODIFIER_ALT, 0,
"desk_linear_flip_by", "-1");
e_bindings_wheel_add(E_BINDING_CONTEXT_BORDER,
0, 1, E_BINDING_MODIFIER_ALT, 0,
"desk_linear_flip_by", "1");
e_bindings_wheel_add(E_BINDING_CONTEXT_BORDER,
1, 1, E_BINDING_MODIFIER_ALT, 0,
"desk_linear_flip_by", "1");
/* these now let you bind your own actions to a border */
e_bindings_signal_add(E_BINDING_CONTEXT_BORDER,
"mouse,down,1,double", "title", E_BINDING_MODIFIER_NONE, 1,
"window_shaded_toggle", "up");
e_bindings_signal_add(E_BINDING_CONTEXT_BORDER,
"mouse,down,2", "title", E_BINDING_MODIFIER_NONE, 1,
"window_shaded_toggle", "up");
e_bindings_signal_add(E_BINDING_CONTEXT_BORDER,
"mouse,wheel,?,1", "title", E_BINDING_MODIFIER_NONE, 1,
"window_shaded", "0 up");
e_bindings_signal_add(E_BINDING_CONTEXT_BORDER,
"mouse,wheel,?,-1", "title", E_BINDING_MODIFIER_NONE, 1,
"window_shaded", "1 up");
e_bindings_signal_add(E_BINDING_CONTEXT_BORDER,
"mouse,clicked,3", "title", E_BINDING_MODIFIER_NONE, 1,
"window_menu", "");
e_bindings_signal_add(E_BINDING_CONTEXT_BORDER,
"mouse,clicked,?", "icon", E_BINDING_MODIFIER_NONE, 1,
"window_menu", "");
e_bindings_signal_add(E_BINDING_CONTEXT_BORDER,
"mouse,clicked,[12]", "close", E_BINDING_MODIFIER_NONE, 1,
"window_close", "");
e_bindings_signal_add(E_BINDING_CONTEXT_BORDER,
"mouse,clicked,3", "close", E_BINDING_MODIFIER_NONE, 1,
"window_kill", "");
e_bindings_signal_add(E_BINDING_CONTEXT_BORDER,
"mouse,clicked,1", "maximize", E_BINDING_MODIFIER_NONE, 1,
"window_maximized_toggle", "");
e_bindings_signal_add(E_BINDING_CONTEXT_BORDER,
"mouse,clicked,2", "maximize", E_BINDING_MODIFIER_NONE, 1,
"window_maximized_toggle", "smart");
e_bindings_signal_add(E_BINDING_CONTEXT_BORDER,
"mouse,clicked,3", "maximize", E_BINDING_MODIFIER_NONE, 1,
"window_maximized_toggle", "expand");
e_bindings_signal_add(E_BINDING_CONTEXT_BORDER,
"mouse,clicked,?", "minimize", E_BINDING_MODIFIER_NONE, 1,
"window_iconic_toggle", "");
e_bindings_signal_add(E_BINDING_CONTEXT_BORDER,
"mouse,down,1", "icon", E_BINDING_MODIFIER_NONE, 1,
"window_drag_icon", "");
e_bindings_signal_add(E_BINDING_CONTEXT_BORDER,
"mouse,down,1", "title", E_BINDING_MODIFIER_NONE, 1,
"window_move", "");
e_bindings_signal_add(E_BINDING_CONTEXT_BORDER,
"mouse,up,1", "title", E_BINDING_MODIFIER_NONE, 1,
"window_move", "end");
e_bindings_signal_add(E_BINDING_CONTEXT_BORDER,
"mouse,down,1", "resize_tl", E_BINDING_MODIFIER_NONE, 1,
"window_resize", "tl");
e_bindings_signal_add(E_BINDING_CONTEXT_BORDER,
"mouse,down,1", "resize_t", E_BINDING_MODIFIER_NONE, 1,
"window_resize", "t");
e_bindings_signal_add(E_BINDING_CONTEXT_BORDER,
"mouse,down,1", "resize_tr", E_BINDING_MODIFIER_NONE, 1,
"window_resize", "tr");
e_bindings_signal_add(E_BINDING_CONTEXT_BORDER,
"mouse,down,1", "resize_r", E_BINDING_MODIFIER_NONE, 1,
"window_resize", "r");
e_bindings_signal_add(E_BINDING_CONTEXT_BORDER,
"mouse,down,1", "resize_br", E_BINDING_MODIFIER_NONE, 1,
"window_resize", "br");
e_bindings_signal_add(E_BINDING_CONTEXT_BORDER,
"mouse,down,1", "resize_b", E_BINDING_MODIFIER_NONE, 1,
"window_resize", "b");
e_bindings_signal_add(E_BINDING_CONTEXT_BORDER,
"mouse,down,1", "resize_bl", E_BINDING_MODIFIER_NONE, 1,
"window_resize", "bl");
e_bindings_signal_add(E_BINDING_CONTEXT_BORDER,
"mouse,down,1", "resize_l", E_BINDING_MODIFIER_NONE, 1,
"window_resize", "l");
e_bindings_signal_add(E_BINDING_CONTEXT_BORDER,
"mouse,up,1", "resize_*", E_BINDING_MODIFIER_NONE, 1,
"window_resize", "end");
e_bindings_signal_add(E_BINDING_CONTEXT_BORDER,
"mouse,down,3", "resize_*", E_BINDING_MODIFIER_NONE, 1,
"window_move", "");
e_bindings_signal_add(E_BINDING_CONTEXT_BORDER,
"mouse,up,3", "resize_*", E_BINDING_MODIFIER_NONE, 1,
"window_move", "end");
for (l = e_config->signal_bindings; l; l = l->next)
{
E_Config_Binding_Signal *eb;
eb = l->data;
e_bindings_signal_add(eb->context, eb->signal, eb->source, eb->modifiers,
eb->any_mod, eb->action, eb->params);
}
for (l = e_config->wheel_bindings; l; l = l->next)
{
E_Config_Binding_Wheel *eb;
eb = l->data;
e_bindings_wheel_add(eb->context, eb->direction, eb->z, eb->modifiers,
eb->any_mod, eb->action, eb->params);
}
return 1;
}

@ -28,6 +28,8 @@ static E_Config_DD *_e_config_font_default_edd = NULL;
static E_Config_DD *_e_config_theme_edd = NULL;
static E_Config_DD *_e_config_bindings_mouse_edd = NULL;
static E_Config_DD *_e_config_bindings_key_edd = NULL;
static E_Config_DD *_e_config_bindings_signal_edd = NULL;
static E_Config_DD *_e_config_bindings_wheel_edd = NULL;
static E_Config_DD *_e_config_path_append_edd = NULL;
static E_Config_DD *_e_config_desktop_bg_edd = NULL;
static E_Config_DD *_e_config_desktop_name_edd = NULL;
@ -158,6 +160,32 @@ e_config_init(void)
E_CONFIG_VAL(D, T, params, STR);
E_CONFIG_VAL(D, T, any_mod, UCHAR);
_e_config_bindings_signal_edd = E_CONFIG_DD_NEW("E_Config_Binding_Signal", E_Config_Binding_Signal);
#undef T
#undef D
#define T E_Config_Binding_Signal
#define D _e_config_bindings_signal_edd
E_CONFIG_VAL(D, T, context, INT);
E_CONFIG_VAL(D, T, signal, STR);
E_CONFIG_VAL(D, T, source, STR);
E_CONFIG_VAL(D, T, modifiers, INT);
E_CONFIG_VAL(D, T, any_mod, UCHAR);
E_CONFIG_VAL(D, T, action, STR);
E_CONFIG_VAL(D, T, params, STR);
_e_config_bindings_wheel_edd = E_CONFIG_DD_NEW("E_Config_Binding_Wheel", E_Config_Binding_Wheel);
#undef T
#undef D
#define T E_Config_Binding_Wheel
#define D _e_config_bindings_wheel_edd
E_CONFIG_VAL(D, T, context, INT);
E_CONFIG_VAL(D, T, direction, INT);
E_CONFIG_VAL(D, T, z, INT);
E_CONFIG_VAL(D, T, modifiers, INT);
E_CONFIG_VAL(D, T, any_mod, UCHAR);
E_CONFIG_VAL(D, T, action, STR);
E_CONFIG_VAL(D, T, params, STR);
_e_config_remember_edd = E_CONFIG_DD_NEW("E_Remember", E_Remember);
#undef T
#undef D
@ -247,6 +275,8 @@ e_config_init(void)
E_CONFIG_LIST(D, T, themes, _e_config_theme_edd); /**/
E_CONFIG_LIST(D, T, mouse_bindings, _e_config_bindings_mouse_edd); /**/
E_CONFIG_LIST(D, T, key_bindings, _e_config_bindings_key_edd); /**/
E_CONFIG_LIST(D, T, signal_bindings, _e_config_bindings_signal_edd); /**/
E_CONFIG_LIST(D, T, wheel_bindings, _e_config_bindings_wheel_edd); /**/
E_CONFIG_LIST(D, T, path_append_data, _e_config_path_append_edd); /**/
E_CONFIG_LIST(D, T, path_append_images, _e_config_path_append_edd); /**/
E_CONFIG_LIST(D, T, path_append_fonts, _e_config_path_append_edd); /**/
@ -931,6 +961,372 @@ e_config_init(void)
*/
/* ALT Return - fullscreen window */
}
{
E_Config_Binding_Signal *eb;
eb = E_NEW(E_Config_Binding_Signal, 1);
eb->context = E_BINDING_CONTEXT_BORDER;
eb->signal = strdup("mouse,down,1,double");
eb->source= strdup("title");
eb->modifiers = E_BINDING_MODIFIER_NONE;
eb->any_mod = 1;
eb->action = strdup("window_shaded_toggle");
eb->params = strdup("up");
e_config->signal_bindings = evas_list_append(e_config->signal_bindings, eb);
eb = E_NEW(E_Config_Binding_Signal, 1);
eb->context = E_BINDING_CONTEXT_BORDER;
eb->signal = strdup("mouse,down,2");
eb->source = strdup("title");
eb->modifiers = E_BINDING_MODIFIER_NONE;
eb->any_mod = 1;
eb->action = strdup("window_shaded_toggle");
eb->params = strdup("up");
e_config->signal_bindings = evas_list_append(e_config->signal_bindings, eb);
eb = E_NEW(E_Config_Binding_Signal, 1);
eb->context = E_BINDING_CONTEXT_BORDER;
eb->signal = strdup("mouse,wheel,?,1");
eb->source = strdup("title");
eb->modifiers = E_BINDING_MODIFIER_NONE;
eb->any_mod = 1;
eb->action = strdup("window_shaded");
eb->params = strdup("0 up");
e_config->signal_bindings = evas_list_append(e_config->signal_bindings, eb);
eb = E_NEW(E_Config_Binding_Signal, 1);
eb->context = E_BINDING_CONTEXT_BORDER;
eb->signal = strdup("mouse,wheel,?,-1");
eb->source = strdup("title");
eb->modifiers = E_BINDING_MODIFIER_NONE;
eb->any_mod = 1;
eb->action = strdup("window_shaded");
eb->params = strdup("1 up");
e_config->signal_bindings = evas_list_append(e_config->signal_bindings, eb);
eb = E_NEW(E_Config_Binding_Signal, 1);
eb->context = E_BINDING_CONTEXT_BORDER;
eb->signal = strdup("mouse,clicked,?");
eb->source = strdup("icon");
eb->modifiers = E_BINDING_MODIFIER_NONE;
eb->any_mod = 1;
eb->action = strdup("window_menu");
eb->params = strdup("");
e_config->signal_bindings = evas_list_append(e_config->signal_bindings, eb);
eb = E_NEW(E_Config_Binding_Signal, 1);
eb->context = E_BINDING_CONTEXT_BORDER;
eb->signal = strdup("mouse,clicked,[12]");
eb->source = strdup("close");
eb->modifiers = E_BINDING_MODIFIER_NONE;
eb->any_mod = 1;
eb->action = strdup("window_close");
eb->params = strdup("");
e_config->signal_bindings = evas_list_append(e_config->signal_bindings, eb);
eb = E_NEW(E_Config_Binding_Signal, 1);
eb->context = E_BINDING_CONTEXT_BORDER;
eb->signal = strdup("mouse,clicked,3");
eb->source = strdup("close");
eb->modifiers = E_BINDING_MODIFIER_NONE;
eb->any_mod = 1;
eb->action = strdup("window_kill");
eb->params = strdup("");
e_config->signal_bindings = evas_list_append(e_config->signal_bindings, eb);
eb = E_NEW(E_Config_Binding_Signal, 1);
eb->context = E_BINDING_CONTEXT_BORDER;
eb->signal = strdup("mouse,clicked,1");
eb->source = strdup("maximize");
eb->modifiers = E_BINDING_MODIFIER_NONE;
eb->any_mod = 1;
eb->action = strdup("window_maximized_toggle");
eb->params = strdup("");
e_config->signal_bindings = evas_list_append(e_config->signal_bindings, eb);
eb = E_NEW(E_Config_Binding_Signal, 1);
eb->context = E_BINDING_CONTEXT_BORDER;
eb->signal = strdup("mouse,clicked,2");
eb->source = strdup("maximize");
eb->modifiers = E_BINDING_MODIFIER_NONE;
eb->any_mod = 1;
eb->action = strdup("window_maximized_toggle");
eb->params = strdup("smart");
e_config->signal_bindings = evas_list_append(e_config->signal_bindings, eb);
eb = E_NEW(E_Config_Binding_Signal, 1);
eb->context = E_BINDING_CONTEXT_BORDER;
eb->signal = strdup("mouse,clicked,3");
eb->source = strdup("maximize");
eb->modifiers = E_BINDING_MODIFIER_NONE;
eb->any_mod = 1;
eb->action = strdup("window_maximized_toggle");
eb->params = strdup("expand");
e_config->signal_bindings = evas_list_append(e_config->signal_bindings, eb);
eb = E_NEW(E_Config_Binding_Signal, 1);
eb->context = E_BINDING_CONTEXT_BORDER;
eb->signal = strdup("mouse,clicked,?");
eb->source = strdup("minimize");
eb->modifiers = E_BINDING_MODIFIER_NONE;
eb->any_mod = 1;
eb->action = strdup("window_iconic_toggle");
eb->params = strdup("");
e_config->signal_bindings = evas_list_append(e_config->signal_bindings, eb);
eb = E_NEW(E_Config_Binding_Signal, 1);
eb->context = E_BINDING_CONTEXT_BORDER;
eb->signal = strdup("mouse,down,1");
eb->source = strdup("icon");
eb->modifiers = E_BINDING_MODIFIER_NONE;
eb->any_mod = 1;
eb->action = strdup("window_drag_icon");
eb->params = strdup("");
e_config->signal_bindings = evas_list_append(e_config->signal_bindings, eb);
eb = E_NEW(E_Config_Binding_Signal, 1);
eb->context = E_BINDING_CONTEXT_BORDER;
eb->signal = strdup("mouse,down,1");
eb->source = strdup("title");
eb->modifiers = E_BINDING_MODIFIER_NONE;
eb->any_mod = 1;
eb->action = strdup("window_move");
eb->params = strdup("");
e_config->signal_bindings = evas_list_append(e_config->signal_bindings, eb);
eb = E_NEW(E_Config_Binding_Signal, 1);
eb->context = E_BINDING_CONTEXT_BORDER;
eb->signal = strdup("mouse,up,1");
eb->source = strdup("title");
eb->modifiers = E_BINDING_MODIFIER_NONE;
eb->any_mod = 1;
eb->action = strdup("window_move");
eb->params = strdup("end");
e_config->signal_bindings = evas_list_append(e_config->signal_bindings, eb);
eb = E_NEW(E_Config_Binding_Signal, 1);
eb->context = E_BINDING_CONTEXT_BORDER;
eb->signal = strdup("mouse,down,1");
eb->source = strdup("resize_tl");
eb->modifiers = E_BINDING_MODIFIER_NONE;
eb->any_mod = 1;
eb->action = strdup("window_resize");
eb->params = strdup("tl");
e_config->signal_bindings = evas_list_append(e_config->signal_bindings, eb);
eb = E_NEW(E_Config_Binding_Signal, 1);
eb->context = E_BINDING_CONTEXT_BORDER;
eb->signal = strdup("mouse,down,1");
eb->source = strdup("resize_t");
eb->modifiers = E_BINDING_MODIFIER_NONE;
eb->any_mod = 1;
eb->action = strdup("window_resize");
eb->params = strdup("t");
e_config->signal_bindings = evas_list_append(e_config->signal_bindings, eb);
eb = E_NEW(E_Config_Binding_Signal, 1);
eb->context = E_BINDING_CONTEXT_BORDER;
eb->signal = strdup("mouse,down,1");
eb->source = strdup("resize_tr");
eb->modifiers = E_BINDING_MODIFIER_NONE;
eb->any_mod = 1;
eb->action = strdup("window_resize");
eb->params = strdup("tr");
e_config->signal_bindings = evas_list_append(e_config->signal_bindings, eb);
eb = E_NEW(E_Config_Binding_Signal, 1);
eb->context = E_BINDING_CONTEXT_BORDER;
eb->signal = strdup("mouse,down,1");
eb->source = strdup("resize_r");
eb->modifiers = E_BINDING_MODIFIER_NONE;
eb->any_mod = 1;
eb->action = strdup("window_resize");
eb->params = strdup("r");
e_config->signal_bindings = evas_list_append(e_config->signal_bindings, eb);
eb = E_NEW(E_Config_Binding_Signal, 1);
eb->context = E_BINDING_CONTEXT_BORDER;
eb->signal = strdup("mouse,down,1");
eb->source = strdup("resize_br");
eb->modifiers = E_BINDING_MODIFIER_NONE;
eb->any_mod = 1;
eb->action = strdup("window_resize");
eb->params = strdup("br");
e_config->signal_bindings = evas_list_append(e_config->signal_bindings, eb);
eb = E_NEW(E_Config_Binding_Signal, 1);
eb->context = E_BINDING_CONTEXT_BORDER;
eb->signal = strdup("mouse,down,1");
eb->source = strdup("resize_b");
eb->modifiers = E_BINDING_MODIFIER_NONE;
eb->any_mod = 1;
eb->action = strdup("window_resize");
eb->params = strdup("b");
e_config->signal_bindings = evas_list_append(e_config->signal_bindings, eb);
eb = E_NEW(E_Config_Binding_Signal, 1);
eb->context = E_BINDING_CONTEXT_BORDER;
eb->signal = strdup("mouse,down,1");
eb->source = strdup("resize_bl");
eb->modifiers = E_BINDING_MODIFIER_NONE;
eb->any_mod = 1;
eb->action = strdup("window_resize");
eb->params = strdup("bl");
e_config->signal_bindings = evas_list_append(e_config->signal_bindings, eb);
eb = E_NEW(E_Config_Binding_Signal, 1);
eb->context = E_BINDING_CONTEXT_BORDER;
eb->signal = strdup("mouse,down,1");
eb->source = strdup("resize_l");
eb->modifiers = E_BINDING_MODIFIER_NONE;
eb->any_mod = 1;
eb->action = strdup("window_resize");
eb->params = strdup("l");
e_config->signal_bindings = evas_list_append(e_config->signal_bindings, eb);
eb = E_NEW(E_Config_Binding_Signal, 1);
eb->context = E_BINDING_CONTEXT_BORDER;
eb->signal = strdup("mouse,up,1");
eb->source = strdup("resize_*");
eb->modifiers = E_BINDING_MODIFIER_NONE;
eb->any_mod = 1;
eb->action = strdup("window_resize");
eb->params = strdup("end");
e_config->signal_bindings = evas_list_append(e_config->signal_bindings, eb);
eb = E_NEW(E_Config_Binding_Signal, 1);
eb->context = E_BINDING_CONTEXT_BORDER;
eb->signal = strdup("mouse,down,3");
eb->source = strdup("resize_*");
eb->modifiers = E_BINDING_MODIFIER_NONE;
eb->any_mod = 1;
eb->action = strdup("window_move");
eb->params = strdup("");
e_config->signal_bindings = evas_list_append(e_config->signal_bindings, eb);
eb = E_NEW(E_Config_Binding_Signal, 1);
eb->context = E_BINDING_CONTEXT_BORDER;
eb->signal = strdup("mouse,up,3");
eb->source = strdup("resize_*");
eb->modifiers = E_BINDING_MODIFIER_NONE;
eb->any_mod = 1;
eb->action = strdup("window_move");
eb->params = strdup("end");
e_config->signal_bindings = evas_list_append(e_config->signal_bindings, eb);
}
{
E_Config_Binding_Wheel *eb;
eb = E_NEW(E_Config_Binding_Wheel, 1);
eb->context = E_BINDING_CONTEXT_CONTAINER;
eb->direction = 0;
eb->z = -1;
eb->modifiers = E_BINDING_MODIFIER_NONE;
eb->any_mod = 1;
eb->action = strdup("desk_linear_flip_by");
eb->params = strdup("-1");
e_config->wheel_bindings = evas_list_append(e_config->wheel_bindings, eb);
eb = E_NEW(E_Config_Binding_Wheel, 1);
eb->context = E_BINDING_CONTEXT_CONTAINER;
eb->direction = 0;
eb->z = 1;
eb->modifiers = E_BINDING_MODIFIER_NONE;
eb->any_mod = 1;
eb->action = strdup("desk_linear_flip_by");
eb->params = strdup("1");
e_config->wheel_bindings = evas_list_append(e_config->wheel_bindings, eb);
eb = E_NEW(E_Config_Binding_Wheel, 1);
eb->context = E_BINDING_CONTEXT_CONTAINER;
eb->direction = 1;
eb->z = 1;
eb->modifiers = E_BINDING_MODIFIER_NONE;
eb->any_mod = 1;
eb->action = strdup("desk_linear_flip_by");
eb->params = strdup("1");
e_config->wheel_bindings = evas_list_append(e_config->wheel_bindings, eb);
eb = E_NEW(E_Config_Binding_Wheel, 1);
eb->context = E_BINDING_CONTEXT_POPUP;
eb->direction = 0;
eb->z = -1;
eb->modifiers = E_BINDING_MODIFIER_NONE;
eb->any_mod = 1;
eb->action = strdup("desk_linear_flip_by");
eb->params = strdup("-1");
e_config->wheel_bindings = evas_list_append(e_config->wheel_bindings, eb);
eb = E_NEW(E_Config_Binding_Wheel, 1);
eb->context = E_BINDING_CONTEXT_POPUP;
eb->direction = 1;
eb->z = -1;
eb->modifiers = E_BINDING_MODIFIER_NONE;
eb->any_mod = 1;
eb->action = strdup("desk_linear_flip_by");
eb->params = strdup("-1");
e_config->wheel_bindings = evas_list_append(e_config->wheel_bindings, eb);
eb = E_NEW(E_Config_Binding_Wheel, 1);
eb->context = E_BINDING_CONTEXT_POPUP;
eb->direction = 0;
eb->z = 1;
eb->modifiers = E_BINDING_MODIFIER_NONE;
eb->any_mod = 1;
eb->action = strdup("desk_linear_flip_by");
eb->params = strdup("1");
e_config->wheel_bindings = evas_list_append(e_config->wheel_bindings, eb);
eb = E_NEW(E_Config_Binding_Wheel, 1);
eb->context = E_BINDING_CONTEXT_POPUP;
eb->direction = 1;
eb->z = 1;
eb->modifiers = E_BINDING_MODIFIER_NONE;
eb->any_mod = 1;
eb->action = strdup("desk_linear_flip_by");
eb->params = strdup("1");
e_config->wheel_bindings = evas_list_append(e_config->wheel_bindings, eb);
eb = E_NEW(E_Config_Binding_Wheel, 1);
eb->context = E_BINDING_CONTEXT_BORDER;
eb->direction = 0;
eb->z = -1;
eb->modifiers = E_BINDING_MODIFIER_ALT;
eb->any_mod = 0;
eb->action = strdup("desk_linear_flip_by");
eb->params = strdup("-1");
e_config->wheel_bindings = evas_list_append(e_config->wheel_bindings, eb);
eb = E_NEW(E_Config_Binding_Wheel, 1);
eb->context = E_BINDING_CONTEXT_BORDER;
eb->direction = 1;
eb->z = -1;
eb->modifiers = E_BINDING_MODIFIER_ALT;
eb->any_mod = 0;
eb->action = strdup("desk_linear_flip_by");
eb->params = strdup("-1");
e_config->wheel_bindings = evas_list_append(e_config->wheel_bindings, eb);
eb = E_NEW(E_Config_Binding_Wheel, 1);
eb->context = E_BINDING_CONTEXT_BORDER;
eb->direction = 0;
eb->z = 1;
eb->modifiers = E_BINDING_MODIFIER_ALT;
eb->any_mod = 0;
eb->action = strdup("desk_linear_flip_by");
eb->params = strdup("1");
e_config->wheel_bindings = evas_list_append(e_config->wheel_bindings, eb);
eb = E_NEW(E_Config_Binding_Wheel, 1);
eb->context = E_BINDING_CONTEXT_BORDER;
eb->direction = 1;
eb->z = 1;
eb->modifiers = E_BINDING_MODIFIER_ALT;
eb->any_mod = 0;
eb->action = strdup("desk_linear_flip_by");
eb->params = strdup("1");
e_config->wheel_bindings = evas_list_append(e_config->wheel_bindings, eb);
}
e_config_save_queue();
}
// e_config->evas_engine_container = E_EVAS_ENGINE_GL_X11;
@ -1020,6 +1416,8 @@ e_config_shutdown(void)
E_CONFIG_DD_FREE(_e_config_theme_edd);
E_CONFIG_DD_FREE(_e_config_bindings_mouse_edd);
E_CONFIG_DD_FREE(_e_config_bindings_key_edd);
E_CONFIG_DD_FREE(_e_config_bindings_signal_edd);
E_CONFIG_DD_FREE(_e_config_bindings_wheel_edd);
E_CONFIG_DD_FREE(_e_config_path_append_edd);
E_CONFIG_DD_FREE(_e_config_desktop_bg_edd);
E_CONFIG_DD_FREE(_e_config_desktop_name_edd);
@ -1242,7 +1640,7 @@ e_config_binding_mouse_match(E_Config_Binding_Mouse *eb_in)
(eb->modifiers == eb_in->modifiers) &&
(eb->any_mod == eb_in->any_mod) &&
(!strcmp(eb->action, eb_in->action)) &&
(!strcmp(eb->action, eb_in->action)))
(!strcmp(eb->params, eb_in->params)))
return eb;
}
return NULL;
@ -1263,7 +1661,51 @@ e_config_binding_key_match(E_Config_Binding_Key *eb_in)
(eb->any_mod == eb_in->any_mod) &&
(!strcmp(eb->key, eb_in->key)) &&
(!strcmp(eb->action, eb_in->action)) &&
(!strcmp(eb->action, eb_in->action)))
(!strcmp(eb->params, eb_in->params)))
return eb;
}
return NULL;
}
E_Config_Binding_Signal *
e_config_binding_signal_match(E_Config_Binding_Signal *eb_in)
{
Evas_List *l;
for (l = e_config->signal_bindings; l; l = l->next)
{
E_Config_Binding_Signal *eb;
eb = l->data;
if ((eb->context == eb_in->context) &&
(eb->modifiers == eb_in->modifiers) &&
(eb->any_mod == eb_in->any_mod) &&
(!strcmp(eb->signal, eb_in->signal)) &&
(!strcmp(eb->source, eb_in->source)) &&
(!strcmp(eb->action, eb_in->action)) &&
(!strcmp(eb->params, eb_in->params)))
return eb;
}
return NULL;
}
E_Config_Binding_Wheel *
e_config_binding_wheel_match(E_Config_Binding_Wheel *eb_in)
{
Evas_List *l;
for (l = e_config->wheel_bindings; l; l = l->next)
{
E_Config_Binding_Wheel *eb;
eb = l->data;
if ((eb->context == eb_in->context) &&
(eb->direction == eb_in->direction) &&
(eb->z == eb_in->z) &&
(eb->modifiers == eb_in->modifiers) &&
(eb->any_mod == eb_in->any_mod) &&
(!strcmp(eb->action, eb_in->action)) &&
(!strcmp(eb->params, eb_in->params)))
return eb;
}
return NULL;
@ -1343,6 +1785,28 @@ _e_config_free(void)
E_FREE(eb->params);
E_FREE(eb);
}
while (e_config->signal_bindings)
{
E_Config_Binding_Signal *eb;
eb = e_config->signal_bindings->data;
e_config->signal_bindings = evas_list_remove_list(e_config->signal_bindings, e_config->signal_bindings);
E_FREE(eb->signal);
E_FREE(eb->source);
E_FREE(eb->action);
E_FREE(eb->params);
E_FREE(eb);
}
while (e_config->wheel_bindings)
{
E_Config_Binding_Wheel *eb;
eb = e_config->wheel_bindings->data;
e_config->wheel_bindings = evas_list_remove_list(e_config->wheel_bindings, e_config->wheel_bindings);
E_FREE(eb->action);
E_FREE(eb->params);
E_FREE(eb);
}
while (e_config->path_append_data)
{
E_Path_Dir *epd;

@ -36,6 +36,8 @@ typedef struct _E_Config_Module E_Config_Module;
typedef struct _E_Config_Theme E_Config_Theme;
typedef struct _E_Config_Binding_Mouse E_Config_Binding_Mouse;
typedef struct _E_Config_Binding_Key E_Config_Binding_Key;
typedef struct _E_Config_Binding_Signal E_Config_Binding_Signal;
typedef struct _E_Config_Binding_Wheel E_Config_Binding_Wheel;
typedef struct _E_Config_Desktop_Background E_Config_Desktop_Background;
typedef struct _E_Config_Desktop_Name E_Config_Desktop_Name;
typedef Eet_Data_Descriptor E_Config_DD;
@ -48,7 +50,7 @@ typedef Eet_Data_Descriptor E_Config_DD;
* defaults for e to work - started at 100 when we introduced this config
* versioning feature
*/
#define E_CONFIG_FILE_VERSION 124
#define E_CONFIG_FILE_VERSION 125
#define E_EVAS_ENGINE_DEFAULT 0
#define E_EVAS_ENGINE_SOFTWARE_X11 1
@ -91,6 +93,8 @@ struct _E_Config
Evas_List *themes;
Evas_List *mouse_bindings;
Evas_List *key_bindings;
Evas_List *signal_bindings;
Evas_List *wheel_bindings;
Evas_List *path_append_data;
Evas_List *path_append_images;
Evas_List *path_append_fonts;
@ -190,6 +194,28 @@ struct _E_Config_Binding_Key
unsigned char any_mod;
};
struct _E_Config_Binding_Signal
{
int context;
char *signal;
char *source;
int modifiers;
unsigned char any_mod;
char *action;
char *params;
};
struct _E_Config_Binding_Wheel
{
int context;
int direction;
int z;
int modifiers;
unsigned char any_mod;
char *action;
char *params;
};
struct _E_Config_Desktop_Background
{
int container;
@ -228,8 +254,10 @@ EAPI void *e_config_domain_load(char *domain, E_Config_DD *edd);
EAPI int e_config_profile_save(void);
EAPI int e_config_domain_save(char *domain, E_Config_DD *edd, void *data);
EAPI E_Config_Binding_Mouse *e_config_binding_mouse_match(E_Config_Binding_Mouse *eb_in);
EAPI E_Config_Binding_Key *e_config_binding_key_match(E_Config_Binding_Key *eb_in);
EAPI E_Config_Binding_Mouse *e_config_binding_mouse_match(E_Config_Binding_Mouse *eb_in);
EAPI E_Config_Binding_Key *e_config_binding_key_match(E_Config_Binding_Key *eb_in);
EAPI E_Config_Binding_Signal *e_config_binding_signal_match(E_Config_Binding_Signal *eb_in);
EAPI E_Config_Binding_Wheel *e_config_binding_wheel_match(E_Config_Binding_Wheel *eb_in);
extern EAPI E_Config *e_config;

@ -18,6 +18,10 @@ static Eet_Data_Descriptor *_e_ipc_2str_int_edd = NULL;
static Eet_Data_Descriptor *_e_ipc_2str_int_list_edd = NULL;
static Eet_Data_Descriptor *_e_ipc_4int_2str_edd = NULL;
static Eet_Data_Descriptor *_e_ipc_4int_2str_list_edd = NULL;
static Eet_Data_Descriptor *_e_ipc_5int_2str_edd = NULL;
static Eet_Data_Descriptor *_e_ipc_5int_2str_list_edd = NULL;
static Eet_Data_Descriptor *_e_ipc_3int_4str_edd = NULL;
static Eet_Data_Descriptor *_e_ipc_3int_4str_list_edd = NULL;
static Eet_Data_Descriptor *_e_ipc_3int_3str_edd = NULL;
static Eet_Data_Descriptor *_e_ipc_3int_3str_list_edd = NULL;
@ -74,6 +78,30 @@ e_ipc_codec_init(void)
_e_ipc_4int_2str_list_edd = E_CONFIG_DD_NEW("4int_2str_list", E_Ipc_List);
E_CONFIG_LIST(_e_ipc_4int_2str_list_edd, E_Ipc_List, list, _e_ipc_4int_2str_edd);
_e_ipc_5int_2str_edd = E_CONFIG_DD_NEW("5int_2str", E_Ipc_5Int_2Str);
E_CONFIG_VAL(_e_ipc_5int_2str_edd, E_Ipc_5Int_2Str, val1, INT);
E_CONFIG_VAL(_e_ipc_5int_2str_edd, E_Ipc_5Int_2Str, val2, INT);
E_CONFIG_VAL(_e_ipc_5int_2str_edd, E_Ipc_5Int_2Str, val3, INT);
E_CONFIG_VAL(_e_ipc_5int_2str_edd, E_Ipc_5Int_2Str, val4, INT);
E_CONFIG_VAL(_e_ipc_5int_2str_edd, E_Ipc_5Int_2Str, val5, INT);
E_CONFIG_VAL(_e_ipc_5int_2str_edd, E_Ipc_5Int_2Str, str1, STR);
E_CONFIG_VAL(_e_ipc_5int_2str_edd, E_Ipc_5Int_2Str, str2, STR);
_e_ipc_5int_2str_list_edd = E_CONFIG_DD_NEW("5int_2str_list", E_Ipc_List);
E_CONFIG_LIST(_e_ipc_5int_2str_list_edd, E_Ipc_List, list, _e_ipc_5int_2str_edd);
_e_ipc_3int_4str_edd = E_CONFIG_DD_NEW("3int_4str", E_Ipc_3Int_4Str);
E_CONFIG_VAL(_e_ipc_3int_4str_edd, E_Ipc_3Int_4Str, val1, INT);
E_CONFIG_VAL(_e_ipc_3int_4str_edd, E_Ipc_3Int_4Str, val2, INT);
E_CONFIG_VAL(_e_ipc_3int_4str_edd, E_Ipc_3Int_4Str, val3, INT);
E_CONFIG_VAL(_e_ipc_3int_4str_edd, E_Ipc_3Int_4Str, str1, STR);
E_CONFIG_VAL(_e_ipc_3int_4str_edd, E_Ipc_3Int_4Str, str2, STR);
E_CONFIG_VAL(_e_ipc_3int_4str_edd, E_Ipc_3Int_4Str, str3, STR);
E_CONFIG_VAL(_e_ipc_3int_4str_edd, E_Ipc_3Int_4Str, str4, STR);
_e_ipc_3int_4str_list_edd = E_CONFIG_DD_NEW("3int_4str_list", E_Ipc_List);
E_CONFIG_LIST(_e_ipc_3int_4str_list_edd, E_Ipc_List, list, _e_ipc_3int_4str_edd);
_e_ipc_3int_3str_edd = E_CONFIG_DD_NEW("3int_3str", E_Ipc_3Int_3Str);
E_CONFIG_VAL(_e_ipc_3int_3str_edd, E_Ipc_3Int_3Str, val1, INT);
E_CONFIG_VAL(_e_ipc_3int_3str_edd, E_Ipc_3Int_3Str, val2, INT);
@ -103,6 +131,8 @@ e_ipc_codec_shutdown(void)
E_CONFIG_DD_FREE(_e_ipc_2str_int_list_edd);
E_CONFIG_DD_FREE(_e_ipc_4int_2str_edd);
E_CONFIG_DD_FREE(_e_ipc_4int_2str_list_edd);
E_CONFIG_DD_FREE(_e_ipc_3int_4str_edd);
E_CONFIG_DD_FREE(_e_ipc_3int_4str_list_edd);
E_CONFIG_DD_FREE(_e_ipc_3int_3str_edd);
E_CONFIG_DD_FREE(_e_ipc_3int_3str_list_edd);
}
@ -425,6 +455,102 @@ e_ipc_codec_4int_2str_list_enc(Evas_List *list, int *size_ret)
return eet_data_descriptor_encode(_e_ipc_4int_2str_list_edd, &dat, size_ret);
}
int
e_ipc_codec_5int_2str_dec(char *data, int bytes, E_Ipc_5Int_2Str **dest)
{
E_Ipc_5Int_2Str *dat;
if (!data) return 0;
dat = eet_data_descriptor_decode(_e_ipc_5int_2str_edd, data, bytes);
if (!dat) return 0;
if (dest) *dest = dat;
return 1;
}
void *
e_ipc_codec_5int_2str_enc(int val1, int val2, int val3, int val4, int val5, char *str1, char *str2, int *size_ret)
{
E_Ipc_5Int_2Str dat;
dat.val1 = val1;
dat.val2 = val2;
dat.val3 = val3;
dat.val4 = val4;
dat.val5 = val5;
dat.str1 = str1;
dat.str2 = str2;
return eet_data_descriptor_encode(_e_ipc_5int_2str_edd, &dat, size_ret);
}
int
e_ipc_codec_5int_2str_list_dec(char *data, int bytes, Evas_List **dest)
{
E_Ipc_List *dat;
if (!data) return 0;
dat = eet_data_descriptor_decode(_e_ipc_5int_2str_list_edd, data, bytes);
if (!dat) return 0;
if (dest) *dest = dat->list;
free(dat);
return 1;
}
void *
e_ipc_codec_5int_2str_list_enc(Evas_List *list, int *size_ret)
{
E_Ipc_List dat;
dat.list = list;
return eet_data_descriptor_encode(_e_ipc_5int_2str_list_edd, &dat, size_ret);
}
int
e_ipc_codec_3int_4str_dec(char *data, int bytes, E_Ipc_3Int_4Str **dest)
{
E_Ipc_3Int_4Str *dat;
if (!data) return 0;
dat = eet_data_descriptor_decode(_e_ipc_3int_4str_edd, data, bytes);
if (!dat) return 0;
if (dest) *dest = dat;
return 1;
}
void *
e_ipc_codec_3int_4str_enc(int val1, int val2, int val3, char *str1, char *str2, char *str3, char *str4, int *size_ret)
{
E_Ipc_3Int_4Str dat;
dat.val1 = val1;
dat.val2 = val2;
dat.val3 = val3;
dat.str1 = str1;
dat.str2 = str2;
dat.str3 = str3;
dat.str4 = str4;
return eet_data_descriptor_encode(_e_ipc_3int_4str_edd, &dat, size_ret);
}
int
e_ipc_codec_3int_4str_list_dec(char *data, int bytes, Evas_List **dest)
{
E_Ipc_List *dat;
if (!data) return 0;
dat = eet_data_descriptor_decode(_e_ipc_3int_4str_list_edd, data, bytes);
if (!dat) return 0;
if (dest) *dest = dat->list;
free(dat);
return 1;
}
void *
e_ipc_codec_3int_4str_list_enc(Evas_List *list, int *size_ret)
{
E_Ipc_List dat;
dat.list = list;
return eet_data_descriptor_encode(_e_ipc_3int_4str_list_edd, &dat, size_ret);
}
int
e_ipc_codec_3int_3str_dec(char *data, int bytes, E_Ipc_3Int_3Str **dest)
{

@ -14,6 +14,8 @@ typedef struct _E_Ipc_Str_Int_List E_Ipc_Str_Int_List;
typedef struct _E_Ipc_2Str_Int E_Ipc_2Str_Int;
typedef struct _E_Ipc_2Str_Int_List E_Ipc_2Str_Int_List;
typedef struct _E_Ipc_4Int_2Str E_Ipc_4Int_2Str;
typedef struct _E_Ipc_5Int_2Str E_Ipc_5Int_2Str;
typedef struct _E_Ipc_3Int_4Str E_Ipc_3Int_4Str;
typedef struct _E_Ipc_3Int_3Str E_Ipc_3Int_3Str;
#else
@ -68,6 +70,18 @@ struct _E_Ipc_4Int_2Str
char *str1, *str2;
};
struct _E_Ipc_5Int_2Str
{
int val1, val2, val3, val4, val5;
char *str1, *str2;
};
struct _E_Ipc_3Int_4Str
{
int val1, val2, val3;
char *str1, *str2, *str3, *str4;
};
struct _E_Ipc_3Int_3Str
{
int val1, val2, val3;
@ -109,6 +123,16 @@ EAPI void *e_ipc_codec_4int_2str_enc(int val1, int val2, int val3, int val4,
EAPI int e_ipc_codec_4int_2str_list_dec(char *data, int bytes, Evas_List **dest);
EAPI void *e_ipc_codec_4int_2str_list_enc(Evas_List *list, int *size_ret);
EAPI int e_ipc_codec_5int_2str_dec(char *data, int bytes, E_Ipc_5Int_2Str **dest);
EAPI void *e_ipc_codec_5int_2str_enc(int val1, int val2, int val3, int val4, int val5, char *str1, char *str2, int *size_ret);
EAPI int e_ipc_codec_5int_2str_list_dec(char *data, int bytes, Evas_List **dest);
EAPI void *e_ipc_codec_5int_2str_list_enc(Evas_List *list, int *size_ret);
EAPI int e_ipc_codec_3int_4str_dec(char *data, int bytes, E_Ipc_3Int_4Str **dest);
EAPI void *e_ipc_codec_3int_4str_enc(int val1, int val2, int val3, char *str1, char *str2, char *str3, char *str4, int *size_ret);
EAPI int e_ipc_codec_3int_4str_list_dec(char *data, int bytes, Evas_List **dest);
EAPI void *e_ipc_codec_3int_4str_list_enc(Evas_List *list, int *size_ret);
EAPI int e_ipc_codec_3int_3str_dec(char *data, int bytes, E_Ipc_3Int_3Str **dest);
EAPI void *e_ipc_codec_3int_3str_enc(int val1, int val2, int val3, char *str1, char *str2, char *str3, int *size_ret);
EAPI int e_ipc_codec_3int_3str_list_dec(char *data, int bytes, Evas_List **dest);

@ -92,6 +92,44 @@ if (e->data) { \
} \
break;
/**
* INT5_STRING2:
* Decode event data of type E_Ipc_5Int_2Str
*/
# define INT5_STRING2(__5int_2str, HDL) \
case HDL: \
if (e->data) { \
E_Ipc_5Int_2Str *__5int_2str = NULL; \
__5int_2str = calloc(1, sizeof(E_Ipc_5Int_2Str)); \
if (e_ipc_codec_5int_2str_dec(e->data, e->size, &(__5int_2str))) {
# define END_INT5_STRING2(__5int_2str) \
free(__5int_2str->str1); \
free(__5int_2str->str2); \
free(__5int_2str); \
} \
} \
break;
/**
* INT3_STRING4:
* Decode event data of type E_Ipc_4Int_2Str
*/
# define INT3_STRING4(__3int_4str, HDL) \
case HDL: \
if (e->data) { \
E_Ipc_3Int_4Str *__3int_4str = NULL; \
__3int_4str = calloc(1, sizeof(E_Ipc_3Int_4Str)); \
if (e_ipc_codec_3int_4str_dec(e->data, e->size, &(__3int_4str))) {
# define END_INT3_STRING4(__3int_4str) \
free(__3int_4str->str1); \
free(__3int_4str->str2); \
free(__3int_4str->str3); \
free(__3int_4str->str4); \
free(__3int_4str); \
} \
} \
break;
# define STRING2_INT(__str1, __str2, __int, __2str_int, HDL) \
case HDL: \
if (e->data) { \
@ -199,6 +237,30 @@ case HDL: { void *data; int bytes; \
} \
break;
#define REQ_5INT_2STRING_START(HDL) \
case HDL: { void *data; int bytes; \
#define REQ_5INT_2STRING_END(__val1, __val2, __val3, __val4, __val5, __str1, __str2, HDL) \
data = e_ipc_codec_5int_2str_enc(__val1, __val2, __val3, __val4, __val5, __str1, __str2, &bytes); \
if (data) { \
ecore_ipc_server_send(e->server, E_IPC_DOMAIN_REQUEST, HDL, 0, 0, 0, data, bytes); \
free(data); \
} \
} \
break;
#define REQ_3INT_4STRING_START(HDL) \
case HDL: { void *data; int bytes; \
#define REQ_3INT_4STRING_END(__val1, __val2, __val3, __str1, __str2, __str3, __str4, HDL) \
data = e_ipc_codec_3int_4str_enc(__val1, __val2, __val3, __str1, __str1, __str3, __str4, &bytes); \
if (data) { \
ecore_ipc_server_send(e->server, E_IPC_DOMAIN_REQUEST, HDL, 0, 0, 0, data, bytes); \
free(data); \
} \
} \
break;
# define REQ_2STRING_INT(__str1, __str2, __int, HDL) \
case HDL: { void *data; int bytes; \
data = e_ipc_codec_2str_int_enc(__str1, __str2, __int, &bytes); \
@ -419,6 +481,132 @@ free(data);
} \
break;
/**
* INT5_STRING2:
* Decode event data is a list of E_Ipc_5Int_2Str objects and iterate
* the list. For each iteration the object __v will contain a decoded list
* element.
*
* Use END_INT5_STRING2_LIST to terminate the loop and free all data.
*/
#define INT5_STRING2_LIST(__v, HDL) \
INT5_STRING2_LIST_START(__v, HDL) \
INT5_STRING2_LIST_ITERATE(__v)
#define INT5_STRING2_LIST_START(__v, HDL) \
case HDL: { \
Evas_List *dat = NULL, *l; \
if (e_ipc_codec_5int_2str_list_dec(e->data, e->size, &dat)) {
#define INT5_STRING2_LIST_ITERATE(__v) \
for (l = dat; l; l = l->next) { \
E_Ipc_5Int_2Str *__v; \
__v = l->data;
#define END_INT5_STRING2_LIST(__v) \
END_INT5_STRING2_LIST_ITERATE(__v) \
END_INT5_STRING2_LIST_START()
#define END_INT5_STRING2_LIST_ITERATE(__v) \
free(__v->str1); \
free(__v->str2); \
free(__v); \
} \
evas_list_free(dat);
#define END_INT5_STRING2_LIST_START() \
} \
} \
break;
/**
* SEND_INT5_STRING2_LIST:
* Start to encode a list of objects to prepare them for sending via
* ipc. The object __v1 will be of type __typ1 and __v2 will be of type
* E_Ipc_5Int_2Str.
*
* Use END_SEND_INT5_STRING2_LIST to terminate the encode iteration and
* send that data. The list will be freed.
*/
#define SEND_INT5_STRING2_LIST(__list, __typ1, __v1, __v2, HDL) \
case HDL: { \
Evas_List *dat = NULL, *l; \
void *data; int bytes; \
for (l = __list; l; l = l->next) { \
__typ1 *__v1; \
E_Ipc_5Int_2Str *__v2; \
__v1 = l->data; \
__v2 = calloc(1, sizeof(E_Ipc_5Int_2Str));
#define END_SEND_INT5_STRING2_LIST(__v1, __op) \
dat = evas_list_append(dat, __v1); \
} \
data = e_ipc_codec_5int_2str_list_enc(dat, &bytes); \
SEND_DATA(__op); \
FREE_LIST(dat); \
} \
break;
/**
* INT3_STRING4:
* Decode event data is a list of E_Ipc_3Int_4Str objects and iterate
* the list. For each iteration the object __v will contain a decoded list
* element.
*
* Use END_INT3_STRING4_LIST to terminate the loop and free all data.
*/
#define INT3_STRING4_LIST(__v, HDL) \
INT3_STRING4_LIST_START(__v, HDL) \
INT3_STRING4_LIST_ITERATE(__v)
#define INT3_STRING4_LIST_START(__v, HDL) \
case HDL: { \
Evas_List *dat = NULL, *l; \
if (e_ipc_codec_3int_4str_list_dec(e->data, e->size, &dat)) {
#define INT3_STRING4_LIST_ITERATE(__v) \
for (l = dat; l; l = l->next) { \
E_Ipc_3Int_4Str *__v; \
__v = l->data;
#define END_INT3_STRING4_LIST(__v) \
END_INT3_STRING4_LIST_ITERATE(__v) \
END_INT3_STRING4_LIST_START()
#define END_INT3_STRING4_LIST_ITERATE(__v) \
free(__v->str1); \
free(__v->str2); \
free(__v->str3); \
free(__v->str4); \
free(__v); \
} \
evas_list_free(dat);
#define END_INT3_STRING4_LIST_START() \
} \
} \
break;
/**
* SEND_INT3_STRING4_LIST:
* Start to encode a list of objects to prepare them for sending via
* ipc. The object __v1 will be of type __typ1 and __v2 will be of type
* E_Ipc_3Int_4Str.
*
* Use END_SEND_INT3_STRING4_LIST to terminate the encode iteration and
* send that data. The list will be freed.
*/
#define SEND_INT3_STRING4_LIST(__list, __typ1, __v1, __v2, HDL) \
case HDL: { \
Evas_List *dat = NULL, *l; \
void *data; int bytes; \
for (l = __list; l; l = l->next) { \
__typ1 *__v1; \
E_Ipc_3Int_4Str *__v2; \
__v1 = l->data; \
__v2 = calloc(1, sizeof(E_Ipc_3Int_4Str));
#define END_SEND_INT3_STRING4_LIST(__v1, __op) \
dat = evas_list_append(dat, __v1); \
} \
data = e_ipc_codec_3int_4str_list_enc(dat, &bytes); \
SEND_DATA(__op); \
FREE_LIST(dat); \
} \
break;
/**
* STRING2_INT_LIST:
* Decode event data which is a list of E_Ipc_2Str_Int objects and iterate
@ -5086,3 +5274,652 @@ break;
#endif
#undef HDL
/****************************************************************************/
#define HDL E_IPC_OP_BINDING_SIGNAL_LIST
#if (TYPE == E_REMOTE_OPTIONS)
/* e_remote define command line args */
OP("-binding-signal-list", 0, "List all signal bindings", 1, HDL)
#elif (TYPE == E_REMOTE_OUT)
/* e_remote parse command line args encode and send request */
REQ_NULL(HDL);
#elif (TYPE == E_WM_IN)
/* e_ipc decode request and do action or send reply */
SEND_INT3_STRING4_LIST(e_config->signal_bindings, E_Config_Binding_Signal, emb, v, HDL);
v->val1 = emb->context;
v->str1 = emb->signal;
v->str2 = emb->source;
v->val2 = emb->modifiers;
v->val3 = emb->any_mod;
v->str3 = emb->action;
v->str4 = emb->params;
END_SEND_INT3_STRING4_LIST(v, E_IPC_OP_BINDING_SIGNAL_LIST_REPLY);
#endif
#undef HDL
/****************************************************************************/
#define HDL E_IPC_OP_BINDING_SIGNAL_LIST_REPLY
#if (TYPE == E_REMOTE_OPTIONS)
#elif (TYPE == E_REMOTE_OUT)
#elif (TYPE == E_WM_IN)
#elif (TYPE == E_REMOTE_IN)
/* e_remote decode the response from e_ipc and print it to the console */
INT3_STRING4_LIST(v, HDL);
{
char *context;
char modifier[256];
if (v->val1 == E_BINDING_CONTEXT_NONE) context = "NONE";
else if (v->val1 == E_BINDING_CONTEXT_UNKNOWN) context = "UNKNOWN";
else if (v->val1 == E_BINDING_CONTEXT_BORDER) context = "BORDER";
else if (v->val1 == E_BINDING_CONTEXT_ZONE) context = "ZONE";
else if (v->val1 == E_BINDING_CONTEXT_CONTAINER) context = "CONTAINER";
else if (v->val1 == E_BINDING_CONTEXT_MANAGER) context = "MANAGER";
else if (v->val1 == E_BINDING_CONTEXT_MENU) context = "MENU";
else if (v->val1 == E_BINDING_CONTEXT_WINLIST) context = "WINLIST";
else if (v->val1 == E_BINDING_CONTEXT_ANY) context = "ANY";
else context = "";
modifier[0] = 0;
if (v->val2 & E_BINDING_MODIFIER_SHIFT)
{
if (modifier[0] != 0) strcat(modifier, "|");
strcat(modifier, "SHIFT");
}
if (v->val2 & E_BINDING_MODIFIER_CTRL)
{
if (modifier[0] != 0) strcat(modifier, "|");
strcat(modifier, "CTRL");
}
if (v->val2 & E_BINDING_MODIFIER_ALT)
{
if (modifier[0] != 0) strcat(modifier, "|");
strcat(modifier, "ALT");
}
if (v->val2 & E_BINDING_MODIFIER_WIN)
{
if (modifier[0] != 0) strcat(modifier, "|");
strcat(modifier, "WIN");
}
if (v->val2 == E_BINDING_MODIFIER_NONE)
strcpy(modifier, "NONE");
printf("REPLY: BINDING CONTEXT=%s SIGNAL=%s SOURCE=%s MODIFIERS=%s ANY_MOD=%i ACTION=\"%s\" PARAMS=\"%s\"\n",
context,
v->str1,
v->str2,
modifier,
v->val3,
v->str3,
v->str4
);
}
END_INT3_STRING4_LIST(v);
#elif E_LIB_IN
INT3_STRING4_LIST_START(v, HDL);
{
int count;
RESPONSE(r, E_Response_Binding_Signal_List);
count = evas_list_count(dat);
r->bindings = malloc(sizeof(E_Response_Binding_Signal_Data *) * count);
r->count = count;