e gadgets - as per email to e-devbel - it's easier to fix old so rm new

new gadget infra--
devs/bu5hm4n/recognition
Carsten Haitzler 2 years ago
parent 3bbab5a22f
commit 0b1c4100ef
  1. 24
      meson_options.txt
  2. 1488
      src/bin/e_bryce.c
  3. 22
      src/bin/e_bryce.h
  4. 444
      src/bin/e_bryce_editor.c
  5. 99
      src/bin/e_config.c
  6. 3535
      src/bin/e_gadget.c
  7. 155
      src/bin/e_gadget.h
  8. 354
      src/bin/e_gadget_loader.c
  9. 1270
      src/bin/e_gadget_runner.c
  10. 30
      src/bin/e_gadget_types.h
  11. 2
      src/bin/e_includes.h
  12. 22
      src/bin/e_int_menus.c
  13. 13
      src/bin/e_main.c
  14. 8
      src/bin/generated/meson.build
  15. 22
      src/bin/meson.build
  16. 12
      src/modules/backlight/e_mod_main.c
  17. 302
      src/modules/backlight/gadget/backlight.c
  18. 14
      src/modules/backlight/gadget/backlight.h
  19. 22
      src/modules/backlight/gadget/mod.c
  20. 4
      src/modules/backlight/meson.build
  21. 98
      src/modules/bluez5/e_mod_main.c
  22. 4
      src/modules/bluez5/e_mod_main.h
  23. 9
      src/modules/conf_display/e_int_config_desklock.c
  24. 2066
      src/modules/luncher/bar.c
  25. 572
      src/modules/luncher/config.c
  26. BIN
      src/modules/luncher/e-module-luncher.edj
  27. 754
      src/modules/luncher/grid.c
  28. 114
      src/modules/luncher/luncher.h
  29. 7
      src/modules/luncher/meson.build
  30. 108
      src/modules/luncher/mod.c
  31. 36
      src/modules/luncher/module.desktop
  32. 5
      src/modules/meson.build
  33. 3
      src/modules/mixer/backend.c
  34. 0
      src/modules/mixer/backend.h
  35. 15
      src/modules/mixer/e_mod_main.c
  36. 423
      src/modules/mixer/gadget/mixer.c
  37. 30
      src/modules/mixer/gadget/mixer.h
  38. 36
      src/modules/mixer/gadget/mod.c
  39. 6
      src/modules/mixer/meson.build
  40. 9
      src/modules/mixer/mixer.h
  41. 136
      src/modules/packagekit/e_mod_main.c
  42. 46
      src/modules/packagekit/e_mod_packagekit.c
  43. 3
      src/modules/packagekit/e_mod_packagekit.h
  44. 2
      src/modules/pager/e_mod_config.c
  45. 72
      src/modules/pager/e_mod_main.c
  46. 25
      src/modules/pager/e_mod_main.h
  47. 685
      src/modules/pager/gadget/config.c
  48. 108
      src/modules/pager/gadget/mod.c
  49. 2991
      src/modules/pager/gadget/pager.c
  50. 51
      src/modules/pager/gadget/pager.h
  51. 6
      src/modules/pager/meson.build
  52. 4
      src/modules/start/e_mod_main.c
  53. 3
      src/modules/start/meson.build
  54. 227
      src/modules/start/start.c
  55. 759
      src/modules/sysinfo/batman/batman.c
  56. 114
      src/modules/sysinfo/batman/batman.h
  57. 611
      src/modules/sysinfo/batman/batman_config.c
  58. 1291
      src/modules/sysinfo/batman/batman_fallback.c
  59. 398
      src/modules/sysinfo/batman/batman_sysctl.c
  60. 393
      src/modules/sysinfo/batman/batman_udev.c
  61. 419
      src/modules/sysinfo/batman/batman_upower.c
  62. 1168
      src/modules/sysinfo/cpuclock/cpuclock.c
  63. 33
      src/modules/sysinfo/cpuclock/cpuclock.h
  64. 633
      src/modules/sysinfo/cpuclock/cpuclock_config.c
  65. 502
      src/modules/sysinfo/cpumonitor/cpumonitor.c
  66. 12
      src/modules/sysinfo/cpumonitor/cpumonitor.h
  67. 171
      src/modules/sysinfo/cpumonitor/cpumonitor_config.c
  68. 114
      src/modules/sysinfo/cpumonitor/cpumonitor_proc.c
  69. 125
      src/modules/sysinfo/cpumonitor/cpumonitor_sysctl.c
  70. BIN
      src/modules/sysinfo/e-module-sysinfo.edj
  71. 586
      src/modules/sysinfo/memusage/memusage.c
  72. 25
      src/modules/sysinfo/memusage/memusage.h
  73. 171
      src/modules/sysinfo/memusage/memusage_config.c
  74. 98
      src/modules/sysinfo/memusage/memusage_proc.c
  75. 172
      src/modules/sysinfo/memusage/memusage_sysctl.c
  76. 44
      src/modules/sysinfo/meson.build
  77. 222
      src/modules/sysinfo/mod.c
  78. 8
      src/modules/sysinfo/module.desktop
  79. 509
      src/modules/sysinfo/netstatus/netstatus.c
  80. 29
      src/modules/sysinfo/netstatus/netstatus.h
  81. 419
      src/modules/sysinfo/netstatus/netstatus_config.c
  82. 93
      src/modules/sysinfo/netstatus/netstatus_proc.c
  83. 188
      src/modules/sysinfo/netstatus/netstatus_sysctl.c
  84. 176
      src/modules/sysinfo/sysinfo.c
  85. 302
      src/modules/sysinfo/sysinfo.h
  86. 509
      src/modules/sysinfo/thermal/thermal.c
  87. 28
      src/modules/sysinfo/thermal/thermal.h
  88. 369
      src/modules/sysinfo/thermal/thermal_config.c
  89. 435
      src/modules/sysinfo/thermal/thermal_fallback.c
  90. 212
      src/modules/sysinfo/thermal/thermal_sysctl.c
  91. 51
      src/modules/sysinfo/thermal/thermal_udev.c
  92. BIN
      src/modules/teamwork/e-module-teamwork.edj
  93. 182
      src/modules/teamwork/e_mod_config.c
  94. 181
      src/modules/teamwork/e_mod_main.c
  95. 99
      src/modules/teamwork/e_mod_main.h
  96. 1297
      src/modules/teamwork/e_mod_tw.c
  97. 17
      src/modules/teamwork/meson.build
  98. 24
      src/modules/teamwork/module.desktop
  99. 138
      src/modules/teamwork/wl.c
  100. 46
      src/modules/teamwork/wl_teamwork.c
  101. Some files were not shown because too many files have changed in this diff Show More

