diff options
author | Mike Blumenkrantz <zmike@osg.samsung.com> | 2014-11-02 21:35:13 -0500 |
---|---|---|
committer | Mike Blumenkrantz <zmike@osg.samsung.com> | 2014-11-20 15:26:21 -0500 |
commit | 99589eb5af346add9fe912a768ed006416cb2220 (patch) | |
tree | 3521b29b0c2869618da4ab669780ba50315208b5 | |
parent | caf521875c85115014e33b3b0ca611f69cfd5d4b (diff) | |
download | enlightenment-99589eb5af346add9fe912a768ed006416cb2220.tar.gz |
remove E_Win+e_canvas, convert all internal wins to use elm_win
known issues:
* keybindings for efm windows (eg. ctrl+w) are broken until the rest of the conversion is completed
214 files changed, 1384 insertions, 2351 deletions
diff --git a/po/POTFILES.in b/po/POTFILES.in index 65c51156f3..322891ad93 100644 --- a/po/POTFILES.in +++ b/po/POTFILES.in @@ -5,7 +5,6 @@ src/bin/e_atoms.c src/bin/e_bg.c src/bin/e_bindings.c src/bin/e_box.c -src/bin/e_canvas.c src/bin/e_client.c src/bin/e_color.c src/bin/e_color_class.c diff --git a/src/bin/Makefile.mk b/src/bin/Makefile.mk index b6905834f1..47d8bbc1a9 100644 --- a/src/bin/Makefile.mk +++ b/src/bin/Makefile.mk @@ -48,7 +48,6 @@ src/bin/e_backlight.h \ src/bin/e_bg.h \ src/bin/e_bindings.h \ src/bin/e_box.h \ -src/bin/e_canvas.h \ src/bin/e_client.h \ src/bin/e_client.x \ src/bin/e_color_class.h \ @@ -222,7 +221,6 @@ src/bin/e_backlight.c \ src/bin/e_bg.c \ src/bin/e_bindings.c \ src/bin/e_box.c \ -src/bin/e_canvas.c \ src/bin/e_client.c \ src/bin/e_color.c \ src/bin/e_color_class.c \ diff --git a/src/bin/e.h b/src/bin/e.h index dacfbaa753..f8294c2f80 100644 --- a/src/bin/e.h +++ b/src/bin/e.h @@ -267,6 +267,11 @@ typedef struct _E_Rect E_Rect; } \ } +#define WEIGHT evas_object_size_hint_weight_set +#define ALIGN evas_object_size_hint_align_set +#define EXPAND(X) WEIGHT((X), EVAS_HINT_EXPAND, EVAS_HINT_EXPAND) +#define FILL(X) ALIGN((X), EVAS_HINT_FILL, EVAS_HINT_FILL) + # define E_REMOTE_OPTIONS 1 # define E_REMOTE_OUT 2 # define E_WM_IN 3 diff --git a/src/bin/e_actions.c b/src/bin/e_actions.c index 283626e7d4..6f89aac715 100644 --- a/src/bin/e_actions.c +++ b/src/bin/e_actions.c @@ -327,12 +327,9 @@ _e_actions_cb_kill_dialog_cancel(void *data __UNUSED__, E_Dialog *dia __UNUSED__ } static void -_e_actions_cb_kill_dialog_delete(E_Win *win) +_e_actions_cb_kill_dialog_delete(void *data, Evas *e EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *event_info EINA_UNUSED) { - E_Dialog *dia; - - dia = win->data; - _e_actions_cb_kill_dialog_cancel(NULL, dia); + _e_actions_cb_kill_dialog_cancel(NULL, data); } ACT_FN_GO(window_kill, __UNUSED__) @@ -364,8 +361,8 @@ ACT_FN_GO(window_kill, __UNUSED__) kill_dialog = e_dialog_new(NULL, "E", "_kill_dialog"); if (!kill_dialog) return; - e_win_delete_callback_set(kill_dialog->win, - _e_actions_cb_kill_dialog_delete); + evas_object_event_callback_add(kill_dialog->win, EVAS_CALLBACK_DEL, + _e_actions_cb_kill_dialog_delete, kill_dialog); e_dialog_title_set(kill_dialog, _("Are you sure you want to kill this window?")); e_dialog_text_set(kill_dialog, _(dialog_text)); @@ -375,7 +372,7 @@ ACT_FN_GO(window_kill, __UNUSED__) e_dialog_button_add(kill_dialog, _("No"), NULL, _e_actions_cb_kill_dialog_cancel, NULL); e_dialog_button_focus_num(kill_dialog, 1); - e_win_centered_set(kill_dialog->win, 1); + elm_win_center(kill_dialog->win, 1, 1); e_dialog_show(kill_dialog); } @@ -1364,8 +1361,8 @@ _e_actions_zone_get(E_Object *obj) return ((E_Client *)obj)->zone; else if (obj->type == (int)E_SHELF_TYPE) return ((E_Shelf *)obj)->zone; - else if (obj->type == (int)E_WIN_TYPE) - return ((E_Win *)obj)->client->zone; + else if (e_obj_is_win(obj)) + return e_win_client_get((void*)obj)->zone; } return e_util_zone_current_get(e_manager_current_get()); } @@ -2050,12 +2047,9 @@ _e_actions_cb_exit_dialog_cancel(void *data __UNUSED__, E_Dialog *dia __UNUSED__ } static void -_e_actions_cb_exit_dialog_delete(E_Win *win) +_e_actions_cb_exit_dialog_delete(void *data, Evas *e EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *event_info EINA_UNUSED) { - E_Dialog *dia; - - dia = win->data; - _e_actions_cb_exit_dialog_cancel(NULL, dia); + _e_actions_cb_exit_dialog_cancel(NULL, data); } ACT_FN_GO(exit, ) @@ -2075,7 +2069,7 @@ ACT_FN_GO(exit, ) exit_dialog = e_dialog_new(NULL, "E", "_exit_dialog"); if (!exit_dialog) return; - e_win_delete_callback_set(exit_dialog->win, _e_actions_cb_exit_dialog_delete); + evas_object_event_callback_add(exit_dialog->win, EVAS_CALLBACK_DEL, _e_actions_cb_exit_dialog_delete, exit_dialog); e_dialog_title_set(exit_dialog, _("Exit")); e_dialog_text_set(exit_dialog, _("Are you sure you want to exit Enlightenment?")); e_dialog_icon_set(exit_dialog, "application-exit", 64); @@ -2084,7 +2078,7 @@ ACT_FN_GO(exit, ) e_dialog_button_add(exit_dialog, _("No"), NULL, _e_actions_cb_exit_dialog_cancel, NULL); e_dialog_button_focus_num(exit_dialog, 1); - e_win_centered_set(exit_dialog->win, 1); + elm_win_center(exit_dialog->win, 1, 1); e_dialog_show(exit_dialog); } @@ -2144,12 +2138,9 @@ _e_actions_cb_logout_dialog_cancel(void *data __UNUSED__, E_Dialog *dia __UNUSED } static void -_e_actions_cb_logout_dialog_delete(E_Win *win) +_e_actions_cb_logout_dialog_delete(void *data, Evas *e EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *event_info EINA_UNUSED) { - E_Dialog *dia; - - dia = win->data; - _e_actions_cb_logout_dialog_cancel(NULL, dia); + _e_actions_cb_logout_dialog_cancel(NULL, data); } ACT_FN_GO(logout, ) @@ -2169,7 +2160,7 @@ ACT_FN_GO(logout, ) logout_dialog = e_dialog_new(NULL, "E", "_logout_dialog"); if (!logout_dialog) return; - e_win_delete_callback_set(logout_dialog->win, _e_actions_cb_logout_dialog_delete); + evas_object_event_callback_add(logout_dialog->win, EVAS_CALLBACK_DEL, _e_actions_cb_logout_dialog_delete, logout_dialog); e_dialog_title_set(logout_dialog, _("Logout")); e_dialog_text_set(logout_dialog, _("Are you sure you want to logout?")); e_dialog_icon_set(logout_dialog, "system-log-out", 64); @@ -2178,7 +2169,7 @@ ACT_FN_GO(logout, ) e_dialog_button_add(logout_dialog, _("No"), NULL, _e_actions_cb_logout_dialog_cancel, NULL); e_dialog_button_focus_num(logout_dialog, 1); - e_win_centered_set(logout_dialog->win, 1); + elm_win_center(logout_dialog->win, 1, 1); e_dialog_show(logout_dialog); } @@ -2204,7 +2195,7 @@ _e_actions_cb_halt_dialog_cancel(void *data __UNUSED__, E_Dialog *dia __UNUSED__ } static void -_e_actions_cb_halt_dialog_delete(E_Win *win __UNUSED__) +_e_actions_cb_halt_dialog_delete(void *data EINA_UNUSED, Evas *e EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *event_info EINA_UNUSED) { if (!halt_dialog) return; e_object_del(E_OBJECT(halt_dialog)); @@ -2228,7 +2219,7 @@ ACT_FN_GO(halt, ) halt_dialog = e_dialog_new(NULL, "E", "_halt_dialog"); if (!halt_dialog) return; - e_win_delete_callback_set(halt_dialog->win, _e_actions_cb_halt_dialog_delete); + evas_object_event_callback_add(halt_dialog->win, EVAS_CALLBACK_DEL, _e_actions_cb_halt_dialog_delete, halt_dialog); e_dialog_title_set(halt_dialog, _("Power off")); e_dialog_text_set(halt_dialog, _("Are you sure you want to power off your computer?")); @@ -2238,7 +2229,7 @@ ACT_FN_GO(halt, ) e_dialog_button_add(halt_dialog, _("No"), NULL, _e_actions_cb_halt_dialog_cancel, NULL); e_dialog_button_focus_num(halt_dialog, 1); - e_win_centered_set(halt_dialog->win, 1); + elm_win_center(halt_dialog->win, 1, 1); e_dialog_show(halt_dialog); } @@ -2264,12 +2255,9 @@ _e_actions_cb_reboot_dialog_cancel(void *data __UNUSED__, E_Dialog *dia __UNUSED } static void -_e_actions_cb_reboot_dialog_delete(E_Win *win) +_e_actions_cb_reboot_dialog_delete(void *data, Evas *e EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *event_info EINA_UNUSED) { - E_Dialog *dia; - - dia = win->data; - _e_actions_cb_reboot_dialog_cancel(NULL, dia); + _e_actions_cb_reboot_dialog_cancel(NULL, data); } ACT_FN_GO(reboot, ) @@ -2289,7 +2277,7 @@ ACT_FN_GO(reboot, ) reboot_dialog = e_dialog_new(NULL, "E", "_reboot_dialog"); if (!reboot_dialog) return; - e_win_delete_callback_set(reboot_dialog->win, _e_actions_cb_reboot_dialog_delete); + evas_object_event_callback_add(reboot_dialog->win, EVAS_CALLBACK_DEL, _e_actions_cb_reboot_dialog_delete, reboot_dialog); e_dialog_title_set(reboot_dialog, _("Reboot")); e_dialog_text_set(reboot_dialog, _("Are you sure you want to reboot your computer?")); e_dialog_icon_set(reboot_dialog, "system-restart", 64); @@ -2298,7 +2286,7 @@ ACT_FN_GO(reboot, ) e_dialog_button_add(reboot_dialog, _("No"), NULL, _e_actions_cb_reboot_dialog_cancel, NULL); e_dialog_button_focus_num(reboot_dialog, 1); - e_win_centered_set(reboot_dialog->win, 1); + elm_win_center(reboot_dialog->win, 1, 1); e_dialog_show(reboot_dialog); } @@ -2324,12 +2312,9 @@ _e_actions_cb_suspend_dialog_cancel(void *data __UNUSED__, E_Dialog *dia __UNUSE } static void -_e_actions_cb_suspend_dialog_delete(E_Win *win) +_e_actions_cb_suspend_dialog_delete(void *data, Evas *e EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *event_info EINA_UNUSED) { - E_Dialog *dia; - - dia = win->data; - _e_actions_cb_suspend_dialog_cancel(NULL, dia); + _e_actions_cb_suspend_dialog_cancel(NULL, data); } ACT_FN_GO(suspend_now, __UNUSED__) @@ -2354,7 +2339,7 @@ ACT_FN_GO(suspend, ) suspend_dialog = e_dialog_new(NULL, "E", "_suspend_dialog"); if (!suspend_dialog) return; - e_win_delete_callback_set(suspend_dialog->win, _e_actions_cb_suspend_dialog_delete); + evas_object_event_callback_add(suspend_dialog->win, EVAS_CALLBACK_DEL, _e_actions_cb_suspend_dialog_delete, suspend_dialog); e_dialog_title_set(suspend_dialog, _("Suspend")); e_dialog_text_set(suspend_dialog, _("Are you sure you want to suspend your computer?")); e_dialog_icon_set(suspend_dialog, "system-suspend", 64); @@ -2363,7 +2348,7 @@ ACT_FN_GO(suspend, ) e_dialog_button_add(suspend_dialog, _("No"), NULL, _e_actions_cb_suspend_dialog_cancel, NULL); e_dialog_button_focus_num(suspend_dialog, 1); - e_win_centered_set(suspend_dialog->win, 1); + elm_win_center(suspend_dialog->win, 1, 1); e_dialog_show(suspend_dialog); } @@ -2389,12 +2374,9 @@ _e_actions_cb_hibernate_dialog_cancel(void *data __UNUSED__, E_Dialog *dia __UNU } static void -_e_actions_cb_hibernate_dialog_delete(E_Win *win) +_e_actions_cb_hibernate_dialog_delete(void *data, Evas *e EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *event_info EINA_UNUSED) { - E_Dialog *dia; - - dia = win->data; - _e_actions_cb_hibernate_dialog_cancel(NULL, dia); + _e_actions_cb_hibernate_dialog_cancel(NULL, data); } ACT_FN_GO(hibernate_now, __UNUSED__) @@ -2419,7 +2401,7 @@ ACT_FN_GO(hibernate, ) hibernate_dialog = e_dialog_new(NULL, "E", "_hibernate_dialog"); if (!hibernate_dialog) return; - e_win_delete_callback_set(hibernate_dialog->win, _e_actions_cb_hibernate_dialog_delete); + evas_object_event_callback_add(hibernate_dialog->win, EVAS_CALLBACK_DEL, _e_actions_cb_hibernate_dialog_delete, hibernate_dialog); e_dialog_title_set(hibernate_dialog, _("Hibernate")); e_dialog_text_set(hibernate_dialog, _("Are you sure you want to hibernate your computer?")); e_dialog_icon_set(hibernate_dialog, "system-suspend-hibernate", 64); @@ -2428,7 +2410,7 @@ ACT_FN_GO(hibernate, ) e_dialog_button_add(hibernate_dialog, _("No"), NULL, _e_actions_cb_hibernate_dialog_cancel, NULL); e_dialog_button_focus_num(hibernate_dialog, 1); - e_win_centered_set(hibernate_dialog->win, 1); + elm_win_center(hibernate_dialog->win, 1, 1); e_dialog_show(hibernate_dialog); } diff --git a/src/bin/e_canvas.c b/src/bin/e_canvas.c deleted file mode 100644 index 950388c6e4..0000000000 --- a/src/bin/e_canvas.c +++ /dev/null @@ -1,197 +0,0 @@ -#include "e.h" - -/* local subsystem functions */ -static Eina_Bool _e_canvas_cb_flush(void *data); - -/* local subsystem globals */ -static Eina_List *_e_canvases = NULL; -static Ecore_Poller *_e_canvas_cache_flush_poller = NULL; - -/* externally accessible functions */ -EAPI void -e_canvas_add(Ecore_Evas *ee) -{ - Evas *e; - - _e_canvases = eina_list_prepend(_e_canvases, ee); - e = ecore_evas_get(ee); - evas_image_cache_set(e, e_config->image_cache * 1024); - evas_font_cache_set(e, e_config->font_cache * 1024); - e_path_evas_append(path_fonts, e); - if (e_config->font_hinting == 0) - { - if (evas_font_hinting_can_hint(e, EVAS_FONT_HINTING_BYTECODE)) - evas_font_hinting_set(e, EVAS_FONT_HINTING_BYTECODE); - else if (evas_font_hinting_can_hint(e, EVAS_FONT_HINTING_AUTO)) - evas_font_hinting_set(e, EVAS_FONT_HINTING_AUTO); - else - evas_font_hinting_set(e, EVAS_FONT_HINTING_NONE); - } - else if (e_config->font_hinting == 1) - { - if (evas_font_hinting_can_hint(e, EVAS_FONT_HINTING_AUTO)) - evas_font_hinting_set(e, EVAS_FONT_HINTING_AUTO); - else - evas_font_hinting_set(e, EVAS_FONT_HINTING_NONE); - } - else if (e_config->font_hinting == 2) - evas_font_hinting_set(e, EVAS_FONT_HINTING_NONE); -} - -EAPI void -e_canvas_del(Ecore_Evas *ee) -{ - _e_canvases = eina_list_remove(_e_canvases, ee); -} - -EAPI void -e_canvas_recache(void) -{ - Eina_List *l; - Ecore_Evas *ee; - - EINA_LIST_FOREACH(_e_canvases, l, ee) - { - Evas *e; - - e = ecore_evas_get(ee); - evas_image_cache_set(e, e_config->image_cache * 1024); - evas_font_cache_set(e, e_config->font_cache * 1024); - } - edje_file_cache_set(e_config->edje_cache); - edje_collection_cache_set(e_config->edje_collection_cache); - if (_e_canvas_cache_flush_poller) - { - ecore_poller_del(_e_canvas_cache_flush_poller); - _e_canvas_cache_flush_poller = NULL; - } - if (e_config->cache_flush_poll_interval > 0) - { - _e_canvas_cache_flush_poller = - ecore_poller_add(ECORE_POLLER_CORE, - e_config->cache_flush_poll_interval, - _e_canvas_cb_flush, NULL); - } -} - -EAPI void -e_canvas_cache_flush(void) -{ - Eina_List *l; - Ecore_Evas *ee; - - EINA_LIST_FOREACH(_e_canvases, l, ee) - { - Evas *e; - - e = ecore_evas_get(ee); - evas_image_cache_flush(e); - evas_font_cache_flush(e); - } - edje_file_cache_flush(); - edje_collection_cache_flush(); -} - -EAPI void -e_canvas_cache_reload(void) -{ - Eina_List *l; - Ecore_Evas *ee; - - EINA_LIST_FOREACH(_e_canvases, l, ee) - { - Evas *e; - - e = ecore_evas_get(ee); - evas_image_cache_reload(e); - } -} - -EAPI void -e_canvas_idle_flush(void) -{ - Eina_List *l; - Ecore_Evas *ee; - - EINA_LIST_FOREACH(_e_canvases, l, ee) - { - Evas *e; - - e = ecore_evas_get(ee); - evas_render_idle_flush(e); - } -} - -EAPI void -e_canvas_rehint(void) -{ - Eina_List *l; - Ecore_Evas *ee; - - EINA_LIST_FOREACH(_e_canvases, l, ee) - { - Evas *e; - - e = ecore_evas_get(ee); - if (e_config->font_hinting == 0) - evas_font_hinting_set(e, EVAS_FONT_HINTING_BYTECODE); - else if (e_config->font_hinting == 1) - evas_font_hinting_set(e, EVAS_FONT_HINTING_AUTO); - else if (e_config->font_hinting == 2) - evas_font_hinting_set(e, EVAS_FONT_HINTING_NONE); - } -} - -EAPI Ecore_Evas * -e_canvas_new(Ecore_Window win, int x, int y, int w, int h, - int direct_resize, int override, Ecore_Window *win_ret) -{ - Ecore_Evas *ee = NULL; - - switch (e_comp_get(NULL)->comp_type) - { - case E_PIXMAP_TYPE_X: - ee = ecore_evas_software_x11_new(NULL, win, x, y, w, h); - if (ee) - { - ecore_evas_override_set(ee, override); - if (direct_resize) ecore_evas_software_x11_direct_resize_set(ee, 1); - if (win_ret) *win_ret = ecore_evas_software_x11_window_get(ee); - } - break; -#if defined(HAVE_WAYLAND_CLIENTS) || defined(HAVE_WAYLAND_ONLY) - case E_PIXMAP_TYPE_WL: - /* FIXME: This should be based on if we are rendering with gl or not */ - ee = ecore_evas_wayland_shm_new(NULL, win, x, y, w, h, 0); - if (ee) - { - ecore_evas_override_set(ee, override); - if (win_ret) - { - *win_ret = - ecore_wl_window_id_get(ecore_evas_wayland_window_get(ee)); - } - } - break; -#endif - default: break; - } - if (!ee) - EINA_LOG_ERR("Impossible to build any Ecore_Evas window !!"); - return ee; -} - -EAPI const Eina_List * -e_canvas_list(void) -{ - return _e_canvases; -} - -/* local subsystem functions */ -static Eina_Bool -_e_canvas_cb_flush(void *data __UNUSED__) -{ - e_canvas_cache_flush(); - return ECORE_CALLBACK_RENEW; -} - diff --git a/src/bin/e_canvas.h b/src/bin/e_canvas.h deleted file mode 100644 index 895ee47cea..0000000000 --- a/src/bin/e_canvas.h +++ /dev/null @@ -1,17 +0,0 @@ -#ifdef E_TYPEDEFS -#else -#ifndef E_CANVAS_H -#define E_CANVAS_H - -EAPI void e_canvas_add(Ecore_Evas *ee); -EAPI void e_canvas_del(Ecore_Evas *ee); -EAPI void e_canvas_recache(void); -EAPI void e_canvas_cache_flush(void); -EAPI void e_canvas_cache_reload(void); -EAPI void e_canvas_idle_flush(void); -EAPI void e_canvas_rehint(void); -EAPI Ecore_Evas *e_canvas_new(Ecore_Window win, int x, int y, int w, int h, int direct_resize, int override, Ecore_Window *win_ret); - -EAPI const Eina_List *e_canvas_list(void); -#endif -#endif diff --git a/src/bin/e_client.c b/src/bin/e_client.c index 7cc1cc3b6d..97a858ec29 100644 --- a/src/bin/e_client.c +++ b/src/bin/e_client.c @@ -483,11 +483,7 @@ _e_client_free(E_Client *ec) EINA_LIST_FREE(ec->e.state.video_child, tmp) tmp->e.state.video_parent_client = NULL; } - if (ec->internal_ecore_evas) - { - e_canvas_del(ec->internal_ecore_evas); - E_FREE_FUNC(ec->internal_ecore_evas, ecore_evas_free); - } + E_FREE_FUNC(ec->internal_elm_win, evas_object_del); E_FREE_FUNC(ec->desktop, efreet_desktop_free); E_FREE_FUNC(ec->post_job, ecore_idle_enterer_del); @@ -596,8 +592,8 @@ _e_client_del(E_Client *ec) e_int_client_menu_del(ec); E_FREE_FUNC(ec->raise_timer, ecore_timer_del); - if (ec->internal_ecore_evas) - ecore_evas_hide(ec->internal_ecore_evas); + if (ec->internal_elm_win) + evas_object_hide(ec->internal_elm_win); if (ec->focused) _e_client_revert_focus(ec); @@ -1383,7 +1379,7 @@ _e_client_cb_evas_move(void *data, Evas *e EINA_UNUSED, Evas_Object *obj EINA_UN Evas_Coord x, y; ec->pre_res_change.valid = 0; - if (ec->internal_ecore_evas) + if (ec->internal_elm_win) { EC_CHANGED(ec); ec->changes.pos = 1; @@ -1418,7 +1414,7 @@ _e_client_cb_evas_resize(void *data, Evas *e EINA_UNUSED, Evas_Object *obj EINA_ Evas_Coord x, y, w, h; ec->pre_res_change.valid = 0; - if (ec->internal_ecore_evas || (!ec->netwm.sync.request)) + if (ec->internal_elm_win || (!ec->netwm.sync.request)) { EC_CHANGED(ec); ec->changes.size = 1; @@ -1966,11 +1962,7 @@ _e_client_eval(E_Client *ec) { ec->changes.size = 0; if ((!ec->shaded) && (!ec->shading)) - { - evas_object_resize(ec->frame, ec->w, ec->h); - if (ec->internal_ecore_evas && (!ec->override)) - ecore_evas_move_resize(ec->internal_ecore_evas, 0, 0, ec->client.w, ec->client.h); - } + evas_object_resize(ec->frame, ec->w, ec->h); rem_change = 1; prop |= E_CLIENT_PROPERTY_SIZE; diff --git a/src/bin/e_client.h b/src/bin/e_client.h index 831b9c5fa1..c23527592d 100644 --- a/src/bin/e_client.h +++ b/src/bin/e_client.h @@ -637,7 +637,7 @@ struct E_Client unsigned int internal_no_reopen : 1; Eina_Bool theme_shadow : 1; - Ecore_Evas *internal_ecore_evas; + Evas_Object *internal_elm_win; double ping; diff --git a/src/bin/e_color_dialog.c b/src/bin/e_color_dialog.c index 5a5e10aeae..d34e2365ed 100644 --- a/src/bin/e_color_dialog.c +++ b/src/bin/e_color_dialog.c @@ -14,7 +14,7 @@ static void _e_color_dialog_cb_csel_change(void *data, Evas_Object *obj); * @param alpha_enabled if set, uses alpha and let user edit it. */ E_Color_Dialog * -e_color_dialog_new(E_Comp *c, const E_Color *color, Eina_Bool alpha_enabled) +e_color_dialog_new(E_Comp *c EINA_UNUSED, const E_Color *color, Eina_Bool alpha_enabled) { E_Color_Dialog *dia; Evas_Object *o; @@ -22,7 +22,7 @@ e_color_dialog_new(E_Comp *c, const E_Color *color, Eina_Bool alpha_enabled) dia = E_OBJECT_ALLOC(E_Color_Dialog, E_COLOR_DIALOG_TYPE, _e_color_dialog_free); if (!dia) return NULL; - dia->dia = e_dialog_new(c, "E", "_color_dialog"); + dia->dia = e_dialog_new(NULL, "E", "_color_dialog"); e_dialog_title_set(dia->dia, _("Color Selector")); dia->color = calloc(1, sizeof(E_Color)); @@ -36,7 +36,7 @@ e_color_dialog_new(E_Comp *c, const E_Color *color, Eina_Bool alpha_enabled) e_color_copy(dia->color, dia->initial); - o = e_widget_csel_add(dia->dia->win->evas, dia->color, alpha_enabled); + o = e_widget_csel_add(evas_object_evas_get(dia->dia->win), dia->color, alpha_enabled); evas_object_show(o); e_widget_size_min_get(o, &mw, &mh); e_dialog_content_set(dia->dia, o, mw, mh); @@ -45,7 +45,7 @@ e_color_dialog_new(E_Comp *c, const E_Color *color, Eina_Bool alpha_enabled) /* buttons at the bottom */ e_dialog_button_add(dia->dia, _("Select"), NULL, _e_color_dialog_button1_click, dia); e_dialog_button_add(dia->dia, _("Cancel"), NULL, _e_color_dialog_button2_click, dia); - e_win_centered_set(dia->dia->win, 1); + elm_win_center(dia->dia->win, 1, 1); dia->dia->data = dia; e_object_del_attach_func_set(E_OBJECT(dia->dia), _e_color_dialog_dia_del); diff --git a/src/bin/e_comp.c b/src/bin/e_comp.c index cc841f3dbe..693dea0e1e 100644 --- a/src/bin/e_comp.c +++ b/src/bin/e_comp.c @@ -916,9 +916,6 @@ _e_comp_act_opacity_obj_finder(E_Object *obj) switch (obj->type) { - case E_WIN_TYPE: - ec = ((E_Win*)obj)->client; - return ec ? ec->frame : NULL; case E_CLIENT_TYPE: return ((E_Client*)obj)->frame; default: @@ -928,6 +925,8 @@ _e_comp_act_opacity_obj_finder(E_Object *obj) ec = e_client_focused_get(); return ec ? ec->frame : NULL; } + if (e_obj_is_win(obj)) + return e_win_client_get((void*)obj)->frame; return NULL; } @@ -1419,7 +1418,6 @@ e_comp_get(const void *o) E_Gadcon *gc; E_Gadcon_Client *gcc; E_Drag *drag; - E_Win *ewin; if (!o) { @@ -1430,9 +1428,6 @@ e_comp_get(const void *o) /* try to get to zone type first */ switch (obj->type) { - case E_WIN_TYPE: - ewin = (E_Win*)obj; - return ewin->comp; case E_DESK_TYPE: desk = (E_Desk*)obj; obj = (void*)desk->zone; @@ -1486,6 +1481,11 @@ e_comp_get(const void *o) if (!man) man = (E_Manager*)obj; return man->comp; } + if (e_obj_is_win(obj)) + { + ec = e_win_client_get((void*)obj); + return e_comp_get(ec); + } CRI("UNIMPLEMENTED TYPE PASSED! FIXME!"); return NULL; } @@ -1649,6 +1649,7 @@ e_comp_e_object_layer_get(const E_Object *obj) E_Gadcon *gc = NULL; if (!obj) return 0; + switch (obj->type) { case E_GADCON_CLIENT_TYPE: @@ -1659,10 +1660,7 @@ e_comp_e_object_layer_get(const E_Object *obj) if (!gc) gc = (E_Gadcon *)obj; if (gc->shelf) return gc->shelf->layer; if (!gc->toolbar) return E_LAYER_DESKTOP; - return gc->toolbar->fwin->client->layer; - - case E_WIN_TYPE: - return ((E_Win *)(obj))->client->layer; + return e_win_client_get(gc->toolbar->fwin)->layer; case E_ZONE_TYPE: return E_LAYER_DESKTOP; @@ -1674,6 +1672,8 @@ e_comp_e_object_layer_get(const E_Object *obj) default: break; } + if (e_obj_is_win(obj)) + return e_win_client_get((void*)obj)->layer; return 0; } diff --git a/src/bin/e_comp.h b/src/bin/e_comp.h index c023e92071..40871ff8bd 100644 --- a/src/bin/e_comp.h +++ b/src/bin/e_comp.h @@ -188,8 +188,8 @@ EAPI void e_comp_client_redirect_toggle(E_Client *ec); EAPI Eina_Bool e_comp_util_object_is_above_nocomp(Evas_Object *obj); EINTERN Evas_Object *e_comp_style_selector_create(Evas *evas, const char **source); -EAPI E_Config_Dialog *e_int_config_comp(E_Comp *comp, const char *params); -EAPI E_Config_Dialog *e_int_config_comp_match(E_Comp *comp, const char *params); +EAPI E_Config_Dialog *e_int_config_comp(Evas_Object *parent, const char *params); +EAPI E_Config_Dialog *e_int_config_comp_match(Evas_Object *parent, const char *params); static inline E_Comp * e_comp_util_evas_object_comp_get(Evas_Object *obj) diff --git a/src/bin/e_comp_object.c b/src/bin/e_comp_object.c index 3ab04889dd..dd12a9dd54 100644 --- a/src/bin/e_comp_object.c +++ b/src/bin/e_comp_object.c @@ -1931,6 +1931,8 @@ _e_comp_smart_hide(Evas_Object *obj) evas_object_hide(cw->clip); if (cw->input_obj) evas_object_hide(cw->input_obj); evas_object_hide(cw->effect_obj); + if (cw->ec->internal_elm_win) + evas_object_hide(cw->ec->internal_elm_win); if (stopping) return; /* ensure focus-out */ if (cw->ec->focused) @@ -1959,6 +1961,8 @@ _e_comp_smart_show(Evas_Object *obj) evas_object_show(cw->clip); if (cw->input_obj) evas_object_show(cw->input_obj); evas_object_show(cw->effect_obj); + if (cw->ec->internal_elm_win) + evas_object_show(cw->ec->internal_elm_win); e_comp_render_queue(cw->comp); e_comp_shape_queue(cw->comp); if (cw->ec->input_only) return; @@ -2560,6 +2564,8 @@ e_comp_object_util_zone_get(Evas_Object *obj) int x, y; E_Comp *c; + if (e_win_client_get(obj)) + return e_win_client_get(obj)->zone; c = e_comp_util_evas_object_comp_get(obj); if (c) { @@ -2568,32 +2574,8 @@ e_comp_object_util_zone_get(Evas_Object *obj) } else { - Ecore_Evas *ee; - - ee = ecore_evas_ecore_evas_get(evas_object_evas_get(obj)); - if (ee) - { - E_Win *win; - - win = ecore_evas_data_get(ee, "E_Win"); - if (win) - { - if (win->client) - zone = win->client->zone; - else - zone = e_comp_zone_xy_get(NULL, win->x, win->y); - } - else - { - ecore_evas_geometry_get(ee, &x, &y, NULL, NULL); - zone = e_comp_zone_xy_get(NULL, x, y); - } - } - else - { - evas_object_geometry_get(obj, &x, &y, NULL, NULL); - zone = e_comp_zone_xy_get(NULL, x, y); - } + evas_object_geometry_get(obj, &x, &y, NULL, NULL); + zone = e_comp_zone_xy_get(NULL, x, y); } } return zone; diff --git a/src/bin/e_comp_wl.c b/src/bin/e_comp_wl.c index 10be5c9382..a5be9cf68b 100644 --- a/src/bin/e_comp_wl.c +++ b/src/bin/e_comp_wl.c @@ -2002,7 +2002,7 @@ _e_comp_wl_client_cb_new(void *data EINA_UNUSED, E_Client *ec) ec->comp_data->first_damage = ((ec->internal) || (ec->override)); if ((!e_client_util_ignored_get(ec)) && - (!ec->internal) && (!ec->internal_ecore_evas)) + (!ec->internal)) { ec->comp_data->need_reparent = EINA_TRUE; ec->take_focus = !starting; @@ -2127,7 +2127,7 @@ _e_comp_wl_client_cb_pre_frame(void *data EINA_UNUSED, E_Client *ec) if (ec->visible) { - if ((ec->comp_data->set_win_type) && (ec->internal_ecore_evas)) + if ((ec->comp_data->set_win_type) && (ec->internal_elm_win)) { int type = ECORE_WL_WINDOW_TYPE_TOPLEVEL; @@ -2155,7 +2155,7 @@ _e_comp_wl_client_cb_pre_frame(void *data EINA_UNUSED, E_Client *ec) break; } - ecore_evas_wayland_type_set(ec->internal_ecore_evas, type); + ecore_evas_wayland_type_set(e_win_ee_get(ec->internal_elm_win), type); ec->comp_data->set_win_type = EINA_FALSE; } } diff --git a/src/bin/e_comp_x.c b/src/bin/e_comp_x.c index 714fa88539..c82e83e257 100644 --- a/src/bin/e_comp_x.c +++ b/src/bin/e_comp_x.c @@ -192,7 +192,7 @@ _e_comp_x_client_new_helper(E_Client *ec) e_object_del(E_OBJECT(ec)); return EINA_FALSE; } - if ((!e_client_util_ignored_get(ec)) && (!ec->internal) && (!ec->internal_ecore_evas)) + if ((!e_client_util_ignored_get(ec)) && (!ec->internal) && (!ec->internal_elm_win)) { ec->comp_data->need_reparent = 1; EC_CHANGED(ec); @@ -459,8 +459,8 @@ _e_comp_x_client_find_by_alarm(Ecore_X_Sync_Alarm al) static void _e_comp_x_client_move_resize_send(E_Client *ec) { - if (ec->internal_ecore_evas) - ecore_evas_managed_move(ec->internal_ecore_evas, ec->client.x - ec->x, ec->client.y - ec->y); + if (ec->internal_elm_win) + ecore_evas_managed_move(e_win_ee_get(ec->internal_elm_win), ec->client.x - ec->x, ec->client.y - ec->y); ecore_x_icccm_move_resize_send(e_client_util_win_get(ec), ec->client.x, ec->client.y, ec->client.w, ec->client.h); } @@ -1166,7 +1166,7 @@ _e_comp_x_show_helper(E_Client *ec) /* this is most likely an internal window */ ec->comp_data->need_reparent = 1; ec->visible = 1; - if (ec->internal_ecore_evas) + if (ec->internal_elm_win) ec->take_focus = 1; EC_CHANGED(ec); } @@ -1191,7 +1191,7 @@ _e_comp_x_show_helper(E_Client *ec) else evas_object_show(ec->frame); ec->comp_data->first_map = 1; - if (ec->internal_ecore_evas) + if (ec->internal_elm_win) { _e_comp_x_post_client_idler_add(ec); ec->post_move = 1; @@ -2252,8 +2252,8 @@ _e_comp_x_sync_alarm(void *data EINA_UNUSED, int type EINA_UNUSED, Ecore_X_Event if (resize) { evas_object_resize(ec->frame, ec->w, ec->h); - if (ec->internal_ecore_evas) - ecore_evas_move_resize(ec->internal_ecore_evas, 0, 0, ec->client.w, ec->client.h); + if (ec->internal_elm_win) + evas_object_resize(ec->internal_elm_win, ec->client.w, ec->client.h); } ecore_x_pointer_xy_get(ec->comp->man->root, @@ -2637,29 +2637,19 @@ _e_comp_x_hook_client_post_new_client(void *d EINA_UNUSED, E_Client *ec) { Ecore_X_Atom state[1]; int num = 0; - E_Win *win = ecore_evas_data_get(ec->internal_ecore_evas, "E_Win"); - if (win->state.centered) + if (e_win_centered_get(ec->internal_elm_win)) state[num++] = E_ATOM_WINDOW_STATE_CENTERED; if (num) - ecore_x_window_prop_card32_set(win->evas_win, E_ATOM_WINDOW_STATE, state, num); + ecore_x_window_prop_card32_set(elm_win_window_id_get(ec->internal_elm_win), E_ATOM_WINDOW_STATE, state, num); else - ecore_x_window_prop_property_del(win->evas_win, E_ATOM_WINDOW_STATE); + ecore_x_window_prop_property_del(elm_win_window_id_get(ec->internal_elm_win), E_ATOM_WINDOW_STATE); ec->changes.internal_state = 0; } if (ec->changes.internal_props) { - E_Win *win = ecore_evas_data_get(ec->internal_ecore_evas, "E_Win"); - - ecore_x_icccm_size_pos_hints_set(win->evas_win, - win->placed, ECORE_X_GRAVITY_NW, - win->min_w, win->min_h, - win->max_w, win->max_h, - win->base_w, win->base_h, - win->step_x, win->step_y, - win->min_aspect, win->max_aspect); ec->changes.internal_props = 0; ec->comp_data->internal_props_set++; } @@ -2739,7 +2729,7 @@ _e_comp_x_hook_client_pre_frame_assign(void *d EINA_UNUSED, E_Client *ec) ecore_x_window_shape_input_rectangles_set(pwin, (Ecore_X_Rectangle*)ec->shape_input_rects, ec->shape_input_rects_num); ec->changes.shape = 1; ec->changes.shape_input = 1; - if (ec->internal_ecore_evas) + if (ec->internal_elm_win) { ecore_x_window_gravity_set(win, ECORE_X_GRAVITY_NW); ec->changes.reset_gravity = 1; @@ -2750,17 +2740,12 @@ _e_comp_x_hook_client_pre_frame_assign(void *d EINA_UNUSED, E_Client *ec) if (ec->visible) { - if (ec->comp_data->set_win_type && ec->internal_ecore_evas) + if (ec->comp_data->set_win_type && ec->internal_elm_win) { - E_Win *ewin = ecore_evas_data_get(ec->internal_ecore_evas, "E_Win"); - - if (ewin) - { - if (ec->dialog) - ecore_x_netwm_window_type_set(win, ECORE_X_WINDOW_TYPE_DIALOG); - else - ecore_x_netwm_window_type_set(win, ECORE_X_WINDOW_TYPE_NORMAL); - } + if (ec->dialog) + ecore_x_netwm_window_type_set(win, ECORE_X_WINDOW_TYPE_DIALOG); + else + ecore_x_netwm_window_type_set(win, ECORE_X_WINDOW_TYPE_NORMAL); ec->comp_data->set_win_type = 0; } } diff --git a/src/bin/e_config.c b/src/bin/e_config.c index 4787c1786d..f15082a528 100644 --- a/src/bin/e_config.c +++ b/src/bin/e_config.c @@ -1764,7 +1764,7 @@ _e_config_mv_error(const char *from, const char *to) e_dialog_text_set(dia, buf); e_dialog_button_add(dia, _("OK"), NULL, NULL, NULL); e_dialog_button_focus_num(dia, 0); - e_win_centered_set(dia->win, 1); + elm_win_center(dia->win, 1, 1); e_object_del_attach_func_set(E_OBJECT(dia), _e_config_error_dialog_cb_delete); e_dialog_show(dia); @@ -2408,7 +2408,7 @@ _e_config_eet_close_handle(Eet_File *ef, char *file) e_dialog_text_set(dia, buf); e_dialog_button_add(dia, _("OK"), NULL, NULL, NULL); e_dialog_button_focus_num(dia, 0); - e_win_centered_set(dia->win, 1); + elm_win_center(dia->win, 1, 1); e_object_del_attach_func_set(E_OBJECT(dia), _e_config_error_dialog_cb_delete); e_dialog_show(dia); diff --git a/src/bin/e_config_dialog.c b/src/bin/e_config_dialog.c index cb8eaad5e9..8e60ffe4dd 100644 --- a/src/bin/e_config_dialog.c +++ b/src/bin/e_config_dialog.c @@ -21,7 +21,7 @@ static Eina_List *_e_config_dialog_list = NULL; /** * Creates a new dialog * - * @param c the compositor the dialog will be added to + * @param parent the parent dialog * @param title to display for the dialog * @param name the name used to register the window in e * @param class the call used to register the window in e @@ -32,14 +32,14 @@ static Eina_List *_e_config_dialog_list = NULL; * @return returns the created dialog. Null on failure */ EAPI E_Config_Dialog * -e_config_dialog_new(E_Comp *c, const char *title, const char *name, const char *class, const char *icon, int icon_size, E_Config_Dialog_View *view, void *data) +e_config_dialog_new(Evas_Object *parent, const char *title, const char *name, const char *class, const char *icon, int icon_size, E_Config_Dialog_View *view, void *data) { E_Config_Dialog *cfd; cfd = E_OBJECT_ALLOC(E_Config_Dialog, E_CONFIG_DIALOG_TYPE, _e_config_dialog_free); cfd->view = view; - cfd->comp = c; + cfd->parent = parent; cfd->title = eina_stringshare_add(title); cfd->name = eina_stringshare_add(name); cfd->class = eina_stringshare_add(class); @@ -104,23 +104,25 @@ e_config_dialog_find(const char *name, const char *class) (!e_util_strcmp(class, cfd->class))) { E_Zone *z; + E_Client *ec; z = e_util_zone_current_get(e_manager_current_get()); - e_client_uniconify(cfd->dia->win->client); - e_win_raise(cfd->dia->win); - if (z->comp == cfd->dia->win->client->zone->comp) - e_client_desk_set(cfd->dia->win->client, e_desk_current_get(z)); + ec = e_win_client_get(cfd->dia->win); + e_client_uniconify(ec); + elm_win_raise(cfd->dia->win); + if (z->comp == ec->zone->comp) + e_client_desk_set(ec, e_desk_current_get(z)); else { - if (!cfd->dia->win->client->sticky) - e_desk_show(cfd->dia->win->client->desk); - e_util_pointer_center(cfd->dia->win->client); + if (!ec->sticky) + e_desk_show(ec->desk); + e_util_pointer_center(ec); } - if (cfd->dia->win->client->shaded || cfd->dia->win->client->shading) - e_client_unshade(cfd->dia->win->client, cfd->dia->win->client->shade_dir); + if (ec->shaded || ec->shading) + e_client_unshade(ec, ec->shade_dir); if ((e_config->focus_setting == E_FOCUS_NEW_DIALOG) || (e_config->focus_setting == E_FOCUS_NEW_WINDOW)) - evas_object_focus_set(cfd->dia->win->client->frame, 1); + evas_object_focus_set(ec->frame, 1); return 1; } } @@ -191,9 +193,9 @@ _e_config_dialog_go(E_Config_Dialog *cfd, E_Config_Dialog_CFData_Type type) if (!pdia) /* creating window for the first time */ { if ((cfd->view->normal_win) || (e_config->cfgdlg_normal_wins)) - cfd->dia = e_dialog_normal_win_new(cfd->comp, cfd->name, buf); + cfd->dia = e_dialog_normal_win_new(cfd->parent, cfd->name, buf); else - cfd->dia = e_dialog_new(cfd->comp, cfd->name, buf); + cfd->dia = e_dialog_new(cfd->parent, cfd->name, buf); e_object_del_attach_func_set(E_OBJECT(cfd->dia), _e_config_dialog_cb_dialog_del); } /* window was created before - deleting content only */ @@ -207,7 +209,7 @@ _e_config_dialog_go(E_Config_Dialog *cfd, E_Config_Dialog_CFData_Type type) if (cfd->view->create_cfdata && (!cfd->cfdata)) cfd->cfdata = cfd->view->create_cfdata(cfd); - evas = e_win_evas_get(cfd->dia->win); + evas = evas_object_evas_get(cfd->dia->win); if (type == E_CONFIG_DIALOG_CFDATA_TYPE_BASIC) { if (cfd->view->advanced.create_widgets) diff --git a/src/bin/e_config_dialog.h b/src/bin/e_config_dialog.h index 3b50eb08be..78404ae32e 100644 --- a/src/bin/e_config_dialog.h +++ b/src/bin/e_config_dialog.h @@ -41,7 +41,7 @@ struct _E_Config_Dialog E_Config_Dialog_CFData_Type view_type; E_Config_Dialog_View *view; E_Config_Dialog_Data *cfdata; - E_Comp *comp; + Evas_Object *parent; const char *title; const char *icon; const char *name; @@ -55,7 +55,7 @@ struct _E_Config_Dialog unsigned char cfg_changed_auto : 1; }; -EAPI E_Config_Dialog *e_config_dialog_new(E_Comp *c, const char *title, const char *name, const char *class, const char *icon, int icon_size, E_Config_Dialog_View *view, void *data); +EAPI E_Config_Dialog *e_config_dialog_new(Evas_Object *parent, const char *title, const char *name, const char *class, const char *icon, int icon_size, E_Config_Dialog_View *view, void *data); EAPI int e_config_dialog_find(const char *name, const char *class); EAPI E_Config_Dialog *e_config_dialog_get(const char *name, const char *class); diff --git a/src/bin/e_configure.c b/src/bin/e_configure.c index 6550c75b9e..3d75c975fe 100644 --- a/src/bin/e_configure.c +++ b/src/bin/e_configure.c @@ -5,7 +5,7 @@ static void _e_configure_menu_add(void *data, E_Menu *m); static void _e_configure_efreet_desktop_cleanup(void); static void _e_configure_efreet_desktop_update(void); static Eina_Bool _e_configure_cb_efreet_desktop_cache_update(void *data, int type, void *event); -static void _e_configure_registry_item_full_add(const char *path, int pri, const char *label, const char *icon_file, const char *icon, E_Config_Dialog *(*func)(E_Comp *c, const char *params), void (*generic_func)(E_Comp *c, const char *params), Efreet_Desktop *desktop, const char *params); +static void _e_configure_registry_item_full_add(const char *path, int pri, const char *label, const char *icon_file, const char *icon, E_Config_Dialog *(*func)(Evas_Object *parent, const char *params), void (*generic_func)(Evas_Object *parent, const char *params), Efreet_Desktop *desktop, const char *params); static void _e_configure_registry_item_free(E_Configure_It *eci); static void _configure_job(void *data); @@ -47,7 +47,7 @@ e_configure_init(void) } EAPI void -e_configure_registry_call(const char *path, E_Comp *c, const char *params) +e_configure_registry_call(const char *path, Evas_Object *parent, const char *params) { E_Configure_Cat *ecat; Eina_List *l; @@ -58,7 +58,6 @@ e_configure_registry_call(const char *path, E_Comp *c, const char *params) cat = ecore_file_dir_get(path); if (!cat) return; item = ecore_file_file_get(path); - if (!c) c = e_comp_get(NULL); EINA_LIST_FOREACH(e_configure_registry, l, ecat) if (!strcmp(cat, ecat->cat)) { @@ -70,16 +69,16 @@ e_configure_registry_call(const char *path, E_Comp *c, const char *params) { if (!params) params = eci->params; - if (eci->func) eci->func(c, params); + if (eci->func) eci->func(parent, params); else if (eci->generic_func) - eci->generic_func(c, params); + eci->generic_func(parent, params); else if (eci->desktop) { if (custom_desktop_exec.func) custom_desktop_exec.func(custom_desktop_exec.data, - c, params, eci->desktop); + e_comp_get(NULL), params, eci->desktop); else - e_exec(e_util_zone_current_get(c->man), + e_exec(e_zone_current_get(e_comp_get(NULL)), eci->desktop, NULL, NULL, "config"); } break; @@ -90,19 +89,19 @@ e_configure_registry_call(const char *path, E_Comp *c, const char *params) } EAPI void -e_configure_registry_item_add(const char *path, int pri, const char *label, const char *icon_file, const char *icon, E_Config_Dialog *(*func)(E_Comp *c, const char *params)) +e_configure_registry_item_add(const char *path, int pri, const char *label, const char *icon_file, const char *icon, E_Config_Dialog *(*func)(Evas_Object *parent, const char *params)) { _e_configure_registry_item_full_add(path, pri, label, icon_file, icon, func, NULL, NULL, NULL); } EAPI void -e_configure_registry_generic_item_add(const char *path, int pri, const char *label, const char *icon_file, const char *icon, void (*generic_func)(E_Comp *c, const char *params)) +e_configure_registry_generic_item_add(const char *path, int pri, const char *label, const char *icon_file, const char *icon, void (*generic_func)(Evas_Object *parent, const char *params)) { _e_configure_registry_item_full_add(path, pri, label, icon_file, icon, NULL, generic_func, NULL, NULL); } EAPI void -e_configure_registry_item_params_add(const char *path, int pri, const char *label, const char *icon_file, const char *icon, E_Config_Dialog *(*func)(E_Comp *c, const char *params), const char *params) +e_configure_registry_item_params_add(const char *path, int pri, const char *label, const char *icon_file, const char *icon, E_Config_Dialog *(*func)(Evas_Object *parent, const char *params), const char *params) { _e_configure_registry_item_full_add(path, pri, label, icon_file, icon, func, NULL, NULL, params); } @@ -272,9 +271,9 @@ e_configure_registry_exists(const char *path) } static void -_e_configure_menu_module_item_cb(void *data __UNUSED__, E_Menu *m, E_Menu_Item *mi __UNUSED__) +_e_configure_menu_module_item_cb(void *data __UNUSED__, E_Menu *m EINA_UNUSED, E_Menu_Item *mi __UNUSED__) { - e_int_config_modules(m->zone->comp, NULL); + e_int_config_modules(NULL, NULL); } static void @@ -467,7 +466,7 @@ _e_configure_compare_pri_cb(E_Configure_It *eci, E_Configure_It *eci2) } static void -_e_configure_registry_item_full_add(const char *path, int pri, const char *label, const char *icon_file, const char *icon, E_Config_Dialog *(*func)(E_Comp *c, const char *params), void (*generic_func)(E_Comp *c, const char *params), Efreet_Desktop *desktop, const char *params) +_e_configure_registry_item_full_add(const char *path, int pri, const char *label, const char *icon_file, const char *icon, E_Config_Dialog *(*func)(Evas_Object *parent, const char *params), void (*generic_func)(Evas_Object *parent, const char *params), Efreet_Desktop *desktop, const char *params) { Eina_List *l; char *cat; diff --git a/src/bin/e_configure.h b/src/bin/e_configure.h index cd6851c8a3..b3f4c3c11d 100644 --- a/src/bin/e_configure.h +++ b/src/bin/e_configure.h @@ -25,18 +25,18 @@ struct _E_Configure_It const char *icon_file; const char *icon; const char *params; - E_Config_Dialog *(*func) (E_Comp *c, const char *params); - void (*generic_func) (E_Comp *c, const char *params); + E_Config_Dialog *(*func) (Evas_Object *parent, const char *params); + void (*generic_func) (Evas_Object *parent, const char *params); Efreet_Desktop *desktop; }; -EAPI void e_configure_registry_item_add(const char *path, int pri, const char *label, const char *icon_file, const char *icon, E_Config_Dialog *(*func) (E_Comp *c, const char *params)); -EAPI void e_configure_registry_item_params_add(const char *path, int pri, const char *label, const char *icon_file, const char *icon, E_Config_Dialog *(*func) (E_Comp *c, const char *params), const char *params); -EAPI void e_configure_registry_generic_item_add(const char *path, int pri, const char *label, const char *icon_file, const char *icon, void (*generic_func) (E_Comp *c, const char *params)); +EAPI void e_configure_registry_item_add(const char *path, int pri, const char *label, const char *icon_file, const char *icon, E_Config_Dialog *(*func) (Evas_Object *parent, const char *params)); +EAPI void e_configure_registry_item_params_add(const char *path, int pri, const char *label, const char *icon_file, const char *icon, E_Config_Dialog *(*func) (Evas_Object *parent, const char *params), const char *params); +EAPI void e_configure_registry_generic_item_add(const char *path, int pri, const char *label, const char *icon_file, const char *icon, void (*generic_func) (Evas_Object *parent, const char *params)); EAPI void e_configure_registry_item_del(const char *path); EAPI void e_configure_registry_category_add(const char *path, int pri, const char *label, const char *icon_file, const char *icon); EAPI void e_configure_registry_category_del(const char *path); -EAPI void e_configure_registry_call(const char *path, E_Comp *c, const char *params); +EAPI void e_configure_registry_call(const char *path, Evas_Object *parent, const char *params); EAPI int e_configure_registry_exists(const char *path); EAPI void e_configure_registry_custom_desktop_exec_callback_set(void (*func) (const void *data, E_Comp *c, const char *params, Efreet_Desktop *desktop), const void *data); EINTERN void e_configure_init(void); diff --git a/src/bin/e_confirm_dialog.c b/src/bin/e_confirm_dialog.c index 14dbc5dbd9..67e0dbee58 100644 --- a/src/bin/e_confirm_dialog.c +++ b/src/bin/e_confirm_dialog.c @@ -2,7 +2,7 @@ /******** private function definitions **********/ static void _e_confirm_dialog_free(E_Confirm_Dialog *cd); -static void _e_confirm_dialog_delete(E_Win *win); +static void _e_confirm_dialog_delete(E_Dialog *dia, Evas *e EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *event_info EINA_UNUSED); static void _e_confirm_dialog_yes(void *data, E_Dialog *dia); static void _e_confirm_dialog_no(void *data, E_Dialog *dia); @@ -42,7 +42,7 @@ e_confirm_dialog_show(const char *title, const char *icon, const char *text, dia->data = cd; cd->dia = dia; - e_win_delete_callback_set(dia->win, _e_confirm_dialog_delete); + evas_object_event_callback_add(dia->win, EVAS_CALLBACK_DEL, (Evas_Object_Event_Cb)_e_confirm_dialog_delete, dia); e_object_del_attach_func_set(E_OBJECT(dia), _dia_del); if (title) e_dialog_title_set(dia, title); @@ -53,7 +53,7 @@ e_confirm_dialog_show(const char *title, const char *icon, const char *text, e_dialog_button_add(dia, !button2_text ? _("No") : button2_text, NULL, _e_confirm_dialog_no, cd); e_dialog_button_focus_num(dia, 1); - e_win_centered_set(dia->win, 1); + elm_win_center(dia->win, 1, 1); e_dialog_show(dia); return cd; @@ -103,11 +103,8 @@ _e_confirm_dialog_no(void *data, E_Dialog *dia __UNUSED__) } static void -_e_confirm_dialog_delete(E_Win *win) +_e_confirm_dialog_delete(E_Dialog *dia, Evas *e EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *event_info EINA_UNUSED) { - E_Dialog *dia; - - dia = win->data; e_object_del(dia->data); } diff --git a/src/bin/e_desklock.c b/src/bin/e_desklock.c index ac08eca082..f03edc9e8a 100644 --- a/src/bin/e_desklock.c +++ b/src/bin/e_desklock.c @@ -252,7 +252,7 @@ e_desklock_show(Eina_Bool suspend) zone = e_util_zone_current_get(e_manager_current_get()); if (zone) - e_configure_registry_call("screen/screen_lock", zone->comp, NULL); + e_configure_registry_call("screen/screen_lock", NULL, NULL); return 0; } } @@ -549,7 +549,7 @@ _e_desklock_ask_presentation_mode(void) e_dialog_button_focus_num(dia, 0); e_widget_list_homogeneous_set(dia->box_object, 0); - e_win_centered_set(dia->win, 1); + elm_win_center(dia->win, 1, 1); e_dialog_show(dia); evas_object_event_callback_add(dia->bg_object, EVAS_CALLBACK_KEY_DOWN, diff --git a/src/bin/e_desktop_editor.c b/src/bin/e_desktop_editor.c index cc54fceaa3..a8594e7f99 100644 --- a/src/bin/e_desktop_editor.c +++ b/src/bin/e_desktop_editor.c @@ -245,7 +245,7 @@ e_desktop_edit(E_Comp *c, Efreet_Desktop *desktop) } static int -_e_desktop_edit_view_create(E_Desktop_Edit *editor, E_Comp *c) +_e_desktop_edit_view_create(E_Desktop_Edit *editor, E_Comp *c EINA_UNUSED) { E_Config_Dialog_View *v; @@ -260,7 +260,7 @@ _e_desktop_edit_view_create(E_Desktop_Edit *editor, E_Comp *c) v->basic.check_changed = _e_desktop_edit_basic_check_changed; editor->cfd = - e_config_dialog_new(c, _("Desktop Entry Editor"), "E", + e_config_dialog_new(NULL, _("Desktop Entry Editor"), "E", "applications/new_application", "preferences-applications", 0, v, editor); @@ -297,7 +297,7 @@ _e_desktop_edit_create_data(E_Config_Dialog *cfd) cfdata = E_NEW(E_Config_Dialog_Data, 1); if (!cfdata) return NULL; - cfd->dia->win->state.no_reopen = EINA_TRUE; + e_win_no_reopen_set(cfd->dia->win, 1); cfdata->editor = cfd->data; /* @@ -822,7 +822,7 @@ _e_desktop_edit_basic_create_widgets(E_Config_Dialog *cfd __UNUSED__, Evas *evas e_widget_toolbook_page_show(otb, 0); e_util_win_auto_resize_fill(cfd->dia->win); - e_win_centered_set(cfd->dia->win, 1); + elm_win_center(cfd->dia->win, 1, 1); return otb; } @@ -844,7 +844,7 @@ _e_desktop_editor_cb_icon_select(void *data1, void *data2) if (editor->icon_fsel_dia) return; - dia = e_dialog_new(cfdata->editor->cfd->comp, "E", "_eap_icon_select_dialog"); + dia = e_dialog_new(NULL, "E", "_eap_icon_select_dialog"); if (!dia) return; e_object_del_attach_func_set(E_OBJECT(dia), _e_desktop_edit_cb_icon_select_destroy); @@ -868,14 +868,14 @@ _e_desktop_editor_cb_icon_select(void *data1, void *data2) if (path) { - o = e_widget_fsel_add(dia->win->evas, "/", path, NULL, NULL, + o = e_widget_fsel_add(evas_object_evas_get(dia->win), "/", path, NULL, NULL, _e_desktop_edit_select_cb, cfdata, NULL, cfdata, 1); free(path); } else { - o = e_widget_fsel_add(dia->win->evas, "~/", "/", NULL, NULL, + o = e_widget_fsel_add(evas_object_evas_get(dia->win), "~/", "/", NULL, NULL, _e_desktop_edit_select_cb, cfdata, NULL, cfdata, 1); } @@ -890,7 +890,7 @@ _e_desktop_editor_cb_icon_select(void *data1, void *data2) _e_desktop_edit_cb_icon_select_ok, cfdata); e_dialog_button_add(dia, _("Cancel"), NULL, _e_desktop_edit_cb_icon_select_cancel, cfdata); - e_win_centered_set(dia->win, 1); + elm_win_center(dia->win, 1, 1); e_dialog_show(dia); editor->icon_fsel_dia = dia; } @@ -910,7 +910,7 @@ _e_desktop_editor_cb_exec_select(void *data1, void *data2) if (editor->exec_fsel_dia) return; - dia = e_dialog_new(cfdata->editor->cfd->comp, "E", "_eap_exec_select_dialog"); + dia = e_dialog_new(NULL, "E", "_eap_exec_select_dialog"); if (!dia) return; e_object_del_attach_func_set(E_OBJECT(dia), _e_desktop_edit_cb_exec_select_destroy); @@ -930,7 +930,7 @@ _e_desktop_editor_cb_exec_select(void *data1, void *data2) if (path) { - o = e_widget_fsel_add(dia->win->evas, "/", path, NULL, NULL, + o = e_widget_fsel_add(evas_object_evas_get(dia->win), "/", path, NULL, NULL, _e_desktop_edit_select_cb, cfdata, NULL, cfdata, 1); free(path); @@ -938,7 +938,7 @@ _e_desktop_editor_cb_exec_select(void *data1, void *data2) } else { - o = e_widget_fsel_add(dia->win->evas, "~/", "/", NULL, NULL, + o = e_widget_fsel_add(evas_object_evas_get(dia->win), "~/", "/", NULL, NULL, _e_desktop_edit_select_cb, cfdata, NULL, cfdata, 1); } @@ -953,7 +953,7 @@ _e_desktop_editor_cb_exec_select(void *data1, void *data2) _e_desktop_edit_cb_exec_select_ok, cfdata); e_dialog_button_add(dia, _("Cancel"), NULL, _e_desktop_edit_cb_exec_select_cancel, cfdata); - e_win_centered_set(dia->win, 1); + elm_win_center(dia->win, 1, 1); e_dialog_show(dia); editor->exec_fsel_dia = dia; } diff --git a/src/bin/e_dialog.c b/src/bin/e_dialog.c index 34475c28b1..7b01b9f55b 100644 --- a/src/bin/e_dialog.c +++ b/src/bin/e_dialog.c @@ -3,8 +3,7 @@ /* local subsystem functions */ static void _e_dialog_free(E_Dialog *dia); static void _e_dialog_del_func_cb(void *data, E_Dialog *dia); -static void _e_dialog_cb_delete(E_Win *win); -static void _e_dialog_cb_resize(E_Win *win); +static void _e_dialog_cb_delete(void *data, Evas *e EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *event_info EINA_UNUSED); static void _e_dialog_cb_key_down(void *data, Evas *e, Evas_Object *obj, void *event); static void _e_dialog_cb_wid_on_focus(void *data, Evas_Object *obj); @@ -13,47 +12,50 @@ static void _e_dialog_cb_wid_on_focus(void *data, Evas_Object *obj); /* externally accessible functions */ static E_Dialog * -_e_dialog_internal_new(E_Comp *c, const char *name, const char *class, int dialog) +_e_dialog_internal_new(Evas_Object *parent, const char *name, const char *class, int dialog) { E_Dialog *dia; Evas_Object *o; Evas_Modifier_Mask mask; Eina_Bool kg; + Evas *e; - if (!c) c = e_util_comp_current_get(); dia = E_OBJECT_ALLOC(E_Dialog, E_DIALOG_TYPE, _e_dialog_free); if (!dia) return NULL; - dia->win = e_win_new(c); + if (dialog) + dia->win = elm_win_add(parent, name, ELM_WIN_DIALOG_BASIC); + else + dia->win = elm_win_add(parent, name, ELM_WIN_BASIC); if (!dia->win) { free(dia); return NULL; } - e_win_delete_callback_set(dia->win, _e_dialog_cb_delete); - e_win_resize_callback_set(dia->win, _e_dialog_cb_resize); - dia->win->data = dia; - if (dialog) e_win_dialog_set(dia->win, 1); - e_win_name_class_set(dia->win, name, class); - o = edje_object_add(e_win_evas_get(dia->win)); - dia->bg_object = o; + elm_win_modal_set(dia->win, !!parent); + e = evas_object_evas_get(dia->win); + evas_object_event_callback_add(dia->win, EVAS_CALLBACK_DEL, _e_dialog_cb_delete, dia); + ecore_evas_name_class_set(ecore_evas_ecore_evas_get(e), name, class); + dia->bg_object = o = edje_object_add(evas_object_evas_get(dia->win)); + EXPAND(o); + FILL(o); + elm_win_resize_object_add(dia->win, o); e_theme_edje_object_set(o, "base/theme/dialog", "e/widgets/dialog/main"); - evas_object_move(o, 0, 0); evas_object_show(o); - o = e_widget_list_add(e_win_evas_get(dia->win), 1, 1); + o = e_widget_list_add(evas_object_evas_get(dia->win), 1, 1); e_widget_on_focus_hook_set(o, _e_dialog_cb_wid_on_focus, dia); dia->box_object = o; edje_object_part_swallow(dia->bg_object, "e.swallow.buttons", o); e_dialog_resizable_set(dia, 1); - o = evas_object_rectangle_add(e_win_evas_get(dia->win)); + o = evas_object_rectangle_add(e); dia->event_object = o; mask = 0; kg = evas_object_key_grab(o, "Tab", mask, ~mask, 0); if (!kg) fprintf(stderr, "ERROR: unable to redirect \"Tab\" key events to object %p.\n", o); - mask = evas_key_modifier_mask_get(e_win_evas_get(dia->win), "Shift"); + mask = evas_key_modifier_mask_get(evas_object_evas_get(dia->win), "Shift"); kg = evas_object_key_grab(o, "Tab", mask, ~mask, 0); if (!kg) fprintf(stderr, "ERROR: unable to redirect \"Tab\" key events to object %p.\n", o); @@ -76,15 +78,15 @@ _e_dialog_internal_new(E_Comp *c, const char *name, const char *class, int dialo } EAPI E_Dialog * -e_dialog_new(E_Comp *c, const char *name, const char *class) +e_dialog_new(Evas_Object *parent, const char *name, const char *class) { - return _e_dialog_internal_new(c, name, class, 1); + return _e_dialog_internal_new(parent, name, class, 1); } EAPI E_Dialog * -e_dialog_normal_win_new(E_Comp *c, const char *name, const char *class) +e_dialog_normal_win_new(Evas_Object *parent, const char *name, const char *class) { - return _e_dialog_internal_new(c, name, class, 0); + return _e_dialog_internal_new(parent, name, class, 0); } EAPI void @@ -93,7 +95,7 @@ e_dialog_button_add(E_Dialog *dia, const char *label, const char *icon, E_Dialog Evas_Object *o; if (!func) func = _e_dialog_del_func_cb; - o = e_widget_button_add(e_win_evas_get(dia->win), label, icon, (void (*)(void *, void *))func, data, dia); + o = e_widget_button_add(evas_object_evas_get(dia->win), label, icon, (void (*)(void *, void *))func, data, dia); e_widget_list_object_append(dia->box_object, o, 1, 0, 0.5); dia->buttons = eina_list_append(dia->buttons, o); } @@ -132,7 +134,7 @@ e_dialog_button_disable_num_get(E_Dialog *dia, int button) EAPI void e_dialog_title_set(E_Dialog *dia, const char *title) { - e_win_title_set(dia->win, title); + elm_win_title_set(dia->win, title); } EAPI void @@ -142,7 +144,7 @@ e_dialog_text_set(E_Dialog *dia, const char *text) { Evas_Object *o; - o = edje_object_add(e_win_evas_get(dia->win)); + o = edje_object_add(evas_object_evas_get(dia->win)); dia->text_object = o; e_theme_edje_object_set(o, "base/theme/dialog", "e/widgets/dialog/text"); @@ -170,7 +172,7 @@ e_dialog_icon_set(E_Dialog *dia, const char *icon, Evas_Coord size) { if (!dia->icon_object) { - dia->icon_object = e_icon_add(e_win_evas_get(dia->win)); + dia->icon_object = e_icon_add(evas_object_evas_get(dia->win)); edje_object_part_swallow(dia->bg_object, "e.swallow.icon", dia->icon_object); evas_object_show(dia->icon_object); } @@ -188,7 +190,7 @@ e_dialog_border_icon_set(E_Dialog *dia, const char *icon) { E_Client *ec; - ec = dia->win->client; + ec = e_win_client_get(dia->win); if (ec) eina_stringshare_replace(&ec->internal_icon, icon); } @@ -202,8 +204,8 @@ e_dialog_content_set(E_Dialog *dia, Evas_Object *obj, Evas_Coord minw, Evas_Coor evas_object_size_hint_min_set(obj, minw, minh); edje_object_part_swallow(dia->bg_object, "e.swallow.content", obj); edje_object_size_min_calc(dia->bg_object, &mw, &mh); - e_win_resize(dia->win, mw, mh); - e_win_size_min_set(dia->win, mw, mh); + evas_object_resize(dia->win, mw, mh); + evas_object_size_hint_min_set(dia->bg_object, mw, mh); dia->min_w = mw; dia->min_h = mh; evas_object_show(obj); @@ -217,33 +219,22 @@ e_dialog_resizable_set(E_Dialog *dia, int resizable) { if (resizable) { - e_win_size_max_set(dia->win, 99999, 99999); + evas_object_size_hint_max_set(dia->bg_object, 99999, 99999); + evas_object_size_hint_weight_set(dia->bg_object, 1, 1); e_util_win_auto_resize_fill(dia->win); edje_object_signal_emit(dia->bg_object, "e,state,resizable", "e"); } else { - e_win_resize(dia->win, dia->min_w, dia->min_h); - e_win_size_max_set(dia->win, dia->min_w, dia->min_h); + evas_object_resize(dia->win, dia->min_w, dia->min_h); + evas_object_size_hint_weight_set(dia->bg_object, 0, 0); + evas_object_size_hint_max_set(dia->bg_object, dia->min_w, dia->min_h); edje_object_signal_emit(dia->bg_object, "e,state,no_resizable", "e"); } } } EAPI void -e_dialog_parent_set(E_Dialog *dia, E_Win *win) -{ - if (!dia) return; -#ifndef HAVE_WAYLAND_ONLY - if (win) - ecore_x_icccm_transient_for_set(dia->win->evas_win, win->evas_win); - else - ecore_x_icccm_transient_for_unset(dia->win->evas_win); -#endif - ecore_evas_modal_set(dia->win->ecore_evas, !!win); -} - -EAPI void e_dialog_show(E_Dialog *dia) { Evas_Coord mw, mh; @@ -263,17 +254,21 @@ e_dialog_show(E_Dialog *dia) edje_object_part_swallow(dia->bg_object, "e.swallow.buttons", o); edje_object_size_min_calc(dia->bg_object, &mw, &mh); - e_win_resize(dia->win, mw, mh); - e_win_size_min_set(dia->win, mw, mh); + evas_object_size_hint_min_set(dia->bg_object, mw, mh); + evas_object_resize(dia->win, mw, mh); dia->min_w = mw; dia->min_h = mh; - if (!dia->resizable) e_win_size_max_set(dia->win, mw, mh); + if (!dia->resizable) + { + evas_object_size_hint_weight_set(dia->bg_object, 0, 0); + evas_object_size_hint_max_set(dia->bg_object, mw, mh); + } else { - e_win_size_max_set(dia->win, 99999, 99999); + evas_object_size_hint_max_set(dia->win, 99999, 99999); e_util_win_auto_resize_fill(dia->win); } - e_win_show(dia->win); + evas_object_show(dia->win); if (!e_widget_focus_get(dia->box_object)) e_widget_focus_set(dia->box_object, 1); @@ -290,7 +285,7 @@ _e_dialog_free(E_Dialog *dia) if (dia->bg_object) evas_object_del(dia->bg_object); if (dia->content_object) evas_object_del(dia->content_object); if (dia->event_object) evas_object_del(dia->event_object); - e_object_del(E_OBJECT(dia->win)); + evas_object_del(dia->win); free(dia); } @@ -310,7 +305,7 @@ _e_dialog_cb_key_down(void *data, Evas *e __UNUSED__, Evas_Object *obj __UNUSED_ dia = data; if (!strcmp(ev->key, "Tab")) { - if (evas_key_modifier_is_set(evas_key_modifier_get(e_win_evas_get(dia->win)), "Shift")) + if (evas_key_modifier_is_set(evas_key_modifier_get(evas_object_evas_get(dia->win)), "Shift")) { if (e_widget_focus_get(dia->box_object)) { @@ -371,21 +366,9 @@ _e_dialog_cb_key_down(void *data, Evas *e __UNUSED__, Evas_Object *obj __UNUSED_ } static void -_e_dialog_cb_delete(E_Win *win) +_e_dialog_cb_delete(void *data, Evas *e EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *event_info EINA_UNUSED) { - E_Dialog *dia; - - dia = win->data; - e_object_del(E_OBJECT(dia)); -} - -static void -_e_dialog_cb_resize(E_Win *win) -{ - E_Dialog *dia; - - dia = win->data; - evas_object_resize(dia->bg_object, dia->win->w, dia->win->h); + e_object_del(E_OBJECT(data)); } static void diff --git a/src/bin/e_dialog.h b/src/bin/e_dialog.h index 44adc67d81..acfddd0f54 100644 --- a/src/bin/e_dialog.h +++ b/src/bin/e_dialog.h @@ -13,7 +13,7 @@ struct _E_Dialog { E_Object e_obj_inherit; - E_Win *win; + Evas_Object *win; Evas_Object *bg_object; Evas_Object *box_object; Evas_Object *text_object; @@ -28,9 +28,8 @@ struct _E_Dialog typedef void (*E_Dialog_Cb)(void *data, E_Dialog *dia); -EAPI E_Dialog *e_dialog_new (E_Comp *c, const char *name, const char *class); -EAPI E_Dialog *e_dialog_normal_win_new (E_Comp *c, const char *name, const char *class); -EAPI void e_dialog_parent_set(E_Dialog *dia, E_Win *win); +EAPI E_Dialog *e_dialog_new (Evas_Object *parent, const char *name, const char *class); +EAPI E_Dialog *e_dialog_normal_win_new (Evas_Object *parent, const char *name, const char *class); EAPI void e_dialog_button_add (E_Dialog *dia, const char *label, const char *icon, E_Dialog_Cb func, void *data); EAPI int e_dialog_button_focus_num (E_Dialog *dia, int button); EAPI int e_dialog_button_disable_num_set (E_Dialog *dia, int button, int disabled); diff --git a/src/bin/e_dnd.c b/src/bin/e_dnd.c index 79f6dc56ca..832d1dc366 100644 --- a/src/bin/e_dnd.c +++ b/src/bin/e_dnd.c @@ -673,7 +673,15 @@ _e_drag_coords_update(const E_Drop_Handler *h, int *dx, int *dy) *dx = 0; *dy = 0; - if (h->obj) + if (e_obj_is_win(h->obj)) + { + E_Client *ec; + + ec = e_win_client_get((void*)h->obj); + px = ec->x; + py = ec->y; + } + else if (h->obj) { switch (h->obj->type) { @@ -682,21 +690,19 @@ _e_drag_coords_update(const E_Drop_Handler *h, int *dx, int *dy) case E_GADCON_TYPE: gc = (E_Gadcon *)h->obj; if (!gc->toolbar) return; - px = gc->toolbar->fwin->x; - py = gc->toolbar->fwin->y; + evas_object_geometry_get(gc->toolbar->fwin, &px, &py, NULL, NULL); break; case E_GADCON_CLIENT_TYPE: gc = ((E_Gadcon_Client *)(h->obj))->gadcon; e_gadcon_canvas_zone_geometry_get(gc, &px, &py, NULL, NULL); if (!gc->toolbar) break; - px += gc->toolbar->fwin->x; - py += gc->toolbar->fwin->y; - break; + { + int x, y; - case E_WIN_TYPE: - px = ((E_Win *)(h->obj))->client->x; - py = ((E_Win *)(h->obj))->client->y; + evas_object_geometry_get(gc->toolbar->fwin, &x, &y, NULL, NULL); + px += x, py += y; + } break; case E_ZONE_TYPE: @@ -725,6 +731,8 @@ _e_drag_win_get(const E_Drop_Handler *h, int xdnd) { Ecore_X_Window hwin = 0; + if (e_obj_is_win(h->obj)) + return elm_win_window_id_get((Evas_Object*)h->obj); if (h->obj) { E_Gadcon *gc = NULL; @@ -738,7 +746,7 @@ _e_drag_win_get(const E_Drop_Handler *h, int xdnd) case E_GADCON_TYPE: if (!gc) gc = (E_Gadcon *)h->obj; - if (gc->toolbar) hwin = e_client_util_pwin_get(gc->toolbar->fwin->client); //double check for xdnd... + if (gc->toolbar) hwin = e_client_util_pwin_get(e_win_client_get(gc->toolbar->fwin)); //double check for xdnd... else { if (xdnd) hwin = e_gadcon_xdnd_window_get(gc); @@ -746,10 +754,6 @@ _e_drag_win_get(const E_Drop_Handler *h, int xdnd) } break; - case E_WIN_TYPE: - hwin = ((E_Win *)(h->obj))->evas_win; - break; - case E_CLIENT_TYPE: case E_ZONE_TYPE: hwin = e_comp_get(h->obj)->ee_win; @@ -780,6 +784,7 @@ _e_drag_win_show(E_Drop_Handler *h) if (h->obj) { + if (e_obj_is_win(h->obj)) return; switch (h->obj->type) { case E_GADCON_TYPE: @@ -806,6 +811,7 @@ _e_drag_win_hide(E_Drop_Handler *h) if (h->obj) { + if (e_obj_is_win(h->obj)) return; switch (h->obj->type) { case E_GADCON_TYPE: @@ -833,6 +839,8 @@ _e_dnd_object_layer_get(E_Drop_Handler *h) if (h->base) return evas_object_layer_get(h->base); if (!obj) return 0; + if (e_obj_is_win(obj)) + obj = (E_Object*)e_win_client_get((Evas_Object*)obj); switch (obj->type) { case E_GADCON_CLIENT_TYPE: diff --git a/src/bin/e_entry.c b/src/bin/e_entry.c index 393547ecac..cbee1f6ed2 100644 --- a/src/bin/e_entry.c +++ b/src/bin/e_entry.c @@ -576,7 +576,7 @@ _e_entry_x_selection_update(Evas_Object *entry) { E_Entry_Smart_Data *sd; Ecore_Window xwin; - E_Win *win; + Evas_Object *win; E_Comp *c; if ((!entry) || (!(sd = evas_object_smart_data_get(entry)))) @@ -592,7 +592,7 @@ _e_entry_x_selection_update(Evas_Object *entry) } } else - xwin = win->evas_win; + xwin = elm_win_window_id_get(win); if (sd->password_mode) return; @@ -613,7 +613,7 @@ _entry_paste_request_signal_cb(void *data, const char *source EINA_UNUSED) { Ecore_Window xwin; - E_Win *win; + Evas_Object *win; E_Comp *c; if (!(win = e_win_evas_object_win_get(data))) @@ -627,7 +627,7 @@ _entry_paste_request_signal_cb(void *data, } } else - xwin = win->evas_win; + xwin = elm_win_window_id_get(win); #ifndef HAVE_WAYLAND_ONLY if (emission[sizeof("ntry,paste,request,")] == '1') @@ -967,15 +967,15 @@ _e_entry_cb_copy(void *data, E_Menu *m __UNUSED__, E_Menu_Item *mi __UNUSED__) { E_Entry_Smart_Data *sd = data; const char *range; - Ecore_X_Window xwin; - E_Win *win; + Ecore_Window xwin; + Evas_Object *win; if (!sd) return; range = edje_object_part_text_selection_get(sd->entry_object, ENTRY_PART_NAME); if (range) { win = e_win_evas_object_win_get(sd->entry_object); - if (win) xwin = win->evas_win; + if (win) xwin = elm_win_window_id_get(win); else { xwin = e_grabinput_key_win_get(); @@ -998,15 +998,15 @@ static void _e_entry_cb_paste(void *data, E_Menu *m __UNUSED__, E_Menu_Item *mi __UNUSED__) { E_Entry_Smart_Data *sd; - Ecore_X_Window xwin; - E_Win *win; + Ecore_Window xwin; + Evas_Object *win; sd = data; if (!sd) return; if ((!sd->enabled) || (sd->noedit)) return; win = e_win_evas_object_win_get(sd->entry_object); - if (win) xwin = win->evas_win; + if (win) xwin = elm_win_window_id_get(win); else { xwin = e_grabinput_key_win_get(); diff --git a/src/bin/e_entry_dialog.c b/src/bin/e_entry_dialog.c index fab7d5884e..1a3d24bb5b 100644 --- a/src/bin/e_entry_dialog.c +++ b/src/bin/e_entry_dialog.c @@ -5,7 +5,7 @@ static void _e_entry_dia_del(void *data); static void _e_entry_dialog_free(E_Entry_Dialog *dia); static void _e_entry_dialog_ok(void *data, E_Dialog *dia); static void _e_entry_dialog_cancel(void *data, E_Dialog *dia); -static void _e_entry_dialog_delete(E_Win *win); +static void _e_entry_dialog_delete(E_Dialog *dia, Evas *e EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *event_info EINA_UNUSED); static void _e_entry_cb_key_down(void *data, Evas_Object *obj, void *event_info); /* Externally accesible functions */ @@ -21,6 +21,7 @@ e_entry_dialog_show(const char *title, const char *icon, const char *text, Evas_Object *o, *ob; Evas_Modifier_Mask mask; int w, h; + Evas *e; ed = E_OBJECT_ALLOC(E_Entry_Dialog, E_ENTRY_DIALOG_TYPE, _e_entry_dialog_free); ed->ok.func = ok_func; @@ -42,19 +43,20 @@ e_entry_dialog_show(const char *title, const char *icon, const char *text, mask = 0; evas_object_key_ungrab(dia->event_object, "space", mask, ~mask); e_object_del_attach_func_set(E_OBJECT(dia), _e_entry_dia_del); - e_win_delete_callback_set(dia->win, _e_entry_dialog_delete); + evas_object_event_callback_add(dia->win, EVAS_CALLBACK_DEL, (Evas_Object_Event_Cb)_e_entry_dialog_delete, dia); if (title) e_dialog_title_set(dia, title); if (icon) e_dialog_icon_set(dia, icon, 64); - o = e_widget_list_add(dia->win->evas, 0, 0); + e = evas_object_evas_get(dia->win); + o = e_widget_list_add(e, 0, 0); if (text) { - ob = e_widget_label_add(dia->win->evas, text); + ob = e_widget_label_add(e, text); e_widget_list_object_append(o, ob, 1, 0, 0.5); } - ed->entry = e_widget_entry_add(dia->win->evas, &(ed->text), NULL, NULL, NULL); + ed->entry = e_widget_entry_add(e, &(ed->text), NULL, NULL, NULL); evas_object_smart_callback_add(ed->entry, "key_down", _e_entry_cb_key_down, ed); e_widget_list_object_append(o, ed->entry, 1, 1, 0.5); e_widget_size_min_get(o, &w, &h); @@ -63,7 +65,7 @@ e_entry_dialog_show(const char *title, const char *icon, const char *text, e_dialog_button_add(dia, !button_text ? _("OK") : button_text, NULL, _e_entry_dialog_ok, ed); e_dialog_button_add(dia, !button2_text ? _("Cancel") : button2_text, NULL, _e_entry_dialog_cancel, ed); - e_win_centered_set(dia->win, 1); + elm_win_center(dia->win, 1, 1); e_dialog_show(dia); e_widget_focus_set(ed->entry, 1); e_widget_entry_select_all(ed->entry); @@ -76,7 +78,7 @@ _e_entry_dia_del(void *data) { E_Dialog *dia = data; - e_win_delete_callback_set(dia->win, _e_entry_dialog_delete); + evas_object_event_callback_add(dia->win, EVAS_CALLBACK_DEL, (Evas_Object_Event_Cb)_e_entry_dialog_delete, dia); e_object_del(dia->data); } @@ -113,14 +115,9 @@ _e_entry_dialog_cancel(void *data, E_Dialog *dia __UNUSED__) } static void -_e_entry_dialog_delete(E_Win *win) +_e_entry_dialog_delete(E_Dialog *dia, Evas *e EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *event_info EINA_UNUSED) { - E_Dialog *dia; - E_Entry_Dialog *ed; - - dia = win->data; - ed = dia->data; - e_object_del(E_OBJECT(ed)); + e_object_del(E_OBJECT(dia->data)); } static void diff --git a/src/bin/e_exec.c b/src/bin/e_exec.c index cf35049b36..81a7bdaa46 100644 --- a/src/bin/e_exec.c +++ b/src/bin/e_exec.c @@ -766,7 +766,7 @@ _e_exec_cb_exit(void *data __UNUSED__, int type __UNUSED__, void *event) e_dialog_text_set(dia, buf); e_dialog_button_add(dia, _("OK"), NULL, NULL, NULL); e_dialog_button_focus_num(dia, 1); - e_win_centered_set(dia->win, 1); + elm_win_center(dia->win, 1, 1); e_dialog_show(dia); } } diff --git a/src/bin/e_fm.c b/src/bin/e_fm.c index 354d37cade..a4f4e0ef09 100644 --- a/src/bin/e_fm.c +++ b/src/bin/e_fm.c @@ -1077,7 +1077,7 @@ e_fm2_path_set(Evas_Object *obj, const char *dev, const char *path) snprintf(text, sizeof(text), _("%s doesn't exist."), real_path); e_dialog_text_set(dialog, text); - e_win_centered_set(dialog->win, 1); + elm_win_center(dialog->win, 1, 1); e_dialog_show(dialog); return; } @@ -10085,7 +10085,7 @@ _e_fm2_view_image_sel(E_Fm2_Smart_Data *sd, const char *title, e_dialog_resizable_set(dia, 1); e_dialog_title_set(dia, title); - o = e_widget_fsel_add(dia->win->evas, "/", sd->realpath, NULL, NULL, NULL, sd, NULL, sd, 1); + o = e_widget_fsel_add(evas_object_evas_get(dia->win), "/", sd->realpath, NULL, NULL, NULL, sd, NULL, sd, 1); evas_object_show(o); e_widget_size_min_get(o, &w, &h); e_dialog_content_set(dia, o, w, h); @@ -10093,7 +10093,7 @@ _e_fm2_view_image_sel(E_Fm2_Smart_Data *sd, const char *title, e_dialog_button_add(dia, _("OK"), NULL, ok_cb, sd); e_dialog_button_add(dia, _("Cancel"), NULL, _e_fm2_view_image_sel_close, sd); - e_win_centered_set(dia->win, 1); + elm_win_center(dia->win, 1, 1); e_object_data_set(E_OBJECT(dia), sd); e_object_del_attach_func_set(E_OBJECT(dia), _image_sel_del); e_dialog_show(dia); @@ -10530,7 +10530,7 @@ _e_fm_retry_abort_dialog(int pid, const char *str) str); e_dialog_text_set(dialog, text); - e_win_centered_set(dialog->win, 1); + elm_win_center(dialog->win, 1, 1); e_dialog_show(dialog); return dialog; } @@ -10592,7 +10592,7 @@ _e_fm_overwrite_dialog(int pid, const char *str) _("File already exists, overwrite?<br><hilight>%s</hilight>"), str); e_dialog_text_set(dialog, text); - e_win_centered_set(dialog->win, 1); + elm_win_center(dialog->win, 1, 1); e_dialog_show(dialog); return dialog; } @@ -10760,7 +10760,7 @@ _e_fm_error_dialog(int pid, const char *str) str); e_dialog_text_set(dialog, text); - e_win_centered_set(dialog->win, 1); + elm_win_center(dialog->win, 1, 1); e_dialog_show(dialog); return dialog; } @@ -10864,7 +10864,7 @@ _e_fm_device_error_dialog(const char *title, const char *msg, const char *pstr) snprintf(text, sizeof(text), "%s<br>%s<br>%s<br>%s<br>%s", msg, u, d, n, m); e_dialog_text_set(dialog, text); - e_win_centered_set(dialog->win, 1); + elm_win_center(dialog->win, 1, 1); e_dialog_button_focus_num(dialog, 0); e_dialog_show(dialog); } @@ -10969,7 +10969,7 @@ _e_fm2_file_delete(Evas_Object *obj) } if (sel) eina_list_free(sel); e_dialog_text_set(dialog, text); - e_win_centered_set(dialog->win, 1); + elm_win_center(dialog->win, 1, 1); e_dialog_show(dialog); } diff --git a/src/bin/e_fm_prop.c b/src/bin/e_fm_prop.c index 853194d9d4..08ff4d7bbb 100644 --- a/src/bin/e_fm_prop.c +++ b/src/bin/e_fm_prop.c @@ -94,7 +94,7 @@ struct _E_Config_Dialog_Data /* a nice easy setup function that does the dirty work */ EAPI E_Config_Dialog * -e_fm_prop_file(E_Comp *c, E_Fm2_Icon *ic) +e_fm_prop_file(E_Comp *c EINA_UNUSED, E_Fm2_Icon *ic) { E_Config_Dialog *cfd; E_Config_Dialog_View *v; @@ -111,7 +111,7 @@ e_fm_prop_file(E_Comp *c, E_Fm2_Icon *ic) v->advanced.create_widgets = _advanced_create_widgets; #endif /* create config dialog for NULL object/data */ - cfd = e_config_dialog_new(c, + cfd = e_config_dialog_new(NULL, _("File Properties"), "E", "_fm_prop", "enlightenment/file_properties", 0, v, ic); @@ -605,7 +605,7 @@ _cb_icon_sel(void *data, void *data2) cfd = data2; if (!cfd) return; - dia = e_dialog_new(cfd->comp, "E", "_fm2_file_properties_icon_select_dialog"); + dia = e_dialog_new(NULL, "E", "_fm2_file_properties_icon_select_dialog"); if (!dia) return; // if (cfdata->type == EDJ) // e_dialog_title_set(dia, _("Select an Edj File")); @@ -613,7 +613,7 @@ _cb_icon_sel(void *data, void *data2) e_dialog_title_set(dia, _("Select an Image")); dia->data = cfdata; - o = e_widget_fsel_add(dia->win->evas, "~/", "/", NULL, NULL, + o = e_widget_fsel_add(evas_object_evas_get(dia->win), "~/", "/", NULL, NULL, _cb_fsel_sel, cfdata, NULL, cfdata, 1); cfdata->gui.fsel_wid = o; @@ -624,7 +624,7 @@ _cb_icon_sel(void *data, void *data2) e_dialog_button_add(dia, _("OK"), NULL, _cb_fsel_ok, cfdata); e_dialog_button_add(dia, _("Cancel"), NULL, _cb_fsel_cancel, cfdata); e_util_win_auto_resize_fill(dia->win); - e_win_centered_set(dia->win, 1); + elm_win_center(dia->win, 1, 1); e_dialog_show(dia); e_object_del_attach_func_set(E_OBJECT(dia), _dia_del); diff --git a/src/bin/e_gadcon.c b/src/bin/e_gadcon.c index 329b977609..8a24a82978 100644 --- a/src/bin/e_gadcon.c +++ b/src/bin/e_gadcon.c @@ -763,7 +763,7 @@ e_gadcon_zone_get(E_Gadcon *gc) E_OBJECT_TYPE_CHECK_RETURN(gc, E_GADCON_TYPE, NULL); if (gc->zone) return gc->zone; if (!gc->toolbar) return NULL; - return gc->toolbar->fwin->client->zone; + return e_win_client_get(gc->toolbar->fwin)->zone; } EAPI void @@ -5786,10 +5786,10 @@ e_gadcon_client_visible_get(const E_Gadcon_Client *gcc, const E_Desk *desk) break; case E_GADCON_SITE_TOOLBAR: case E_GADCON_SITE_EFM_TOOLBAR: - if (desk) return (gcc->gadcon->toolbar->fwin->client->desk == desk); + if (desk) return (e_win_client_get(gcc->gadcon->toolbar->fwin)->desk == desk); EINA_LIST_FOREACH(e_comp_list(), l, c) EINA_LIST_FOREACH(c->zones, ll, zone) - if (gcc->gadcon->toolbar->fwin->client->desk == e_desk_current_get(zone)) return EINA_TRUE; + if (e_win_client_get(gcc->gadcon->toolbar->fwin)->desk == e_desk_current_get(zone)) return EINA_TRUE; default: break; } diff --git a/src/bin/e_grab_dialog.c b/src/bin/e_grab_dialog.c index c2a943e59c..083e8b5eb9 100644 --- a/src/bin/e_grab_dialog.c +++ b/src/bin/e_grab_dialog.c @@ -83,14 +83,9 @@ _e_grab_dialog_free(E_Grab_Dialog *eg) } static void -_e_grab_dialog_delete(E_Win *win) +_e_grab_dialog_delete(void *data, Evas *e EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *event_info EINA_UNUSED) { - E_Dialog *dia; - E_Grab_Dialog *eg; - - dia = win->data; - eg = dia->data; - e_object_del(E_OBJECT(eg)); + e_object_del(data); } static void @@ -102,45 +97,40 @@ _e_grab_dialog_dia_del(void *data) } EAPI E_Grab_Dialog * -e_grab_dialog_show(E_Win *parent, Eina_Bool is_mouse, Ecore_Event_Handler_Cb key, Ecore_Event_Handler_Cb mouse, Ecore_Event_Handler_Cb wheel, const void *data) +e_grab_dialog_show(Evas_Object *parent, Eina_Bool is_mouse, Ecore_Event_Handler_Cb key, Ecore_Event_Handler_Cb mouse, Ecore_Event_Handler_Cb wheel, const void *data) { - E_Comp *c = NULL; E_Grab_Dialog *eg; Ecore_Event_Handler *eh; if (parent) - { - c = parent->comp; - evas_object_focus_set(parent->client->frame, 0); - } - else - c = e_comp_get(NULL); + evas_object_focus_set(e_win_client_get(parent)->frame, 0); eg = E_OBJECT_ALLOC(E_Grab_Dialog, E_GRAB_DIALOG_TYPE, _e_grab_dialog_free); if (!eg) return NULL; if (is_mouse) { - eg->dia = e_dialog_new(c, "E", "_mousebind_getmouse_dialog"); + eg->dia = e_dialog_new(parent, "E", "_mousebind_getmouse_dialog"); e_dialog_title_set(eg->dia, _("Mouse Binding Combination")); e_dialog_icon_set(eg->dia, "preferences-desktop-mouse", 48); e_dialog_text_set(eg->dia, TEXT_PRESS_MOUSE_BINIDING_SEQUENCE); } else { - eg->dia = e_dialog_new(c, "E", "_keybind_getkey_dialog"); + eg->dia = e_dialog_new(parent, "E", "_keybind_getkey_dialog"); e_dialog_title_set(eg->dia, _("Key Binding Combination")); e_dialog_icon_set(eg->dia, "preferences-desktop-keyboard-shortcuts", 48); e_dialog_text_set(eg->dia, TEXT_PRESS_KEY_SEQUENCE); } eg->dia->data = eg; - e_win_centered_set(eg->dia->win, 1); - e_win_borderless_set(eg->dia->win, 1); + elm_win_center(eg->dia->win, 1, 1); + elm_win_borderless_set(eg->dia->win, 1); + e_dialog_resizable_set(eg->dia, 0); e_object_del_attach_func_set(E_OBJECT(eg->dia), _e_grab_dialog_dia_del); - e_win_delete_callback_set(eg->dia->win, _e_grab_dialog_delete); + evas_object_event_callback_add(eg->dia->win, EVAS_CALLBACK_DEL, _e_grab_dialog_delete, eg); #ifndef HAVE_WAYLAND_ONLY - eg->grab_win = ecore_x_window_input_new(c->man->root, 0, 0, 1, 1); + eg->grab_win = ecore_x_window_input_new(e_comp_get(NULL)->man->root, 0, 0, 1, 1); ecore_x_window_show(eg->grab_win); e_grabinput_get(eg->grab_win, 0, eg->grab_win); #endif @@ -160,9 +150,7 @@ e_grab_dialog_show(E_Win *parent, Eina_Bool is_mouse, Ecore_Event_Handler_Cb key eg->handlers = eina_list_append(eg->handlers, eh); } e_dialog_show(eg->dia); - evas_object_layer_set(eg->dia->win->client->frame, E_LAYER_CLIENT_ABOVE); - if (parent) - e_dialog_parent_set(eg->dia, parent); + evas_object_layer_set(e_win_client_get(eg->dia->win)->frame, E_LAYER_CLIENT_PRIO); return eg; } diff --git a/src/bin/e_grab_dialog.h b/src/bin/e_grab_dialog.h index 196ec9540c..d3adcc2b9f 100644 --- a/src/bin/e_grab_dialog.h +++ b/src/bin/e_grab_dialog.h @@ -21,7 +21,7 @@ struct _E_Grab_Dialog void *data; }; -EAPI E_Grab_Dialog *e_grab_dialog_show(E_Win *parent, Eina_Bool is_mouse, Ecore_Event_Handler_Cb key, Ecore_Event_Handler_Cb mouse, Ecore_Event_Handler_Cb wheel, const void *data); +EAPI E_Grab_Dialog *e_grab_dialog_show(Evas_Object *parent, Eina_Bool is_mouse, Ecore_Event_Handler_Cb key, Ecore_Event_Handler_Cb mouse, Ecore_Event_Handler_Cb wheel, const void *data); #endif #endif diff --git a/src/bin/e_import_config_dialog.c b/src/bin/e_import_config_dialog.c index 6dccea7e6d..5575d30655 100644 --- a/src/bin/e_import_config_dialog.c +++ b/src/bin/e_import_config_dialog.c @@ -26,7 +26,7 @@ _import_edj_gen(E_Import_Config_Dialog *import) FILE *f; size_t len, off; - evas = e_win_evas_get(import->dia->win); + evas = evas_object_evas_get(import->dia->win); file = ecore_file_file_get(import->file); fstrip = ecore_file_strip_ext(file); if (!fstrip) return; @@ -332,7 +332,7 @@ _import_cb_ok(void *data, E_Dialog *dia __UNUSED__) if (!eina_str_has_extension(file, "edj")) { _import_edj_gen(import); - e_win_hide(import->dia->win); + evas_object_hide(import->dia->win); return; } e_user_dir_snprintf(buf, sizeof(buf), "backgrounds/%s", file); @@ -418,12 +418,11 @@ _e_import_config_dialog_del(void *data) } static void -_e_import_config_dialog_win_del(E_Win *win) +_e_import_config_dialog_win_del(void *data, Evas *e EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *event_info EINA_UNUSED) { - E_Dialog *dia; + E_Dialog *dia = data; E_Import_Config_Dialog *import; - dia = win->data; import = dia->data; if (!import) return; e_object_ref(E_OBJECT(import)); @@ -435,7 +434,7 @@ _e_import_config_dialog_win_del(E_Win *win) /////////////////////////////////////////////////////////////////////////////////// EAPI E_Import_Config_Dialog * -e_import_config_dialog_show(E_Comp *c, const char *path, Ecore_End_Cb ok, Ecore_Cb cancel) +e_import_config_dialog_show(Evas_Object *parent, const char *path, Ecore_End_Cb ok, Ecore_Cb cancel) { Evas *evas; E_Dialog *dia; @@ -449,7 +448,7 @@ e_import_config_dialog_show(E_Comp *c, const char *path, Ecore_End_Cb ok, Ecore_ import = E_OBJECT_ALLOC(E_Import_Config_Dialog, E_IMPORT_CONFIG_DIALOG_TYPE, _e_import_config_dialog_del); if (!import) return NULL; - dia = e_dialog_new(c, "E", "_import_config_dialog"); + dia = e_dialog_new(parent, "E", "_import_config_dialog"); if (!dia) { e_object_del(E_OBJECT(import)); @@ -463,14 +462,14 @@ e_import_config_dialog_show(E_Comp *c, const char *path, Ecore_End_Cb ok, Ecore_ import->ok = ok, import->cancel = cancel; import->path = eina_stringshare_add(path); e_object_del_attach_func_set(E_OBJECT(dia), _e_import_config_dia_del); - e_win_delete_callback_set(dia->win, _e_import_config_dialog_win_del); + evas_object_event_callback_add(dia->win, EVAS_CALLBACK_DEL, _e_import_config_dialog_win_del, dia); import->method = IMPORT_SCALE_ASPECT_OUT; import->external = 0; import->quality = 90; import->file = eina_stringshare_add(path); - evas = e_win_evas_get(dia->win); + evas = evas_object_evas_get(dia->win); o = e_widget_list_add(evas, 0, 0); @@ -540,7 +539,7 @@ e_import_config_dialog_show(E_Comp *c, const char *path, Ecore_End_Cb ok, Ecore_ e_dialog_content_set(dia, o, w, h); e_dialog_button_add(dia, _("OK"), NULL, _import_cb_ok, import); e_dialog_button_add(dia, _("Cancel"), NULL, _import_cb_close, import); - e_win_centered_set(dia->win, 1); + elm_win_center(dia->win, 1, 1); e_dialog_border_icon_set(dia, "folder-image"); e_dialog_button_focus_num(dia, 0); e_dialog_show(dia); diff --git a/src/bin/e_import_config_dialog.h b/src/bin/e_import_config_dialog.h index 805998e237..620fa00a65 100644 --- a/src/bin/e_import_config_dialog.h +++ b/src/bin/e_import_config_dialog.h @@ -26,7 +26,7 @@ struct _E_Import_Config_Dialog E_Dialog *dia; }; -EAPI E_Import_Config_Dialog *e_import_config_dialog_show(E_Comp *c, const char *path, Ecore_End_Cb ok, Ecore_Cb cancel); +EAPI E_Import_Config_Dialog *e_import_config_dialog_show(Evas_Object *parent, const char *path, Ecore_End_Cb ok, Ecore_Cb cancel); #endif #endif diff --git a/src/bin/e_import_dialog.c b/src/bin/e_import_dialog.c index c08682125d..5e4ea87952 100644 --- a/src/bin/e_import_dialog.c +++ b/src/bin/e_import_dialog.c @@ -54,8 +54,7 @@ _fsel_cb_ok(void *data, E_Dialog *dia __UNUSED__) if ((p) && (strcasecmp(p, ".edj"))) { E_Import_Config_Dialog *import; - import = e_import_config_dialog_show(id->dia->win->comp, path, _import_ok, NULL); - e_dialog_parent_set(import->dia, id->dia->win); + import = e_import_config_dialog_show(id->dia->win, path, _import_ok, NULL); e_object_data_set(E_OBJECT(import), id); return; } @@ -121,12 +120,11 @@ _e_import_dialog_del(void *data) } static void -_e_import_dialog_win_del(E_Win *win) +_e_import_dialog_win_del(void *data, Evas *e EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *event_info EINA_UNUSED) { - E_Dialog *dia; + E_Dialog *dia = data; E_Import_Dialog *id; - dia = win->data; id = dia->data; if (id) e_object_del(E_OBJECT(id)); @@ -135,7 +133,7 @@ _e_import_dialog_win_del(E_Win *win) ////////////////////////////////////////////////////////////////////////////////// EAPI E_Import_Dialog * -e_import_dialog_show(E_Comp *c, const char *dev, const char *path, Ecore_End_Cb ok, Ecore_Cb cancel) +e_import_dialog_show(Evas_Object *parent EINA_UNUSED, const char *dev, const char *path, Ecore_End_Cb ok, Ecore_Cb cancel) { Evas *evas; E_Import_Dialog *id; @@ -148,7 +146,7 @@ e_import_dialog_show(E_Comp *c, const char *dev, const char *path, Ecore_End_Cb id = E_OBJECT_ALLOC(E_Import_Dialog, E_IMPORT_DIALOG_TYPE, _e_import_dialog_del); if (!id) return NULL; - dia = e_dialog_new(c, "E", "_import_fsel_dialog"); + dia = e_dialog_new(NULL, "E", "_import_fsel_dialog"); if (!dia) { e_object_del(E_OBJECT(id)); @@ -160,9 +158,9 @@ e_import_dialog_show(E_Comp *c, const char *dev, const char *path, Ecore_End_Cb id->dia = dia; id->ok = ok, id->cancel = cancel; e_object_del_attach_func_set(E_OBJECT(dia), _e_import_dia_del); - e_win_delete_callback_set(dia->win, _e_import_dialog_win_del); + evas_object_event_callback_add(dia->win, EVAS_CALLBACK_DEL, _e_import_dialog_win_del, dia); - evas = e_win_evas_get(dia->win); + evas = evas_object_evas_get(dia->win); e_dialog_title_set(dia, _("Select a Picture...")); fdev = dev ? : e_config->wallpaper_import_last_dev; @@ -199,7 +197,7 @@ e_import_dialog_show(E_Comp *c, const char *dev, const char *path, Ecore_End_Cb e_dialog_button_add(dia, _("Cancel"), NULL, _fsel_cb_close, id); e_dialog_border_icon_set(dia, "enlightenment/background"); e_dialog_show(dia); - e_win_centered_set(dia->win, 1); + elm_win_center(dia->win, 1, 1); e_widget_focus_set(ofm, 1); return id; diff --git a/src/bin/e_import_dialog.h b/src/bin/e_import_dialog.h index 6722cb8629..a18999b16c 100644 --- a/src/bin/e_import_dialog.h +++ b/src/bin/e_import_dialog.h @@ -15,7 +15,7 @@ struct _E_Import_Dialog E_Dialog *dia; }; -EAPI E_Import_Dialog *e_import_dialog_show(E_Comp *c, const char *dev, const char *path, Ecore_End_Cb ok, Ecore_Cb cancel); +EAPI E_Import_Dialog *e_import_dialog_show(Evas_Object *parent, const char *dev, const char *path, Ecore_End_Cb ok, Ecore_Cb cancel); #endif #endif diff --git a/src/bin/e_includes.h b/src/bin/e_includes.h index 65383591a5..809f0f188e 100644 --- a/src/bin/e_includes.h +++ b/src/bin/e_includes.h @@ -25,7 +25,6 @@ #include "e_init.h" #include "e_int_menus.h" #include "e_module.h" -#include "e_canvas.h" #include "e_focus.h" #include "e_place.h" #include "e_resist.h" diff --git a/src/bin/e_int_client_locks.c b/src/bin/e_int_client_locks.c index a15b28ec2f..c9bc0c1d55 100644 --- a/src/bin/e_int_client_locks.c +++ b/src/bin/e_int_client_locks.c @@ -62,7 +62,7 @@ e_int_client_locks(E_Client *ec) v->advanced.create_widgets = _advanced_create_widgets; v->override_auto_apply = 1; /* create config diaolg for bd object/data */ - cfd = e_config_dialog_new(ec->comp, + cfd = e_config_dialog_new(NULL, _("Window Locks"), "E", "_border_locks_dialog", NULL, 0, v, ec); diff --git a/src/bin/e_int_client_menu.c b/src/bin/e_int_client_menu.c index 1c216ef012..abf85d7a83 100644 --- a/src/bin/e_int_client_menu.c +++ b/src/bin/e_int_client_menu.c @@ -291,13 +291,9 @@ _e_client_menu_cb_locks(void *data, E_Menu *m __UNUSED__, E_Menu_Item *mi __UNUS ec = data; if (ec->border_locks_dialog) - { - e_client_desk_set(ec->border_locks_dialog->dia->win->client, ec->desk); - e_win_raise(ec->border_locks_dialog->dia->win); - evas_object_focus_set(ec->border_locks_dialog->dia->win->client->frame, 1); - return; - } - e_int_client_locks(ec); + e_client_activate(e_win_client_get(ec->border_locks_dialog->dia->win), 1); + else + e_int_client_locks(ec); } static void @@ -307,13 +303,9 @@ _e_client_menu_cb_remember(void *data, E_Menu *m __UNUSED__, E_Menu_Item *mi __U ec = data; if (ec->border_remember_dialog) - { - e_client_desk_set(ec->border_remember_dialog->dia->win->client, ec->desk); - e_win_raise(ec->border_remember_dialog->dia->win); - evas_object_focus_set(ec->border_remember_dialog->dia->win->client->frame, 1); - return; - } - e_int_client_remember(ec); + e_client_activate(e_win_client_get(ec->border_remember_dialog->dia->win), 1); + else + e_int_client_remember(ec); } static void @@ -324,14 +316,12 @@ _e_client_menu_cb_border(void *data, E_Menu *m __UNUSED__, E_Menu_Item *mi __UNU ec = data; if (ec->border_border_dialog) + e_client_activate(e_win_client_get(ec->border_border_dialog->dia->win), 1); + else { - e_client_desk_set(ec->border_border_dialog->dia->win->client, ec->desk); - e_win_raise(ec->border_border_dialog->dia->win); - evas_object_focus_set(ec->border_border_dialog->dia->win->client->frame, 1); - return; + snprintf(buf, sizeof(buf), "%p", ec); + e_configure_registry_call("internal/borders_border", NULL, buf); } - snprintf(buf, sizeof(buf), "%p", ec); - e_configure_registry_call("internal/borders_border", ec->zone->comp, buf); } static void @@ -1628,7 +1618,7 @@ _e_client_menu_cb_kbdshrtct_add(void *data, E_Menu *m __UNUSED__, E_Menu_Item *m zone = e_util_zone_current_get(e_manager_current_get()); if (!zone) return; e_configure_registry_call("keyboard_and_mouse/key_bindings", - zone->comp, ec->desktop->exec); + NULL, ec->desktop->exec); } static void diff --git a/src/bin/e_int_client_prop.c b/src/bin/e_int_client_prop.c index d83c70d131..f45769537f 100644 --- a/src/bin/e_int_client_prop.c +++ b/src/bin/e_int_client_prop.c @@ -71,7 +71,7 @@ e_int_client_prop(E_Client *ec) if (ec->border_prop_dialog) return; - dia = e_dialog_new(ec->zone->comp, "E", "_window_props"); + dia = e_dialog_new(NULL, "E", "_window_props"); e_object_del_attach_func_set(E_OBJECT(dia), _ec_cb_dialog_del); _create_data(dia, ec); @@ -79,7 +79,7 @@ e_int_client_prop(E_Client *ec) _ec_go(dia, (void *)0); e_dialog_button_add(dia, _("Close"), NULL, _ec_cb_dialog_close, dia); - e_win_centered_set(dia->win, 1); + elm_win_center(dia->win, 1, 1); e_dialog_show(dia); e_dialog_border_icon_set(dia, "preferences-system-windows"); } @@ -381,14 +381,14 @@ _ec_go(void *data, void *data2) if (dia->content_object) evas_object_del(dia->content_object); - c = e_widget_list_add(e_win_evas_get(dia->win), 0, 0); + c = e_widget_list_add(evas_object_evas_get(dia->win), 0, 0); if (!data2) { o = _ec_icccm_create(dia, NULL); e_dialog_title_set(dia, _("ICCCM Properties")); e_widget_list_object_append(c, o, 1, 1, 0.0); - ob = e_widget_button_add(e_win_evas_get(dia->win), _("NetWM"), "go-next", + ob = e_widget_button_add(evas_object_evas_get(dia->win), _("NetWM"), "go-next", _ec_go, dia, (void *)1); } else @@ -396,7 +396,7 @@ _ec_go(void *data, void *data2) o = _ec_netwm_create(dia, NULL); e_dialog_title_set(dia, _("NetWM Properties")); e_widget_list_object_append(c, o, 1, 1, 0.0); - ob = e_widget_button_add(e_win_evas_get(dia->win), _("ICCCM"), "go-next", + ob = e_widget_button_add(evas_object_evas_get(dia->win), _("ICCCM"), "go-next", _ec_go, dia, (void *)0); } @@ -441,7 +441,7 @@ _ec_icccm_create(E_Dialog *dia, void *data __UNUSED__) if (dia->content_object) evas_object_del(dia->content_object); - evas = e_win_evas_get(dia->win); + evas = evas_object_evas_get(dia->win); otb = e_widget_toolbook_add(evas, 48 * e_scale, 48 * e_scale); o = e_widget_table_add(evas, 0); @@ -497,7 +497,7 @@ _ec_netwm_create(E_Dialog *dia, void *data __UNUSED__) if (dia->content_object) evas_object_del(dia->content_object); - evas = e_win_evas_get(dia->win); + evas = evas_object_evas_get(dia->win); otb = e_widget_toolbook_add(evas, 48 * e_scale, 48 * e_scale); o = e_widget_table_add(evas, 0); STR_ENTRY(_("Name"), 0, 1, netwm.name); diff --git a/src/bin/e_int_client_remember.c b/src/bin/e_int_client_remember.c index c22c6fe9f2..0012c15e5d 100644 --- a/src/bin/e_int_client_remember.c +++ b/src/bin/e_int_client_remember.c @@ -106,7 +106,7 @@ e_int_client_remember(E_Client *ec) v->override_auto_apply = 1; /* create config dialog for ec object/data */ - cfd = e_config_dialog_new(ec->zone->comp, + cfd = e_config_dialog_new(NULL, _("Window Remember"), "E", "_border_remember_dialog", NULL, 0, v, ec); @@ -328,11 +328,11 @@ _free_data(E_Config_Dialog *cfd __UNUSED__, E_Config_Dialog_Data *cfdata) } static void -_warning_dialog_show(E_Comp *c) +_warning_dialog_show(void) { E_Dialog *dia; - dia = e_dialog_new(c, "E", "_border_remember_error_multi_dialog"); + dia = e_dialog_new(NULL, "E", "_border_remember_error_multi_dialog"); e_dialog_title_set(dia, _("Window properties are not a unique match")); e_dialog_text_set (dia, @@ -351,7 +351,7 @@ _warning_dialog_show(E_Comp *c) "are not sure and nothing will be affected.") ); e_dialog_button_add(dia, _("OK"), NULL, NULL, NULL); - e_win_centered_set(dia->win, 1); + elm_win_center(dia->win, 1, 1); e_dialog_show(dia); } @@ -410,7 +410,7 @@ _check_matches(E_Remember *rem, int update) } static int -_basic_apply_data(E_Config_Dialog *cfd, E_Config_Dialog_Data *cfdata) +_basic_apply_data(E_Config_Dialog *cfd EINA_UNUSED, E_Config_Dialog_Data *cfdata) { /* Actually take our cfdata settings and apply them in real life */ E_Client *ec = cfdata->client; @@ -443,7 +443,7 @@ _basic_apply_data(E_Config_Dialog *cfd, E_Config_Dialog_Data *cfdata) if ((!cfdata->warned) && (_check_matches(rem, 0) > 1)) { - _warning_dialog_show(cfd->comp); + _warning_dialog_show(); cfdata->warned = 1; return 0; } @@ -459,7 +459,7 @@ _basic_apply_data(E_Config_Dialog *cfd, E_Config_Dialog_Data *cfdata) } static int -_advanced_apply_data(E_Config_Dialog *cfd, E_Config_Dialog_Data *cfdata) +_advanced_apply_data(E_Config_Dialog *cfd EINA_UNUSED, E_Config_Dialog_Data *cfdata) { E_Client *ec = cfdata->client; E_Remember *rem; @@ -537,7 +537,7 @@ _advanced_apply_data(E_Config_Dialog *cfd, E_Config_Dialog_Data *cfdata) { E_Dialog *dia; - dia = e_dialog_new(cfd->comp, "E", "_border_remember_error_noprop_dialog"); + dia = e_dialog_new(NULL, "E", "_border_remember_error_noprop_dialog"); e_dialog_title_set(dia, _("No match properties set")); e_dialog_text_set (dia, @@ -548,7 +548,7 @@ _advanced_apply_data(E_Config_Dialog *cfd, E_Config_Dialog_Data *cfdata) "You must specify at least 1 way of remembering this window.") ); e_dialog_button_add(dia, _("OK"), NULL, NULL, NULL); - e_win_centered_set(dia->win, 1); + elm_win_center(dia->win, 1, 1); e_dialog_show(dia); if (ec) cfdata->client->remember = rem; @@ -563,7 +563,7 @@ _advanced_apply_data(E_Config_Dialog *cfd, E_Config_Dialog_Data *cfdata) if ((!cfdata->remember.apply_first_only) && (_check_matches(rem, 0) > 1)) { - _warning_dialog_show(cfd->comp); + _warning_dialog_show(); cfdata->warned = 1; return 0; } diff --git a/src/bin/e_int_config_comp.c b/src/bin/e_int_config_comp.c index 877503e797..9df33532f7 100644 --- a/src/bin/e_int_config_comp.c +++ b/src/bin/e_int_config_comp.c @@ -68,7 +68,7 @@ static int _advanced_apply_data(E_Config_Dialog *cfd, E_Config_Dialog_Data *cfdata); EAPI E_Config_Dialog * -e_int_config_comp(E_Comp *comp, const char *params __UNUSED__) +e_int_config_comp(Evas_Object *parent EINA_UNUSED, const char *params __UNUSED__) { E_Config_Dialog *cfd; E_Config_Dialog_View *v; @@ -83,7 +83,7 @@ e_int_config_comp(E_Comp *comp, const char *params __UNUSED__) v->advanced.apply_cfdata = _advanced_apply_data; v->advanced.create_widgets = _advanced_create_widgets; - cfd = e_config_dialog_new(comp, _("Composite Settings"), + cfd = e_config_dialog_new(NULL, _("Composite Settings"), "E", "appearance/comp", "preferences-composite", 0, v, NULL); e_dialog_resizable_set(cfd->dia, 1); return cfd; @@ -173,10 +173,9 @@ _advanced_comp_style_toggle(void *oi, Evas_Object *o) static void _advanced_matches_edit(void *data, void *d EINA_UNUSED) { - E_Config_Dialog *md, *cfd = data; + E_Config_Dialog *cfd = data; - md = e_int_config_comp_match(NULL, NULL); - e_dialog_parent_set(md->dia, cfd->dia->win); + e_int_config_comp_match(cfd->dia->win, NULL); } static Evas_Object * diff --git a/src/bin/e_int_config_comp_match.c b/src/bin/e_int_config_comp_match.c index 3055e9f158..7656a4751e 100644 --- a/src/bin/e_int_config_comp_match.c +++ b/src/bin/e_int_config_comp_match.c @@ -537,7 +537,12 @@ _create_edit_frame(E_Config_Dialog *cfd, Evas *evas, E_Config_Dialog_Data *cfdat e_widget_frametable_object_append(of, bt, 0, 1, 1, 1, 0, 0, 0, 0); e_widget_size_min_get(of, &mw, &mh); - e_win_resize(cfd->dia->win, MAX(mw, cfd->dia->win->w), MAX(mh, cfd->dia->win->h)); + { + int ww, wh; + + evas_object_geometry_get(cfd->dia->win, NULL, NULL, &ww, &wh); + evas_object_resize(cfd->dia->win, MAX(mw, ww), MAX(mh, wh)); + } } static void @@ -863,7 +868,7 @@ _create_data(E_Config_Dialog *cfd) } EAPI E_Config_Dialog * -e_int_config_comp_match(E_Comp *comp, const char *params __UNUSED__) +e_int_config_comp_match(Evas_Object *parent, const char *params __UNUSED__) { E_Config_Dialog *cfd; E_Config_Dialog_View *v; @@ -876,7 +881,7 @@ e_int_config_comp_match(E_Comp *comp, const char *params __UNUSED__) v->basic.apply_cfdata = _basic_apply_data; v->basic.create_widgets = _basic_create_widgets; - cfd = e_config_dialog_new(comp, _("Composite Match Settings"), + cfd = e_config_dialog_new(parent, _("Composite Match Settings"), "E", "_comp_matches", "preferences-composite", 0, v, NULL); e_dialog_resizable_set(cfd->dia, 1); return cfd; diff --git a/src/bin/e_int_config_modules.c b/src/bin/e_int_config_modules.c index 8a33d5eb2a..28238b68a4 100644 --- a/src/bin/e_int_config_modules.c +++ b/src/bin/e_int_config_modules.c @@ -83,7 +83,7 @@ static void _btn_cb_unload(void *data, void *data2); static void _btn_cb_load(void *data, void *data2); EAPI E_Config_Dialog * -e_int_config_modules(E_Comp *c, const char *params __UNUSED__) +e_int_config_modules(Evas_Object *parent EINA_UNUSED, const char *params __UNUSED__) { E_Config_Dialog *cfd = NULL; E_Config_Dialog_View *v = NULL; @@ -95,7 +95,7 @@ e_int_config_modules(E_Comp *c, const char *params __UNUSED__) v->free_cfdata = _free_data; v->basic.create_widgets = _basic_create; - cfd = e_config_dialog_new(c, _("Module Settings"), + cfd = e_config_dialog_new(NULL, _("Module Settings"), "E", "extensions/modules", "preferences-plugin", 0, v, NULL); return cfd; @@ -175,7 +175,7 @@ _basic_create(E_Config_Dialog *cfd, Evas *evas, E_Config_Dialog_Data *cfdata) e_dialog_resizable_set(cfd->dia, 1); - cfdata->evas = e_win_evas_get(cfd->dia->win); + cfdata->evas = evas_object_evas_get(cfd->dia->win); of = e_widget_table_add(evas, 0); @@ -212,7 +212,7 @@ _basic_create(E_Config_Dialog *cfd, Evas *evas, E_Config_Dialog_Data *cfdata) e_dialog_resizable_set(cfd->dia, 1); e_util_win_auto_resize_fill(cfd->dia->win); - e_win_centered_set(cfd->dia->win, 1); + elm_win_center(cfd->dia->win, 1, 1); e_widget_focus_set(cfdata->o_toolbar, 1); e_widget_toolbar_item_select(cfdata->o_toolbar, 0); diff --git a/src/bin/e_int_config_modules.h b/src/bin/e_int_config_modules.h index 982d3918bc..67273717e5 100644 --- a/src/bin/e_int_config_modules.h +++ b/src/bin/e_int_config_modules.h @@ -3,7 +3,7 @@ #ifndef E_INT_CONFIG_MODULES_H #define E_INT_CONFIG_MODULES_H -EAPI E_Config_Dialog *e_int_config_modules(E_Comp *c, const char *params); +EAPI E_Config_Dialog *e_int_config_modules(Evas_Object *parent, const char *params); #endif #endif diff --git a/src/bin/e_int_gadcon_config.c b/src/bin/e_int_gadcon_config.c index 3d4023968c..a3f3d33986 100644 --- a/src/bin/e_int_gadcon_config.c +++ b/src/bin/e_int_gadcon_config.c @@ -54,8 +54,7 @@ _create_dialog(E_Gadcon *gc, const char *title, E_Gadcon_Site site) if (gc->config_dialog) { - e_win_raise(gc->config_dialog->dia->win); - evas_object_focus_set(gc->config_dialog->dia->win->client->frame, 1); + e_client_activate(e_win_client_get(gc->config_dialog->dia->win), 1); return; } if (!(v = E_NEW(E_Config_Dialog_View, 1))) return; @@ -69,7 +68,7 @@ _create_dialog(E_Gadcon *gc, const char *title, E_Gadcon_Site site) e_config_dialog_new(NULL, title, "E", "_gadcon_config_dialog", "preferences-desktop-shelf", 0, v, gc); if (site) gc->config_dialog->cfdata->site = site; - e_win_centered_set(gc->config_dialog->dia->win, EINA_TRUE); + elm_win_center(gc->config_dialog->dia->win, 1, 1); } static void * @@ -725,7 +724,7 @@ _advanced_create(E_Config_Dialog *cfd, Evas *evas, E_Config_Dialog_Data *cfdata) if (cfdata->load_timer) ecore_timer_del(cfdata->load_timer); cfdata->load_timer = ecore_timer_add(0.01, _cb_load_timer, cfdata); - e_win_centered_set(cfd->dia->win, EINA_TRUE); + elm_win_center(cfd->dia->win, 1, 1); return otb; } @@ -759,7 +758,7 @@ _basic_create(E_Config_Dialog *cfd, Evas *evas, E_Config_Dialog_Data *cfdata) if (cfdata->load_timer) ecore_timer_del(cfdata->load_timer); cfdata->load_timer = ecore_timer_add(0.01, _cb_load_timer, cfdata); - e_win_centered_set(cfd->dia->win, EINA_TRUE); + elm_win_center(cfd->dia->win, 1, 1); return ot; } diff --git a/src/bin/e_int_menus.c b/src/bin/e_int_menus.c index 5819ed96f7..717b8c1956 100644 --- a/src/bin/e_int_menus.c +++ b/src/bin/e_int_menus.c @@ -110,7 +110,7 @@ _TEST(void *d __UNUSED__, E_Menu *m, E_Menu_Item *mi __UNUSED__) Evas *e; dia = e_dialog_normal_win_new(m->zone->comp, "E", "_widget_playground_dialog"); - e = e_win_evas_get(dia->win); + e = evas_object_evas_get(dia->win); o_list = e_widget_ilist_add(e, 32, 32, NULL); e_dialog_button_add(dia, "Add", NULL, _TEST_ADD, o_list); e_dialog_button_add(dia, "Del", NULL, _TEST_DEL, o_list); @@ -1074,9 +1074,9 @@ _e_int_menus_desktops_free_hook(void *obj) } static void -_e_int_menus_desk_item_cb(void *data __UNUSED__, E_Menu *m, E_Menu_Item *mi __UNUSED__) +_e_int_menus_desk_item_cb(void *data __UNUSED__, E_Menu *m EINA_UNUSED, E_Menu_Item *mi __UNUSED__) { - e_configure_registry_call("screen/virtual_desktops", m->zone->comp, NULL); + e_configure_registry_call("screen/virtual_desktops", NULL, NULL); } static void @@ -1112,9 +1112,9 @@ _e_int_menus_virtuals_icon_cb(void *data, E_Menu *m, E_Menu_Item *mi) } static void -_e_e_int_menus_conf_comp_cb(void *data EINA_UNUSED, E_Menu *m, E_Menu_Item *mi EINA_UNUSED) +_e_e_int_menus_conf_comp_cb(void *data EINA_UNUSED, E_Menu *m EINA_UNUSED, E_Menu_Item *mi EINA_UNUSED) { - e_int_config_comp(e_comp_get(m), NULL); + e_int_config_comp(NULL, NULL); } static void @@ -1840,9 +1840,9 @@ _e_int_menus_shelves_add_cb(void *data __UNUSED__, E_Menu *m __UNUSED__, E_Menu_ } static void -_e_int_menus_shelves_del_cb(void *data __UNUSED__, E_Menu *m, E_Menu_Item *mi __UNUSED__) +_e_int_menus_shelves_del_cb(void *data __UNUSED__, E_Menu *m EINA_UNUSED, E_Menu_Item *mi __UNUSED__) { - e_configure_registry_call("extensions/shelves", m->zone->comp, NULL); + e_configure_registry_call("extensions/shelves", NULL, NULL); } static void diff --git a/src/bin/e_int_shelf_config.c b/src/bin/e_int_shelf_config.c index 130e34f3e8..f16e814eaa 100644 --- a/src/bin/e_int_shelf_config.c +++ b/src/bin/e_int_shelf_config.c @@ -43,10 +43,10 @@ e_int_shelf_config(E_Shelf *es) v->basic.check_changed = _basic_check_changed; es->config_dialog = - e_config_dialog_new(es->zone->comp, _("Shelf Settings"), + e_config_dialog_new(NULL, _("Shelf Settings"), "E", "_shelf_config_dialog", "preferences-desktop-shelf", 0, v, es); - e_win_centered_set(es->config_dialog->dia->win, EINA_TRUE); + elm_win_center(es->config_dialog->dia->win, 1, 1); } /* local functions */ diff --git a/src/bin/e_int_toolbar_config.c b/src/bin/e_int_toolbar_config.c index 4faa96373f..57928b6f25 100644 --- a/src/bin/e_int_toolbar_config.c +++ b/src/bin/e_int_toolbar_config.c @@ -64,8 +64,6 @@ _basic_apply(E_Config_Dialog *cfd __UNUSED__, E_Config_Dialog_Data *cfdata) tbar = cfdata->tbar; if (!tbar) return 0; e_toolbar_orient(tbar, cfdata->orient); - if ((tbar->fwin) && (tbar->fwin->cb_resize)) - tbar->fwin->cb_resize(tbar->fwin); return 1; } diff --git a/src/bin/e_livethumb.c b/src/bin/e_livethumb.c index b7e4d7c364..cbb7980d95 100644 --- a/src/bin/e_livethumb.c +++ b/src/bin/e_livethumb.c @@ -141,14 +141,12 @@ _e_smart_add(Evas_Object *obj) evas_object_smart_member_add(sd->evas_obj, obj); evas_object_image_size_set(sd->evas_obj, sd->vw, sd->vh); sd->evas = ecore_evas_get(sd->ee); - e_canvas_add(sd->ee); } static void _e_smart_del(Evas_Object *obj) { INTERNAL_ENTRY; - e_canvas_del(sd->ee); evas_object_del(sd->evas_obj); free(sd); } diff --git a/src/bin/e_main.c b/src/bin/e_main.c index 93689fe7b0..50b9d3ecee 100644 --- a/src/bin/e_main.c +++ b/src/bin/e_main.c @@ -562,10 +562,6 @@ main(int argc, char **argv) e_font_apply(); TS("E_Font Apply Done"); - TS("E_Canvas Recache"); - e_canvas_recache(); - TS("E_Canvas Recache Done"); - TS("E_Theme Init"); if (!e_theme_init()) { @@ -1022,7 +1018,7 @@ main(int argc, char **argv) inloop = EINA_FALSE; stopping = EINA_TRUE; - if (!x_fatal) e_canvas_idle_flush(); + //if (!x_fatal) e_canvas_idle_flush(); e_config_save_flush(); _e_main_desk_save(); @@ -1469,7 +1465,6 @@ _e_main_test_formats(void) "Evas has Software Buffer engine support.\n")); _e_main_shutdown(-1); } - e_canvas_add(ee); evas = ecore_evas_get(ee); im = evas_object_image_add(evas); @@ -1526,7 +1521,6 @@ _e_main_test_formats(void) _e_main_shutdown(-1); } evas_object_del(txt); - e_canvas_del(ee); ecore_evas_free(ee); } diff --git a/src/bin/e_module.c b/src/bin/e_module.c index 6b109d7351..5b4efc0034 100644 --- a/src/bin/e_module.c +++ b/src/bin/e_module.c @@ -603,10 +603,10 @@ e_module_dialog_show(E_Module *m, const char *title, const char *body) { snprintf(buf, sizeof(buf), "%s/%s.edj", e_module_dir_get(m), desktop->icon); - dia->icon_object = e_util_icon_add(buf, e_win_evas_get(dia->win)); + dia->icon_object = e_util_icon_add(buf, evas_object_evas_get(dia->win)); } else - dia->icon_object = e_util_icon_add(icon, e_win_evas_get(dia->win)); + dia->icon_object = e_util_icon_add(icon, evas_object_evas_get(dia->win)); evas_object_size_hint_min_set(dia->icon_object, 64, 64); edje_object_part_swallow(dia->bg_object, "e.swallow.icon", dia->icon_object); evas_object_show(dia->icon_object); @@ -619,11 +619,10 @@ e_module_dialog_show(E_Module *m, const char *title, const char *body) e_dialog_text_set(dia, body); e_dialog_button_add(dia, _("OK"), NULL, NULL, NULL); e_dialog_button_focus_num(dia, 0); - e_win_centered_set(dia->win, 1); + elm_win_center(dia->win, 1, 1); e_dialog_show(dia); if (!m) return; - if (dia->win->client) - dia->win->client->internal_icon = eina_stringshare_add(icon); + e_win_client_icon_set(dia->win, icon); } EAPI void @@ -758,8 +757,8 @@ _e_module_dialog_disable_show(const char *title, const char *body, E_Module *m) e_dialog_text_set(dia, buf); e_dialog_button_add(dia, _("Unload"), NULL, _e_module_cb_dialog_disable, m); e_dialog_button_add(dia, _("Keep"), NULL, NULL, NULL); - e_win_centered_set(dia->win, 1); - dia->win->state.no_remember = 1; + elm_win_center(dia->win, 1, 1); + e_win_no_remember_set(dia->win, 1); e_dialog_show(dia); } @@ -1032,7 +1031,7 @@ _e_module_whitelist_check(void) e_dialog_text_set(dia, eina_strbuf_string_get(sbuf)); e_dialog_button_add(dia, _("OK"), NULL, _cleanup_cb, badl); e_dialog_button_add(dia, _("I know"), NULL, _ignore_cb, badl); - e_win_centered_set(dia->win, 1); + elm_win_center(dia->win, 1, 1); e_dialog_show(dia); eina_strbuf_free(sbuf); } diff --git a/src/bin/e_obj_dialog.c b/src/bin/e_obj_dialog.c index 4e85b8fcac..1482b1201c 100644 --- a/src/bin/e_obj_dialog.c +++ b/src/bin/e_obj_dialog.c @@ -2,9 +2,8 @@ /* local subsystem functions */ static void _e_obj_dialog_free(E_Obj_Dialog *od); -static void _e_obj_dialog_cb_delete(E_Win *win); +static void _e_obj_dialog_cb_delete(E_Obj_Dialog *od, Evas *e EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *event_info EINA_UNUSED); static void _e_obj_dialog_cb_close(void *data, Evas_Object *obj, const char *emission, const char *source); -static void _e_obj_dialog_cb_resize(E_Win *win); /* local subsystem globals */ @@ -16,7 +15,7 @@ _key_down_cb(void *data, Evas *e __UNUSED__, Evas_Object *obj __UNUSED__, void * Evas_Event_Key_Down *ev = event; if (!strcmp(ev->key, "Escape") && data) - _e_obj_dialog_cb_delete(data); + _e_obj_dialog_cb_delete(data, NULL, NULL, NULL); } EAPI E_Obj_Dialog * @@ -30,23 +29,21 @@ e_obj_dialog_new(E_Comp *c, char *title, char *class_name, char *class_class) if (!c) c = e_util_comp_current_get(); od = E_OBJECT_ALLOC(E_Obj_Dialog, E_OBJ_DIALOG_TYPE, _e_obj_dialog_free); if (!od) return NULL; - od->win = e_win_new(c); + od->win = elm_win_add(NULL, NULL, ELM_WIN_DIALOG_BASIC); if (!od->win) { free(od); return NULL; } - e_win_delete_callback_set(od->win, _e_obj_dialog_cb_delete); - e_win_resize_callback_set(od->win, _e_obj_dialog_cb_resize); - od->win->data = od; - e_win_dialog_set(od->win, 1); - e_win_name_class_set(od->win, class_name, class_class); - e_win_title_set(od->win, title); - - o = edje_object_add(e_win_evas_get(od->win)); + evas_object_event_callback_add(od->win, EVAS_CALLBACK_DEL, (Evas_Object_Event_Cb)_e_obj_dialog_cb_delete, od); + ecore_evas_name_class_set(e_win_ee_get(od->win), class_name, class_class); + elm_win_title_set(od->win, title); + + o = edje_object_add(evas_object_evas_get(od->win)); + elm_win_resize_object_add(od->win, o); od->bg_object = o; - e_win_centered_set(od->win, 1); + elm_win_center(od->win, 1, 1); od->cb_delete = NULL; mask = 0; @@ -70,7 +67,7 @@ e_obj_dialog_icon_set(E_Obj_Dialog *od, char *icon) { E_OBJECT_CHECK(od); E_OBJECT_TYPE_CHECK(od, E_OBJ_DIALOG_TYPE); - eina_stringshare_replace(&od->win->client->internal_icon, icon); + e_win_client_icon_set(od->win, icon); } EAPI void @@ -85,22 +82,19 @@ e_obj_dialog_show(E_Obj_Dialog *od) edje_object_size_min_get(od->bg_object, &mw, &mh); edje_object_size_min_restricted_calc(od->bg_object, &mw, &mh, mw, mh); evas_object_resize(od->bg_object, mw, mh); - e_win_resize(od->win, mw, mh); - e_win_size_min_set(od->win, mw, mh); + evas_object_resize(od->win, mw, mh); + evas_object_size_hint_min_set(od->win, mw, mh); edje_object_size_max_get(od->bg_object, &w, &h); if ((w > 0) && (h > 0)) { if (w < mw) w = mw; if (h < mh) h = mh; - e_win_size_max_set(od->win, w, h); + evas_object_size_hint_max_set(od->win, w, h); } s = edje_object_data_get(od->bg_object, "borderless"); if (s && (!strcmp(s, "1"))) - e_win_borderless_set(od->win, 1); - s = edje_object_data_get(od->bg_object, "shaped"); - if (s && (!strcmp(s, "1"))) - e_win_shaped_set(od->win, 1); - e_win_show(od->win); + elm_win_borderless_set(od->win, 1); + evas_object_show(od->win); } EAPI void @@ -129,16 +123,13 @@ static void _e_obj_dialog_free(E_Obj_Dialog *od) { if (od->bg_object) evas_object_del(od->bg_object); - e_object_del(E_OBJECT(od->win)); + evas_object_del(od->win); free(od); } static void -_e_obj_dialog_cb_delete(E_Win *win) +_e_obj_dialog_cb_delete(E_Obj_Dialog *od, Evas *e EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *event_info EINA_UNUSED) { - E_Obj_Dialog *od; - - od = win->data; if (od->cb_delete) od->cb_delete(od); e_object_del(E_OBJECT(od)); @@ -154,13 +145,3 @@ _e_obj_dialog_cb_close(void *data, Evas_Object *obj __UNUSED__, const char *emis od->cb_delete(od); e_util_defer_object_del(E_OBJECT(od)); } - -static void -_e_obj_dialog_cb_resize(E_Win *win) -{ - E_Obj_Dialog *od; - - od = win->data; - evas_object_resize(od->bg_object, od->win->w, od->win->h); -} - diff --git a/src/bin/e_obj_dialog.h b/src/bin/e_obj_dialog.h index 1f26079895..59f7baa381 100644 --- a/src/bin/e_obj_dialog.h +++ b/src/bin/e_obj_dialog.h @@ -12,7 +12,7 @@ struct _E_Obj_Dialog { E_Object e_obj_inherit; - E_Win *win; + Evas_Object *win; Evas_Object *bg_object; void *data; void (*cb_delete)(E_Obj_Dialog *od); diff --git a/src/bin/e_screensaver.c b/src/bin/e_screensaver.c index e6a479cc42..9bf139c66c 100644 --- a/src/bin/e_screensaver.c +++ b/src/bin/e_screensaver.c @@ -202,7 +202,7 @@ _e_screensaver_ask_presentation_mode(void) e_dialog_button_focus_num(dia, 0); e_widget_list_homogeneous_set(dia->box_object, 0); - e_win_centered_set(dia->win, 1); + elm_win_center(dia->win, 1, 1); e_dialog_show(dia); evas_object_event_callback_add(dia->bg_object, EVAS_CALLBACK_KEY_DOWN, diff --git a/src/bin/e_startup.c b/src/bin/e_startup.c index 645d068f48..f952fc1570 100644 --- a/src/bin/e_startup.c +++ b/src/bin/e_startup.c @@ -86,8 +86,8 @@ _e_startup_error_dialog(const char *msg) e_dialog_icon_set(dia, "enlightenment", 64); e_dialog_text_set(dia, msg); e_dialog_button_add(dia, _("Close"), NULL, NULL, NULL); - e_win_centered_set(dia->win, 1); - dia->win->state.no_remember = 1; + elm_win_center(dia->win, 1, 1); + e_win_no_remember_set(dia->win, 1); e_dialog_show(dia); } @@ -101,7 +101,7 @@ _e_startup_event_cb(void *data, int ev_type __UNUSED__, void *ev) if ((e) && (e->error)) { fprintf(stderr, "E: efreet couldn't build cache\n"); - _e_startup_error_dialog("E: Efreet could not build cache. " + _e_startup_error_dialog("E: Efreet could not build cache. " "Please check your DBus setup"); } ecore_event_handler_del(desktop_cache_update_handler); diff --git a/src/bin/e_sys.c b/src/bin/e_sys.c index 8c5d48ed8d..ce001ab156 100644 --- a/src/bin/e_sys.c +++ b/src/bin/e_sys.c @@ -724,7 +724,7 @@ _e_sys_cb_logout_timer(void *data __UNUSED__) _e_sys_cb_logout_abort, NULL); e_dialog_button_focus_num(dia, 1); _e_sys_logout_confirm_dialog_update(E_LOGOUT_AUTO_TIME); - e_win_centered_set(dia->win, 1); + elm_win_center(dia->win, 1, 1); e_dialog_show(dia); _e_sys_logout_begin_time = now; } @@ -852,7 +852,7 @@ _e_sys_current_action(void) } e_dialog_button_add(dia, _("OK"), NULL, NULL, NULL); e_dialog_button_focus_num(dia, 0); - e_win_centered_set(dia->win, 1); + elm_win_center(dia->win, 1, 1); e_dialog_show(dia); } @@ -893,7 +893,7 @@ _e_sys_action_failed(void) } e_dialog_button_add(dia, _("OK"), NULL, NULL, NULL); e_dialog_button_focus_num(dia, 0); - e_win_centered_set(dia->win, 1); + elm_win_center(dia->win, 1, 1); e_dialog_show(dia); } diff --git a/src/bin/e_test.c b/src/bin/e_test.c index 64d6a7070e..e2b73b4880 100644 --- a/src/bin/e_test.c +++ b/src/bin/e_test.c @@ -98,16 +98,16 @@ _e_test_internal(E_Comp *c) Evas_Object *o; win = e_win_new(c); - e_win_resize_callback_set(win, _e_test_resize); + evas_object_resize_callback_set(win, _e_test_resize); e_win_delete_callback_set(win, _e_test_delete); e_win_placed_set(win, 0); - e_win_move_resize(win, 10, 80, 400, 200); + evas_object_geometry_set(win, 10, 80, 400, 200); e_win_name_class_set(win, "E", "_test_window"); e_win_title_set(win, "A test window"); - e_win_raise(win); - e_win_show(win); + elm_win_raise(win); + evas_object_show(win); - o = evas_object_rectangle_add(e_win_evas_get(win)); + o = evas_object_rectangle_add(evas_object_evas_get(win)); evas_object_color_set(o, 255, 200, 100, 255); evas_object_resize(o, 400, 200); evas_object_show(o); @@ -169,7 +169,7 @@ _e_test_internal(E_Comp *c) e_dialog_button_add(dia, "OK", NULL, NULL, NULL); e_dialog_button_add(dia, "Apply", "system-restart", NULL, NULL); e_dialog_button_add(dia, "Cancel", "application-exit", NULL, NULL); - e_win_centered_set(dia->win, 1); + elm_win_center(dia->win, 1, 1); e_dialog_show(dia); } @@ -216,7 +216,7 @@ _e_test_internal(E_Comp *c) e_dialog_content_set(dia, o2, 500, 300); e_dialog_button_add(dia, "OK", NULL, NULL, NULL); - e_win_centered_set(dia->win, 1); + elm_win_center(dia->win, 1, 1); e_dialog_show(dia); evas_object_focus_set(o, 1); @@ -363,7 +363,7 @@ _e_test_internal(E_Comp *c) e_scrollframe_child_viewport_size_get(o2, &vw, &vh); e_dialog_content_set(dia, o2, 200, 150); e_dialog_button_add(dia, "OK", NULL, NULL, NULL); - e_win_centered_set(dia->win, 1); + elm_win_center(dia->win, 1, 1); e_dialog_resizable_set(dia, 1); e_dialog_show(dia); @@ -402,7 +402,7 @@ _e_test_internal(E_Comp *c) e_dialog_content_set(dia, o, 240 + mw, mh); e_dialog_button_add(dia, "OK", NULL, NULL, NULL); - e_win_centered_set(dia->win, 1); + elm_win_center(dia->win, 1, 1); e_dialog_show(dia); evas_object_focus_set(o, 1); @@ -449,7 +449,7 @@ _e_test_internal(E_Comp *c) e_dialog_content_set(dia, o, 160, 160); e_dialog_button_add(dia, "OK", NULL, NULL, NULL); - e_win_centered_set(dia->win, 1); + elm_win_center(dia->win, 1, 1); e_dialog_show(dia); evas_object_focus_set(o, 1); @@ -621,9 +621,9 @@ _e_test_internal(E_Comp *c) /* buttons at the bottom */ e_dialog_button_add(dia, "OK", NULL, NULL, NULL); e_dialog_resizable_set(dia, 1); - e_win_centered_set(dia->win, 1); + elm_win_center(dia->win, 1, 1); e_dialog_show(dia); - e_win_resize(dia->win, 400, 300); + evas_object_resize(dia->win, 400, 300); } #elif 0 @@ -660,9 +660,9 @@ _e_test_internal(E_Comp *c) /* buttons at the bottom */ e_dialog_button_add(dia, "OK", NULL, NULL, NULL); e_dialog_resizable_set(dia, 1); - e_win_centered_set(dia->win, 1); + elm_win_center(dia->win, 1, 1); e_dialog_show(dia); - e_win_resize(dia->win, 400, 300); + evas_object_resize(dia->win, 400, 300); } #elif 0 @@ -748,9 +748,9 @@ _e_test_internal(E_Comp *c) /* buttons at the bottom */ e_dialog_button_add(dia, "OK", NULL, NULL, NULL); e_dialog_resizable_set(dia, 1); - e_win_centered_set(dia->win, 1); + elm_win_center(dia->win, 1, 1); e_dialog_show(dia); - e_win_resize(dia->win, 400, 400); + evas_object_resize(dia->win, 400, 400); } static void @@ -813,9 +813,9 @@ _e_test_timer(void *data) /* buttons at the bottom */ e_dialog_button_add(dia, "OK", NULL, NULL, NULL); e_dialog_resizable_set(dia, 1); - e_win_centered_set(dia->win, 1); + elm_win_center(dia->win, 1, 1); e_dialog_show(dia); - e_win_resize(dia->win, 400, 200); + evas_object_resize(dia->win, 400, 200); return 0; } @@ -880,9 +880,9 @@ _e_test_timer(void *data) /* buttons at the bottom */ e_dialog_button_add(dia, "OK", NULL, NULL, NULL); e_dialog_resizable_set(dia, 1); - e_win_centered_set(dia->win, 1); + elm_win_center(dia->win, 1, 1); e_dialog_show(dia); - e_win_resize(dia->win, 400, 200); + evas_object_resize(dia->win, 400, 200); return 0; } diff --git a/src/bin/e_theme_about.c b/src/bin/e_theme_about.c index fbecdac3bf..6aa6649b72 100644 --- a/src/bin/e_theme_about.c +++ b/src/bin/e_theme_about.c @@ -2,11 +2,9 @@ /* local subsystem functions */ static void -_cb_settings_theme(void *data, Evas_Object *obj __UNUSED__, const char *emission __UNUSED__, const char *source __UNUSED__) +_cb_settings_theme(void *data EINA_UNUSED, Evas_Object *obj __UNUSED__, const char *emission __UNUSED__, const char *source __UNUSED__) { - E_Obj_Dialog *od = data; - - e_configure_registry_call("appearance/theme", od->win->comp, NULL); + e_configure_registry_call("appearance/theme", NULL, NULL); } /* local subsystem globals */ diff --git a/src/bin/e_toolbar.c b/src/bin/e_toolbar.c index b7926d699d..f519290abb 100644 --- a/src/bin/e_toolbar.c +++ b/src/bin/e_toolbar.c @@ -150,7 +150,7 @@ e_toolbar_shutdown(void) } EAPI E_Toolbar * -e_toolbar_new(Evas *evas, const char *name, E_Win *fwin, Evas_Object *fm2) +e_toolbar_new(Evas *evas, const char *name, Evas_Object *fwin, Evas_Object *fm2) { E_Toolbar *tbar = NULL; @@ -201,7 +201,7 @@ e_toolbar_new(Evas *evas, const char *name, E_Win *fwin, Evas_Object *fm2) e_gadcon_toolbar_set(tbar->gadcon, tbar); tbar->gadcon->location = tb_location; - e_gadcon_ecore_evas_set(tbar->gadcon, tbar->fwin->ecore_evas); + e_gadcon_ecore_evas_set(tbar->gadcon, ecore_evas_ecore_evas_get(evas_object_evas_get(tbar->fwin))); e_gadcon_util_menu_attach_func_set(tbar->gadcon, _e_toolbar_menu_items_append, tbar); e_gadcon_populate(tbar->gadcon); @@ -212,14 +212,14 @@ e_toolbar_new(Evas *evas, const char *name, E_Win *fwin, Evas_Object *fm2) } EAPI void -e_toolbar_fwin_set(E_Toolbar *tbar, E_Win *fwin) +e_toolbar_fwin_set(E_Toolbar *tbar, Evas_Object *fwin) { E_OBJECT_CHECK(tbar); E_OBJECT_TYPE_CHECK(tbar, E_TOOLBAR_TYPE); tbar->fwin = fwin; } -EAPI E_Win * +EAPI Evas_Object * e_toolbar_fwin_get(E_Toolbar *tbar) { E_OBJECT_CHECK_RETURN(tbar, NULL); diff --git a/src/bin/e_toolbar.h b/src/bin/e_toolbar.h index b775b2b4e1..3194e0a84c 100644 --- a/src/bin/e_toolbar.h +++ b/src/bin/e_toolbar.h @@ -19,7 +19,7 @@ struct _E_Toolbar E_Gadcon *gadcon; E_Menu *menu; - E_Win *fwin; + Evas_Object *fwin; Evas_Object *fm2; E_Config_Dialog *cfg_dlg; @@ -28,9 +28,9 @@ struct _E_Toolbar EINTERN int e_toolbar_init(void); EINTERN int e_toolbar_shutdown(void); -EAPI E_Toolbar *e_toolbar_new(Evas *evas, const char *name, E_Win *fwin, Evas_Object *fm2); -EAPI void e_toolbar_fwin_set(E_Toolbar *tbar, E_Win *fwin); -EAPI E_Win *e_toolbar_fwin_get(E_Toolbar *tbar); +EAPI E_Toolbar *e_toolbar_new(Evas *evas, const char *name, Evas_Object *fwin, Evas_Object *fm2); +EAPI void e_toolbar_fwin_set(E_Toolbar *tbar, Evas_Object *fwin); +EAPI Evas_Object *e_toolbar_fwin_get(E_Toolbar *tbar); EAPI void e_toolbar_fm2_set(E_Toolbar *tbar, Evas_Object *fm2); EAPI Evas_Object *e_toolbar_fm2_get(E_Toolbar *tbar); EAPI void e_toolbar_orient(E_Toolbar *tbar, E_Gadcon_Orient orient); diff --git a/src/bin/e_update.c b/src/bin/e_update.c index fe77066b62..c57bea591b 100644 --- a/src/bin/e_update.c +++ b/src/bin/e_update.c @@ -88,7 +88,7 @@ _new_version(const char *ver) "or update your system packages<br>" "to get a new version."), ver); e_dialog_text_set(dialog, text); - e_win_centered_set(dialog->win, 1); + elm_win_center(dialog->win, 1, 1); e_dialog_show(dialog); } diff --git a/src/bin/e_utils.c b/src/bin/e_utils.c index 6f66ca846a..f55bbc5bfc 100644 --- a/src/bin/e_utils.c +++ b/src/bin/e_utils.c @@ -469,7 +469,7 @@ e_util_dialog_internal(const char *title, const char *txt) e_dialog_icon_set(dia, "dialog-error", 64); e_dialog_button_add(dia, _("OK"), NULL, NULL, NULL); e_dialog_button_focus_num(dia, 0); - e_win_centered_set(dia->win, 1); + elm_win_center(dia->win, 1, 1); e_dialog_show(dia); return dia; } @@ -834,24 +834,27 @@ _win_auto_size_calc(int max, int min) } EAPI void -e_util_win_auto_resize_fill(E_Win *win) +e_util_win_auto_resize_fill(Evas_Object *win) { E_Zone *zone = NULL; + E_Client *ec; - if (win->client) - zone = win->client->zone; - if ((!zone) && (win->comp)) - zone = e_zone_current_get(win->comp); + ec = e_win_client_get(win); + if (ec) + zone = ec->zone; + if (!zone) + zone = e_zone_current_get(e_comp_get(NULL)); if (zone) { - int w, h; + int w, h, mw, mh; e_zone_useful_geometry_get(zone, NULL, NULL, &w, &h); - w = _win_auto_size_calc(w, win->min_w); - h = _win_auto_size_calc(h, win->min_h); - e_win_resize(win, w, h); + evas_object_size_hint_min_get(win, &mw, &mh); + w = _win_auto_size_calc(w, mw); + h = _win_auto_size_calc(h, mh); + evas_object_resize(win, w, h); } } diff --git a/src/bin/e_utils.h b/src/bin/e_utils.h index 39c1a71152..cd90c0704a 100644 --- a/src/bin/e_utils.h +++ b/src/bin/e_utils.h @@ -45,7 +45,7 @@ EAPI void e_util_desktop_menu_item_icon_add(Efreet_Desktop *desktop, uns EAPI int e_util_dir_check(const char *dir); EAPI void e_util_defer_object_del(E_Object *obj); EAPI const char *e_util_winid_str_get(Ecore_X_Window win); -EAPI void e_util_win_auto_resize_fill(E_Win *win); +EAPI void e_util_win_auto_resize_fill(Evas_Object *win); /* check if loaded config version matches the current version, show a dialog warning if loaded version is older or newer than current */ EAPI Eina_Bool e_util_module_config_check(const char *module_name, int loaded, int current); diff --git a/src/bin/e_widget.c b/src/bin/e_widget.c index ee8cc68c68..496bc95046 100644 --- a/src/bin/e_widget.c +++ b/src/bin/e_widget.c @@ -481,11 +481,11 @@ e_widget_disabled_get(Evas_Object *obj) EAPI E_Pointer * e_widget_pointer_get(Evas_Object *obj) { - E_Win *win = NULL; + Evas_Object *win = NULL; API_ENTRY return NULL; win = e_win_evas_object_win_get(obj); - if (win) return win->pointer; + if (win) return e_win_pointer_get(win); return NULL; } diff --git a/src/bin/e_widget_bgpreview.c b/src/bin/e_widget_bgpreview.c index 9aed0b0ccd..6fe3d8897d 100644 --- a/src/bin/e_widget_bgpreview.c +++ b/src/bin/e_widget_bgpreview.c @@ -279,7 +279,7 @@ _e_wid_desk_cb_config(void *data, Evas *evas __UNUSED__, Evas_Object *obj __UNUS snprintf(buff, sizeof(buff), "%i %i %i %i", dd->manager, dd->zone, dd->x, dd->y); - e_configure_registry_call("internal/desk", e_util_comp_current_get(), buff); + e_configure_registry_call("internal/desk", NULL, buff); } } diff --git a/src/bin/e_win.c b/src/bin/e_win.c index e71451c665..03f293b0fe 100644 --- a/src/bin/e_win.c +++ b/src/bin/e_win.c @@ -1,21 +1,4 @@ #include "e.h" -#if defined(HAVE_WAYLAND_CLIENTS) || defined(HAVE_WAYLAND_ONLY) -# include "e_comp_wl.h" -#endif - - -/* local subsystem functions */ -static void _e_win_free(E_Win *win); -static void _e_win_prop_update(E_Win *win); -static void _e_win_state_update(E_Win *win); -static void _e_win_cb_move(Ecore_Evas *ee); -static void _e_win_cb_resize(Ecore_Evas *ee); -static void _e_win_cb_delete(Ecore_Evas *ee); -static void _e_win_cb_destroy(Ecore_Evas *ee); -static void _e_win_cb_state(Ecore_Evas *ee); - -/* local subsystem globals */ -static Eina_List *wins = NULL; /* intercept elm_win operations so we talk directly to e_client */ @@ -24,23 +7,21 @@ static Eina_List *wins = NULL; typedef struct _Elm_Win_Trap_Ctx { E_Client *client; - Ecore_Window xwin; + E_Pointer *pointer; Eina_Bool centered : 1; Eina_Bool placed : 1; + Eina_Bool internal_no_remember : 1; + Eina_Bool internal_no_reopen : 1; + Eina_Bool visible : 1; } Elm_Win_Trap_Ctx; -static void -_elm_win_prop_update(Elm_Win_Trap_Ctx *ctx) -{ - EC_CHANGED(ctx->client); - ctx->client->changes.internal_props = 1; -} static void * -_elm_win_trap_add(Evas_Object *o __UNUSED__) +_elm_win_trap_add(Evas_Object *o) { Elm_Win_Trap_Ctx *ctx = calloc(1, sizeof(Elm_Win_Trap_Ctx)); EINA_SAFETY_ON_NULL_RETURN_VAL(ctx, NULL); + evas_object_name_set(o, "E_Win"); return ctx; } @@ -54,17 +35,22 @@ _elm_win_trap_del(void *data, Evas_Object *o) evas_object_hide(ctx->client->frame); e_object_del(E_OBJECT(ctx->client)); evas_object_data_set(o, "E_Client", NULL); - ctx->client->internal_ecore_evas = NULL; + ctx->client->internal_elm_win = NULL; } free(ctx); } static Eina_Bool -_elm_win_trap_hide(void *data, Evas_Object *o __UNUSED__) +_elm_win_trap_hide(void *data, Evas_Object *o) { Elm_Win_Trap_Ctx *ctx = data; EINA_SAFETY_ON_NULL_RETURN_VAL(ctx, EINA_TRUE); + if (!ctx->visible) return EINA_FALSE; + if (strncmp(ecore_evas_engine_name_get(e_win_ee_get(o)), "wayland", 7)) + E_FREE_FUNC(ctx->pointer, e_object_del); + if (!ctx->client) return EINA_TRUE; + ctx->visible = 0; evas_object_hide(ctx->client->frame); return EINA_FALSE; } @@ -73,25 +59,29 @@ static Eina_Bool _elm_win_trap_show(void *data, Evas_Object *o) { Elm_Win_Trap_Ctx *ctx = data; + Evas *e = evas_object_evas_get(o); + Ecore_Evas *ee = ecore_evas_ecore_evas_get(e); + EINA_SAFETY_ON_NULL_RETURN_VAL(ctx, EINA_TRUE); if (!ctx->client) { E_Client *ec; Ecore_Window win; + E_Pixmap_Type type; -#if defined(HAVE_WAYLAND_CLIENTS) || defined(HAVE_WAYLAND_ONLY) win = elm_win_window_id_get(o); - ec = e_pixmap_find_client(E_PIXMAP_TYPE_WL, win); -#else - win = elm_win_xwindow_get(o); - ec = e_pixmap_find_client(E_PIXMAP_TYPE_X, win); -#endif - - Evas *e = evas_object_evas_get(o); - Ecore_Evas *ee = ecore_evas_ecore_evas_get(e); - - ctx->xwin = win; + if (!strncmp(ecore_evas_engine_name_get(ee), "wayland", 7)) + { + type = E_PIXMAP_TYPE_WL; + ctx->pointer = e_comp_get(NULL)->pointer; + } + else + { + type = E_PIXMAP_TYPE_X; + ctx->pointer = e_pointer_window_new(win, EINA_TRUE); + } + ec = e_pixmap_find_client(type, win); if (ec) ctx->client = ec; else @@ -99,11 +89,9 @@ _elm_win_trap_show(void *data, Evas_Object *o) E_Pixmap *cp; E_Comp *c = NULL; -#if defined(HAVE_WAYLAND_CLIENTS) || defined(HAVE_WAYLAND_ONLY) - cp = e_pixmap_new(E_PIXMAP_TYPE_WL, win); -#else - cp = e_pixmap_new(E_PIXMAP_TYPE_X, win); -#endif + ecore_evas_name_class_set(ee, "E", "_e_internal_window"); + ecore_evas_title_set(ee, "E"); + cp = e_pixmap_new(type, win); EINA_SAFETY_ON_NULL_RETURN_VAL(cp, EINA_TRUE); /* if (eina_list_count(e_comp_list()) > 1) */ @@ -120,13 +108,21 @@ _elm_win_trap_show(void *data, Evas_Object *o) ctx->client = e_client_new(c, cp, 0, 1); EINA_SAFETY_ON_NULL_RETURN_VAL(ctx->client, EINA_TRUE); } - ctx->client->placed = ctx->placed; - ctx->client->internal_ecore_evas = ee; + ctx->client->placed = ctx->placed | ctx->centered; + ctx->client->internal_no_remember = ctx->internal_no_remember; + ctx->client->internal_no_reopen = ctx->internal_no_reopen; + ctx->client->internal_elm_win = o; evas_object_data_set(o, "E_Client", ctx->client); + + evas_object_size_hint_min_get(o, &ctx->client->icccm.min_w, &ctx->client->icccm.min_h); + evas_object_size_hint_max_get(o, &ctx->client->icccm.max_w, &ctx->client->icccm.max_h); } //#endif - if (ctx->centered) e_comp_object_util_center(ctx->client->frame); + evas_object_geometry_get(o, &ctx->client->client.x, &ctx->client->client.y, &ctx->client->client.w, &ctx->client->client.h); + ecore_evas_show(ee); evas_object_show(ctx->client->frame); + if (ctx->centered) e_comp_object_util_center(ctx->client->frame); + ctx->visible = 1; return EINA_TRUE; } @@ -135,11 +131,12 @@ _elm_win_trap_move(void *data, Evas_Object *o __UNUSED__, int x, int y) { Elm_Win_Trap_Ctx *ctx = data; EINA_SAFETY_ON_NULL_RETURN_VAL(ctx, EINA_TRUE); - ctx->centered = EINA_FALSE; - ctx->placed = EINA_TRUE; + ctx->centered = 0; + ctx->placed = 1; if (!ctx->client) return EINA_TRUE; - e_client_util_move_without_frame(ctx->client, x, y); - return EINA_FALSE; + if ((ctx->client->client.x != x) || (ctx->client->client.y != y)) + e_client_util_move_without_frame(ctx->client, x, y); + return EINA_TRUE; } static Eina_Bool @@ -147,11 +144,11 @@ _elm_win_trap_resize(void *data, Evas_Object *o __UNUSED__, int w, int h) { Elm_Win_Trap_Ctx *ctx = data; EINA_SAFETY_ON_NULL_RETURN_VAL(ctx, EINA_TRUE); - ctx->centered = EINA_FALSE; if (!ctx->client) return EINA_TRUE; e_client_resize_limit(ctx->client, &w, &h); - e_client_util_resize_without_frame(ctx->client, w, h); - return EINA_FALSE; + if ((ctx->client->client.w != w) || (ctx->client->client.h != h)) + e_client_util_resize_without_frame(ctx->client, w, h); + return EINA_TRUE; } static Eina_Bool @@ -159,8 +156,8 @@ _elm_win_trap_center(void *data, Evas_Object *o __UNUSED__) { Elm_Win_Trap_Ctx *ctx = data; EINA_SAFETY_ON_NULL_RETURN_VAL(ctx, EINA_TRUE); - ctx->centered = EINA_TRUE; - if (!ctx->client) return EINA_TRUE; + ctx->centered = ctx->placed = 1; + if (!ctx->client) return EINA_FALSE; if (ctx->centered) e_comp_object_util_center(ctx->client->frame); return EINA_FALSE; } @@ -198,18 +195,77 @@ _elm_win_trap_activate(void *data, Evas_Object *o __UNUSED__) } static Eina_Bool +_elm_win_trap_size_min_set(void *data, Evas_Object *o __UNUSED__, int w, int h) +{ + Elm_Win_Trap_Ctx *ctx = data; + int mw, mh; + + EINA_SAFETY_ON_NULL_RETURN_VAL(ctx, EINA_TRUE); + if (!ctx->client) return EINA_TRUE; + ctx->client->icccm.min_w = w; + ctx->client->icccm.min_h = h; + e_client_resize_limit(ctx->client, &mw, &mh); + mw = ctx->client->w < w ? w : ctx->client->w; + mh = ctx->client->h < h ? h : ctx->client->h; + if ((ctx->client->w != mw) || (ctx->client->h != mh)) + evas_object_resize(ctx->client->frame, mw, mh); + + return EINA_TRUE; +} + +static Eina_Bool +_elm_win_trap_size_max_set(void *data, Evas_Object *o __UNUSED__, int w, int h) +{ + Elm_Win_Trap_Ctx *ctx = data; + int mw, mh; + + EINA_SAFETY_ON_NULL_RETURN_VAL(ctx, EINA_TRUE); + if (!ctx->client) return EINA_TRUE; + ctx->client->icccm.max_w = w; + ctx->client->icccm.max_h = h; + e_client_resize_limit(ctx->client, &mw, &mh); + mw = ctx->client->w > w ? w : ctx->client->w; + mh = ctx->client->h > h ? h : ctx->client->h; + if ((ctx->client->w != mw) || (ctx->client->h != mh)) + evas_object_resize(ctx->client->frame, mw, mh); + + return EINA_TRUE; +} + +static Eina_Bool _elm_win_trap_size_base_set(void *data, Evas_Object *o __UNUSED__, int w, int h) { Elm_Win_Trap_Ctx *ctx = data; + int mw, mh; + EINA_SAFETY_ON_NULL_RETURN_VAL(ctx, EINA_TRUE); if (!ctx->client) return EINA_TRUE; ctx->client->icccm.base_w = w; ctx->client->icccm.base_h = h; - _elm_win_prop_update(ctx); + e_client_resize_limit(ctx->client, &mw, &mh); + mw = ctx->client->w < w ? w : ctx->client->w; + mh = ctx->client->h < h ? h : ctx->client->h; + if ((ctx->client->w != mw) || (ctx->client->h != mh)) + evas_object_resize(ctx->client->frame, mw, mh); return EINA_TRUE; } +static Eina_Bool +_elm_win_trap_borderless_set(void *data, Evas_Object *o EINA_UNUSED, Eina_Bool borderless) +{ + Elm_Win_Trap_Ctx *ctx = data; + EINA_SAFETY_ON_NULL_RETURN_VAL(ctx, EINA_TRUE); + if (!ctx->client) return EINA_TRUE; + + borderless = !!borderless; + + ctx->client->borderless = borderless; + EC_CHANGED(ctx->client); + ctx->client->changes.border = 1; + return EINA_TRUE; +} + static const Elm_Win_Trap _elm_win_trap = { ELM_WIN_TRAP_VERSION, _elm_win_trap_add, @@ -225,7 +281,7 @@ static const Elm_Win_Trap _elm_win_trap = { /* alpha_set */ NULL, /* aspect_set */ NULL, /* avoid_damage_set */ NULL, - /* borderless_set */ NULL, + _elm_win_trap_borderless_set, /* demand_attention_set */ NULL, /* focus_skip_set */ NULL, /* fullscreen_set */ NULL, @@ -242,41 +298,14 @@ static const Elm_Win_Trap _elm_win_trap = { /* shaped_set */ NULL, _elm_win_trap_size_base_set, /* size_step_set */ NULL, - /* size_min_set */ NULL, - /* size_max_set */ NULL, + _elm_win_trap_size_min_set, + _elm_win_trap_size_max_set, /* sticky_set */ NULL, /* title_set */ NULL, /* urgent_set */ NULL, /* withdrawn_set */ NULL }; -static void -_e_win_hide(void *obj) -{ - E_Win *win = obj; - E_Win_Cb cb; - - if (!win->client) return; - e_object_ref(E_OBJECT(win)); - cb = win->cb_delete; - win->cb_delete = NULL; - if (cb) cb(win); - if (!e_object_unref(E_OBJECT(win))) - return; - if ((win->pointer) && (win->comp->comp_type != E_PIXMAP_TYPE_WL)) - E_FREE_FUNC(win->pointer, e_object_del); - e_canvas_del(win->ecore_evas); - ecore_evas_callback_move_set(win->ecore_evas, NULL); - ecore_evas_callback_resize_set(win->ecore_evas, NULL); - ecore_evas_callback_delete_request_set(win->ecore_evas, NULL); - ecore_evas_callback_state_change_set(win->ecore_evas, NULL); - ecore_evas_callback_destroy_set(win->ecore_evas, NULL); - /* prevent any more rendering at this point */ - ecore_evas_manual_render_set(win->ecore_evas, 1); - if (win->client->visible) evas_object_hide(win->client->frame); - e_object_del(E_OBJECT(win->client)); -} - /* externally accessible functions */ EINTERN int e_win_init(void) @@ -288,546 +317,92 @@ e_win_init(void) EINTERN int e_win_shutdown(void) { -/* - while (wins) - { - e_object_del(E_OBJECT(wins->data)); - } - */ return 1; } -EAPI Eina_Bool -e_win_elm_available(void) -{ - return EINA_TRUE; -} - -EAPI E_Win * -e_win_new(E_Comp *c) -{ - E_Win *win; - Evas_Object *obj; - - win = E_OBJECT_ALLOC(E_Win, E_WIN_TYPE, _e_win_free); - if (!win) return NULL; - e_object_delay_del_set(E_OBJECT(win), _e_win_hide); - win->comp = c; - win->ecore_evas = e_canvas_new(c->man->root, - 0, 0, 1, 1, 1, 0, - &win->evas_win); - e_canvas_add(win->ecore_evas); - ecore_evas_data_set(win->ecore_evas, "E_Win", win); - ecore_evas_callback_move_set(win->ecore_evas, _e_win_cb_move); - ecore_evas_callback_resize_set(win->ecore_evas, _e_win_cb_resize); - ecore_evas_callback_delete_request_set(win->ecore_evas, _e_win_cb_delete); - ecore_evas_callback_destroy_set(win->ecore_evas, _e_win_cb_destroy); - ecore_evas_callback_state_change_set(win->ecore_evas, _e_win_cb_state); - win->evas = ecore_evas_get(win->ecore_evas); - ecore_evas_name_class_set(win->ecore_evas, "E", "_e_internal_window"); - ecore_evas_title_set(win->ecore_evas, "E"); - obj = evas_object_rectangle_add(win->evas); - evas_object_name_set(obj, "E_Win"); - evas_object_data_set(obj, "E_Win", win); - win->x = 0; - win->y = 0; - win->w = 1; - win->h = 1; - win->placed = 0; - win->min_w = 0; - win->min_h = 0; - win->max_w = 9999; - win->max_h = 9999; - win->base_w = 0; - win->base_h = 0; - win->step_x = 1; - win->step_y = 1; - win->min_aspect = 0.0; - win->max_aspect = 0.0; - wins = eina_list_append(wins, win); - - if (c->comp_type == E_PIXMAP_TYPE_X) - win->pointer = e_pointer_window_new(win->evas_win, EINA_TRUE); - else if (c->comp_type == E_PIXMAP_TYPE_WL) - win->pointer = c->pointer; - - return win; -} - -EAPI void -e_win_show(E_Win *win) -{ - E_OBJECT_CHECK(win); - E_OBJECT_TYPE_CHECK(win, E_WIN_TYPE); - ecore_evas_show(win->ecore_evas); - if (!win->client) - { -#if defined(HAVE_WAYLAND_CLIENTS) || defined(HAVE_WAYLAND_ONLY) - if (!strncmp(ecore_evas_engine_name_get(win->ecore_evas), "wayland", 7)) - { - Ecore_Wl_Window *wl_win; - E_Pixmap *ep; - uint64_t id; - - wl_win = ecore_evas_wayland_window_get(win->ecore_evas); - id = e_comp_wl_id_get(getpid(), ecore_wl_window_surface_id_get(wl_win)); - if (!(ep = e_pixmap_find(E_PIXMAP_TYPE_WL, id))) - ep = e_pixmap_new(E_PIXMAP_TYPE_WL, id); - win->client = e_client_new(win->comp, ep, 1, 1); - } - else -#endif - win->client = e_client_new(win->comp, e_pixmap_new(E_PIXMAP_TYPE_X, win->evas_win), 0, 1); - EINA_SAFETY_ON_NULL_RETURN(win->client); - if (win->ecore_evas) - win->client->internal_ecore_evas = win->ecore_evas; - if (win->state.no_remember) win->client->internal_no_remember = 1; - win->client->internal_no_reopen = win->state.no_reopen; - win->client->client.w = win->client->w = win->w; - win->client->client.h = win->client->h = win->h; - win->client->take_focus = win->client->changes.size = win->client->changes.pos = 1; - EC_CHANGED(win->client); - } -#ifndef HAVE_WAYLAND_ONLY - if (e_pixmap_is_x(win->client->pixmap)) - { - if (win->state.dialog) - ecore_x_icccm_transient_for_set(ecore_evas_window_get(win->ecore_evas), win->client->comp->man->root); - else - ecore_x_icccm_transient_for_unset(ecore_evas_window_get(win->ecore_evas)); - } -#endif - _e_win_prop_update(win); - if (win->state.centered) - e_comp_object_util_center(win->client->frame); -} - -EAPI void -e_win_hide(E_Win *win) -{ - E_OBJECT_CHECK(win); - E_OBJECT_TYPE_CHECK(win, E_WIN_TYPE); - if (win->client) evas_object_hide(win->client->frame); -} - -/** - * This will move window to position, automatically accounts client decorations. - * - * @parm x horizontal position to place window. - * @parm y vertical position to place window. - */ -EAPI void -e_win_move(E_Win *win, int x, int y) -{ - E_OBJECT_CHECK(win); - E_OBJECT_TYPE_CHECK(win, E_WIN_TYPE); - if (win->client) - { - e_client_util_move_without_frame(win->client, x, y); - win->client->changes.pos = 1; - EC_CHANGED(win->client); - } - else - ecore_evas_move(win->ecore_evas, x, y); -} - -/** - * This will resize window, automatically accounts client decorations. - * - * @parm w horizontal window size. - * @parm h vertical window size. - */ -EAPI void -e_win_resize(E_Win *win, int w, int h) -{ - E_OBJECT_CHECK(win); - E_OBJECT_TYPE_CHECK(win, E_WIN_TYPE); - if (win->client) - { - e_client_util_resize_without_frame(win->client, w, h); - win->client->changes.size = 1; - EC_CHANGED(win->client); - } - else - ecore_evas_resize(win->ecore_evas, w, h); -} - -/** - * This will move and resize window to position, automatically - * accounts client decorations. - * - * @parm x horizontal position to place window. - * @parm y vertical position to place window. - * @parm w horizontal window size. - * @parm h vertical window size. - */ -EAPI void -e_win_move_resize(E_Win *win, int x, int y, int w, int h) -{ - E_OBJECT_CHECK(win); - E_OBJECT_TYPE_CHECK(win, E_WIN_TYPE); - if (win->client) - { - e_client_util_move_resize_without_frame(win->client, x, y, w, h); - win->client->changes.pos = win->client->changes.size = 1; - EC_CHANGED(win->client); - } - else - ecore_evas_move_resize(win->ecore_evas, x, y, w, h); -} - -EAPI void -e_win_raise(E_Win *win) -{ - E_OBJECT_CHECK(win); - E_OBJECT_TYPE_CHECK(win, E_WIN_TYPE); - if (win->client) - evas_object_raise(win->client->frame); -} - -EAPI void -e_win_lower(E_Win *win) -{ - E_OBJECT_CHECK(win); - E_OBJECT_TYPE_CHECK(win, E_WIN_TYPE); - if (win->client) - evas_object_lower(win->client->frame); -} - -EAPI void -e_win_placed_set(E_Win *win, int placed) -{ - E_OBJECT_CHECK(win); - E_OBJECT_TYPE_CHECK(win, E_WIN_TYPE); - win->placed = placed; - if (win->client) - _e_win_prop_update(win); -} - -EAPI Evas * -e_win_evas_get(E_Win *win) +EAPI E_Client * +e_win_client_get(Evas_Object *obj) { - E_OBJECT_CHECK_RETURN(win, NULL); - E_OBJECT_TYPE_CHECK_RETURN(win, E_WIN_TYPE, NULL); - return win->evas; -} + Elm_Win_Trap_Ctx *ctx; -EAPI void -e_win_move_callback_set(E_Win *win, void (*func)(E_Win *win)) -{ - E_OBJECT_CHECK(win); - E_OBJECT_TYPE_CHECK(win, E_WIN_TYPE); - win->cb_move = func; -} + if (!e_obj_is_win(obj)) return NULL; + ctx = elm_win_trap_data_get(obj); -EAPI void -e_win_resize_callback_set(E_Win *win, void (*func)(E_Win *win)) -{ - E_OBJECT_CHECK(win); - E_OBJECT_TYPE_CHECK(win, E_WIN_TYPE); - win->cb_resize = func; -} - -EAPI void -e_win_delete_callback_set(E_Win *win, void (*func)(E_Win *win)) -{ - E_OBJECT_CHECK(win); - E_OBJECT_TYPE_CHECK(win, E_WIN_TYPE); - win->cb_delete = func; -} - -EAPI void -e_win_shaped_set(E_Win *win, int shaped) -{ - E_OBJECT_CHECK(win); - E_OBJECT_TYPE_CHECK(win, E_WIN_TYPE); - ecore_evas_shaped_set(win->ecore_evas, shaped); + return ctx ? ctx->client : NULL; } -EAPI void -e_win_avoid_damage_set(E_Win *win, int avoid) +EAPI Ecore_Evas * +e_win_ee_get(Evas_Object *obj) { - E_OBJECT_CHECK(win); - E_OBJECT_TYPE_CHECK(win, E_WIN_TYPE); - ecore_evas_avoid_damage_set(win->ecore_evas, avoid); + return ecore_evas_ecore_evas_get(evas_object_evas_get(obj)); } -EAPI void -e_win_borderless_set(E_Win *win, int borderless) +EAPI E_Pointer * +e_win_pointer_get(Evas_Object *obj) { - E_OBJECT_CHECK(win); - E_OBJECT_TYPE_CHECK(win, E_WIN_TYPE); - ecore_evas_borderless_set(win->ecore_evas, borderless); -} + Elm_Win_Trap_Ctx *ctx = elm_win_trap_data_get(obj); -EAPI void -e_win_layer_set(E_Win *win, E_Win_Layer layer) -{ - E_OBJECT_CHECK(win); - E_OBJECT_TYPE_CHECK(win, E_WIN_TYPE); - ecore_evas_layer_set(win->ecore_evas, layer); + return ctx ? ctx->pointer : NULL; } -EAPI void -e_win_sticky_set(E_Win *win, int sticky) +EAPI Eina_Bool +e_win_centered_get(Evas_Object *obj) { - E_OBJECT_CHECK(win); - E_OBJECT_TYPE_CHECK(win, E_WIN_TYPE); - ecore_evas_sticky_set(win->ecore_evas, sticky); -} + Elm_Win_Trap_Ctx *ctx = elm_win_trap_data_get(obj); -EAPI void -e_win_size_min_set(E_Win *win, int w, int h) -{ - E_OBJECT_CHECK(win); - E_OBJECT_TYPE_CHECK(win, E_WIN_TYPE); - w = MIN(w, 32768); - h = MIN(h, 32768); - win->min_w = w; - win->min_h = h; - if (!win->client) return; - _e_win_prop_update(win); + return ctx ? ctx->centered : EINA_FALSE; } EAPI void -e_win_size_max_set(E_Win *win, int w, int h) +e_win_client_icon_set(Evas_Object *obj, const char *icon) { - E_OBJECT_CHECK(win); - E_OBJECT_TYPE_CHECK(win, E_WIN_TYPE); - w = MIN(w, 32768); - h = MIN(h, 32768); - win->max_w = w; - win->max_h = h; - if (!win->client) return; - _e_win_prop_update(win); -} + Elm_Win_Trap_Ctx *ctx = elm_win_trap_data_get(obj); -EAPI void -e_win_size_base_set(E_Win *win, int w, int h) -{ - E_OBJECT_CHECK(win); - E_OBJECT_TYPE_CHECK(win, E_WIN_TYPE); - w = MIN(w, 32768); - h = MIN(h, 32768); - win->base_w = w; - win->base_h = h; - if (!win->client) return; - _e_win_prop_update(win); + if (ctx->client) + eina_stringshare_replace(&ctx->client->internal_icon, icon); } EAPI void -e_win_step_set(E_Win *win, int x, int y) +e_win_client_icon_key_set(Evas_Object *obj, const char *key) { - E_OBJECT_CHECK(win); - E_OBJECT_TYPE_CHECK(win, E_WIN_TYPE); - win->step_x = x; - win->step_y = y; - if (!win->client) return; - _e_win_prop_update(win); -} + Elm_Win_Trap_Ctx *ctx = elm_win_trap_data_get(obj); -EAPI void -e_win_name_class_set(E_Win *win, const char *name, const char *class) -{ - E_OBJECT_CHECK(win); - E_OBJECT_TYPE_CHECK(win, E_WIN_TYPE); - ecore_evas_name_class_set(win->ecore_evas, name, class); + if (ctx->client) + eina_stringshare_replace(&ctx->client->internal_icon_key, key); } EAPI void -e_win_title_set(E_Win *win, const char *title) +e_win_placed_set(Evas_Object *obj, Eina_Bool placed) { - E_OBJECT_CHECK(win); - E_OBJECT_TYPE_CHECK(win, E_WIN_TYPE); - ecore_evas_title_set(win->ecore_evas, title); -} + Elm_Win_Trap_Ctx *ctx = elm_win_trap_data_get(obj); -EAPI void -e_win_centered_set(E_Win *win, int centered) -{ - E_OBJECT_CHECK(win); - E_OBJECT_TYPE_CHECK(win, E_WIN_TYPE); - if ((win->state.centered) && (!centered)) - { - win->state.centered = 0; - _e_win_state_update(win); - } - else if ((!win->state.centered) && (centered)) - { - win->state.centered = 1; - _e_win_state_update(win); - } -} - -EAPI void -e_win_dialog_set(E_Win *win, int dialog) -{ - E_OBJECT_CHECK(win); - E_OBJECT_TYPE_CHECK(win, E_WIN_TYPE); - if ((win->state.dialog) && (!dialog)) - { - win->state.dialog = 0; - _e_win_prop_update(win); - } - else if ((!win->state.dialog) && (dialog)) + EINA_SAFETY_ON_NULL_RETURN(obj); + ctx->placed = !!placed; + if (ctx->client) { - win->state.dialog = 1; - _e_win_prop_update(win); + ctx->client->placed = !!placed; + EC_CHANGED(ctx->client); } } EAPI void -e_win_no_remember_set(E_Win *win, int no_remember) +e_win_no_remember_set(Evas_Object *obj, Eina_Bool no_rem) { - E_OBJECT_CHECK(win); - E_OBJECT_TYPE_CHECK(win, E_WIN_TYPE); - win->state.no_remember = no_remember; -} - -EAPI E_Win * -e_win_evas_object_win_get(Evas_Object *obj) -{ - Evas *evas; - Evas_Object *wobj; - E_Win *win; - - if (!obj) return NULL; - evas = evas_object_evas_get(obj); - wobj = evas_object_name_find(evas, "E_Win"); - if (!wobj) return NULL; - win = evas_object_data_get(wobj, "E_Win"); - return win; -} + Elm_Win_Trap_Ctx *ctx = elm_win_trap_data_get(obj); -EAPI void -e_win_client_icon_set(E_Win *win, const char *icon) -{ - if (win->client) - eina_stringshare_replace(&win->client->internal_icon, icon); + EINA_SAFETY_ON_NULL_RETURN(obj); + ctx->internal_no_remember = !!no_rem; + if (ctx->client) + ctx->client->internal_no_remember = !!no_rem; } EAPI void -e_win_client_icon_key_set(E_Win *win, const char *key) +e_win_no_reopen_set(Evas_Object *obj, Eina_Bool no_reopen) { - if (win->client) - eina_stringshare_replace(&win->client->internal_icon_key, key); -} - -/* local subsystem functions */ -static void -_e_win_free(E_Win *win) -{ - if ((win->pointer) && (win->comp->comp_type != E_PIXMAP_TYPE_WL)) - e_object_del(E_OBJECT(win->pointer)); - - if (win->ecore_evas) - { - ecore_evas_callback_move_set(win->ecore_evas, NULL); - ecore_evas_callback_resize_set(win->ecore_evas, NULL); - ecore_evas_callback_state_change_set(win->ecore_evas, NULL); - ecore_evas_callback_destroy_set(win->ecore_evas, NULL); - } - wins = eina_list_remove(wins, win); - free(win); -} - -static void -_e_win_prop_update(E_Win *win) -{ - if (!win->client) return; - EC_CHANGED(win->client); - win->client->icccm.min_w = win->min_w; - win->client->icccm.min_h = win->min_h; - win->client->icccm.max_w = win->max_w; - win->client->icccm.max_h = win->max_h; - win->client->icccm.base_w = win->base_w; - win->client->icccm.base_h = win->base_h; - win->client->icccm.step_w = win->step_x; - win->client->icccm.step_h = win->step_y; - win->client->icccm.min_aspect = win->min_aspect; - win->client->icccm.max_aspect = win->max_aspect; - win->client->changes.internal_props = 1; -} + Elm_Win_Trap_Ctx *ctx = elm_win_trap_data_get(obj); -static void -_e_win_state_update(E_Win *win) -{ - if (!win->client) return; - EC_CHANGED(win->client); - win->client->changes.internal_state = 1; - if (win->state.centered) - e_comp_object_util_center(win->client->frame); -} - -static void -_e_win_cb_move(Ecore_Evas *ee) -{ - E_Win *win; - - win = ecore_evas_data_get(ee, "E_Win"); - if (!win) return; - if (win->client) - win->x = win->client->x, win->y = win->client->y; - else - ecore_evas_geometry_get(win->ecore_evas, &win->x, &win->y, NULL, NULL); - if (win->cb_move) win->cb_move(win); -} - -static void -_e_win_cb_resize(Ecore_Evas *ee) -{ - E_Win *win; - - win = ecore_evas_data_get(ee, "E_Win"); - if (!win) return; - ecore_evas_geometry_get(win->ecore_evas, NULL, NULL, &win->w, &win->h); - if (win->cb_resize) win->cb_resize(win); -} - -static void -_e_win_cb_destroy(Ecore_Evas *ee) -{ - E_Win *win; - - win = ecore_evas_data_get(ee, "E_Win"); - if (!win) return; - e_object_ref(E_OBJECT(win)); - if (win->cb_delete) win->cb_delete(win); - win->cb_delete = NULL; - e_object_unref(E_OBJECT(win)); - /* E_FREE_FUNC(win->pointer, e_object_del); */ - if (!win->client) return; - win->client->internal_ecore_evas = NULL; - e_canvas_del(ee); - e_pixmap_usable_set(win->client->pixmap, 0); - if (win->client->visible) evas_object_hide(win->client->frame); - win->ecore_evas = NULL; - e_object_del(E_OBJECT(win->client)); -} - -static void -_e_win_cb_delete(Ecore_Evas *ee) -{ - E_Win *win; - E_Win_Cb cb; - - win = ecore_evas_data_get(ee, "E_Win"); - if (!win) return; - e_object_ref(E_OBJECT(win)); - cb = win->cb_delete; - win->cb_delete = NULL; - if (cb) cb(win); - e_object_unref(E_OBJECT(win)); -} - -static void -_e_win_cb_state(Ecore_Evas *ee) -{ - E_Win *win; - - win = ecore_evas_data_get(ee, "E_Win"); - if (!win) return; - if (!win->client) return; - EC_CHANGED(win->client); - win->client->changes.size = 1; + EINA_SAFETY_ON_NULL_RETURN(obj); + ctx->internal_no_reopen = !!no_reopen; + if (ctx->client) + ctx->client->internal_no_reopen = !!no_reopen; } diff --git a/src/bin/e_win.h b/src/bin/e_win.h index 65bf6b38ac..7db2c7deb3 100644 --- a/src/bin/e_win.h +++ b/src/bin/e_win.h @@ -1,85 +1,43 @@ -#ifdef E_TYPEDEFS +#ifndef E_TYPEDEFS +#ifndef E_WIN_H +#define E_WIN_H -typedef enum _E_Win_Layer -{ - E_WIN_LAYER_BELOW = 3, - E_WIN_LAYER_NORMAL = 4, - E_WIN_LAYER_ABOVE = 5 -} E_Win_Layer; +EINTERN int e_win_init (void); +EINTERN int e_win_shutdown (void); -typedef struct _E_Win E_Win; -typedef void (*E_Win_Cb)(E_Win*); +EAPI E_Client *e_win_client_get(Evas_Object *obj); +EAPI Ecore_Evas *e_win_ee_get(Evas_Object *obj); +EAPI E_Pointer *e_win_pointer_get(Evas_Object *obj); +EAPI Eina_Bool e_win_centered_get(Evas_Object *obj); -#else -#ifndef E_WIN_H -#define E_WIN_H +EAPI void e_win_client_icon_set(Evas_Object *win, const char *icon); +EAPI void e_win_client_icon_key_set(Evas_Object *win, const char *key); -#define E_WIN_TYPE 0xE0b01011 +EAPI void e_win_placed_set(Evas_Object *win, Eina_Bool placed); +EAPI void e_win_no_remember_set(Evas_Object *win, Eina_Bool no_rem); +EAPI void e_win_no_reopen_set(Evas_Object *win, Eina_Bool no_reopen); -struct _E_Win +static inline Evas_Object * +e_win_evas_object_win_get(Evas_Object *obj) { - E_Object e_obj_inherit; - - int x, y, w, h; - E_Comp *comp; - E_Client *client; - Ecore_Evas *ecore_evas; - Evas *evas; - Ecore_Window evas_win; - unsigned char placed : 1; - int min_w, min_h, max_w, max_h, base_w, base_h; - int step_x, step_y; - double min_aspect, max_aspect; - E_Win_Cb cb_move; - E_Win_Cb cb_resize; - E_Win_Cb cb_delete; - void *data; - - struct { - unsigned char centered : 1; - unsigned char dialog : 1; - unsigned char no_remember : 1; - unsigned char no_reopen : 1; - } state; + return ecore_evas_data_get(e_win_ee_get(obj), "elm_win"); +} - E_Pointer *pointer; -}; +static inline Eina_Bool +e_obj_is_win(const void *obj) +{ + const char *type = evas_object_type_get(obj); + return type && !strcmp(type, "elm_win"); +} -EINTERN int e_win_init (void); -EINTERN int e_win_shutdown (void); -EAPI Eina_Bool e_win_elm_available(void); -EAPI E_Win *e_win_new (E_Comp *c); -EAPI void e_win_show (E_Win *win); -EAPI void e_win_hide (E_Win *win); -EAPI void e_win_move (E_Win *win, int x, int y); -EAPI void e_win_resize (E_Win *win, int w, int h); -EAPI void e_win_move_resize (E_Win *win, int x, int y, int w, int h); -EAPI void e_win_raise (E_Win *win); -EAPI void e_win_lower (E_Win *win); -EAPI void e_win_placed_set (E_Win *win, int placed); -EAPI Evas *e_win_evas_get (E_Win *win); -EAPI void e_win_shaped_set (E_Win *win, int shaped); -EAPI void e_win_avoid_damage_set (E_Win *win, int avoid); -EAPI void e_win_borderless_set (E_Win *win, int borderless); -EAPI void e_win_layer_set (E_Win *win, E_Win_Layer layer); -EAPI void e_win_sticky_set (E_Win *win, int sticky); -EAPI void e_win_move_callback_set (E_Win *win, void (*func) (E_Win *win)); -EAPI void e_win_resize_callback_set(E_Win *win, void (*func) (E_Win *win)); -EAPI void e_win_delete_callback_set(E_Win *win, void (*func) (E_Win *win)); -EAPI void e_win_size_min_set (E_Win *win, int w, int h); -EAPI void e_win_size_max_set (E_Win *win, int w, int h); -EAPI void e_win_size_base_set (E_Win *win, int w, int h); -EAPI void e_win_step_set (E_Win *win, int x, int y); -EAPI void e_win_name_class_set (E_Win *win, const char *name, const char *class); -EAPI void e_win_title_set (E_Win *win, const char *title); -EAPI void e_win_client_icon_set (E_Win *win, const char *icon); -EAPI void e_win_client_icon_key_set(E_Win *win, const char *key); -EAPI void e_win_centered_set (E_Win *win, int centered); -EAPI void e_win_dialog_set (E_Win *win, int dialog); -EAPI void e_win_no_remember_set (E_Win *win, int no_remember); +#define E_WIN_START \ + char *eng__ = eina_strdup(getenv("ELM_ACCEL")); \ + e_util_env_set("ELM_ACCEL", "none") -EAPI E_Win *e_win_evas_object_win_get(Evas_Object *obj); +#define E_WIN_END \ + e_util_env_set("ELM_ACCEL", eng__); \ + free(eng__) #endif #endif diff --git a/src/bin/e_zone.c b/src/bin/e_zone.c index 6ac950a8a0..f73cfef958 100644 --- a/src/bin/e_zone.c +++ b/src/bin/e_zone.c @@ -81,8 +81,6 @@ _e_zone_cb_mouse_in(void *data, Evas *e EINA_UNUSED, Evas_Object *obj, void *eve E_Event_Zone_Edge *zev; E_Zone_Edge edge; E_Zone *zone = data; - const Eina_List *l; - Ecore_Evas *ee; edge = _e_zone_detect_edge(zone, obj); if (edge == E_ZONE_EDGE_NONE) return; @@ -93,13 +91,7 @@ _e_zone_cb_mouse_in(void *data, Evas *e EINA_UNUSED, Evas_Object *obj, void *eve zev->x = ev->output.x; zev->y = ev->output.y; zev->modifiers = e_bindings_evas_modifiers_convert(ev->modifiers); - EINA_LIST_FOREACH(e_canvas_list(), l, ee) - { - /* FIXME: comp */ - if (!evas_pointer_button_down_mask_get(ecore_evas_get(ee))) continue; - zev->drag = 1; - break; - } + zev->drag = !!evas_pointer_button_down_mask_get(e_comp_get(zone)->evas); ecore_event_add(E_EVENT_ZONE_EDGE_IN, zev, NULL, NULL); e_bindings_edge_in_event_handle(E_BINDING_CONTEXT_ZONE, E_OBJECT(zone), zev); @@ -112,8 +104,6 @@ _e_zone_cb_mouse_out(void *data, Evas *e EINA_UNUSED, Evas_Object *obj, void *ev E_Event_Zone_Edge *zev; E_Zone_Edge edge; E_Zone *zone = data; - const Eina_List *l; - Ecore_Evas *ee; edge = _e_zone_detect_edge(zone, obj); if (edge == E_ZONE_EDGE_NONE) return; @@ -124,13 +114,7 @@ _e_zone_cb_mouse_out(void *data, Evas *e EINA_UNUSED, Evas_Object *obj, void *ev zev->x = ev->output.x; zev->y = ev->output.y; zev->modifiers = e_bindings_evas_modifiers_convert(ev->modifiers); - EINA_LIST_FOREACH(e_canvas_list(), l, ee) - { - /* FIXME: comp */ - if (!evas_pointer_button_down_mask_get(ecore_evas_get(ee))) continue; - zev->drag = 1; - break; - } + zev->drag = !!evas_pointer_button_down_mask_get(e_comp_get(zone)->evas); ecore_event_add(E_EVENT_ZONE_EDGE_OUT, zev, NULL, NULL); e_bindings_edge_out_event_handle(E_BINDING_CONTEXT_ZONE, E_OBJECT(zone), zev); diff --git a/src/modules/backlight/e_mod_main.c b/src/modules/backlight/e_mod_main.c index bbe1ef36fc..7a9bc9eb4a 100644 --- a/src/modules/backlight/e_mod_main.c +++ b/src/modules/backlight/e_mod_main.c @@ -163,8 +163,7 @@ static void _backlight_settings_cb(void *d1, void *d2 __UNUSED__) { Instance *inst = d1; - e_configure_registry_call("screen/power_management", - inst->gcc->gadcon->zone->comp, NULL); + e_configure_registry_call("screen/power_management", NULL, NULL); _backlight_popup_free(inst); } @@ -239,8 +238,7 @@ _backlight_menu_cb_cfg(void *data, E_Menu *menu __UNUSED__, E_Menu_Item *mi __UN Instance *inst = data; _backlight_popup_free(inst); - e_configure_registry_call("screen/power_management", - inst->gcc->gadcon->zone->comp, NULL); + e_configure_registry_call("screen/power_management", NULL, NULL); } static void diff --git a/src/modules/battery/e_mod_config.c b/src/modules/battery/e_mod_config.c index 456e89d0ec..3ab08e9fb7 100644 --- a/src/modules/battery/e_mod_config.c +++ b/src/modules/battery/e_mod_config.c @@ -43,7 +43,7 @@ static int _advanced_check_changed(E_Config_Dialog *cfd, E_Config_Dialo static void _cb_radio_changed(void *data, Evas_Object *obj __UNUSED__); E_Config_Dialog * -e_int_config_battery_module(E_Comp *comp, const char *params __UNUSED__) +e_int_config_battery_module(Evas_Object *parent EINA_UNUSED, const char *params __UNUSED__) { E_Config_Dialog *cfd; E_Config_Dialog_View *v; @@ -61,7 +61,7 @@ e_int_config_battery_module(E_Comp *comp, const char *params __UNUSED__) snprintf(buf, sizeof(buf), "%s/e-module-battery.edj", e_module_dir_get(battery_config->module)); - cfd = e_config_dialog_new(comp, _("Battery Monitor Settings"), + cfd = e_config_dialog_new(NULL, _("Battery Monitor Settings"), "E", "_e_mod_battery_config_dialog", buf, 0, v, NULL); battery_config->config_dialog = cfd; diff --git a/src/modules/battery/e_mod_main.c b/src/modules/battery/e_mod_main.c index 7fe0a2527c..cf21608cf1 100644 --- a/src/modules/battery/e_mod_main.c +++ b/src/modules/battery/e_mod_main.c @@ -243,17 +243,17 @@ _battery_face_time_set(Evas_Object *battery, int t) } static void -_battery_face_cb_menu_powermanagement(void *data __UNUSED__, E_Menu *m, E_Menu_Item *mi __UNUSED__) +_battery_face_cb_menu_powermanagement(void *data __UNUSED__, E_Menu *m EINA_UNUSED, E_Menu_Item *mi __UNUSED__) { - e_configure_registry_call("advanced/powermanagement", m->zone->comp, NULL); + e_configure_registry_call("advanced/powermanagement", NULL, NULL); } static void -_battery_face_cb_menu_configure(void *data __UNUSED__, E_Menu *m, E_Menu_Item *mi __UNUSED__) +_battery_face_cb_menu_configure(void *data __UNUSED__, E_Menu *m EINA_UNUSED, E_Menu_Item *mi __UNUSED__) { if (!battery_config) return; if (battery_config->config_dialog) return; - e_int_config_battery_module(m->zone->comp, NULL); + e_int_config_battery_module(NULL, NULL); } Battery * diff --git a/src/modules/battery/e_mod_main.h b/src/modules/battery/e_mod_main.h index 72ae42a455..63daca7dc8 100644 --- a/src/modules/battery/e_mod_main.h +++ b/src/modules/battery/e_mod_main.h @@ -139,7 +139,7 @@ EAPI void *e_modapi_init (E_Module *m); EAPI int e_modapi_shutdown (E_Module *m); EAPI int e_modapi_save (E_Module *m); -E_Config_Dialog *e_int_config_battery_module(E_Comp *comp, const char *params __UNUSED__); +E_Config_Dialog *e_int_config_battery_module(Evas_Object *parent, const char *params __UNUSED__); void _battery_config_updated(void); extern Config *battery_config; diff --git a/src/modules/bluez4/agent.c b/src/modules/bluez4/agent.c index 28eeedce40..b232ad82bb 100644 --- a/src/modules/bluez4/agent.c +++ b/src/modules/bluez4/agent.c @@ -91,18 +91,19 @@ _reject(void *data EINA_UNUSED, E_Dialog *dialog) } static void -_ok(void *data EINA_UNUSED, E_Dialog *dialog) +_close(void *data, Evas *e, Evas_Object *obj, void *event_info) { - const Eldbus_Message *msg = dialog->data; - Eldbus_Message *reply = eldbus_message_method_return_new(msg); - _reply_and_del_dialog(reply, dialog); + E_Dialog *dialog = data; + _reject(NULL, dialog); } static void -_close(E_Win *win) +_ok(void *data EINA_UNUSED, E_Dialog *dialog) { - E_Dialog *dialog = win->data; - _reject(NULL, dialog); + const Eldbus_Message *msg = dialog->data; + Eldbus_Message *reply = eldbus_message_method_return_new(msg); + evas_object_event_callback_del_full(dialog->win, EVAS_CALLBACK_DEL, _close, dialog); + _reply_and_del_dialog(reply, dialog); } static void @@ -111,7 +112,7 @@ _ask(const char *title, const char *ask_msg, const char *ok_label, { E_Dialog *dialog = _create_dialog(title, ask_msg, "dialog-ask", "ask"); dialog->data = eldbus_message; - e_win_delete_callback_set(dialog->win, _close); + evas_object_event_callback_add(dialog->win, EVAS_CALLBACK_DEL, _close, dialog); e_dialog_button_add(dialog, ok_label, NULL, _ok, NULL); e_dialog_button_add(dialog, _("Reject"), NULL, _reject, NULL); e_dialog_show(dialog); diff --git a/src/modules/bluez4/e_mod_main.c b/src/modules/bluez4/e_mod_main.c index e019685871..bbc1505629 100644 --- a/src/modules/bluez4/e_mod_main.c +++ b/src/modules/bluez4/e_mod_main.c @@ -75,9 +75,9 @@ _ebluez4_search_dialog_del(Instance *inst) } static void -_ebluez4_cb_search_dialog_del(E_Win *win) +_ebluez4_cb_search_dialog_del(void *data, Evas *e, Evas_Object *obj, void *event_info) { - E_Dialog *dialog = win->data; + E_Dialog *dialog = data; _ebluez4_search_dialog_del(dialog->data); } @@ -114,9 +114,9 @@ _ebluez4_cb_search(void *data, E_Menu *m EINA_UNUSED, E_Menu_Item *mi EINA_UNUSE dialog = e_dialog_new(NULL, "Search Dialog", "search"); e_dialog_title_set(dialog, _("Searching for Devices...")); - e_win_delete_callback_set(dialog->win, _ebluez4_cb_search_dialog_del); + evas_object_event_callback_add(dialog->win, EVAS_CALLBACK_DEL, _ebluez4_cb_search_dialog_del, dialog); - evas = e_win_evas_get(dialog->win); + evas = evas_object_evas_get(dialog->win); inst->found_list = e_widget_ilist_add(evas, 100, 0, NULL); @@ -132,9 +132,9 @@ _ebluez4_cb_search(void *data, E_Menu *m EINA_UNUSED, E_Menu_Item *mi EINA_UNUSE } static void -_ebluez4_cb_adap_settings_dialog_del(E_Win *win) +_ebluez4_cb_adap_settings_dialog_del(void *data, Evas *e, Evas_Object *obj, void *event_info) { - E_Dialog *dialog = win->data; + E_Dialog *dialog = data; ebluez4_adapter_settings_del(dialog); } @@ -181,9 +181,9 @@ _ebluez4_cb_adap_settings(void *data) dialog = e_dialog_new(NULL, "Adapter Dialog", "adapter"); e_dialog_title_set(dialog, _("Adapter Settings")); - e_win_delete_callback_set(dialog->win, _ebluez4_cb_adap_settings_dialog_del); + evas_object_event_callback_add(dialog->win, EVAS_CALLBACK_DEL, _ebluez4_cb_adap_settings_dialog_del, dialog); - evas = e_win_evas_get(dialog->win); + evas = evas_object_evas_get(dialog->win); list = e_widget_list_add(evas, 0, 0); @@ -233,9 +233,9 @@ _ebluez4_adap_list_dialog_del(Instance *inst) } static void -_ebluez4_cb_adap_list_dialog_del(E_Win *win) +_ebluez4_cb_adap_list_dialog_del(void *data, Evas *e, Evas_Object *obj, void *event_info) { - E_Dialog *dialog = win->data; + E_Dialog *dialog = data; _ebluez4_adap_list_dialog_del(dialog->data); } @@ -251,9 +251,9 @@ _ebluez4_cb_adap_list(void *data, E_Menu *m EINA_UNUSED, E_Menu_Item *mi EINA_UN dialog = e_dialog_new(NULL, "Adapters Dialog", "adapters"); e_dialog_title_set(dialog, _("Adapters Available")); - e_win_delete_callback_set(dialog->win, _ebluez4_cb_adap_list_dialog_del); + evas_object_event_callback_add(dialog->win, EVAS_CALLBACK_DEL, _ebluez4_cb_adap_list_dialog_del, dialog); - evas = e_win_evas_get(dialog->win); + evas = evas_object_evas_get(dialog->win); inst->adap_list = e_widget_ilist_add(evas, 0, 0, NULL); diff --git a/src/modules/clock/e_mod_config.c b/src/modules/clock/e_mod_config.c index 9e2ac8c072..50ac863dc2 100644 --- a/src/modules/clock/e_mod_config.c +++ b/src/modules/clock/e_mod_config.c @@ -17,7 +17,7 @@ static int _basic_apply_data(E_Config_Dialog *cfd, E_Config_Dialog_Data *cfdata); void -e_int_config_clock_module(E_Comp *comp, Config_Item *ci) +e_int_config_clock_module(Evas_Object *parent EINA_UNUSED, Config_Item *ci) { E_Config_Dialog *cfd; E_Config_Dialog_View *v; @@ -33,7 +33,7 @@ e_int_config_clock_module(E_Comp *comp, Config_Item *ci) snprintf(buf, sizeof(buf), "%s/e-module-clock.edj", e_module_dir_get(clock_config->module)); - cfd = e_config_dialog_new(comp, _("Clock Settings"), + cfd = e_config_dialog_new(NULL, _("Clock Settings"), "E", "utils/clock", buf, 0, v, ci); clock_config->config_dialog = cfd; } diff --git a/src/modules/clock/e_mod_main.c b/src/modules/clock/e_mod_main.c index 2fead48921..93d49bad91 100644 --- a/src/modules/clock/e_mod_main.c +++ b/src/modules/clock/e_mod_main.c @@ -282,7 +282,7 @@ static void _clock_settings_cb(void *d1, void *d2 __UNUSED__) { Instance *inst = d1; - e_int_config_clock_module(e_comp_get(inst->popup), inst->cfg); + e_int_config_clock_module(NULL, inst->cfg); e_object_del(E_OBJECT(inst->popup)); inst->popup = NULL; inst->o_popclock = NULL; diff --git a/src/modules/clock/e_mod_main.h b/src/modules/clock/e_mod_main.h index 6953f7f313..60389c89d6 100644 --- a/src/modules/clock/e_mod_main.h +++ b/src/modules/clock/e_mod_main.h @@ -34,7 +34,7 @@ struct _Config_Item Eina_Bool changed; }; -void e_int_config_clock_module(E_Comp *comp, Config_Item *ci); +void e_int_config_clock_module(Evas_Object *parent, Config_Item *ci); void e_int_clock_instances_redo(Eina_Bool all); extern Config *clock_config; diff --git a/src/modules/conf/e_conf.c b/src/modules/conf/e_conf.c index 4ac2398ce7..7838fbdcae 100644 --- a/src/modules/conf/e_conf.c +++ b/src/modules/conf/e_conf.c @@ -12,7 +12,7 @@ struct _E_Configure E_Object e_obj_inherit; E_Comp *comp; - E_Win *win; + Evas_Object *win; Evas *evas; Evas_Object *edje; @@ -47,8 +47,7 @@ struct _E_Configure_Item }; static void _e_configure_free(E_Configure *eco); -static void _e_configure_cb_del_req(E_Win *win); -static void _e_configure_cb_resize(E_Win *win); +static void _e_configure_cb_del_req(void *data, Evas *e EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *event_info EINA_UNUSED); static void _e_configure_cb_close(void *data, void *data2); static E_Configure_Category *_e_configure_category_add(E_Configure *eco, const char *label, const char *icon_file, const char *icon); static void _e_configure_category_cb(void *data, void *data2); @@ -69,6 +68,7 @@ e_configure_show(E_Comp *comp, const char *params) Evas_Object *o; Evas_Modifier_Mask mask; Eina_Bool kg; + E_Client *ec; if (_e_configure) { @@ -78,23 +78,24 @@ e_configure_show(E_Comp *comp, const char *params) int x = 0; eco = _e_configure; + ec = e_win_client_get(eco->win); z = e_util_zone_current_get(e_manager_current_get()); - z2 = eco->win->client->zone; - e_win_show(eco->win); - e_win_raise(eco->win); + z2 = ec->zone; + evas_object_show(eco->win); + elm_win_raise(eco->win); if (z->comp == z2->comp) - e_client_desk_set(eco->win->client, e_desk_current_get(z)); + e_client_desk_set(ec, e_desk_current_get(z)); else { - if (!eco->win->client->sticky) - e_desk_show(eco->win->client->desk); + if (!ec->sticky) + e_desk_show(ec->desk); ecore_evas_pointer_warp(z2->comp->ee, z2->x + (z2->w / 2), z2->y + (z2->h / 2)); } - e_client_unshade(eco->win->client, eco->win->client->shade_dir); + e_client_unshade(ec, ec->shade_dir); if ((e_config->focus_setting == E_FOCUS_NEW_DIALOG) || (e_config->focus_setting == E_FOCUS_NEW_WINDOW)) - evas_object_focus_set(eco->win->client->frame, 1); + evas_object_focus_set(ec->frame, 1); EINA_LIST_FOREACH(e_widget_toolbar_items_get(eco->cat_list), l, it) { if (e_widget_toolbar_item_label_get(it) == params) @@ -109,28 +110,27 @@ e_configure_show(E_Comp *comp, const char *params) eco = E_OBJECT_ALLOC(E_Configure, E_CONFIGURE_TYPE, _e_configure_free); if (!eco) return; - eco->win = e_win_new(comp); + eco->win = elm_win_add(NULL, NULL, ELM_WIN_BASIC); if (!eco->win) { free(eco); return; } - eco->win->data = eco; + evas_object_data_set(eco->win, "e_conf_win", eco); eco->comp = comp; - eco->evas = e_win_evas_get(eco->win); + eco->evas = evas_object_evas_get(eco->win); /* Event Handler for Module Updates */ eco->mod_hdl = ecore_event_handler_add(E_EVENT_MODULE_UPDATE, _e_configure_module_update_cb, eco); - e_win_title_set(eco->win, _("Settings")); - e_win_name_class_set(eco->win, "E", "_configure"); - e_win_dialog_set(eco->win, 0); - e_win_delete_callback_set(eco->win, _e_configure_cb_del_req); - e_win_resize_callback_set(eco->win, _e_configure_cb_resize); - e_win_centered_set(eco->win, 1); + elm_win_title_set(eco->win, _("Settings")); + ecore_evas_name_class_set(e_win_ee_get(eco->win), "E", "_configure"); + evas_object_event_callback_add(eco->win, EVAS_CALLBACK_DEL, _e_configure_cb_del_req, eco); + elm_win_center(eco->win, 1, 1); eco->edje = edje_object_add(eco->evas); + elm_win_resize_object_add(eco->win, eco->edje); e_theme_edje_object_set(eco->edje, "base/theme/configure", "e/widgets/configure/main"); edje_object_part_text_set(eco->edje, "e.text.title", _("Settings")); @@ -144,7 +144,7 @@ e_configure_show(E_Comp *comp, const char *params) kg = evas_object_key_grab(o, "Tab", mask, ~mask, 0); if (!kg) fprintf(stderr, "ERROR: unable to redirect \"Tab\" key events to object %p.\n", o); - mask = evas_key_modifier_mask_get(e_win_evas_get(eco->win), "Shift"); + mask = evas_key_modifier_mask_get(evas_object_evas_get(eco->win), "Shift"); kg = evas_object_key_grab(o, "Tab", mask, ~mask, 0); if (!kg) fprintf(stderr, "ERROR: unable to redirect \"Tab\" key events to object %p.\n", o); @@ -161,23 +161,23 @@ e_configure_show(E_Comp *comp, const char *params) if (!kg) fprintf(stderr, "ERROR: unable to redirect \"Escape\" key events to object %p.\n", o); evas_object_event_callback_add(o, EVAS_CALLBACK_KEY_DOWN, - _e_configure_keydown_cb, eco->win); + _e_configure_keydown_cb, eco); _e_configure_fill_cat_list(eco, params); /* Close Button */ eco->close = e_widget_button_add(eco->evas, _("Close"), NULL, _e_configure_cb_close, eco, NULL); - e_widget_on_focus_hook_set(eco->close, _e_configure_focus_cb, eco->win); + e_widget_on_focus_hook_set(eco->close, _e_configure_focus_cb, eco); e_widget_size_min_get(eco->close, &mw, &mh); evas_object_size_hint_min_set(eco->close, mw, mh); edje_object_part_swallow(eco->edje, "e.swallow.button", eco->close); edje_object_size_min_calc(eco->edje, &ew, &eh); - e_win_size_min_set(eco->win, ew, eh); + evas_object_size_hint_min_set(eco->win, ew, eh); e_util_win_auto_resize_fill(eco->win); evas_object_show(eco->edje); - e_win_show(eco->win); + evas_object_show(eco->win); e_win_client_icon_set(eco->win, "preferences-system"); /* Preselect "Appearance" */ @@ -233,28 +233,14 @@ _e_configure_free(E_Configure *eco) // evas_object_del(eco->item_list); // evas_object_del(eco->o_list); // evas_object_del(eco->edje); - e_object_del(E_OBJECT(eco->win)); - E_FREE(eco); + evas_object_del(eco->win); + free(eco); } static void -_e_configure_cb_del_req(E_Win *win) +_e_configure_cb_del_req(void *data, Evas *e EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *event_info EINA_UNUSED) { - E_Configure *eco; - - if (!(eco = win->data)) return; - e_object_del(E_OBJECT(eco)); -} - -static void -_e_configure_cb_resize(E_Win *win) -{ - E_Configure *eco; - Evas_Coord w, h; - - if (!(eco = win->data)) return; - ecore_evas_geometry_get(win->ecore_evas, NULL, NULL, &w, &h); - evas_object_resize(eco->edje, w, h); + e_object_del(E_OBJECT(data)); } static void @@ -369,17 +355,14 @@ _e_configure_item_cb(void *data) if (!(ci = data)) return; cb = ci->cb; - if (cb->path) e_configure_registry_call(cb->path, cb->eco->comp, NULL); + if (cb->path) e_configure_registry_call(cb->path, NULL, NULL); } static void _e_configure_focus_cb(void *data, Evas_Object *obj) { - E_Win *win; - E_Configure *eco; + E_Configure *eco = data; - win = data; - if (!(eco = win->data)) return; if (obj == eco->close) { e_widget_focused_object_clear(eco->item_list); @@ -401,16 +384,13 @@ static void _e_configure_keydown_cb(void *data, Evas *e __UNUSED__, Evas_Object *obj __UNUSED__, void *event) { Evas_Event_Key_Down *ev; - E_Win *win; - E_Configure *eco; + E_Configure *eco = data; ev = event; - win = data; - eco = win->data; if (!strcmp(ev->key, "Tab")) { - if (evas_key_modifier_is_set(evas_key_modifier_get(e_win_evas_get(win)), "Shift")) + if (evas_key_modifier_is_set(evas_key_modifier_get(evas_object_evas_get(eco->win)), "Shift")) { if (e_widget_focus_get(eco->close)) e_widget_focus_set(eco->item_list, 0); @@ -496,14 +476,14 @@ _e_configure_fill_cat_list(void *data, const char *sel) num = e_widget_toolbar_items_count(eco->cat_list) - 1; } } - e_widget_on_focus_hook_set(eco->cat_list, _e_configure_focus_cb, eco->win); + e_widget_on_focus_hook_set(eco->cat_list, _e_configure_focus_cb, eco); e_widget_list_object_append(eco->o_list, eco->cat_list, 1, 0, 0.5); /* Item List */ eco->item_list = e_widget_ilist_add(eco->evas, 32 * e_scale, 32 * e_scale, NULL); e_widget_ilist_selector_set(eco->item_list, 1); e_widget_ilist_go(eco->item_list); - e_widget_on_focus_hook_set(eco->item_list, _e_configure_focus_cb, eco->win); + e_widget_on_focus_hook_set(eco->item_list, _e_configure_focus_cb, eco); e_widget_size_min_get(eco->item_list, &mw, &mh); if (mw < (200 * e_scale)) mw = 200 * e_scale; if (mh < (120 * e_scale)) mh = 120 * e_scale; diff --git a/src/modules/conf/e_mod_config.c b/src/modules/conf/e_mod_config.c index 8f45717cce..3c4f5283fa 100644 --- a/src/modules/conf/e_mod_config.c +++ b/src/modules/conf/e_mod_config.c @@ -13,7 +13,7 @@ static int _basic_apply(E_Config_Dialog *cfd, E_Config_Dialog_Data *cfd static int _basic_check_changed(E_Config_Dialog *cfd, E_Config_Dialog_Data *cfdata); E_Config_Dialog * -e_int_config_conf_module(E_Comp *comp, const char *params __UNUSED__) +e_int_config_conf_module(Evas_Object *parent EINA_UNUSED, const char *params __UNUSED__) { E_Config_Dialog *cfd = NULL; E_Config_Dialog_View *v = NULL; @@ -32,7 +32,7 @@ e_int_config_conf_module(E_Comp *comp, const char *params __UNUSED__) v->basic.check_changed = _basic_check_changed; snprintf(buf, sizeof(buf), "%s/e-module-conf.edj", conf->module->dir); - cfd = e_config_dialog_new(comp, _("Configuration Panel"), "Conf", + cfd = e_config_dialog_new(NULL, _("Configuration Panel"), "Conf", "advanced/conf", buf, 0, v, NULL); conf->cfd = cfd; diff --git a/src/modules/conf/e_mod_main.c b/src/modules/conf/e_mod_main.c index abc70cf57f..1a07c06961 100644 --- a/src/modules/conf/e_mod_main.c +++ b/src/modules/conf/e_mod_main.c @@ -143,7 +143,7 @@ _cb_action_conf(void *data, Evas_Object *obj __UNUSED__, const char *emission __ } static void -_e_mod_run_cb(void *data, E_Menu *m, E_Menu_Item *mi __UNUSED__) +_e_mod_run_cb(void *data, E_Menu *m EINA_UNUSED, E_Menu_Item *mi __UNUSED__) { Eina_List *l; E_Configure_Cat *ecat; @@ -162,7 +162,7 @@ _e_mod_run_cb(void *data, E_Menu *m, E_Menu_Item *mi __UNUSED__) if ((eci->pri >= 0) && (eci == data)) { snprintf(buf, sizeof(buf), "%s/%s", ecat->cat, eci->item); - e_configure_registry_call(buf, m->zone->comp, NULL); + e_configure_registry_call(buf, NULL, NULL); } } } @@ -381,7 +381,7 @@ _e_mod_action_conf_cb(E_Object *obj, const char *params) } if (!zone) zone = e_util_zone_current_get(e_manager_current_get()); if ((zone) && (params)) - e_configure_registry_call(params, zone->comp, params); + e_configure_registry_call(params, NULL, params); else if (zone) e_configure_show(zone->comp, params); } diff --git a/src/modules/conf/e_mod_main.h b/src/modules/conf/e_mod_main.h index 25cbd3ce05..009f02290b 100644 --- a/src/modules/conf/e_mod_main.h +++ b/src/modules/conf/e_mod_main.h @@ -20,7 +20,7 @@ struct _Config void e_configure_show(E_Comp *comp, const char *params); void e_configure_del(void); -E_Config_Dialog *e_int_config_conf_module(E_Comp *comp, const char *params); +E_Config_Dialog *e_int_config_conf_module(Evas_Object *parent, const char *params); void e_mod_config_menu_add(void *data, E_Menu *m); extern Config *conf; diff --git a/src/modules/conf_applications/e_int_config_apps.c b/src/modules/conf_applications/e_int_config_apps.c index c7fcfda602..c1032f8ce5 100644 --- a/src/modules/conf_applications/e_int_config_apps.c +++ b/src/modules/conf_applications/e_int_config_apps.c @@ -49,16 +49,16 @@ static void _cb_order_del(void *data, void *data2 __UNUSED__); static Eina_Bool _cb_fill_delay(void *data); E_Config_Dialog * -e_int_config_apps_add(E_Comp *comp, const char *params __UNUSED__) +e_int_config_apps_add(Evas_Object *parent EINA_UNUSED, const char *params __UNUSED__) { E_Desktop_Edit *ed; - if (!(ed = e_desktop_edit(comp, NULL))) return NULL; + if (!(ed = e_desktop_edit(NULL, NULL))) return NULL; return ed->cfd; } E_Config_Dialog * -e_int_config_apps_favs(E_Comp *comp, const char *params __UNUSED__) +e_int_config_apps_favs(Evas_Object *parent EINA_UNUSED, const char *params __UNUSED__) { E_Config_Data *data; char buff[PATH_MAX]; @@ -69,11 +69,11 @@ e_int_config_apps_favs(E_Comp *comp, const char *params __UNUSED__) data->dialog = eina_stringshare_add("menus/favorites_menu"); data->icon = eina_stringshare_add("user-bookmarks"); data->filename = eina_stringshare_add(buff); - return _create_dialog(comp, data); + return _create_dialog(NULL, data); } E_Config_Dialog * -e_int_config_apps_ibar(E_Comp *comp, const char *params __UNUSED__) +e_int_config_apps_ibar(Evas_Object *parent EINA_UNUSED, const char *params __UNUSED__) { E_Config_Data *data; char buff[PATH_MAX]; @@ -84,11 +84,11 @@ e_int_config_apps_ibar(E_Comp *comp, const char *params __UNUSED__) data->dialog = eina_stringshare_add("applications/ibar_applications"); data->icon = eina_stringshare_add("preferences-applications-ibar"); data->filename = eina_stringshare_add(buff); - return _create_dialog(comp, data); + return _create_dialog(NULL, data); } E_Config_Dialog * -e_int_config_apps_ibar_other(E_Comp *comp, const char *path) +e_int_config_apps_ibar_other(Evas_Object *parent EINA_UNUSED, const char *path) { E_Config_Data *data; @@ -98,11 +98,11 @@ e_int_config_apps_ibar_other(E_Comp *comp, const char *path) data->dialog = eina_stringshare_add("internal/ibar_other"); data->icon = eina_stringshare_add("preferences-applications-ibar"); data->filename = eina_stringshare_add(path); - return _create_dialog(comp, data); + return _create_dialog(NULL, data); } E_Config_Dialog * -e_int_config_apps_startup(E_Comp *comp, const char *params __UNUSED__) +e_int_config_apps_startup(Evas_Object *parent EINA_UNUSED, const char *params __UNUSED__) { E_Config_Data *data; char buff[PATH_MAX]; @@ -114,11 +114,11 @@ e_int_config_apps_startup(E_Comp *comp, const char *params __UNUSED__) data->icon = eina_stringshare_add("preferences-applications-startup"); data->filename = eina_stringshare_add(buff); data->show_autostart = EINA_TRUE; - return _create_dialog(comp, data); + return _create_dialog(NULL, data); } E_Config_Dialog * -e_int_config_apps_restart(E_Comp *comp, const char *params __UNUSED__) +e_int_config_apps_restart(Evas_Object *parent EINA_UNUSED, const char *params __UNUSED__) { E_Config_Data *data; char buff[PATH_MAX]; @@ -129,11 +129,11 @@ e_int_config_apps_restart(E_Comp *comp, const char *params __UNUSED__) data->dialog = eina_stringshare_add("applications/restart_applications"); data->icon = eina_stringshare_add("preferences-applications-restart"); data->filename = eina_stringshare_add(buff); - return _create_dialog(comp, data); + return _create_dialog(NULL, data); } E_Config_Dialog * -e_int_config_apps_desk_lock(E_Comp *comp, const char *params __UNUSED__) +e_int_config_apps_desk_lock(Evas_Object *parent EINA_UNUSED, const char *params __UNUSED__) { E_Config_Data *data; char buff[PATH_MAX]; @@ -144,11 +144,11 @@ e_int_config_apps_desk_lock(E_Comp *comp, const char *params __UNUSED__) data->dialog = eina_stringshare_add("applications/screen_lock_applications"); data->icon = eina_stringshare_add("preferences-applications-screen-lock"); data->filename = eina_stringshare_add(buff); - return _create_dialog(comp, data); + return _create_dialog(NULL, data); } E_Config_Dialog * -e_int_config_apps_desk_unlock(E_Comp *comp, const char *params __UNUSED__) +e_int_config_apps_desk_unlock(Evas_Object *parent EINA_UNUSED, const char *params __UNUSED__) { E_Config_Data *data; char buff[PATH_MAX]; @@ -159,12 +159,12 @@ e_int_config_apps_desk_unlock(E_Comp *comp, const char *params __UNUSED__) data->dialog = eina_stringshare_add("applications/screen_unlock_applications"); data->icon = eina_stringshare_add("preferences-applications-screen-unlock"); data->filename = eina_stringshare_add(buff); - return _create_dialog(comp, data); + return _create_dialog(NULL, data); } /* local function prototypes */ static E_Config_Dialog * -_create_dialog(E_Comp *comp, E_Config_Data *data) +_create_dialog(E_Comp *comp EINA_UNUSED, E_Config_Data *data) { E_Config_Dialog *cfd; E_Config_Dialog_View *v; @@ -185,7 +185,7 @@ _create_dialog(E_Comp *comp, E_Config_Data *data) v->basic.create_widgets = _basic_create; v->basic.apply_cfdata = _basic_apply; - cfd = e_config_dialog_new(comp, data->title, "E", data->dialog, + cfd = e_config_dialog_new(NULL, data->title, "E", data->dialog, data->icon, 0, v, data); return cfd; } @@ -322,7 +322,7 @@ _basic_create(E_Config_Dialog *cfd, Evas *evas, E_Config_Dialog_Data *cfdata) if (cfdata->fill_delay) ecore_timer_del(cfdata->fill_delay); cfdata->fill_delay = ecore_timer_add(0.2, _cb_fill_delay, cfdata); - e_win_centered_set(cfd->dia->win, 1); + elm_win_center(cfd->dia->win, 1, 1); return otb; } diff --git a/src/modules/conf_applications/e_int_config_apps_personal.c b/src/modules/conf_applications/e_int_config_apps_personal.c index 84d977d98f..51fdac5146 100644 --- a/src/modules/conf_applications/e_int_config_apps_personal.c +++ b/src/modules/conf_applications/e_int_config_apps_personal.c @@ -23,7 +23,7 @@ static void _btn_cb_del(void *data, void *data2); static void _widget_list_selection_changed(void *data, Evas_Object *obj __UNUSED__); E_Config_Dialog * -e_int_config_apps_personal(E_Comp *comp, const char *params __UNUSED__) +e_int_config_apps_personal(Evas_Object *parent EINA_UNUSED, const char *params __UNUSED__) { E_Config_Dialog *cfd; E_Config_Dialog_View *v; @@ -36,7 +36,7 @@ e_int_config_apps_personal(E_Comp *comp, const char *params __UNUSED__) v->free_cfdata = _free_data; v->basic.create_widgets = _basic_create; - cfd = e_config_dialog_new(comp, _("Personal Application Launchers"), + cfd = e_config_dialog_new(NULL, _("Personal Application Launchers"), "E", "applications/personal_applications", "preferences-applications-personal", 0, v, NULL); return cfd; @@ -98,7 +98,7 @@ _basic_create(E_Config_Dialog *cfd, Evas *evas, E_Config_Dialog_Data *cfdata) e_widget_disabled_set(ob, 1); e_widget_table_object_append(of, ob, 1, 2, 1, 1, 1, 1, 1, 0); - e_win_centered_set(cfd->dia->win, 1); + elm_win_center(cfd->dia->win, 1, 1); return of; } diff --git a/src/modules/conf_applications/e_int_config_defapps.c b/src/modules/conf_applications/e_int_config_defapps.c index e7fcae9594..fb7b619892 100644 --- a/src/modules/conf_applications/e_int_config_defapps.c +++ b/src/modules/conf_applications/e_int_config_defapps.c @@ -57,7 +57,7 @@ static int _cb_desks_sort(const void *data1, const void *data2); static void _fill_apps_list(E_Config_Dialog_Data *cfdata, Evas_Object *il, const char **desktop, int general); E_Config_Dialog * -e_int_config_defapps(E_Comp *comp, const char *params __UNUSED__) +e_int_config_defapps(Evas_Object *parent EINA_UNUSED, const char *params __UNUSED__) { E_Config_Dialog *cfd; E_Config_Dialog_View *v; @@ -71,7 +71,7 @@ e_int_config_defapps(E_Comp *comp, const char *params __UNUSED__) v->basic.create_widgets = _basic_create; v->basic.apply_cfdata = _basic_apply; - cfd = e_config_dialog_new(comp, _("Default Applications"), + cfd = e_config_dialog_new(NULL, _("Default Applications"), "E", "applications/default_applications", "preferences-desktop-default-applications", 0, v, NULL); return cfd; @@ -359,7 +359,7 @@ _basic_create(E_Config_Dialog *cfd, Evas *evas, E_Config_Dialog_Data *cfdata) e_widget_toolbook_page_show(otb, 0); - e_win_centered_set(cfd->dia->win, 1); + elm_win_center(cfd->dia->win, 1, 1); return otb; } diff --git a/src/modules/conf_applications/e_int_config_deskenv.c b/src/modules/conf_applications/e_int_config_deskenv.c index e0d21a4923..0bb949f761 100644 --- a/src/modules/conf_applications/e_int_config_deskenv.c +++ b/src/modules/conf_applications/e_int_config_deskenv.c @@ -23,7 +23,7 @@ struct _E_Config_Dialog_Data /* a nice easy setup function that does the dirty work */ E_Config_Dialog * -e_int_config_deskenv(E_Comp *comp, const char *params __UNUSED__) +e_int_config_deskenv(Evas_Object *parent EINA_UNUSED, const char *params __UNUSED__) { E_Config_Dialog *cfd; E_Config_Dialog_View *v; @@ -40,7 +40,7 @@ e_int_config_deskenv(E_Comp *comp, const char *params __UNUSED__) v->basic.check_changed = _basic_check_changed; /* create config diaolg for NULL object/data */ - cfd = e_config_dialog_new(comp, _("Desktop Environments"), "E", + cfd = e_config_dialog_new(NULL, _("Desktop Environments"), "E", "windows/desktop_environments", "preferences-desktop-environments", 0, v, NULL); return cfd; diff --git a/src/modules/conf_applications/e_mod_main.h b/src/modules/conf_applications/e_mod_main.h index ed5de927c6..e54e7f877d 100644 --- a/src/modules/conf_applications/e_mod_main.h +++ b/src/modules/conf_applications/e_mod_main.h @@ -1,20 +1,20 @@ #ifndef E_MOD_MAIN_H #define E_MOD_MAIN_H -E_Config_Dialog *e_int_config_apps_favs(E_Comp *comp, const char *params __UNUSED__); -E_Config_Dialog *e_int_config_apps_add(E_Comp *comp, const char *params __UNUSED__); -E_Config_Dialog *e_int_config_apps_ibar(E_Comp *comp, const char *params __UNUSED__); -E_Config_Dialog *e_int_config_apps_ibar_other(E_Comp *comp, const char *path); -E_Config_Dialog *e_int_config_apps_startup(E_Comp *comp, const char *params __UNUSED__); -E_Config_Dialog *e_int_config_apps_restart(E_Comp *comp, const char *params __UNUSED__); -E_Config_Dialog *e_int_config_apps_desk_lock(E_Comp *comp, const char *params __UNUSED__); -E_Config_Dialog *e_int_config_apps_desk_unlock(E_Comp *comp, const char *params __UNUSED__); +E_Config_Dialog *e_int_config_apps_favs(Evas_Object *parent, const char *params __UNUSED__); +E_Config_Dialog *e_int_config_apps_add(Evas_Object *parent, const char *params __UNUSED__); +E_Config_Dialog *e_int_config_apps_ibar(Evas_Object *parent, const char *params __UNUSED__); +E_Config_Dialog *e_int_config_apps_ibar_other(Evas_Object *parent, const char *path); +E_Config_Dialog *e_int_config_apps_startup(Evas_Object *parent, const char *params __UNUSED__); +E_Config_Dialog *e_int_config_apps_restart(Evas_Object *parent, const char *params __UNUSED__); +E_Config_Dialog *e_int_config_apps_desk_lock(Evas_Object *parent, const char *params __UNUSED__); +E_Config_Dialog *e_int_config_apps_desk_unlock(Evas_Object *parent, const char *params __UNUSED__); -E_Config_Dialog *e_int_config_defapps(E_Comp *comp, const char *params __UNUSED__); +E_Config_Dialog *e_int_config_defapps(Evas_Object *parent, const char *params __UNUSED__); -E_Config_Dialog *e_int_config_apps_personal(E_Comp *comp, const char *params __UNUSED__); +E_Config_Dialog *e_int_config_apps_personal(Evas_Object *parent, const char *params __UNUSED__); -E_Config_Dialog *e_int_config_deskenv(E_Comp *comp, const char *params __UNUSED__); +E_Config_Dialog *e_int_config_deskenv(Evas_Object *parent, const char *params __UNUSED__); /** * @addtogroup Optional_Conf diff --git a/src/modules/conf_bindings/e_int_config_acpibindings.c b/src/modules/conf_bindings/e_int_config_acpibindings.c index 4e69afe06e..4eb2a3c629 100644 --- a/src/modules/conf_bindings/e_int_config_acpibindings.c +++ b/src/modules/conf_bindings/e_int_config_acpibindings.c @@ -53,7 +53,7 @@ static Ecore_Window grab_win = 0; static Eina_List *grab_hdls = NULL; E_Config_Dialog * -e_int_config_acpibindings(E_Comp *comp, +e_int_config_acpibindings(Evas_Object *parent EINA_UNUSED, const char *params __UNUSED__) { E_Config_Dialog *cfd; @@ -68,7 +68,7 @@ e_int_config_acpibindings(E_Comp *comp, v->basic.apply_cfdata = _basic_apply; v->basic.create_widgets = _basic_create; - cfd = e_config_dialog_new(comp, _("ACPI Bindings Settings"), "E", + cfd = e_config_dialog_new(NULL, _("ACPI Bindings Settings"), "E", "advanced/acpi_bindings", "preferences-system-power-management", 0, v, NULL); @@ -514,7 +514,7 @@ _cb_add_binding(void *data, if (grab_win != 0) return; if (!(cfdata = data)) return; - grab_dlg = e_dialog_new(NULL, "E", + grab_dlg = e_dialog_new(cfdata->cfd->dia->win, "E", "_acpibind_getbind_dialog"); if (!grab_dlg) return; e_dialog_title_set(grab_dlg, _("ACPI Binding")); @@ -522,8 +522,8 @@ _cb_add_binding(void *data, e_dialog_text_set(grab_dlg, _("Please trigger the ACPI event you wish to bind to, " "<br><br>or <hilight>Escape</hilight> to abort.")); - e_win_centered_set(grab_dlg->win, EINA_TRUE); - e_win_borderless_set(grab_dlg->win, EINA_TRUE); + elm_win_center(grab_dlg->win, 1, 1); + elm_win_borderless_set(grab_dlg->win, EINA_TRUE); #ifndef HAVE_WAYLAND_ONLY E_Manager *man; @@ -547,10 +547,6 @@ _cb_add_binding(void *data, e_acpi_events_freeze(); e_dialog_show(grab_dlg); -#ifndef HAVE_WAYLAND_ONLY - ecore_x_icccm_transient_for_set(grab_dlg->win->evas_win, - cfdata->cfd->dia->win->evas_win); -#endif } static void diff --git a/src/modules/conf_bindings/e_int_config_edgebindings.c b/src/modules/conf_bindings/e_int_config_edgebindings.c index 0c7c835c7e..9845b9c432 100644 --- a/src/modules/conf_bindings/e_int_config_edgebindings.c +++ b/src/modules/conf_bindings/e_int_config_edgebindings.c @@ -89,7 +89,7 @@ struct _E_Config_Dialog_Data }; E_Config_Dialog * -e_int_config_edgebindings(E_Comp *comp, const char *params) +e_int_config_edgebindings(Evas_Object *parent EINA_UNUSED, const char *params) { E_Config_Dialog *cfd; E_Config_Dialog_View *v; @@ -103,7 +103,7 @@ e_int_config_edgebindings(E_Comp *comp, const char *params) v->basic.create_widgets = _basic_create_widgets; v->override_auto_apply = 1; - cfd = e_config_dialog_new(comp, _("Edge Bindings Settings"), "E", + cfd = e_config_dialog_new(NULL, _("Edge Bindings Settings"), "E", "keyboard_and_mouse/edge_bindings", "enlightenment/edges", 0, v, NULL); if ((params) && (params[0])) @@ -868,7 +868,7 @@ _edge_grab_wnd_show(E_Config_Dialog_Data *cfdata) if (cfdata->locals.dia != 0) return; - cfdata->locals.dia = e_dialog_normal_win_new(NULL, "E", "_edgebind_getedge_dialog"); + cfdata->locals.dia = e_dialog_normal_win_new(cfdata->cfd->dia->win, "E", "_edgebind_getedge_dialog"); if (!cfdata->locals.dia) return; e_dialog_title_set(cfdata->locals.dia, _("Edge Binding Sequence")); e_dialog_icon_set(cfdata->locals.dia, "enlightenment/edges", 48); @@ -876,9 +876,9 @@ _edge_grab_wnd_show(E_Config_Dialog_Data *cfdata) e_dialog_button_add(cfdata->locals.dia, _("Close"), NULL, _edge_grab_wnd_cb_close, cfdata); e_object_data_set(E_OBJECT(cfdata->locals.dia), cfdata); e_object_del_attach_func_set(E_OBJECT(cfdata->locals.dia), _dia_del); - e_win_centered_set(cfdata->locals.dia->win, 1); + elm_win_center(cfdata->locals.dia->win, 1, 1); - evas = e_win_evas_get(cfdata->locals.dia->win); + evas = evas_object_evas_get(cfdata->locals.dia->win); cfdata->gui.o_selector = o = edje_object_add(evas); e_theme_edje_object_set(o, "base/theme/modules/conf_edgebindings", @@ -941,7 +941,6 @@ _edge_grab_wnd_show(E_Config_Dialog_Data *cfdata) evas_object_event_callback_add(o, EVAS_CALLBACK_MOUSE_DOWN, _edge_grab_wnd_selected_edge_cb, cfdata); e_dialog_show(cfdata->locals.dia); - e_dialog_parent_set(cfdata->locals.dia, cfdata->cfd->dia->win); } static void diff --git a/src/modules/conf_bindings/e_int_config_keybindings.c b/src/modules/conf_bindings/e_int_config_keybindings.c index f470bee2c5..e0eb657f12 100644 --- a/src/modules/conf_bindings/e_int_config_keybindings.c +++ b/src/modules/conf_bindings/e_int_config_keybindings.c @@ -85,7 +85,7 @@ struct _E_Config_Dialog_Data }; E_Config_Dialog * -e_int_config_keybindings(E_Comp *comp, +e_int_config_keybindings(Evas_Object *parent EINA_UNUSED, const char *params) { E_Config_Dialog *cfd; @@ -100,7 +100,7 @@ e_int_config_keybindings(E_Comp *comp, v->basic.create_widgets = _basic_create_widgets; v->override_auto_apply = 1; - cfd = e_config_dialog_new(comp, _("Key Bindings Settings"), "E", + cfd = e_config_dialog_new(NULL, _("Key Bindings Settings"), "E", "keyboard_and_mouse/key_bindings", "preferences-desktop-keyboard-shortcuts", 0, v, NULL); if ((params) && (params[0])) diff --git a/src/modules/conf_bindings/e_int_config_mousebindings.c b/src/modules/conf_bindings/e_int_config_mousebindings.c index c1f1d9664f..604c2c3e91 100644 --- a/src/modules/conf_bindings/e_int_config_mousebindings.c +++ b/src/modules/conf_bindings/e_int_config_mousebindings.c @@ -91,7 +91,7 @@ struct _E_Config_Dialog_Data }; E_Config_Dialog * -e_int_config_mousebindings(E_Comp *comp, const char *params __UNUSED__) +e_int_config_mousebindings(Evas_Object *parent EINA_UNUSED, const char *params __UNUSED__) { E_Config_Dialog *cfd; E_Config_Dialog_View *v; @@ -105,7 +105,7 @@ e_int_config_mousebindings(E_Comp *comp, const char *params __UNUSED__) v->basic.create_widgets = _basic_create_widgets; v->override_auto_apply = 0; - cfd = e_config_dialog_new(comp, + cfd = e_config_dialog_new(NULL, _("Mouse Bindings Settings"), "E", "keyboard_and_mouse/mouse_bindings", "preferences-desktop-mouse", 0, v, NULL); diff --git a/src/modules/conf_bindings/e_int_config_signalbindings.c b/src/modules/conf_bindings/e_int_config_signalbindings.c index 31821b1bf4..17a3c20e17 100644 --- a/src/modules/conf_bindings/e_int_config_signalbindings.c +++ b/src/modules/conf_bindings/e_int_config_signalbindings.c @@ -616,16 +616,16 @@ _signal_add_show(E_Config_Dialog_Data *cfdata) if (cfdata->locals.dia) return; - cfdata->locals.dia = e_dialog_new(NULL, "E", "_signalbind_new_dialog"); + cfdata->locals.dia = e_dialog_new(cfdata->cfd->dia->win, "E", "_signalbind_new_dialog"); e_dialog_title_set(cfdata->locals.dia, _("Add Signal Binding")); e_dialog_icon_set(cfdata->locals.dia, "enlightenment/signals", 48); e_dialog_button_add(cfdata->locals.dia, _("OK"), NULL, _signal_add_cb_ok, cfdata); e_dialog_button_add(cfdata->locals.dia, _("Cancel"), NULL, _signal_add_cb_cancel, cfdata); e_object_del_attach_func_set(E_OBJECT(cfdata->locals.dia), _signal_add_del); cfdata->locals.dia->data = cfdata; - e_win_centered_set(cfdata->locals.dia->win, 1); + elm_win_center(cfdata->locals.dia->win, 1, 1); - evas = e_win_evas_get(cfdata->locals.dia->win); + evas = evas_object_evas_get(cfdata->locals.dia->win); obg = e_widget_list_add(evas, 1, 0); ol = e_widget_framelist_add(evas, _("Source:"), 0); @@ -643,7 +643,6 @@ _signal_add_show(E_Config_Dialog_Data *cfdata) e_dialog_show(cfdata->locals.dia); e_widget_focus_set(entry, 1); - e_dialog_parent_set(cfdata->locals.dia, cfdata->cfd->dia->win); } static void @@ -824,7 +823,7 @@ _basic_create_widgets(E_Config_Dialog *cfd EINA_UNUSED, Evas *evas, E_Config_Dia E_Config_Dialog * -e_int_config_signalbindings(E_Comp *comp, const char *params) +e_int_config_signalbindings(Evas_Object *parent EINA_UNUSED, const char *params) { E_Config_Dialog *cfd; E_Config_Dialog_View *v; @@ -838,7 +837,7 @@ e_int_config_signalbindings(E_Comp *comp, const char *params) v->basic.create_widgets = _basic_create_widgets; v->override_auto_apply = 1; - cfd = e_config_dialog_new(comp, _("Signal Bindings Settings"), "E", + cfd = e_config_dialog_new(NULL, _("Signal Bindings Settings"), "E", "keyboard_and_mouse/signal_bindings", "enlightenment/signals", 0, v, NULL); if ((params) && (params[0])) diff --git a/src/modules/conf_bindings/e_mod_main.h b/src/modules/conf_bindings/e_mod_main.h index c323141ed8..f254c62f66 100644 --- a/src/modules/conf_bindings/e_mod_main.h +++ b/src/modules/conf_bindings/e_mod_main.h @@ -1,11 +1,11 @@ #ifndef E_MOD_MAIN_H #define E_MOD_MAIN_H -E_Config_Dialog *e_int_config_acpibindings(E_Comp *comp, const char *params __UNUSED__); -E_Config_Dialog *e_int_config_keybindings(E_Comp *comp, const char *params __UNUSED__); -E_Config_Dialog *e_int_config_mousebindings(E_Comp *comp, const char *params __UNUSED__); -E_Config_Dialog *e_int_config_edgebindings(E_Comp *comp, const char *params __UNUSED__); -E_Config_Dialog *e_int_config_signalbindings(E_Comp *comp, const char *params); +E_Config_Dialog *e_int_config_acpibindings(Evas_Object *parent, const char *params __UNUSED__); +E_Config_Dialog *e_int_config_keybindings(Evas_Object *parent, const char *params __UNUSED__); +E_Config_Dialog *e_int_config_mousebindings(Evas_Object *parent, const char *params __UNUSED__); +E_Config_Dialog *e_int_config_edgebindings(Evas_Object *parent, const char *params __UNUSED__); +E_Config_Dialog *e_int_config_signalbindings(Evas_Object *parent, const char *params); /** * @addtogroup Optional_Conf diff --git a/src/modules/conf_dialogs/e_int_config_dialogs.c b/src/modules/conf_dialogs/e_int_config_dialogs.c index eed6513b99..ad1058b0b7 100644 --- a/src/modules/conf_dialogs/e_int_config_dialogs.c +++ b/src/modules/conf_dialogs/e_int_config_dialogs.c @@ -20,7 +20,7 @@ struct _E_Config_Dialog_Data }; E_Config_Dialog * -e_int_config_dialogs(E_Comp *comp, const char *params __UNUSED__) +e_int_config_dialogs(Evas_Object *parent EINA_UNUSED, const char *params __UNUSED__) { E_Config_Dialog *cfd; E_Config_Dialog_View *v; @@ -35,7 +35,7 @@ e_int_config_dialogs(E_Comp *comp, const char *params __UNUSED__) v->basic.check_changed = _basic_check_changed; v->override_auto_apply = 1; - cfd = e_config_dialog_new(comp, _("Dialog Settings"), + cfd = e_config_dialog_new(NULL, _("Dialog Settings"), "E", "settings/dialogs", "preferences-system", 0, v, NULL); return cfd; diff --git a/src/modules/conf_dialogs/e_int_config_profiles.c b/src/modules/conf_dialogs/e_int_config_profiles.c index 325eedb271..5c20d48390 100644 --- a/src/modules/conf_dialogs/e_int_config_profiles.c +++ b/src/modules/conf_dialogs/e_int_config_profiles.c @@ -37,7 +37,7 @@ struct _Del_Profile_Confirm_Data }; E_Config_Dialog * -e_int_config_profiles(E_Comp *comp, const char *params __UNUSED__) +e_int_config_profiles(Evas_Object *parent EINA_UNUSED, const char *params __UNUSED__) { E_Config_Dialog *cfd; E_Config_Dialog_View *v; @@ -50,7 +50,7 @@ e_int_config_profiles(E_Comp *comp, const char *params __UNUSED__) v->basic.apply_cfdata = _apply_cfdata; v->basic.create_widgets = _create_widgets; - cfd = e_config_dialog_new(comp, _("Profile Selector"), + cfd = e_config_dialog_new(NULL, _("Profile Selector"), "E", "settings/profiles", "preferences-profiles", 0, v, NULL); e_config_dialog_changed_auto_set(cfd, 0); @@ -308,7 +308,7 @@ _cb_add(void *data, void *data2 __UNUSED__) if (!cfdata) return; if (cfdata->dia_new_profile) - e_win_raise(cfdata->dia_new_profile->dia->win); + elm_win_raise(cfdata->dia_new_profile->dia->win); else { cfdata->dia_new_profile = e_entry_dialog_show(_("Add New Profile"), NULL, diff --git a/src/modules/conf_dialogs/e_mod_main.h b/src/modules/conf_dialogs/e_mod_main.h index 9bab87bf8e..90ae3084be 100644 --- a/src/modules/conf_dialogs/e_mod_main.h +++ b/src/modules/conf_dialogs/e_mod_main.h @@ -1,8 +1,8 @@ #ifndef E_MOD_MAIN_H #define E_MOD_MAIN_H -E_Config_Dialog *e_int_config_profiles(E_Comp *comp, const char *params __UNUSED__); -E_Config_Dialog *e_int_config_dialogs(E_Comp *comp, const char *params __UNUSED__); +E_Config_Dialog *e_int_config_profiles(Evas_Object *parent, const char *params __UNUSED__); +E_Config_Dialog *e_int_config_dialogs(Evas_Object *parent, const char *params __UNUSED__); /** * @addtogroup Optional_Conf diff --git a/src/modules/conf_display/e_int_config_desk.c b/src/modules/conf_display/e_int_config_desk.c index 2a2da3647b..95703aaecb 100644 --- a/src/modules/conf_display/e_int_config_desk.c +++ b/src/modules/conf_display/e_int_config_desk.c @@ -21,7 +21,7 @@ struct _E_Config_Dialog_Data }; E_Config_Dialog * -e_int_config_desk(E_Comp *comp, const char *params) +e_int_config_desk(Evas_Object *parent EINA_UNUSED, const char *params) { E_Config_Dialog *cfd; E_Config_Dialog_View *v; @@ -49,7 +49,7 @@ e_int_config_desk(E_Comp *comp, const char *params) v->basic.create_widgets = _basic_create; v->override_auto_apply = 1; - cfd = e_config_dialog_new(comp, _("Desk Settings"), "E", "internal/desk", + cfd = e_config_dialog_new(NULL, _("Desk Settings"), "E", "internal/desk", "preferences-desktop", 0, v, cfdata); return cfd; } @@ -166,7 +166,7 @@ _basic_create(E_Config_Dialog *cfd, Evas *evas, E_Config_Dialog_Data *cfdata) Evas_Object *o, *of, *ol, *ob; E_Zone *zone; - zone = e_zone_current_get(cfd->comp); + zone = e_zone_current_get(e_comp_get(cfd->dia->win)); o = e_widget_list_add(evas, 0, 0); @@ -211,8 +211,7 @@ _cb_config(void *data, void *data2 __UNUSED__) if (!cfdata) return; snprintf(buf, sizeof(buf), "%i %i %i %i", cfdata->man_num, cfdata->zone_num, cfdata->desk_x, cfdata->desk_y); - e_configure_registry_call("internal/wallpaper_desk", - NULL, buf); + e_configure_registry_call("internal/wallpaper_desk", NULL, buf); } static Eina_Bool diff --git a/src/modules/conf_display/e_int_config_desklock.c b/src/modules/conf_display/e_int_config_desklock.c index 880e0189f6..a637d48612 100644 --- a/src/modules/conf_display/e_int_config_desklock.c +++ b/src/modules/conf_display/e_int_config_desklock.c @@ -61,7 +61,7 @@ struct _E_Config_Dialog_Data }; E_Config_Dialog * -e_int_config_desklock(E_Comp *comp, const char *params __UNUSED__) +e_int_config_desklock(Evas_Object *parent EINA_UNUSED, const char *params __UNUSED__) { E_Config_Dialog *cfd; E_Config_Dialog_View *v; @@ -77,7 +77,7 @@ e_int_config_desklock(E_Comp *comp, const char *params __UNUSED__) v->basic.check_changed = _basic_check_changed; v->override_auto_apply = 1; - cfd = e_config_dialog_new(comp, _("Screen Lock Settings"), "E", + cfd = e_config_dialog_new(NULL, _("Screen Lock Settings"), "E", "screen/screen_lock", "preferences-system-lock-screen", 0, v, NULL); return cfd; @@ -765,7 +765,7 @@ _cb_bg_mouse_down(void *data, Evas *evas __UNUSED__, Evas_Object *obj, void *eve if (e_widget_disabled_get(obj)) return; if (!(cfdata = data)) return; if (cfdata->bg_fsel) - e_win_raise(cfdata->bg_fsel->dia->win); + elm_win_raise(cfdata->bg_fsel->dia->win); else cfdata->bg_fsel = e_int_config_desklock_fsel(cfdata->cfd, obj); } diff --git a/src/modules/conf_display/e_int_config_desklock_fsel.c b/src/modules/conf_display/e_int_config_desklock_fsel.c index 7777ab1af6..03ce65b9f0 100644 --- a/src/modules/conf_display/e_int_config_desklock_fsel.c +++ b/src/modules/conf_display/e_int_config_desklock_fsel.c @@ -23,13 +23,9 @@ static void _cb_dir_up(void *data1, void *data2); E_Config_Dialog * e_int_config_desklock_fsel(E_Config_Dialog *parent, Evas_Object *bg) { - E_Comp *comp = NULL; E_Config_Dialog *cfd; E_Config_Dialog_View *v; - if (parent) - comp = parent->comp; - v = E_NEW(E_Config_Dialog_View, 1); v->create_cfdata = _create_data; v->free_cfdata = _free_data; @@ -37,7 +33,7 @@ e_int_config_desklock_fsel(E_Config_Dialog *parent, Evas_Object *bg) v->basic_only = 1; v->normal_win = 1; - cfd = e_config_dialog_new(comp, _("Select a Background..."), + cfd = e_config_dialog_new(parent->dia->win, _("Select a Background..."), "E", "_desklock_fsel_dialog", "enlightenment/background", 0, v, bg); cfd->data = parent; diff --git a/src/modules/conf_display/e_int_config_desks.c b/src/modules/conf_display/e_int_config_desks.c index 6a789575f7..2ee4daf850 100644 --- a/src/modules/conf_display/e_int_config_desks.c +++ b/src/modules/conf_display/e_int_config_desks.c @@ -28,7 +28,7 @@ struct _E_Config_Dialog_Data /* a nice easy setup function that does the dirty work */ E_Config_Dialog * -e_int_config_desks(E_Comp *comp, const char *params __UNUSED__) +e_int_config_desks(Evas_Object *parent EINA_UNUSED, const char *params __UNUSED__) { E_Config_Dialog *cfd; E_Config_Dialog_View *v; @@ -46,7 +46,7 @@ e_int_config_desks(E_Comp *comp, const char *params __UNUSED__) v->advanced.create_widgets = NULL; v->advanced.check_changed = NULL; /* create config diaolg for NULL object/data */ - cfd = e_config_dialog_new(comp, _("Virtual Desktops Settings"), + cfd = e_config_dialog_new(NULL, _("Virtual Desktops Settings"), "E", "screen/virtual_desktops", "preferences-desktop", 0, v, NULL); return cfd; diff --git a/src/modules/conf_display/e_int_config_dpms.c b/src/modules/conf_display/e_int_config_dpms.c index d95b652718..1a88708f2d 100644 --- a/src/modules/conf_display/e_int_config_dpms.c +++ b/src/modules/conf_display/e_int_config_dpms.c @@ -37,7 +37,7 @@ struct _E_Config_Dialog_Data }; E_Config_Dialog * -e_int_config_dpms(E_Comp *comp, const char *params __UNUSED__) +e_int_config_dpms(Evas_Object *parent EINA_UNUSED, const char *params __UNUSED__) { E_Config_Dialog *cfd; E_Config_Dialog_View *v; @@ -54,7 +54,7 @@ e_int_config_dpms(E_Comp *comp, const char *params __UNUSED__) v->basic.check_changed = _advanced_check_changed; v->override_auto_apply = 1; - cfd = e_config_dialog_new(comp, _("Backlight Settings"), "E", + cfd = e_config_dialog_new(NULL, _("Backlight Settings"), "E", "screen/power_management", "preferences-system-power-management", 0, v, NULL); return cfd; diff --git a/src/modules/conf_display/e_int_config_screensaver.c b/src/modules/conf_display/e_int_config_screensaver.c index df6ffd7217..6600550704 100644 --- a/src/modules/conf_display/e_int_config_screensaver.c +++ b/src/modules/conf_display/e_int_config_screensaver.c @@ -39,7 +39,7 @@ struct _E_Config_Dialog_Data }; E_Config_Dialog * -e_int_config_screensaver(E_Comp *comp, const char *params __UNUSED__) +e_int_config_screensaver(Evas_Object *parent EINA_UNUSED, const char *params __UNUSED__) { E_Config_Dialog *cfd; E_Config_Dialog_View *v; @@ -55,7 +55,7 @@ e_int_config_screensaver(E_Comp *comp, const char *params __UNUSED__) v->override_auto_apply = 1; - cfd = e_config_dialog_new(comp,_("Screen Blank Settings"), + cfd = e_config_dialog_new(NULL,_("Screen Blank Settings"), "E", "screen/screen_saver", "preferences-desktop-screensaver", 0, v, NULL); return cfd; diff --git a/src/modules/conf_display/e_mod_main.h b/src/modules/conf_display/e_mod_main.h index 6abfb17d22..8debe7220d 100644 --- a/src/modules/conf_display/e_mod_main.h +++ b/src/modules/conf_display/e_mod_main.h @@ -1,12 +1,12 @@ #ifndef E_MOD_MAIN_H #define E_MOD_MAIN_H -E_Config_Dialog *e_int_config_desk(E_Comp *comp, const char *params); -E_Config_Dialog *e_int_config_screensaver(E_Comp *comp, const char *params __UNUSED__); -E_Config_Dialog *e_int_config_dpms(E_Comp *comp, const char *params __UNUSED__); -E_Config_Dialog *e_int_config_display(E_Comp *comp, const char *params __UNUSED__); -E_Config_Dialog *e_int_config_desks(E_Comp *comp, const char *params __UNUSED__); -E_Config_Dialog *e_int_config_desklock(E_Comp *comp, const char *params __UNUSED__); +E_Config_Dialog *e_int_config_desk(Evas_Object *parent, const char *params); +E_Config_Dialog *e_int_config_screensaver(Evas_Object *parent, const char *params __UNUSED__); +E_Config_Dialog *e_int_config_dpms(Evas_Object *parent, const char *params __UNUSED__); +E_Config_Dialog *e_int_config_display(Evas_Object *parent, const char *params __UNUSED__); +E_Config_Dialog *e_int_config_desks(Evas_Object *parent, const char *params __UNUSED__); +E_Config_Dialog *e_int_config_desklock(Evas_Object *parent, const char *params __UNUSED__); void e_int_config_desklock_fsel_done(E_Config_Dialog *cfd, Evas_Object *bg, const char *bg_file, Eina_Bool hide_logo); E_Config_Dialog *e_int_config_desklock_fsel(E_Config_Dialog *parent, Evas_Object *bg); void e_int_config_desklock_fsel_del(E_Config_Dialog *cfd); diff --git a/src/modules/conf_interaction/e_int_config_interaction.c b/src/modules/conf_interaction/e_int_config_interaction.c index 35f2901cda..6403316376 100644 --- a/src/modules/conf_interaction/e_int_config_interaction.c +++ b/src/modules/conf_interaction/e_int_config_interaction.c @@ -17,7 +17,7 @@ struct _E_Config_Dialog_Data }; E_Config_Dialog * -e_int_config_interaction(E_Comp *comp, const char *params __UNUSED__) +e_int_config_interaction(Evas_Object *parent EINA_UNUSED, const char *params __UNUSED__) { E_Config_Dialog *cfd; E_Config_Dialog_View *v; @@ -33,7 +33,7 @@ e_int_config_interaction(E_Comp *comp, const char *params __UNUSED__) v->basic.check_changed = _basic_check_changed; v->override_auto_apply = 1; - cfd = e_config_dialog_new(comp, _("Interaction Settings"), + cfd = e_config_dialog_new(NULL, _("Interaction Settings"), "E", "keyboard_and_mouse/interaction", "preferences-interaction", 0, v, NULL); return cfd; diff --git a/src/modules/conf_interaction/e_int_config_mouse.c b/src/modules/conf_interaction/e_int_config_mouse.c index fcd83d9b10..7773930bc1 100644 --- a/src/modules/conf_interaction/e_int_config_mouse.c +++ b/src/modules/conf_interaction/e_int_config_mouse.c @@ -27,7 +27,7 @@ struct _E_Config_Dialog_Data }; E_Config_Dialog * -e_int_config_mouse(E_Comp *comp, const char *params __UNUSED__) +e_int_config_mouse(Evas_Object *parent EINA_UNUSED, const char *params __UNUSED__) { E_Config_Dialog *cfd; E_Config_Dialog_View *v; @@ -43,7 +43,7 @@ e_int_config_mouse(E_Comp *comp, const char *params __UNUSED__) v->basic.create_widgets = _basic_create_widgets; v->basic.check_changed = _basic_check_changed; - cfd = e_config_dialog_new(comp, _("Mouse Settings"), "E", + cfd = e_config_dialog_new(NULL, _("Mouse Settings"), "E", "keyboard_and_mouse/mouse_settings", "preferences-desktop-mouse", 0, v, NULL); return cfd; diff --git a/src/modules/conf_interaction/e_mod_main.h b/src/modules/conf_interaction/e_mod_main.h index 2e4edc6c9e..628914dbbd 100644 --- a/src/modules/conf_interaction/e_mod_main.h +++ b/src/modules/conf_interaction/e_mod_main.h @@ -1,8 +1,8 @@ #ifndef E_MOD_MAIN_H #define E_MOD_MAIN_H -E_Config_Dialog *e_int_config_interaction(E_Comp *comp, const char *params __UNUSED__); -E_Config_Dialog *e_int_config_mouse(E_Comp *comp, const char *params __UNUSED__); +E_Config_Dialog *e_int_config_interaction(Evas_Object *parent, const char *params __UNUSED__); +E_Config_Dialog *e_int_config_mouse(Evas_Object *parent, const char *params __UNUSED__); /** * @addtogroup Optional_Conf diff --git a/src/modules/conf_intl/e_int_config_imc.c b/src/modules/conf_intl/e_int_config_imc.c index 0449a3fd9f..929880a0ed 100644 --- a/src/modules/conf_intl/e_int_config_imc.c +++ b/src/modules/conf_intl/e_int_config_imc.c @@ -80,11 +80,11 @@ struct _E_Config_Dialog_Data Evas_Object *xmodifiers; } gui; - E_Win *win_import; + Evas_Object *win_import; }; E_Config_Dialog * -e_int_config_imc(E_Comp *comp, const char *params __UNUSED__) +e_int_config_imc(Evas_Object *parent, const char *params __UNUSED__) { E_Config_Dialog *cfd; E_Config_Dialog_View *v; @@ -99,7 +99,7 @@ e_int_config_imc(E_Comp *comp, const char *params __UNUSED__) v->basic.create_widgets = _basic_create_widgets; v->basic.apply_cfdata = _basic_apply_data; - cfd = e_config_dialog_new(comp, + cfd = e_config_dialog_new(parent, _("Input Method Settings"), "E", "language/input_method_settings", "preferences-imc", 0, v, NULL); @@ -772,7 +772,7 @@ _cb_import(void *data1, void *data2 __UNUSED__) cfdata = data1; if (cfdata->win_import) - e_win_raise(cfdata->win_import); + elm_win_raise(cfdata->win_import); else cfdata->win_import = e_int_config_imc_import(cfdata->cfd); } diff --git a/src/modules/conf_intl/e_int_config_imc_import.c b/src/modules/conf_intl/e_int_config_imc_import.c index 1ab3821c4c..5905aa80a0 100644 --- a/src/modules/conf_intl/e_int_config_imc_import.c +++ b/src/modules/conf_intl/e_int_config_imc_import.c @@ -17,7 +17,7 @@ struct _Import Evas_Object *ok_obj; Evas_Object *cancel_obj; - E_Win *win; + Evas_Object *win; }; struct _E_Config_Dialog_Data @@ -25,8 +25,7 @@ struct _E_Config_Dialog_Data char *file; }; -static void _imc_import_cb_delete(E_Win *win); -static void _imc_import_cb_resize(E_Win *win); +static void _imc_import_cb_delete(void *data EINA_UNUSED, Evas *e, Evas_Object *obj, void *event_info); static void _imc_import_cb_wid_focus(void *data, Evas_Object *obj); static void _imc_import_cb_selected(void *data, Evas_Object *obj); static void _imc_import_cb_changed(void *data, Evas_Object *obj); @@ -35,11 +34,11 @@ static void _imc_import_cb_close(void *data, void *data2); static void _imc_import_cb_key_down(void *data, Evas *e, Evas_Object *obj, void *event); -E_Win * +Evas_Object * e_int_config_imc_import(E_Config_Dialog *parent) { Evas *evas; - E_Win *win; + Evas_Object *win; Evas_Object *o, *ofm; Import *import; E_Config_Dialog_Data *cfdata; @@ -50,30 +49,28 @@ e_int_config_imc_import(E_Config_Dialog *parent) import = E_NEW(Import, 1); if (!import) return NULL; - win = e_win_new(parent->comp); + win = elm_win_add(parent->parent, "E", ELM_WIN_BASIC); if (!win) { E_FREE(import); return NULL; } - evas = e_win_evas_get(win); + evas = evas_object_evas_get(win); cfdata = E_NEW(E_Config_Dialog_Data, 1); import->cfdata = cfdata; import->win = win; import->parent = parent; - e_win_title_set(win, _("Select an Input Method Settings...")); - e_win_delete_callback_set(win, _imc_import_cb_delete); - e_win_resize_callback_set(win, _imc_import_cb_resize); - e_win_dialog_set(win, 1); - e_win_name_class_set(win, "E", "_imc_import_dialog"); + elm_win_title_set(win, _("Select an Input Method Settings...")); + evas_object_event_callback_add(win, EVAS_CALLBACK_DEL, _imc_import_cb_delete, NULL); + ecore_evas_name_class_set(ecore_evas_ecore_evas_get(evas_object_evas_get(win)), "E", "_imc_import_dialog"); o = edje_object_add(evas); + elm_win_resize_object_add(win, o); import->bg_obj = o; e_theme_edje_object_set(o, "base/theme/dialog", "e/widgets/dialog/main"); - evas_object_move(o, 0, 0); evas_object_show(o); o = e_widget_list_add(evas, 1, 1); @@ -127,7 +124,7 @@ e_int_config_imc_import(E_Config_Dialog *parent) e_widget_list_object_append(import->box_obj, import->cancel_obj, 1, 0, 0.5); e_widget_disabled_set(import->ok_obj, 1); - e_win_centered_set(win, 1); + elm_win_center(win, 1, 1); o = import->box_obj; e_widget_size_min_get(o, &w, &h); @@ -136,25 +133,25 @@ e_int_config_imc_import(E_Config_Dialog *parent) edje_object_size_min_calc(import->bg_obj, &w, &h); evas_object_resize(import->bg_obj, w, h); - e_win_resize(win, w, h); - e_win_size_min_set(win, w, h); - e_win_size_max_set(win, 99999, 99999); - e_win_show(win); + evas_object_resize(win, w, h); + evas_object_size_hint_min_set(win, w, h); + evas_object_size_hint_max_set(win, 99999, 99999); + evas_object_show(win); e_win_client_icon_set(win, "preferences-imc"); - win->data = import; + evas_object_data_set(win, "imc_win", import); return win; } void -e_int_config_imc_import_del(E_Win *win) +e_int_config_imc_import_del(Evas_Object *win) { Import *import; - import = win->data; + import = evas_object_data_get(win, "imc_win"); - e_object_del(E_OBJECT(import->win)); + evas_object_del(win); e_int_config_imc_import_done(import->parent); E_FREE(import->cfdata->file); @@ -165,18 +162,9 @@ e_int_config_imc_import_del(E_Win *win) } static void -_imc_import_cb_delete(E_Win *win) +_imc_import_cb_delete(void *data EINA_UNUSED, Evas *e EINA_UNUSED, Evas_Object *obj, void *event_info EINA_UNUSED) { - e_int_config_imc_import_del(win); -} - -static void -_imc_import_cb_resize(E_Win *win) -{ - Import *import; - - if (!(import = win->data)) return; - evas_object_resize(import->bg_obj, win->w, win->h); + e_int_config_imc_import_del(obj); } static void @@ -244,12 +232,12 @@ static void _imc_import_cb_ok(void *data, void *data2 __UNUSED__) { Import *import; - E_Win *win; + Evas_Object *win; const char *path; const char *file; win = data; - if (!(import = win->data)) return; + if (!(import = evas_object_data_get(win, "imc_win"))) return; path = e_widget_fsel_selection_path_get(import->fsel_obj); E_FREE(import->cfdata->file); @@ -312,10 +300,7 @@ _imc_import_cb_ok(void *data, void *data2 __UNUSED__) static void _imc_import_cb_close(void *data, void *data2 __UNUSED__) { - E_Win *win; - - win = data; - e_int_config_imc_import_del(win); + e_int_config_imc_import_del(data); } static void @@ -328,7 +313,7 @@ _imc_import_cb_key_down(void *data, Evas *e __UNUSED__, Evas_Object *obj __UNUSE import = data; if ((!e_widget_fsel_typebuf_visible_get(import->fsel_obj)) && (!strcmp(ev->key, "Tab"))) { - if (evas_key_modifier_is_set(evas_key_modifier_get(e_win_evas_get(import->win)), "Shift")) + if (evas_key_modifier_is_set(evas_key_modifier_get(evas_object_evas_get(import->win)), "Shift")) { if (e_widget_focus_get(import->box_obj)) { diff --git a/src/modules/conf_intl/e_int_config_intl.c b/src/modules/conf_intl/e_int_config_intl.c index b4e811494a..b341b43aa8 100644 --- a/src/modules/conf_intl/e_int_config_intl.c +++ b/src/modules/conf_intl/e_int_config_intl.c @@ -579,7 +579,7 @@ const E_Intl_Pair charset_predefined_pairs[] = { }; E_Config_Dialog * -e_int_config_intl(E_Comp *comp, const char *params __UNUSED__) +e_int_config_intl(Evas_Object *parent EINA_UNUSED, const char *params __UNUSED__) { E_Config_Dialog *cfd; E_Config_Dialog_View *v; @@ -596,7 +596,7 @@ e_int_config_intl(E_Comp *comp, const char *params __UNUSED__) v->basic.apply_cfdata = _basic_advanced_apply_data; v->basic.check_changed = _basic_advanced_check_changed; - cfd = e_config_dialog_new(comp, + cfd = e_config_dialog_new(NULL, _("Language Settings"), "E", "language/language_settings", "preferences-desktop-locale", 0, v, NULL); @@ -604,7 +604,7 @@ e_int_config_intl(E_Comp *comp, const char *params __UNUSED__) } E_Config_Dialog * -e_int_config_desklock_intl(E_Comp *comp, const char *params __UNUSED__) +e_int_config_desklock_intl(Evas_Object *parent EINA_UNUSED, const char *params __UNUSED__) { E_Config_Dialog *cfd; E_Config_Dialog_View *v; @@ -621,7 +621,7 @@ e_int_config_desklock_intl(E_Comp *comp, const char *params __UNUSED__) v->basic.apply_cfdata = _basic_advanced_apply_data; v->basic.check_changed = _basic_advanced_check_changed; - cfd = e_config_dialog_new(comp, + cfd = e_config_dialog_new(NULL, _("Desklock Language Settings"), "E", "language/desklock_language_settings", "preferences-desktop-locale", 0, v, NULL); diff --git a/src/modules/conf_intl/e_mod_main.h b/src/modules/conf_intl/e_mod_main.h index aab511e869..eec806a3fb 100644 --- a/src/modules/conf_intl/e_mod_main.h +++ b/src/modules/conf_intl/e_mod_main.h @@ -1,15 +1,15 @@ #ifndef E_MOD_MAIN_H #define E_MOD_MAIN_H -E_Config_Dialog *e_int_config_imc(E_Comp *comp, const char *params __UNUSED__); +E_Config_Dialog *e_int_config_imc(Evas_Object *parent, const char *params __UNUSED__); void e_int_config_imc_import_done(E_Config_Dialog *dia); void e_int_config_imc_update(E_Config_Dialog *dia, const char *file); -E_Win *e_int_config_imc_import(E_Config_Dialog *parent); -void e_int_config_imc_import_del(E_Win *win); +Evas_Object *e_int_config_imc_import(E_Config_Dialog *parent); +void e_int_config_imc_import_del(Evas_Object *); -E_Config_Dialog *e_int_config_intl(E_Comp *comp, const char *params __UNUSED__); -E_Config_Dialog *e_int_config_desklock_intl(E_Comp *comp, const char *params __UNUSED__); +E_Config_Dialog *e_int_config_intl(Evas_Object *parent, const char *params __UNUSED__); +E_Config_Dialog *e_int_config_desklock_intl(Evas_Object *parent, const char *params __UNUSED__); /** * @addtogroup Optional_Conf diff --git a/src/modules/conf_menus/e_int_config_menus.c b/src/modules/conf_menus/e_int_config_menus.c index 14049ac906..03d743e3bf 100644 --- a/src/modules/conf_menus/e_int_config_menus.c +++ b/src/modules/conf_menus/e_int_config_menus.c @@ -21,7 +21,7 @@ static int _basic_apply(E_Config_Dialog *cfd, E_Config_Dialog_Data *cfdata); static int _basic_check_changed(E_Config_Dialog *cfd, E_Config_Dialog_Data *cfdata); E_Config_Dialog * -e_int_config_menus(E_Comp *comp, const char *params __UNUSED__) +e_int_config_menus(Evas_Object *parent EINA_UNUSED, const char *params __UNUSED__) { E_Config_Dialog *cfd; E_Config_Dialog_View *v; @@ -35,7 +35,7 @@ e_int_config_menus(E_Comp *comp, const char *params __UNUSED__) v->basic.apply_cfdata = _basic_apply; v->basic.check_changed = _basic_check_changed; - cfd = e_config_dialog_new(comp, _("Menu Settings"), "E", "menus/menu_settings", + cfd = e_config_dialog_new(NULL, _("Menu Settings"), "E", "menus/menu_settings", "preferences-menus", 0, v, NULL); return cfd; } diff --git a/src/modules/conf_menus/e_mod_main.h b/src/modules/conf_menus/e_mod_main.h index 3686f005cc..4bf6738af6 100644 --- a/src/modules/conf_menus/e_mod_main.h +++ b/src/modules/conf_menus/e_mod_main.h @@ -1,7 +1,7 @@ #ifndef E_MOD_MAIN_H #define E_MOD_MAIN_H -E_Config_Dialog *e_int_config_menus(E_Comp *comp, const char *params __UNUSED__); +E_Config_Dialog *e_int_config_menus(Evas_Object *parent, const char *params __UNUSED__); /** * @addtogroup Optional_Conf diff --git a/src/modules/conf_paths/e_int_config_env.c b/src/modules/conf_paths/e_int_config_env.c index a5cdbc452b..02021a937f 100644 --- a/src/modules/conf_paths/e_int_config_env.c +++ b/src/modules/conf_paths/e_int_config_env.c @@ -20,7 +20,7 @@ struct _E_Config_Dialog_Data }; E_Config_Dialog * -e_int_config_env(E_Comp *comp, const char *params __UNUSED__) +e_int_config_env(Evas_Object *parent EINA_UNUSED, const char *params __UNUSED__) { E_Config_Dialog *cfd; E_Config_Dialog_View *v; @@ -33,7 +33,7 @@ e_int_config_env(E_Comp *comp, const char *params __UNUSED__) v->basic.create_widgets = _basic_create_widgets; v->basic.apply_cfdata = _basic_apply_data; - cfd = e_config_dialog_new(comp, _("Environment Variables"), + cfd = e_config_dialog_new(NULL, _("Environment Variables"), "E", "advanced/environment_variables", "preferences-system", 0, v, NULL); return cfd; diff --git a/src/modules/conf_paths/e_int_config_paths.c b/src/modules/conf_paths/e_int_config_paths.c index 076ec4f963..610ebdf606 100644 --- a/src/modules/conf_paths/e_int_config_paths.c +++ b/src/modules/conf_paths/e_int_config_paths.c @@ -43,7 +43,7 @@ struct _E_Config_Dialog_Data }; E_Config_Dialog * -e_int_config_paths(E_Comp *comp, const char *params __UNUSED__) +e_int_config_paths(Evas_Object *parent EINA_UNUSED, const char *params __UNUSED__) { E_Config_Dialog *cfd; E_Config_Dialog_View *v; @@ -56,7 +56,7 @@ e_int_config_paths(E_Comp *comp, const char *params __UNUSED__) v->basic.create_widgets = _basic_create_widgets; v->basic.apply_cfdata = _basic_apply_data; - cfd = e_config_dialog_new(comp, _("Search Path Settings"), + cfd = e_config_dialog_new(NULL, _("Search Path Settings"), "E", "advanced/search_directories", "preferences-directories", 0, v, NULL); return cfd; diff --git a/src/modules/conf_paths/e_mod_main.h b/src/modules/conf_paths/e_mod_main.h index 9afe3ded94..2a23f84783 100644 --- a/src/modules/conf_paths/e_mod_main.h +++ b/src/modules/conf_paths/e_mod_main.h @@ -1,8 +1,8 @@ #ifndef E_MOD_MAIN_H #define E_MOD_MAIN_H -E_Config_Dialog *e_int_config_env(E_Comp *comp, const char *params __UNUSED__); -E_Config_Dialog *e_int_config_paths(E_Comp *comp, const char *params __UNUSED__); +E_Config_Dialog *e_int_config_env(Evas_Object *parent, const char *params __UNUSED__); +E_Config_Dialog *e_int_config_paths(Evas_Object *parent, const char *params __UNUSED__); /** * @addtogroup Optional_Conf diff --git a/src/modules/conf_performance/e_int_config_performance.c b/src/modules/conf_performance/e_int_config_performance.c index c94f4d6cc3..ce0e49eace 100644 --- a/src/modules/conf_performance/e_int_config_performance.c +++ b/src/modules/conf_performance/e_int_config_performance.c @@ -19,7 +19,7 @@ struct _E_Config_Dialog_Data }; E_Config_Dialog * -e_int_config_performance(E_Comp *comp, const char *params __UNUSED__) +e_int_config_performance(Evas_Object *parent EINA_UNUSED, const char *params __UNUSED__) { E_Config_Dialog *cfd; E_Config_Dialog_View *v; @@ -33,7 +33,7 @@ e_int_config_performance(E_Comp *comp, const char *params __UNUSED__) v->basic.create_widgets = _basic_create; v->basic.check_changed = _basic_check_changed; - cfd = e_config_dialog_new(comp, _("Performance Settings"), + cfd = e_config_dialog_new(NULL, _("Performance Settings"), "E", "advanced/performance", "preferences-system-performance", 0, v, NULL); return cfd; @@ -77,7 +77,8 @@ _basic_apply(E_Config_Dialog *cfd __UNUSED__, E_Config_Dialog_Data *cfdata) e_config->priority = cfdata->priority; e_config->no_module_delay = !cfdata->module_delay; ecore_exe_run_priority_set(e_config->priority); - e_canvas_recache(); + elm_config_cache_image_cache_size_set(cfdata->image_cache); + elm_config_cache_font_cache_size_set(cfdata->font_cache); e_config_save_queue(); return 1; } diff --git a/src/modules/conf_performance/e_int_config_powermanagement.c b/src/modules/conf_performance/e_int_config_powermanagement.c index f5f1138258..ce0fc8a18e 100644 --- a/src/modules/conf_performance/e_int_config_powermanagement.c +++ b/src/modules/conf_performance/e_int_config_powermanagement.c @@ -24,7 +24,7 @@ struct _E_Config_Dialog_Data }; E_Config_Dialog * -e_int_config_powermanagement(E_Comp *comp, const char *params __UNUSED__) +e_int_config_powermanagement(Evas_Object *parent EINA_UNUSED, const char *params __UNUSED__) { E_Config_Dialog *cfd; E_Config_Dialog_View *v; @@ -38,7 +38,7 @@ e_int_config_powermanagement(E_Comp *comp, const char *params __UNUSED__) v->basic.create_widgets = _basic_create; v->basic.check_changed = _basic_check_changed; - cfd = e_config_dialog_new(comp, _("Power Management Settings"), + cfd = e_config_dialog_new(NULL, _("Power Management Settings"), "E", "advanced/powermanagement", "preferences-system-power-management", 0, v, NULL); return cfd; diff --git a/src/modules/conf_performance/e_mod_main.h b/src/modules/conf_performance/e_mod_main.h index eb6ec34c2f..80b19ee91f 100644 --- a/src/modules/conf_performance/e_mod_main.h +++ b/src/modules/conf_performance/e_mod_main.h @@ -1,9 +1,9 @@ #ifndef E_MOD_MAIN_H #define E_MOD_MAIN_H -E_Config_Dialog *e_int_config_engine(E_Comp *comp, const char *params __UNUSED__); -E_Config_Dialog *e_int_config_performance(E_Comp *comp, const char *params __UNUSED__); -E_Config_Dialog *e_int_config_powermanagement(E_Comp *comp, const char *params __UNUSED__); +E_Config_Dialog *e_int_config_engine(Evas_Object *parent, const char *params __UNUSED__); +E_Config_Dialog *e_int_config_performance(Evas_Object *parent, const char *params __UNUSED__); +E_Config_Dialog *e_int_config_powermanagement(Evas_Object *parent, const char *params __UNUSED__); /** * @addtogroup Optional_Conf diff --git a/src/modules/conf_randr/e_int_config_randr.c b/src/modules/conf_randr/e_int_config_randr.c index 7093a5a2c4..c1df1bc280 100644 --- a/src/modules/conf_randr/e_int_config_randr.c +++ b/src/modules/conf_randr/e_int_config_randr.c @@ -24,7 +24,7 @@ static void _randr_cb_changed(void *data, Evas_Object *obj, void *event EINA_UNU /* public functions */ E_Config_Dialog * -e_int_config_randr(E_Comp *comp, const char *params EINA_UNUSED) +e_int_config_randr(Evas_Object *parent EINA_UNUSED, const char *params EINA_UNUSED) { E_Config_Dialog *cfd; E_Config_Dialog_View *v; @@ -46,7 +46,7 @@ e_int_config_randr(E_Comp *comp, const char *params EINA_UNUSED) v->override_auto_apply = EINA_TRUE; /* create new dialog */ - cfd = e_config_dialog_new(comp, _("Screen Setup"), + cfd = e_config_dialog_new(NULL, _("Screen Setup"), "E", "screen/screen_setup", "preferences-system-screen-resolution", 0, v, NULL); @@ -147,7 +147,7 @@ _basic_create(E_Config_Dialog *cfd, Evas *evas, E_Config_Dialog_Data *cfdata) e_widget_size_min_set(o, mw, mh + fh + ch); e_util_win_auto_resize_fill(cfd->dia->win); - e_win_centered_set(cfd->dia->win, 1); + elm_win_center(cfd->dia->win, 1, 1); return o; } diff --git a/src/modules/conf_randr/e_int_config_randr.h b/src/modules/conf_randr/e_int_config_randr.h index 4a80bad022..a0d91f841f 100644 --- a/src/modules/conf_randr/e_int_config_randr.h +++ b/src/modules/conf_randr/e_int_config_randr.h @@ -3,7 +3,7 @@ # ifndef E_INT_CONFIG_RANDR_H # define E_INT_CONFIG_RANDR_H -E_Config_Dialog *e_int_config_randr(E_Comp *comp, const char *params __UNUSED__); +E_Config_Dialog *e_int_config_randr(Evas_Object *parent, const char *params __UNUSED__); # endif #endif diff --git a/src/modules/conf_randr/e_smart_monitor.c b/src/modules/conf_randr/e_smart_monitor.c index a92b9b2b89..8d151867f7 100644 --- a/src/modules/conf_randr/e_smart_monitor.c +++ b/src/modules/conf_randr/e_smart_monitor.c @@ -951,41 +951,35 @@ _e_smart_monitor_resolution_set(E_Smart_Data *sd, Evas_Coord w, Evas_Coord h) static void _e_smart_monitor_pointer_push(Evas_Object *obj, const char *ptr) { - Evas_Object *ow; - E_Win *win; + Evas_Object *win; LOGFN(__FILE__, __LINE__, __FUNCTION__); - if (!(ow = evas_object_name_find(evas_object_evas_get(obj), "E_Win"))) - return; - if (!(win = evas_object_data_get(ow, "E_Win"))) + if (!(win = evas_object_name_find(evas_object_evas_get(obj), "E_Win"))) return; /* tell E to set the pointer type */ if (ptr) - e_pointer_type_push(win->pointer, obj, ptr); + e_pointer_type_push(e_win_pointer_get(win), obj, ptr); else - e_pointer_type_pop(win->pointer, obj, "default"); + e_pointer_type_pop(e_win_pointer_get(win), obj, "default"); } static void _e_smart_monitor_pointer_pop(Evas_Object *obj, const char *ptr) { - Evas_Object *ow; - E_Win *win; + Evas_Object *win; LOGFN(__FILE__, __LINE__, __FUNCTION__); - if (!(ow = evas_object_name_find(evas_object_evas_get(obj), "E_Win"))) - return; - if (!(win = evas_object_data_get(ow, "E_Win"))) + if (!(win = evas_object_name_find(evas_object_evas_get(obj), "E_Win"))) return; /* tell E to set the pointer type */ if (ptr) - e_pointer_type_pop(win->pointer, obj, ptr); + e_pointer_type_pop(e_win_pointer_get(win), obj, ptr); else - e_pointer_type_pop(win->pointer, obj, "default"); + e_pointer_type_pop(e_win_pointer_get(win), obj, "default"); } static inline void diff --git a/src/modules/conf_shelves/e_int_config_shelf.c b/src/modules/conf_shelves/e_int_config_shelf.c index 82a5825444..df771ea7b2 100644 --- a/src/modules/conf_shelves/e_int_config_shelf.c +++ b/src/modules/conf_shelves/e_int_config_shelf.c @@ -39,7 +39,7 @@ struct _E_Config_Dialog_Data static E_Config_Dialog_Data *_cfdata; E_Config_Dialog * -e_int_config_shelf(E_Comp *comp, const char *params __UNUSED__) +e_int_config_shelf(Evas_Object *parent EINA_UNUSED, const char *params __UNUSED__) { E_Config_Dialog *cfd; E_Config_Dialog_View *v; @@ -52,7 +52,7 @@ e_int_config_shelf(E_Comp *comp, const char *params __UNUSED__) v->free_cfdata = _free_data; v->basic.create_widgets = _basic_create; - cfd = e_config_dialog_new(comp, _("Shelf Settings"), "E", + cfd = e_config_dialog_new(NULL, _("Shelf Settings"), "E", "extensions/shelves", "preferences-desktop-shelf", 0, v, NULL); return cfd; @@ -78,8 +78,8 @@ _shelf_handler_cb(E_Config_Dialog_Data *cfdata, int type __UNUSED__, E_Event_She { E_Zone *zone; - if (!cfdata->cfd->dia->win->client) return ECORE_CALLBACK_RENEW; - zone = cfdata->cfd->dia->win->client->zone; + zone = e_comp_object_util_zone_get(cfdata->cfd->dia->win); + if (!zone) return ECORE_CALLBACK_RENEW; if (ev->shelf->zone == zone) _ilist_item_new(cfdata, 1, ev->shelf); return ECORE_CALLBACK_RENEW; @@ -95,7 +95,7 @@ _create_data(E_Config_Dialog *cfd) E_LIST_HANDLER_APPEND(cfdata->handlers, E_EVENT_SHELF_ADD, _shelf_handler_cb, cfdata); E_LIST_HANDLER_APPEND(cfdata->handlers, E_EVENT_SHELF_RENAME, _shelf_handler_rename_cb, cfdata); cfdata->cfd = cfd; - cfd->dia->win->state.no_reopen = EINA_TRUE; + e_win_no_reopen_set(cfd->dia->win, 1); _cfdata = cfdata; return cfdata; } @@ -124,7 +124,7 @@ _basic_create(E_Config_Dialog *cfd __UNUSED__, Evas *evas, E_Config_Dialog_Data ol = e_widget_list_add(evas, 0, 0); - zone = cfdata->cfd->dia->win->client ? cfdata->cfd->dia->win->client->zone : e_zone_current_get(cfdata->cfd->comp); + zone = e_comp_object_util_zone_get(cfdata->cfd->dia->win); snprintf(buf, sizeof(buf), _("Configured Shelves: Display %d"), zone->num); of = e_widget_framelist_add(evas, buf, 0); cfdata->o_list = e_widget_ilist_add(evas, 24, 24, &(cfdata->cur_shelf)); @@ -211,10 +211,10 @@ _ilist_empty(E_Config_Dialog_Data *cfdata) E_Desk *desk; E_Zone *zone; - if ((!cfdata) || (!cfdata->cfd) || (!cfdata->cfd->comp) || (!cfdata->cfd->comp->man)) return; - zone = cfdata->cfd->dia->win->client ? cfdata->cfd->dia->win->client->zone : e_zone_current_get(cfdata->cfd->comp); + if ((!cfdata) || (!cfdata->cfd)) return; + zone = e_comp_object_util_zone_get(cfdata->cfd->dia->win); if (!zone) return; - desk = cfdata->cfd->dia->win->client ? cfdata->cfd->dia->win->client->desk : e_desk_current_get(zone); + desk = e_desk_current_get(zone); EINA_LIST_FOREACH(e_shelf_list(), l, es) { if (es->zone != zone) continue; @@ -264,7 +264,7 @@ _ilist_fill(E_Config_Dialog_Data *cfdata) e_widget_ilist_freeze(cfdata->o_list); e_widget_ilist_clear(cfdata->o_list); e_widget_ilist_go(cfdata->o_list); - zone = cfdata->cfd->dia->win->client ? cfdata->cfd->dia->win->client->zone : e_zone_current_get(cfdata->cfd->comp); + zone = e_comp_object_util_zone_get(cfdata->cfd->dia->win); desk = e_desk_current_get(zone); EINA_LIST_FOREACH(e_shelf_list(), l, es) @@ -345,7 +345,7 @@ _cb_add(void *data, void *data2 __UNUSED__) cfdata = data; if (!cfdata) return; - zone = cfdata->cfd->dia->win->client ? cfdata->cfd->dia->win->client->zone : e_zone_current_get(cfdata->cfd->comp); + zone = e_comp_object_util_zone_get(cfdata->cfd->dia->win); cfdata->dia_new_shelf = e_shelf_new_dialog(zone); e_object_data_set(E_OBJECT(cfdata->dia_new_shelf), cfdata); e_object_del_attach_func_set(E_OBJECT(cfdata->dia_new_shelf), _new_shelf_cb_close); diff --git a/src/modules/conf_shelves/e_int_config_shelf.h b/src/modules/conf_shelves/e_int_config_shelf.h index ff2e03230c..5ac7a3fcba 100644 --- a/src/modules/conf_shelves/e_int_config_shelf.h +++ b/src/modules/conf_shelves/e_int_config_shelf.h @@ -3,7 +3,7 @@ #ifndef E_INT_CONFIG_SHELF_H #define E_INT_CONFIG_SHELF_H -E_Config_Dialog *e_int_config_shelf(E_Comp *comp, const char *params __UNUSED__); +E_Config_Dialog *e_int_config_shelf(Evas_Object *parent, const char *params __UNUSED__); #endif #endif diff --git a/src/modules/conf_shelves/e_mod_main.c b/src/modules/conf_shelves/e_mod_main.c index 21b7e7cfd4..7f794127f8 100644 --- a/src/modules/conf_shelves/e_mod_main.c +++ b/src/modules/conf_shelves/e_mod_main.c @@ -61,9 +61,9 @@ e_modapi_save(E_Module *m __UNUSED__) /* menu item callback(s) */ static void -_e_mod_run_cb(void *data __UNUSED__, E_Menu *m, E_Menu_Item *mi __UNUSED__) +_e_mod_run_cb(void *data __UNUSED__, E_Menu *m EINA_UNUSED, E_Menu_Item *mi __UNUSED__) { - e_configure_registry_call("extensions/shelves", m->zone->comp, NULL); + e_configure_registry_call("extensions/shelves", NULL, NULL); } /* menu item add hook */ diff --git a/src/modules/conf_shelves/e_mod_main.h b/src/modules/conf_shelves/e_mod_main.h index 0b10cb4c45..5058fd6648 100644 --- a/src/modules/conf_shelves/e_mod_main.h +++ b/src/modules/conf_shelves/e_mod_main.h @@ -1,7 +1,7 @@ #ifndef E_MOD_MAIN_H #define E_MOD_MAIN_H -E_Config_Dialog *e_int_config_shelf(E_Comp *comp, const char *params __UNUSED__); +E_Config_Dialog *e_int_config_shelf(Evas_Object *parent, const char *params __UNUSED__); /** * @addtogroup Optional_Conf diff --git a/src/modules/conf_theme/e_int_config_borders.c b/src/modules/conf_theme/e_int_config_borders.c index 564e4bdb8c..f26c4f5202 100644 --- a/src/modules/conf_theme/e_int_config_borders.c +++ b/src/modules/conf_theme/e_int_config_borders.c @@ -19,7 +19,7 @@ struct _E_Config_Dialog_Data }; E_Config_Dialog * -e_int_config_borders(E_Comp *comp, const char *params __UNUSED__) +e_int_config_borders(Evas_Object *parent EINA_UNUSED, const char *params __UNUSED__) { E_Config_Dialog *cfd; E_Config_Dialog_View *v; @@ -27,9 +27,9 @@ e_int_config_borders(E_Comp *comp, const char *params __UNUSED__) if (e_config_dialog_find("E", "appearance/borders")) return NULL; v = _config_view_new(); if (!v) return NULL; - cfd = e_config_dialog_new(comp, _("Default Border Style"), + cfd = e_config_dialog_new(NULL, _("Default Border Style"), "E", "appearance/borders", - "preferences-system-windows", 0, v, comp); + "preferences-system-windows", 0, v, NULL); return cfd; } @@ -46,7 +46,7 @@ e_int_config_borders_border(E_Comp *comp __UNUSED__, const char *params) if (!ec) return NULL; v = _config_view_new(); if (!v) return NULL; - cfd = e_config_dialog_new(ec->zone->comp, + cfd = e_config_dialog_new(NULL, _("Window Border Selection"), "E", "_config_border_border_style_dialog", "preferences-system-windows", 0, v, ec); @@ -78,8 +78,8 @@ _create_data(E_Config_Dialog *cfd) cfdata = E_NEW(E_Config_Dialog_Data, 1); cfdata->comp = NULL; cfdata->client = NULL; - if (E_OBJECT(cfd->data)->type == E_COMP_TYPE) - cfdata->comp = cfd->data; + if (!cfd->data) + cfdata->comp = e_comp_get(NULL); else cfdata->client = cfd->data; diff --git a/src/modules/conf_theme/e_int_config_color_classes.c b/src/modules/conf_theme/e_int_config_color_classes.c index c4b2715faa..c1fc515b20 100644 --- a/src/modules/conf_theme/e_int_config_color_classes.c +++ b/src/modules/conf_theme/e_int_config_color_classes.c @@ -146,7 +146,7 @@ static Eina_Bool _fill_data_delayed(void *data); static Eina_Bool _color_changed_delay(void *data); E_Config_Dialog * -e_int_config_color_classes(E_Comp *comp, const char *params __UNUSED__) +e_int_config_color_classes(Evas_Object *parent EINA_UNUSED, const char *params __UNUSED__) { E_Config_Dialog *cfd; E_Config_Dialog_View *v; @@ -160,7 +160,7 @@ e_int_config_color_classes(E_Comp *comp, const char *params __UNUSED__) v->basic.apply_cfdata = _basic_apply_data; v->basic.create_widgets = _basic_create_widgets; - cfd = e_config_dialog_new(comp, _("Colors"), "E", "appearance/colors", + cfd = e_config_dialog_new(NULL, _("Colors"), "E", "appearance/colors", "preferences-desktop-color", 0, v, NULL); return cfd; } @@ -611,7 +611,7 @@ _basic_create_widgets(E_Config_Dialog *cfd, Evas *evas, E_Config_Dialog_Data *cf e_widget_list_object_append(ol, cfdata->gui.frame, 1, 0, 0.0); e_util_win_auto_resize_fill(cfd->dia->win); - e_win_centered_set(cfd->dia->win, 1); + elm_win_center(cfd->dia->win, 1, 1); cfdata->delay_load_timer = ecore_timer_add(0.15, _fill_data_delayed, cfdata); diff --git a/src/modules/conf_theme/e_int_config_fonts.c b/src/modules/conf_theme/e_int_config_fonts.c index d690b705e7..5668483193 100644 --- a/src/modules/conf_theme/e_int_config_fonts.c +++ b/src/modules/conf_theme/e_int_config_fonts.c @@ -149,7 +149,7 @@ struct _E_Config_Dialog_Data }; E_Config_Dialog * -e_int_config_fonts(E_Comp *comp, const char *params __UNUSED__) +e_int_config_fonts(Evas_Object *parent EINA_UNUSED, const char *params __UNUSED__) { E_Config_Dialog *cfd; E_Config_Dialog_View *v; @@ -164,7 +164,7 @@ e_int_config_fonts(E_Comp *comp, const char *params __UNUSED__) v->advanced.create_widgets = _advanced_create_widgets; v->advanced.apply_cfdata = _advanced_apply_data; - cfd = e_config_dialog_new(comp, _("Font Settings"), + cfd = e_config_dialog_new(NULL, _("Font Settings"), "E", "appearance/fonts", "preferences-desktop-font", 0, v, NULL); return cfd; @@ -609,7 +609,13 @@ _advanced_apply_data(E_Config_Dialog *cfd __UNUSED__, E_Config_Dialog_Data *cfda /* Apply Hinting */ e_config->font_hinting = cfdata->hinting; e_config_save_queue(); - e_canvas_rehint(); + /* e font hinting is different */ + if (e_config->font_hinting == 0) + elm_config_font_hint_type_set(EVAS_FONT_HINTING_BYTECODE); + else if (e_config->font_hinting == 1) + elm_config_font_hint_type_set(EVAS_FONT_HINTING_AUTO); + else if (e_config->font_hinting == 2) + elm_config_font_hint_type_set(EVAS_FONT_HINTING_NONE); #ifndef HAVE_WAYLAND_ONLY e_xsettings_config_update(); diff --git a/src/modules/conf_theme/e_int_config_scale.c b/src/modules/conf_theme/e_int_config_scale.c index 57e0a45bff..3f5699c061 100644 --- a/src/modules/conf_theme/e_int_config_scale.c +++ b/src/modules/conf_theme/e_int_config_scale.c @@ -161,7 +161,7 @@ _scale_preview_new(E_Config_Dialog_Data *cfdata, Evas *e, double sc, double *scp } E_Config_Dialog * -e_int_config_scale(E_Comp *comp, const char *params __UNUSED__) +e_int_config_scale(Evas_Object *parent EINA_UNUSED, const char *params __UNUSED__) { E_Config_Dialog *cfd; E_Config_Dialog_View *v; @@ -177,7 +177,7 @@ e_int_config_scale(E_Comp *comp, const char *params __UNUSED__) v->advanced.apply_cfdata = _adv_apply; v->advanced.check_changed = _adv_changed; - cfd = e_config_dialog_new(comp, _("Scale Settings"), "E", "appearance/scale", + cfd = e_config_dialog_new(NULL, _("Scale Settings"), "E", "appearance/scale", "preferences-scale", 0, v, NULL); e_config_dialog_changed_auto_set(cfd, 1); return cfd; @@ -277,8 +277,8 @@ _basic_apply(E_Config_Dialog *cfd __UNUSED__, E_Config_Dialog_Data *cfdata) e_config->scale.min, e_config->scale.max, e_config->scale.factor, e_config->scale.base_dpi); - cfd->dia->win->client->internal_no_reopen = 1; - e_remember_update(cfd->dia->win->client); + e_win_no_reopen_set(cfd->dia->win, 1); + e_remember_update(e_win_client_get(cfd->dia->win)); e_config_save_queue(); a = e_action_find("restart"); @@ -372,8 +372,8 @@ _adv_apply(E_Config_Dialog *cfd, E_Config_Dialog_Data *cfdata) e_config->scale.factor = cfdata->factor; e_config->scale.base_dpi = cfdata->base_dpi; - cfd->dia->win->client->internal_no_reopen = 1; - e_remember_update(cfd->dia->win->client); + e_win_no_reopen_set(cfd->dia->win, 1); + e_remember_update(e_win_client_get(cfd->dia->win)); e_config_save_queue(); a = e_action_find("restart"); diff --git a/src/modules/conf_theme/e_int_config_theme.c b/src/modules/conf_theme/e_int_config_theme.c index 6d4bde5b67..cb4028eced 100644 --- a/src/modules/conf_theme/e_int_config_theme.c +++ b/src/modules/conf_theme/e_int_config_theme.c @@ -27,7 +27,7 @@ struct _E_Config_Dialog_Data Eina_Bool free : 1; /* Dialog */ - E_Win *win_import; + Evas_Object *win_import; }; static void @@ -294,7 +294,7 @@ _e_int_theme_preview_set(Evas_Object *preview, const char *file) } E_Config_Dialog * -e_int_config_theme(E_Comp *comp, const char *params __UNUSED__) +e_int_config_theme(Evas_Object *parent EINA_UNUSED, const char *params __UNUSED__) { E_Config_Dialog *cfd; E_Config_Dialog_View *v; @@ -307,7 +307,7 @@ e_int_config_theme(E_Comp *comp, const char *params __UNUSED__) v->basic.apply_cfdata = _basic_apply_data; v->basic.create_widgets = _basic_create_widgets; v->override_auto_apply = 1; - cfd = e_config_dialog_new(comp, + cfd = e_config_dialog_new(NULL, _("Theme Selector"), "E", "appearance/theme", "preferences-desktop-theme", 0, v, NULL); @@ -509,7 +509,7 @@ _cb_import(void *data1, void *data2 __UNUSED__) cfdata = data1; if (cfdata->win_import) - e_win_raise(cfdata->win_import); + elm_win_raise(cfdata->win_import); else cfdata->win_import = e_int_config_theme_import(cfdata->cfd); } @@ -633,7 +633,7 @@ _free_data(E_Config_Dialog *cfd __UNUSED__, E_Config_Dialog_Data *cfdata) Eio_File *ls; Eet_File *ef; - E_FREE_FUNC(cfdata->win_import, e_object_del); + E_FREE_FUNC(cfdata->win_import, evas_object_del); if (cfdata->eio[0]) eio_file_cancel(cfdata->eio[0]); if (cfdata->eio[1]) eio_file_cancel(cfdata->eio[1]); EINA_LIST_FOREACH(cfdata->theme_init, l, ls) @@ -647,14 +647,14 @@ _free_data(E_Config_Dialog *cfd __UNUSED__, E_Config_Dialog_Data *cfdata) } static Evas_Object * -_basic_create_widgets(E_Config_Dialog *cfd, Evas *evas, E_Config_Dialog_Data *cfdata) +_basic_create_widgets(E_Config_Dialog *cfd EINA_UNUSED, Evas *evas, E_Config_Dialog_Data *cfdata) { Evas_Object *o, *ot, *of, *il, *ol; E_Zone *z; E_Radio_Group *rg; char path[PATH_MAX]; - z = e_zone_current_get(cfd->comp); + z = e_zone_current_get(e_comp_get(NULL)); ot = e_widget_table_add(evas, 0); ol = e_widget_table_add(evas, 0); diff --git a/src/modules/conf_theme/e_int_config_theme_import.c b/src/modules/conf_theme/e_int_config_theme_import.c index 42b0fad3b2..4da72b3ed3 100644 --- a/src/modules/conf_theme/e_int_config_theme_import.c +++ b/src/modules/conf_theme/e_int_config_theme_import.c @@ -17,7 +17,7 @@ struct _Import Evas_Object *ok_obj; Evas_Object *cancel_obj; - E_Win *win; + Evas_Object *win; }; struct _E_Config_Dialog_Data @@ -25,8 +25,7 @@ struct _E_Config_Dialog_Data char *file; }; -static void _theme_import_cb_delete(E_Win *win); -static void _theme_import_cb_resize(E_Win *win); +static void _theme_import_cb_delete(void *data, Evas *e, Evas_Object *obj, void *event_info); static void _theme_import_cb_wid_focus(void *data, Evas_Object *obj); static void _theme_import_cb_selected(void *data, Evas_Object *obj); static void _theme_import_cb_changed(void *data, Evas_Object *obj); @@ -34,11 +33,11 @@ static void _theme_import_cb_ok(void *data, void *data2); static void _theme_import_cb_close(void *data, void *data2); static void _theme_import_cb_key_down(void *data, Evas *e, Evas_Object *obj, void *event); -E_Win * +Evas_Object * e_int_config_theme_import(E_Config_Dialog *parent) { Evas *evas; - E_Win *win; + Evas_Object *win; Evas_Object *o, *ofm; Import *import; E_Config_Dialog_Data *cfdata; @@ -49,30 +48,28 @@ e_int_config_theme_import(E_Config_Dialog *parent) import = E_NEW(Import, 1); if (!import) return NULL; - win = e_win_new(parent->comp); + win = elm_win_add(parent->parent, "E", ELM_WIN_DIALOG_BASIC); if (!win) { E_FREE(import); return NULL; } - evas = e_win_evas_get(win); + evas = evas_object_evas_get(win); cfdata = E_NEW(E_Config_Dialog_Data, 1); import->cfdata = cfdata; import->win = win; import->parent = parent; - e_win_title_set(win, _("Select a Theme...")); - e_win_delete_callback_set(win, _theme_import_cb_delete); - e_win_resize_callback_set(win, _theme_import_cb_resize); - e_win_dialog_set(win, 1); - e_win_name_class_set(win, "E", "_theme_import_dialog"); + elm_win_title_set(win, _("Select a Theme...")); + evas_object_event_callback_add(win, EVAS_CALLBACK_DEL, _theme_import_cb_delete, NULL); + ecore_evas_name_class_set(ecore_evas_ecore_evas_get(evas_object_evas_get(win)), "E", "_theme_import_dialog"); o = edje_object_add(evas); import->bg_obj = o; e_theme_edje_object_set(o, "base/theme/dialog", "e/widgets/dialog/main"); - evas_object_move(o, 0, 0); + elm_win_resize_object_add(win, o); evas_object_show(o); o = e_widget_list_add(evas, 1, 1); @@ -127,7 +124,7 @@ e_int_config_theme_import(E_Config_Dialog *parent) e_widget_disabled_set(import->ok_obj, 1); - e_win_centered_set(win, 1); + elm_win_center(win, 1, 1); o = import->box_obj; e_widget_size_min_get(o, &w, &h); @@ -136,25 +133,26 @@ e_int_config_theme_import(E_Config_Dialog *parent) edje_object_size_min_calc(import->bg_obj, &w, &h); evas_object_resize(import->bg_obj, w, h); - e_win_resize(win, w, h); - e_win_size_min_set(win, w, h); - e_win_size_max_set(win, 99999, 99999); - e_win_show(win); + evas_object_resize(win, w, h); + evas_object_size_hint_min_set(win, w, h); + evas_object_size_hint_max_set(win, 99999, 99999); + evas_object_show(win); e_win_client_icon_set(win, "preferences-desktop-theme"); - win->data = import; + evas_object_data_set(win, "import_win", import); return win; } static void -_theme_import_cb_delete(E_Win *win) +_theme_import_cb_delete(void *data EINA_UNUSED, Evas *e EINA_UNUSED, Evas_Object *obj, void *event_info EINA_UNUSED) { Import *import; - import = win->data; + import = evas_object_data_del(obj, "import_win"); + if (!import) return; - e_object_del(E_OBJECT(import->win)); + evas_object_del(import->win); e_int_config_theme_import_done(import->parent); E_FREE(import->cfdata->file); @@ -164,16 +162,6 @@ _theme_import_cb_delete(E_Win *win) } static void -_theme_import_cb_resize(E_Win *win) -{ - Import *import; - - import = win->data; - if (!import) return; - evas_object_resize(import->bg_obj, win->w, win->h); -} - -static void _theme_import_cb_wid_focus(void *data, Evas_Object *obj) { Import *import; @@ -239,13 +227,13 @@ static void _theme_import_cb_ok(void *data, void *data2 __UNUSED__) { Import *import; - E_Win *win; + Evas_Object *win; const char *path; const char *file; char buf[PATH_MAX]; win = data; - import = win->data; + import = evas_object_data_get(win, "import_win"); if (!import) return; path = e_widget_fsel_selection_path_get(import->fsel_obj); @@ -292,13 +280,13 @@ _theme_import_cb_ok(void *data, void *data2 __UNUSED__) } } - e_object_del(E_OBJECT(import->win)); + evas_object_del(import->win); } static void _theme_import_cb_close(void *data, void *data2 __UNUSED__) { - e_object_del(data); + evas_object_del(data); } static void @@ -311,7 +299,7 @@ _theme_import_cb_key_down(void *data, Evas *e __UNUSED__, Evas_Object *obj __UNU import = data; if ((!e_widget_fsel_typebuf_visible_get(import->fsel_obj)) && (!strcmp(ev->key, "Tab"))) { - if (evas_key_modifier_is_set(evas_key_modifier_get(e_win_evas_get(import->win)), "Shift")) + if (evas_key_modifier_is_set(evas_key_modifier_get(evas_object_evas_get(import->win)), "Shift")) { if (e_widget_focus_get(import->box_obj)) { diff --git a/src/modules/conf_theme/e_int_config_transitions.c b/src/modules/conf_theme/e_int_config_transitions.c index c49dfbdb9c..d14901b155 100644 --- a/src/modules/conf_theme/e_int_config_transitions.c +++ b/src/modules/conf_theme/e_int_config_transitions.c @@ -28,7 +28,7 @@ struct _E_Config_Dialog_Data }; E_Config_Dialog * -e_int_config_transitions(E_Comp *comp, const char *params __UNUSED__) +e_int_config_transitions(Evas_Object *parent EINA_UNUSED, const char *params __UNUSED__) { E_Config_Dialog *cfd; E_Config_Dialog_View *v; @@ -43,7 +43,7 @@ e_int_config_transitions(E_Comp *comp, const char *params __UNUSED__) v->basic.create_widgets = _basic_create_widgets; v->basic.check_changed = _basic_check_changed; - cfd = e_config_dialog_new(comp, _("Transition Settings"), + cfd = e_config_dialog_new(NULL, _("Transition Settings"), "E", "appearance/transitions", "preferences-transitions", 0, v, NULL); return cfd; @@ -159,14 +159,14 @@ _basic_apply_data(E_Config_Dialog *cfd __UNUSED__, E_Config_Dialog_Data *cfdata) } static Evas_Object * -_basic_create_widgets(E_Config_Dialog *cfd, Evas *evas, E_Config_Dialog_Data *cfdata) +_basic_create_widgets(E_Config_Dialog *cfd EINA_UNUSED, Evas *evas, E_Config_Dialog_Data *cfdata) { E_Zone *zone; Evas_Object *o, *of, *il; Eina_List *l; char *t; - zone = e_zone_current_get(cfd->comp); + zone = e_zone_current_get(e_comp_get(NULL)); o = e_widget_table_add(evas, 0); diff --git a/src/modules/conf_theme/e_int_config_wallpaper.c b/src/modules/conf_theme/e_int_config_wallpaper.c index 33d33ab18f..2967b1a545 100644 --- a/src/modules/conf_theme/e_int_config_wallpaper.c +++ b/src/modules/conf_theme/e_int_config_wallpaper.c @@ -9,7 +9,7 @@ static Evas_Object *_basic_create(E_Config_Dialog *cfd, Evas *evas, E_Config static int _adv_apply(E_Config_Dialog *cfd, E_Config_Dialog_Data *cfdata); static Evas_Object *_adv_create(E_Config_Dialog *cfd, Evas *evas, E_Config_Dialog_Data *cfdata); -static E_Config_Dialog *_e_int_config_wallpaper_desk(E_Comp *comp, int man_num, int zone_num, int desk_x, int desk_y); +static E_Config_Dialog *_e_int_config_wallpaper_desk(Evas_Object *parent EINA_UNUSED, int man_num, int zone_num, int desk_x, int desk_y); static void _cb_button_up(void *data1, void *data2); static void _cb_files_changed(void *data, Evas_Object *obj, void *event_info); @@ -52,13 +52,13 @@ struct _E_Config_Dialog_Data }; E_Config_Dialog * -e_int_config_wallpaper(E_Comp *comp, const char *params __UNUSED__) +e_int_config_wallpaper(Evas_Object *parent EINA_UNUSED, const char *params __UNUSED__) { - return _e_int_config_wallpaper_desk(comp, -1, -1, -1, -1); + return _e_int_config_wallpaper_desk(NULL, -1, -1, -1, -1); } E_Config_Dialog * -e_int_config_wallpaper_desk(E_Comp *comp, const char *params) +e_int_config_wallpaper_desk(Evas_Object *parent EINA_UNUSED, const char *params) { int man_num, zone_num, desk_x, desk_y; @@ -66,11 +66,11 @@ e_int_config_wallpaper_desk(E_Comp *comp, const char *params) man_num = zone_num = desk_x = desk_y = -1; if (sscanf(params, "%i %i %i %i", &man_num, &zone_num, &desk_x, &desk_y) != 4) return NULL; - return _e_int_config_wallpaper_desk(comp, man_num, zone_num, desk_x, desk_y); + return _e_int_config_wallpaper_desk(NULL, man_num, zone_num, desk_x, desk_y); } static E_Config_Dialog * -_e_int_config_wallpaper_desk(E_Comp *comp, int man_num, int zone_num, int desk_x, int desk_y) +_e_int_config_wallpaper_desk(Evas_Object *parent EINA_UNUSED, int man_num, int zone_num, int desk_x, int desk_y) { E_Config_Dialog *cfd; E_Config_Dialog_View *v; @@ -100,7 +100,7 @@ _e_int_config_wallpaper_desk(E_Comp *comp, int man_num, int zone_num, int desk_x cw->desk_x = desk_x; cw->desk_y = desk_y; - cfd = e_config_dialog_new(comp, _("Wallpaper Settings"), "E", + cfd = e_config_dialog_new(NULL, _("Wallpaper Settings"), "E", "appearance/wallpaper", "preferences-desktop-wallpaper", 0, v, cw); return cfd; @@ -314,10 +314,10 @@ _cb_import(void *data1, void *data2 __UNUSED__) cfdata = data1; if (cfdata->win_import) { - e_win_raise(cfdata->win_import->dia->win); + elm_win_raise(cfdata->win_import->dia->win); return; } - cfdata->win_import = e_import_dialog_show(cfdata->cfd->dia->win->comp, NULL, NULL, (Ecore_End_Cb)_cb_import_ok, NULL); + cfdata->win_import = e_import_dialog_show(NULL, NULL, NULL, (Ecore_End_Cb)_cb_import_ok, NULL); e_object_data_set(E_OBJECT(cfdata->win_import), cfdata); e_object_del_attach_func_set(E_OBJECT(cfdata->win_import), _cb_import_del); } @@ -401,7 +401,7 @@ _free_data(E_Config_Dialog *cfd, E_Config_Dialog_Data *cfdata) } static Evas_Object * -_basic_create(E_Config_Dialog *cfd, Evas *evas, E_Config_Dialog_Data *cfdata) +_basic_create(E_Config_Dialog *cfd EINA_UNUSED, Evas *evas, E_Config_Dialog_Data *cfdata) { Evas_Object *o, *rt, *ot, *oa; Evas_Object *ow; @@ -411,7 +411,7 @@ _basic_create(E_Config_Dialog *cfd, Evas *evas, E_Config_Dialog_Data *cfdata) int mw, mh; - zone = e_zone_current_get(cfd->comp); + zone = e_zone_current_get(e_comp_get(NULL)); o = e_widget_list_add(evas, 0, 1); rg = e_widget_radio_group_new(&(cfdata->fmdir)); @@ -518,8 +518,7 @@ _basic_apply(E_Config_Dialog *cfd, E_Config_Dialog_Data *cfdata) cw = cfd->data; if (!eina_str_has_extension(cfdata->bg, ".edj")) { - cfdata->import = e_import_config_dialog_show(NULL, cfdata->bg, (Ecore_End_Cb)_apply_import_ok, NULL); - e_dialog_parent_set(cfdata->import->dia, cfd->dia->win); + cfdata->import = e_import_config_dialog_show(cfd->dia->win, cfdata->bg, (Ecore_End_Cb)_apply_import_ok, NULL); e_object_del_attach_func_set(E_OBJECT(cfdata->import), _apply_import_del); e_object_data_set(E_OBJECT(cfdata->import), cfd); e_object_ref(E_OBJECT(cfd)); @@ -555,7 +554,7 @@ _basic_apply(E_Config_Dialog *cfd, E_Config_Dialog_Data *cfdata) } static Evas_Object * -_adv_create(E_Config_Dialog *cfd, Evas *evas, E_Config_Dialog_Data *cfdata) +_adv_create(E_Config_Dialog *cfd EINA_UNUSED, Evas *evas, E_Config_Dialog_Data *cfdata) { Evas_Object *o, *rt, *ot, *oa; Evas_Object *ow, *of; @@ -565,7 +564,7 @@ _adv_create(E_Config_Dialog *cfd, Evas *evas, E_Config_Dialog_Data *cfdata) int mw, mh; - zone = e_zone_current_get(cfd->comp); + zone = e_zone_current_get(e_comp_get(NULL)); o = e_widget_list_add(evas, 0, 1); rg = e_widget_radio_group_new(&(cfdata->fmdir)); @@ -654,7 +653,7 @@ _adv_apply(E_Config_Dialog *cfd __UNUSED__, E_Config_Dialog_Data *cfdata) E_Zone *z; E_Desk *d; - if (!(z = e_zone_current_get(cfdata->cfd->comp))) return 0; + if (!(z = e_zone_current_get(e_comp_get(NULL)))) return 0; if (!(d = e_desk_current_get(z))) return 0; if (cfdata->use_theme_bg) { diff --git a/src/modules/conf_theme/e_int_config_xsettings.c b/src/modules/conf_theme/e_int_config_xsettings.c index 4737e6336d..af63149f3d 100644 --- a/src/modules/conf_theme/e_int_config_xsettings.c +++ b/src/modules/conf_theme/e_int_config_xsettings.c @@ -44,7 +44,7 @@ static const char *_icon_previews[4] = #define PREVIEW_SIZE (48) E_Config_Dialog * -e_int_config_xsettings(E_Comp *comp, const char *params __UNUSED__) +e_int_config_xsettings(Evas_Object *parent EINA_UNUSED, const char *params __UNUSED__) { E_Config_Dialog *cfd; E_Config_Dialog_View *v; @@ -58,7 +58,7 @@ e_int_config_xsettings(E_Comp *comp, const char *params __UNUSED__) v->basic.apply_cfdata = _basic_apply; v->basic.check_changed = _basic_check_changed; - cfd = e_config_dialog_new(comp, _("Application Theme Settings"), + cfd = e_config_dialog_new(NULL, _("Application Theme Settings"), "E", "appearance/xsettings", "preferences-desktop-theme", 0, v, NULL); return cfd; diff --git a/src/modules/conf_theme/e_mod_main.c b/src/modules/conf_theme/e_mod_main.c index 5b24e09352..d36f20efa3 100644 --- a/src/modules/conf_theme/e_mod_main.c +++ b/src/modules/conf_theme/e_mod_main.c @@ -14,9 +14,9 @@ EAPI E_Module_Api e_modapi = /* menu item add hook */ static void -_e_mod_run_wallpaper_cb(void *data __UNUSED__, E_Menu *m, E_Menu_Item *mi __UNUSED__) +_e_mod_run_wallpaper_cb(void *data __UNUSED__, E_Menu *m EINA_UNUSED, E_Menu_Item *mi __UNUSED__) { - e_configure_registry_call("appearance/wallpaper", m->zone->comp, NULL); + e_configure_registry_call("appearance/wallpaper", NULL, NULL); } static void @@ -31,9 +31,9 @@ _e_mod_menu_wallpaper_add(void *data __UNUSED__, E_Menu *m) } static void -_e_mod_run_theme_cb(void *data __UNUSED__, E_Menu *m, E_Menu_Item *mi __UNUSED__) +_e_mod_run_theme_cb(void *data __UNUSED__, E_Menu *m EINA_UNUSED, E_Menu_Item *mi __UNUSED__) { - e_configure_registry_call("appearance/theme", m->zone->comp, NULL); + e_configure_registry_call("appearance/theme", NULL, NULL); } static void diff --git a/src/modules/conf_theme/e_mod_main.h b/src/modules/conf_theme/e_mod_main.h index 8f9cdcfe5e..4ffd8402a6 100644 --- a/src/modules/conf_theme/e_mod_main.h +++ b/src/modules/conf_theme/e_mod_main.h @@ -3,7 +3,7 @@ typedef struct _E_Config_Wallpaper E_Config_Wallpaper; -E_Config_Dialog *e_int_config_xsettings(E_Comp *comp, const char *params __UNUSED__); +E_Config_Dialog *e_int_config_xsettings(Evas_Object *parent, const char *params __UNUSED__); /** * @addtogroup Optional_Conf @@ -16,26 +16,26 @@ E_Config_Dialog *e_int_config_xsettings(E_Comp *comp, const char *params __UNUSE * @} */ -E_Config_Dialog *e_int_config_borders(E_Comp *comp, const char *params __UNUSED__); -E_Config_Dialog *e_int_config_borders_border(E_Comp *comp, const char *params); +E_Config_Dialog *e_int_config_borders(Evas_Object *parent, const char *params __UNUSED__); +E_Config_Dialog *e_int_config_borders_border(Evas_Object *parent, const char *params); -E_Config_Dialog *e_int_config_color_classes(E_Comp *comp, const char *params __UNUSED__); +E_Config_Dialog *e_int_config_color_classes(Evas_Object *parent, const char *params __UNUSED__); -E_Config_Dialog *e_int_config_fonts(E_Comp *comp, const char *params __UNUSED__); +E_Config_Dialog *e_int_config_fonts(Evas_Object *parent, const char *params __UNUSED__); -E_Config_Dialog *e_int_config_scale(E_Comp *comp, const char *params __UNUSED__); +E_Config_Dialog *e_int_config_scale(Evas_Object *parent, const char *params __UNUSED__); -E_Config_Dialog *e_int_config_theme(E_Comp *comp, const char *params __UNUSED__); +E_Config_Dialog *e_int_config_theme(Evas_Object *parent, const char *params __UNUSED__); void e_int_config_theme_import_done(E_Config_Dialog *dia); void e_int_config_theme_update(E_Config_Dialog *dia, char *file); -E_Win *e_int_config_theme_import (E_Config_Dialog *parent); +Evas_Object *e_int_config_theme_import(E_Config_Dialog *parent); -E_Config_Dialog *e_int_config_transitions(E_Comp *comp, const char *params __UNUSED__); +E_Config_Dialog *e_int_config_transitions(Evas_Object *parent, const char *params __UNUSED__); -E_Config_Dialog *e_int_config_wallpaper(E_Comp *comp, const char *params __UNUSED__); -E_Config_Dialog *e_int_config_wallpaper_desk(E_Comp *comp, const char *params); +E_Config_Dialog *e_int_config_wallpaper(Evas_Object *parent, const char *params __UNUSED__); +E_Config_Dialog *e_int_config_wallpaper_desk(Evas_Object *parent, const char *params); void e_int_config_wallpaper_update(E_Config_Dialog *dia, char *file); void e_int_config_wallpaper_import_done(E_Config_Dialog *dia); diff --git a/src/modules/conf_window_manipulation/e_int_config_clientlist.c b/src/modules/conf_window_manipulation/e_int_config_clientlist.c index 2803c6c574..278ce8152a 100644 --- a/src/modules/conf_window_manipulation/e_int_config_clientlist.c +++ b/src/modules/conf_window_manipulation/e_int_config_clientlist.c @@ -20,7 +20,7 @@ struct _E_Config_Dialog_Data }; E_Config_Dialog * -e_int_config_clientlist(E_Comp *comp, const char *params __UNUSED__) +e_int_config_clientlist(Evas_Object *parent EINA_UNUSED, const char *params __UNUSED__) { E_Config_Dialog *cfd; E_Config_Dialog_View *v; @@ -35,7 +35,7 @@ e_int_config_clientlist(E_Comp *comp, const char *params __UNUSED__) v->basic.create_widgets = _basic_create; v->basic.check_changed = _basic_check_changed; - cfd = e_config_dialog_new(comp, _("Window List Menu Settings"), "E", + cfd = e_config_dialog_new(NULL, _("Window List Menu Settings"), "E", "windows/window_list_menu", "preferences-winlist", 0, v, NULL); return cfd; diff --git a/src/modules/conf_window_manipulation/e_int_config_focus.c b/src/modules/conf_window_manipulation/e_int_config_focus.c index b859e16600..6f5ce548af 100644 --- a/src/modules/conf_window_manipulation/e_int_config_focus.c +++ b/src/modules/conf_window_manipulation/e_int_config_focus.c @@ -36,7 +36,7 @@ struct _E_Config_Dialog_Data /* a nice easy setup function that does the dirty work */ E_Config_Dialog * -e_int_config_focus(E_Comp *comp, const char *params __UNUSED__) +e_int_config_focus(Evas_Object *parent EINA_UNUSED, const char *params __UNUSED__) { E_Config_Dialog *cfd; E_Config_Dialog_View *v; @@ -55,7 +55,7 @@ e_int_config_focus(E_Comp *comp, const char *params __UNUSED__) v->advanced.check_changed = _advanced_check_changed; /* create config diaolg for NULL object/data */ - cfd = e_config_dialog_new(comp, _("Focus Settings"), "E", + cfd = e_config_dialog_new(NULL, _("Focus Settings"), "E", "windows/window_focus", "preferences-focus", 0, v, NULL); return cfd; diff --git a/src/modules/conf_window_manipulation/e_int_config_window_display.c b/src/modules/conf_window_manipulation/e_int_config_window_display.c index b52fccdd7b..52dd823417 100644 --- a/src/modules/conf_window_manipulation/e_int_config_window_display.c +++ b/src/modules/conf_window_manipulation/e_int_config_window_display.c @@ -25,7 +25,7 @@ struct _E_Config_Dialog_Data /* a nice easy setup function that does the dirty work */ E_Config_Dialog * -e_int_config_window_display(E_Comp *comp, const char *params __UNUSED__) +e_int_config_window_display(Evas_Object *parent EINA_UNUSED, const char *params __UNUSED__) { E_Config_Dialog *cfd; E_Config_Dialog_View *v; @@ -41,7 +41,7 @@ e_int_config_window_display(E_Comp *comp, const char *params __UNUSED__) v->basic.check_changed = _basic_check_changed; /* create config diaolg for NULL object/data */ - cfd = e_config_dialog_new(comp, _("Window Display"), + cfd = e_config_dialog_new(NULL, _("Window Display"), "E", "windows/window_display", "preferences-system-windows", 0, v, NULL); return cfd; diff --git a/src/modules/conf_window_manipulation/e_int_config_window_geometry.c b/src/modules/conf_window_manipulation/e_int_config_window_geometry.c index 2251e09ce7..916c5f5af1 100644 --- a/src/modules/conf_window_manipulation/e_int_config_window_geometry.c +++ b/src/modules/conf_window_manipulation/e_int_config_window_geometry.c @@ -45,7 +45,7 @@ struct _E_Config_Dialog_Data }; E_Config_Dialog * -e_int_config_window_geometry(E_Comp *comp, const char *params __UNUSED__) +e_int_config_window_geometry(Evas_Object *parent EINA_UNUSED, const char *params __UNUSED__) { E_Config_Dialog *cfd; E_Config_Dialog_View *v; @@ -61,7 +61,7 @@ e_int_config_window_geometry(E_Comp *comp, const char *params __UNUSED__) v->basic.check_changed = _basic_check_changed; /* create config diaolg for NULL object/data */ - cfd = e_config_dialog_new(comp, _("Window Geometry"), + cfd = e_config_dialog_new(NULL, _("Window Geometry"), "E", "windows/window_geometry", "preferences-window-geometry", 0, v, NULL); return cfd; diff --git a/src/modules/conf_window_manipulation/e_int_config_window_process.c b/src/modules/conf_window_manipulation/e_int_config_window_process.c index ccbbac5480..373bf19555 100644 --- a/src/modules/conf_window_manipulation/e_int_config_window_process.c +++ b/src/modules/conf_window_manipulation/e_int_config_window_process.c @@ -19,7 +19,7 @@ struct _E_Config_Dialog_Data /* a nice easy setup function that does the dirty work */ E_Config_Dialog * -e_int_config_window_process(E_Comp *comp, const char *params __UNUSED__) +e_int_config_window_process(Evas_Object *parent EINA_UNUSED, const char *params __UNUSED__) { E_Config_Dialog *cfd; E_Config_Dialog_View *v; @@ -36,7 +36,7 @@ e_int_config_window_process(E_Comp *comp, const char *params __UNUSED__) v->basic.check_changed = _basic_check_changed; /* create config diaolg for NULL object/data */ - cfd = e_config_dialog_new(comp, _("Window Process Management"), + cfd = e_config_dialog_new(NULL, _("Window Process Management"), "E", "windows/window_process", "preferences-window-process", 0, v, NULL); return cfd; diff --git a/src/modules/conf_window_manipulation/e_mod_main.h b/src/modules/conf_window_manipulation/e_mod_main.h index 3275eb8cef..273d7a787a 100644 --- a/src/modules/conf_window_manipulation/e_mod_main.h +++ b/src/modules/conf_window_manipulation/e_mod_main.h @@ -1,14 +1,14 @@ #ifndef E_MOD_MAIN_H #define E_MOD_MAIN_H -E_Config_Dialog *e_int_config_window_geometry(E_Comp *comp, const char *params __UNUSED__); -E_Config_Dialog *e_int_config_window_process(E_Comp *comp, const char *params __UNUSED__); +E_Config_Dialog *e_int_config_window_geometry(Evas_Object *parent, const char *params __UNUSED__); +E_Config_Dialog *e_int_config_window_process(Evas_Object *parent, const char *params __UNUSED__); -E_Config_Dialog *e_int_config_window_display(E_Comp *comp, const char *params __UNUSED__); +E_Config_Dialog *e_int_config_window_display(Evas_Object *parent, const char *params __UNUSED__); -E_Config_Dialog *e_int_config_focus(E_Comp *comp, const char *params __UNUSED__); +E_Config_Dialog *e_int_config_focus(Evas_Object *parent, const char *params __UNUSED__); -E_Config_Dialog *e_int_config_clientlist(E_Comp *comp, const char *params __UNUSED__); +E_Config_Dialog *e_int_config_clientlist(Evas_Object *parent, const char *params __UNUSED__); /** * @addtogroup Optional_Conf diff --git a/src/modules/conf_window_remembers/e_int_config_remembers.c b/src/modules/conf_window_remembers/e_int_config_remembers.c index a90991a917..dec98c9bec 100644 --- a/src/modules/conf_window_remembers/e_int_config_remembers.c +++ b/src/modules/conf_window_remembers/e_int_config_remembers.c @@ -21,7 +21,7 @@ struct _E_Config_Dialog_Data }; E_Config_Dialog * -e_int_config_remembers(E_Comp *comp, const char *params __UNUSED__) +e_int_config_remembers(Evas_Object *parent EINA_UNUSED, const char *params __UNUSED__) { E_Config_Dialog *cfd; E_Config_Dialog_View *v; @@ -35,7 +35,7 @@ e_int_config_remembers(E_Comp *comp, const char *params __UNUSED__) v->basic.create_widgets = _basic_create; v->basic.check_changed = _basic_check_changed; - cfd = e_config_dialog_new(comp, _("Window Remembers"), "E", + cfd = e_config_dialog_new(NULL, _("Window Remembers"), "E", "windows/window_remembers", "preferences-desktop-window-remember", 0, v, NULL); return cfd; diff --git a/src/modules/conf_window_remembers/e_mod_main.h b/src/modules/conf_window_remembers/e_mod_main.h index 2b9e9e6009..cf3db0d809 100644 --- a/src/modules/conf_window_remembers/e_mod_main.h +++ b/src/modules/conf_window_remembers/e_mod_main.h @@ -1,7 +1,7 @@ #ifndef E_MOD_MAIN_H #define E_MOD_MAIN_H -E_Config_Dialog *e_int_config_remembers(E_Comp *comp, const char *params __UNUSED__); +E_Config_Dialog *e_int_config_remembers(Evas_Object *parent, const char *params __UNUSED__); /** * @addtogroup Optional_Conf * @{ diff --git a/src/modules/connman/agent.c b/src/modules/connman/agent.c index 3c7412617e..42ef206491 100644 --- a/src/modules/connman/agent.c +++ b/src/modules/connman/agent.c @@ -174,7 +174,7 @@ _dialog_field_add(E_Connman_Agent *agent, struct Connman_Field *field) char header[64]; Evas *evas; - evas = agent->dialog->win->evas; + evas = evas_object_evas_get(agent->dialog->win); toolbook = agent->dialog->content_object; mandatory = !strcmp(field->requirement, "mandatory"); @@ -251,7 +251,7 @@ _dialog_new(E_Connman_Agent *agent) e_dialog_button_add(dialog, _("Cancel"), NULL, _dialog_cancel_cb, agent); agent->canceled = EINA_TRUE; /* if win is closed it works like cancel */ - evas = dialog->win->evas; + evas = evas_object_evas_get(dialog->win); toolbook = e_widget_toolbook_add(evas, 48 * e_scale, 48 * e_scale); evas_object_show(toolbook); @@ -272,7 +272,7 @@ _dialog_new(E_Connman_Agent *agent) e_object_data_set(E_OBJECT(dialog), agent); e_dialog_button_focus_num(dialog, 0); - e_win_centered_set(dialog->win, 1); + elm_win_center(dialog->win, 1, 1); return dialog; } diff --git a/src/modules/connman/e_mod_config.c b/src/modules/connman/e_mod_config.c index d97dae9013..78f13c642e 100644 --- a/src/modules/connman/e_mod_config.c +++ b/src/modules/connman/e_mod_config.c @@ -50,7 +50,7 @@ _create_data(E_Config_Dialog *dialog) } E_Config_Dialog * -e_connman_config_dialog_new(E_Comp *comp, +e_connman_config_dialog_new(Evas_Object *parent, E_Connman_Module_Context *ctxt) { E_Config_Dialog *dialog; @@ -67,8 +67,7 @@ e_connman_config_dialog_new(E_Comp *comp, view->basic.create_widgets = _basic_create; view->basic.apply_cfdata = _basic_apply; - dialog = e_config_dialog_new - (comp, _("Connection Manager"), + dialog = e_config_dialog_new(NULL, _("Connection Manager"), _e_connman_Name, "e_connman_config_dialog_new", e_connman_theme_path(), 0, view, ctxt); diff --git a/src/modules/connman/e_mod_main.c b/src/modules/connman/e_mod_main.c index ff10e7ade4..c893e638fd 100644 --- a/src/modules/connman/e_mod_main.c +++ b/src/modules/connman/e_mod_main.c @@ -578,7 +578,7 @@ static const E_Gadcon_Client_Class _gc_class = EAPI E_Module_Api e_modapi = { E_MODULE_API_VERSION, _e_connman_Name }; static E_Config_Dialog * -_econnman_config(E_Comp *comp, const char *params EINA_UNUSED) +_econnman_config(Evas_Object *parent, const char *params EINA_UNUSED) { E_Connman_Module_Context *ctxt; @@ -590,7 +590,7 @@ _econnman_config(E_Comp *comp, const char *params EINA_UNUSED) return NULL; if (!ctxt->conf_dialog) - ctxt->conf_dialog = e_connman_config_dialog_new(comp, ctxt); + ctxt->conf_dialog = e_connman_config_dialog_new(NULL, ctxt); return ctxt->conf_dialog; } diff --git a/src/modules/connman/e_mod_main.h b/src/modules/connman/e_mod_main.h index 2dee8ed21f..7a59908b07 100644 --- a/src/modules/connman/e_mod_main.h +++ b/src/modules/connman/e_mod_main.h @@ -57,7 +57,7 @@ EAPI int e_modapi_save(E_Module *m); void econnman_popup_del(E_Connman_Instance *inst); const char *e_connman_theme_path(void); -E_Config_Dialog *e_connman_config_dialog_new(E_Comp *comp, +E_Config_Dialog *e_connman_config_dialog_new(Evas_Object *parent, E_Connman_Module_Context *ctxt); E_Connman_Agent *econnman_agent_new(Eldbus_Connection *eldbus_conn) EINA_ARG_NONNULL(1); diff --git a/src/modules/cpufreq/e_mod_config.c b/src/modules/cpufreq/e_mod_config.c index 4564e5b840..f2731b33dd 100644 --- a/src/modules/cpufreq/e_mod_config.c +++ b/src/modules/cpufreq/e_mod_config.c @@ -20,7 +20,7 @@ static int _basic_apply_data(E_Config_Dialog *cfd, E_Config_Dialog_Data static int _basic_check_changed(E_Config_Dialog *cfd, E_Config_Dialog_Data *cfdata); E_Config_Dialog * -e_int_config_cpufreq_module(E_Comp *comp, const char *params __UNUSED__) +e_int_config_cpufreq_module(Evas_Object *parent EINA_UNUSED, const char *params __UNUSED__) { E_Config_Dialog *cfd; E_Config_Dialog_View *v; @@ -35,7 +35,7 @@ e_int_config_cpufreq_module(E_Comp *comp, const char *params __UNUSED__) snprintf(buf, sizeof(buf), "%s/e-module-cpufreq.edj", e_module_dir_get(cpufreq_config->module)); - cfd = e_config_dialog_new(comp, _("Cpu Frequency Control Settings"), + cfd = e_config_dialog_new(NULL, _("Cpu Frequency Control Settings"), "E", "_e_mod_cpufreq_config_dialog", buf, 0, v, NULL); cpufreq_config->config_dialog = cfd; diff --git a/src/modules/cpufreq/e_mod_main.c b/src/modules/cpufreq/e_mod_main.c index 46c4d9c50c..7ffdcbea1a 100644 --- a/src/modules/cpufreq/e_mod_main.c +++ b/src/modules/cpufreq/e_mod_main.c @@ -160,11 +160,11 @@ _gc_id_new(const E_Gadcon_Client_Class *client_class __UNUSED__) } static void -_cpufreq_cb_menu_configure(void *data __UNUSED__, E_Menu *m, E_Menu_Item *mi __UNUSED__) +_cpufreq_cb_menu_configure(void *data __UNUSED__, E_Menu *m EINA_UNUSED, E_Menu_Item *mi __UNUSED__) { if (!cpufreq_config) return; if (cpufreq_config->config_dialog) return; - e_int_config_cpufreq_module(m->zone->comp, NULL); + e_int_config_cpufreq_module(NULL, NULL); } static void @@ -507,7 +507,7 @@ _cpufreq_set_governor(const char *governor) "cpu frequency governor via the module's<br>" "setfreq utility.")); e_dialog_button_add(dia, _("OK"), NULL, NULL, NULL); - e_win_centered_set(dia->win, 1); + elm_win_center(dia->win, 1, 1); e_dialog_show(dia); } } @@ -534,7 +534,7 @@ _cpufreq_set_frequency(int frequency) "Kernel modules or features, or your CPU<br>" "simply does not support this feature.")); e_dialog_button_add(dia, _("OK"), NULL, NULL, NULL); - e_win_centered_set(dia->win, 1); + elm_win_center(dia->win, 1, 1); e_dialog_show(dia); return; } @@ -559,7 +559,7 @@ _cpufreq_set_frequency(int frequency) "cpu frequency setting via the module's<br>" "setfreq utility.")); e_dialog_button_add(dia, _("OK"), NULL, NULL, NULL); - e_win_centered_set(dia->win, 1); + elm_win_center(dia->win, 1, 1); e_dialog_show(dia); } } @@ -585,7 +585,7 @@ _cpufreq_set_pstate(int min, int max, int turbo) "cpu power state setting via the module's<br>" "setfreq utility.")); e_dialog_button_add(dia, _("OK"), NULL, NULL, NULL); - e_win_centered_set(dia->win, 1); + elm_win_center(dia->win, 1, 1); e_dialog_show(dia); } } diff --git a/src/modules/cpufreq/e_mod_main.h b/src/modules/cpufreq/e_mod_main.h index c57e01fd50..d1e8845d7e 100644 --- a/src/modules/cpufreq/e_mod_main.h +++ b/src/modules/cpufreq/e_mod_main.h @@ -60,7 +60,7 @@ EAPI void *e_modapi_init (E_Module *m); EAPI int e_modapi_shutdown (E_Module *m); EAPI int e_modapi_save (E_Module *m); -E_Config_Dialog *e_int_config_cpufreq_module(E_Comp *comp, const char *params); +E_Config_Dialog *e_int_config_cpufreq_module(Evas_Object *parent, const char *params); void _cpufreq_poll_interval_update(void); void _cpufreq_set_governor(const char *governor); void _cpufreq_set_pstate(int min, int max, int turbo); diff --git a/src/modules/everything/e_mod_main.h b/src/modules/everything/e_mod_main.h index ed17881440..0cd7c94b21 100644 --- a/src/modules/everything/e_mod_main.h +++ b/src/modules/everything/e_mod_main.h @@ -22,7 +22,7 @@ typedef struct _Gadget_Config Gadget_Config; struct _Evry_Window { - E_Win *ewin; + Evas_Object *ewin; Evas *evas; E_Zone *zone; Evas_Object *o_main; @@ -355,8 +355,8 @@ extern E_Module *_mod_evry; EAPI void *e_modapi_init (E_Module *m); EAPI int e_modapi_shutdown (E_Module *m); EAPI int e_modapi_save (E_Module *m); -EAPI E_Config_Dialog *evry_config_dialog(E_Comp *comp, const char *params); -EAPI E_Config_Dialog *evry_collection_conf_dialog(E_Comp *comp, const char *params); +EAPI E_Config_Dialog *evry_config_dialog(Evas_Object *parent, const char *params); +EAPI E_Config_Dialog *evry_collection_conf_dialog(Evas_Object *parent, const char *params); EAPI extern E_Module_Api e_modapi; /* #define CHECK_REFS 1 diff --git a/src/modules/everything/evry.c b/src/modules/everything/evry.c index 226d7df4e2..c88b923fd1 100644 --- a/src/modules/everything/evry.c +++ b/src/modules/everything/evry.c @@ -49,6 +49,7 @@ static int _evry_selectors_shift(Evry_Window *win, int dir); static int _evry_selectors_switch(Evry_Window *win, int dir); static Evry_Window *_evry_window_new(E_Zone *zone, E_Zone_Edge edge); +static void _evry_cb_win_delete(void *data, Evas *e EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *event_info EINA_UNUSED); static void _evry_window_free(Evry_Window *win); static void _evry_list_win_show(Evry_Window *win); static void _evry_list_win_hide(Evry_Window *win); @@ -178,16 +179,22 @@ evry_show(E_Zone *zone, E_Zone_Edge edge, const char *params, Eina_Bool popup) if (popup) { + E_Client *ec; + + ecore_evas_name_class_set(e_win_ee_get(win->ewin), "E", "everything"); + + evas_object_show(win->ewin); + ec = e_win_client_get(win->ewin); + if (ec) + { #ifndef HAVE_WAYLAND_ONLY - if (e_comp_get(win->ewin)->comp_type == E_PIXMAP_TYPE_X) - ecore_x_netwm_window_type_set(win->ewin->evas_win, - ECORE_X_WINDOW_TYPE_UTILITY); + if (ec->comp->comp_type == E_PIXMAP_TYPE_X) + ecore_x_netwm_window_type_set(elm_win_window_id_get(win->ewin), + ECORE_X_WINDOW_TYPE_UTILITY); #endif - ecore_evas_name_class_set(win->ewin->ecore_evas, "E", "everything"); - - e_win_show(win->ewin); - win->ewin->client->netwm.state.skip_taskbar = 1; - EC_CHANGED(win->ewin->client); + ec->netwm.state.skip_taskbar = 1; + EC_CHANGED(ec); + } win->grab = 1; } @@ -206,10 +213,10 @@ evry_show(E_Zone *zone, E_Zone_Edge edge, const char *params, Eina_Bool popup) E_LIST_HANDLER_APPEND(win->handlers, ECORE_EVENT_KEY_DOWN, _evry_cb_key_down, win); #ifndef HAVE_WAYLAND_ONLY - if (e_comp_get(win->ewin)->comp_type == E_PIXMAP_TYPE_X) - E_LIST_HANDLER_APPEND(win->handlers, ECORE_X_EVENT_SELECTION_NOTIFY, _evry_cb_selection_notify, win); + if (e_comp_get(NULL)->comp_type == E_PIXMAP_TYPE_X) + E_LIST_HANDLER_APPEND(win->handlers, ECORE_X_EVENT_SELECTION_NOTIFY, _evry_cb_selection_notify, win); #endif - evas_object_event_callback_add(win->ewin->client->frame, EVAS_CALLBACK_SHOW, (Evas_Object_Event_Cb)_evry_cb_show, win); + evas_object_event_callback_add(e_win_client_get(win->ewin)->frame, EVAS_CALLBACK_SHOW, (Evas_Object_Event_Cb)_evry_cb_show, win); E_LIST_HANDLER_APPEND(win->handlers, EVRY_EVENT_ITEM_CHANGED, _evry_cb_item_changed, win); @@ -282,8 +289,8 @@ evry_hide(Evry_Window *win, int clear) if (!win) return; - e_win_delete_callback_set(win->ewin, NULL); - e_win_hide(win->ewin); + evas_object_event_callback_del(win->ewin, EVAS_CALLBACK_DEL, _evry_cb_win_delete); + evas_object_hide(win->ewin); _evry_state_clear(win); if ((clear && CUR_SEL) && @@ -351,8 +358,8 @@ evry_hide(Evry_Window *win, int clear) ecore_timer_del(win->delay_hide_action); if (win->grab) - e_grabinput_release(win->ewin->evas_win, - win->ewin->evas_win); + e_grabinput_release(elm_win_window_id_get(win->ewin), + elm_win_window_id_get(win->ewin)); windows = eina_list_remove(windows, win); @@ -734,26 +741,9 @@ _evry_list_win_hide(Evry_Window *win) } static void -_evry_cb_win_delete(E_Win *ewin) -{ - Evry_Window *win = ewin->data; - evry_hide(win, 0); -} - -static void -_evry_cb_win_move(E_Win *ewin __UNUSED__) +_evry_cb_win_delete(void *data, Evas *e EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *event_info EINA_UNUSED) { - /* Evry_Window *win = ewin->data; */ - /* evas_object_resize(win->o_main, ewin->w, ewin->h); */ - /* if (win->input_window) - * ecore_x_window_move(win->input_window, win->ewin->x, win->ewin->y); */ -} - -static void -_evry_cb_win_resize(E_Win *ewin) -{ - Evry_Window *win = ewin->data; - evas_object_resize(win->o_main, ewin->w, ewin->h); + evry_hide(data, 0); } static Evry_Window * @@ -766,17 +756,20 @@ _evry_window_new(E_Zone *zone, E_Zone_Edge edge) int offset_s = 0; win = E_NEW(Evry_Window, 1); - win->ewin = e_win_new(zone->comp); - e_win_borderless_set(win->ewin, 1); + win->ewin = elm_win_add(NULL, NULL, ELM_WIN_UTILITY); + elm_win_borderless_set(win->ewin, 1); e_win_no_remember_set(win->ewin, 1); e_win_placed_set(win->ewin, 1); - ecore_evas_override_set(win->ewin->ecore_evas, 1); - win->evas = e_win_evas_get(win->ewin); + elm_win_override_set(win->ewin, 1); + win->evas = evas_object_evas_get(win->ewin); win->zone = zone; - win->ewin->data = win; + evas_object_data_set(win->ewin, "evry_win", win); o = edje_object_add(win->evas); win->o_main = o; + elm_win_resize_object_add(win->ewin, o); + EXPAND(o); + FILL(o); e_theme_edje_object_set(o, "base/theme/modules/everything", "e/modules/everything/main"); @@ -799,7 +792,7 @@ _evry_window_new(E_Zone *zone, E_Zone_Edge edge) w = evry_conf->edge_width; h = evry_conf->edge_height; } - e_win_size_min_set(win->ewin, mw, mh); + evas_object_size_hint_min_set(win->ewin, mw, mh); evry_conf->min_w = mw; if (w > mw) mw = w; @@ -856,19 +849,14 @@ _evry_window_new(E_Zone *zone, E_Zone_Edge edge) mh += offset_s * 2; } - e_win_move_resize(win->ewin, x, y, mw, mh); - win->ewin->w = mw; - win->ewin->h = mh; + evas_object_geometry_set(win->ewin, x, y, mw, mh); - evas_object_resize(o, mw, mh); evas_object_show(o); evas_event_feed_mouse_in(win->evas, 0, NULL); evas_event_feed_mouse_move(win->evas, -1000000, -1000000, 0, NULL); - e_win_delete_callback_set(win->ewin, _evry_cb_win_delete); - e_win_resize_callback_set(win->ewin, _evry_cb_win_resize); - e_win_move_callback_set(win->ewin, _evry_cb_win_move); + evas_object_event_callback_add(win->ewin, EVAS_CALLBACK_DEL, _evry_cb_win_delete, win); return win; } @@ -894,17 +882,18 @@ _evry_cb_mouse(void *data, int type, void *event) { Ecore_Event_Mouse_Button *ev; Evry_Window *win = data; - E_Win *w; + Evas_Object *ewin; + int x, y, w, h; ev = event; if (!win->grab) return ECORE_CALLBACK_PASS_ON; - if (ev->event_window != win->ewin->evas_win) + if (ev->event_window != elm_win_window_id_get(win->ewin)) return ECORE_CALLBACK_PASS_ON; - w = win->ewin; + ewin = win->ewin; #if 0 if (type == ECORE_EVENT_MOUSE_MOVE) @@ -918,7 +907,7 @@ _evry_cb_mouse(void *data, int type, void *event) (!E_INSIDE(ev->x, ev->y, win->zone->x, win->zone->y, - w->w, w->h))) + ewin->w, ewin->h))) { const char *drag_types[] = { "text/uri-list" }; E_Drag *d; @@ -959,12 +948,13 @@ _evry_cb_mouse(void *data, int type, void *event) } else #endif + evas_object_geometry_get(ewin, &x, &y, &w, &h); if (type == ECORE_EVENT_MOUSE_BUTTON_DOWN) { win->mouse_out = 0; - if (!E_INSIDE(e_comp_canvas_x_root_adjust(w->comp, ev->root.x), - e_comp_canvas_y_root_adjust(w->comp, ev->root.y), w->x, w->y, w->w, w->h)) + if (!E_INSIDE(e_comp_canvas_x_root_adjust(e_comp_get(NULL), ev->root.x), + e_comp_canvas_y_root_adjust(e_comp_get(NULL), ev->root.y), x, y, w, h)) { win->mouse_out = 1; return ECORE_CALLBACK_PASS_ON; @@ -977,8 +967,8 @@ _evry_cb_mouse(void *data, int type, void *event) win->mouse_button = 0; if (win->mouse_out && - (!E_INSIDE(e_comp_canvas_x_root_adjust(w->comp, ev->root.x), - e_comp_canvas_y_root_adjust(w->comp, ev->root.y), w->x, w->y, w->w, w->h))) + (!E_INSIDE(e_comp_canvas_x_root_adjust(e_comp_get(NULL), ev->root.x), + e_comp_canvas_y_root_adjust(e_comp_get(NULL), ev->root.y), x, y, w, h))) { evry_hide(win, 0); return ECORE_CALLBACK_PASS_ON; @@ -992,9 +982,8 @@ static void _evry_window_free(Evry_Window *win) { evas_event_freeze(win->evas); - if (!e_object_is_del(E_OBJECT(win->ewin))) - e_object_del(E_OBJECT(win->ewin)); - E_FREE(win); + evas_object_del(win->ewin); + free(win); } static void @@ -1921,7 +1910,7 @@ _evry_cb_key_down(void *data, int type __UNUSED__, void *event) Evry_Window *win = data; const char *old; - if (ev->event_window != win->ewin->evas_win) + if (ev->event_window != elm_win_window_id_get(win->ewin)) return ECORE_CALLBACK_PASS_ON; if (!strcmp(ev->key, "Escape")) @@ -1932,21 +1921,24 @@ _evry_cb_key_down(void *data, int type __UNUSED__, void *event) #ifdef DRAG_OFF_WINDOW else if (win->grab && !strcmp(ev->key, "F1")) { - E_Win *ewin = win->ewin; + Evas_Object *ewin = win->ewin; + E_Client *ec; + + e_grabinput_release(elm_win_window_id_get(ewin), elm_win_window_id_get(ewin)); - e_grabinput_release(ewin->evas_win, ewin->evas_win); - evas_object_layer_set(ewin->client->frame, E_LAYER_CLIENT_NORMAL); + ec = e_win_client_get(ewin); + elm_win_borderless_set(ewin, 0); #ifndef HAVE_WAYLAND_ONLY - if (e_comp_get(ewin)->comp_type == E_PIXMAP_TYPE_X) - ecore_x_netwm_window_type_set(ewin->evas_win, + if (ec->comp->comp_type == E_PIXMAP_TYPE_X) + ecore_x_netwm_window_type_set(elm_win_window_id_get(ewin), ECORE_X_WINDOW_TYPE_DIALOG); #endif - EC_CHANGED(ewin->client); - ewin->client->netwm.fetch.type = 1; - ewin->client->netwm.state.skip_taskbar = 0; - ewin->client->netwm.update.state = 1; - ewin->client->internal_no_remember = 1; - e_win_borderless_set(ewin, 0); + evas_object_layer_set(ec->frame, E_LAYER_CLIENT_NORMAL); + EC_CHANGED(ec); + ec->netwm.fetch.type = 1; + ec->netwm.state.skip_taskbar = 0; + ec->netwm.update.state = 1; + ec->internal_no_remember = 1; win->grab = 0; return ECORE_CALLBACK_PASS_ON; @@ -2128,11 +2120,11 @@ _evry_cb_key_down(void *data, int type __UNUSED__, void *event) else if (!strcmp(ev->key, "v")) { #ifndef HAVE_WAYLAND_ONLY - if (e_comp_get(win->ewin)->comp_type == E_PIXMAP_TYPE_X) + if (e_comp_get(NULL)->comp_type == E_PIXMAP_TYPE_X) { win->request_selection = EINA_TRUE; ecore_x_selection_primary_request - (win->ewin->evas_win, ECORE_X_SELECTION_TARGET_UTF8_STRING); + (elm_win_window_id_get(win->ewin), ECORE_X_SELECTION_TARGET_UTF8_STRING); } #endif } @@ -3044,7 +3036,7 @@ static void _evry_cb_show(Evry_Window *win, Evas *e EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *event_info EINA_UNUSED) { if (win->grab) - e_grabinput_get(win->ewin->evas_win, 0, win->ewin->evas_win); + e_grabinput_get(elm_win_window_id_get(win->ewin), 0, elm_win_window_id_get(win->ewin)); } #ifndef HAVE_WAYLAND_ONLY diff --git a/src/modules/everything/evry_config.c b/src/modules/everything/evry_config.c index b71cc33d9a..34784baeca 100644 --- a/src/modules/everything/evry_config.c +++ b/src/modules/everything/evry_config.c @@ -60,7 +60,7 @@ struct _E_Config_Dialog_Data }; EAPI E_Config_Dialog * -evry_config_dialog(E_Comp *comp, const char *params __UNUSED__) +evry_config_dialog(Evas_Object *parent EINA_UNUSED, const char *params __UNUSED__) { E_Config_Dialog *cfd; E_Config_Dialog_View *v; @@ -74,7 +74,7 @@ evry_config_dialog(E_Comp *comp, const char *params __UNUSED__) v->basic.create_widgets = _basic_create_widgets; v->advanced.apply_cfdata = NULL; v->advanced.create_widgets = NULL; - cfd = e_config_dialog_new(comp, + cfd = e_config_dialog_new(NULL, _("Everything Settings"), "E", "extensions/run_everything", "system-run", 0, v, NULL); @@ -605,7 +605,7 @@ static Evas_Object *_cat_basic_create_widgets(E_Config_Dialog *cfd, Evas *evas, static int _cat_basic_apply(E_Config_Dialog *cfd, E_Config_Dialog_Data *cfdata); EAPI E_Config_Dialog * -evry_collection_conf_dialog(E_Comp *comp, const char *params) +evry_collection_conf_dialog(Evas_Object *parent EINA_UNUSED, const char *params) { E_Config_Dialog *cfd = NULL; E_Config_Dialog_View *v = NULL; @@ -628,7 +628,7 @@ evry_collection_conf_dialog(E_Comp *comp, const char *params) snprintf(title, sizeof(title), "%s: %s", _("Everything Collection"), p->name); - cfd = e_config_dialog_new(comp, title, p->config_path, p->config_path, + cfd = e_config_dialog_new(NULL, title, p->config_path, p->config_path, EVRY_ITEM(p)->icon, 0, v, p); /* FIXME free dialogs on shutdown diff --git a/src/modules/everything/evry_gadget.c b/src/modules/everything/evry_gadget.c index 450eb0bb78..456efe03cf 100644 --- a/src/modules/everything/evry_gadget.c +++ b/src/modules/everything/evry_gadget.c @@ -10,7 +10,6 @@ struct _Instance E_Gadcon_Client *gcc; Evas_Object *o_button; - E_Object_Delfn *del_fn; Evry_Window *win; Gadget_Config *cfg; E_Config_Dialog *cfd; @@ -30,6 +29,7 @@ struct _Instance /* static void _button_cb_mouse_up(void *data, Evas *e, Evas_Object *obj, void *event_info); */ static void _button_cb_mouse_down(void *data, Evas *e, Evas_Object *obj, void *event_info); static Eina_Bool _cb_focus_out(void *data, int type __UNUSED__, void *event); +static void _del_func(void *data, Evas *e EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *event_info EINA_UNUSED); /* gadcon requirements */ static E_Gadcon_Client *_gc_init(E_Gadcon *gc, const char *name, const char *id, const char *style); @@ -136,9 +136,9 @@ _gc_shutdown(E_Gadcon_Client *gcc) EINA_LIST_FREE (inst->handlers, h) ecore_event_handler_del(h); - if (inst->del_fn && inst->win) + if (inst->win) { - e_object_delfn_del(E_OBJECT(inst->win->ewin), inst->del_fn); + evas_object_event_callback_del(inst->win->ewin, EVAS_CALLBACK_DEL, _del_func); evry_hide(inst->win, 0); } @@ -211,13 +211,12 @@ _gc_id_new(const E_Gadcon_Client_Class *client_class __UNUSED__) /***************************************************************************/ static void -_del_func(void *data, void *obj __UNUSED__) +_del_func(void *data, Evas *e EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *event_info EINA_UNUSED) { Instance *inst = data; e_gadcon_locked_set(inst->gcc->gadcon, 0); - inst->del_fn = NULL; inst->win = NULL; edje_object_signal_emit(inst->o_button, "e,state,unfocused", "e"); } @@ -232,13 +231,15 @@ static void _hide_done(void *data, Evas_Object *obj EINA_UNUSED, const char *s EINA_UNUSED, const char *ss EINA_UNUSED) { Instance *inst = data; + E_Client *ec; /* go bac to subject selector */ evry_selectors_switch(inst->win, -1, 0); evry_selectors_switch(inst->win, -1, 0); - e_client_iconify(inst->win->ewin->client); - e_comp_object_effect_set(inst->win->ewin->client->frame, "none"); + ec = e_win_client_get(inst->win->ewin); + e_client_iconify(ec); + e_comp_object_effect_set(ec->frame, "none"); inst->animating = 0; } @@ -246,16 +247,19 @@ static void _evry_hide_func(Evry_Window *win, int finished __UNUSED__) { Instance *inst = win->data; + E_Client *ec; + int x, y, w, h; - e_comp_object_effect_set(inst->win->ewin->client->frame, "pane"); + ec = e_win_client_get(inst->win->ewin);; + e_comp_object_effect_set(ec->frame, "pane"); /* set geoms */ - e_comp_object_effect_params_set(inst->win->ewin->client->frame, 1, - (int[]){inst->win->ewin->x, inst->win->ewin->y, - inst->win->ewin->w, inst->win->ewin->h, - inst->win->ewin->client->zone->w, inst->win->ewin->client->zone->h, + evas_object_geometry_get(inst->win->ewin, &x, &y, &w, &h); + e_comp_object_effect_params_set(ec->frame, 1, + (int[]){x, y, w, h, + ec->zone->w, ec->zone->h, inst->hide_x, inst->hide_y}, 8); - e_comp_object_effect_params_set(inst->win->ewin->client->frame, 0, (int[]){0}, 1); - e_comp_object_effect_start(inst->win->ewin->client->frame, _hide_done, inst); + e_comp_object_effect_params_set(ec->frame, 0, (int[]){0}, 1); + e_comp_object_effect_start(ec->frame, _hide_done, inst); inst->hidden = inst->animating = EINA_TRUE; } @@ -273,7 +277,7 @@ _cb_focus_out(void *data, int type __UNUSED__, void *event) if ((!inst) || (!inst->win)) return ECORE_CALLBACK_PASS_ON; - if (inst->win->ewin->client != ev->ec) + if (e_win_client_get(inst->win->ewin) != ev->ec) return ECORE_CALLBACK_PASS_ON; _evry_hide_func(inst->win, 0); @@ -285,11 +289,10 @@ static void _gadget_popup_show(Instance *inst) { Evas_Coord x, y, w, h; - int cx, cy, pw, ph; - E_Win *ewin = inst->win->ewin; + int cx, cy, px, py, pw, ph; + Evas_Object *ewin = inst->win->ewin; - pw = ewin->w; - ph = ewin->h; + evas_object_geometry_get(ewin, &px, &py, &pw, &ph); evas_object_geometry_get(inst->o_button, &x, &y, &w, &h); e_gadcon_canvas_zone_geometry_get(inst->gcc->gadcon, &cx, &cy, NULL, NULL); @@ -333,13 +336,13 @@ _gadget_popup_show(Instance *inst) break; } - if (ewin->x + pw > inst->win->zone->w) + if (px + pw > inst->win->zone->w) x = inst->win->zone->w - pw; - if (ewin->y + ph > inst->win->zone->h) + if (py + ph > inst->win->zone->h) y = inst->win->zone->h - ph; - e_win_move(ewin, x, y); + evas_object_move(ewin, x, y); } static void @@ -350,7 +353,7 @@ _gadget_window_show(Instance *inst) int cx, cy; int pw, ph; - E_Win *ewin = inst->win->ewin; + Evas_Object *ewin = inst->win->ewin; inst->win->func.hide = &_evry_hide_func; @@ -369,7 +372,7 @@ _gadget_window_show(Instance *inst) pw = zw / 2; ph = zh / 2; inst->hide_y = -1; - e_win_move(ewin, zx, gy + gh); + evas_object_move(ewin, zx, gy + gh); break; case E_GADCON_ORIENT_BOTTOM: @@ -378,7 +381,7 @@ _gadget_window_show(Instance *inst) pw = zw / 2; ph = zh / 2; inst->hide_y = 1; - e_win_move(ewin, zx, gy - ph); + evas_object_move(ewin, zx, gy - ph); break; case E_GADCON_ORIENT_LEFT: @@ -387,7 +390,7 @@ _gadget_window_show(Instance *inst) pw = zw / 2.5; ph = zh; inst->hide_x = -1; - e_win_move(ewin, gx + gw, zy); + evas_object_move(ewin, gx + gw, zy); break; case E_GADCON_ORIENT_RIGHT: @@ -396,7 +399,7 @@ _gadget_window_show(Instance *inst) pw = zw / 2.5; ph = zh; inst->hide_x = 1; - e_win_move(ewin, gx - pw, zy); + evas_object_move(ewin, gx - pw, zy); break; case E_GADCON_ORIENT_FLOAT: @@ -407,13 +410,17 @@ _gadget_window_show(Instance *inst) break; } - e_win_resize(ewin, pw, ph); - e_win_show(ewin); + evas_object_resize(ewin, pw, ph); + evas_object_show(ewin); - evas_object_focus_set(ewin->client->frame, 1); - ewin->client->netwm.state.skip_pager = 1; - ewin->client->netwm.state.skip_taskbar = 1; - ewin->client->sticky = 1; + { + E_Client *ec = e_win_client_get(ewin); + + evas_object_focus_set(ec->frame, 1); + ec->netwm.state.skip_pager = 1; + ec->netwm.state.skip_taskbar = 1; + ec->sticky = 1; + } inst->hidden = EINA_FALSE; } @@ -439,7 +446,7 @@ _button_cb_mouse_down(void *data, Evas *e __UNUSED__, Evas_Object *obj __UNUSED_ if (inst->win) { win = inst->win; - ec = win->ewin->client; + ec = e_win_client_get(win->ewin); if (inst->hidden || !ec->focused) { @@ -466,7 +473,7 @@ _button_cb_mouse_down(void *data, Evas *e __UNUSED__, Evas_Object *obj __UNUSED_ inst->win = win; win->data = inst; - ecore_evas_name_class_set(win->ewin->ecore_evas, "E", "everything-window"); + ecore_evas_name_class_set(e_win_ee_get(win->ewin), "E", "everything-window"); if (inst->illume_mode) _gadget_window_show(inst); @@ -475,7 +482,7 @@ _button_cb_mouse_down(void *data, Evas *e __UNUSED__, Evas_Object *obj __UNUSED_ e_gadcon_locked_set(inst->gcc->gadcon, 1); - inst->del_fn = e_object_delfn_add(E_OBJECT(win->ewin), _del_func, inst); + evas_object_event_callback_add(win->ewin, EVAS_CALLBACK_DEL, _del_func, inst); edje_object_signal_emit(inst->o_button, "e,state,focused", "e"); } @@ -600,7 +607,7 @@ _free_data(E_Config_Dialog *cfd, E_Config_Dialog_Data *cfdata) static void _cb_button_settings(void *data __UNUSED__, void *data2 __UNUSED__) { - /* evry_collection_conf_dialog(e_util_comp_current_get()), "Start"); */ + /* evry_collection_conf_dialog(NULL, "Start"); */ } static void diff --git a/src/modules/everything/evry_plug_apps.c b/src/modules/everything/evry_plug_apps.c index 4f3a6eb436..1b4df75fb5 100644 --- a/src/modules/everything/evry_plug_apps.c +++ b/src/modules/everything/evry_plug_apps.c @@ -1285,7 +1285,7 @@ static Evas_Object *_basic_create(E_Config_Dialog *cfd, Evas *evas, E_Config_Dia static int _basic_apply(E_Config_Dialog *cfd, E_Config_Dialog_Data *cfdata); static E_Config_Dialog * -_conf_dialog(E_Comp *comp, const char *params __UNUSED__) +_conf_dialog(Evas_Object *parent EINA_UNUSED, const char *params __UNUSED__) { E_Config_Dialog *cfd = NULL; E_Config_Dialog_View *v = NULL; @@ -1300,7 +1300,7 @@ _conf_dialog(E_Comp *comp, const char *params __UNUSED__) v->basic.create_widgets = _basic_create; v->basic.apply_cfdata = _basic_apply; - cfd = e_config_dialog_new(comp, _("Everything Applications"), "everything-apps", + cfd = e_config_dialog_new(NULL, _("Everything Applications"), "everything-apps", "launcher/everything-apps", _module_icon, 0, v, NULL); _conf->cfd = cfd; diff --git a/src/modules/everything/evry_plug_files.c b/src/modules/everything/evry_plug_files.c index e8bd1feb84..18ffdbaf78 100644 --- a/src/modules/everything/evry_plug_files.c +++ b/src/modules/everything/evry_plug_files.c @@ -1427,7 +1427,7 @@ static Evas_Object *_basic_create(E_Config_Dialog *cfd, Evas *evas, E_Config_Dia static int _basic_apply(E_Config_Dialog *cfd, E_Config_Dialog_Data *cfdata); static E_Config_Dialog * -_conf_dialog(E_Comp *comp, const char *params __UNUSED__) +_conf_dialog(Evas_Object *parent EINA_UNUSED, const char *params __UNUSED__) { E_Config_Dialog *cfd = NULL; E_Config_Dialog_View *v = NULL; @@ -1442,7 +1442,7 @@ _conf_dialog(E_Comp *comp, const char *params __UNUSED__) v->basic.create_widgets = _basic_create; v->basic.apply_cfdata = _basic_apply; - cfd = e_config_dialog_new(comp, _("Everything Files"), "everything-files", + cfd = e_config_dialog_new(NULL, _("Everything Files"), "everything-files", "extensions/everything-files", _module_icon, 0, v, NULL); _conf->cfd = cfd; diff --git a/src/modules/fileman/e_fwin.c b/src/modules/fileman/e_fwin.c index fea9e664b2..7ad2eed396 100644 --- a/src/modules/fileman/e_fwin.c +++ b/src/modules/fileman/e_fwin.c @@ -25,7 +25,7 @@ struct _E_Fwin { E_Object e_obj_inherit; - E_Win *win; + Evas_Object *win; E_Zone *zone; Fileman_Path *path; /* not freed with fwin, actually attached to config */ Evas_Object *bg_obj; @@ -106,15 +106,12 @@ static void _e_fwin_page_favorites_add(E_Fwin_Page *page); static void _e_fwin_icon_mouse_out(void *data, Evas_Object *obj __UNUSED__, void *event_info); static void _e_fwin_icon_mouse_in(void *data, Evas_Object *obj __UNUSED__, void *event_info); static E_Fwin *_e_fwin_open(E_Fwin_Page *page, E_Fm2_Icon_Info *ici, Eina_Bool force, int *need_dia); -static E_Fwin *_e_fwin_new(E_Comp *comp, - const char *dev, - const char *path); +static E_Fwin *_e_fwin_new(const char *dev, const char *path); static void _e_fwin_free(E_Fwin *fwin); static E_Fwin_Page *_e_fwin_page_create(E_Fwin *fwin); static void _e_fwin_page_free(E_Fwin_Page *page); -static void _e_fwin_cb_delete(E_Win *win); -static void _e_fwin_cb_move(E_Win *win); -static void _e_fwin_cb_resize(E_Win *win); +static void _e_fwin_cb_delete(void *data, Evas *e, Evas_Object *obj, void *event_info); +static void _e_fwin_cb_resize(void *data, Evas *e, Evas_Object *obj, void *event_info); static void _e_fwin_deleted(void *data, Evas_Object *obj, void *event_info); @@ -294,11 +291,11 @@ e_fwin_shutdown(void) * "fwin" window */ void -e_fwin_new(E_Comp *comp, +e_fwin_new(E_Comp *comp EINA_UNUSED, const char *dev, const char *path) { - _e_fwin_new(comp, dev, path); + _e_fwin_new(dev, path); } static Eina_Bool @@ -541,14 +538,14 @@ void e_fwin_zone_shutdown(E_Zone *zone) { Eina_List *f, *fn; - E_Fwin *win; + E_Fwin *fwin; - EINA_LIST_FOREACH_SAFE(fwins, f, fn, win) + EINA_LIST_FOREACH_SAFE(fwins, f, fn, fwin) { - if (win->zone != zone) continue; - _e_fwin_zone_shutdown(win, NULL, win->cur_page->fm_obj, NULL); - win = NULL; + if (fwin->zone != zone) continue; + _e_fwin_zone_shutdown(fwin, NULL, fwin->cur_page->fm_obj, NULL); + fwin = NULL; } } @@ -581,7 +578,7 @@ e_fwin_reload_all(void) if (!fwin->cur_page->tbar) { fwin->cur_page->tbar = e_toolbar_new - (e_win_evas_get(fwin->win), "toolbar", + (evas_object_evas_get(fwin->win), "toolbar", fwin->win, fwin->cur_page->fm_obj); e_toolbar_orient(fwin->cur_page->tbar, fileman_config->view.toolbar_orient); e_object_data_set(E_OBJECT(fwin->cur_page->tbar), fwin->cur_page); @@ -617,7 +614,7 @@ e_fwin_reload_all(void) } } _e_fwin_window_title_set(fwin->cur_page); - _e_fwin_cb_resize(fwin->win); + _e_fwin_cb_resize(fwin, NULL, NULL, NULL); _e_fwin_toolbar_resize(fwin->cur_page); e_fm2_refresh(fwin->cur_page->fm_obj); } @@ -637,10 +634,10 @@ void * e_fwin_zone_find(E_Zone *zone) { Eina_List *f; - E_Fwin *win; + E_Fwin *fwin; - EINA_LIST_FOREACH(fwins, f, win) - if (win->zone == zone) return win; + EINA_LIST_FOREACH(fwins, f, fwin) + if (fwin->zone == zone) return fwin; return NULL; } @@ -649,11 +646,14 @@ static void _e_fwin_bg_mouse_down(E_Fwin *fwin, Evas_Object *obj __UNUSED__, void *event __UNUSED__) { int x, y, w, h, zx, zy, zw, zh, cx, cy, cw, ch; + E_Client *ec; + + ec = e_win_client_get(fwin->win); - if (fwin->win->client->maximized) e_client_unmaximize(fwin->win->client, fwin->win->client->maximized); - if (fwin->win->client->fullscreen) e_client_unfullscreen(fwin->win->client); - e_zone_useful_geometry_get(fwin->win->client->zone, &zx, &zy, &zw, &zh); - x = fwin->win->client->x, y = fwin->win->client->y; + if (ec->maximized) e_client_unmaximize(ec, ec->maximized); + if (ec->fullscreen) e_client_unfullscreen(ec); + e_zone_useful_geometry_get(ec->zone, &zx, &zy, &zw, &zh); + x = ec->x, y = ec->y; if (!e_fm2_optimal_size_calc(fwin->cur_page->fm_obj, MINIMUM_WIDTH, zw + zx - x, zh + zy - y, &w, &h)) return; evas_object_geometry_get(fwin->cur_page->fm_obj, &cx, &cy, &cw, &ch); if (x + w > zx + zw) @@ -662,12 +662,11 @@ _e_fwin_bg_mouse_down(E_Fwin *fwin, Evas_Object *obj __UNUSED__, void *event __U h = zy + zh - y; w = w + cx; h = h + cy; - e_win_resize(fwin->win, MAX(w, MINIMUM_WIDTH), MAX(h, MINIMUM_HEIGHT)); + evas_object_resize(fwin->win, MAX(w, MINIMUM_WIDTH), MAX(h, MINIMUM_HEIGHT)); } static E_Fwin * -_e_fwin_new(E_Comp *comp, - const char *dev, +_e_fwin_new(const char *dev, const char *path) { E_Fwin *fwin; @@ -677,19 +676,18 @@ _e_fwin_new(E_Comp *comp, fwin = E_OBJECT_ALLOC(E_Fwin, E_FWIN_TYPE, _e_fwin_free); if (!fwin) return NULL; - fwin->win = e_win_new(comp); + fwin->win = elm_win_add(NULL, NULL, ELM_WIN_BASIC); if (!fwin->win) { free(fwin); return NULL; } fwins = eina_list_append(fwins, fwin); - e_win_delete_callback_set(fwin->win, _e_fwin_cb_delete); - e_win_move_callback_set(fwin->win, _e_fwin_cb_move); - e_win_resize_callback_set(fwin->win, _e_fwin_cb_resize); - fwin->win->data = fwin; + evas_object_event_callback_add(fwin->win, EVAS_CALLBACK_DEL, _e_fwin_cb_delete, fwin); + evas_object_event_callback_add(fwin->win, EVAS_CALLBACK_RESIZE, _e_fwin_cb_resize, fwin); - o = edje_object_add(e_win_evas_get(fwin->win)); + o = edje_object_add(evas_object_evas_get(fwin->win)); + elm_win_resize_object_add(fwin->win, o); e_theme_edje_object_set(o, "base/theme/fileman", "e/fileman/default/window/main"); evas_object_show(o); @@ -699,8 +697,8 @@ _e_fwin_new(E_Comp *comp, fwin->cur_page = page; /* - o = edje_object_add(fwin->win->evas); - // o = e_icon_add(e_win_evas_get(fwin->win)); + o = edje_object_add(evas_object_evas_get(fwin->win)); + // o = e_icon_add(evas_object_evas_get(fwin->win)); // e_icon_scale_size_set(o, 0); // e_icon_fill_inside_set(o, 0); edje_object_part_swallow(fwin->bg_obj, "e.swallow.bg", o); @@ -708,8 +706,8 @@ _e_fwin_new(E_Comp *comp, fwin->under_obj = o; */ - o = edje_object_add(fwin->win->evas); -// o = e_icon_add(e_win_evas_get(fwin->win)); + o = edje_object_add(evas_object_evas_get(fwin->win)); +// o = e_icon_add(evas_object_evas_get(fwin->win)); // e_icon_scale_size_set(o, 0); // e_icon_fill_inside_set(o, 0); edje_object_part_swallow(e_scrollframe_edje_object_get(page->scr), @@ -720,24 +718,22 @@ _e_fwin_new(E_Comp *comp, e_fm2_path_set(page->fm_obj, dev, path); _e_fwin_window_title_set(page); - e_win_size_min_set(fwin->win, MINIMUM_WIDTH, MINIMUM_HEIGHT); + evas_object_size_hint_min_set(fwin->win, MINIMUM_WIDTH, MINIMUM_HEIGHT); zone = e_util_zone_current_get(e_manager_current_get()); if ((zone) && (zone->w < DEFAULT_WIDTH)) { int w, h; e_zone_useful_geometry_get(zone, NULL, NULL, &w, &h); - e_win_resize(fwin->win, w, h); + evas_object_resize(fwin->win, w, h); } else - e_win_resize(fwin->win, DEFAULT_WIDTH, DEFAULT_HEIGHT); + evas_object_resize(fwin->win, DEFAULT_WIDTH, DEFAULT_HEIGHT); - e_win_show(fwin->win); - if (fwin->win->evas_win) - e_drop_xdnd_register_set(fwin->win->evas_win, 1); - if (fwin->win->client) - eina_stringshare_replace(&fwin->win->client->internal_icon, - "system-file-manager"); + evas_object_show(fwin->win); + if (elm_win_window_id_get(fwin->win)) + e_drop_xdnd_register_set(elm_win_window_id_get(fwin->win), 1); + e_win_client_icon_set(fwin->win, "system-file-manager"); return fwin; } @@ -783,8 +779,8 @@ _e_fwin_free(E_Fwin *fwin) if (fwin->spring_parent) fwin->spring_parent->spring_child = NULL; if (fwin->win) { - e_win_delete_callback_set(fwin->win, NULL); - e_object_del(E_OBJECT(fwin->win)); + evas_object_event_callback_del_full(fwin->win, EVAS_CALLBACK_DEL, _e_fwin_cb_delete, fwin); + evas_object_del(fwin->win); } free(fwin); } @@ -803,7 +799,7 @@ _e_fwin_icon_popup_handler(void *data, int type, void *event) } else { - if (ev->event_window == e_client_util_win_get(fwin->win->client)) return ECORE_CALLBACK_RENEW; + if (ev->event_window == elm_win_window_id_get(fwin->win)) return ECORE_CALLBACK_RENEW; } } E_FREE_FUNC(fwin->popup_timer, ecore_timer_del); @@ -835,7 +831,7 @@ _e_fwin_icon_popup(void *data) evas_object_hide(fwin->popup); evas_object_del(fwin->popup); } - zone = fwin->zone ?: fwin->win->client->zone; + zone = fwin->zone ?: e_comp_object_util_zone_get(fwin->win); e_fm2_icon_geometry_get(fwin->popup_icon->ic, &x, &y, &w, &h); if (fwin->zone) { @@ -843,7 +839,7 @@ _e_fwin_icon_popup(void *data) fx -= zone->x, fy -= zone->y; } else - fx = fwin->win->client->client.x, fy = fwin->win->client->client.y; + evas_object_geometry_get(fwin->win, &fx, &fy, NULL, NULL); bg = edje_object_add(e_comp_get(zone)->evas); e_theme_edje_object_set(bg, "base/theme/fileman", @@ -1012,7 +1008,7 @@ _e_fwin_page_create(E_Fwin *fwin) page = E_NEW(E_Fwin_Page, 1); page->fwin = fwin; - evas = e_win_evas_get(fwin->win); + evas = evas_object_evas_get(fwin->win); if (fileman_config->view.show_sidebar) { @@ -1344,7 +1340,7 @@ _e_fwin_desktop_run(Efreet_Desktop *desktop, } if ((fwin->win) && (desktop)) { - e_exec(fwin->win->client->zone, desktop, NULL, files, "fwin"); + e_exec(e_comp_object_util_zone_get(fwin->win), desktop, NULL, files, "fwin"); ici = selected->data; if ((ici) && (ici->mime) && (desktop) && !(skip_history)) e_exehist_mime_desktop_add(ici->mime, desktop); @@ -1446,7 +1442,7 @@ _e_fwin_file_exec(E_Fwin_Page *page, case E_FWIN_EXEC_DIRECT: snprintf(buf, sizeof(buf), "%s/%s", e_fm2_real_path_get(fwin->cur_page->fm_obj), ici->file); if (fwin->win) - e_exec(fwin->win->client->zone, NULL, buf, NULL, "fwin"); + e_exec(e_comp_object_util_zone_get(fwin->win), NULL, buf, NULL, "fwin"); else if (fwin->zone) e_exec(fwin->zone, NULL, buf, NULL, "fwin"); break; @@ -1454,7 +1450,7 @@ _e_fwin_file_exec(E_Fwin_Page *page, case E_FWIN_EXEC_SH: snprintf(buf, sizeof(buf), "/bin/sh %s", e_util_filename_escape(ici->file)); if (fwin->win) - e_exec(fwin->win->client->zone, NULL, buf, NULL, "fwin"); + e_exec(e_comp_object_util_zone_get(fwin->win), NULL, buf, NULL, "fwin"); else if (fwin->zone) e_exec(fwin->zone, NULL, buf, NULL, "fwin"); break; @@ -1462,7 +1458,7 @@ _e_fwin_file_exec(E_Fwin_Page *page, case E_FWIN_EXEC_TERMINAL_DIRECT: snprintf(buf, sizeof(buf), "%s %s", e_config->exebuf_term_cmd, e_util_filename_escape(ici->file)); if (fwin->win) - e_exec(fwin->win->client->zone, NULL, buf, NULL, "fwin"); + e_exec(e_comp_object_util_zone_get(fwin->win), NULL, buf, NULL, "fwin"); else if (fwin->zone) e_exec(fwin->zone, NULL, buf, NULL, "fwin"); break; @@ -1470,7 +1466,7 @@ _e_fwin_file_exec(E_Fwin_Page *page, case E_FWIN_EXEC_TERMINAL_SH: snprintf(buf, sizeof(buf), "%s /bin/sh %s", e_config->exebuf_term_cmd, e_util_filename_escape(ici->file)); if (fwin->win) - e_exec(fwin->win->client->zone, NULL, buf, NULL, "fwin"); + e_exec(e_comp_object_util_zone_get(fwin->win), NULL, buf, NULL, "fwin"); else if (fwin->zone) e_exec(fwin->zone, NULL, buf, NULL, "fwin"); break; @@ -1481,7 +1477,7 @@ _e_fwin_file_exec(E_Fwin_Page *page, if (desktop) { if (fwin->win) - e_exec(fwin->win->client->zone, desktop, NULL, NULL, "fwin"); + e_exec(e_comp_object_util_zone_get(fwin->win), desktop, NULL, NULL, "fwin"); else if (fwin->zone) e_exec(fwin->zone, desktop, NULL, NULL, "fwin"); efreet_desktop_free(desktop); @@ -1567,14 +1563,14 @@ _e_fwin_window_title_set(E_Fwin_Page *page) file = ecore_file_file_get(e_fm2_real_path_get(page->fm_obj)); if (file) - e_win_title_set(page->fwin->win, file); + elm_win_title_set(page->fwin->win, file); if (e_config->remember_internal_fm_windows_globally) - e_win_name_class_set(page->fwin->win, "E", fwin_class); + ecore_evas_name_class_set(e_win_ee_get(page->fwin->win), "E", fwin_class); else { snprintf(buf, sizeof(buf), "e_fwin::%s", e_fm2_real_path_get(page->fm_obj)); - e_win_name_class_set(page->fwin->win, "E", buf); + ecore_evas_name_class_set(e_win_ee_get(page->fwin->win), "E", buf); } } @@ -1618,13 +1614,9 @@ _e_fwin_toolbar_resize(E_Fwin_Page *page) /* fwin callbacks */ static void -_e_fwin_cb_delete(E_Win *win) +_e_fwin_cb_delete(void *data, Evas *e EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *event_info EINA_UNUSED) { - E_Fwin *fwin; - - if (!win) return; //safety - fwin = win->data; - e_object_del(E_OBJECT(fwin)); + e_object_del(data); } /* static void @@ -1650,27 +1642,13 @@ _e_fwin_cb_delete(E_Win *win) * } */ static void -_e_fwin_cb_move(E_Win *win) +_e_fwin_cb_resize(void *data, Evas *e EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *event_info EINA_UNUSED) { -// E_Fwin *fwin; - - if (!win) return; //safety -// fwin = win->data; -/* _e_fwin_geom_save(fwin); */ -} - -static void -_e_fwin_cb_resize(E_Win *win) -{ - E_Fwin *fwin; + E_Fwin *fwin = data; - if (!win) return; //safety - fwin = win->data; if (fwin->bg_obj) { - if (fwin->win) - evas_object_resize(fwin->bg_obj, fwin->win->w, fwin->win->h); - else if (fwin->zone) + if (fwin->zone) evas_object_resize(fwin->bg_obj, fwin->zone->w, fwin->zone->h); } _e_fwin_toolbar_resize(fwin->cur_page); @@ -1776,7 +1754,7 @@ _e_fwin_changed(void *data, if (!fwin->wallpaper_is_edj) { if (fwin->under_obj) evas_object_del(fwin->under_obj); - fwin->under_obj = edje_object_add(fwin->win->evas); + fwin->under_obj = edje_object_add(evas_object_evas_get(fwin->win)); fwin->wallpaper_is_edj = EINA_TRUE; } edje_object_file_set(fwin->under_obj, fwin->wallpaper_file, "e/desktop/background"); @@ -1785,7 +1763,7 @@ _e_fwin_changed(void *data, { if (fwin->wallpaper_is_edj) evas_object_del(fwin->under_obj); fwin->wallpaper_is_edj = EINA_FALSE; - fwin->under_obj = e_icon_add(e_win_evas_get(fwin->win)); + fwin->under_obj = e_icon_add(evas_object_evas_get(fwin->win)); e_icon_scale_size_set(fwin->under_obj, 0); e_icon_fill_inside_set(fwin->under_obj, 0); e_icon_file_set(fwin->under_obj, fwin->wallpaper_file); @@ -2114,12 +2092,12 @@ _e_fwin_path(void *data, E_Menu *m __UNUSED__, E_Menu_Item *mi __UNUSED__) { const char *path; E_Fwin_Page *page; - Ecore_X_Window xwin; + Ecore_Window xwin; path = e_fm2_real_path_get(data); page = evas_object_data_get(data, "fm_page"); if (page->fwin->win) - xwin = e_client_util_win_get(page->fwin->win->client); + xwin = elm_win_window_id_get(page->fwin->win); else xwin = page->fwin->zone->comp->ee_win; #ifndef HAVE_WAYLAND_ONLY @@ -2136,7 +2114,7 @@ _e_fwin_clone(void *data, E_Menu *m __UNUSED__, E_Menu_Item *mi __UNUSED__) /* path of least resistance! */ act_fm = e_action_find("fileman"); if (!act_fm) return; - act_fm->func.go(NULL, fwin->win->client->icccm.class + 8); + act_fm->func.go(NULL, e_win_client_get(fwin->win)->icccm.class + 8); } static void @@ -2262,38 +2240,39 @@ _e_fwin_border_set(E_Fwin_Page *page, E_Fwin *fwin, E_Fm2_Icon_Info *ici) Eina_List *ll; const char *file = NULL, *group = NULL, *class; int w, h, zw, zh; + E_Client *ec; /* E_Fm2_Custom_File *cf; */ if (ici->label) - e_win_title_set(fwin->win, ici->label); + elm_win_title_set(fwin->win, ici->label); else if (ici->file) - e_win_title_set(fwin->win, ici->file); + elm_win_title_set(fwin->win, ici->file); oic = e_fm2_icon_get(evas_object_evas_get(ici->fm), ici->ic, NULL, NULL, 0, &itype); if (!oic) return; - - eina_stringshare_replace(&fwin->win->client->internal_icon, NULL); - eina_stringshare_replace(&fwin->win->client->internal_icon_key, NULL); + ec = e_win_client_get(fwin->win); + eina_stringshare_replace(&ec->internal_icon, NULL); + eina_stringshare_replace(&ec->internal_icon_key, NULL); if (!strcmp(evas_object_type_get(oic), "edje")) { edje_object_file_get(oic, &file, &group); - fwin->win->client->internal_icon = eina_stringshare_ref(file); - fwin->win->client->internal_icon_key = eina_stringshare_ref(group); + ec->internal_icon = eina_stringshare_ref(file); + ec->internal_icon_key = eina_stringshare_ref(group); } else { e_icon_file_get(oic, &file, &group); - fwin->win->client->internal_icon = eina_stringshare_ref(file); - fwin->win->client->internal_icon_key = eina_stringshare_ref(group); + ec->internal_icon = eina_stringshare_ref(file); + ec->internal_icon_key = eina_stringshare_ref(group); } evas_object_del(oic); - if (fwin->win->client->placed) return; + if (ec->placed) return; if (e_config->remember_internal_fm_windows_globally) class = fwin_class; else class = eina_stringshare_printf("e_fwin::%s", e_fm2_real_path_get(fwin->cur_page->fm_obj)); - e_zone_useful_geometry_get(fwin->win->client->zone, + e_zone_useful_geometry_get(e_comp_object_util_zone_get(fwin->win), NULL, NULL, &zw, &zh); EINA_LIST_FOREACH(e_config->remembers, ll, rem) if (rem->class == class) @@ -2316,8 +2295,8 @@ _e_fwin_border_set(E_Fwin_Page *page, E_Fwin *fwin, E_Fm2_Icon_Info *ici) ny = (iy + (ih / 2)); if (page->fwin->win) { - nx += page->fwin->win->x; - ny += page->fwin->win->y; + nx += ec->x; + ny += ec->y; } /* checking width and height */ @@ -2332,13 +2311,13 @@ _e_fwin_border_set(E_Fwin_Page *page, E_Fwin *fwin, E_Fm2_Icon_Info *ici) h = zh; /* iff going out of zone - adjust to be in */ - if ((fwin->win->client->zone->x + fwin->win->client->zone->w) < (w + nx)) + if ((ec->zone->x + ec->zone->w) < (w + nx)) nx -= w; - if ((fwin->win->client->zone->y + fwin->win->client->zone->h) < (h + ny)) + if ((ec->zone->y + ec->zone->h) < (h + ny)) ny -= h; - e_win_move_resize(fwin->win, nx, ny, w, h); - fwin->win->client->placed = 1; + evas_object_geometry_set(fwin->win, nx, ny, w, h); + ec->placed = 1; } static E_Fwin * @@ -2355,9 +2334,9 @@ _e_fwin_open(E_Fwin_Page *page, E_Fm2_Icon_Info *ici, Eina_Bool force, int *need if (new_fwin) { if (page->fwin->win) - fwin = _e_fwin_new(page->fwin->win->comp, ici->link, "/"); + fwin = _e_fwin_new(ici->link, "/"); else if (page->fwin->zone) - fwin = _e_fwin_new(page->fwin->zone->comp, ici->link, "/"); + fwin = _e_fwin_new(ici->link, "/"); } else { @@ -2372,9 +2351,9 @@ _e_fwin_open(E_Fwin_Page *page, E_Fm2_Icon_Info *ici, Eina_Bool force, int *need if (new_fwin) { if (page->fwin->win) - fwin = _e_fwin_new(page->fwin->win->comp, buf, "/"); + fwin = _e_fwin_new(buf, "/"); else if (page->fwin->zone) - fwin = _e_fwin_new(page->fwin->zone->comp, buf, "/"); + fwin = _e_fwin_new(buf, "/"); } else { @@ -2390,9 +2369,9 @@ _e_fwin_open(E_Fwin_Page *page, E_Fm2_Icon_Info *ici, Eina_Bool force, int *need if (new_fwin) { if (page->fwin->win) - fwin = _e_fwin_new(page->fwin->win->comp, NULL, ici->real_link); + fwin = _e_fwin_new(NULL, ici->real_link); else if (page->fwin->zone) - fwin = _e_fwin_new(page->fwin->zone->comp, NULL, ici->real_link); + fwin = _e_fwin_new(NULL, ici->real_link); } else { @@ -2414,9 +2393,9 @@ _e_fwin_open(E_Fwin_Page *page, E_Fm2_Icon_Info *ici, Eina_Bool force, int *need if (new_fwin) { if (page->fwin->win) - fwin = _e_fwin_new(page->fwin->win->comp, NULL, ici->link ?: buf); + fwin = _e_fwin_new(NULL, ici->link ?: buf); else if (page->fwin->zone) - fwin = _e_fwin_new(page->fwin->zone->comp, NULL, ici->link ?: buf); + fwin = _e_fwin_new(NULL, ici->link ?: buf); } else { @@ -2431,7 +2410,7 @@ _e_fwin_open(E_Fwin_Page *page, E_Fm2_Icon_Info *ici, Eina_Bool force, int *need } } if (!fwin) return NULL; - if ((!fwin->win) || (!fwin->win->client)) + if ((!fwin->win) || (!e_win_client_get(fwin->win))) { _e_fwin_free(fwin); return NULL; @@ -2532,7 +2511,7 @@ _e_fwin_file_open_dialog(E_Fwin_Page *page, { if (fwin->win) { - if (e_exec(fwin->win->client->zone, desk, NULL, files_list, "fwin")) + if (e_exec(e_comp_object_util_zone_get(fwin->win), desk, NULL, files_list, "fwin")) need_dia = 0; } else if (fwin->zone) @@ -2560,10 +2539,10 @@ _e_fwin_file_open_dialog(E_Fwin_Page *page, } if (fwin->win) - dia = e_dialog_new(fwin->win->comp, + dia = e_dialog_new(NULL, "E", "_fwin_open_apps"); else if (fwin->zone) - dia = e_dialog_new(fwin->zone->comp, + dia = e_dialog_new(NULL, "E", "_fwin_open_apps"); else return; /* make clang happy */ @@ -2581,7 +2560,7 @@ _e_fwin_file_open_dialog(E_Fwin_Page *page, dia->data = fad; e_object_free_attach_func_set(E_OBJECT(dia), _e_fwin_cb_dialog_free); - evas = e_win_evas_get(dia->win); + evas = evas_object_evas_get(dia->win); ol = e_widget_list_add(evas, 0, 0); diff --git a/src/modules/fileman/e_int_config_mime.c b/src/modules/fileman/e_int_config_mime.c index 038bf45269..7020b042d6 100644 --- a/src/modules/fileman/e_int_config_mime.c +++ b/src/modules/fileman/e_int_config_mime.c @@ -45,7 +45,7 @@ static void _cb_config(void *data, void *data2); Eina_List *types = NULL; E_Config_Dialog * -e_int_config_mime(E_Comp *comp, const char *params __UNUSED__) +e_int_config_mime(Evas_Object *parent EINA_UNUSED, const char *params __UNUSED__) { E_Config_Dialog *cfd; E_Config_Dialog_View *v; @@ -57,7 +57,7 @@ e_int_config_mime(E_Comp *comp, const char *params __UNUSED__) v->free_cfdata = _free_data; v->basic.create_widgets = _basic_create; - cfd = e_config_dialog_new(comp, _("File Icons"), "E", "fileman/file_icons", + cfd = e_config_dialog_new(NULL, _("File Icons"), "E", "fileman/file_icons", "preferences-file-icons", 0, v, NULL); return cfd; } diff --git a/src/modules/fileman/e_int_config_mime_edit.c b/src/modules/fileman/e_int_config_mime_edit.c index 58310ef9d0..dbcc8bedb4 100644 --- a/src/modules/fileman/e_int_config_mime_edit.c +++ b/src/modules/fileman/e_int_config_mime_edit.c @@ -291,7 +291,7 @@ _cb_icon_sel(void *data, void *data2) cfd = data2; if (!cfd) return; - dia = e_dialog_new(cfd->comp, "E", "_mime_icon_select_dialog"); + dia = e_dialog_new(NULL, "E", "_mime_icon_select_dialog"); if (!dia) return; if (cfdata->type == EDJ) e_dialog_title_set(dia, _("Select an Edje file")); @@ -301,7 +301,7 @@ _cb_icon_sel(void *data, void *data2) dia->data = cfdata; e_object_del_attach_func_set(E_OBJECT(dia), _dia_del); - o = e_widget_fsel_add(dia->win->evas, "~/", "/", NULL, NULL, + o = e_widget_fsel_add(evas_object_evas_get(dia->win), "~/", "/", NULL, NULL, _cb_fsel_sel, cfdata, NULL, cfdata, 1); cfdata->gui.fsel_wid = o; @@ -311,7 +311,7 @@ _cb_icon_sel(void *data, void *data2) e_dialog_button_add(dia, _("OK"), NULL, _cb_fsel_ok, cfdata); e_dialog_button_add(dia, _("Cancel"), NULL, _cb_fsel_cancel, cfdata); - e_win_centered_set(dia->win, 1); + elm_win_center(dia->win, 1, 1); e_dialog_show(dia); e_dialog_border_icon_set(dia, "enlightenment/file_icons"); diff --git a/src/modules/fileman/e_mod_config.c b/src/modules/fileman/e_mod_config.c index b9e52ef982..cce53b87e5 100644 --- a/src/modules/fileman/e_mod_config.c +++ b/src/modules/fileman/e_mod_config.c @@ -107,7 +107,7 @@ static Evas_Object *_basic_create(E_Config_Dialog *cfd, E_Config_Dialog_Data *cfdata); E_Config_Dialog * -e_int_config_fileman(E_Comp *comp, const char *params __UNUSED__) +e_int_config_fileman(Evas_Object *parent EINA_UNUSED, const char *params __UNUSED__) { E_Config_Dialog *cfd; E_Config_Dialog_View *v; @@ -120,7 +120,7 @@ e_int_config_fileman(E_Comp *comp, const char *params __UNUSED__) v->basic.create_widgets = _basic_create; v->basic.check_changed = _basic_check_changed; - cfd = e_config_dialog_new(comp, _("File Manager Settings"), "E", + cfd = e_config_dialog_new(NULL, _("File Manager Settings"), "E", "fileman/fileman", "system-file-manager", 0, v, NULL); return cfd; diff --git a/src/modules/fileman/e_mod_main.h b/src/modules/fileman/e_mod_main.h index c9c4a9dbf4..5cf4f056d8 100644 --- a/src/modules/fileman/e_mod_main.h +++ b/src/modules/fileman/e_mod_main.h @@ -110,9 +110,9 @@ Fileman_Path *e_mod_fileman_path_find(E_Zone *zone); E_Menu *e_mod_menu_add(E_Menu *m, const char *path); -E_Config_Dialog *e_int_config_fileman(E_Comp *comp, const char *params __UNUSED__); +E_Config_Dialog *e_int_config_fileman(Evas_Object *parent, const char *params __UNUSED__); E_Config_Dialog *e_int_config_mime_edit(E_Config_Mime_Icon *data, void *data2); -E_Config_Dialog *e_int_config_mime(E_Comp *comp, const char *params __UNUSED__); +E_Config_Dialog *e_int_config_mime(Evas_Object *parent, const char *params __UNUSED__); void e_int_config_mime_edit_done(void *data); void e_fileman_dbus_init(void); diff --git a/src/modules/fileman_opinfo/e_mod_main.c b/src/modules/fileman_opinfo/e_mod_main.c index 6213a3eba5..91628cfe05 100644 --- a/src/modules/fileman_opinfo/e_mod_main.c +++ b/src/modules/fileman_opinfo/e_mod_main.c @@ -251,7 +251,8 @@ _opinfo_op_registry_window_jump_cb(void *data, Evas_Object *obj __UNUSED__, cons { int id = (long)data; E_Fm2_Op_Registry_Entry *ere; - E_Win *win; + Evas_Object *win; + E_Client *ec; if (!id) return; ere = e_fm2_op_registry_entry_get(id); @@ -261,23 +262,13 @@ _opinfo_op_registry_window_jump_cb(void *data, Evas_Object *obj __UNUSED__, cons win = (ere->needs_attention && ere->dialog) ? ere->dialog->win : e_win_evas_object_win_get(ere->e_fm); if (!win) return; - - if (win->client) - { - if (win->client->iconic) - e_client_uniconify(win->client); - if (win->client->shaded) - e_client_unshade(win->client, win->client->shade_dir); - } + + ec = e_win_client_get(win); + if (ec) + e_client_activate(ec, 1); else - e_win_show(win); - e_win_raise(win); - if (!win->client) return; - e_desk_show(win->client->desk); - e_client_focus_set_with_pointer(win->client); - - if (ere->needs_attention && e_config->pointer_slide) - e_client_pointer_warp_to_center(win->client); + evas_object_show(win); + elm_win_raise(win); } static Eina_Bool diff --git a/src/modules/gadman/e_mod_config.c b/src/modules/gadman/e_mod_config.c index f56bdc02a3..ad520547f1 100644 --- a/src/modules/gadman/e_mod_config.c +++ b/src/modules/gadman/e_mod_config.c @@ -57,7 +57,7 @@ _basic_check_changed(E_Config_Dialog *cfd __UNUSED__, E_Config_Dialog_Data *cfda } E_Config_Dialog * -_config_gadman_module(E_Comp *comp, const char *params __UNUSED__) +_config_gadman_module(Evas_Object *parent EINA_UNUSED, const char *params __UNUSED__) { E_Config_Dialog *cfd; E_Config_Dialog_View *v; @@ -76,7 +76,7 @@ _config_gadman_module(E_Comp *comp, const char *params __UNUSED__) v->basic.check_changed = _basic_check_changed; snprintf(buf, sizeof(buf), "%s/e-module-gadman.edj", Man->module->dir); - cfd = e_config_dialog_new(comp, _("Desktop Gadgets"), + cfd = e_config_dialog_new(NULL, _("Desktop Gadgets"), "E", "extensions/gadman", buf, 0, v, Man); @@ -151,7 +151,7 @@ _cb_config(void *data, void *data2 __UNUSED__) EINA_LIST_FOREACH(Man->gadcons[x], l, gc) { - if (gc->zone != cfdata->cfd->dia->win->client->zone) continue; + if (gc->zone != e_win_client_get(cfdata->cfd->dia->win)->zone) continue; if (gc->config_dialog) return; e_int_gadcon_config_hook(gc, _("Desktop Gadgets"), E_GADCON_SITE_DESKTOP); if (!Man->add) diff --git a/src/modules/gadman/e_mod_gadman.c b/src/modules/gadman/e_mod_gadman.c index c28428c023..e0e83bc1d1 100644 --- a/src/modules/gadman/e_mod_gadman.c +++ b/src/modules/gadman/e_mod_gadman.c @@ -1225,11 +1225,11 @@ on_menu_edit(void *data, E_Menu *m __UNUSED__, E_Menu_Item *mi __UNUSED__) } static void -on_menu_add(void *data __UNUSED__, E_Menu *m, E_Menu_Item *mi __UNUSED__) +on_menu_add(void *data __UNUSED__, E_Menu *m EINA_UNUSED, E_Menu_Item *mi __UNUSED__) { if (Man->visible) gadman_gadgets_hide(); - e_configure_registry_call("extensions/gadman", m->zone->comp, NULL); + e_configure_registry_call("extensions/gadman", NULL, NULL); } static void diff --git a/src/modules/gadman/e_mod_gadman.h b/src/modules/gadman/e_mod_gadman.h index 0d7e533812..ae7aa2d00a 100644 --- a/src/modules/gadman/e_mod_gadman.h +++ b/src/modules/gadman/e_mod_gadman.h @@ -85,7 +85,7 @@ void gadman_gadgets_toggle(void); void gadman_update_bg(void); Eina_Bool gadman_gadget_add_handler(void *d, int type, E_Event_Gadcon_Client_Add *ev); -E_Config_Dialog *_config_gadman_module(E_Comp *comp, const char *params __UNUSED__); +E_Config_Dialog *_config_gadman_module(Evas_Object *parent, const char *params __UNUSED__); /** * @addtogroup Optional_Gadgets diff --git a/src/modules/gadman/e_mod_main.c b/src/modules/gadman/e_mod_main.c index a07d418fb7..0a5f9ff13b 100644 --- a/src/modules/gadman/e_mod_main.c +++ b/src/modules/gadman/e_mod_main.c @@ -189,9 +189,9 @@ _gadman_desktop_menu(void *d __UNUSED__, E_Menu *m, void *icon) } static void -_gadman_maug_cb(void *data __UNUSED__, E_Menu *m, E_Menu_Item *mi __UNUSED__) +_gadman_maug_cb(void *data __UNUSED__, E_Menu *m EINA_UNUSED, E_Menu_Item *mi __UNUSED__) { - e_configure_registry_call("extensions/gadman", m->zone->comp, NULL); + e_configure_registry_call("extensions/gadman", NULL, NULL); } static void diff --git a/src/modules/ibar/e_mod_config.c b/src/modules/ibar/e_mod_config.c index dc91fc8779..7d7b17bb0d 100644 --- a/src/modules/ibar/e_mod_config.c +++ b/src/modules/ibar/e_mod_config.c @@ -221,8 +221,7 @@ _cb_config(void *data, void *data2 __UNUSED__) cfdata = data; e_user_dir_snprintf(path, sizeof(path), "applications/bar/%s/.order", cfdata->dir); - e_configure_registry_call("internal/ibar_other", - NULL, path); + e_configure_registry_call("internal/ibar_other", NULL, path); } static void diff --git a/src/modules/ibar/e_mod_main.c b/src/modules/ibar/e_mod_main.c index d26ad6a19d..3f7f8a025e 100644 --- a/src/modules/ibar/e_mod_main.c +++ b/src/modules/ibar/e_mod_main.c @@ -1046,7 +1046,7 @@ static void _ibar_cb_menu_icon_new(void *data __UNUSED__, E_Menu *m __UNUSED__, E_Menu_Item *mi __UNUSED__) { if (!e_configure_registry_exists("applications/new_application")) return; - e_configure_registry_call("applications/new_application", e_comp_get(NULL), NULL); + e_configure_registry_call("applications/new_application", NULL, NULL); } static void @@ -1058,8 +1058,7 @@ _ibar_cb_menu_icon_add(void *data, E_Menu *m __UNUSED__, E_Menu_Item *mi __UNUSE b = data; e_user_dir_snprintf(path, sizeof(path), "applications/bar/%s/.order", b->inst->ci->dir); - e_configure_registry_call("internal/ibar_other", - NULL, path); + e_configure_registry_call("internal/ibar_other", NULL, path); } static void diff --git a/src/modules/illume-home/e_busycover.c b/src/modules/illume-home/e_busycover.c index bd9035cedc..88870163e6 100644 --- a/src/modules/illume-home/e_busycover.c +++ b/src/modules/illume-home/e_busycover.c @@ -16,7 +16,7 @@ e_busycover_new(E_Win *win) snprintf(buff, sizeof(buff), "%s/e-module-illume-home.edj", il_home_cfg->mod_dir); - cover->o_base = edje_object_add(e_win_evas_get(win)); + cover->o_base = edje_object_add(evas_object_evas_get(win)); if (!e_theme_edje_object_set(cover->o_base, "base/theme/modules/illume-home", "modules/illume-home/busycover")) diff --git a/src/modules/illume-home/e_mod_config.c b/src/modules/illume-home/e_mod_config.c index df489fd1d0..73d3fdcb30 100644 --- a/src/modules/illume-home/e_mod_config.c +++ b/src/modules/illume-home/e_mod_config.c @@ -107,7 +107,7 @@ il_home_config_show(E_Comp *comp, const char *params __UNUSED__) v->normal_win = 1; v->scroll = 1; - cfd = e_config_dialog_new(comp, _("Home Settings"), "E", + cfd = e_config_dialog_new(NULL, _("Home Settings"), "E", "_config_illume_home_settings", "enlightenment/launcher_settings", 0, v, NULL); il_home_cfg->cfd = cfd; diff --git a/src/modules/illume-home/e_mod_main.c b/src/modules/illume-home/e_mod_main.c index 539fd2e232..19b0acff88 100644 --- a/src/modules/illume-home/e_mod_main.c +++ b/src/modules/illume-home/e_mod_main.c @@ -402,13 +402,13 @@ _il_home_win_new(E_Zone *zone) hwin->win->data = hwin; e_win_title_set(hwin->win, _("Illume Home")); e_win_name_class_set(hwin->win, "Illume-Home", "Illume-Home"); - e_win_resize_callback_set(hwin->win, _il_home_win_cb_resize); + evas_object_resize_callback_set(hwin->win, _il_home_win_cb_resize); e_win_no_remember_set(hwin->win, EINA_TRUE); snprintf(buff, sizeof(buff), "%s/e-module-illume-home.edj", il_home_cfg->mod_dir); - evas = e_win_evas_get(hwin->win); + evas = evas_object_evas_get(hwin->win); desk = e_desk_current_get(zone); if (desk) @@ -446,8 +446,8 @@ _il_home_win_new(E_Zone *zone) hwin->cover = e_busycover_new(hwin->win); - e_win_move_resize(hwin->win, zone->x, zone->y, zone->w, (zone->h / 2)); - e_win_show(hwin->win); + evas_object_geometry_set(hwin->win, zone->x, zone->y, zone->w, (zone->h / 2)); + evas_object_show(hwin->win); e_client_zone_set(hwin->win->client, zone); if (hwin->win->evas_win) e_drop_xdnd_register_set(hwin->win->evas_win, EINA_TRUE); diff --git a/src/modules/illume-indicator/e_mod_ind_win.c b/src/modules/illume-indicator/e_mod_ind_win.c index 79768b28d1..e0cc83f83e 100644 --- a/src/modules/illume-indicator/e_mod_ind_win.c +++ b/src/modules/illume-indicator/e_mod_ind_win.c @@ -45,7 +45,7 @@ e_mod_ind_win_new(E_Zone *zone) e_win_no_remember_set(iwin->win, EINA_TRUE); /* hook into window resize so we can resize our objects */ - e_win_resize_callback_set(iwin->win, _e_mod_ind_win_cb_resize); + evas_object_resize_callback_set(iwin->win, _e_mod_ind_win_cb_resize); /* set this window to not show in taskbar or pager */ states[0] = ECORE_X_WINDOW_STATE_SKIP_TASKBAR; @@ -121,13 +121,13 @@ e_mod_ind_win_new(E_Zone *zone) // printf("@@@@@@@@@@@@@@@@@@@@@@@ %i: %ix%i\n", h, mw, mh); /* set minimum size of this window */ - e_win_size_min_set(iwin->win, zone->w, mh); + evas_object_size_hint_min_set(iwin->win, zone->w, mh); /* position and resize this window */ - e_win_move_resize(iwin->win, zone->x, zone->y, zone->w, mh); + evas_object_geometry_set(iwin->win, zone->x, zone->y, zone->w, mh); /* show the window */ - e_win_show(iwin->win); + evas_object_show(iwin->win); /* set this window on proper zone */ e_client_zone_set(iwin->win->client, zone); @@ -203,7 +203,7 @@ _e_mod_ind_win_cb_win_prop(void *data, int type __UNUSED__, void *event) // printf("@@@@@@@@@@@@@@@@@@@@@@@ %i: %ix%i\n", h, mw, mh); /* set minimum size of this window */ - e_win_size_min_set(iwin->win, iwin->zone->w, mh); + evas_object_size_hint_min_set(iwin->win, iwin->zone->w, mh); /* NB: Not sure why, but we need to tell this border to fetch icccm * size position hints now :( (NOTE: This was not needed a few days ago) @@ -211,7 +211,7 @@ _e_mod_ind_win_cb_win_prop(void *data, int type __UNUSED__, void *event) iwin->win->client->icccm.fetch.size_pos_hints = 1; /* resize this window */ - e_win_resize(iwin->win, iwin->zone->w, mh); + evas_object_resize(iwin->win, iwin->zone->w, mh); /* tell conformant apps our position and size */ ecore_x_e_illume_indicator_geometry_set(iwin->zone->black_win, @@ -236,7 +236,7 @@ _e_mod_ind_win_cb_zone_resize(void *data, int type __UNUSED__, void *event) // printf("@@@@@@@@@@@@@@@@@@@@@@@ %i: %ix%i\n", h, mw, mh); /* set minimum size of this window to match zone size */ - e_win_size_min_set(iwin->win, ev->zone->w, mh); + evas_object_size_hint_min_set(iwin->win, ev->zone->w, mh); return ECORE_CALLBACK_PASS_ON; } @@ -418,7 +418,7 @@ _e_mod_ind_win_cb_mouse_move(void *data, Evas *evas __UNUSED__, Evas_Object *obj ec->y = ny; ec->changes.pos = 1; EC_CHANGED(ec); - e_win_move(iwin->win, iwin->win->x, ny); + evas_object_move(iwin->win, iwin->win->x, ny); } } } @@ -519,8 +519,8 @@ _e_mod_ind_win_cb_menu_contents(void *data, E_Menu *mn __UNUSED__, E_Menu_Item * e_int_gadcon_config_shelf(iwin->gadcon); else { - e_win_show(iwin->gadcon->config_dialog->dia->win); - e_win_raise(iwin->gadcon->config_dialog->dia->win); + evas_object_show(iwin->gadcon->config_dialog->dia->win); + elm_win_raise(iwin->gadcon->config_dialog->dia->win); } } diff --git a/src/modules/illume-indicator/e_mod_notify.c b/src/modules/illume-indicator/e_mod_notify.c index a883307523..5fe68119f7 100644 --- a/src/modules/illume-indicator/e_mod_notify.c +++ b/src/modules/illume-indicator/e_mod_notify.c @@ -160,7 +160,7 @@ _e_mod_notify_refresh(Ind_Notify_Win *nwin) edje_object_size_min_calc(nwin->o_base, &mw, &mh); evas_object_size_hint_min_set(nwin->o_base, mw, mh); - e_win_size_min_set(nwin->win, nwin->zone->w, mh); + evas_object_size_hint_min_set(nwin->win, nwin->zone->w, mh); } static Ind_Notify_Win * @@ -185,7 +185,7 @@ _e_mod_notify_new(E_Notification_Notify *n, unsigned id) e_win_name_class_set(nwin->win, "Illume-Notify", "Illume-Notify"); e_win_no_remember_set(nwin->win, EINA_TRUE); - e_win_resize_callback_set(nwin->win, _e_mod_notify_cb_resize); + evas_object_resize_callback_set(nwin->win, _e_mod_notify_cb_resize); ecore_x_e_illume_quickpanel_set(nwin->win->evas_win, EINA_TRUE); ecore_x_e_illume_quickpanel_priority_major_set(nwin->win->evas_win, n->urgency); @@ -213,7 +213,7 @@ _e_mod_notify_new(E_Notification_Notify *n, unsigned id) _e_mod_notify_refresh(nwin); - e_win_show(nwin->win); + evas_object_show(nwin->win); e_client_zone_set(nwin->win->client, zone); nwin->win->client->user_skip_winlist = 1; diff --git a/src/modules/illume-keyboard/e_kbd_int.c b/src/modules/illume-keyboard/e_kbd_int.c index 6dacbd83e1..4b862f081b 100644 --- a/src/modules/illume-keyboard/e_kbd_int.c +++ b/src/modules/illume-keyboard/e_kbd_int.c @@ -1737,12 +1737,12 @@ e_kbd_int_new(const char *themedir, const char *syskbds, const char *sysdicts) mh = zone->h; if (mw > mh) - e_win_resize(ki->win, mw, (mh / 2)); + evas_object_resize(ki->win, mw, (mh / 2)); else - e_win_resize(ki->win, mw, mh); + evas_object_resize(ki->win, mw, mh); - e_win_resize_callback_set(ki->win, _e_kbd_int_cb_resize); - e_win_borderless_set(ki->win, 1); + evas_object_resize_callback_set(ki->win, _e_kbd_int_cb_resize); + elm_win_borderless_set(ki->win, 1); ki->win->data = ki; e_win_name_class_set(ki->win, "Virtual-Keyboard", "Virtual-Keyboard"); e_win_title_set(ki->win, "Virtual Keyboard"); @@ -1796,7 +1796,7 @@ e_kbd_int_new(const char *themedir, const char *syskbds, const char *sysdicts) evas_object_resize(ki->base_obj, zone->w, mh); evas_object_show(ki->base_obj); - e_win_size_min_set(ki->win, mw, mh); + evas_object_size_hint_min_set(ki->win, mw, mh); ecore_x_e_virtual_keyboard_set(ki->win->evas_win, 1); ki->client_message_handler = @@ -1806,7 +1806,7 @@ e_kbd_int_new(const char *themedir, const char *syskbds, const char *sysdicts) ecore_event_handler_add(E_EVENT_CLIENT_MOVE, _e_kbd_int_cb_border_move, ki); - e_win_show(ki->win); + evas_object_show(ki->win); ki->win->client->user_skip_winlist = 1; ki->win->client->lock_focus_in = 1; ki->win->client->lock_focus_out = 1; diff --git a/src/modules/illume-keyboard/e_mod_config.c b/src/modules/illume-keyboard/e_mod_config.c index 234bda67f8..0eb987258c 100644 --- a/src/modules/illume-keyboard/e_mod_config.c +++ b/src/modules/illume-keyboard/e_mod_config.c @@ -125,7 +125,7 @@ il_kbd_config_show(E_Comp *comp, const char *params __UNUSED__) v->normal_win = 1; v->scroll = 1; - cfd = e_config_dialog_new(comp, _("Keyboard Settings"), "E", + cfd = e_config_dialog_new(NULL, _("Keyboard Settings"), "E", "_config_illume_keyboard_settings", "enlightenment/keyboard_settings", 0, v, NULL); il_kbd_cfg->cfd = cfd; diff --git a/src/modules/illume-softkey/e_mod_sft_win.c b/src/modules/illume-softkey/e_mod_sft_win.c index c2fd2d04a5..5a86138cd0 100644 --- a/src/modules/illume-softkey/e_mod_sft_win.c +++ b/src/modules/illume-softkey/e_mod_sft_win.c @@ -54,7 +54,7 @@ e_mod_sft_win_new(E_Zone *zone) e_win_no_remember_set(swin->win, EINA_TRUE); /* hook into window resize so we can resize our objects */ - e_win_resize_callback_set(swin->win, _e_mod_sft_win_cb_resize); + evas_object_resize_callback_set(swin->win, _e_mod_sft_win_cb_resize); /* set this window to not show in taskbar or pager */ states[0] = ECORE_X_WINDOW_STATE_SKIP_TASKBAR; @@ -90,15 +90,15 @@ e_mod_sft_win_new(E_Zone *zone) mh = E_CLAMP(mh, 10, zone->h / 3); /* set minimum size of this window */ - e_win_size_min_set(swin->win, zone->w, mh); + evas_object_size_hint_min_set(swin->win, zone->w, mh); /* position and resize this window */ - e_win_move_resize(swin->win, zone->x, + evas_object_geometry_set(swin->win, zone->x, (zone->y + zone->h - (il_sft_cfg->height * e_scale)), zone->w, mh); /* show the window */ - e_win_show(swin->win); + evas_object_show(swin->win); e_client_zone_set(swin->win->client, zone); swin->win->client->user_skip_winlist = 1; @@ -184,7 +184,7 @@ _e_mod_sft_win_cb_win_prop(void *data, int type __UNUSED__, void *event) if (ev->atom != ATM_ENLIGHTENMENT_SCALE) return ECORE_CALLBACK_PASS_ON; /* set minimum size of this window */ - e_win_size_min_set(swin->win, swin->zone->w, (il_sft_cfg->height * e_scale)); + evas_object_size_hint_min_set(swin->win, swin->zone->w, (il_sft_cfg->height * e_scale)); /* NB: Not sure why, but we need to tell this border to fetch icccm * size position hints now :( (NOTE: This was not needed a few days ago) @@ -192,7 +192,7 @@ _e_mod_sft_win_cb_win_prop(void *data, int type __UNUSED__, void *event) swin->win->client->icccm.fetch.size_pos_hints = 1; /* resize this window */ - e_win_resize(swin->win, swin->zone->w, (il_sft_cfg->height * e_scale)); + evas_object_resize(swin->win, swin->zone->w, (il_sft_cfg->height * e_scale)); /* tell conformant apps our position and size */ ecore_x_e_illume_softkey_geometry_set(swin->zone->black_win, @@ -213,7 +213,7 @@ _e_mod_sft_win_cb_zone_resize(void *data, int type __UNUSED__, void *event) if (ev->zone != swin->zone) return ECORE_CALLBACK_PASS_ON; /* set minimum size of this window */ - e_win_size_min_set(swin->win, ev->zone->w, (il_sft_cfg->height * e_scale)); + evas_object_size_hint_min_set(swin->win, ev->zone->w, (il_sft_cfg->height * e_scale)); return ECORE_CALLBACK_PASS_ON; } diff --git a/src/modules/illume2/e_mod_config_animation.c b/src/modules/illume2/e_mod_config_animation.c index ea420d47c3..1432d9007f 100644 --- a/src/modules/illume2/e_mod_config_animation.c +++ b/src/modules/illume2/e_mod_config_animation.c @@ -28,7 +28,7 @@ e_mod_illume_config_animation_show(E_Comp *comp, const char *params __UNUSED__) v->normal_win = 1; v->scroll = 1; - cfd = e_config_dialog_new(comp, _("Animation Settings"), "E", + cfd = e_config_dialog_new(NULL, _("Animation Settings"), "E", "illume/animation", "enlightenment/animation_settings", 0, v, NULL); if (!cfd) return; diff --git a/src/modules/illume2/e_mod_config_policy.c b/src/modules/illume2/e_mod_config_policy.c index 9b4561fcc5..8d27de5a26 100644 --- a/src/modules/illume2/e_mod_config_policy.c +++ b/src/modules/illume2/e_mod_config_policy.c @@ -30,7 +30,7 @@ e_mod_illume_config_policy_show(E_Comp *comp, const char *params __UNUSED__) v->basic_only = 1; v->normal_win = 1; v->scroll = 1; - cfd = e_config_dialog_new(comp, _("Policy"), "E", "illume/policy", + cfd = e_config_dialog_new(NULL, _("Policy"), "E", "illume/policy", "enlightenment/policy", 0, v, NULL); if (!cfd) return; } diff --git a/src/modules/illume2/e_mod_config_windows.c b/src/modules/illume2/e_mod_config_windows.c index 57a2354078..7644d06392 100644 --- a/src/modules/illume2/e_mod_config_windows.c +++ b/src/modules/illume2/e_mod_config_windows.c @@ -34,7 +34,7 @@ e_mod_illume_config_windows_show(E_Comp *comp, const char *params __UNUSED__) v->basic_only = 1; v->normal_win = 1; v->scroll = 1; - cfd = e_config_dialog_new(comp, _("Window Settings"), "E", + cfd = e_config_dialog_new(NULL, _("Window Settings"), "E", "illume/windows", "preferences-system-windows", 0, v, NULL); if (!cfd) return; diff --git a/src/modules/lokker/e_mod_main.h b/src/modules/lokker/e_mod_main.h index 111235ff13..027e3a0324 100644 --- a/src/modules/lokker/e_mod_main.h +++ b/src/modules/lokker/e_mod_main.h @@ -26,5 +26,5 @@ typedef enum EINTERN Eina_Bool lokker_lock(void); EINTERN void lokker_unlock(void); -EAPI E_Config_Dialog *e_int_config_lokker(E_Comp *comp, const char *params EINA_UNUSED); +EAPI E_Config_Dialog *e_int_config_lokker(Evas_Object *parent, const char *params EINA_UNUSED); #endif diff --git a/src/modules/mixer/app_mixer.c b/src/modules/mixer/app_mixer.c index eba828e120..e52c682ffe 100644 --- a/src/modules/mixer/app_mixer.c +++ b/src/modules/mixer/app_mixer.c @@ -423,7 +423,7 @@ _create_ui(E_Dialog *dialog, E_Mixer_App_Dialog_Data *app) Evas *evas; int mw, mh; - evas = e_win_evas_get(dialog->win); + evas = evas_object_evas_get(dialog->win); ui->hlayout = e_widget_list_add(evas, 0, 1); _create_cards(dialog, evas, app); @@ -462,9 +462,9 @@ _mixer_app_dialog_del(E_Dialog *dialog, E_Mixer_App_Dialog_Data *app) } static void -_cb_win_del(E_Win *win) +_cb_win_del(void *data, Evas *e EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *event_info EINA_UNUSED) { - E_Dialog *dialog = win->data; + E_Dialog *dialog = data; E_Mixer_App_Dialog_Data *app = dialog->data; _mixer_app_dialog_del(dialog, app); } @@ -476,12 +476,12 @@ _cb_dialog_dismiss(void *data, E_Dialog *dialog) } E_Dialog * -e_mixer_app_dialog_new(E_Comp *comp, void (*func)(E_Dialog *dialog, void *data), void *data) +e_mixer_app_dialog_new(Evas_Object *parent EINA_UNUSED, void (*func)(E_Dialog *dialog, void *data), void *data) { E_Mixer_App_Dialog_Data *app; E_Dialog *dialog; - dialog = e_dialog_new(comp, _e_mixer_Name, "e_mixer_app_dialog"); + dialog = e_dialog_new(NULL, _e_mixer_Name, "e_mixer_app_dialog"); if (!dialog) return NULL; @@ -498,13 +498,13 @@ e_mixer_app_dialog_new(E_Comp *comp, void (*func)(E_Dialog *dialog, void *data), e_dialog_title_set(dialog, _(_e_mixer_Name)); - e_win_delete_callback_set(dialog->win, _cb_win_del); + evas_object_event_callback_add(dialog->win, EVAS_CALLBACK_DEL, _cb_win_del, dialog); _create_ui(dialog, app); e_dialog_button_add(dialog, _("Close"), NULL, _cb_dialog_dismiss, app); e_dialog_button_focus_num(dialog, 1); - e_win_centered_set(dialog->win, 1); + elm_win_center(dialog->win, 1, 1); e_dialog_show(dialog); e_dialog_border_icon_set(dialog, "preferences-desktop-mixer"); diff --git a/src/modules/mixer/conf_gadget.c b/src/modules/mixer/conf_gadget.c index 245eab64bc..4236581cc8 100644 --- a/src/modules/mixer/conf_gadget.c +++ b/src/modules/mixer/conf_gadget.c @@ -364,7 +364,7 @@ e_mixer_config_pulse_toggle(void) } E_Config_Dialog * -e_mixer_config_dialog_new(E_Comp *comp, E_Mixer_Gadget_Config *conf) +e_mixer_config_dialog_new(Evas_Object *parent EINA_UNUSED, E_Mixer_Gadget_Config *conf) { E_Config_Dialog *dialog; E_Config_Dialog_View *view; @@ -381,7 +381,7 @@ e_mixer_config_dialog_new(E_Comp *comp, E_Mixer_Gadget_Config *conf) view->basic.create_widgets = _basic_create; view->basic.apply_cfdata = _basic_apply; - dialog = e_config_dialog_new(comp, _("Mixer Settings"), + dialog = e_config_dialog_new(NULL, _("Mixer Settings"), _e_mixer_Name, "e_mixer_config_dialog_new", e_mixer_theme_path(), 0, view, conf); diff --git a/src/modules/mixer/conf_module.c b/src/modules/mixer/conf_module.c index 77e210cac9..4055e3a678 100644 --- a/src/modules/mixer/conf_module.c +++ b/src/modules/mixer/conf_module.c @@ -211,7 +211,7 @@ _basic_create(E_Config_Dialog *dialog, Evas *evas, E_Config_Dialog_Data *cfdata) } E_Config_Dialog * -e_mixer_config_module_dialog_new(E_Comp *comp, E_Mixer_Module_Context *ctxt) +e_mixer_config_module_dialog_new(Evas_Object *parent EINA_UNUSED, E_Mixer_Module_Context *ctxt) { E_Config_Dialog *dialog; E_Config_Dialog_View *view; @@ -228,7 +228,7 @@ e_mixer_config_module_dialog_new(E_Comp *comp, E_Mixer_Module_Context *ctxt) view->basic.create_widgets = _basic_create; view->basic.apply_cfdata = _basic_apply; - dialog = e_config_dialog_new(comp, _("Mixer Module Settings"), + dialog = e_config_dialog_new(NULL, _("Mixer Module Settings"), _e_mixer_Name, "extensions/mixer", e_mixer_theme_path(), 0, view, ctxt); diff --git a/src/modules/mixer/e_mod_main.c b/src/modules/mixer/e_mod_main.c index 1496145924..7d09671108 100644 --- a/src/modules/mixer/e_mod_main.c +++ b/src/modules/mixer/e_mod_main.c @@ -1166,7 +1166,7 @@ _mixer_cb_volume_mute(E_Object *obj __UNUSED__, const char *params __UNUSED__) } static E_Config_Dialog * -_mixer_module_config(E_Comp *comp, const char *params __UNUSED__) +_mixer_module_config(Evas_Object *parent EINA_UNUSED, const char *params __UNUSED__) { E_Mixer_Module_Context *ctxt; @@ -1187,7 +1187,7 @@ _mixer_module_config(E_Comp *comp, const char *params __UNUSED__) return NULL; } - ctxt->conf_dialog = e_mixer_config_module_dialog_new(comp, ctxt); + ctxt->conf_dialog = e_mixer_config_module_dialog_new(NULL, ctxt); return ctxt->conf_dialog; } diff --git a/src/modules/mixer/e_mod_main.h b/src/modules/mixer/e_mod_main.h index a105cd69d2..261abcaa94 100644 --- a/src/modules/mixer/e_mod_main.h +++ b/src/modules/mixer/e_mod_main.h @@ -89,9 +89,9 @@ EAPI void *e_modapi_init(E_Module *m); EAPI int e_modapi_shutdown(E_Module *m); EAPI int e_modapi_save(E_Module *m); -E_Config_Dialog *e_mixer_config_module_dialog_new(E_Comp *comp, E_Mixer_Module_Context *ctxt); -E_Config_Dialog *e_mixer_config_dialog_new(E_Comp *comp, E_Mixer_Gadget_Config *conf); -E_Dialog *e_mixer_app_dialog_new(E_Comp *comp, void (*func)(E_Dialog *dialog, void *data), void *data); +E_Config_Dialog *e_mixer_config_module_dialog_new(Evas_Object *parent, E_Mixer_Module_Context *ctxt); +E_Config_Dialog *e_mixer_config_dialog_new(Evas_Object *parent, E_Mixer_Gadget_Config *conf); +E_Dialog *e_mixer_app_dialog_new(Evas_Object *parent, void (*func)(E_Dialog *dialog, void *data), void *data); int e_mixer_app_dialog_select(E_Dialog *dialog, const char *card_name, const char *channel_name); int e_mixer_update(E_Mixer_Instance *inst); diff --git a/src/modules/music-control/ui.c b/src/modules/music-control/ui.c index e820e798e5..712025e109 100644 --- a/src/modules/music-control/ui.c +++ b/src/modules/music-control/ui.c @@ -244,7 +244,7 @@ _cb_menu_cfg(void *data, E_Menu *m, E_Menu_Item *mi __UNUSED__) v->basic.apply_cfdata = _cfg_data_apply; v->basic.check_changed = _cfg_check_changed; - e_config_dialog_new(m->zone->comp, _("Music control Settings"), "E", + e_config_dialog_new(NULL, _("Music control Settings"), "E", "_e_mod_music_config_dialog", NULL, 0, v, data); } diff --git a/src/modules/notification/e_mod_config.c b/src/modules/notification/e_mod_config.c index 7270cb1e06..20c3b3ecd2 100644 --- a/src/modules/notification/e_mod_config.c +++ b/src/modules/notification/e_mod_config.c @@ -29,7 +29,7 @@ static void _force_timeout_changed(void *data, Evas_Object *obj __UNUSED__); E_Config_Dialog * -e_int_config_notification_module(E_Comp *comp, +e_int_config_notification_module(Evas_Object *parent EINA_UNUSED, const char *params __UNUSED__) { E_Config_Dialog *cfd = NULL; @@ -48,7 +48,7 @@ e_int_config_notification_module(E_Comp *comp, v->basic.check_changed = _basic_check_changed; snprintf(buf, sizeof(buf), "%s/e-module-notification.edj", notification_mod->dir); - cfd = e_config_dialog_new(comp, _("Notification Settings"), "Notification", + cfd = e_config_dialog_new(NULL, _("Notification Settings"), "Notification", "extensions/notification", buf, 0, v, NULL); notification_cfg->cfd = cfd; return cfd; diff --git a/src/modules/notification/e_mod_main.h b/src/modules/notification/e_mod_main.h index c25c37bd29..0bb79d8395 100644 --- a/src/modules/notification/e_mod_main.h +++ b/src/modules/notification/e_mod_main.h @@ -82,7 +82,7 @@ EAPI int e_modapi_save(E_Module *m); void _gc_orient (E_Gadcon_Client *gcc, E_Gadcon_Orient orient); -E_Config_Dialog *e_int_config_notification_module(E_Comp *comp, const char *params); +E_Config_Dialog *e_int_config_notification_module(Evas_Object *parent, const char *params); extern E_Module *notification_mod; extern Config *notification_cfg; diff --git a/src/modules/packagekit/e_mod_config.c b/src/modules/packagekit/e_mod_config.c index 5bbaaf128c..1085f9e6b8 100644 --- a/src/modules/packagekit/e_mod_config.c +++ b/src/modules/packagekit/e_mod_config.c @@ -118,6 +118,6 @@ packagekit_config_show(E_PackageKit_Module_Context *ctxt) v->basic.apply_cfdata = _cfg_data_apply; v->basic.check_changed = _cfg_check_changed; - e_config_dialog_new(e_util_comp_current_get(), _("System Updates Settings"), + e_config_dialog_new(NULL, _("System Updates Settings"), "E", "_e_mod_packagekit_dialog", NULL, 0, v, ctxt); } diff --git a/src/modules/pager/e_mod_config.c b/src/modules/pager/e_mod_config.c index 065fdc60d9..63258b32db 100644 --- a/src/modules/pager/e_mod_config.c +++ b/src/modules/pager/e_mod_config.c @@ -55,7 +55,6 @@ _config_pager_module(Config_Item *ci) { E_Config_Dialog *cfd; E_Config_Dialog_View *v; - E_Comp *comp; char buff[PATH_MAX]; v = E_NEW(E_Config_Dialog_View, 1); @@ -72,8 +71,7 @@ _config_pager_module(Config_Item *ci) snprintf(buff, sizeof(buff), "%s/e-module-pager.edj", pager_config->module->dir); - comp = e_comp_get(NULL); - cfd = e_config_dialog_new(comp, _("Pager Settings"), "E", + cfd = e_config_dialog_new(NULL, _("Pager Settings"), "E", "_e_mod_pager_config_dialog", buff, 0, v, ci); pager_config->config_dialog = cfd; } diff --git a/src/modules/pager/e_mod_main.c b/src/modules/pager/e_mod_main.c index 17756c1d3f..66818621bc 100644 --- a/src/modules/pager/e_mod_main.c +++ b/src/modules/pager/e_mod_main.c @@ -141,7 +141,6 @@ static void _pager_window_free(Pager_Win *pw); static Pager_Popup *_pager_popup_new(E_Zone *zone, int keyaction); static void _pager_popup_free(Pager_Popup *pp); static Pager_Popup *_pager_popup_find(E_Zone *zone); -static E_Config_Dialog *_pager_config_dialog(E_Comp *comp, const char *params); /* functions for pager popup on key actions */ static int _pager_popup_show(void); @@ -884,7 +883,7 @@ _pager_inst_cb_menu_configure(void *data __UNUSED__, E_Menu *m __UNUSED__, E_Men } static E_Config_Dialog * -_pager_config_dialog(E_Comp *comp __UNUSED__, const char *params __UNUSED__) +_pager_config_dialog(Evas_Object *parent __UNUSED__, const char *params __UNUSED__) { if (!pager_config) return NULL; if (pager_config->config_dialog) return NULL; @@ -894,13 +893,9 @@ _pager_config_dialog(E_Comp *comp __UNUSED__, const char *params __UNUSED__) } static void -_pager_inst_cb_menu_virtual_desktops_dialog(void *data, E_Menu *m __UNUSED__, E_Menu_Item *mi __UNUSED__) +_pager_inst_cb_menu_virtual_desktops_dialog(void *data EINA_UNUSED, E_Menu *m __UNUSED__, E_Menu_Item *mi __UNUSED__) { - Instance *inst; - - inst = data; - e_configure_registry_call("screen/virtual_desktops", - inst->gcc->gadcon->zone->comp, NULL); + e_configure_registry_call("screen/virtual_desktops", NULL, NULL); } static void diff --git a/src/modules/pager_plain/e_mod_config.c b/src/modules/pager_plain/e_mod_config.c index 755f625f68..c451daeb41 100644 --- a/src/modules/pager_plain/e_mod_config.c +++ b/src/modules/pager_plain/e_mod_config.c @@ -55,7 +55,6 @@ _config_pager_module(Config_Item *ci) { E_Config_Dialog *cfd; E_Config_Dialog_View *v; - E_Comp *comp; char buff[PATH_MAX]; v = E_NEW(E_Config_Dialog_View, 1); @@ -72,8 +71,7 @@ _config_pager_module(Config_Item *ci) snprintf(buff, sizeof(buff), "%s/e-module-pager-plain.edj", pager_config->module->dir); - comp = e_comp_get(NULL); - cfd = e_config_dialog_new(comp, _("Pager Settings"), "E", + cfd = e_config_dialog_new(NULL, _("Pager Settings"), "E", "_e_mod_pager_config_dialog", buff, 0, v, ci); pager_config->config_dialog = cfd; } diff --git a/src/modules/pager_plain/e_mod_main.c b/src/modules/pager_plain/e_mod_main.c index d559c41306..89434f7cdb 100644 --- a/src/modules/pager_plain/e_mod_main.c +++ b/src/modules/pager_plain/e_mod_main.c @@ -158,7 +158,6 @@ static Pager_Win *_pager_desk_window_find(Pager_Desk *pd, E_Client *client static Pager_Popup *_pager_popup_new(E_Zone *zone, int keyaction); static void _pager_popup_free(Pager_Popup *pp); static Pager_Popup *_pager_popup_find(E_Zone *zone); -static E_Config_Dialog *_pager_config_dialog(E_Comp *comp, const char *params); /* functions for pager popup on key actions */ static int _pager_popup_show(void); @@ -899,7 +898,7 @@ _pager_inst_cb_menu_configure(void *data __UNUSED__, E_Menu *m __UNUSED__, E_Men } static E_Config_Dialog * -_pager_config_dialog(E_Comp *comp __UNUSED__, const char *params __UNUSED__) +_pager_config_dialog(Evas_Object *parent __UNUSED__, const char *params __UNUSED__) { if (!pager_config) return NULL; if (pager_config->config_dialog) return NULL; @@ -909,13 +908,9 @@ _pager_config_dialog(E_Comp *comp __UNUSED__, const char *params __UNUSED__) } static void -_pager_inst_cb_menu_virtual_desktops_dialog(void *data, E_Menu *m __UNUSED__, E_Menu_Item *mi __UNUSED__) +_pager_inst_cb_menu_virtual_desktops_dialog(void *data EINA_UNUSED, E_Menu *m __UNUSED__, E_Menu_Item *mi __UNUSED__) { - Instance *inst; - - inst = data; - e_configure_registry_call("screen/virtual_desktops", - inst->gcc->gadcon->zone->comp, NULL); + e_configure_registry_call("screen/virtual_desktops", NULL, NULL); } static void diff --git a/src/modules/policy_mobile/e_mod_config.c b/src/modules/policy_mobile/e_mod_config.c index 6df66f049d..5d6f12f527 100644 --- a/src/modules/policy_mobile/e_mod_config.c +++ b/src/modules/policy_mobile/e_mod_config.c @@ -363,7 +363,7 @@ e_mod_pol_conf_desk_get_by_nums(Config *conf, unsigned int comp_num, unsigned in } E_Config_Dialog * -e_int_config_pol_mobile(E_Comp *comp, const char *params EINA_UNUSED) +e_int_config_pol_mobile(Evas_Object *parent EINA_UNUSED, const char *params EINA_UNUSED) { E_Config_Dialog *cfd; E_Config_Dialog_View *v; @@ -381,7 +381,7 @@ e_int_config_pol_mobile(E_Comp *comp, const char *params EINA_UNUSED) snprintf(buf, sizeof(buf), "%s/e-module-policy-mobile.edj", e_module_dir_get(_pol_mod->module)); - cfd = e_config_dialog_new(comp, _("Mobile Policy Configuration"), "E", + cfd = e_config_dialog_new(NULL, _("Mobile Policy Configuration"), "E", "windows/policy-mobile", buf, 0, v, NULL); return cfd; } diff --git a/src/modules/policy_mobile/e_mod_main.h b/src/modules/policy_mobile/e_mod_main.h index 3e98508765..37e5561953 100644 --- a/src/modules/policy_mobile/e_mod_main.h +++ b/src/modules/policy_mobile/e_mod_main.h @@ -93,7 +93,7 @@ extern Eina_Hash *hash_pol_clients; EINTERN void e_mod_pol_conf_init(Mod *mod); EINTERN void e_mod_pol_conf_shutdown(Mod *mod); EINTERN Config_Desk *e_mod_pol_conf_desk_get_by_nums(Config *conf, unsigned int comp_num, unsigned int zone_num, int x, int y); -EINTERN E_Config_Dialog *e_int_config_pol_mobile(E_Comp *comp, const char *params EINA_UNUSED); +EINTERN E_Config_Dialog *e_int_config_pol_mobile(Evas_Object *parent, const char *params EINA_UNUSED); EINTERN void e_mod_pol_desk_add(E_Desk *desk); EINTERN void e_mod_pol_desk_del(Pol_Desk *pd); EINTERN Pol_Client *e_mod_pol_client_launcher_get(E_Zone *zone); diff --git a/src/modules/quickaccess/e_mod_config.c b/src/modules/quickaccess/e_mod_config.c index 07b98212c1..206810f838 100644 --- a/src/modules/quickaccess/e_mod_config.c +++ b/src/modules/quickaccess/e_mod_config.c @@ -217,7 +217,7 @@ _list_rename(void *data, void *list) if (cfdata->ed) { - e_win_raise(cfdata->ed->dia->win); + elm_win_raise(cfdata->ed->dia->win); return; } @@ -540,7 +540,7 @@ e_qa_config_entry_add(E_Quick_Access_Entry *entry) } E_Config_Dialog * -e_int_config_qa_module(E_Comp *comp, const char *params __UNUSED__) +e_int_config_qa_module(Evas_Object *parent EINA_UNUSED, const char *params __UNUSED__) { E_Config_Dialog *cfd; E_Config_Dialog_View *v; @@ -559,7 +559,7 @@ e_int_config_qa_module(E_Comp *comp, const char *params __UNUSED__) v->advanced.check_changed = _advanced_check_changed; snprintf(buf, sizeof(buf), "%s/e-module-quickaccess.edj", e_module_dir_get(qa_mod->module)); - cfd = e_config_dialog_new(comp, _("Quickaccess Settings"), + cfd = e_config_dialog_new(NULL, _("Quickaccess Settings"), "E", "launcher/quickaccess", buf, 32, v, NULL); return cfd; } diff --git a/src/modules/quickaccess/e_mod_main.h b/src/modules/quickaccess/e_mod_main.h index 8ce758a0ba..1fd37a0c84 100644 --- a/src/modules/quickaccess/e_mod_main.h +++ b/src/modules/quickaccess/e_mod_main.h @@ -93,7 +93,7 @@ void *e_qa_config_dd_free(void); void e_qa_config_entry_free(E_Quick_Access_Entry *entry); void e_qa_config_entry_add(E_Quick_Access_Entry *entry); void e_qa_config_entry_transient_convert(E_Quick_Access_Entry *entry); -E_Config_Dialog *e_int_config_qa_module(E_Comp *comp, const char *params __UNUSED__); +E_Config_Dialog *e_int_config_qa_module(Evas_Object *parent, const char *params __UNUSED__); char *e_qa_db_class_lookup(const char *class); diff --git a/src/modules/quickaccess/e_mod_quickaccess.c b/src/modules/quickaccess/e_mod_quickaccess.c index a3e379c0f4..04533f928b 100644 --- a/src/modules/quickaccess/e_mod_quickaccess.c +++ b/src/modules/quickaccess/e_mod_quickaccess.c @@ -329,7 +329,7 @@ _e_qa_entry_relaunch_setup_help(void *data, E_Dialog *dia) e_dialog_icon_set(dia, "enlightenment", 64); e_dialog_text_set(dia, buf); e_dialog_button_add(dia, _("Cancel"), NULL, _e_qa_entry_relaunch_setup_cancel, entry); - e_win_centered_set(dia->win, 1); + elm_win_center(dia->win, 1, 1); e_dialog_show(dia); e_object_data_set(E_OBJECT(dia), entry); e_object_del_attach_func_set(E_OBJECT(dia), _e_qa_entry_dia_hide); @@ -347,7 +347,7 @@ _e_qa_entry_relaunch_setup(E_Quick_Access_Entry *entry) if (entry->dia) { - e_win_raise(entry->dia->win); + elm_win_raise(entry->dia->win); return; } if ((!entry->class) || (!entry->name)) @@ -391,7 +391,7 @@ _e_qa_entry_relaunch_setup(E_Quick_Access_Entry *entry) e_dialog_button_add(dia, _("Continue"), NULL, _e_qa_entry_relaunch_setup_continue, entry); e_dialog_button_add(dia, _("More Help"), NULL, _e_qa_entry_relaunch_setup_help, entry); e_dialog_button_add(dia, _("Cancel"), NULL, _e_qa_entry_relaunch_setup_cancel, entry); - e_win_centered_set(dia->win, 1); + elm_win_center(dia->win, 1, 1); e_dialog_show(dia); e_object_data_set(E_OBJECT(dia), entry); e_object_del_attach_func_set(E_OBJECT(dia), _e_qa_entry_dia_hide); @@ -923,7 +923,7 @@ _e_qa_help_timeout(void *data __UNUSED__) if (qa_mod->demo_dia) { E_Quick_Access_Entry *entry; - entry = _e_qa_entry_find_border(qa_mod->demo_dia->win->client); + entry = _e_qa_entry_find_border(e_win_client_get(qa_mod->demo_dia->win)); e_qa_entry_free(entry); e_object_del(E_OBJECT(qa_mod->demo_dia)); } @@ -1000,7 +1000,7 @@ _e_qa_help5(void *data __UNUSED__) { char buf[PATH_MAX]; - if (_e_qa_entry_find_border(qa_mod->demo_dia->win->client)) + if (_e_qa_entry_find_border(e_win_client_get(qa_mod->demo_dia->win))) { qa_mod->help_timer = ecore_timer_add(1, _e_qa_help_timer_cb, NULL); return; @@ -1052,7 +1052,7 @@ _e_qa_help_activate_hook(E_Quick_Access_Entry *entry) default: snprintf(buf, sizeof(buf), "%s/e-module-quickaccess.edj", e_module_dir_get(qa_mod->module)); if (entry->config.hidden) - _e_qa_border_activate(_e_qa_entry_find_border(qa_mod->demo_dia->win->client)); + _e_qa_border_activate(_e_qa_entry_find_border(e_win_client_get(qa_mod->demo_dia->win))); qa_mod->help_dia = (E_Object*)e_confirm_dialog_show(_("Quickaccess Help"), buf, _("Well done.<br>" "Now to delete the entry we just made..."), @@ -1081,7 +1081,7 @@ _e_qa_help_qa_added_cb(void *data __UNUSED__) E_Quick_Access_Entry *entry; ecore_timer_thaw(qa_mod->help_timeout); - if ((!qa_mod->demo_dia) || (!_e_qa_entry_find_border(qa_mod->demo_dia->win->client))) + if ((!qa_mod->demo_dia) || (!_e_qa_entry_find_border(e_win_client_get(qa_mod->demo_dia->win)))) { _e_qa_help_timeout(NULL); return; @@ -1123,7 +1123,7 @@ _e_qa_help_timer_helper(void) E_Menu_Item *mi; Eina_List *items; - ec = qa_mod->demo_dia->win->client; + ec = e_win_client_get(qa_mod->demo_dia->win); ecore_timer_interval_set(qa_mod->help_timer, 0.2); mi = e_menu_item_active_get(); if (qa_mod->menu) @@ -1178,11 +1178,11 @@ _e_qa_help_timer2_cb(void *data __UNUSED__) { E_Client *ec; - if ((!qa_mod->demo_dia) || (!qa_mod->demo_dia->win) || (!qa_mod->demo_dia->win->client)) + if ((!qa_mod->demo_dia) || (!qa_mod->demo_dia->win) || (!e_win_client_get(qa_mod->demo_dia->win))) /* FIXME */ return EINA_TRUE; - ec = qa_mod->demo_dia->win->client; + ec = e_win_client_get(qa_mod->demo_dia->win); switch (qa_mod->demo_state) { case 0: @@ -1202,11 +1202,11 @@ _e_qa_help_timer_cb(void *data __UNUSED__) { E_Client *ec; - if ((!qa_mod->demo_dia) || (!qa_mod->demo_dia->win) || (!qa_mod->demo_dia->win->client)) + if ((!qa_mod->demo_dia) || (!qa_mod->demo_dia->win) || (!e_win_client_get(qa_mod->demo_dia->win))) /* wait longer */ return EINA_TRUE; - ec = qa_mod->demo_dia->win->client; + ec = e_win_client_get(qa_mod->demo_dia->win); switch (qa_mod->demo_state) { case 0: diff --git a/src/modules/shot/e_mod_main.c b/src/modules/shot/e_mod_main.c index aff82b0558..5e469cbf0f 100644 --- a/src/modules/shot/e_mod_main.c +++ b/src/modules/shot/e_mod_main.c @@ -15,7 +15,7 @@ static E_Module *shot_module = NULL; static E_Action *border_act = NULL, *act = NULL; static E_Int_Menu_Augmentation *maug = NULL; static Ecore_Timer *timer, *border_timer = NULL; -static E_Win *win = NULL; +static Evas_Object *win = NULL; E_Confirm_Dialog *cd = NULL; static Evas_Object *o_bg = NULL, *o_box = NULL, *o_content = NULL; static Evas_Object *o_event = NULL, *o_img = NULL, *o_hlist = NULL; @@ -44,27 +44,13 @@ static void _file_select_cancel_cb(void *data __UNUSED__, E_Dialog *dia); static void _win_cancel_cb(void *data __UNUSED__, void *data2 __UNUSED__) { - if (win) - { - e_object_del(E_OBJECT(win)); - win = NULL; - } -} - -static void -_win_delete_cb(E_Win *w __UNUSED__) -{ - if (win) - { - e_object_del(E_OBJECT(win)); - win = NULL; - } + E_FREE_FUNC(win, evas_object_del); } static void -_win_resize_cb(E_Win *w __UNUSED__) +_win_delete_cb() { - evas_object_resize(o_bg, win->w, win->h); + win = NULL; } static void @@ -81,7 +67,7 @@ _key_down_cb(void *data __UNUSED__, Evas *e __UNUSED__, Evas_Object *obj __UNUSE if (!strcmp(ev->key, "Tab")) { - if (evas_key_modifier_is_set(evas_key_modifier_get(e_win_evas_get(win)), "Shift")) + if (evas_key_modifier_is_set(evas_key_modifier_get(evas_object_evas_get(win)), "Shift")) { if (e_widget_focus_get(o_box)) { @@ -239,11 +225,7 @@ _file_select_ok_cb(void *data __UNUSED__, E_Dialog *dia) } _save_to(file); if (dia) e_util_defer_object_del(E_OBJECT(dia)); - if (win) - { - e_object_del(E_OBJECT(win)); - win = NULL; - } + E_FREE_FUNC(win, evas_object_del); fsel_dia = NULL; } @@ -277,9 +259,9 @@ _win_save_cb(void *data __UNUSED__, void *data2 __UNUSED__) strftime(buf, sizeof(buf), "shot-%Y-%m-%d_%H-%M-%S.png", tm); else strftime(buf, sizeof(buf), "shot-%Y-%m-%d_%H-%M-%S.jpg", tm); - fsel_dia = dia = e_dialog_new(scomp, "E", "_e_shot_fsel"); + fsel_dia = dia = e_dialog_new(NULL, "E", "_e_shot_fsel"); e_dialog_title_set(dia, _("Select screenshot save location")); - o = e_widget_fsel_add(dia->win->evas, "desktop", "/", + o = e_widget_fsel_add(evas_object_evas_get(dia->win), "desktop", "/", buf, NULL, NULL, NULL, @@ -294,8 +276,8 @@ _win_save_cb(void *data __UNUSED__, void *data2 __UNUSED__) _file_select_ok_cb, NULL); e_dialog_button_add(dia, _("Cancel"), NULL, _file_select_cancel_cb, NULL); - e_win_centered_set(dia->win, 1); - o = evas_object_rectangle_add(dia->win->evas); + elm_win_center(dia->win, 1, 1); + o = evas_object_rectangle_add(evas_object_evas_get(dia->win)); if (!evas_object_key_grab(o, "Return", mask, ~mask, 0)) printf("grab err\n"); mask = 0; if (!evas_object_key_grab(o, "KP_Enter", mask, ~mask, 0)) printf("grab err\n"); @@ -321,8 +303,7 @@ _upload_ok_cb(void *data __UNUSED__, E_Dialog *dia) o_label = NULL; if (dia) e_util_defer_object_del(E_OBJECT(dia)); if (!win) return; - e_object_del(E_OBJECT(win)); - win = NULL; + E_FREE_FUNC(win, evas_object_del); } static void @@ -330,11 +311,7 @@ _upload_cancel_cb(void *data __UNUSED__, E_Dialog *dia) { o_label = NULL; if (dia) e_util_defer_object_del(E_OBJECT(dia)); - if (win) - { - e_object_del(E_OBJECT(win)); - win = NULL; - } + E_FREE_FUNC(win, evas_object_del); _share_done(); } @@ -457,19 +434,11 @@ _win_share_cb(void *data __UNUSED__, void *data2 __UNUSED__) e_util_dialog_show(_("Error - Can't create file"), _("Cannot create temporary file '%s': %s"), buf, strerror(errno)); - if (win) - { - e_object_del(E_OBJECT(win)); - win = NULL; - } + E_FREE_FUNC(win, evas_object_del); return; } _save_to(buf); - if (win) - { - e_object_del(E_OBJECT(win)); - win = NULL; - } + E_FREE_FUNC(win, evas_object_del); f = fdopen(fd, "rb"); if (!f) { @@ -521,21 +490,21 @@ _win_share_cb(void *data __UNUSED__, void *data2 __UNUSED__) // out of the box ecore_con_url_http_version_set(url_up, ECORE_CON_URL_HTTP_VERSION_1_0); ecore_con_url_post(url_up, fdata, fsize, "application/x-e-shot"); - dia = e_dialog_new(scomp, "E", "_e_shot_share"); + dia = e_dialog_new(NULL, "E", "_e_shot_share"); e_dialog_title_set(dia, _("Uploading screenshot")); - o = e_widget_list_add(dia->win->evas, 0, 0); + o = e_widget_list_add(evas_object_evas_get(dia->win), 0, 0); ol = o; - o = e_widget_label_add(dia->win->evas, _("Uploading ...")); + o = e_widget_label_add(evas_object_evas_get(dia->win), _("Uploading ...")); o_label = o; e_widget_list_object_append(ol, o, 0, 0, 0.5); - o = e_widget_label_add(dia->win->evas, + o = e_widget_label_add(evas_object_evas_get(dia->win), _("Screenshot is available at this location:")); e_widget_list_object_append(ol, o, 0, 0, 0.5); - o = e_widget_entry_add(dia->win->evas, NULL, NULL, NULL, NULL); + o = e_widget_entry_add(evas_object_evas_get(dia->win), NULL, NULL, NULL, NULL); o_entry = o; e_widget_list_object_append(ol, o, 1, 0, 0.5); @@ -545,7 +514,7 @@ _win_share_cb(void *data __UNUSED__, void *data2 __UNUSED__) e_dialog_button_add(dia, _("Cancel"), NULL, _upload_cancel_cb, NULL); e_object_del_attach_func_set(E_OBJECT(dia), _win_share_del); E_LIST_HANDLER_APPEND(handlers, ECORE_CON_EVENT_URL_COMPLETE, _upload_complete_cb, eina_list_last_data_get(dia->buttons)); - e_win_centered_set(dia->win, 1); + elm_win_center(dia->win, 1, 1); e_dialog_show(dia); } @@ -706,20 +675,18 @@ _shot_now(E_Zone *zone, E_Client *ec, const char *params) dst, (sw * sizeof(int)), 0, 0); if (win) e_object_del(E_OBJECT(win)); - win = e_win_new(e_util_comp_current_get()); + win = elm_win_add(NULL, NULL, ELM_WIN_BASIC); - evas = e_win_evas_get(win); - e_win_title_set(win, _("Where to put Screenshot...")); - e_win_delete_callback_set(win, _win_delete_cb); - e_win_resize_callback_set(win, _win_resize_cb); - e_win_dialog_set(win, 1); - e_win_centered_set(win, 1); - e_win_name_class_set(win, "E", "_shot_dialog"); + evas = evas_object_evas_get(win); + elm_win_title_set(win, _("Where to put Screenshot...")); + evas_object_event_callback_add(win, EVAS_CALLBACK_DEL, _win_delete_cb, NULL); + elm_win_center(win, 1, 1); + ecore_evas_name_class_set(e_win_ee_get(win), "E", "_shot_dialog"); o = edje_object_add(evas); + elm_win_resize_object_add(win, o); o_bg = o;; e_theme_edje_object_set(o, "base/theme/dialog", "e/widgets/dialog/main"); - evas_object_move(o, 0, 0); evas_object_show(o); o = e_widget_list_add(evas, 0, 0); @@ -870,9 +837,9 @@ _shot_now(E_Zone *zone, E_Client *ec, const char *params) edje_object_size_min_calc(o_bg, &w, &h); evas_object_resize(o_bg, w, h); - e_win_resize(win, w, h); - e_win_size_min_set(win, w, h); - e_win_size_max_set(win, 99999, 99999); + evas_object_resize(win, w, h); + evas_object_size_hint_min_set(win, w, h); + evas_object_size_hint_max_set(win, 99999, 99999); if (params) { @@ -899,7 +866,7 @@ _shot_now(E_Zone *zone, E_Client *ec, const char *params) } else { - e_win_show(win); + evas_object_show(win); e_win_client_icon_set(win, "screenshot"); if (!e_widget_focus_get(o_bg)) e_widget_focus_set(o_box, 1); @@ -1065,11 +1032,7 @@ EAPI int e_modapi_shutdown(E_Module *m __UNUSED__) { _share_done(); - if (win) - { - e_object_del(E_OBJECT(win)); - win = NULL; - } + E_FREE_FUNC(win, evas_object_del); E_FREE_FUNC(cd, e_object_del); if (timer) { diff --git a/src/modules/syscon/e_int_config_syscon.c b/src/modules/syscon/e_int_config_syscon.c index 7076b8a165..e8fd31515b 100644 --- a/src/modules/syscon/e_int_config_syscon.c +++ b/src/modules/syscon/e_int_config_syscon.c @@ -26,7 +26,7 @@ struct _E_Config_Dialog_Data }; E_Config_Dialog * -e_int_config_syscon(E_Comp *comp, const char *params __UNUSED__) +e_int_config_syscon(Evas_Object *parent EINA_UNUSED, const char *params __UNUSED__) { E_Config_Dialog *cfd; E_Config_Dialog_View *v; @@ -40,7 +40,7 @@ e_int_config_syscon(E_Comp *comp, const char *params __UNUSED__) v->basic.create_widgets = _basic_create; v->basic.check_changed = _basic_check_changed; - cfd = e_config_dialog_new(comp, _("System Controls Settings"), + cfd = e_config_dialog_new(NULL, _("System Controls Settings"), "E", "advanced/conf_syscon", "system-shutdown", 0, v, NULL); return cfd; diff --git a/src/modules/syscon/e_mod_main.h b/src/modules/syscon/e_mod_main.h index 37262afb13..0a30da5cf0 100644 --- a/src/modules/syscon/e_mod_main.h +++ b/src/modules/syscon/e_mod_main.h @@ -7,7 +7,7 @@ int e_syscon_shutdown(void); int e_syscon_show(E_Zone *zone, const char *defact); void e_syscon_hide(void); -E_Config_Dialog *e_int_config_syscon(E_Comp *comp, const char *params __UNUSED__); +E_Config_Dialog *e_int_config_syscon(Evas_Object *parent, const char *params __UNUSED__); void e_syscon_gadget_init(E_Module *m); void e_syscon_gadget_shutdown(void); diff --git a/src/modules/systray/e_mod_main.c b/src/modules/systray/e_mod_main.c index a3df593a75..be26a876a3 100644 --- a/src/modules/systray/e_mod_main.c +++ b/src/modules/systray/e_mod_main.c @@ -93,7 +93,7 @@ _cfg_data_apply(E_Config_Dialog *cfd, E_Config_Dialog_Data *cfdata) } static void -_cb_menu_cfg(void *data, E_Menu *m, E_Menu_Item *mi EINA_UNUSED) +_cb_menu_cfg(void *data, E_Menu *m EINA_UNUSED, E_Menu_Item *mi EINA_UNUSED) { E_Config_Dialog_View *v; @@ -103,7 +103,7 @@ _cb_menu_cfg(void *data, E_Menu *m, E_Menu_Item *mi EINA_UNUSED) v->basic.create_widgets = _cfg_widgets_create; v->basic.apply_cfdata = _cfg_data_apply; - e_config_dialog_new(m->zone->comp, _("Systray Settings"), "E", + e_config_dialog_new(NULL, _("Systray Settings"), "E", "_e_mod_systray_config_dialog", NULL, 0, v, data); } diff --git a/src/modules/tasks/e_mod_config.c b/src/modules/tasks/e_mod_config.c index f9edde3b3f..7320eaafec 100644 --- a/src/modules/tasks/e_mod_config.c +++ b/src/modules/tasks/e_mod_config.c @@ -21,7 +21,6 @@ _config_tasks_module(Config_Item *ci) { E_Config_Dialog *cfd; E_Config_Dialog_View *v; - E_Comp *comp; v = E_NEW(E_Config_Dialog_View, 1); @@ -30,8 +29,7 @@ _config_tasks_module(Config_Item *ci) v->basic.apply_cfdata = _basic_apply_data; v->basic.create_widgets = _basic_create_widgets; - comp = e_comp_get(NULL); - cfd = e_config_dialog_new(comp, _("Tasks Configuration"), "Tasks", + cfd = e_config_dialog_new(NULL, _("Tasks Configuration"), "Tasks", "_e_modules_tasks_config_dialog", NULL, 0, v, ci); if (tasks_config->config_dialog) e_object_del(E_OBJECT(tasks_config->config_dialog)); diff --git a/src/modules/teamwork/e_mod_config.c b/src/modules/teamwork/e_mod_config.c index 4c2984937a..ec73bd780b 100644 --- a/src/modules/teamwork/e_mod_config.c +++ b/src/modules/teamwork/e_mod_config.c @@ -159,7 +159,7 @@ _basic_apply_data(E_Config_Dialog *cfd EINA_UNUSED, } EINTERN E_Config_Dialog * -e_int_config_teamwork_module(E_Comp *comp, const char *params EINA_UNUSED) +e_int_config_teamwork_module(Evas_Object *parent EINA_UNUSED, const char *params EINA_UNUSED) { E_Config_Dialog *cfd; E_Config_Dialog_View *v; @@ -175,7 +175,7 @@ e_int_config_teamwork_module(E_Comp *comp, const char *params EINA_UNUSED) v->basic.create_widgets = _basic_create_widgets; v->basic.check_changed = _basic_check_changed; - cfd = e_config_dialog_new(comp, _("Teamwork Settings"), + cfd = e_config_dialog_new(NULL, _("Teamwork Settings"), "E", "applications/teamwork", buf, 32, v, tw_mod); tw_mod->cfd = cfd; return cfd; diff --git a/src/modules/teamwork/e_mod_main.h b/src/modules/teamwork/e_mod_main.h index 01a7ca27cb..11c0499c42 100644 --- a/src/modules/teamwork/e_mod_main.h +++ b/src/modules/teamwork/e_mod_main.h @@ -57,7 +57,7 @@ EINTERN Eina_Bool tw_hide(void *d EINA_UNUSED); EINTERN void tw_popup_opacity_set(void); EINTERN void tw_uri_show(const char *uri); -EINTERN E_Config_Dialog *e_int_config_teamwork_module(E_Comp *comp, const char *params EINA_UNUSED); +EINTERN E_Config_Dialog *e_int_config_teamwork_module(Evas_Object *parent, const char *params EINA_UNUSED); EAPI int e_modapi_shutdown(E_Module *m __UNUSED__); #undef DBG diff --git a/src/modules/tiling/e_mod_config.c b/src/modules/tiling/e_mod_config.c index 28a92bad16..03569cf5f3 100644 --- a/src/modules/tiling/e_mod_config.c +++ b/src/modules/tiling/e_mod_config.c @@ -308,7 +308,7 @@ _basic_apply_data(E_Config_Dialog *cfd EINA_UNUSED, } E_Config_Dialog * -e_int_config_tiling_module(E_Comp *comp, const char *params EINA_UNUSED) +e_int_config_tiling_module(Evas_Object *parent EINA_UNUSED, const char *params EINA_UNUSED) { E_Config_Dialog *cfd; E_Config_Dialog_View *v; @@ -327,7 +327,7 @@ e_int_config_tiling_module(E_Comp *comp, const char *params EINA_UNUSED) snprintf(buf, sizeof(buf), "%s/e-module-tiling.edj", e_module_dir_get(tiling_g.module)); cfd = - e_config_dialog_new(comp, _("Tiling Configuration"), "E", + e_config_dialog_new(NULL, _("Tiling Configuration"), "E", "windows/tiling", buf, 0, v, NULL); return cfd; } diff --git a/src/modules/tiling/e_mod_tiling.h b/src/modules/tiling/e_mod_tiling.h index f54a8a8405..e5f4cf3e3b 100644 --- a/src/modules/tiling/e_mod_tiling.h +++ b/src/modules/tiling/e_mod_tiling.h @@ -67,7 +67,7 @@ struct _E_Config_Dialog_Data Evas *evas; }; -E_Config_Dialog *e_int_config_tiling_module(E_Comp *comp, const char *params); +E_Config_Dialog *e_int_config_tiling_module(Evas_Object *parent, const char *params); EAPI extern E_Module_Api e_modapi; diff --git a/src/modules/winlist/e_int_config_winlist.c b/src/modules/winlist/e_int_config_winlist.c index 6eb22dba4e..d180c47968 100644 --- a/src/modules/winlist/e_int_config_winlist.c +++ b/src/modules/winlist/e_int_config_winlist.c @@ -36,7 +36,7 @@ struct _E_Config_Dialog_Data }; E_Config_Dialog * -e_int_config_winlist(E_Comp *comp, const char *params __UNUSED__) +e_int_config_winlist(Evas_Object *parent EINA_UNUSED, const char *params __UNUSED__) { E_Config_Dialog *cfd; E_Config_Dialog_View *v; @@ -50,7 +50,7 @@ e_int_config_winlist(E_Comp *comp, const char *params __UNUSED__) v->basic.create_widgets = _basic_create; v->basic.check_changed = _basic_check_changed; - cfd = e_config_dialog_new(comp, _("Window Switcher Settings"), + cfd = e_config_dialog_new(NULL, _("Window Switcher Settings"), "E", "windows/window_list", "preferences-winlist", 0, v, NULL); return cfd; diff --git a/src/modules/winlist/e_mod_main.h b/src/modules/winlist/e_mod_main.h index 1f2bf7d6c7..4b196bc6d7 100644 --- a/src/modules/winlist/e_mod_main.h +++ b/src/modules/winlist/e_mod_main.h @@ -5,7 +5,7 @@ extern const char *_winlist_act; extern E_Action *_act_winlist; -E_Config_Dialog *e_int_config_winlist(E_Comp *comp, const char *params __UNUSED__); +E_Config_Dialog *e_int_config_winlist(Evas_Object *parent, const char *params __UNUSED__); /** * @addtogroup Optional_Control * @{ diff --git a/src/modules/xkbswitch/e_mod_config.c b/src/modules/xkbswitch/e_mod_config.c index 13745ce3b3..1ad7668514 100644 --- a/src/modules/xkbswitch/e_mod_config.c +++ b/src/modules/xkbswitch/e_mod_config.c @@ -58,7 +58,7 @@ static Eina_Bool _cb_fill_delay(void *data); /* Externals */ E_Config_Dialog * -_xkb_cfg_dialog(E_Comp *comp, const char *params __UNUSED__) +_xkb_cfg_dialog(Evas_Object *parent EINA_UNUSED, const char *params __UNUSED__) { E_Config_Dialog *cfd; E_Config_Dialog_View *v; @@ -73,7 +73,7 @@ _xkb_cfg_dialog(E_Comp *comp, const char *params __UNUSED__) v->basic.apply_cfdata = _basic_apply; v->basic.check_changed = _basic_check_changed; - cfd = e_config_dialog_new(comp, _("Keyboard Settings"), "E", + cfd = e_config_dialog_new(NULL, _("Keyboard Settings"), "E", "keyboard_and_mouse/xkbswitch", "preferences-desktop-keyboard", 0, v, NULL); @@ -390,7 +390,7 @@ _cb_add(void *data, void *data2 __UNUSED__) E_Config_Dialog_Data *cfdata; if (!(cfdata = data)) return; - if (cfdata->dlg_add_new) e_win_raise(cfdata->dlg_add_new->win); + if (cfdata->dlg_add_new) elm_win_raise(cfdata->dlg_add_new->win); else cfdata->dlg_add_new = _dlg_add_new(cfdata); } @@ -504,14 +504,14 @@ _dlg_add_new(E_Config_Dialog_Data *cfdata) Evas_Coord mw, mh; Evas_Object *mainn, *available, *modelss, *variants; - if (!(dlg = e_dialog_new(_xkb.cfd->comp, "E", "xkbswitch_config_add_dialog"))) return NULL; + if (!(dlg = e_dialog_new(NULL, "E", "xkbswitch_config_add_dialog"))) return NULL; dlg->data = cfdata; e_object_del_attach_func_set(E_OBJECT(dlg), _dlg_add_cb_del); - e_win_centered_set(dlg->win, 1); + elm_win_center(dlg->win, 1, 1); - evas = e_win_evas_get(dlg->win); + evas = evas_object_evas_get(dlg->win); e_dialog_title_set(dlg, _("Add New Configuration")); /* The main toolbook, holds the lists and tabs */ diff --git a/src/modules/xkbswitch/e_mod_main.c b/src/modules/xkbswitch/e_mod_main.c index 213987f605..c60e41e07d 100644 --- a/src/modules/xkbswitch/e_mod_main.c +++ b/src/modules/xkbswitch/e_mod_main.c @@ -477,10 +477,10 @@ _e_xkb_cb_lmenu_post(void *data, E_Menu *menu __UNUSED__) } static void -_e_xkb_cb_menu_configure(void *data __UNUSED__, E_Menu *mn, E_Menu_Item *mi __UNUSED__) +_e_xkb_cb_menu_configure(void *data __UNUSED__, E_Menu *mn EINA_UNUSED, E_Menu_Item *mi __UNUSED__) { if (_xkb.cfd) return; - _xkb_cfg_dialog(mn->zone->comp, NULL); + _xkb_cfg_dialog(NULL, NULL); } static void diff --git a/src/modules/xkbswitch/e_mod_main.h b/src/modules/xkbswitch/e_mod_main.h index f02adf457c..4edce799f8 100644 --- a/src/modules/xkbswitch/e_mod_main.h +++ b/src/modules/xkbswitch/e_mod_main.h @@ -17,7 +17,7 @@ typedef struct _Xkb /* Prototypes */ void _xkb_update_icon(int); -E_Config_Dialog *_xkb_cfg_dialog(E_Comp *comp, const char *params); +E_Config_Dialog *_xkb_cfg_dialog(Evas_Object *, const char *params); extern Xkb _xkb; |