@ -163,10 +163,6 @@ option('polkit',
type: 'boolean',
value: true,
description: 'enable polkit module: (default=true)')
option('luncher',
type: 'boolean',
value: true,
description: 'enable luncher module: (default=true)')
option('mixer',
type: 'boolean',
value: true,
@ -191,10 +187,6 @@ option('pager',
type: 'boolean',
value: true,
description: 'enable pager module: (default=true)')
option('pager-plain',
type: 'boolean',
value: true,
description: 'enable pager_plain module: (default=true)')
option('quickaccess',
type: 'boolean',
value: true,
@ -211,10 +203,6 @@ option('syscon',
type: 'boolean',
value: true,
description: 'enable syscon module: (default=true)')
option('sysinfo',
type: 'boolean',
value: true,
description: 'enable sysinfo module: (default=true)')
option('systray',
type: 'boolean',
value: true,
@ -223,10 +211,6 @@ option('tasks',
type: 'boolean',
value: true,
description: 'enable tasks module: (default=true)')
option('teamwork',
type: 'boolean',
value: true,
description: 'enable teamwork module: (default=true)')
option('temperature',
type: 'boolean',
value: true,
@ -235,18 +219,10 @@ option('tiling',
type: 'boolean',
value: true,
description: 'enable tiling module: (default=true)')
option('time',
type: 'boolean',
value: true,
description: 'enable time module: (default=true)')
option('winlist',
type: 'boolean',
value: true,
description: 'enable winlist module: (default=true)')
option('wireless',
type: 'boolean',
value: true,
description: 'enable wireless module: (default=true)')
option('wizard',
type: 'boolean',
value: true,

File diff suppressed because it is too large Load Diff

@ -1,22 +0,0 @@
#ifndef E_TYPEDEFS
#ifndef E_BRYCE_H
# define E_BRYCE_H
EINTERN void e_bryce_init(void);
EINTERN void e_bryce_shutdown(void);
E_API Evas_Object *e_bryce_add(Evas_Object *parent, const char *name, E_Gadget_Site_Orient orient, E_Gadget_Site_Anchor an);
E_API void e_bryce_orient(Evas_Object *bryce, E_Gadget_Site_Orient orient, E_Gadget_Site_Anchor an);
E_API Evas_Object *e_bryce_site_get(Evas_Object *bryce);
E_API Eina_Bool e_bryce_autosize_get(Evas_Object *bryce);
E_API void e_bryce_autosize_set(Evas_Object *bryce, Eina_Bool set);
E_API Eina_Bool e_bryce_autohide_get(Evas_Object *bryce);
E_API void e_bryce_autohide_set(Evas_Object *bryce, Eina_Bool set);
E_API Eina_Bool e_bryce_exists(Evas_Object *parent, Evas_Object *bryce, E_Gadget_Site_Orient orient, E_Gadget_Site_Anchor an);
E_API Eina_List *e_bryce_list(Evas_Object *parent);
E_API void e_bryce_style_set(Evas_Object *bryce, const char *style);
E_API Evas_Object *e_bryce_editor_add(Evas_Object *parent, Evas_Object *bryce);
E_API Evas_Object *e_bryce_edit(Evas_Object *bryce);
#endif
#endif

@ -1,444 +0,0 @@
#include "e.h"
#define DEFAULT_AUTOSIZE EINA_TRUE
#define DEFAULT_AUTOHIDE EINA_FALSE
#define DEFAULT_LAYER E_LAYER_CLIENT_EDGE
typedef struct Bryce_Info
{
E_Gadget_Site_Anchor anchor;
E_Gadget_Site_Orient orient;
Eina_Stringshare *style;
Eina_Bool stack_under;
Eina_Bool autohide;
Eina_Bool autosize;
} Bryce_Info;
static void _editor_add_bottom(void *data, Evas_Object *obj, const char *sig, const char *src);
static void _editor_add_top(void *data, Evas_Object *obj, const char *sig, const char *src);
static void _editor_add_left(void *data, Evas_Object *obj, const char *sig, const char *src);
static void _editor_add_right(void *data, Evas_Object *obj, const char *sig, const char *src);
static void
setup_exists(Evas_Object *bryce, Evas_Object *editor, Evas_Object *parent, E_Gadget_Site_Anchor an)
{
if ((an != E_GADGET_SITE_ANCHOR_TOP) &&
e_bryce_exists(parent, bryce, E_GADGET_SITE_ORIENT_HORIZONTAL, E_GADGET_SITE_ANCHOR_BOTTOM | an))
elm_object_signal_emit(editor, "e,bryce,exists,bottom", "e");
if ((an != E_GADGET_SITE_ANCHOR_BOTTOM) &&
e_bryce_exists(parent, bryce, E_GADGET_SITE_ORIENT_HORIZONTAL, E_GADGET_SITE_ANCHOR_TOP | an))
elm_object_signal_emit(editor, "e,bryce,exists,top", "e");
if ((an != E_GADGET_SITE_ANCHOR_RIGHT) &&
e_bryce_exists(parent, bryce, E_GADGET_SITE_ORIENT_VERTICAL, E_GADGET_SITE_ANCHOR_LEFT | an))
elm_object_signal_emit(editor, "e,bryce,exists,left", "e");
if ((an != E_GADGET_SITE_ANCHOR_LEFT) &&
e_bryce_exists(parent, bryce, E_GADGET_SITE_ORIENT_VERTICAL, E_GADGET_SITE_ANCHOR_RIGHT | an))
elm_object_signal_emit(editor, "e,bryce,exists,right", "e");
}
static void
_editor_bryce_add(Evas_Object *obj)
{
Evas_Object *b, *site;
char buf[1024];
const char *loc = "", *loc2 = "";
Bryce_Info *bi;
E_Zone *zone;
E_Gadget_Site_Gravity gravity = E_GADGET_SITE_GRAVITY_CENTER;
bi = evas_object_data_get(obj, "__bryce_info");
b = evas_object_data_get(obj, "__bryce_editor_bryce");
if (bi->anchor & E_GADGET_SITE_ANCHOR_TOP)
loc = "top";
else if (bi->anchor & E_GADGET_SITE_ANCHOR_BOTTOM)
loc = "bottom";
else if (bi->anchor & E_GADGET_SITE_ANCHOR_LEFT)
loc = "left";
else if (bi->anchor & E_GADGET_SITE_ANCHOR_RIGHT)
loc = "right";
if (bi->anchor & E_GADGET_SITE_ANCHOR_RIGHT)
loc2 = "right";
else if (bi->anchor & E_GADGET_SITE_ANCHOR_LEFT)
loc2 = "left";
else if (bi->anchor & E_GADGET_SITE_ANCHOR_TOP)
loc2 = "top";
else if (bi->anchor & E_GADGET_SITE_ANCHOR_BOTTOM)
loc2 = "bottom";
zone = e_comp_object_util_zone_get(obj);
if (!zone) zone = e_zone_current_get();
snprintf(buf, sizeof(buf), "bryce_%s_%s_%d", loc, loc2, zone->num);
if (bi->orient == E_GADGET_SITE_ORIENT_HORIZONTAL)
{
if (bi->anchor & E_GADGET_SITE_ANCHOR_LEFT)
gravity = E_GADGET_SITE_GRAVITY_LEFT;
else if (bi->anchor & E_GADGET_SITE_ANCHOR_RIGHT)
gravity = E_GADGET_SITE_GRAVITY_RIGHT;
}
else
{
if (bi->anchor & E_GADGET_SITE_ANCHOR_TOP)
gravity = E_GADGET_SITE_GRAVITY_TOP;
else if (bi->anchor & E_GADGET_SITE_ANCHOR_BOTTOM)
gravity = E_GADGET_SITE_GRAVITY_BOTTOM;
}
if (b)
{
e_bryce_orient(b, bi->orient, bi->anchor);
site = e_bryce_site_get(b);
}
else
{
b = e_bryce_add(e_comp->elm, buf, bi->orient, bi->anchor);
site = e_bryce_site_get(b);
e_gadget_site_gadget_add(site, "Start", 0);
e_gadget_site_gadget_add(site, "Digital Clock", 0);
e_gadget_site_gadget_add(site, "Wireless", 0);
}
e_gadget_site_gravity_set(site, gravity);
e_bryce_style_set(b, bi->style);
e_bryce_autohide_set(b, bi->autohide);
e_bryce_autosize_set(b, bi->autosize);
evas_object_layer_set(b, bi->stack_under ? E_LAYER_DESKTOP_TOP : E_LAYER_CLIENT_ABOVE);
evas_object_del(obj);
}
static void
_editor_finish(void *data, Evas_Object *obj EINA_UNUSED, void *event_info EINA_UNUSED)
{
_editor_bryce_add(data);
}
static void
_editor_autosize(void *data, Evas_Object *obj EINA_UNUSED, void *event_info EINA_UNUSED)
{
Bryce_Info *bi = data;
bi->autosize = !bi->autosize;
}
static void
_editor_autohide(void *data, Evas_Object *obj EINA_UNUSED, void *event_info EINA_UNUSED)
{
Bryce_Info *bi = data;
bi->autohide = !bi->autohide;
}
static void
_editor_stacking(void *data, Evas_Object *obj EINA_UNUSED, void *event_info EINA_UNUSED)
{
Bryce_Info *bi = data;
bi->stack_under = !bi->stack_under;
}
static void
_editor_style_click(void *data, Evas *e EINA_UNUSED, Evas_Object *obj, void *event_info EINA_UNUSED)
{
const char *g;
char style[1024] = {0};
Bryce_Info *bi;
Evas_Object *ly, *box, *ck, *button, *bryce;
ly = elm_object_part_content_get(obj, "e.swallow.content");
elm_layout_file_get(ly, NULL, &g);
g += (sizeof("e/bryce/") - 1);
memcpy(style, g, MIN(sizeof(style) - 1, (size_t)(strchr(g, '/') - g)));
bryce = evas_object_data_get(data, "__bryce_editor_bryce");
bi = evas_object_data_get(data, "__bryce_info");
bi->style = eina_stringshare_add(style);
e_theme_edje_object_set(data, NULL, "e/bryce/editor/finish");
elm_object_part_text_set(data, "e.text", _("Finishing touches... (4/4)"));
box = elm_box_add(data);
elm_box_padding_set(box, 0, 20 * e_scale);
ck = elm_check_add(box);
elm_object_focus_allow_set(ck, 0);
E_ALIGN(ck, 0, 0.5);
evas_object_show(ck);
elm_object_text_set(ck, _("Automatically size based on contents"));
evas_object_smart_callback_add(ck, "changed", _editor_autosize, bi);
if (bryce)
{
bi->autosize = e_bryce_autosize_get(bryce);
elm_check_state_set(ck, bi->autosize);
}
elm_box_pack_end(box, ck);
ck = elm_check_add(box);
elm_object_focus_allow_set(ck, 0);
E_ALIGN(ck, 0, 0.5);
evas_object_show(ck);
elm_object_text_set(ck, _("Automatically hide"));
evas_object_smart_callback_add(ck, "changed", _editor_autohide, bi);
if (bryce)
{
bi->autohide = e_bryce_autohide_get(bryce);
elm_check_state_set(ck, bi->autohide);
}
elm_box_pack_end(box, ck);
ck = elm_check_add(box);
elm_object_focus_allow_set(ck, 0);
E_ALIGN(ck, 0, 0.5);
evas_object_show(ck);
elm_object_text_set(ck, _("Do not stack above windows"));
evas_object_smart_callback_add(ck, "changed", _editor_stacking, bi);
if (bryce)
{
bi->stack_under = evas_object_layer_get(bryce) == E_LAYER_DESKTOP_TOP;
elm_check_state_set(ck, bi->stack_under);
}
elm_box_pack_end(box, ck);
//ck = elm_check_add(box);
//elm_object_text_set(ck, _("Allow windows to overlap"));
//evas_object_smart_callback_add(ck, "changed", _editor_overlap, data);
//elm_box_pack_end(box, ck);
button = elm_button_add(data);
evas_object_show(button);
elm_object_text_set(button, _("Finish!"));
evas_object_smart_callback_add(button, "clicked", _editor_finish, data);
elm_box_pack_end(box, button);
elm_object_part_content_set(data, "e.swallow.content", box);
}
static void
_editor_style(Evas_Object *obj)
{
Eina_List *l;
Eina_Stringshare *style;
Evas_Object *box;
int w;
evas_object_geometry_get(obj, NULL, NULL, &w, NULL);
box = elm_box_add(obj);
e_theme_edje_object_set(obj, NULL, "e/bryce/editor/style");
elm_object_part_text_set(obj, "e.text", _("Choose style (3/4)"));
elm_box_homogeneous_set(box, 1);
elm_box_padding_set(box, 0, 20 * e_scale);
l = elm_theme_group_base_list(NULL, "e/bryce/");
EINA_LIST_FREE(l, style)
{
Evas_Object *ly, *bryce;
char buf[1024] = {0};
size_t len;
if (!eina_str_has_suffix(style, "/base"))
{
eina_stringshare_del(style);
continue;
}
ly = elm_layout_add(box);
e_theme_edje_object_set(ly, NULL, "e/bryce/editor/style/item");
bryce = edje_object_add(evas_object_evas_get(box));
elm_object_part_content_set(ly, "e.swallow.content", bryce);
len = strlen(style);
strncpy(buf, style + sizeof("e/bryce/") - 1,
MIN(sizeof(buf) - 1, len - (sizeof("e/bryce/") - 1) - (sizeof("/base") - 1)));
buf[0] = toupper(buf[0]);
elm_object_part_text_set(ly, "e.text", buf);
e_comp_object_util_del_list_append(ly, bryce);
e_theme_edje_object_set(bryce, NULL, style);
evas_object_size_hint_min_set(bryce, w * 2 / 3, 48 * e_scale);
evas_object_show(ly);
evas_object_event_callback_add(ly, EVAS_CALLBACK_MOUSE_DOWN, _editor_style_click, obj);
elm_box_pack_end(box, ly);
}
elm_object_part_content_set(obj, "e.swallow.content", box);
}
static void
_editor_info_del(void *data, Evas *e EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *event_info EINA_UNUSED)
{
Bryce_Info *bi = data;
eina_stringshare_del(bi->style);
free(bi);
}
static void
_editor_add(Evas_Object *obj, E_Gadget_Site_Orient orient, E_Gadget_Site_Anchor an)
{
char buf[1024];
Bryce_Info *bi;
bi = evas_object_data_get(obj, "__bryce_info");
if (bi)
{
bi->anchor |= an;
_editor_style(obj);
}
else
{
bi = E_NEW(Bryce_Info, 1);
bi->anchor = an;
bi->orient = orient;
evas_object_data_set(obj, "__bryce_info", bi);
evas_object_event_callback_add(obj, EVAS_CALLBACK_DEL, _editor_info_del, bi);
snprintf(buf, sizeof(buf), "e/bryce/editor/side/%s",
orient == E_GADGET_SITE_ORIENT_HORIZONTAL ? "horizontal" : "vertical");
e_theme_edje_object_set(obj, NULL, buf);
elm_object_part_text_set(obj, "e.text", _("Choose position (2/4)"));
if (an & E_GADGET_SITE_ANCHOR_BOTTOM)
elm_object_signal_emit(obj, "e,state,bottom", "e");
else if (an & E_GADGET_SITE_ANCHOR_RIGHT)
elm_object_signal_emit(obj, "e,state,right", "e");
setup_exists(evas_object_data_get(obj, "__bryce_editor_bryce"), obj,
evas_object_data_get(obj, "__bryce_editor_site"), an);
}
}
static void
_editor_add_bottom(void *data EINA_UNUSED, Evas_Object *obj, const char *sig EINA_UNUSED, const char *src EINA_UNUSED)
{
_editor_add(obj, E_GADGET_SITE_ORIENT_HORIZONTAL, E_GADGET_SITE_ANCHOR_BOTTOM);
}
static void
_editor_add_top(void *data EINA_UNUSED, Evas_Object *obj, const char *sig EINA_UNUSED, const char *src EINA_UNUSED)
{
_editor_add(obj, E_GADGET_SITE_ORIENT_HORIZONTAL, E_GADGET_SITE_ANCHOR_TOP);
}
static void
_editor_add_left(void *data EINA_UNUSED, Evas_Object *obj, const char *sig EINA_UNUSED, const char *src EINA_UNUSED)
{
_editor_add(obj, E_GADGET_SITE_ORIENT_VERTICAL, E_GADGET_SITE_ANCHOR_LEFT);
}
static void
_editor_add_center(void *data EINA_UNUSED, Evas_Object *obj, const char *sig EINA_UNUSED, const char *src EINA_UNUSED)
{
_editor_add(obj, E_GADGET_SITE_ORIENT_NONE, E_GADGET_SITE_ANCHOR_NONE);
}
static void
_editor_add_right(void *data EINA_UNUSED, Evas_Object *obj, const char *sig EINA_UNUSED, const char *src EINA_UNUSED)
{
_editor_add(obj, E_GADGET_SITE_ORIENT_VERTICAL, E_GADGET_SITE_ANCHOR_RIGHT);
}
static void
_editor_dismiss(void *data EINA_UNUSED, Evas_Object *obj, const char *sig EINA_UNUSED, const char *src EINA_UNUSED)
{
evas_object_del(obj);
}
E_API Evas_Object *
e_bryce_editor_add(Evas_Object *parent, Evas_Object *bryce)
{
Evas_Object *editor;
editor = elm_layout_add(parent);
evas_object_data_set(editor, "__bryce_editor_site", parent);
evas_object_data_set(editor, "__bryce_editor_bryce", bryce);
e_theme_edje_object_set(editor, NULL, "e/bryce/editor/side");
elm_object_part_text_set(editor, "e.text", _("Choose screen edge (1/4)"));
setup_exists(bryce, editor, parent, 0);
elm_object_signal_callback_add(editor, "e,action,dismiss", "e", _editor_dismiss, editor);
elm_object_signal_callback_add(editor, "e,bryce,add,bottom", "e", _editor_add_bottom, editor);
elm_object_signal_callback_add(editor, "e,bryce,add,top", "e", _editor_add_top, editor);
elm_object_signal_callback_add(editor, "e,bryce,add,left", "e", _editor_add_left, editor);
elm_object_signal_callback_add(editor, "e,bryce,add,right", "e", _editor_add_right, editor);
elm_object_signal_callback_add(editor, "e,bryce,add,center", "e", _editor_add_center, editor);
return editor;
}
static Ecore_Event_Handler *handler;
static void
_bryce_edit_key_location(Evas_Object *obj, Ecore_Event_Key *ev)
{
if (eina_streq(ev->key, "Up"))
_editor_add(obj, E_GADGET_SITE_ORIENT_HORIZONTAL, E_GADGET_SITE_ANCHOR_TOP);
else if (eina_streq(ev->key, "Down"))
_editor_add(obj, E_GADGET_SITE_ORIENT_HORIZONTAL, E_GADGET_SITE_ANCHOR_BOTTOM);
else if (eina_streq(ev->key, "Left"))
_editor_add(obj, E_GADGET_SITE_ORIENT_VERTICAL, E_GADGET_SITE_ANCHOR_LEFT);
else if (eina_streq(ev->key, "Right"))
_editor_add(obj, E_GADGET_SITE_ORIENT_VERTICAL, E_GADGET_SITE_ANCHOR_RIGHT);
}
static Eina_Bool
_bryce_edit_key_handler(void *data, int t EINA_UNUSED, Ecore_Event_Key *ev)
{
if (eina_streq(ev->key, "Escape"))
{
elm_layout_signal_emit(data, "e,action,dismiss", "e");
return ECORE_CALLBACK_RENEW;
}
if (evas_object_data_get(data, "__bryce_info"))
{
const char *grp;
edje_object_file_get(data, NULL, &grp);
if (!strncmp(grp, "e/bryce/editor/side/", sizeof("e/bryce/editor/side/") - 1))
_bryce_edit_key_location(data, ev);
else if (!strncmp(grp, "e/bryce/editor/style", sizeof("e/bryce/editor/style") - 1))
{
Evas_Object *bx, *o;
Eina_List *l;
int n;
bx = elm_object_part_content_get(data, "e.swallow.content");
l = elm_box_children_get(bx);
n = strtol(ev->key, NULL, 10);
if (n > 0)
{
o = eina_list_nth(l, n - 1);
if (o)
_editor_style_click(data, NULL, o, NULL);
}
eina_list_free(l);
}
else if (eina_streq(ev->key, "Return") || eina_streq(ev->key, "KP_Enter"))
_editor_bryce_add(data);
}
else
_bryce_edit_key_location(data, ev);
return ECORE_CALLBACK_RENEW;
}
static void
_bryce_edit_end(void *data, Evas *e EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *event_info EINA_UNUSED)
{
e_bindings_disabled_set(0);
e_comp_ungrab_input(1, 1);
evas_object_hide(data);
evas_object_del(data);
E_FREE_FUNC(handler, ecore_event_handler_del);
}
E_API Evas_Object *
e_bryce_edit(Evas_Object *bryce)
{
Evas_Object *editor, *comp_object;
E_Zone *zone;
int x, y, w, h;
zone = e_zone_current_get();
x = zone->x, y = zone->y, w = zone->w, h = zone->h;
e_bindings_disabled_set(1);
editor = e_bryce_editor_add(e_comp->elm, bryce);
evas_object_geometry_set(editor, x, y, w, h);
comp_object = e_comp_object_util_add(editor, E_COMP_OBJECT_TYPE_NONE);
evas_object_event_callback_add(editor, EVAS_CALLBACK_DEL, _bryce_edit_end, comp_object);
evas_object_layer_set(comp_object, E_LAYER_POPUP);
evas_object_show(comp_object);
e_comp_object_util_autoclose(comp_object, NULL, e_comp_object_util_autoclose_on_escape, NULL);
e_comp_grab_input(1, 1);
handler = ecore_event_handler_add(ECORE_EVENT_KEY_UP, (Ecore_Event_Handler_Cb)_bryce_edit_key_handler, editor);
return comp_object;
}

@ -59,37 +59,6 @@ typedef struct _E_Color_Class
int r3, g3, b3, a3;
} E_Color_Class;
static void
_e_config_binding_mouse_add(E_Binding_Context ctxt, int button, E_Binding_Modifier mod, int any_mod, const char *action, const char *params)
{
E_Config_Binding_Mouse *binding;
binding = calloc(1, sizeof(E_Config_Binding_Mouse));
binding->context = ctxt;
binding->button = button;
binding->modifiers = mod;
binding->any_mod = any_mod;
binding->action = eina_stringshare_add(action);
binding->params = eina_stringshare_add(params);
e_bindings->mouse_bindings = eina_list_append(e_bindings->mouse_bindings, binding);
}
static void
_e_config_binding_wheel_add(E_Binding_Context ctxt, int direction, int z, E_Binding_Modifier mod, int any_mod, const char *action, const char *params)
{
E_Config_Binding_Wheel *binding;
binding = calloc(1, sizeof(E_Config_Binding_Wheel));
binding->context = ctxt;
binding->direction = direction;
binding->z = z;
binding->modifiers = mod;
binding->any_mod = any_mod;
binding->action = eina_stringshare_add(action);
binding->params = eina_stringshare_add(params);
e_bindings->wheel_bindings = eina_list_append(e_bindings->wheel_bindings, binding);
}
static Eina_Bool
_e_config_cb_efreet_cache_update(void *data EINA_UNUSED, int type EINA_UNUSED, void *ev EINA_UNUSED)
{
@ -1384,53 +1353,8 @@ e_config_load(void)
}
CONFIG_VERSION_CHECK(20)
{
Eina_List *l;
E_Config_Binding_Mouse *ebm;
E_Config_Module *em, *module;
CONFIG_VERSION_UPDATE_INFO(20);
EINA_LIST_FOREACH(e_bindings->mouse_bindings, l, ebm)
{
if (eina_streq(ebm->action, "window_move"))
{
_e_config_binding_mouse_add(E_BINDING_CONTEXT_ANY, ebm->button, ebm->modifiers,
ebm->any_mod, "gadget_move", NULL);
}
else if (eina_streq(ebm->action, "window_resize"))
{
_e_config_binding_mouse_add(E_BINDING_CONTEXT_ANY, ebm->button, ebm->modifiers,
ebm->any_mod, "gadget_resize", NULL);
}
else if (eina_streq(ebm->action, "window_menu"))
{
_e_config_binding_mouse_add(E_BINDING_CONTEXT_ANY, ebm->button, ebm->modifiers,
ebm->any_mod, "gadget_menu", NULL);
_e_config_binding_mouse_add(E_BINDING_CONTEXT_ANY, ebm->button, ebm->modifiers,
ebm->any_mod, "bryce_menu", NULL);
}
}
_e_config_binding_wheel_add(E_BINDING_CONTEXT_ANY, 0, 1, E_BINDING_MODIFIER_CTRL, 0, "bryce_resize", NULL);
_e_config_binding_wheel_add(E_BINDING_CONTEXT_ANY, 0, -1, E_BINDING_MODIFIER_CTRL, 0, "bryce_resize", NULL);
EINA_LIST_FOREACH(e_config->modules, l, em)
{
if (!em->enabled) continue;
if (eina_streq(em->name, "connman"))
{
module = E_NEW(E_Config_Module, 1);
module->name = eina_stringshare_add("wireless");
module->enabled = 1;
e_config->modules = eina_list_append(e_config->modules, module);
}
else if (eina_streq(em->name, "clock"))
{
module = E_NEW(E_Config_Module, 1);
module->name = eina_stringshare_add("time");
module->enabled = 1;
e_config->modules = eina_list_append(e_config->modules, module);
}
}
e_config_save_queue();
}
CONFIG_VERSION_CHECK(21)
@ -1558,23 +1482,7 @@ e_config_load(void)
}
CONFIG_VERSION_CHECK(28)
{
Eina_List *l, *ll;
E_Config_Binding_Mouse *ebm;
CONFIG_VERSION_UPDATE_INFO(28);
EINA_LIST_FOREACH_SAFE(e_bindings->mouse_bindings, l, ll, ebm)
{
if ((eina_streq(ebm->action, "gadget_menu")) ||
(eina_streq(ebm->action, "bryce_menu")))
{
e_bindings->mouse_bindings =
eina_list_remove_list
(e_bindings->mouse_bindings, l);
eina_stringshare_del(ebm->action);
eina_stringshare_del(ebm->params);
free(ebm);
}
}
e_config_save_queue();
}
CONFIG_VERSION_CHECK(29)
@ -2423,16 +2331,11 @@ e_config_bindings_free(E_Config_Bindings *ecb)
static void
_e_config_save_cb(void *data EINA_UNUSED)
{
EINTERN void e_gadget_save(void);
EINTERN void e_bryce_save(void);
e_config_profile_save();
e_module_save_all();
elm_config_save();
e_config_domain_save("e", _e_config_edd, e_config);
e_config_domain_save("e_bindings", _e_config_binding_edd, e_bindings);
e_gadget_save();
e_bryce_save();
_e_config_save_defer = NULL;
}

File diff suppressed because it is too large Load Diff

@ -1,155 +0,0 @@
#ifndef E_TYPEDEFS
#ifndef E_GADGET_H
# define E_GADGET_H
/** SMART CALLBACKS:
-------------------------------
* called by gadget site internals on gadget site object:
* have a gadget object as event_info
* {
"gadget_added"
- a new gadget was added to the gadget site by the user
"gadget_created"
- a gadget object was created on the site
"gadget_destroyed"
- a gadget object was destroyed on the site; all objects created by the
gadget infrastructure are now dead
- do not watch both this and EVAS_CALLBACK_DEL, as the ordering of these
callbacks is not consistent
"gadget_moved"
- a gadget is preparing to move from its current site
"gadget_removed"
- a gadget was removed from the gadget site by the user
- the gadget should remove its config when this is triggered
* }
* have NULL as event_info
* {
"gadget_site_anchor"
- the anchor of the gadget site changed
"gadget_site_gravity"
- the gravity of the gadget site changed
"gadget_site_locked"
- the gadget site's visibility has been locked (must be visible)
"gadget_site_unlocked"
- the gadget site's visibility has been unlocked (can be hidden)
* }
* have E_Menu as event_info
* {
"gadget_site_owner_menu"
- the owner (parent object) of the site should add any owner-specific items
in this callback (eg. settings)
"gadget_site_style_menu"
- the owner (parent object) of the site should add any style-specific items
in this callback (eg. plain, inset)
* }
* have Evas_Object as event_info
* {
"gadget_site_popup"
- a popup has been triggered from the site; the site must remain visible until
the passed popup object has been hidden
- event_info is the Evas_Object of the popup
* }
-------------------------------
-------------------------------
* called externally on gadget site
"gadget_site_dropped"
- called on a target site when a gadget site is dropped on it
- event_info is the dropped site
- all gadgets on the dropped site will be moved to the target site
"gadget_site_style"
- called on a target site when its owner has executed a style change
- event_info is NULL
- triggers restyling of all contained gadgets
-------------------------------
-------------------------------
* called by gadget internals on gadget object:
"gadget_menu"
- called on a gadget object when the "gadget_menu" action has been triggered
- event_info is an E_Menu object
- if a configure callback has been passed with e_gadget_configure_cb_set(),
a "Settings" item will be automatically added with this callback
"gadget_reparent"
- called on a gadget object when the gadget has been reparented
- parent object is event_info
- indicates that the gadget should watch this new object for EVAS_CALLBACK_RESIZE
- event_info will be NULL in the case that the reparenting removes the parent
-------------------------------
-------------------------------
* called externally by gadget on gadget object:
"gadget_popup"
- called on a gadget object by the gadget when the gadget creates a popup which
requires that the gadget remain visible for the lifetime of the popup
- event_info is the Evas_Object of the popup
*/
#include "e_gadget_types.h"
typedef Evas_Object *(*E_Gadget_Create_Cb)(Evas_Object *parent, int *id, E_Gadget_Site_Orient orient);
typedef Evas_Object *(*E_Gadget_External_Create_Cb)(Evas_Object *parent, const char *type, int *id, E_Gadget_Site_Orient orient);
typedef Evas_Object *(*E_Gadget_Configure_Cb)(Evas_Object *gadget);
typedef void (*E_Gadget_Menu_Populate_Cb)(Evas_Object *gadget, E_Menu *m);
typedef void (*E_Gadget_Context_Cb)(Evas_Object *site, Evas_Object *g, unsigned int timestamp);
typedef void (*E_Gadget_Wizard_End_Cb)(void *data, int id);
typedef Evas_Object *(*E_Gadget_Wizard_Cb)(E_Gadget_Wizard_End_Cb cb, void *data, Evas_Object *site);
typedef Evas_Object *(*E_Gadget_External_Wizard_Cb)(E_Gadget_Wizard_End_Cb cb, void *data, const char *type, Evas_Object *site);
typedef void (*E_Gadget_Style_Cb)(Evas_Object *owner, Eina_Stringshare *name, Evas_Object *g);
typedef char *(*E_Gadget_External_Name_Cb)(const char *type);
EINTERN void e_gadget_init(void);
EINTERN void e_gadget_shutdown(void);
EINTERN void e_gadget_site_rename(const char *name, const char *newname);
E_API Evas_Object *e_gadget_site_add(E_Gadget_Site_Orient orient, const char *name);
E_API Evas_Object *e_gadget_site_auto_add(E_Gadget_Site_Orient orient, const char *name);
E_API void e_gadget_site_del(Evas_Object *obj);
E_API E_Gadget_Site_Anchor e_gadget_site_anchor_get(Evas_Object *obj);
E_API void e_gadget_site_owner_setup(Evas_Object *obj, E_Gadget_Site_Anchor an, E_Gadget_Style_Cb cb, E_Gadget_Context_Cb context_cb, E_Gadget_Context_Cb context_cancel_cb);
E_API E_Gadget_Site_Orient e_gadget_site_orient_get(Evas_Object *obj);
E_API E_Gadget_Site_Gravity e_gadget_site_gravity_get(Evas_Object *obj);
E_API void e_gadget_site_gravity_set(Evas_Object *obj, E_Gadget_Site_Gravity gravity);
E_API void e_gadget_site_gadget_add(Evas_Object *obj, const char *type, Eina_Bool demo);
E_API void e_gadget_site_gadget_external_add(Evas_Object *obj, const char *domain, const char *type, Eina_Bool demo);
E_API Eina_List *e_gadget_site_gadgets_list(Evas_Object *obj);
E_API Eina_Bool e_gadget_site_is_desklock(Evas_Object *obj);
E_API void e_gadget_configure_cb_set(Evas_Object *g, E_Gadget_Configure_Cb cb);
E_API void e_gadget_configure(Evas_Object *g);
E_API void e_gadget_menu_populate_cb_set(Evas_Object *g, E_Gadget_Menu_Populate_Cb cb);
E_API void e_gadget_menu_populate(Evas_Object *g, E_Menu *m);
E_API Evas_Object *e_gadget_site_get(Evas_Object *g);
E_API Eina_Stringshare *e_gadget_type_get(Evas_Object *g);
E_API void e_gadget_type_add(const char *type, E_Gadget_Create_Cb callback, E_Gadget_Wizard_Cb wizard);
E_API void e_gadget_type_del(const char *type);
E_API void e_gadget_external_type_add(const char *domain, const char *type, E_Gadget_External_Create_Cb callback, E_Gadget_External_Wizard_Cb wizard);
E_API void e_gadget_external_type_del(const char *domain, const char *type);
E_API void e_gadget_external_type_name_cb_set(const char *domain, const char *type, E_Gadget_External_Name_Cb name);
E_API Eina_Iterator *e_gadget_type_iterator_get(void);
/* delete a gadget and its config */
E_API void e_gadget_del(Evas_Object *g);
/* drop region initially matches gadget size, resizes to match returned object's size
* handler is removed when returned object is deleted
*/
E_API Evas_Object *e_gadget_drop_handler_add(Evas_Object *g, void *data,
void (*enter_cb)(void *data, const char *type, void *event),
void (*move_cb)(void *data, const char *type, void *event),
void (*leave_cb)(void *data, const char *type, void *event),
void (*drop_cb)(void *data, const char *type, void *event),
const char **types, unsigned int num_types);
E_API Evas_Object *e_gadget_util_layout_style_init(Evas_Object *g, Evas_Object *style);
E_API void e_gadget_util_ctxpopup_place(Evas_Object *g, Evas_Object *ctx, Evas_Object *pos_obj);
E_API void e_gadget_util_allow_deny_ctxpopup(Evas_Object *g, const char *text, Evas_Smart_Cb allow_cb, Evas_Smart_Cb deny_cb, const void *data);
E_API Evas_Object *e_gadget_editor_add(Evas_Object *parent, Evas_Object *site);
E_API Evas_Object *e_gadget_site_edit(Evas_Object *site);
E_API void e_gadget_site_desklock_edit(void);
E_API void e_gadget_site_desktop_edit(Evas_Object *site);
#endif
#endif

@ -1,354 +0,0 @@
#include "config.h"
#define EFL_BETA_API_SUPPORT
#include <Ecore_Wl2.h>
#include <Elementary.h>
#include <dlfcn.h>
#include "e-gadget-client-protocol.h"
#include "action_route-client-protocol.h"
#include <uuid.h>
static Ecore_Event_Handler *handler;
static Eina_Hash *wins;
static Eina_Hash *gadget_globals;
static Eina_Hash *ar_globals;
static Eina_Hash *display_actions;
static Eina_List *tooltips;
typedef struct Gadget_Action
{
Ecore_Wl2_Display *d;
Eina_Stringshare *action;
char handle[37];
Eina_List *requestors;
struct action_route_bind *ar_bind;
} Gadget_Action;
static inline Ecore_Wl2_Display *
win_display_get(Evas_Object *win)
{
Ecore_Wl2_Window *ww;
ww = elm_win_wl_window_get(win);
return ecore_wl2_window_display_get(ww);
}
static void
win_emit(Ecore_Wl2_Display *d, const char *sig, uint32_t val)
{
Evas_Object *win;
win = eina_list_data_get(eina_hash_find(wins, &d));
evas_object_smart_callback_call(win, sig, (uintptr_t*)(uintptr_t)val);
}
static void
_gadget_anchor(void *data, struct e_gadget *e_gadget EINA_UNUSED, uint32_t anchor)
{
win_emit(data, "gadget_site_anchor", anchor);
}
static void
_gadget_orient(void *data, struct e_gadget *e_gadget EINA_UNUSED, uint32_t orient)
{
win_emit(data, "gadget_site_orient", orient);
}
static void
_gadget_gravity(void *data, struct e_gadget *e_gadget EINA_UNUSED, uint32_t gravity)
{
win_emit(data, "gadget_site_gravity", gravity);
}
static void
_gadget_configure(void *data, struct e_gadget *e_gadget EINA_UNUSED)
{
Evas_Object *win;
win = eina_list_data_get(eina_hash_find(wins, &data));
evas_object_smart_callback_call(win, "gadget_configure", NULL);
}
static const struct e_gadget_listener _gadget_listener =
{
_gadget_anchor,
_gadget_orient,
_gadget_gravity,
_gadget_configure,
};
static void
_gadget_global_bind(Ecore_Wl2_Display *d, uint32_t id)
{
Eina_List *l;
Evas_Object *tt;
struct e_gadget *gadget_global = wl_registry_bind(ecore_wl2_display_registry_get(d), id, &e_gadget_interface, 1);
e_gadget_add_listener(gadget_global, &_gadget_listener, d);
eina_hash_add(gadget_globals, &d, gadget_global);
EINA_LIST_FOREACH(tooltips, l, tt)
e_gadget_set_tooltip(gadget_global, ecore_wl2_window_surface_get(elm_win_wl_window_get(tt)));
ecore_wl2_display_flush(d);
}
static void
_ar_global_bind(Ecore_Wl2_Display *d, uint32_t id)
{
struct action_route *ar_global = wl_registry_bind(ecore_wl2_display_registry_get(d), id, &action_route_interface, 1);
eina_hash_add(ar_globals, &d, ar_global);
ecore_wl2_display_flush(d);
}
static Eina_Bool
_global_added(void *d EINA_UNUSED, int t EINA_UNUSED, Ecore_Wl2_Event_Global *ev)
{
if (eina_streq(ev->interface, "e_gadget"))
_gadget_global_bind(ev->display, ev->id);
else if (eina_streq(ev->interface, "action_route"))
_ar_global_bind(ev->display, ev->id);
return ECORE_CALLBACK_RENEW;
}
static void
_gadget_init(Ecore_Wl2_Display *d)
{
Eina_Iterator *it;
Ecore_Wl2_Global *g;
if (wins)
{
if (eina_hash_find(gadget_globals, &d)) return;
}
else
{
gadget_globals = eina_hash_pointer_new(NULL);
ar_globals = eina_hash_pointer_new(NULL);
}
it = ecore_wl2_display_globals_get(d);
EINA_ITERATOR_FOREACH(it, g)
{
if (eina_streq(g->interface, "e_gadget"))
_gadget_global_bind(d, g->id);
else if (eina_streq(g->interface, "action_route"))
_ar_global_bind(d, g->id);
}
eina_iterator_free(it);
if (!handler)
handler = ecore_event_handler_add(ECORE_WL2_EVENT_GLOBAL_ADDED, (Ecore_Event_Handler_Cb)_global_added, NULL);
}
static void
_ar_bind_activate(void *data, Evas_Object *obj EINA_UNUSED, void *event_info)
{
const char *params = event_info;
Gadget_Action *ga = data;
if (params && (!params[0])) params = NULL;
action_route_bind_activate(ga->ar_bind, params);
ecore_wl2_display_flush(ga->d);
}
static void
_ar_bind_del(Gadget_Action *ga)
{
Evas_Object *r;
eina_stringshare_del(ga->action);
EINA_LIST_FREE(ga->requestors, r)
evas_object_smart_callback_del_full(r, ga->handle, _ar_bind_activate, ga);
free(ga);
}
static void
_ar_bind_end(void *data, struct action_route_bind *action_route_bind EINA_UNUSED)
{
Gadget_Action *ga = data;
Eina_List *l;
Evas_Object *r;
EINA_LIST_FOREACH(ga->requestors, l, r)
evas_object_smart_callback_call(r, "gadget_action_end", ga->handle);
}
static void
_ar_bind_status(void *data, struct action_route_bind *action_route_bind, uint32_t state)
{
uuid_t u;
Gadget_Action *ga = data;
Evas_Object *r;
if (state == ACTION_ROUTE_BIND_STATE_REJECTED)
{
Eina_Hash *h;
Eina_List *l;
h = eina_hash_find(display_actions, &ga->d);
EINA_LIST_FOREACH(ga->requestors, l, r)
{
if (ga->handle[0])
evas_object_smart_callback_call(r, "gadget_action_deleted", ga->handle);
else
evas_object_smart_callback_call(r, "gadget_action", NULL);
}
eina_hash_del_by_key(h, ga->action);
return;
}
uuid_generate(u);
uuid_unparse_lower(u, ga->handle);
ga->ar_bind = action_route_bind;
r = eina_list_data_get(ga->requestors);
evas_object_smart_callback_add(r, ga->handle, _ar_bind_activate, ga);
evas_object_smart_callback_call(r, "gadget_action", ga->handle);
}
static const struct action_route_bind_listener _ar_bind_interface =
{
_ar_bind_status,
_ar_bind_end
};
static void
uriopen_request(void *data, Evas_Object *obj EINA_UNUSED, void *event_info)
{
Ecore_Wl2_Display *d = data;
const char *uri = event_info;
struct e_gadget *gadget_global = eina_hash_find(gadget_globals, &d);
e_gadget_open_uri(gadget_global, uri);
ecore_wl2_display_flush(d);
}
static void
action_request(void *data, Evas_Object *obj, void *event_info)
{
Gadget_Action *ga;
const char *action = event_info;
Ecore_Wl2_Display *d = data;
void *ar_global;
struct action_route_bind *ar_bind;
Eina_Hash *h;
if ((!action) || (!action[0]))
{
evas_object_smart_callback_call(obj, "gadget_action", NULL);
return;
}
if (display_actions)
{
h = eina_hash_find(display_actions, &d);
if (h)
{
ga = eina_hash_find(h, action);
if (ga && (!eina_list_data_find(ga->requestors, obj)))
{
ga->requestors = eina_list_append(ga->requestors, obj);
evas_object_smart_callback_add(obj, ga->handle, _ar_bind_activate, ga);
}
evas_object_smart_callback_call(obj, "gadget_action", ga ? ga->handle : NULL);
return;
}
}
ar_global = eina_hash_find(ar_globals, &d);
if (!ar_global)
{
evas_object_smart_callback_call(obj, "gadget_action", NULL);
return;
}
ga = calloc(1, sizeof(Gadget_Action));
ga->d = d;
ga->requestors = eina_list_append(ga->requestors, obj);
ga->action = eina_stringshare_add(action);
if (!display_actions)
display_actions = eina_hash_string_superfast_new(NULL);
h = eina_hash_find(display_actions, &d);
if (!h)
{
h = eina_hash_pointer_new((Eina_Free_Cb)_ar_bind_del);
eina_hash_add(display_actions, &d, h);
}
ar_bind = action_route_bind_action(ar_global, action);
action_route_bind_add_listener(ar_bind, &_ar_bind_interface, ga);
wl_display_roundtrip(ecore_wl2_display_get(d));
}
static void
win_del(void *data EINA_UNUSED, Evas *e EINA_UNUSED, Evas_Object *obj, void *event_info EINA_UNUSED)
{
Ecore_Wl2_Display *d = win_display_get(obj);
eina_hash_list_remove(wins, &d, obj);
tooltips = eina_list_remove(tooltips, obj);
}
static void
_tooltip_resize(void *data EINA_UNUSED, Evas *e EINA_UNUSED, Evas_Object *obj, void *event_info EINA_UNUSED)
{
int w, h;
evas_object_geometry_get(obj, NULL, NULL, &w, &h);
evas_object_size_hint_aspect_set(obj, EVAS_ASPECT_CONTROL_BOTH, w, h);
}
static Evas_Object *
win_add(Evas_Object *win)
{
Ecore_Wl2_Display *d;
Eina_Bool first;
if (!win) return NULL;
d = win_display_get(win);
_gadget_init(d);
if (elm_win_type_get(win) == ELM_WIN_TOOLTIP)
{
tooltips = eina_list_append(tooltips, win);
evas_object_event_callback_add(win, EVAS_CALLBACK_RESIZE, _tooltip_resize, d);
if (eina_hash_population(gadget_globals))
{
struct e_gadget *gadget_global = eina_hash_find(gadget_globals, &d);
if (gadget_global)
e_gadget_set_tooltip(gadget_global, ecore_wl2_window_surface_get(elm_win_wl_window_get(win)));
}
}
if (!wins)
wins = eina_hash_pointer_new(NULL);
first = !eina_hash_find(wins, &d);
eina_hash_list_append(wins, &d, win);
if (first)
{
evas_object_smart_callback_add(win, "gadget_action_request", action_request, d);
evas_object_smart_callback_add(win, "gadget_open_uri", uriopen_request, d);
}
evas_object_event_callback_add(win, EVAS_CALLBACK_DEL, win_del, NULL);
elm_win_borderless_set(win, 1);
return win;
}
int
eina_init(void)
{
int (*_eina_init)(void) = dlsym(RTLD_NEXT, __func__);
if (wins) return _eina_init();
if (getenv("RUNNER_DEBUG")) raise(SIGSTOP);
return _eina_init();
}
Evas_Object *
elm_win_util_dialog_add(Evas_Object *parent, const char *name, const char *title)
{
Evas_Object *(*_elm_win_util_dialog_add)(Evas_Object *, const char *, const char *) = dlsym(RTLD_NEXT, __func__);
return win_add(_elm_win_util_dialog_add(parent, name, title));
}
Evas_Object *
elm_win_util_standard_add(const char *name, const char *title)
{
Evas_Object *(*_elm_win_util_standard_add)(const char *, const char *) = dlsym(RTLD_NEXT, __func__);
return win_add(_elm_win_util_standard_add(name, title));
}
Evas_Object *
elm_win_add(Evas_Object *parent, const char *name, Elm_Win_Type type)
{
Evas_Object *(*_elm_win_add)(Evas_Object *,const char*, Elm_Win_Type) = dlsym(RTLD_NEXT, __func__);
return win_add(_elm_win_add(parent, name, type));
}

File diff suppressed because it is too large Load Diff

@ -1,30 +0,0 @@
#ifndef E_GADGET_TYPES_H
# define E_GADGET_TYPES_H
typedef enum
{
E_GADGET_SITE_GRAVITY_NONE = 0,
E_GADGET_SITE_GRAVITY_LEFT,
E_GADGET_SITE_GRAVITY_RIGHT,
E_GADGET_SITE_GRAVITY_TOP,
E_GADGET_SITE_GRAVITY_BOTTOM,
E_GADGET_SITE_GRAVITY_CENTER,
} E_Gadget_Site_Gravity;
typedef enum
{
E_GADGET_SITE_ORIENT_NONE = 0,
E_GADGET_SITE_ORIENT_HORIZONTAL,
E_GADGET_SITE_ORIENT_VERTICAL,
} E_Gadget_Site_Orient;
typedef enum
{
E_GADGET_SITE_ANCHOR_NONE = 0,
E_GADGET_SITE_ANCHOR_LEFT = (1 << 0),
E_GADGET_SITE_ANCHOR_RIGHT = (1 << 1),
E_GADGET_SITE_ANCHOR_TOP = (1 << 2),
E_GADGET_SITE_ANCHOR_BOTTOM = (1 << 3),
} E_Gadget_Site_Anchor;
#endif

@ -152,8 +152,6 @@
#include "e_utils.h"
#include "e_hints.h"
#include "e_comp_x_randr.h"
#include "e_gadget.h"
#include "e_bryce.h"
#ifdef HAVE_WAYLAND
# include "e_comp_wl.h"

@ -93,18 +93,6 @@ _e_int_menus_wallpaper_cb()
e_configure_registry_call("appearance/wallpaper", NULL, NULL);
}
static void
_e_int_menus_bryce_cb()
{
e_bryce_edit(NULL);
}
static void