summaryrefslogtreecommitdiff
path: root/src/modules
diff options
context:
space:
mode:
authorMike Blumenkrantz <zmike@samsung.com>2014-01-14 20:19:12 -0500
committerMike Blumenkrantz <zmike@samsung.com>2014-01-14 20:22:02 -0500
commit86656e4df9d9125d594e9b24ba793c252b6a0a9f (patch)
tree651b51b9216b24b3158dfb973f45f2dde6a645ce /src/modules
parent7f0c849a27573fdb5b646a3dc39ff7d6200cf8ed (diff)
downloadenlightenment-86656e4df9d9125d594e9b24ba793c252b6a0a9f.tar.gz
compositor rewrite / charlie-foxtrot situation
huge fustercluck commit because there wasn't really a way to separate out the changes. better to just rip it all out at once. * compositor and window management completely rewritten. this was the goal for E19, but it pretty much required everything existing to be scrapped since it wasn't optimized, streamlined, or sensible. now instead of having the compositor strapped to the window manager like an outboard motor, it's housed more like an automobile engine. ** various comp structs have been merged into other places (eg. E_Comp_Zone is now just part of E_Zone where applicable), leading to a large deduplication of attributes ** awful E_Comp_Win is totally dead, having been replaced with e_comp_object smart objects which work just like normal canvas objects ** protocol-specific window management and compositor functionality is now kept exclusively in backend files ** e_pixmap api provides generic client finding and rendering api ** screen/xinerama screens are now provided directly by compositor on startup and re-set on change ** e_comp_render_update finally replaced with eina_tiler ** wayland compositor no longer creates X windows ** compositor e_layout removed entirely * e_container is gone. this was made unnecessary in E18, but I kept it to avoid having too much code churn in one release. its sole purpose was to catch some events and handle window stacking, both of which are now just done by the compositor infra * e_manager is just for screensaver and keybind stuff now, possibly remove later? * e_border is gone along with a lot of its api. e_client has replaced it, and e_client has been rewritten completely; some parts may be similar, but the design now relies upon having a functional compositor ** window configuration/focus functions are all removed. all windows are now managed solely with evas_object_X functions on the "frame" member of a client, just as any other canvas object can be managed. *** do NOT set interceptors on a client's comp_object. seriously. * startup order rewritten: compositor now starts much earlier, other things just use attrs and members of the compositor * ecore_x_pointer_xy_get usage replaced with ecore_evas_pointer_xy_get * e_popup is totally gone, existing usage replaced by e_comp_object_util_add where applicable, otherwise just placed normally on the canvas * deskmirror is (more) broken for now * illume is totally fucked * Ecore_X_Window replaced with Ecore_Window in most cases * edge binding XWindows replaced with regular canvas objects * some E_Win functionality has changed such that delete callbacks are now correctly called in ALL cases. various dialogs have been updated to not crash as a result comp files and descriptions: e_comp.c - overall compositor functions, rendering/update loop, shape cutting e_comp_x.c - X window management and compositor functionality e_comp_wl.c - Wayland surface management and compositor functionality e_comp_canvas.c - general compositor canvas functions and utilities e_comp_object.c - E_Client->frame member for managing clients as Evas_Objects, utility functions for adding objects to the compositor rendering systems additional authors: ivan.briano@intel.com feature: new compositor removal: e_border, e_container, e_popup
Diffstat (limited to 'src/modules')
-rw-r--r--src/modules/access/e_mod_config.c4
-rw-r--r--src/modules/access/e_mod_main.c32
-rw-r--r--src/modules/appmenu/e_mod_appmenu_render.c4
-rw-r--r--src/modules/appmenu/e_mod_main.c10
-rw-r--r--src/modules/backlight/e_mod_main.c17
-rw-r--r--src/modules/battery/e_mod_config.c4
-rw-r--r--src/modules/battery/e_mod_main.c14
-rw-r--r--src/modules/battery/e_mod_main.h2
-rw-r--r--src/modules/bluez4/agent.c4
-rw-r--r--src/modules/bluez4/e_mod_main.c19
-rw-r--r--src/modules/clock/e_mod_config.c4
-rw-r--r--src/modules/clock/e_mod_main.c40
-rw-r--r--src/modules/clock/e_mod_main.h2
-rw-r--r--src/modules/conf/e_conf.c38
-rw-r--r--src/modules/conf/e_mod_config.c4
-rw-r--r--src/modules/conf/e_mod_main.c14
-rw-r--r--src/modules/conf/e_mod_main.h4
-rw-r--r--src/modules/conf_applications/e_int_config_apps.c38
-rw-r--r--src/modules/conf_applications/e_int_config_apps_personal.c14
-rw-r--r--src/modules/conf_applications/e_int_config_defapps.c4
-rw-r--r--src/modules/conf_applications/e_int_config_deskenv.c4
-rw-r--r--src/modules/conf_applications/e_mod_main.h22
-rw-r--r--src/modules/conf_bindings/e_int_config_acpibindings.c6
-rw-r--r--src/modules/conf_bindings/e_int_config_edgebindings.c22
-rw-r--r--src/modules/conf_bindings/e_int_config_keybindings.c4
-rw-r--r--src/modules/conf_bindings/e_int_config_mousebindings.c12
-rw-r--r--src/modules/conf_bindings/e_int_config_signalbindings.c4
-rw-r--r--src/modules/conf_bindings/e_mod_main.h10
-rw-r--r--src/modules/conf_comp/e_mod_config.c4
-rw-r--r--src/modules/conf_comp/e_mod_config_match.c4
-rw-r--r--src/modules/conf_comp/e_mod_main.c2
-rw-r--r--src/modules/conf_comp/e_mod_main.h4
-rw-r--r--src/modules/conf_dialogs/e_int_config_dialogs.c4
-rw-r--r--src/modules/conf_dialogs/e_int_config_profiles.c4
-rw-r--r--src/modules/conf_dialogs/e_mod_main.h4
-rw-r--r--src/modules/conf_display/e_int_config_desk.c45
-rw-r--r--src/modules/conf_display/e_int_config_desklock.c46
-rw-r--r--src/modules/conf_display/e_int_config_desklock_fsel.c8
-rw-r--r--src/modules/conf_display/e_int_config_desks.c39
-rw-r--r--src/modules/conf_display/e_int_config_display.c6
-rw-r--r--src/modules/conf_display/e_int_config_dpms.c4
-rw-r--r--src/modules/conf_display/e_int_config_screensaver.c4
-rw-r--r--src/modules/conf_display/e_mod_main.h12
-rw-r--r--src/modules/conf_interaction/e_int_config_interaction.c4
-rw-r--r--src/modules/conf_interaction/e_int_config_mouse.c18
-rw-r--r--src/modules/conf_interaction/e_mod_main.h4
-rw-r--r--src/modules/conf_intl/e_int_config_imc.c4
-rw-r--r--src/modules/conf_intl/e_int_config_imc_import.c4
-rw-r--r--src/modules/conf_intl/e_int_config_intl.c8
-rw-r--r--src/modules/conf_intl/e_mod_main.h6
-rw-r--r--src/modules/conf_menus/e_int_config_menus.c4
-rw-r--r--src/modules/conf_menus/e_mod_main.h2
-rw-r--r--src/modules/conf_paths/e_int_config_env.c4
-rw-r--r--src/modules/conf_paths/e_int_config_paths.c4
-rw-r--r--src/modules/conf_paths/e_mod_main.h4
-rw-r--r--src/modules/conf_performance/e_int_config_engine.c4
-rw-r--r--src/modules/conf_performance/e_int_config_performance.c4
-rw-r--r--src/modules/conf_performance/e_int_config_powermanagement.c4
-rw-r--r--src/modules/conf_performance/e_mod_main.h6
-rw-r--r--src/modules/conf_randr/e_int_config_randr.c4
-rw-r--r--src/modules/conf_randr/e_int_config_randr.h2
-rw-r--r--src/modules/conf_randr/e_smart_monitor.c18
-rw-r--r--src/modules/conf_shelves/e_int_config_shelf.c20
-rw-r--r--src/modules/conf_shelves/e_int_config_shelf.h2
-rw-r--r--src/modules/conf_shelves/e_mod_main.c2
-rw-r--r--src/modules/conf_shelves/e_mod_main.h2
-rw-r--r--src/modules/conf_theme/e_int_config_borders.c111
-rw-r--r--src/modules/conf_theme/e_int_config_color_classes.c4
-rw-r--r--src/modules/conf_theme/e_int_config_fonts.c4
-rw-r--r--src/modules/conf_theme/e_int_config_scale.c18
-rw-r--r--src/modules/conf_theme/e_int_config_theme.c16
-rw-r--r--src/modules/conf_theme/e_int_config_theme_import.c21
-rw-r--r--src/modules/conf_theme/e_int_config_transitions.c6
-rw-r--r--src/modules/conf_theme/e_int_config_wallpaper.c78
-rw-r--r--src/modules/conf_theme/e_int_config_xsettings.c4
-rw-r--r--src/modules/conf_theme/e_mod_main.c4
-rw-r--r--src/modules/conf_theme/e_mod_main.h23
-rw-r--r--src/modules/conf_wallpaper2/e_int_config_wallpaper.c38
-rw-r--r--src/modules/conf_wallpaper2/e_mod_main.c2
-rw-r--r--src/modules/conf_wallpaper2/e_mod_main.h2
-rw-r--r--src/modules/conf_window_manipulation/e_int_config_clientlist.c4
-rw-r--r--src/modules/conf_window_manipulation/e_int_config_focus.c12
-rw-r--r--src/modules/conf_window_manipulation/e_int_config_window_display.c4
-rw-r--r--src/modules/conf_window_manipulation/e_int_config_window_geometry.c4
-rw-r--r--src/modules/conf_window_manipulation/e_int_config_window_process.c4
-rw-r--r--src/modules/conf_window_manipulation/e_mod_main.h10
-rw-r--r--src/modules/conf_window_remembers/e_int_config_remembers.c6
-rw-r--r--src/modules/conf_window_remembers/e_mod_main.h2
-rw-r--r--src/modules/connman/e_mod_config.c4
-rw-r--r--src/modules/connman/e_mod_main.c21
-rw-r--r--src/modules/connman/e_mod_main.h2
-rw-r--r--src/modules/contact/e_edges.c20
-rw-r--r--src/modules/contact/e_mod_main.c60
-rw-r--r--src/modules/contact/e_policy.c243
-rw-r--r--src/modules/contact/e_policy.h4
-rw-r--r--src/modules/cpufreq/e_mod_config.c4
-rw-r--r--src/modules/cpufreq/e_mod_main.c18
-rw-r--r--src/modules/cpufreq/e_mod_main.h2
-rw-r--r--src/modules/everything/e_mod_main.c6
-rw-r--r--src/modules/everything/e_mod_main.h4
-rw-r--r--src/modules/everything/evry.c33
-rw-r--r--src/modules/everything/evry_api.h2
-rw-r--r--src/modules/everything/evry_config.c12
-rw-r--r--src/modules/everything/evry_gadget.c50
-rw-r--r--src/modules/everything/evry_plug_apps.c8
-rw-r--r--src/modules/everything/evry_plug_files.c4
-rw-r--r--src/modules/everything/evry_plug_settings.c2
-rw-r--r--src/modules/everything/evry_plug_windows.c211
-rw-r--r--src/modules/fileman/e_fwin.c201
-rw-r--r--src/modules/fileman/e_fwin_nav.c2
-rw-r--r--src/modules/fileman/e_int_config_mime.c4
-rw-r--r--src/modules/fileman/e_int_config_mime_edit.c6
-rw-r--r--src/modules/fileman/e_mod_config.c5
-rw-r--r--src/modules/fileman/e_mod_dbus.c2
-rw-r--r--src/modules/fileman/e_mod_main.c73
-rw-r--r--src/modules/fileman/e_mod_main.h8
-rw-r--r--src/modules/fileman/e_mod_menu.c12
-rw-r--r--src/modules/fileman_opinfo/e_mod_main.c16
-rw-r--r--src/modules/gadman/e_mod_config.c6
-rw-r--r--src/modules/gadman/e_mod_gadman.c81
-rw-r--r--src/modules/gadman/e_mod_gadman.h7
-rw-r--r--src/modules/gadman/e_mod_main.c2
-rw-r--r--src/modules/ibar/e_mod_config.c5
-rw-r--r--src/modules/ibar/e_mod_main.c167
-rw-r--r--src/modules/ibox/e_mod_config.c24
-rw-r--r--src/modules/ibox/e_mod_main.c223
-rw-r--r--src/modules/illume-home/e_mod_config.c4
-rw-r--r--src/modules/illume-home/e_mod_config.h2
-rw-r--r--src/modules/illume-home/e_mod_main.c133
-rw-r--r--src/modules/illume-indicator/e_mod_ind_win.c64
-rw-r--r--src/modules/illume-indicator/e_mod_main.c36
-rw-r--r--src/modules/illume-indicator/e_mod_notify.c6
-rw-r--r--src/modules/illume-kbd-toggle/e_mod_main.c46
-rw-r--r--src/modules/illume-keyboard/e_kbd_int.c86
-rw-r--r--src/modules/illume-keyboard/e_kbd_int.h8
-rw-r--r--src/modules/illume-keyboard/e_mod_config.c4
-rw-r--r--src/modules/illume-keyboard/e_mod_config.h2
-rw-r--r--src/modules/illume-softkey/e_mod_main.c32
-rw-r--r--src/modules/illume-softkey/e_mod_sft_win.c47
-rw-r--r--src/modules/illume2/e_illume.c409
-rw-r--r--src/modules/illume2/e_illume.h68
-rw-r--r--src/modules/illume2/e_mod_config.c8
-rw-r--r--src/modules/illume2/e_mod_config_animation.c4
-rw-r--r--src/modules/illume2/e_mod_config_policy.c4
-rw-r--r--src/modules/illume2/e_mod_config_windows.c4
-rw-r--r--src/modules/illume2/e_mod_kbd.c237
-rw-r--r--src/modules/illume2/e_mod_main.c39
-rw-r--r--src/modules/illume2/e_mod_main.h6
-rw-r--r--src/modules/illume2/e_mod_policy.c159
-rw-r--r--src/modules/illume2/e_mod_quickpanel.c191
-rw-r--r--src/modules/illume2/e_mod_select_window.c45
-rw-r--r--src/modules/illume2/policies/illume/policy.c1371
-rw-r--r--src/modules/illume2/policies/illume/policy.h20
-rw-r--r--src/modules/illume2/policies/tablet/policy.c1137
-rw-r--r--src/modules/illume2/policies/tablet/policy.h22
-rw-r--r--src/modules/layout/e_mod_main.c40
-rw-r--r--src/modules/mixer/app_mixer.c4
-rw-r--r--src/modules/mixer/conf_gadget.c4
-rw-r--r--src/modules/mixer/conf_module.c8
-rw-r--r--src/modules/mixer/e_mod_main.c36
-rw-r--r--src/modules/mixer/e_mod_main.h6
-rw-r--r--src/modules/msgbus/msgbus_desktop.c30
-rw-r--r--src/modules/music-control/ui.c12
-rw-r--r--src/modules/notification/e_mod_config.c4
-rw-r--r--src/modules/notification/e_mod_main.h4
-rw-r--r--src/modules/notification/e_mod_popup.c142
-rw-r--r--src/modules/pager/e_mod_config.c6
-rw-r--r--src/modules/pager/e_mod_main.c623
-rw-r--r--src/modules/quickaccess/e_mod_config.c4
-rw-r--r--src/modules/quickaccess/e_mod_main.h4
-rw-r--r--src/modules/quickaccess/e_mod_quickaccess.c254
-rw-r--r--src/modules/shot/e_mod_main.c84
-rw-r--r--src/modules/syscon/e_int_config_syscon.c4
-rw-r--r--src/modules/syscon/e_mod_main.c6
-rw-r--r--src/modules/syscon/e_mod_main.h2
-rw-r--r--src/modules/syscon/e_syscon.c76
-rw-r--r--src/modules/syscon/e_syscon_gadget.c2
-rw-r--r--src/modules/systray/e_mod_main.c10
-rw-r--r--src/modules/systray/e_mod_main.h2
-rw-r--r--src/modules/systray/e_mod_notifier_host.c2
-rw-r--r--src/modules/systray/e_mod_xembed.c132
-rw-r--r--src/modules/tasks/e_mod_config.c6
-rw-r--r--src/modules/tasks/e_mod_main.c320
-rw-r--r--src/modules/tasks/e_mod_main.h2
-rw-r--r--src/modules/teamwork/e_mod_config.c4
-rw-r--r--src/modules/teamwork/e_mod_main.h4
-rw-r--r--src/modules/teamwork/e_mod_tw.c99
-rw-r--r--src/modules/temperature/e_mod_config.c2
-rw-r--r--src/modules/tiling/e_mod_config.c12
-rw-r--r--src/modules/tiling/e_mod_tiling.c1588
-rw-r--r--src/modules/tiling/e_mod_tiling.h6
-rw-r--r--src/modules/winlist/e_int_config_winlist.c4
-rw-r--r--src/modules/winlist/e_mod_main.c6
-rw-r--r--src/modules/winlist/e_mod_main.h2
-rw-r--r--src/modules/winlist/e_winlist.c573
-rw-r--r--src/modules/wizard/e_wizard.c80
-rw-r--r--src/modules/wizard/page_050.c2
-rw-r--r--src/modules/wl_desktop_shell/e_mod_main.c982
-rw-r--r--src/modules/xkbswitch/e_mod_config.c6
-rw-r--r--src/modules/xkbswitch/e_mod_main.c2
-rw-r--r--src/modules/xkbswitch/e_mod_main.h2
201 files changed, 5764 insertions, 6244 deletions
diff --git a/src/modules/access/e_mod_config.c b/src/modules/access/e_mod_config.c
index af15db087e..b57a0fa27c 100644
--- a/src/modules/access/e_mod_config.c
+++ b/src/modules/access/e_mod_config.c
@@ -19,7 +19,6 @@ void
_config_pager_module(void)
{
E_Config_Dialog_View *v;
- E_Container *con;
if (e_config_dialog_find("E", "_e_mod_access_config_dialog"))
return;
@@ -31,8 +30,7 @@ _config_pager_module(void)
v->basic.create_widgets = _basic_create;
v->basic.apply_cfdata = _basic_apply;
- con = e_container_current_get(e_manager_current_get());
- e_config_dialog_new(con, _("Access Settings"), "E",
+ e_config_dialog_new(NULL, _("Access Settings"), "E",
"_e_mod_access_config_dialog",
"preferences-desktop-access", 0, v, NULL);
}
diff --git a/src/modules/access/e_mod_main.c b/src/modules/access/e_mod_main.c
index 32e97ecd3e..3ea6a1bf4d 100644
--- a/src/modules/access/e_mod_main.c
+++ b/src/modules/access/e_mod_main.c
@@ -58,7 +58,7 @@ typedef struct
int device;
} Multi;
-static E_Border *_prev_bd;
+static E_Client *_prev_bd;
static Ecore_X_Atom _atom_access = 0;
static Ecore_X_Window target_win = 0;
@@ -89,7 +89,7 @@ _mouse_in_win_get(Cover *cov, int x, int y)
then previous target window which has the highlight object
should get the message. how? */
target_win = ecore_x_window_shadow_tree_at_xy_with_skip_get
- (cov->zone->container->manager->root, x, y, skip, i);
+ (cov->zone->comp->manager->root, x, y, skip, i);
}
static unsigned int
@@ -353,7 +353,7 @@ _mouse_up(Cover *cov, Ecore_Event_Mouse_Button *ev)
/* activate message would change focused window
FIXME: but it is possibe to create unfocused window
in this case, the message should go to unfocused window? */
- _prev_bd = e_border_focused_get();
+ _prev_bd = e_client_focused_get();
INFO(cov, "double_click");
ecore_x_e_illume_access_action_activate_send(target_win);
@@ -505,7 +505,7 @@ _cb_mouse_down(void *data __UNUSED__,
Cover *cov;
int i = 0;
int x, y;
- E_Border *bd;
+ E_Client *ec;
for (i = 0; i < 3; i++)
{
@@ -520,7 +520,7 @@ _cb_mouse_down(void *data __UNUSED__,
/* activate message would change focused window
FIXME: but it is possibe to create unfocused window
in this case, the message should go to focused window? */
- bd = e_border_focused_get();
+ bd = e_client_focused_get();
if (bd && (bd != _prev_bd)) target_win = bd->client.win;
EINA_LIST_FOREACH(covers, l, cov)
@@ -738,8 +738,8 @@ _cover_new(E_Zone *zone)
#if DEBUG_INFO
Ecore_Evas *ee;
ee = ecore_evas_new(NULL,
- zone->container->x + zone->x,
- zone->container->y + zone->y,
+ zone->comp->x + zone->x,
+ zone->comp->y + zone->y,
zone->w, zone->h,
NULL);
ecore_evas_alpha_set(ee, EINA_TRUE);
@@ -750,7 +750,7 @@ _cover_new(E_Zone *zone)
e = ecore_evas_get(ee);
cov->info = evas_object_rectangle_add(e);
evas_object_color_set(cov->info, 255, 255, 255, 100);
- evas_object_move(cov->info, zone->container->x + zone->x, zone->container->y + zone->y);
+ evas_object_move(cov->info, zone->comp->x + zone->x, zone->comp->y + zone->y);
evas_object_resize(cov->info, zone->w, 30);
evas_object_show(cov->info);
@@ -761,13 +761,13 @@ _cover_new(E_Zone *zone)
evas_object_color_set(cov->text, 0, 0, 0, 255);
evas_object_resize(cov->text, (zone->w / 8), 20);
- evas_object_move(cov->text, zone->container->x + zone->x + 5, zone->container->y + zone->y + 5);
+ evas_object_move(cov->text, zone->comp->x + zone->x + 5, zone->comp->y + zone->y + 5);
evas_object_show(cov->text);
#else
- cov->win = ecore_x_window_input_new(zone->container->manager->root,
- zone->container->x + zone->x,
- zone->container->y + zone->y,
+ cov->win = ecore_x_window_input_new(zone->comp->manager->root,
+ zone->comp->x + zone->x,
+ zone->comp->y + zone->y,
zone->w, zone->h);
#endif
@@ -781,7 +781,7 @@ _cover_new(E_Zone *zone)
ECORE_X_WINDOW_CONFIGURE_MASK_SIBLING |
ECORE_X_WINDOW_CONFIGURE_MASK_STACK_MODE,
0, 0, 0, 0, 0,
- zone->container->layers[8].win,
+ zone->comp->layers[8].win,
ECORE_X_WINDOW_STACK_ABOVE);
ecore_x_window_show(cov->win);
ecore_x_window_raise(cov->win);
@@ -798,7 +798,7 @@ _covers_init(void)
EINA_LIST_FOREACH(e_manager_list(), l, man)
{
- E_Container *con;
+ E_Comp *comp;
EINA_LIST_FOREACH(man->containers, l2, con)
{
E_Zone *zone;
@@ -928,12 +928,12 @@ _cb_property_change(void *data __UNUSED__,
int type __UNUSED__,
void *ev)
{
- E_Border *bd;
+ E_Client *ec;
Ecore_X_Event_Window_Property *event = ev;
if (event->atom == ECORE_X_ATOM_NET_ACTIVE_WINDOW)
{
- bd = e_border_focused_get();
+ bd = e_client_focused_get();
if (bd) target_win = bd->client.win;
}
diff --git a/src/modules/appmenu/e_mod_appmenu_render.c b/src/modules/appmenu/e_mod_appmenu_render.c
index 8842f690f2..654fef4cc5 100644
--- a/src/modules/appmenu/e_mod_appmenu_render.c
+++ b/src/modules/appmenu/e_mod_appmenu_render.c
@@ -84,8 +84,8 @@ item_menu_open(E_DBusMenu_Item *item, E_Gadcon *gadcon)
e_gadcon_locked_set(gadcon, 1);
e_menu_post_deactivate_callback_set(m, menu_post_deactivate, gadcon);
- zone = e_util_zone_current_get(e_manager_current_get());
- ecore_x_pointer_xy_get(zone->container->win, &x, &y);
+ ecore_evas_pointer_xy_get(e_comp_get(gadcon)->ee, &x, &y);
+ zone = e_comp_zone_xy_get(e_comp_get(gadcon), x, y);
e_menu_activate_mouse(m, zone, x, y, 1, 1, E_MENU_POP_DIRECTION_DOWN,
ecore_x_current_time_get());
}
diff --git a/src/modules/appmenu/e_mod_main.c b/src/modules/appmenu/e_mod_main.c
index 9415078c9c..1cc862b837 100644
--- a/src/modules/appmenu/e_mod_main.c
+++ b/src/modules/appmenu/e_mod_main.c
@@ -119,14 +119,14 @@ static Eina_Bool
cb_focus_in(void *data, int type __UNUSED__, void *event)
{
E_AppMenu_Context *ctxt = data;
- E_Event_Border_Focus_In *ev = event;
+ E_Event_Client *ev = event;
Eina_List *l;
E_AppMenu_Window *w, *found = NULL;
- ctxt->window_with_focus = ev->border->client.win;
+ ctxt->window_with_focus = e_client_util_win_get(ev->ec);
EINA_LIST_FOREACH(ctxt->windows, l, w)
{
- if (w->window_id == ev->border->client.win)
+ if (w->window_id == ctxt->window_with_focus)
{
found = w;
break;
@@ -168,9 +168,9 @@ e_modapi_init(E_Module *m)
eldbus_init();
ctxt->conn = eldbus_connection_get(ELDBUS_CONNECTION_TYPE_SESSION);
- event = ecore_event_handler_add(E_EVENT_BORDER_FOCUS_IN, cb_focus_in, ctxt);
+ event = ecore_event_handler_add(E_EVENT_CLIENT_FOCUS_IN, cb_focus_in, ctxt);
ctxt->events[0] = event;
- event = ecore_event_handler_add(E_EVENT_BORDER_FOCUS_OUT, cb_focus_out, ctxt);
+ event = ecore_event_handler_add(E_EVENT_CLIENT_FOCUS_OUT, cb_focus_out, ctxt);
ctxt->events[1] = event;
e_gadcon_provider_register(&_gc_class);
diff --git a/src/modules/backlight/e_mod_main.c b/src/modules/backlight/e_mod_main.c
index f23396e2a5..e7a5e4f6e3 100644
--- a/src/modules/backlight/e_mod_main.c
+++ b/src/modules/backlight/e_mod_main.c
@@ -164,7 +164,7 @@ _backlight_settings_cb(void *d1, void *d2 __UNUSED__)
{
Instance *inst = d1;
e_configure_registry_call("screen/power_management",
- inst->gcc->gadcon->zone->container, NULL);
+ inst->gcc->gadcon->zone->comp, NULL);
_backlight_popup_free(inst);
}
@@ -185,6 +185,12 @@ _backlight_popup_del_cb(void *obj)
}
static void
+_backlight_popup_comp_del_cb(void *data, Evas_Object *obj EINA_UNUSED)
+{
+ _backlight_popup_free(data);
+}
+
+static void
_backlight_popup_new(Instance *inst)
{
Evas *evas;
@@ -197,8 +203,8 @@ _backlight_popup_new(Instance *inst)
inst->val = e_backlight_level_get(inst->gcc->gadcon->zone);
_backlight_gadget_update(inst);
- inst->popup = e_gadcon_popup_new(inst->gcc);
- evas = inst->popup->win->evas;
+ inst->popup = e_gadcon_popup_new(inst->gcc, 0);
+ evas = e_comp_get(inst->popup)->evas;
inst->o_table = e_widget_table_add(evas, 0);
@@ -214,8 +220,9 @@ _backlight_popup_new(Instance *inst)
0, 1, 1, 1, 0, 0, 0, 0, 0.5, 1.0);
e_gadcon_popup_content_set(inst->popup, inst->o_table);
- e_popup_autoclose(inst->popup->win, NULL, _backlight_win_key_down_cb, inst);
e_gadcon_popup_show(inst->popup);
+ e_comp_object_util_autoclose(inst->popup->comp_object, _backlight_popup_comp_del_cb,
+ _backlight_win_key_down_cb, inst);
e_object_data_set(E_OBJECT(inst->popup), inst);
E_OBJECT_DEL_SET(inst->popup, _backlight_popup_del_cb);
}
@@ -233,7 +240,7 @@ _backlight_menu_cb_cfg(void *data, E_Menu *menu __UNUSED__, E_Menu_Item *mi __UN
_backlight_popup_free(inst);
e_configure_registry_call("screen/power_management",
- inst->gcc->gadcon->zone->container, NULL);
+ inst->gcc->gadcon->zone->comp, NULL);
}
static void
diff --git a/src/modules/battery/e_mod_config.c b/src/modules/battery/e_mod_config.c
index c08be45f26..456e89d0ec 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_Container *con, const char *params __UNUSED__)
+e_int_config_battery_module(E_Comp *comp, const char *params __UNUSED__)
{
E_Config_Dialog *cfd;
E_Config_Dialog_View *v;
@@ -61,7 +61,7 @@ e_int_config_battery_module(E_Container *con, 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(con, _("Battery Monitor Settings"),
+ cfd = e_config_dialog_new(comp, _("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 3a2edeaab7..a2d16938cb 100644
--- a/src/modules/battery/e_mod_main.c
+++ b/src/modules/battery/e_mod_main.c
@@ -246,7 +246,7 @@ _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__)
{
- e_configure_registry_call("advanced/powermanagement", m->zone->container, NULL);
+ e_configure_registry_call("advanced/powermanagement", m->zone->comp, NULL);
}
static void
@@ -254,7 +254,7 @@ _battery_face_cb_menu_configure(void *data __UNUSED__, E_Menu *m, E_Menu_Item *m
{
if (!battery_config) return;
if (battery_config->config_dialog) return;
- e_int_config_battery_module(m->zone->container, NULL);
+ e_int_config_battery_module(m->zone->comp, NULL);
}
Battery *
@@ -423,9 +423,8 @@ _battery_warning_popup_destroy(Instance *inst)
battery_config->alert_timer = NULL;
}
if ((!inst) || (!inst->warning)) return;
- e_object_del(E_OBJECT(inst->warning));
- inst->warning = NULL;
- inst->popup_battery = NULL;
+ E_FREE_FUNC(inst->popup_battery, evas_object_del);
+ E_FREE_FUNC(inst->warning, e_object_del);
}
#ifdef HAVE_ENOTIFY
@@ -462,10 +461,10 @@ _battery_warning_popup(Instance *inst, int t, double percent)
return;
}
#endif
- inst->warning = e_gadcon_popup_new(inst->gcc);
+ inst->warning = e_gadcon_popup_new(inst->gcc, 0);
if (!inst->warning) return;
- e = inst->warning->win->evas;
+ e = e_comp_get(inst->warning)->evas;
popup_bg = edje_object_add(e);
inst->popup_battery = edje_object_add(e);
@@ -486,7 +485,6 @@ _battery_warning_popup(Instance *inst, int t, double percent)
else
edje_object_part_swallow(popup_bg, "battery", inst->popup_battery);
- e_popup_object_add(inst->warning->win, inst->popup_battery);
edje_object_part_text_set(popup_bg, "e.text.title",
_("Your battery is low!"));
edje_object_part_text_set(popup_bg, "e.text.label",
diff --git a/src/modules/battery/e_mod_main.h b/src/modules/battery/e_mod_main.h
index a647cf7a14..72ae42a455 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_Container *con, const char *params __UNUSED__);
+E_Config_Dialog *e_int_config_battery_module(E_Comp *comp, 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 e60a032e21..27f1388883 100644
--- a/src/modules/bluez4/agent.c
+++ b/src/modules/bluez4/agent.c
@@ -52,11 +52,9 @@ static E_Dialog *
_create_dialog(const char *title, const char *msg,
const char *icon, const char *class)
{
- E_Container *con;
E_Dialog *dialog;
- con = e_container_current_get(e_manager_current_get());
- dialog = e_dialog_new(con, title, class);
+ dialog = e_dialog_new(NULL, title, class);
e_dialog_title_set(dialog, _(title));
e_dialog_icon_set(dialog, icon, 64);
e_dialog_text_set(dialog, msg);
diff --git a/src/modules/bluez4/e_mod_main.c b/src/modules/bluez4/e_mod_main.c
index 5a7b74578c..a6a4c45382 100644
--- a/src/modules/bluez4/e_mod_main.c
+++ b/src/modules/bluez4/e_mod_main.c
@@ -106,16 +106,13 @@ static void
_ebluez4_cb_search(void *data, E_Menu *m, E_Menu_Item *mi)
{
Instance *inst = data;
- E_Container *con;
E_Dialog *dialog;
Evas *evas;
if (inst->search_dialog)
_ebluez4_search_dialog_del(inst);
- con = e_container_current_get(e_manager_current_get());
-
- dialog = e_dialog_new(con, "Search Dialog", "search");
+ dialog = e_dialog_new(NULL, "Search Dialog", "search");
e_dialog_title_set(dialog, _("Searching for Devices..."));
e_dialog_resizable_set(dialog, EINA_TRUE);
e_win_delete_callback_set(dialog->win, _ebluez4_cb_search_dialog_del);
@@ -173,7 +170,6 @@ static void
_ebluez4_cb_adap_settings(void *data)
{
Adapter *adap = data;
- E_Container *con;
E_Dialog *dialog;
Evas *evas;
Evas_Object *list;
@@ -184,9 +180,7 @@ _ebluez4_cb_adap_settings(void *data)
if (adap->dialog)
ebluez4_adapter_settings_del(adap->dialog);
- con = e_container_current_get(e_manager_current_get());
-
- dialog = e_dialog_new(con, "Adapter Dialog", "adapter");
+ dialog = e_dialog_new(NULL, "Adapter Dialog", "adapter");
e_dialog_title_set(dialog, _("Adapter Settings"));
e_dialog_resizable_set(dialog, EINA_TRUE);
e_win_delete_callback_set(dialog->win, _ebluez4_cb_adap_settings_dialog_del);
@@ -251,16 +245,13 @@ static void
_ebluez4_cb_adap_list(void *data, E_Menu *m, E_Menu_Item *mi)
{
Instance *inst = data;
- E_Container *con;
E_Dialog *dialog;
Evas *evas;
if (inst->adapters_dialog)
_ebluez4_adap_list_dialog_del(inst);
- con = e_container_current_get(e_manager_current_get());
-
- dialog = e_dialog_new(con, "Adapters Dialog", "adapters");
+ dialog = e_dialog_new(NULL, "Adapters Dialog", "adapters");
e_dialog_title_set(dialog, _("Adapters Available"));
e_dialog_resizable_set(dialog, EINA_TRUE);
e_win_delete_callback_set(dialog->win, _ebluez4_cb_adap_list_dialog_del);
@@ -461,8 +452,8 @@ _ebluez4_menu_new(Instance *inst)
e_menu_item_label_set(mi, _("Adapter Settings"));
e_menu_item_callback_set(mi, _ebluez4_cb_adap_list, inst);
- zone = e_util_zone_current_get(e_manager_current_get());
- ecore_x_pointer_xy_get(zone->container->win, &x, &y);
+ ecore_evas_pointer_xy_get(e_comp_get(inst->gcc)->ee, &x, &y);
+ zone = e_comp_zone_xy_get(e_comp_get(inst->gcc), x, y);
e_menu_activate_mouse(m, zone, x, y, 1, 1, E_MENU_POP_DIRECTION_DOWN,
ecore_x_current_time_get());
}
diff --git a/src/modules/clock/e_mod_config.c b/src/modules/clock/e_mod_config.c
index ca3ed4e724..9e2ac8c072 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_Container *con, Config_Item *ci)
+e_int_config_clock_module(E_Comp *comp, Config_Item *ci)
{
E_Config_Dialog *cfd;
E_Config_Dialog_View *v;
@@ -33,7 +33,7 @@ e_int_config_clock_module(E_Container *con, Config_Item *ci)
snprintf(buf, sizeof(buf), "%s/e-module-clock.edj",
e_module_dir_get(clock_config->module));
- cfd = e_config_dialog_new(con, _("Clock Settings"),
+ cfd = e_config_dialog_new(comp, _("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 86625c8ecb..ac28c23617 100644
--- a/src/modules/clock/e_mod_main.c
+++ b/src/modules/clock/e_mod_main.c
@@ -12,7 +12,6 @@ struct _Instance
E_Gadcon_Client *gcc;
Evas_Object *o_clock, *o_table, *o_popclock, *o_cal;
E_Gadcon_Popup *popup;
- Eina_List *handlers;
int madj;
@@ -283,28 +282,12 @@ static void
_clock_settings_cb(void *d1, void *d2 __UNUSED__)
{
Instance *inst = d1;
- e_int_config_clock_module(inst->popup->win->zone->container, inst->cfg);
+ e_int_config_clock_module(e_comp_get(inst->popup), inst->cfg);
e_object_del(E_OBJECT(inst->popup));
inst->popup = NULL;
inst->o_popclock = NULL;
}
-static Eina_Bool
-_clock_popup_fullscreen_change(Instance *inst, int type __UNUSED__, void *ev __UNUSED__)
-{
- _clock_popup_free(inst);
- return ECORE_CALLBACK_RENEW;
-}
-
-static Eina_Bool
-_clock_popup_desk_change(Instance *inst, int type __UNUSED__, E_Event_Desk_After_Show *ev)
-{
- if ((!inst->gcc) || (!inst->gcc->gadcon) || (!inst->gcc->gadcon->shelf)) return ECORE_CALLBACK_RENEW;
- if (e_shelf_desk_visible(inst->gcc->gadcon->shelf, ev->desk)) return ECORE_CALLBACK_RENEW;
- _clock_popup_free(inst);
- return ECORE_CALLBACK_RENEW;
-}
-
static void
_popclock_del_cb(void *data, Evas *e __UNUSED__, Evas_Object *obj, void *info __UNUSED__)
{
@@ -331,8 +314,8 @@ _clock_popup_new(Instance *inst)
_time_eval(inst);
- inst->popup = e_gadcon_popup_new(inst->gcc);
- evas = inst->popup->win->evas;
+ inst->popup = e_gadcon_popup_new(inst->gcc, 0);
+ evas = e_comp_get(inst->popup)->evas;
inst->o_table = e_widget_table_add(evas, 0);
@@ -392,9 +375,6 @@ _clock_popup_new(Instance *inst)
e_gadcon_popup_content_set(inst->popup, inst->o_table);
e_gadcon_popup_show(inst->popup);
-
- E_LIST_HANDLER_APPEND(inst->handlers, E_EVENT_DESK_AFTER_SHOW, _clock_popup_desk_change, inst);
- E_LIST_HANDLER_APPEND(inst->handlers, E_EVENT_BORDER_FULLSCREEN, _clock_popup_fullscreen_change, inst);
}
static void
@@ -565,9 +545,7 @@ static void
_clock_popup_free(Instance *inst)
{
if (!inst->popup) return;
- if (inst->popup) e_object_del(E_OBJECT(inst->popup));
- E_FREE_LIST(inst->handlers, ecore_event_handler_del);
- inst->popup = NULL;
+ E_FREE_FUNC(inst->popup, e_object_del);
inst->o_popclock = NULL;
}
@@ -575,15 +553,9 @@ static void
_clock_menu_cb_cfg(void *data, E_Menu *menu __UNUSED__, E_Menu_Item *mi __UNUSED__)
{
Instance *inst = data;
- E_Container *con;
- if (inst->popup)
- {
- e_object_del(E_OBJECT(inst->popup));
- inst->popup = NULL;
- }
- con = e_container_current_get(e_manager_current_get());
- e_int_config_clock_module(con, inst->cfg);
+ E_FREE_FUNC(inst->popup, e_object_del);
+ e_int_config_clock_module(NULL, inst->cfg);
}
static void
diff --git a/src/modules/clock/e_mod_main.h b/src/modules/clock/e_mod_main.h
index 66614a6da5..6953f7f313 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_Container *con, Config_Item *ci);
+void e_int_config_clock_module(E_Comp *comp, 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 192c41cc34..11a4e3a7a3 100644
--- a/src/modules/conf/e_conf.c
+++ b/src/modules/conf/e_conf.c
@@ -11,7 +11,7 @@ struct _E_Configure
{
E_Object e_obj_inherit;
- E_Container *con;
+ E_Comp *comp;
E_Win *win;
Evas *evas;
Evas_Object *edje;
@@ -62,10 +62,9 @@ static Eina_Bool _e_configure_module_update_cb(void *data, int type,
static E_Configure *_e_configure = NULL;
void
-e_configure_show(E_Container *con, const char *params)
+e_configure_show(E_Comp *comp, const char *params)
{
E_Configure *eco;
- E_Manager *man;
Evas_Coord ew, eh, mw, mh;
Evas_Object *o;
Evas_Modifier_Mask mask;
@@ -80,22 +79,22 @@ e_configure_show(E_Container *con, const char *params)
eco = _e_configure;
z = e_util_zone_current_get(e_manager_current_get());
- z2 = eco->win->border->zone;
+ z2 = eco->win->client->zone;
e_win_show(eco->win);
e_win_raise(eco->win);
- if (z->container == z2->container)
- e_border_desk_set(eco->win->border, e_desk_current_get(z));
+ if (z->comp == z2->comp)
+ e_client_desk_set(eco->win->client, e_desk_current_get(z));
else
{
- if (!eco->win->border->sticky)
- e_desk_show(eco->win->border->desk);
- ecore_x_pointer_warp(z2->container->win,
+ if (!eco->win->client->sticky)
+ e_desk_show(eco->win->client->desk);
+ ecore_evas_pointer_warp(z2->comp->ee,
z2->x + (z2->w / 2), z2->y + (z2->h / 2));
}
- e_border_unshade(eco->win->border, eco->win->border->shade.dir);
+ e_client_unshade(eco->win->client, eco->win->client->shade_dir);
if ((e_config->focus_setting == E_FOCUS_NEW_DIALOG) ||
(e_config->focus_setting == E_FOCUS_NEW_WINDOW))
- e_border_focus_set(eco->win->border, 1, 1);
+ evas_object_focus_set(eco->win->client->frame, 1);
EINA_LIST_FOREACH(e_widget_toolbar_items_get(eco->cat_list), l, it)
{
if (e_widget_toolbar_item_label_get(it) == params)
@@ -108,25 +107,16 @@ e_configure_show(E_Container *con, const char *params)
return;
}
- if (!con)
- {
- man = e_manager_current_get();
- if (!man) return;
- con = e_container_current_get(man);
- if (!con) con = e_container_number_get(man, 0);
- if (!con) return;
- }
-
eco = E_OBJECT_ALLOC(E_Configure, E_CONFIGURE_TYPE, _e_configure_free);
if (!eco) return;
- eco->win = e_win_new(con);
+ eco->win = e_win_new(comp);
if (!eco->win)
{
free(eco);
return;
}
eco->win->data = eco;
- eco->con = con;
+ eco->comp = comp;
eco->evas = e_win_evas_get(eco->win);
/* Event Handler for Module Updates */
@@ -188,7 +178,7 @@ e_configure_show(E_Container *con, const char *params)
evas_object_show(eco->edje);
e_win_show(eco->win);
- e_win_border_icon_set(eco->win, "preferences-system");
+ e_win_client_icon_set(eco->win, "preferences-system");
/* Preselect "Appearance" */
e_widget_focus_set(eco->cat_list, 1);
@@ -377,7 +367,7 @@ _e_configure_item_cb(void *data)
if (!(ci = data)) return;
cb = ci->cb;
- if (cb->path) e_configure_registry_call(cb->path, cb->eco->con, NULL);
+ if (cb->path) e_configure_registry_call(cb->path, cb->eco->comp, NULL);
}
static void
diff --git a/src/modules/conf/e_mod_config.c b/src/modules/conf/e_mod_config.c
index 81bf88e7cb..8f45717cce 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_Container *con, const char *params __UNUSED__)
+e_int_config_conf_module(E_Comp *comp, 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_Container *con, 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(con, _("Configuration Panel"), "Conf",
+ cfd = e_config_dialog_new(comp, _("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 6700cfa788..04f40f015b 100644
--- a/src/modules/conf/e_mod_main.c
+++ b/src/modules/conf/e_mod_main.c
@@ -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->container, NULL);
+ e_configure_registry_call(buf, m->zone->comp, NULL);
}
}
}
@@ -201,7 +201,7 @@ static void
_config_item_activate_cb(void *data, E_Menu *m, E_Menu_Item *mi __UNUSED__)
{
E_Configure_Cat *ecat = data;
- e_configure_show(m->zone->container, ecat ? ecat->cat : NULL);
+ e_configure_show(m->zone->comp, ecat ? ecat->cat : NULL);
}
static void
@@ -377,8 +377,8 @@ _e_mod_action_conf_cb(E_Object *obj, const char *params)
{
if (obj->type == E_MANAGER_TYPE)
zone = e_util_zone_current_get((E_Manager *)obj);
- else if (obj->type == E_CONTAINER_TYPE)
- zone = e_util_zone_current_get(((E_Container *)obj)->manager);
+ else if (obj->type == E_COMP_TYPE)
+ zone = e_zone_current_get((E_Comp*)obj);
else if (obj->type == E_ZONE_TYPE)
zone = ((E_Zone *)obj);
else
@@ -386,16 +386,16 @@ _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->container, params);
+ e_configure_registry_call(params, zone->comp, params);
else if (zone)
- e_configure_show(zone->container, params);
+ e_configure_show(zone->comp, params);
}
/* menu item callback(s) */
static void
_e_mod_conf_cb(void *data __UNUSED__, E_Menu *m, E_Menu_Item *mi __UNUSED__)
{
- e_configure_show(m->zone->container, NULL);
+ e_configure_show(m->zone->comp, NULL);
}
static void
diff --git a/src/modules/conf/e_mod_main.h b/src/modules/conf/e_mod_main.h
index 8e2f324a67..25cbd3ce05 100644
--- a/src/modules/conf/e_mod_main.h
+++ b/src/modules/conf/e_mod_main.h
@@ -17,10 +17,10 @@ struct _Config
int menu_augmentation;
};
-void e_configure_show(E_Container *con, const char *params);
+void e_configure_show(E_Comp *comp, const char *params);
void e_configure_del(void);
-E_Config_Dialog *e_int_config_conf_module(E_Container *con, const char *params);
+E_Config_Dialog *e_int_config_conf_module(E_Comp *comp, 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 f3d939df42..d6b4818bea 100644
--- a/src/modules/conf_applications/e_int_config_apps.c
+++ b/src/modules/conf_applications/e_int_config_apps.c
@@ -25,7 +25,7 @@ struct _E_Config_Dialog_Data
};
/* local function prototypes */
-static E_Config_Dialog *_create_dialog(E_Container *con, E_Config_Data *data);
+static E_Config_Dialog *_create_dialog(E_Comp *comp, E_Config_Data *data);
static void *_create_data(E_Config_Dialog *cfd);
static void _free_data(E_Config_Dialog *cfd __UNUSED__, E_Config_Dialog_Data *cfdata);
static Evas_Object *_basic_create(E_Config_Dialog *cfd __UNUSED__, Evas *evas, E_Config_Dialog_Data *cfdata);
@@ -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_Container *con, const char *params __UNUSED__)
+e_int_config_apps_add(E_Comp *comp, const char *params __UNUSED__)
{
E_Desktop_Edit *ed;
- if (!(ed = e_desktop_edit(con, NULL))) return NULL;
+ if (!(ed = e_desktop_edit(comp, NULL))) return NULL;
return ed->cfd;
}
E_Config_Dialog *
-e_int_config_apps_favs(E_Container *con, const char *params __UNUSED__)
+e_int_config_apps_favs(E_Comp *comp, const char *params __UNUSED__)
{
E_Config_Data *data;
char buff[PATH_MAX];
@@ -69,11 +69,11 @@ e_int_config_apps_favs(E_Container *con, 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(con, data);
+ return _create_dialog(comp, data);
}
E_Config_Dialog *
-e_int_config_apps_ibar(E_Container *con, const char *params __UNUSED__)
+e_int_config_apps_ibar(E_Comp *comp, const char *params __UNUSED__)
{
E_Config_Data *data;
char buff[PATH_MAX];
@@ -84,11 +84,11 @@ e_int_config_apps_ibar(E_Container *con, 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(con, data);
+ return _create_dialog(comp, data);
}
E_Config_Dialog *
-e_int_config_apps_ibar_other(E_Container *con, const char *path)
+e_int_config_apps_ibar_other(E_Comp *comp, const char *path)
{
E_Config_Data *data;
@@ -98,11 +98,11 @@ e_int_config_apps_ibar_other(E_Container *con, 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(con, data);
+ return _create_dialog(comp, data);
}
E_Config_Dialog *
-e_int_config_apps_startup(E_Container *con, const char *params __UNUSED__)
+e_int_config_apps_startup(E_Comp *comp, const char *params __UNUSED__)
{
E_Config_Data *data;
char buff[PATH_MAX];
@@ -114,11 +114,11 @@ e_int_config_apps_startup(E_Container *con, 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(con, data);
+ return _create_dialog(comp, data);
}
E_Config_Dialog *
-e_int_config_apps_restart(E_Container *con, const char *params __UNUSED__)
+e_int_config_apps_restart(E_Comp *comp, const char *params __UNUSED__)
{
E_Config_Data *data;
char buff[PATH_MAX];
@@ -129,11 +129,11 @@ e_int_config_apps_restart(E_Container *con, 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(con, data);
+ return _create_dialog(comp, data);
}
E_Config_Dialog *
-e_int_config_apps_desk_lock(E_Container *con, const char *params __UNUSED__)
+e_int_config_apps_desk_lock(E_Comp *comp, const char *params __UNUSED__)
{
E_Config_Data *data;
char buff[PATH_MAX];
@@ -144,11 +144,11 @@ e_int_config_apps_desk_lock(E_Container *con, 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(con, data);
+ return _create_dialog(comp, data);
}
E_Config_Dialog *
-e_int_config_apps_desk_unlock(E_Container *con, const char *params __UNUSED__)
+e_int_config_apps_desk_unlock(E_Comp *comp, const char *params __UNUSED__)
{
E_Config_Data *data;
char buff[PATH_MAX];
@@ -159,12 +159,12 @@ e_int_config_apps_desk_unlock(E_Container *con, 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(con, data);
+ return _create_dialog(comp, data);
}
/* local function prototypes */
static E_Config_Dialog *
-_create_dialog(E_Container *con, E_Config_Data *data)
+_create_dialog(E_Comp *comp, E_Config_Data *data)
{
E_Config_Dialog *cfd;
E_Config_Dialog_View *v;
@@ -185,7 +185,7 @@ _create_dialog(E_Container *con, E_Config_Data *data)
v->basic.create_widgets = _basic_create;
v->basic.apply_cfdata = _basic_apply;
- cfd = e_config_dialog_new(con, data->title, "E", data->dialog,
+ cfd = e_config_dialog_new(comp, data->title, "E", data->dialog,
data->icon, 0, v, data);
return cfd;
}
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 85e8bd167a..6d5e88be69 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_Container *con, const char *params __UNUSED__)
+e_int_config_apps_personal(E_Comp *comp, const char *params __UNUSED__)
{
E_Config_Dialog *cfd;
E_Config_Dialog_View *v;
@@ -36,7 +36,7 @@ e_int_config_apps_personal(E_Container *con, const char *params __UNUSED__)
v->free_cfdata = _free_data;
v->basic.create_widgets = _basic_create;
- cfd = e_config_dialog_new(con, _("Personal Application Launchers"),
+ cfd = e_config_dialog_new(comp, _("Personal Application Launchers"),
"E", "applications/personal_applications",
"preferences-applications-personal", 0, v, NULL);
return cfd;
@@ -182,15 +182,7 @@ _fill_apps_list(E_Config_Dialog_Data *cfdata, Evas_Object *il)
static void
_btn_cb_add(void *data __UNUSED__, void *data2 __UNUSED__)
{
- E_Manager *man;
- E_Container *con;
-
- man = e_manager_current_get();
- if (!man) return;
- con = e_container_current_get(man);
- if (!con) return;
-
- e_desktop_edit(con, NULL);
+ e_desktop_edit(NULL, NULL);
}
static void
diff --git a/src/modules/conf_applications/e_int_config_defapps.c b/src/modules/conf_applications/e_int_config_defapps.c
index 1e7b95898e..23cd169406 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_Container *con, const char *params __UNUSED__)
+e_int_config_defapps(E_Comp *comp, const char *params __UNUSED__)
{
E_Config_Dialog *cfd;
E_Config_Dialog_View *v;
@@ -71,7 +71,7 @@ e_int_config_defapps(E_Container *con, const char *params __UNUSED__)
v->basic.create_widgets = _basic_create;
v->basic.apply_cfdata = _basic_apply;
- cfd = e_config_dialog_new(con, _("Default Applications"),
+ cfd = e_config_dialog_new(comp, _("Default Applications"),
"E", "applications/default_applications",
"preferences-desktop-default-applications", 0, v, NULL);
return cfd;
diff --git a/src/modules/conf_applications/e_int_config_deskenv.c b/src/modules/conf_applications/e_int_config_deskenv.c
index e056644866..50cfb8af5f 100644
--- a/src/modules/conf_applications/e_int_config_deskenv.c
+++ b/src/modules/conf_applications/e_int_config_deskenv.c
@@ -20,7 +20,7 @@ struct _E_Config_Dialog_Data
/* a nice easy setup function that does the dirty work */
E_Config_Dialog *
-e_int_config_deskenv(E_Container *con, const char *params __UNUSED__)
+e_int_config_deskenv(E_Comp *comp, const char *params __UNUSED__)
{
E_Config_Dialog *cfd;
E_Config_Dialog_View *v;
@@ -37,7 +37,7 @@ e_int_config_deskenv(E_Container *con, const char *params __UNUSED__)
v->basic.check_changed = _basic_check_changed;
/* create config diaolg for NULL object/data */
- cfd = e_config_dialog_new(con, _("Desktop Environments"), "E",
+ cfd = e_config_dialog_new(comp, _("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 df851fdca1..ed5de927c6 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_Container *con, const char *params __UNUSED__);
-E_Config_Dialog *e_int_config_apps_add(E_Container *con, const char *params __UNUSED__);
-E_Config_Dialog *e_int_config_apps_ibar(E_Container *con, const char *params __UNUSED__);
-E_Config_Dialog *e_int_config_apps_ibar_other(E_Container *con, const char *path);
-E_Config_Dialog *e_int_config_apps_startup(E_Container *con, const char *params __UNUSED__);
-E_Config_Dialog *e_int_config_apps_restart(E_Container *con, const char *params __UNUSED__);
-E_Config_Dialog *e_int_config_apps_desk_lock(E_Container *con, const char *params __UNUSED__);
-E_Config_Dialog *e_int_config_apps_desk_unlock(E_Container *con, const char *params __UNUSED__);
+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_defapps(E_Container *con, const char *params __UNUSED__);
+E_Config_Dialog *e_int_config_defapps(E_Comp *comp, const char *params __UNUSED__);
-E_Config_Dialog *e_int_config_apps_personal(E_Container *con, 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_deskenv(E_Container *con, const char *params __UNUSED__);
+E_Config_Dialog *e_int_config_deskenv(E_Comp *comp, 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 e5973717a1..347504b95d 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_X_Window grab_win = 0;
static Eina_List *grab_hdls = NULL;
E_Config_Dialog *
-e_int_config_acpibindings(E_Container *con,
+e_int_config_acpibindings(E_Comp *comp,
const char *params __UNUSED__)
{
E_Config_Dialog *cfd;
@@ -68,7 +68,7 @@ e_int_config_acpibindings(E_Container *con,
v->basic.apply_cfdata = _basic_apply;
v->basic.create_widgets = _basic_create;
- cfd = e_config_dialog_new(con, _("ACPI Bindings"), "E",
+ cfd = e_config_dialog_new(comp, _("ACPI Bindings"), "E",
"advanced/acpi_bindings",
"preferences-system-power-management",
0, v, NULL);
@@ -517,7 +517,7 @@ _cb_add_binding(void *data,
if (grab_win != 0) return;
if (!(cfdata = data)) return;
man = e_manager_current_get();
- grab_dlg = e_dialog_new(e_container_current_get(man), "E",
+ grab_dlg = e_dialog_new(NULL, "E",
"_acpibind_getbind_dialog");
if (!grab_dlg) return;
e_dialog_title_set(grab_dlg, _("ACPI Binding"));
diff --git a/src/modules/conf_bindings/e_int_config_edgebindings.c b/src/modules/conf_bindings/e_int_config_edgebindings.c
index de3a31c72b..b594a6387e 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_Container *con, const char *params)
+e_int_config_edgebindings(E_Comp *comp, const char *params)
{
E_Config_Dialog *cfd;
E_Config_Dialog_View *v;
@@ -103,7 +103,7 @@ e_int_config_edgebindings(E_Container *con, const char *params)
v->basic.create_widgets = _basic_create_widgets;
v->override_auto_apply = 1;
- cfd = e_config_dialog_new(con, _("Edge Bindings Settings"), "E",
+ cfd = e_config_dialog_new(comp, _("Edge Bindings Settings"), "E",
"keyboard_and_mouse/edge_bindings",
"enlightenment/edges", 0, v, NULL);
if ((params) && (params[0]))
@@ -187,9 +187,8 @@ _free_data(E_Config_Dialog *cfd __UNUSED__, E_Config_Dialog_Data *cfdata)
static int
_basic_apply_data(E_Config_Dialog *cfd __UNUSED__, E_Config_Dialog_Data *cfdata)
{
- Eina_List *l, *ll, *lll;
- E_Manager *man;
- E_Container *con;
+ const Eina_List *l, *ll;
+ E_Comp *comp;
E_Zone *zone;
E_Config_Binding_Edge *bi, *bi2;
E_Layer layer;
@@ -228,17 +227,14 @@ _basic_apply_data(E_Config_Dialog *cfd __UNUSED__, E_Config_Dialog_Data *cfdata)
if (cfdata->fullscreen_flip != e_config->fullscreen_flip)
{
if (cfdata->fullscreen_flip)
- layer = E_LAYER_EDGE_FULLSCREEN;
+ layer = E_LAYER_CLIENT_EDGE_FULLSCREEN;
else
- layer = E_LAYER_EDGE;
+ layer = E_LAYER_CLIENT_EDGE;
- EINA_LIST_FOREACH(e_manager_list(), l, man)
+ EINA_LIST_FOREACH(e_comp_list(), l, comp)
{
- EINA_LIST_FOREACH(man->containers, ll, con)
- {
- EINA_LIST_FOREACH(con->zones, lll, zone)
- e_zone_edge_win_layer_set(zone, layer);
- }
+ EINA_LIST_FOREACH(comp->zones, ll, zone)
+ e_zone_edge_win_layer_set(zone, layer);
}
}
diff --git a/src/modules/conf_bindings/e_int_config_keybindings.c b/src/modules/conf_bindings/e_int_config_keybindings.c
index 20541e201a..c0e1fa3a33 100644
--- a/src/modules/conf_bindings/e_int_config_keybindings.c
+++ b/src/modules/conf_bindings/e_int_config_keybindings.c
@@ -88,7 +88,7 @@ struct _E_Config_Dialog_Data
};
E_Config_Dialog *
-e_int_config_keybindings(E_Container *con,
+e_int_config_keybindings(E_Comp *comp,
const char *params)
{
E_Config_Dialog *cfd;
@@ -103,7 +103,7 @@ e_int_config_keybindings(E_Container *con,
v->basic.create_widgets = _basic_create_widgets;
v->override_auto_apply = 1;
- cfd = e_config_dialog_new(con, _("Key Bindings Settings"), "E",
+ cfd = e_config_dialog_new(comp, _("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 c2e818ba36..ef234466aa 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_Container *con, const char *params __UNUSED__)
+e_int_config_mousebindings(E_Comp *comp, const char *params __UNUSED__)
{
E_Config_Dialog *cfd;
E_Config_Dialog_View *v;
@@ -105,7 +105,7 @@ e_int_config_mousebindings(E_Container *con, const char *params __UNUSED__)
v->basic.create_widgets = _basic_create_widgets;
v->override_auto_apply = 0;
- cfd = e_config_dialog_new(con,
+ cfd = e_config_dialog_new(comp,
_("Mouse Bindings Settings"),
"E", "keyboard_and_mouse/mouse_bindings",
"preferences-desktop-mouse", 0, v, NULL);
@@ -204,7 +204,7 @@ _basic_apply_data(E_Config_Dialog *cfd __UNUSED__, E_Config_Dialog_Data *cfdata)
_auto_apply_changes(cfdata);
- e_border_button_bindings_ungrab_all();
+ e_comp_button_bindings_ungrab_all();
e_managers_keys_ungrab();
EINA_LIST_FREE(e_bindings->mouse_bindings, eb)
@@ -268,7 +268,7 @@ _basic_apply_data(E_Config_Dialog *cfd __UNUSED__, E_Config_Dialog_Data *cfdata)
e_bindings_wheel_add(bw2->context, bw2->direction, bw2->z, bw2->modifiers,
bw2->any_mod, bw2->action, bw2->params);
}
- e_border_button_bindings_grab_all();
+ e_comp_button_bindings_grab_all();
e_managers_keys_grab();
e_config_save_queue();
@@ -349,7 +349,7 @@ _basic_create_widgets(E_Config_Dialog *cfd, Evas *evas, E_Config_Dialog_Data *cf
cfdata->gui.context.o_zone = ob;
e_widget_disabled_set(ob, 1);
e_widget_frametable_object_append(of, ob, 1, 2, 1, 1, 1, 1, 1, 1);
- ob = e_widget_radio_add(evas, _("Container"), E_BINDING_CONTEXT_CONTAINER, rg);
+ ob = e_widget_radio_add(evas, _("Container"), E_BINDING_CONTEXT_COMPOSITOR, rg);
cfdata->gui.context.o_container = ob;
e_widget_disabled_set(ob, 1);
e_widget_frametable_object_append(of, ob, 2, 0, 1, 1, 1, 1, 1, 1);
@@ -967,7 +967,7 @@ _update_binding_context(E_Config_Dialog_Data *cfdata)
e_widget_radio_toggle_set(cfdata->gui.context.o_popup, 1);
else if (ctxt == E_BINDING_CONTEXT_ZONE)
e_widget_radio_toggle_set(cfdata->gui.context.o_zone, 1);
- else if (ctxt == E_BINDING_CONTEXT_CONTAINER)
+ else if (ctxt == E_BINDING_CONTEXT_COMPOSITOR)
e_widget_radio_toggle_set(cfdata->gui.context.o_container, 1);
else if (ctxt == E_BINDING_CONTEXT_MANAGER)
e_widget_radio_toggle_set(cfdata->gui.context.o_manager, 1);
diff --git a/src/modules/conf_bindings/e_int_config_signalbindings.c b/src/modules/conf_bindings/e_int_config_signalbindings.c
index f57faca52c..e980437625 100644
--- a/src/modules/conf_bindings/e_int_config_signalbindings.c
+++ b/src/modules/conf_bindings/e_int_config_signalbindings.c
@@ -812,7 +812,7 @@ _basic_create_widgets(E_Config_Dialog *cfd, Evas *evas, E_Config_Dialog_Data *cf
E_Config_Dialog *
-e_int_config_signalbindings(E_Container *con, const char *params)
+e_int_config_signalbindings(E_Comp *comp, const char *params)
{
E_Config_Dialog *cfd;
E_Config_Dialog_View *v;
@@ -826,7 +826,7 @@ e_int_config_signalbindings(E_Container *con, const char *params)
v->basic.create_widgets = _basic_create_widgets;
v->override_auto_apply = 1;
- cfd = e_config_dialog_new(con, _("Signal Bindings Settings"), "E",
+ cfd = e_config_dialog_new(comp, _("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 e69f88dcdc..c323141ed8 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_Container *con, const char *params __UNUSED__);
-E_Config_Dialog *e_int_config_keybindings(E_Container *con, const char *params __UNUSED__);
-E_Config_Dialog *e_int_config_mousebindings(E_Container *con, const char *params __UNUSED__);
-E_Config_Dialog *e_int_config_edgebindings(E_Container *con, const char *params __UNUSED__);
-E_Config_Dialog *e_int_config_signalbindings(E_Container *con, const char *params);
+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);
/**
* @addtogroup Optional_Conf
diff --git a/src/modules/conf_comp/e_mod_config.c b/src/modules/conf_comp/e_mod_config.c
index e28d2a554e..519ac3777a 100644
--- a/src/modules/conf_comp/e_mod_config.c
+++ b/src/modules/conf_comp/e_mod_config.c
@@ -68,7 +68,7 @@ static int _advanced_apply_data(E_Config_Dialog *cfd,
E_Config_Dialog_Data *cfdata);
EINTERN E_Config_Dialog *
-e_int_config_comp_module(E_Container *con, const char *params __UNUSED__)
+e_int_config_comp_module(E_Comp *comp, const char *params __UNUSED__)
{
E_Config_Dialog *cfd;
E_Config_Dialog_View *v;
@@ -84,7 +84,7 @@ e_int_config_comp_module(E_Container *con, const char *params __UNUSED__)
v->advanced.apply_cfdata = _advanced_apply_data;
v->advanced.create_widgets = _advanced_create_widgets;
- cfd = e_config_dialog_new(con, _("Composite Settings"),
+ cfd = e_config_dialog_new(comp, _("Composite Settings"),
"E", "appearance/comp", "preferences-composite", 0, v, mod);
mod->config_dialog = cfd;
e_dialog_resizable_set(cfd->dia, 1);
diff --git a/src/modules/conf_comp/e_mod_config_match.c b/src/modules/conf_comp/e_mod_config_match.c
index 4823404b66..a5c6a32e6d 100644
--- a/src/modules/conf_comp/e_mod_config_match.c
+++ b/src/modules/conf_comp/e_mod_config_match.c
@@ -843,7 +843,7 @@ _create_data(E_Config_Dialog *cfd)
}
EINTERN E_Config_Dialog *
-e_int_config_comp_match(E_Container *con, const char *params __UNUSED__)
+e_int_config_comp_match(E_Comp *comp, const char *params __UNUSED__)
{
E_Config_Dialog *cfd;
E_Config_Dialog_View *v;
@@ -857,7 +857,7 @@ e_int_config_comp_match(E_Container *con, const char *params __UNUSED__)
v->basic.apply_cfdata = _basic_apply_data;
v->basic.create_widgets = _basic_create_widgets;
- cfd = e_config_dialog_new(con, _("Composite Match Settings"),
+ cfd = e_config_dialog_new(comp, _("Composite Match Settings"),
"E", "_comp_matches", "preferences-composite", 0, v, mod);
mod->match_config_dialog = cfd;
e_dialog_resizable_set(cfd->dia, 1);
diff --git a/src/modules/conf_comp/e_mod_main.c b/src/modules/conf_comp/e_mod_main.c
index 9a56304935..f5ab8f1c64 100644
--- a/src/modules/conf_comp/e_mod_main.c
+++ b/src/modules/conf_comp/e_mod_main.c
@@ -154,7 +154,7 @@ _style_selector(Evas *evas, const char **source)
oo = edje_object_add(e_livethumb_evas_get(ob));
ds_it->preview = oo;
- snprintf(buf, sizeof(buf), "e/comp/border/%s", style);
+ snprintf(buf, sizeof(buf), "e/comp/frame/%s", style);
e_theme_edje_object_set(oo, "base/theme/borders", buf);
e_layout_pack(oly, oo);
e_layout_child_move(oo, 39, 39);
diff --git a/src/modules/conf_comp/e_mod_main.h b/src/modules/conf_comp/e_mod_main.h
index 68ef92fae9..de641365c2 100644
--- a/src/modules/conf_comp/e_mod_main.h
+++ b/src/modules/conf_comp/e_mod_main.h
@@ -39,7 +39,7 @@ typedef struct _E_Demo_Style_Item
* @}
*/
EINTERN Evas_Object *_style_selector(Evas *evas, const char **source);
-EINTERN E_Config_Dialog *e_int_config_comp_module(E_Container *con, const char *params EINA_UNUSED);
-EINTERN E_Config_Dialog *e_int_config_comp_match(E_Container *con, const char *params EINA_UNUSED);
+EINTERN E_Config_Dialog *e_int_config_comp_module(E_Comp *comp, const char *params EINA_UNUSED);
+EINTERN E_Config_Dialog *e_int_config_comp_match(E_Comp *comp, const char *params EINA_UNUSED);
#endif
diff --git a/src/modules/conf_dialogs/e_int_config_dialogs.c b/src/modules/conf_dialogs/e_int_config_dialogs.c
index e1884e7253..eed6513b99 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_Container *con, const char *params __UNUSED__)
+e_int_config_dialogs(E_Comp *comp, const char *params __UNUSED__)
{
E_Config_Dialog *cfd;
E_Config_Dialog_View *v;
@@ -35,7 +35,7 @@ e_int_config_dialogs(E_Container *con, const char *params __UNUSED__)
v->basic.check_changed = _basic_check_changed;
v->override_auto_apply = 1;
- cfd = e_config_dialog_new(con, _("Dialog Settings"),
+ cfd = e_config_dialog_new(comp, _("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 ea3283ff21..ff954666a3 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_Container *con, const char *params __UNUSED__)
+e_int_config_profiles(E_Comp *comp, const char *params __UNUSED__)
{
E_Config_Dialog *cfd;
E_Config_Dialog_View *v;
@@ -50,7 +50,7 @@ e_int_config_profiles(E_Container *con, const char *params __UNUSED__)
v->basic.apply_cfdata = _apply_cfdata;
v->basic.create_widgets = _create_widgets;
- cfd = e_config_dialog_new(con, _("Profile Selector"),
+ cfd = e_config_dialog_new(comp, _("Profile Selector"),
"E", "settings/profiles",
"preferences-profiles", 0, v, NULL);
e_config_dialog_changed_auto_set(cfd, 0);
diff --git a/src/modules/conf_dialogs/e_mod_main.h b/src/modules/conf_dialogs/e_mod_main.h
index 8265b54843..9bab87bf8e 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_Container *con, const char *params __UNUSED__);
-E_Config_Dialog *e_int_config_dialogs(E_Container *con, const char *params __UNUSED__);
+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__);
/**
* @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 3869139e3c..18e8cf3378 100644
--- a/src/modules/conf_display/e_int_config_desk.c
+++ b/src/modules/conf_display/e_int_config_desk.c
@@ -9,7 +9,7 @@ static Eina_Bool _cb_bg_change(void *data, int type, void *event);
struct _E_Config_Dialog_Data
{
- int con_num;
+ int man_num;
int zone_num;
int desk_x;
int desk_y;
@@ -23,16 +23,16 @@ struct _E_Config_Dialog_Data
};
E_Config_Dialog *
-e_int_config_desk(E_Container *con, const char *params)
+e_int_config_desk(E_Comp *comp, const char *params)
{
E_Config_Dialog *cfd;
E_Config_Dialog_View *v;
E_Config_Dialog_Data *cfdata;
- int con_num, zone_num, dx, dy;
+ int man_num, zone_num, dx, dy;
if (!params) return NULL;
- con_num = zone_num = dx = dy = -1;
- if (sscanf(params, "%i %i %i %i", &con_num, &zone_num, &dx, &dy) != 4)
+ man_num = zone_num = dx = dy = -1;
+ if (sscanf(params, "%i %i %i %i", &man_num, &zone_num, &dx, &dy) != 4)
return NULL;
if (e_config_dialog_find("E", "internal/desk")) return NULL;
@@ -40,7 +40,7 @@ e_int_config_desk(E_Container *con, const char *params)
v = E_NEW(E_Config_Dialog_View, 1);
cfdata = E_NEW(E_Config_Dialog_Data, 1);
- cfdata->con_num = con_num;
+ cfdata->man_num = man_num;
cfdata->zone_num = zone_num;
cfdata->desk_x = dx;
cfdata->desk_y = dy;
@@ -51,7 +51,7 @@ e_int_config_desk(E_Container *con, const char *params)
v->basic.create_widgets = _basic_create;
v->override_auto_apply = 1;
- cfd = e_config_dialog_new(con, _("Desk Settings"), "E", "internal/desk",
+ cfd = e_config_dialog_new(comp, _("Desk Settings"), "E", "internal/desk",
"preferences-desktop", 0, v, cfdata);
return cfd;
}
@@ -65,7 +65,7 @@ _fill_data(E_Config_Dialog_Data *cfdata)
#if (ECORE_VERSION_MAJOR > 1) || (ECORE_VERSION_MINOR >= 8)
E_Config_Desktop_Window_Profile *prof;
#endif
- cfdata->bg = e_bg_file_get(cfdata->con_num, cfdata->zone_num, cfdata->desk_x, cfdata->desk_y);
+ cfdata->bg = e_bg_file_get(cfdata->man_num, cfdata->zone_num, cfdata->desk_x, cfdata->desk_y);
for (l = e_config->desktop_names; l; l = l->next)
{
@@ -73,7 +73,7 @@ _fill_data(E_Config_Dialog_Data *cfdata)
dn = l->data;
if (!dn) continue;
- if (dn->container != cfdata->con_num) continue;
+ if (dn->manager != cfdata->man_num) continue;
if (dn->zone != cfdata->zone_num) continue;
if ((dn->desk_x != cfdata->desk_x) || (dn->desk_y != cfdata->desk_y))
continue;
@@ -88,11 +88,10 @@ _fill_data(E_Config_Dialog_Data *cfdata)
snprintf(name, sizeof(name), _(e_config->desktop_default_name), cfdata->desk_x, cfdata->desk_y);
cfdata->name = strdup(name);
}
-#if (ECORE_VERSION_MAJOR > 1) || (ECORE_VERSION_MINOR >= 8)
ok = 0;
EINA_LIST_FOREACH(e_config->desktop_window_profiles, l, prof)
{
- if (!((prof->container == cfdata->con_num) &&
+ if (!((prof->manager == cfdata->man_num) &&
(prof->zone == cfdata->zone_num) &&
(prof->desk_x == cfdata->desk_x) &&
(prof->desk_y == cfdata->desk_y)))
@@ -106,7 +105,6 @@ _fill_data(E_Config_Dialog_Data *cfdata)
if (!ok)
cfdata->profile = strdup(e_config->desktop_default_window_profile);
-#endif
}
static void *
@@ -150,21 +148,21 @@ _basic_apply(E_Config_Dialog *cfd __UNUSED__, E_Config_Dialog_Data *cfdata)
if (!cfdata->profile[0])
cfdata->profile = strdup(e_config->desktop_default_window_profile);
#endif
- e_desk_name_del(cfdata->con_num, cfdata->zone_num,
+ e_desk_name_del(cfdata->man_num, cfdata->zone_num,
cfdata->desk_x, cfdata->desk_y);
- e_desk_name_add(cfdata->con_num, cfdata->zone_num,
+ e_desk_name_add(cfdata->man_num, cfdata->zone_num,
cfdata->desk_x, cfdata->desk_y, cfdata->name);
e_desk_name_update();
#if (ECORE_VERSION_MAJOR > 1) || (ECORE_VERSION_MINOR >= 8)
- e_desk_window_profile_del(cfdata->con_num, cfdata->zone_num,
+ e_desk_window_profile_del(cfdata->man_num, cfdata->zone_num,
cfdata->desk_x, cfdata->desk_y);
- e_desk_window_profile_add(cfdata->con_num, cfdata->zone_num,
+ e_desk_window_profile_add(cfdata->man_num, cfdata->zone_num,
cfdata->desk_x, cfdata->desk_y, cfdata->profile);
e_desk_window_profile_update();
#endif
- e_bg_del(cfdata->con_num, cfdata->zone_num, cfdata->desk_x, cfdata->desk_y);
- e_bg_add(cfdata->con_num, cfdata->zone_num,
+ e_bg_del(cfdata->man_num, cfdata->zone_num, cfdata->desk_x, cfdata->desk_y);
+ e_bg_add(cfdata->man_num, cfdata->zone_num,
cfdata->desk_x, cfdata->desk_y, cfdata->bg);
e_bg_update();
@@ -178,7 +176,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->con);
+ zone = e_zone_current_get(cfd->comp);
o = e_widget_list_add(evas, 0, 0);
@@ -224,10 +222,9 @@ _cb_config(void *data, void *data2 __UNUSED__)
cfdata = data;
if (!cfdata) return;
snprintf(buf, sizeof(buf), "%i %i %i %i",
- cfdata->con_num, cfdata->zone_num, cfdata->desk_x, cfdata->desk_y);
+ cfdata->man_num, cfdata->zone_num, cfdata->desk_x, cfdata->desk_y);
e_configure_registry_call("internal/wallpaper_desk",
- e_container_current_get(e_manager_current_get()),
- buf);
+ NULL, buf);
}
static Eina_Bool
@@ -241,12 +238,12 @@ _cb_bg_change(void *data, int type, void *event)
cfdata = data;
ev = event;
- if (ev->container != cfdata->con_num) return ECORE_CALLBACK_PASS_ON;
+ if (ev->manager != cfdata->man_num) return ECORE_CALLBACK_PASS_ON;
if (ev->zone != cfdata->zone_num) return ECORE_CALLBACK_PASS_ON;
if (ev->desk_x != cfdata->desk_x) return ECORE_CALLBACK_PASS_ON;
if (ev->desk_y != cfdata->desk_y) return ECORE_CALLBACK_PASS_ON;
- file = e_bg_file_get(cfdata->con_num, cfdata->zone_num,
+ file = e_bg_file_get(cfdata->man_num, cfdata->zone_num,
cfdata->desk_x, cfdata->desk_y);
eina_stringshare_replace(&cfdata->bg, file);
e_widget_preview_edje_set(cfdata->preview, cfdata->bg,
diff --git a/src/modules/conf_display/e_int_config_desklock.c b/src/modules/conf_display/e_int_config_desklock.c
index 1208899db9..143d254ce1 100644
--- a/src/modules/conf_display/e_int_config_desklock.c
+++ b/src/modules/conf_display/e_int_config_desklock.c
@@ -58,7 +58,7 @@ struct _E_Config_Dialog_Data
};
E_Config_Dialog *
-e_int_config_desklock(E_Container *con, const char *params __UNUSED__)
+e_int_config_desklock(E_Comp *comp, const char *params __UNUSED__)
{
E_Config_Dialog *cfd;
E_Config_Dialog_View *v;
@@ -74,7 +74,7 @@ e_int_config_desklock(E_Container *con, const char *params __UNUSED__)
v->basic.check_changed = _basic_check_changed;
v->override_auto_apply = 1;
- cfd = e_config_dialog_new(con, _("Screen Lock Settings"), "E",
+ cfd = e_config_dialog_new(comp, _("Screen Lock Settings"), "E",
"screen/screen_lock", "preferences-system-lock-screen",
0, v, NULL);
return cfd;
@@ -181,11 +181,10 @@ _basic_create(E_Config_Dialog *cfd __UNUSED__, Evas *evas, E_Config_Dialog_Data
E_Config_XKB_Layout *cl;
int grp = 0;
Evas_Object *otb, *ol, *ow, *of, *ot, *oc;
- Eina_List *l, *ll, *lll;
+ const Eina_List *l, *ll;
E_Zone *zone;
E_Radio_Group *rg;
- E_Manager *man;
- E_Container *con;
+ E_Comp *comp;
int screen_count, x = 0;
screen_count = ecore_x_xinerama_screen_count_get();
@@ -340,18 +339,17 @@ _basic_create(E_Config_Dialog *cfd __UNUSED__, Evas *evas, E_Config_Dialog_Data
cfdata->gui.o_table = ot = e_widget_table_add(evas, 1);
- EINA_LIST_FOREACH(e_manager_list(), l, man)
- EINA_LIST_FOREACH(man->containers, ll, con)
- EINA_LIST_FOREACH(con->zones, lll, zone)
- {
- ow = e_widget_preview_add(evas, 100, 140);
- cfdata->gui.bgs = eina_list_append(cfdata->gui.bgs, ow);
- evas_object_data_set(ow, "zone", zone);
- e_widget_disabled_set(ow,
- (cfdata->bg_method < E_DESKLOCK_BACKGROUND_METHOD_CUSTOM));
- evas_object_event_callback_add(ow, EVAS_CALLBACK_MOUSE_DOWN, _cb_bg_mouse_down, cfdata);
- e_widget_table_object_append(cfdata->gui.o_table, ow, x++, 0, 1, 1, 1, 1, 1, 1);
- }
+ EINA_LIST_FOREACH(e_comp_list(), l, comp)
+ EINA_LIST_FOREACH(comp->zones, ll, zone)
+ {
+ ow = e_widget_preview_add(evas, 100, 140);
+ cfdata->gui.bgs = eina_list_append(cfdata->gui.bgs, ow);
+ evas_object_data_set(ow, "zone", zone);
+ e_widget_disabled_set(ow,
+ (cfdata->bg_method < E_DESKLOCK_BACKGROUND_METHOD_CUSTOM));
+ evas_object_event_callback_add(ow, EVAS_CALLBACK_MOUSE_DOWN, _cb_bg_mouse_down, cfdata);
+ e_widget_table_object_append(cfdata->gui.o_table, ow, x++, 0, 1, 1, 1, 1, 1, 1);
+ }
_cb_method_change(cfdata, NULL, NULL);
e_widget_list_object_append(ol, cfdata->gui.o_table, 1, 1, 0.5);
e_widget_toolbook_page_append(otb, NULL, _("Wallpaper"), ol,
@@ -611,17 +609,11 @@ static int
_zone_count_get(void)
{
int num = 0;
- E_Manager *m;
- Eina_List *ml;
-
- EINA_LIST_FOREACH(e_manager_list(), ml, m)
- {
- Eina_List *cl;
- E_Container *con;
+ const Eina_List *l;
+ E_Comp *comp;
- EINA_LIST_FOREACH(m->containers, cl, con)
- num += eina_list_count(con->zones);
- }
+ EINA_LIST_FOREACH(e_comp_list(), l, comp)
+ num += eina_list_count(comp->zones);
return num;
}
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 5f950ab495..6e3ec56858 100644
--- a/src/modules/conf_display/e_int_config_desklock_fsel.c
+++ b/src/modules/conf_display/e_int_config_desklock_fsel.c
@@ -22,14 +22,12 @@ 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_Container *con;
+ E_Comp *comp = NULL;
E_Config_Dialog *cfd;
E_Config_Dialog_View *v;
if (parent)
- con = parent->con;
- else
- con = e_container_current_get(e_manager_current_get());
+ comp = parent->comp;
v = E_NEW(E_Config_Dialog_View, 1);
v->create_cfdata = _create_data;
@@ -38,7 +36,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(con, _("Select a Background..."),
+ cfd = e_config_dialog_new(comp, _("Select a Background..."),
"E", "_desklock_fsel_dialog",
"enlightenment/background", 0, v, parent);
e_object_data_set(E_OBJECT(cfd), bg);
diff --git a/src/modules/conf_display/e_int_config_desks.c b/src/modules/conf_display/e_int_config_desks.c
index a0e4bb6689..af6c5c252d 100644
--- a/src/modules/conf_display/e_int_config_desks.c
+++ b/src/modules/conf_display/e_int_config_desks.c
@@ -30,7 +30,7 @@ struct _E_Config_Dialog_Data
/* a nice easy setup function that does the dirty work */
E_Config_Dialog *
-e_int_config_desks(E_Container *con, const char *params __UNUSED__)
+e_int_config_desks(E_Comp *comp, const char *params __UNUSED__)
{
E_Config_Dialog *cfd;
E_Config_Dialog_View *v;
@@ -48,7 +48,7 @@ e_int_config_desks(E_Container *con, 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(con, _("Virtual Desktops Settings"),
+ cfd = e_config_dialog_new(comp, _("Virtual Desktops Settings"),
"E", "screen/virtual_desktops",
"preferences-desktop", 0, v, NULL);
return cfd;
@@ -121,14 +121,13 @@ _basic_apply_data(E_Config_Dialog *cfd __UNUSED__, E_Config_Dialog_Data *cfdata)
if ((cfdata->x != e_config->zone_desks_x_count) ||
(cfdata->y != e_config->zone_desks_y_count))
{
- const Eina_List *l, *ll, *lll;
- E_Manager *man;
- E_Container *con;
+ const Eina_List *l, *ll;
+ E_Comp *comp;
E_Zone *zone;
- EINA_LIST_FOREACH(e_manager_list(), l, man)
- EINA_LIST_FOREACH(man->containers, ll, con)
- EINA_LIST_FOREACH(con->zones, lll, zone)
- e_zone_desk_count_set(zone, cfdata->x, cfdata->y);
+
+ EINA_LIST_FOREACH(e_comp_list(), l, comp)
+ EINA_LIST_FOREACH(comp->zones, ll, zone)
+ e_zone_desk_count_set(zone, cfdata->x, cfdata->y);
}
eina_stringshare_replace(&e_config->desk_flip_animate_type, NULL);
@@ -153,21 +152,19 @@ _basic_apply_data(E_Config_Dialog *cfd __UNUSED__, E_Config_Dialog_Data *cfdata)
static int
_basic_check_changed(E_Config_Dialog *cfd __UNUSED__, E_Config_Dialog_Data *cfdata)
{
- const Eina_List *l, *ll, *lll;
- E_Manager *man;
- E_Container *con;
+ const Eina_List *l, *ll;
+ E_Comp *comp;
E_Zone *zone;
- EINA_LIST_FOREACH(e_manager_list(), l, man)
- EINA_LIST_FOREACH(man->containers, ll, con)
- EINA_LIST_FOREACH(con->zones, lll, zone)
- {
- int x, y;
+ EINA_LIST_FOREACH(e_comp_list(), l, comp)
+ EINA_LIST_FOREACH(comp->zones, ll, zone)
+ {
+ int x, y;
- e_zone_desk_count_get(zone, &x, &y);
- if ((x != cfdata->x) || (y != cfdata->y))
- return 1;
- }
+ e_zone_desk_count_get(zone, &x, &y);
+ if ((x != cfdata->x) || (y != cfdata->y))
+ return 1;
+ }
return ((e_util_strcasecmp(eina_list_nth(cfdata->comp_effects, cfdata->flip_mode), e_config->desk_flip_animate_type)) ||
(e_config->desk_flip_animate_interpolation != cfdata->flip_interp) ||
diff --git a/src/modules/conf_display/e_int_config_display.c b/src/modules/conf_display/e_int_config_display.c
index 49a629bce3..93709a9b7a 100644
--- a/src/modules/conf_display/e_int_config_display.c
+++ b/src/modules/conf_display/e_int_config_display.c
@@ -182,7 +182,7 @@ _surebox_new(E_Config_Dialog *cfd, E_Config_Dialog_Data *cfdata)
SureBox *sb;
sb = E_NEW(SureBox, 1);
- sb->dia = e_dialog_new(cfd->con, "E", "_display_res_sure_dialog");
+ sb->dia = e_dialog_new(cfd->comp, "E", "_display_res_sure_dialog");
sb->timer = ecore_timer_add(1.0, _surebox_timer_cb, sb);
sb->iterations = 15;
sb->cfd = cfd;
@@ -206,7 +206,7 @@ _surebox_new(E_Config_Dialog *cfd, E_Config_Dialog_Data *cfdata)
}
E_Config_Dialog *
-e_int_config_display(E_Container *con, const char *params __UNUSED__)
+e_int_config_display(E_Comp *comp, const char *params __UNUSED__)
{
E_Config_Dialog *cfd;
E_Config_Dialog_View *v;
@@ -227,7 +227,7 @@ e_int_config_display(E_Container *con, const char *params __UNUSED__)
v->basic.check_changed = _basic_check_changed;
v->override_auto_apply = 1;
- cfd = e_config_dialog_new(con, _("Screen Resolution Settings"),
+ cfd = e_config_dialog_new(comp, _("Screen Resolution Settings"),
"E", "screen/screen_resolution",
"preferences-system-screen-resolution", 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 f7625807ff..d95b652718 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_Container *con, const char *params __UNUSED__)
+e_int_config_dpms(E_Comp *comp, const char *params __UNUSED__)
{
E_Config_Dialog *cfd;
E_Config_Dialog_View *v;
@@ -54,7 +54,7 @@ e_int_config_dpms(E_Container *con, const char *params __UNUSED__)
v->basic.check_changed = _advanced_check_changed;
v->override_auto_apply = 1;
- cfd = e_config_dialog_new(con, _("Backlight Settings"), "E",
+ cfd = e_config_dialog_new(comp, _("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 7e0246ca21..010f154d8e 100644
--- a/src/modules/conf_display/e_int_config_screensaver.c
+++ b/src/modules/conf_display/e_int_config_screensaver.c
@@ -35,7 +35,7 @@ struct _E_Config_Dialog_Data
};
E_Config_Dialog *
-e_int_config_screensaver(E_Container *con, const char *params __UNUSED__)
+e_int_config_screensaver(E_Comp *comp, const char *params __UNUSED__)
{
E_Config_Dialog *cfd;
E_Config_Dialog_View *v;
@@ -51,7 +51,7 @@ e_int_config_screensaver(E_Container *con, const char *params __UNUSED__)
v->override_auto_apply = 1;
- cfd = e_config_dialog_new(con,_("Screen Saver Settings"),
+ cfd = e_config_dialog_new(comp,_("Screen Saver 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 8e7fd01e5b..1424890dc7 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_Container *con, const char *params);
-E_Config_Dialog *e_int_config_screensaver(E_Container *con, const char *params __UNUSED__);
-E_Config_Dialog *e_int_config_dpms(E_Container *con, const char *params __UNUSED__);
-E_Config_Dialog *e_int_config_display(E_Container *con, const char *params __UNUSED__);
-E_Config_Dialog *e_int_config_desks(E_Container *con, const char *params __UNUSED__);
-E_Config_Dialog *e_int_config_desklock(E_Container *con, const char *params __UNUSED__);
+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__);
void e_int_config_desklock_fsel_done(E_Config_Dialog *cfd, Evas_Object *bg, const char *bg_file);
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 5ece12e002..35f2901cda 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_Container *con, const char *params __UNUSED__)
+e_int_config_interaction(E_Comp *comp, const char *params __UNUSED__)
{
E_Config_Dialog *cfd;
E_Config_Dialog_View *v;
@@ -33,7 +33,7 @@ e_int_config_interaction(E_Container *con, const char *params __UNUSED__)
v->basic.check_changed = _basic_check_changed;
v->override_auto_apply = 1;
- cfd = e_config_dialog_new(con, _("Interaction Settings"),
+ cfd = e_config_dialog_new(comp, _("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 b906cf09e3..7021414914 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_Container *con, const char *params __UNUSED__)
+e_int_config_mouse(E_Comp *comp, const char *params __UNUSED__)
{
E_Config_Dialog *cfd;
E_Config_Dialog_View *v;
@@ -43,7 +43,7 @@ e_int_config_mouse(E_Container *con, const char *params __UNUSED__)
v->basic.create_widgets = _basic_create_widgets;
v->basic.check_changed = _basic_check_changed;
- cfd = e_config_dialog_new(con, _("Mouse Settings"), "E",
+ cfd = e_config_dialog_new(comp, _("Mouse Settings"), "E",
"keyboard_and_mouse/mouse_settings",
"preferences-desktop-mouse", 0, v, NULL);
return cfd;
@@ -98,8 +98,8 @@ _free_data(E_Config_Dialog *cfd __UNUSED__, E_Config_Dialog_Data *cfdata)
static int
_basic_apply_data(E_Config_Dialog *cfd __UNUSED__, E_Config_Dialog_Data *cfdata)
{
- Eina_List *l;
- E_Manager *man;
+ const Eina_List *l;
+ E_Comp *comp;
e_config->use_e_cursor = cfdata->use_e_cursor;
e_config->show_cursor = cfdata->show_cursor;
@@ -113,15 +113,15 @@ _basic_apply_data(E_Config_Dialog *cfd __UNUSED__, E_Config_Dialog_Data *cfdata)
e_config_save_queue();
/* Apply the above settings */
- EINA_LIST_FOREACH(e_manager_list(), l, man)
+ EINA_LIST_FOREACH(e_comp_list(), l, comp)
{
- if (man->pointer && !e_config->show_cursor)
+ if (comp->pointer && !e_config->show_cursor)
{
- e_pointer_hide(man->pointer);
+ e_pointer_hide(comp->pointer);
continue;
}
- if (man->pointer) e_object_del(E_OBJECT(man->pointer));
- man->pointer = e_pointer_window_new(man->root, 1);
+ if (comp->pointer) e_object_del(E_OBJECT(comp->pointer));
+ comp->pointer = e_pointer_window_new(comp->man->root, 1);
}
e_mouse_update();
diff --git a/src/modules/conf_interaction/e_mod_main.h b/src/modules/conf_interaction/e_mod_main.h
index 3851f50f9d..2e4edc6c9e 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_Container *con, const char *params __UNUSED__);
-E_Config_Dialog *e_int_config_mouse(E_Container *con, const char *params __UNUSED__);
+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__);
/**
* @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 734cebe1e1..043ea0a822 100644
--- a/src/modules/conf_intl/e_int_config_imc.c
+++ b/src/modules/conf_intl/e_int_config_imc.c
@@ -84,7 +84,7 @@ struct _E_Config_Dialog_Data
};
E_Config_Dialog *
-e_int_config_imc(E_Container *con, const char *params __UNUSED__)
+e_int_config_imc(E_Comp *comp, const char *params __UNUSED__)
{
E_Config_Dialog *cfd;
E_Config_Dialog_View *v;
@@ -99,7 +99,7 @@ e_int_config_imc(E_Container *con, const char *params __UNUSED__)
v->basic.create_widgets = _basic_create_widgets;
v->basic.apply_cfdata = _basic_apply_data;
- cfd = e_config_dialog_new(con,
+ cfd = e_config_dialog_new(comp,
_("Input Method Settings"),
"E", "language/input_method_settings",
"preferences-imc", 0, v, NULL);
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 fa8d4ef98d..005bd6e758 100644
--- a/src/modules/conf_intl/e_int_config_imc_import.c
+++ b/src/modules/conf_intl/e_int_config_imc_import.c
@@ -50,7 +50,7 @@ e_int_config_imc_import(E_Config_Dialog *parent)
import = E_NEW(Import, 1);
if (!import) return NULL;
- win = e_win_new(parent->con);
+ win = e_win_new(parent->comp);
if (!win)
{
E_FREE(import);
@@ -140,7 +140,7 @@ e_int_config_imc_import(E_Config_Dialog *parent)
e_win_size_min_set(win, w, h);
e_win_size_max_set(win, 99999, 99999);
e_win_show(win);
- e_win_border_icon_set(win, "preferences-imc");
+ e_win_client_icon_set(win, "preferences-imc");
win->data = import;
diff --git a/src/modules/conf_intl/e_int_config_intl.c b/src/modules/conf_intl/e_int_config_intl.c
index 59a2f4ce2e..265b74232f 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_Container *con, const char *params __UNUSED__)
+e_int_config_intl(E_Comp *comp, const char *params __UNUSED__)
{
E_Config_Dialog *cfd;
E_Config_Dialog_View *v;
@@ -596,7 +596,7 @@ e_int_config_intl(E_Container *con, 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(con,
+ cfd = e_config_dialog_new(comp,
_("Language Settings"),
"E", "language/language_settings",
"preferences-desktop-locale", 0, v, NULL);
@@ -604,7 +604,7 @@ e_int_config_intl(E_Container *con, const char *params __UNUSED__)
}
E_Config_Dialog *
-e_int_config_desklock_intl(E_Container *con, const char *params __UNUSED__)
+e_int_config_desklock_intl(E_Comp *comp, const char *params __UNUSED__)
{
E_Config_Dialog *cfd;
E_Config_Dialog_View *v;
@@ -621,7 +621,7 @@ e_int_config_desklock_intl(E_Container *con, 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(con,
+ cfd = e_config_dialog_new(comp,
_("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 fa8657dc86..aab511e869 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_Container *con, const char *params __UNUSED__);
+E_Config_Dialog *e_int_config_imc(E_Comp *comp, 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);
-E_Config_Dialog *e_int_config_intl(E_Container *con, const char *params __UNUSED__);
-E_Config_Dialog *e_int_config_desklock_intl(E_Container *con, const char *params __UNUSED__);
+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__);
/**
* @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 8d504cde10..bc422018d7 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_Container *con, const char *params __UNUSED__)
+e_int_config_menus(E_Comp *comp, const char *params __UNUSED__)
{
E_Config_Dialog *cfd;
E_Config_Dialog_View *v;
@@ -35,7 +35,7 @@ e_int_config_menus(E_Container *con, const char *params __UNUSED__)
v->basic.apply_cfdata = _basic_apply;
v->basic.check_changed = _basic_check_changed;
- cfd = e_config_dialog_new(con, _("Menu Settings"), "E", "menus/menu_settings",
+ cfd = e_config_dialog_new(comp, _("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 fd261160de..3686f005cc 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_Container *con, const char *params __UNUSED__);
+E_Config_Dialog *e_int_config_menus(E_Comp *comp, 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 803fc3803a..7107811597 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_Container *con, const char *params __UNUSED__)
+e_int_config_env(E_Comp *comp, const char *params __UNUSED__)
{
E_Config_Dialog *cfd;
E_Config_Dialog_View *v;
@@ -33,7 +33,7 @@ e_int_config_env(E_Container *con, const char *params __UNUSED__)
v->basic.create_widgets = _basic_create_widgets;
v->basic.apply_cfdata = _basic_apply_data;
- cfd = e_config_dialog_new(con, _("Environment Variables"),
+ cfd = e_config_dialog_new(comp, _("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 0ba50bc0e6..d971ecab0f 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_Container *con, const char *params __UNUSED__)
+e_int_config_paths(E_Comp *comp, const char *params __UNUSED__)
{
E_Config_Dialog *cfd;
E_Config_Dialog_View *v;
@@ -56,7 +56,7 @@ e_int_config_paths(E_Container *con, const char *params __UNUSED__)
v->basic.create_widgets = _basic_create_widgets;
v->basic.apply_cfdata = _basic_apply_data;
- cfd = e_config_dialog_new(con, _("Search Path Settings"),
+ cfd = e_config_dialog_new(comp, _("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 3d2c518b33..9afe3ded94 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_Container *con, const char *params __UNUSED__);
-E_Config_Dialog *e_int_config_paths(E_Container *con, const char *params __UNUSED__);
+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__);
/**
* @addtogroup Optional_Conf
diff --git a/src/modules/conf_performance/e_int_config_engine.c b/src/modules/conf_performance/e_int_config_engine.c
index 191e73dafe..71fc3d7fe4 100644
--- a/src/modules/conf_performance/e_int_config_engine.c
+++ b/src/modules/conf_performance/e_int_config_engine.c
@@ -19,7 +19,7 @@ struct _E_Config_Dialog_Data
};
E_Config_Dialog *
-e_int_config_engine(E_Container *con, const char *params __UNUSED__)
+e_int_config_engine(E_Comp *comp, const char *params __UNUSED__)
{
E_Config_Dialog *cfd;
E_Config_Dialog_View *v;
@@ -34,7 +34,7 @@ e_int_config_engine(E_Container *con, const char *params __UNUSED__)
v->basic.create_widgets = _basic_create_widgets;
v->basic.check_changed = _basic_check_changed;
- cfd = e_config_dialog_new(con, _("Engine Settings"), "E", "advanced/engine",
+ cfd = e_config_dialog_new(comp, _("Engine Settings"), "E", "advanced/engine",
"preferences-engine", 0, v, NULL);
return cfd;
}
diff --git a/src/modules/conf_performance/e_int_config_performance.c b/src/modules/conf_performance/e_int_config_performance.c
index 6d05f82c09..c94f4d6cc3 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_Container *con, const char *params __UNUSED__)
+e_int_config_performance(E_Comp *comp, const char *params __UNUSED__)
{
E_Config_Dialog *cfd;
E_Config_Dialog_View *v;
@@ -33,7 +33,7 @@ e_int_config_performance(E_Container *con, const char *params __UNUSED__)
v->basic.create_widgets = _basic_create;
v->basic.check_changed = _basic_check_changed;
- cfd = e_config_dialog_new(con, _("Performance Settings"),
+ cfd = e_config_dialog_new(comp, _("Performance Settings"),
"E", "advanced/performance",
"preferences-system-performance", 0, v, NULL);
return cfd;
diff --git a/src/modules/conf_performance/e_int_config_powermanagement.c b/src/modules/conf_performance/e_int_config_powermanagement.c
index 9f89161fb6..f5f1138258 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_Container *con, const char *params __UNUSED__)
+e_int_config_powermanagement(E_Comp *comp, const char *params __UNUSED__)
{
E_Config_Dialog *cfd;
E_Config_Dialog_View *v;
@@ -38,7 +38,7 @@ e_int_config_powermanagement(E_Container *con, const char *params __UNUSED__)
v->basic.create_widgets = _basic_create;
v->basic.check_changed = _basic_check_changed;
- cfd = e_config_dialog_new(con, _("Power Management Settings"),
+ cfd = e_config_dialog_new(comp, _("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 6394e39ae9..eb6ec34c2f 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_Container *con, const char *params __UNUSED__);
-E_Config_Dialog *e_int_config_performance(E_Container *con, const char *params __UNUSED__);
-E_Config_Dialog *e_int_config_powermanagement(E_Container *con, const char *params __UNUSED__);
+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__);
/**
* @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 e93614eea0..885e403e53 100644
--- a/src/modules/conf_randr/e_int_config_randr.c
+++ b/src/modules/conf_randr/e_int_config_randr.c
@@ -23,7 +23,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_Container *con, const char *params EINA_UNUSED)
+e_int_config_randr(E_Comp *comp, const char *params EINA_UNUSED)
{
E_Config_Dialog *cfd;
E_Config_Dialog_View *v;
@@ -45,7 +45,7 @@ e_int_config_randr(E_Container *con, const char *params EINA_UNUSED)
v->override_auto_apply = EINA_TRUE;
/* create new dialog */
- cfd = e_config_dialog_new(con, _("Screen Setup"),
+ cfd = e_config_dialog_new(comp, _("Screen Setup"),
"E", "screen/screen_setup",
"preferences-system-screen-resolution",
0, v, NULL);
diff --git a/src/modules/conf_randr/e_int_config_randr.h b/src/modules/conf_randr/e_int_config_randr.h
index f7760c8a38..4a80bad022 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_Container *con, const char *params __UNUSED__);
+E_Config_Dialog *e_int_config_randr(E_Comp *comp, 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 4ab07ee289..c33e9ada54 100644
--- a/src/modules/conf_randr/e_smart_monitor.c
+++ b/src/modules/conf_randr/e_smart_monitor.c
@@ -67,8 +67,8 @@ struct _E_Smart_Data
Evas_Coord vw, vh;
} grid;
- /* container number */
- unsigned int con_num;
+ /* manager number */
+ unsigned int man_num;
/* zone number */
unsigned int zone_num;
@@ -437,7 +437,6 @@ e_smart_monitor_background_set(Evas_Object *obj, Evas_Coord dx, Evas_Coord dy)
{
E_Smart_Data *sd;
E_Manager *man;
- E_Container *con;
E_Zone *zone;
E_Desk *desk;
@@ -448,13 +447,10 @@ e_smart_monitor_background_set(Evas_Object *obj, Evas_Coord dx, Evas_Coord dy)
/* get the current manager */
man = e_manager_current_get();
-
- /* get the current container */
- con = e_container_current_get(man);
- sd->con_num = con->num;
+ sd->man_num = man->num;
/* get the zone number */
- if (!(zone = e_container_zone_at_point_get(con, dx, dy)))
+ if (!(zone = e_comp_zone_xy_get(man->comp, dx, dy)))
zone = e_util_zone_current_get(man);
sd->zone_num = zone->num;
@@ -1350,7 +1346,7 @@ _e_smart_monitor_background_set(E_Smart_Data *sd, int dx, int dy)
if (!sd) return;
/* try to get the background file for this desktop */
- if ((bg = e_bg_file_get(sd->con_num, sd->zone_num, dx, dy)))
+ if ((bg = e_bg_file_get(sd->man_num, sd->zone_num, dx, dy)))
{
Evas_Object *o;
@@ -1379,8 +1375,8 @@ _e_smart_monitor_background_update(void *data, int type EINA_UNUSED, void *event
ev = event;
- /* check this bg event happened on our container */
- if (((ev->container < 0) || (ev->container == (int)sd->con_num)) &&
+ /* check this bg event happened on our manager */
+ if (((ev->manager < 0) || (ev->manager == (int)sd->man_num)) &&
((ev->zone < 0) || (ev->zone == (int)sd->zone_num)))
{
/* check this bg event happened on our desktop */
diff --git a/src/modules/conf_shelves/e_int_config_shelf.c b/src/modules/conf_shelves/e_int_config_shelf.c
index 072b69d983..3d97d0712d 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_Container *con, const char *params __UNUSED__)
+e_int_config_shelf(E_Comp *comp, const char *params __UNUSED__)
{
E_Config_Dialog *cfd;
E_Config_Dialog_View *v;
@@ -52,7 +52,7 @@ e_int_config_shelf(E_Container *con, const char *params __UNUSED__)
v->free_cfdata = _free_data;
v->basic.create_widgets = _basic_create;
- cfd = e_config_dialog_new(con, _("Shelf Settings"), "E",
+ cfd = e_config_dialog_new(comp, _("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->border) return ECORE_CALLBACK_RENEW;
- zone = cfdata->cfd->dia->win->border->zone;
+ if (!cfdata->cfd->dia->win->client) return ECORE_CALLBACK_RENEW;
+ zone = cfdata->cfd->dia->win->client->zone;
if (ev->shelf->zone == zone)
_ilist_item_new(cfdata, 1, ev->shelf);
return ECORE_CALLBACK_RENEW;
@@ -125,7 +125,7 @@ _basic_create(E_Config_Dialog *cfd, Evas *evas, E_Config_Dialog_Data *cfdata)
e_dialog_resizable_set(cfd->dia, 1);
ol = e_widget_list_add(evas, 0, 0);
- zone = cfdata->cfd->dia->win->border ? cfdata->cfd->dia->win->border->zone : e_zone_current_get(cfdata->cfd->con);
+ zone = cfdata->cfd->dia->win->client ? cfdata->cfd->dia->win->client->zone : e_zone_current_get(cfdata->cfd->comp);
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));
@@ -212,10 +212,10 @@ _ilist_empty(E_Config_Dialog_Data *cfdata)
E_Desk *desk;
E_Zone *zone;
- if ((!cfdata) || (!cfdata->cfd) || (!cfdata->cfd->con) || (!cfdata->cfd->con->manager)) return;
- zone = cfdata->cfd->dia->win->border ? cfdata->cfd->dia->win->border->zone : e_zone_current_get(cfdata->cfd->con);
+ 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 (!zone) return;
- desk = cfdata->cfd->dia->win->border ? cfdata->cfd->dia->win->border->desk : e_desk_current_get(zone);
+ desk = cfdata->cfd->dia->win->client ? cfdata->cfd->dia->win->client->desk : e_desk_current_get(zone);
EINA_LIST_FOREACH(e_shelf_list(), l, es)
{
if (es->zone != zone) continue;
@@ -265,7 +265,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->border ? cfdata->cfd->dia->win->border->zone : e_zone_current_get(cfdata->cfd->con);
+ zone = cfdata->cfd->dia->win->client ? cfdata->cfd->dia->win->client->zone : e_zone_current_get(cfdata->cfd->comp);
desk = e_desk_current_get(zone);
EINA_LIST_FOREACH(e_shelf_list(), l, es)
@@ -346,7 +346,7 @@ _cb_add(void *data, void *data2 __UNUSED__)
cfdata = data;
if (!cfdata) return;
- zone = cfdata->cfd->dia->win->border ? cfdata->cfd->dia->win->border->zone : e_zone_current_get(cfdata->cfd->con);
+ zone = cfdata->cfd->dia->win->client ? cfdata->cfd->dia->win->client->zone : e_zone_current_get(cfdata->cfd->comp);
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 3d814fd3f9..ff2e03230c 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_Container *con, const char *params __UNUSED__);
+E_Config_Dialog *e_int_config_shelf(E_Comp *comp, 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 ee87f0a3f0..21b7e7cfd4 100644
--- a/src/modules/conf_shelves/e_mod_main.c
+++ b/src/modules/conf_shelves/e_mod_main.c
@@ -63,7 +63,7 @@ e_modapi_save(E_Module *m __UNUSED__)
static void
_e_mod_run_cb(void *data __UNUSED__, E_Menu *m, E_Menu_Item *mi __UNUSED__)
{
- e_configure_registry_call("extensions/shelves", m->zone->container, NULL);
+ e_configure_registry_call("extensions/shelves", m->zone->comp, 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 a97598a43c..0b10cb4c45 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_Container *con, const char *params __UNUSED__);
+E_Config_Dialog *e_int_config_shelf(E_Comp *comp, 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 aeb5615dff..58167e5407 100644
--- a/src/modules/conf_theme/e_int_config_borders.c
+++ b/src/modules/conf_theme/e_int_config_borders.c
@@ -12,14 +12,14 @@ static void _basic_apply_border(E_Config_Dialog_Data *cfdata);
struct _E_Config_Dialog_Data
{
- E_Border *border;
- E_Container *container;
+ E_Client *client;
+ E_Comp *comp;
const char *bordername;
int remember_border;
};
E_Config_Dialog *
-e_int_config_borders(E_Container *con, const char *params __UNUSED__)
+e_int_config_borders(E_Comp *comp, const char *params __UNUSED__)
{
E_Config_Dialog *cfd;
E_Config_Dialog_View *v;
@@ -27,30 +27,30 @@ e_int_config_borders(E_Container *con, 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(con, _("Default Border Style"),
+ cfd = e_config_dialog_new(comp, _("Default Border Style"),
"E", "appearance/borders",
- "preferences-system-windows", 0, v, con);
+ "preferences-system-windows", 0, v, comp);
return cfd;
}
E_Config_Dialog *
-e_int_config_borders_border(E_Container *con __UNUSED__, const char *params)
+e_int_config_borders_border(E_Comp *comp __UNUSED__, const char *params)
{
E_Config_Dialog *cfd;
E_Config_Dialog_View *v;
- E_Border *bd;
+ E_Client *ec;
if (!params) return NULL;
- bd = NULL;
- sscanf(params, "%p", &bd);
- if (!bd) return NULL;
+ ec = NULL;
+ sscanf(params, "%p", &ec);
+ if (!ec) return NULL;
v = _config_view_new();
if (!v) return NULL;
- cfd = e_config_dialog_new(bd->zone->container,
+ cfd = e_config_dialog_new(ec->zone->comp,
_("Window Border Selection"),
"E", "_config_border_border_style_dialog",
- "preferences-system-windows", 0, v, bd);
- bd->border_border_dialog = cfd;
+ "preferences-system-windows", 0, v, ec);
+ ec->border_border_dialog = cfd;
return cfd;
}
@@ -76,12 +76,12 @@ _create_data(E_Config_Dialog *cfd)
E_Config_Dialog_Data *cfdata;
cfdata = E_NEW(E_Config_Dialog_Data, 1);
- cfdata->container = NULL;
- cfdata->border = NULL;
- if (E_OBJECT(cfd->data)->type == E_CONTAINER_TYPE)
- cfdata->container = cfd->data;
+ cfdata->comp = NULL;
+ cfdata->client = NULL;
+ if (E_OBJECT(cfd->data)->type == E_COMP_TYPE)
+ cfdata->comp = cfd->data;
else
- cfdata->border = cfd->data;
+ cfdata->client = cfd->data;
_fill_data(cfdata);
return cfdata;
@@ -90,14 +90,14 @@ _create_data(E_Config_Dialog *cfd)
static void
_fill_data(E_Config_Dialog_Data *cfdata)
{
- if (cfdata->border)
+ if (cfdata->client)
{
- if ((cfdata->border->remember) &&
- (cfdata->border->remember->apply & E_REMEMBER_APPLY_BORDER))
+ if ((cfdata->client->remember) &&
+ (cfdata->client->remember->apply & E_REMEMBER_APPLY_BORDER))
{
cfdata->remember_border = 1;
}
- cfdata->bordername = eina_stringshare_add(cfdata->border->client.border.name);
+ cfdata->bordername = eina_stringshare_add(cfdata->client->border.name);
}
else
cfdata->bordername = eina_stringshare_add(e_config->theme_default_border_style);
@@ -106,8 +106,8 @@ _fill_data(E_Config_Dialog_Data *cfdata)
static void
_free_data(E_Config_Dialog *cfd __UNUSED__, E_Config_Dialog_Data *cfdata)
{
- if (cfdata->border)
- cfdata->border->border_border_dialog = NULL;
+ if (cfdata->client)
+ cfdata->client->border_border_dialog = NULL;
eina_stringshare_del(cfdata->bordername);
E_FREE(cfdata);
@@ -117,13 +117,13 @@ static int
_basic_check_changed(E_Config_Dialog *cfd __UNUSED__, E_Config_Dialog_Data *cfdata)
{
Eina_Bool remch = ((cfdata->remember_border &&
- !((cfdata->border->remember) &&
- (cfdata->border->remember->apply & E_REMEMBER_APPLY_BORDER))) ||
- (!cfdata->remember_border && cfdata->border &&
- ((cfdata->border->remember) &&
- (cfdata->border->remember->apply & E_REMEMBER_APPLY_BORDER))));
- if (cfdata->border)
- return (cfdata->bordername != cfdata->border->client.border.name) || (remch);
+ !((cfdata->client->remember) &&
+ (cfdata->client->remember->apply & E_REMEMBER_APPLY_BORDER))) ||
+ (!cfdata->remember_border && cfdata->client &&
+ ((cfdata->client->remember) &&
+ (cfdata->client->remember->apply & E_REMEMBER_APPLY_BORDER))));
+ if (cfdata->client)
+ return (cfdata->bordername != cfdata->client->border.name) || (remch);
else
return (cfdata->bordername != e_config->theme_default_border_style) || (remch);
}
@@ -131,17 +131,18 @@ _basic_check_changed(E_Config_Dialog *cfd __UNUSED__, E_Config_Dialog_Data *cfda
static int
_basic_apply(E_Config_Dialog *cfd __UNUSED__, E_Config_Dialog_Data *cfdata)
{
- if (cfdata->border)
+ if (cfdata->client)
_basic_apply_border(cfdata);
- else if (cfdata->container)
+ else if (cfdata->comp)
{
Eina_List *l;
- E_Border *bd;
+ E_Client *ec;
eina_stringshare_replace(&e_config->theme_default_border_style, cfdata->bordername);
- EINA_LIST_FOREACH(e_border_client_list(), l, bd)
+ EINA_LIST_FOREACH(cfdata->comp->clients, l, ec)
{
- bd->changed = 1;
- bd->client.border.changed = 1;
+ if (e_client_util_ignored_get(ec)) continue;
+ EC_CHANGED(ec);
+ ec->border.changed = 1;
}
}
e_config_save_queue();
@@ -151,15 +152,15 @@ _basic_apply(E_Config_Dialog *cfd __UNUSED__, E_Config_Dialog_Data *cfdata)
static void
_basic_apply_border(E_Config_Dialog_Data *cfdata)
{
- if ((!cfdata->border->lock_border) && (!cfdata->border->shaded))
+ if ((!cfdata->client->lock_border) && (!cfdata->client->shaded))
{
- eina_stringshare_replace(&cfdata->border->bordername, cfdata->bordername);
- cfdata->border->client.border.changed = 1;
- cfdata->border->changed = 1;
+ eina_stringshare_replace(&cfdata->client->bordername, cfdata->bordername);
+ cfdata->client->border.changed = 1;
+ EC_CHANGED(cfdata->client);
}
if (cfdata->remember_border)
{
- E_Remember *rem = cfdata->border->remember;
+ E_Remember *rem = cfdata->client->remember;
if (!rem)
{
@@ -169,22 +170,22 @@ _basic_apply_border(E_Config_Dialog_Data *cfdata)
if (rem)
{
rem->apply |= E_REMEMBER_APPLY_BORDER;
- e_remember_default_match_set(rem, cfdata->border);
- eina_stringshare_replace(&rem->prop.border, cfdata->border->bordername);
- cfdata->border->remember = rem;
- e_remember_update(cfdata->border);
+ e_remember_default_match_set(rem, cfdata->client);
+ eina_stringshare_replace(&rem->prop.border, cfdata->client->bordername);
+ cfdata->client->remember = rem;
+ e_remember_update(cfdata->client);
}
}
else
{
- if (cfdata->border->remember)
+ if (cfdata->client->remember)
{
- cfdata->border->remember->apply &= ~E_REMEMBER_APPLY_BORDER;
- if (cfdata->border->remember->apply == 0)
+ cfdata->client->remember->apply &= ~E_REMEMBER_APPLY_BORDER;
+ if (cfdata->client->remember->apply == 0)
{
- e_remember_unuse(cfdata->border->remember);
- e_remember_del(cfdata->border->remember);
- cfdata->border->remember = NULL;
+ e_remember_unuse(cfdata->client->remember);
+ e_remember_del(cfdata->client->remember);
+ cfdata->client->remember = NULL;
}
}
}
@@ -200,8 +201,8 @@ _basic_create(E_Config_Dialog *cfd, Evas *evas, E_Config_Dialog_Data *cfdata)
const char *str, *tmp;
e_dialog_resizable_set(cfd->dia, 1);
- if (cfdata->border)
- tmp = cfdata->border->client.border.name;
+ if (cfdata->client)
+ tmp = cfdata->client->border.name;
else
tmp = e_config->theme_default_border_style;
@@ -250,7 +251,7 @@ _basic_create(E_Config_Dialog *cfd, Evas *evas, E_Config_Dialog_Data *cfdata)
e_widget_framelist_object_append(of, ol);
e_widget_list_object_append(o, of, 1, 1, 0.5);
- if (cfdata->border)
+ if (cfdata->client)
{
ob = e_widget_check_add(evas, _("Remember this Border for this window next time it appears"),
&(cfdata->remember_border));
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 95550f290b..f3fc39e009 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_Container *con, const char *params __UNUSED__)
+e_int_config_color_classes(E_Comp *comp, const char *params __UNUSED__)
{
E_Config_Dialog *cfd;
E_Config_Dialog_View *v;
@@ -160,7 +160,7 @@ e_int_config_color_classes(E_Container *con, const char *params __UNUSED__)
v->basic.apply_cfdata = _basic_apply_data;
v->basic.create_widgets = _basic_create_widgets;
- cfd = e_config_dialog_new(con, _("Colors"), "E", "appearance/colors",
+ cfd = e_config_dialog_new(comp, _("Colors"), "E", "appearance/colors",
"preferences-desktop-color", 0, v, NULL);
return cfd;
}
diff --git a/src/modules/conf_theme/e_int_config_fonts.c b/src/modules/conf_theme/e_int_config_fonts.c
index 43dfe59a94..2f4dc00deb 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_Container *con, const char *params __UNUSED__)
+e_int_config_fonts(E_Comp *comp, const char *params __UNUSED__)
{
E_Config_Dialog *cfd;
E_Config_Dialog_View *v;
@@ -164,7 +164,7 @@ e_int_config_fonts(E_Container *con, const char *params __UNUSED__)
v->advanced.create_widgets = _advanced_create_widgets;
v->advanced.apply_cfdata = _advanced_apply_data;
- cfd = e_config_dialog_new(con, _("Font Settings"),
+ cfd = e_config_dialog_new(comp, _("Font Settings"),
"E", "appearance/fonts",
"preferences-desktop-font", 0, v, NULL);
return cfd;
diff --git a/src/modules/conf_theme/e_int_config_scale.c b/src/modules/conf_theme/e_int_config_scale.c
index 6e22b1890d..8024b5bc48 100644
--- a/src/modules/conf_theme/e_int_config_scale.c
+++ b/src/modules/conf_theme/e_int_config_scale.c
@@ -106,7 +106,7 @@ _scale_preview_new(E_Config_Dialog_Data *cfdata, Evas *e, double sc, double *scp
evas_object_show(bg);
cm = edje_object_add(e_widget_preview_evas_get(ob));
- e_theme_edje_object_set(cm, "base/theme/borders", "e/comp/border/default");
+ e_theme_edje_object_set(cm, "base/theme/borders", "e/comp/frame/default");
evas_object_move(cm, 16, 16);
evas_object_resize(cm, 180 * sc, 70);
evas_object_show(cm);
@@ -135,9 +135,9 @@ _scale_preview_new(E_Config_Dialog_Data *cfdata, Evas *e, double sc, double *scp
else
edje_object_part_text_set(bd, "e.text.title", tit);
edje_object_signal_emit(bd, "e,state,focused", "e");
+ edje_object_signal_emit(bd, "e,state,shadow,on", "e");
- edje_object_signal_emit(cm, "e,state,visible,on", "e");
- edje_object_signal_emit(cm, "e,state,shadow,on", "e");
+ edje_object_signal_emit(cm, "e,state,visible", "e");
edje_object_signal_emit(cm, "e,state,focus,on", "e");
edje_object_scale_set(bd, sc);
@@ -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_Container *con, const char *params __UNUSED__)
+e_int_config_scale(E_Comp *comp, const char *params __UNUSED__)
{
E_Config_Dialog *cfd;
E_Config_Dialog_View *v;
@@ -177,7 +177,7 @@ e_int_config_scale(E_Container *con, const char *params __UNUSED__)
v->advanced.apply_cfdata = _adv_apply;
v->advanced.check_changed = _adv_changed;
- cfd = e_config_dialog_new(con, _("Scale Settings"), "E", "appearance/scale",
+ cfd = e_config_dialog_new(comp, _("Scale Settings"), "E", "appearance/scale",
"preferences-scale", 0, v, NULL);
e_config_dialog_changed_auto_set(cfd, 1);
return cfd;
@@ -275,8 +275,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->border->internal_no_reopen = 1;
- e_remember_update(cfd->dia->win->border);
+ cfd->dia->win->client->internal_no_reopen = 1;
+ e_remember_update(cfd->dia->win->client);
e_config_save_queue();
a = e_action_find("restart");
@@ -368,8 +368,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->border->internal_no_reopen = 1;
- e_remember_update(cfd->dia->win->border);
+ cfd->dia->win->client->internal_no_reopen = 1;
+ e_remember_update(cfd->dia->win->client);
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 56c1dc15bf..2b7f8741cd 100644
--- a/src/modules/conf_theme/e_int_config_theme.c
+++ b/src/modules/conf_theme/e_int_config_theme.c
@@ -69,7 +69,7 @@ _e_int_theme_preview_set(Evas_Object *preview, const char *file)
objs = eina_list_append(objs, o);
o = edje_object_add(e);
- _e_int_theme_edje_file_set(o, file, "e/comp/border/popup");
+ _e_int_theme_edje_file_set(o, file, "e/comp/frame/popup");
evas_object_move(o, (w - (400 * e_scale)) / 2, h - (40 * e_scale));
evas_object_resize(o, 400 * e_scale, (40 * e_scale));
evas_object_show(o);
@@ -177,7 +177,7 @@ _e_int_theme_preview_set(Evas_Object *preview, const char *file)
o = edje_object_add(e);
- _e_int_theme_edje_file_set(o, file, "e/comp/border/default");
+ _e_int_theme_edje_file_set(o, file, "e/comp/frame/default");
evas_object_move(o, w / 2, h / 9);
evas_object_resize(o, w / 3, h / 3);
evas_object_show(o);
@@ -211,7 +211,7 @@ _e_int_theme_preview_set(Evas_Object *preview, const char *file)
o = edje_object_add(e);
- _e_int_theme_edje_file_set(o, file, "e/comp/border/default");
+ _e_int_theme_edje_file_set(o, file, "e/comp/frame/default");
evas_object_move(o, w / 10, h / 5);
evas_object_resize(o, w / 2, h / 3);
evas_object_show(o);
@@ -294,7 +294,7 @@ _e_int_theme_preview_set(Evas_Object *preview, const char *file)
}
E_Config_Dialog *
-e_int_config_theme(E_Container *con, const char *params __UNUSED__)
+e_int_config_theme(E_Comp *comp, const char *params __UNUSED__)
{
E_Config_Dialog *cfd;
E_Config_Dialog_View *v;
@@ -307,7 +307,7 @@ e_int_config_theme(E_Container *con, 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(con,
+ cfd = e_config_dialog_new(comp,
_("Theme Selector"),
"E", "appearance/theme",
"preferences-desktop-theme", 0, v, NULL);
@@ -627,9 +627,7 @@ _free_data(E_Config_Dialog *cfd __UNUSED__, E_Config_Dialog_Data *cfdata)
Eio_File *ls;
Eet_File *ef;
- if (cfdata->win_import)
- e_int_config_theme_del(cfdata->win_import);
- cfdata->win_import = NULL;
+ E_FREE_FUNC(cfdata->win_import, e_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)
@@ -651,7 +649,7 @@ _basic_create_widgets(E_Config_Dialog *cfd, Evas *evas, E_Config_Dialog_Data *cf
char path[PATH_MAX];
e_dialog_resizable_set(cfd->dia, 1);
- z = e_zone_current_get(cfd->con);
+ z = e_zone_current_get(cfd->comp);
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 5a89935742..cbe8a833ff 100644
--- a/src/modules/conf_theme/e_int_config_theme_import.c
+++ b/src/modules/conf_theme/e_int_config_theme_import.c
@@ -49,7 +49,7 @@ e_int_config_theme_import(E_Config_Dialog *parent)
import = E_NEW(Import, 1);
if (!import) return NULL;
- win = e_win_new(parent->con);
+ win = e_win_new(parent->comp);
if (!win)
{
E_FREE(import);
@@ -140,15 +140,15 @@ e_int_config_theme_import(E_Config_Dialog *parent)
e_win_size_min_set(win, w, h);
e_win_size_max_set(win, 99999, 99999);
e_win_show(win);
- e_win_border_icon_set(win, "preferences-desktop-theme");
+ e_win_client_icon_set(win, "preferences-desktop-theme");
win->data = import;
return win;
}
-void
-e_int_config_theme_del(E_Win *win)
+static void
+_theme_import_cb_delete(E_Win *win)
{
Import *import;
@@ -164,12 +164,6 @@ e_int_config_theme_del(E_Win *win)
}
static void
-_theme_import_cb_delete(E_Win *win)
-{
- e_int_config_theme_del(win);
-}
-
-static void
_theme_import_cb_resize(E_Win *win)
{
Import *import;
@@ -298,16 +292,13 @@ _theme_import_cb_ok(void *data, void *data2 __UNUSED__)
}
}
- e_int_config_theme_del(import->win);
+ e_object_del(E_OBJECT(import->win));
}
static void
_theme_import_cb_close(void *data, void *data2 __UNUSED__)
{
- E_Win *win;
-
- win = data;
- e_int_config_theme_del(win);
+ e_object_del(data);
}
static void
diff --git a/src/modules/conf_theme/e_int_config_transitions.c b/src/modules/conf_theme/e_int_config_transitions.c
index 3c8255ed5a..7b3cd06c69 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_Container *con, const char *params __UNUSED__)
+e_int_config_transitions(E_Comp *comp, const char *params __UNUSED__)
{
E_Config_Dialog *cfd;
E_Config_Dialog_View *v;
@@ -43,7 +43,7 @@ e_int_config_transitions(E_Container *con, const char *params __UNUSED__)
v->basic.create_widgets = _basic_create_widgets;
v->basic.check_changed = _basic_check_changed;
- cfd = e_config_dialog_new(con, _("Transition Settings"),
+ cfd = e_config_dialog_new(comp, _("Transition Settings"),
"E", "appearance/transitions",
"preferences-transitions", 0, v, NULL);
return cfd;
@@ -166,7 +166,7 @@ _basic_create_widgets(E_Config_Dialog *cfd, Evas *evas, E_Config_Dialog_Data *cf
Eina_List *l;
char *t;
- zone = e_zone_current_get(cfd->con);
+ zone = e_zone_current_get(cfd->comp);
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 c35e6d2bea..a4e25d9212 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_Container *con, int con_num, int zone_num, int desk_x, int 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);
static void _cb_button_up(void *data1, void *data2);
static void _cb_files_changed(void *data, Evas_Object *obj, void *event_info);
@@ -27,7 +27,7 @@ static void _cb_import(void *data1, void *data2);
struct _E_Config_Wallpaper
{
int specific_config;
- int con_num, zone_num;
+ int man_num, zone_num;
int desk_x, desk_y;
};
@@ -52,25 +52,25 @@ struct _E_Config_Dialog_Data
};
E_Config_Dialog *
-e_int_config_wallpaper(E_Container *con, const char *params __UNUSED__)
+e_int_config_wallpaper(E_Comp *comp, const char *params __UNUSED__)
{
- return _e_int_config_wallpaper_desk(con, -1, -1, -1, -1);
+ return _e_int_config_wallpaper_desk(comp, -1, -1, -1, -1);
}
E_Config_Dialog *
-e_int_config_wallpaper_desk(E_Container *con, const char *params)
+e_int_config_wallpaper_desk(E_Comp *comp, const char *params)
{
- int con_num, zone_num, desk_x, desk_y;
+ int man_num, zone_num, desk_x, desk_y;
if (!params) return NULL;
- con_num = zone_num = desk_x = desk_y = -1;
- if (sscanf(params, "%i %i %i %i", &con_num, &zone_num, &desk_x, &desk_y) != 4)
+ 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(con, con_num, zone_num, desk_x, desk_y);
+ return _e_int_config_wallpaper_desk(comp, man_num, zone_num, desk_x, desk_y);
}
static E_Config_Dialog *
-_e_int_config_wallpaper_desk(E_Container *con, int con_num, int zone_num, int desk_x, int desk_y)
+_e_int_config_wallpaper_desk(E_Comp *comp, int man_num, int zone_num, int desk_x, int desk_y)
{
E_Config_Dialog *cfd;
E_Config_Dialog_View *v;
@@ -85,7 +85,7 @@ _e_int_config_wallpaper_desk(E_Container *con, int con_num, int zone_num, int de
v->basic.apply_cfdata = _basic_apply;
v->basic.create_widgets = _basic_create;
- if (!(con_num == -1 && zone_num == -1 && desk_x == -1 && desk_y == -1))
+ if (!(man_num == -1 && zone_num == -1 && desk_x == -1 && desk_y == -1))
cw->specific_config = 1;
else
{
@@ -95,12 +95,12 @@ _e_int_config_wallpaper_desk(E_Container *con, int con_num, int zone_num, int de
v->override_auto_apply = 1;
- cw->con_num = con_num;
+ cw->man_num = man_num;
cw->zone_num = zone_num;
cw->desk_x = desk_x;
cw->desk_y = desk_y;
- cfd = e_config_dialog_new(con, _("Wallpaper Settings"), "E",
+ cfd = e_config_dialog_new(comp, _("Wallpaper Settings"), "E",
"appearance/wallpaper",
"preferences-desktop-wallpaper", 0, v, cw);
return cfd;
@@ -317,7 +317,7 @@ _cb_import(void *data1, void *data2 __UNUSED__)
e_win_raise(cfdata->win_import->dia->win);
return;
}
- cfdata->win_import = e_import_dialog_show(cfdata->cfd->dia->win->container, NULL, NULL, (Ecore_End_Cb)_cb_import_ok, NULL);
+ cfdata->win_import = e_import_dialog_show(cfdata->cfd->dia->win->comp, 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);
}
@@ -333,24 +333,24 @@ _fill_data(E_Config_Dialog_Data *cfdata)
if (cw->specific_config)
{
/* specific config passed in. set for that only */
- cfdata->bg = e_bg_file_get(cw->con_num, cw->zone_num, cw->desk_x, cw->desk_y);
+ cfdata->bg = e_bg_file_get(cw->man_num, cw->zone_num, cw->desk_x, cw->desk_y);
}
else
{
/* get current desk. advanced mode allows selecting all, screen or desk */
- E_Container *c;
- E_Zone *z;
- E_Desk *d;
+ E_Comp *comp;
+ E_Zone *zone;
+ E_Desk *desk;
- c = e_container_current_get(e_manager_current_get());
- z = e_zone_current_get(c);
- d = e_desk_current_get(z);
+ comp = e_manager_current_get()->comp;
+ zone = e_zone_current_get(comp);
+ desk = e_desk_current_get(zone);
- cfbg = e_bg_config_get(c->num, z->num, d->x, d->y);
+ cfbg = e_bg_config_get(comp->num, zone->num, desk->x, desk->y);
/* if we have a config for this bg, use it. */
if (cfbg)
{
- if (cfbg->container >= 0 && cfbg->zone >= 0)
+ if (cfbg->manager >= 0 && cfbg->zone >= 0)
{
if (cfbg->desk_x >= 0 && cfbg->desk_y >= 0)
cfdata->all_this_desk_screen = E_CONFIG_WALLPAPER_DESK;
@@ -412,7 +412,7 @@ _basic_create(E_Config_Dialog *cfd, Evas *evas, E_Config_Dialog_Data *cfdata)
e_dialog_resizable_set(cfd->dia, 1);
- zone = e_zone_current_get(cfd->con);
+ zone = e_zone_current_get(cfd->comp);
o = e_widget_list_add(evas, 0, 1);
rg = e_widget_radio_group_new(&(cfdata->fmdir));
@@ -529,8 +529,8 @@ _basic_apply(E_Config_Dialog *cfd, E_Config_Dialog_Data *cfdata)
if (cw->specific_config)
{
/* update a specific config */
- e_bg_del(cw->con_num, cw->zone_num, cw->desk_x, cw->desk_y);
- e_bg_add(cw->con_num, cw->zone_num, cw->desk_x, cw->desk_y, cfdata->bg);
+ e_bg_del(cw->man_num, cw->zone_num, cw->desk_x, cw->desk_y);
+ e_bg_add(cw->man_num, cw->zone_num, cw->desk_x, cw->desk_y, cfdata->bg);
}
else
{
@@ -540,7 +540,7 @@ _basic_apply(E_Config_Dialog *cfd, E_Config_Dialog_Data *cfdata)
E_Config_Desktop_Background *cfbg;
cfbg = e_config->desktop_backgrounds->data;
- e_bg_del(cfbg->container, cfbg->zone, cfbg->desk_x, cfbg->desk_y);
+ e_bg_del(cfbg->manager, cfbg->zone, cfbg->desk_x, cfbg->desk_y);
}
if ((cfdata->use_theme_bg) || (!cfdata->bg))
e_bg_default_set(NULL);
@@ -567,7 +567,7 @@ _adv_create(E_Config_Dialog *cfd, Evas *evas, E_Config_Dialog_Data *cfdata)
e_dialog_resizable_set(cfd->dia, 1);
- zone = e_zone_current_get(cfd->con);
+ zone = e_zone_current_get(cfd->comp);
o = e_widget_list_add(evas, 0, 1);
rg = e_widget_radio_group_new(&(cfdata->fmdir));
@@ -638,8 +638,8 @@ _adv_create(E_Config_Dialog *cfd, Evas *evas, E_Config_Dialog_Data *cfdata)
ow = e_widget_radio_add(evas, _("This Desktop"), E_CONFIG_WALLPAPER_DESK, rg);
e_widget_frametable_object_append(of, ow, 0, 1, 1, 1, 1, 0, 1, 0);
ow = e_widget_radio_add(evas, _("This Screen"), E_CONFIG_WALLPAPER_SCREEN, rg);
- if (!(e_util_container_zone_number_get(0, 1) ||
- (e_util_container_zone_number_get(1, 0))))
+ if (!(e_util_comp_zone_number_get(0, 1) ||
+ (e_util_comp_zone_number_get(1, 0))))
e_widget_disabled_set(ow, 1);
e_widget_frametable_object_append(of, ow, 0, 2, 1, 1, 1, 0, 1, 0);
e_widget_table_object_append(ot, of, 0, 3, 2, 1, 1, 0, 1, 0);
@@ -656,7 +656,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->con))) return 0;
+ if (!(z = e_zone_current_get(cfdata->cfd->comp))) return 0;
if (!(d = e_desk_current_get(z))) return 0;
if (cfdata->use_theme_bg)
{
@@ -665,7 +665,7 @@ _adv_apply(E_Config_Dialog *cfd __UNUSED__, E_Config_Dialog_Data *cfdata)
E_Config_Desktop_Background *cfbg;
cfbg = e_config->desktop_backgrounds->data;
- e_bg_del(cfbg->container, cfbg->zone, cfbg->desk_x, cfbg->desk_y);
+ e_bg_del(cfbg->manager, cfbg->zone, cfbg->desk_x, cfbg->desk_y);
}
e_bg_default_set(NULL);
}
@@ -678,17 +678,17 @@ _adv_apply(E_Config_Dialog *cfd __UNUSED__, E_Config_Dialog_Data *cfdata)
E_Config_Desktop_Background *cfbg;
cfbg = e_config->desktop_backgrounds->data;
- e_bg_del(cfbg->container, cfbg->zone, cfbg->desk_x, cfbg->desk_y);
+ e_bg_del(cfbg->manager, cfbg->zone, cfbg->desk_x, cfbg->desk_y);
}
e_bg_default_set(cfdata->bg);
}
else if (cfdata->all_this_desk_screen == E_CONFIG_WALLPAPER_DESK)
{
- e_bg_del(z->container->num, z->num, d->x, d->y);
- e_bg_del(z->container->num, -1, d->x, d->y);
+ e_bg_del(z->comp->num, z->num, d->x, d->y);
+ e_bg_del(z->comp->num, -1, d->x, d->y);
e_bg_del(-1, z->num, d->x, d->y);
e_bg_del(-1, -1, d->x, d->y);
- e_bg_add(z->container->num, z->num, d->x, d->y, cfdata->bg);
+ e_bg_add(z->comp->num, z->num, d->x, d->y, cfdata->bg);
}
else if (cfdata->all_this_desk_screen == E_CONFIG_WALLPAPER_SCREEN)
{
@@ -697,7 +697,7 @@ _adv_apply(E_Config_Dialog *cfd __UNUSED__, E_Config_Dialog_Data *cfdata)
E_Config_Desktop_Background *cfbg;
cfbg = l->data;
- if ((cfbg->container == (int)z->container->num) &&
+ if ((cfbg->manager == (int)z->comp->num) &&
(cfbg->zone == (int)z->num))
fl = eina_list_append(fl, cfbg);
}
@@ -706,11 +706,11 @@ _adv_apply(E_Config_Dialog *cfd __UNUSED__, E_Config_Dialog_Data *cfdata)
E_Config_Desktop_Background *cfbg;
cfbg = fl->data;
- e_bg_del(cfbg->container, cfbg->zone, cfbg->desk_x,
+ e_bg_del(cfbg->manager, cfbg->zone, cfbg->desk_x,
cfbg->desk_y);
fl = eina_list_remove_list(fl, fl);
}
- e_bg_add(z->container->num, z->num, -1, -1, cfdata->bg);
+ e_bg_add(z->comp->num, z->num, -1, -1, cfdata->bg);
}
}
e_bg_update();
diff --git a/src/modules/conf_theme/e_int_config_xsettings.c b/src/modules/conf_theme/e_int_config_xsettings.c
index 291f7cee55..ee0c77ed5b 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_Container *con, const char *params __UNUSED__)
+e_int_config_xsettings(E_Comp *comp, const char *params __UNUSED__)
{
E_Config_Dialog *cfd;
E_Config_Dialog_View *v;
@@ -58,7 +58,7 @@ e_int_config_xsettings(E_Container *con, const char *params __UNUSED__)
v->basic.apply_cfdata = _basic_apply;
v->basic.check_changed = _basic_check_changed;
- cfd = e_config_dialog_new(con, _("Application Theme Settings"),
+ cfd = e_config_dialog_new(comp, _("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 d8083c8796..5b24e09352 100644
--- a/src/modules/conf_theme/e_mod_main.c
+++ b/src/modules/conf_theme/e_mod_main.c
@@ -16,7 +16,7 @@ EAPI E_Module_Api e_modapi =
static void
_e_mod_run_wallpaper_cb(void *data __UNUSED__, E_Menu *m, E_Menu_Item *mi __UNUSED__)
{
- e_configure_registry_call("appearance/wallpaper", m->zone->container, NULL);
+ e_configure_registry_call("appearance/wallpaper", m->zone->comp, NULL);
}
static void
@@ -33,7 +33,7 @@ _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_configure_registry_call("appearance/theme", m->zone->container, NULL);
+ e_configure_registry_call("appearance/theme", m->zone->comp, NULL);
}
static void
diff --git a/src/modules/conf_theme/e_mod_main.h b/src/modules/conf_theme/e_mod_main.h
index 6b3a1d7171..8f9cdcfe5e 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_Container *con, const char *params __UNUSED__);
+E_Config_Dialog *e_int_config_xsettings(E_Comp *comp, const char *params __UNUSED__);
/**
* @addtogroup Optional_Conf
@@ -16,31 +16,28 @@ E_Config_Dialog *e_int_config_xsettings(E_Container *con, const char *params __U
* @}
*/
-E_Config_Dialog *e_int_config_borders(E_Container *con, const char *params __UNUSED__);
-E_Config_Dialog *e_int_config_borders_border(E_Container *con, const char *params);
+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_color_classes(E_Container *con, const char *params __UNUSED__);
+E_Config_Dialog *e_int_config_color_classes(E_Comp *comp, const char *params __UNUSED__);
-E_Config_Dialog *e_int_config_fonts(E_Container *con, const char *params __UNUSED__);
+E_Config_Dialog *e_int_config_fonts(E_Comp *comp, const char *params __UNUSED__);
-E_Config_Dialog *e_int_config_scale(E_Container *con, const char *params __UNUSED__);
+E_Config_Dialog *e_int_config_scale(E_Comp *comp, const char *params __UNUSED__);
-E_Config_Dialog *e_int_config_theme(E_Container *con, const char *params __UNUSED__);
+E_Config_Dialog *e_int_config_theme(E_Comp *comp, 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);
-void e_int_config_theme_web_done(E_Config_Dialog *dia);
E_Win *e_int_config_theme_import (E_Config_Dialog *parent);
-void e_int_config_theme_del (E_Win *win);
-E_Config_Dialog *e_int_config_transitions(E_Container *con, const char *params __UNUSED__);
+E_Config_Dialog *e_int_config_transitions(E_Comp *comp, const char *params __UNUSED__);
-E_Config_Dialog *e_int_config_wallpaper(E_Container *con, const char *params __UNUSED__);
-E_Config_Dialog *e_int_config_wallpaper_desk(E_Container *con, const char *params);
+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);
void e_int_config_wallpaper_update(E_Config_Dialog *dia, char *file);
void e_int_config_wallpaper_import_done(E_Config_Dialog *dia);
-void e_int_config_wallpaper_web_done(E_Config_Dialog *dia);
#endif
diff --git a/src/modules/conf_wallpaper2/e_int_config_wallpaper.c b/src/modules/conf_wallpaper2/e_int_config_wallpaper.c
index a29f18d7a3..38b82cef94 100644
--- a/src/modules/conf_wallpaper2/e_int_config_wallpaper.c
+++ b/src/modules/conf_wallpaper2/e_int_config_wallpaper.c
@@ -24,7 +24,7 @@ struct _Info
Eina_Iterator *dir;
Ecore_Idler *idler;
int scans;
- int con_num, zone_num, desk_x, desk_y;
+ int man_num, zone_num, desk_x, desk_y;
int use_theme_bg;
int mode;
};
@@ -989,7 +989,7 @@ _apply(void *data, void *data2 __UNUSED__)
E_Config_Desktop_Background *cfbg;
cfbg = e_config->desktop_backgrounds->data;
- e_bg_del(cfbg->container, cfbg->zone, cfbg->desk_x, cfbg->desk_y);
+ e_bg_del(cfbg->manager, cfbg->zone, cfbg->desk_x, cfbg->desk_y);
}
if ((info->use_theme_bg) || (!info->bg_file))
e_bg_default_set(NULL);
@@ -999,8 +999,8 @@ _apply(void *data, void *data2 __UNUSED__)
else if (info->mode == 1)
{
/* specific desk */
- e_bg_del(info->con_num, info->zone_num, info->desk_x, info->desk_y);
- e_bg_add(info->con_num, info->zone_num, info->desk_x, info->desk_y,
+ e_bg_del(info->man_num, info->zone_num, info->desk_x, info->desk_y);
+ e_bg_add(info->man_num, info->zone_num, info->desk_x, info->desk_y,
info->bg_file);
}
else
@@ -1015,8 +1015,8 @@ _apply(void *data, void *data2 __UNUSED__)
dlist = eina_list_append(dlist, cfbg);
}
EINA_LIST_FREE(dlist, cfbg)
- e_bg_del(cfbg->container, cfbg->zone, cfbg->desk_x, cfbg->desk_y);
- e_bg_add(info->con_num, info->zone_num, -1, -1, info->bg_file);
+ e_bg_del(cfbg->manager, cfbg->zone, cfbg->desk_x, cfbg->desk_y);
+ e_bg_add(info->man_num, info->zone_num, -1, -1, info->bg_file);
}
e_bg_update();
e_config_save_queue();
@@ -1114,7 +1114,7 @@ _scan(Info *info)
}
Info *
-wp_browser_new(E_Container *con)
+wp_browser_new(E_Comp *comp)
{
Info *info;
E_Win *win;
@@ -1129,17 +1129,17 @@ wp_browser_new(E_Container *con)
info = calloc(1, sizeof(Info));
if (!info) return NULL;
- zone = e_util_zone_current_get(con->manager);
+ zone = e_zone_current_get(comp);
desk = e_desk_current_get(zone);
- info->con_num = con->num;
+ info->man_num = comp->num;
info->zone_num = zone->num;
info->desk_x = desk->x;
info->desk_y = desk->y;
info->mode = 0;
- cfbg = e_bg_config_get(con->num, zone->num, desk->x, desk->y);
+ cfbg = e_bg_config_get(comp->num, zone->num, desk->x, desk->y);
if (cfbg)
{
- if ((cfbg->container >= 0) && (cfbg->zone >= 0))
+ if ((cfbg->manager >= 0) && (cfbg->zone >= 0))
{
if ((cfbg->desk_x >= 0) && (cfbg->desk_y >= 0))
info->mode = 1;
@@ -1156,7 +1156,7 @@ wp_browser_new(E_Container *con)
info->iw = (120 * e_scale);
info->ih = (zone->h * info->iw) / (zone->w);
- win = e_win_new(con);
+ win = e_win_new(comp);
if (!win)
{
eina_stringshare_del(info->bg_file);
@@ -1176,7 +1176,7 @@ wp_browser_new(E_Container *con)
e_win_resize_callback_set(win, _resize);
e_win_delete_callback_set(win, _delete);
- // bg + container
+ // bg + manager
info->bg = edje_object_add(info->win->evas);
e_theme_edje_object_set(info->bg, "base/theme/widgets",
"e/conf/wallpaper/main/window");
@@ -1252,7 +1252,7 @@ wp_browser_new(E_Container *con)
o2 = e_widget_radio_add(info->win->evas, _("All Desktops"), 0, rg);
evas_object_smart_callback_add(o2, "changed", _wp_changed, info);
e_widget_list_object_append(o, o2, 1, 0, 0.5);
- e_widget_disabled_set(o2, (e_util_container_desk_count_get(con) < 2));
+ e_widget_disabled_set(o2, (e_util_comp_desk_count_get(comp) < 2));
evas_object_show(o2);
o2 = e_widget_radio_add(info->win->evas, _("This Desktop"), 1, rg);
@@ -1263,8 +1263,8 @@ wp_browser_new(E_Container *con)
o2 = e_widget_radio_add(info->win->evas, _("This Screen"), 2, rg);
evas_object_smart_callback_add(o2, "changed", _wp_changed, info);
e_widget_list_object_append(o, o2, 1, 0, 0.5);
- if (!(e_util_container_zone_number_get(0, 1) ||
- (e_util_container_zone_number_get(1, 0))))
+ if (!(e_util_comp_zone_number_get(0, 1) ||
+ (e_util_comp_zone_number_get(1, 0))))
e_widget_disabled_set(o2, EINA_TRUE);
evas_object_show(o2);
@@ -1299,7 +1299,7 @@ wp_browser_new(E_Container *con)
e_win_resize(win, mw, mh);
e_win_centered_set(win, 1);
e_win_show(win);
- e_win_border_icon_set(win, "preferences-desktop-wallpaper");
+ e_win_client_icon_set(win, "preferences-desktop-wallpaper");
evas_object_resize(info->bg, info->win->w, info->win->h);
evas_object_show(info->bg);
@@ -1329,14 +1329,14 @@ wp_broser_free(Info *info)
}
E_Config_Dialog *
-wp_conf_show(E_Container *con, const char *params __UNUSED__)
+wp_conf_show(E_Comp *comp, const char *params __UNUSED__)
{
if (global_info)
{
e_win_show(global_info->win);
e_win_raise(global_info->win);
}
- global_info = wp_browser_new(con);
+ global_info = wp_browser_new(comp);
return NULL;
}
diff --git a/src/modules/conf_wallpaper2/e_mod_main.c b/src/modules/conf_wallpaper2/e_mod_main.c
index 695bd5f0cb..7ca3adc08a 100644
--- a/src/modules/conf_wallpaper2/e_mod_main.c
+++ b/src/modules/conf_wallpaper2/e_mod_main.c
@@ -78,7 +78,7 @@ e_modapi_save(E_Module *m __UNUSED__)
static void
_e_mod_run_cb(void *data __UNUSED__, E_Menu *m, E_Menu_Item *mi __UNUSED__)
{
- e_configure_registry_call("appearance/wallpaper2", m->zone->container, NULL);
+ e_configure_registry_call("appearance/wallpaper2", m->zone->comp, NULL);
}
/* menu item add hook */
diff --git a/src/modules/conf_wallpaper2/e_mod_main.h b/src/modules/conf_wallpaper2/e_mod_main.h
index 87abfb1fef..dac60a7a98 100644
--- a/src/modules/conf_wallpaper2/e_mod_main.h
+++ b/src/modules/conf_wallpaper2/e_mod_main.h
@@ -1,7 +1,7 @@
#ifndef E_MOD_MAIN_H
#define E_MOD_MAIN_H
-E_Config_Dialog *wp_conf_show(E_Container *con, const char *params);
+E_Config_Dialog *wp_conf_show(E_Comp *comp, const char *params);
void wp_conf_hide(void);
/**
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 c81cbfa93d..2803c6c574 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_Container *con, const char *params __UNUSED__)
+e_int_config_clientlist(E_Comp *comp, const char *params __UNUSED__)
{
E_Config_Dialog *cfd;
E_Config_Dialog_View *v;
@@ -35,7 +35,7 @@ e_int_config_clientlist(E_Container *con, const char *params __UNUSED__)
v->basic.create_widgets = _basic_create;
v->basic.check_changed = _basic_check_changed;
- cfd = e_config_dialog_new(con, _("Window List Menu Settings"), "E",
+ cfd = e_config_dialog_new(comp, _("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 97b6bda312..61cd94c926 100644
--- a/src/modules/conf_window_manipulation/e_int_config_focus.c
+++ b/src/modules/conf_window_manipulation/e_int_config_focus.c
@@ -35,7 +35,7 @@ struct _E_Config_Dialog_Data
/* a nice easy setup function that does the dirty work */
E_Config_Dialog *
-e_int_config_focus(E_Container *con, const char *params __UNUSED__)
+e_int_config_focus(E_Comp *comp, const char *params __UNUSED__)
{
E_Config_Dialog *cfd;
E_Config_Dialog_View *v;
@@ -54,7 +54,7 @@ e_int_config_focus(E_Container *con, const char *params __UNUSED__)
v->advanced.check_changed = _advanced_check_changed;
/* create config diaolg for NULL object/data */
- cfd = e_config_dialog_new(con, _("Focus Settings"), "E",
+ cfd = e_config_dialog_new(comp, _("Focus Settings"), "E",
"windows/window_focus", "preferences-focus",
0, v, NULL);
return cfd;
@@ -111,7 +111,7 @@ static int
_basic_apply(E_Config_Dialog *cfd __UNUSED__, E_Config_Dialog_Data *cfdata)
{
/* Actually take our cfdata settings and apply them in real life */
- e_border_button_bindings_ungrab_all();
+ e_comp_button_bindings_ungrab_all();
if (cfdata->mode == E_FOCUS_CLICK)
{
e_config->focus_policy = E_FOCUS_CLICK;
@@ -152,7 +152,7 @@ _basic_apply(E_Config_Dialog *cfd __UNUSED__, E_Config_Dialog_Data *cfdata)
e_config->disable_all_pointer_warps = 0;
}
e_config->use_auto_raise = cfdata->use_auto_raise;
- e_border_button_bindings_grab_all();
+ e_comp_button_bindings_grab_all();
e_config_save_queue();
return 1; /* Apply was OK */
}
@@ -168,7 +168,7 @@ static int
_advanced_apply(E_Config_Dialog *cfd __UNUSED__, E_Config_Dialog_Data *cfdata)
{
/* Actually take our cfdata settings and apply them in real life */
- e_border_button_bindings_ungrab_all();
+ e_comp_button_bindings_ungrab_all();
e_config->focus_policy = cfdata->focus_policy;
e_config->focus_setting = cfdata->focus_setting;
e_config->pass_click_on = cfdata->pass_click_on;
@@ -186,7 +186,7 @@ _advanced_apply(E_Config_Dialog *cfd __UNUSED__, E_Config_Dialog_Data *cfdata)
e_config->use_auto_raise = cfdata->use_auto_raise;
e_config->auto_raise_delay = cfdata->auto_raise_delay;
e_config->border_raise_on_mouse_action = cfdata->border_raise_on_mouse_action;
- e_border_button_bindings_grab_all();
+ e_comp_button_bindings_grab_all();
e_config_save_queue();
return 1; /* Apply was OK */
}
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 6da79be71a..b52fccdd7b 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_Container *con, const char *params __UNUSED__)
+e_int_config_window_display(E_Comp *comp, const char *params __UNUSED__)
{
E_Config_Dialog *cfd;
E_Config_Dialog_View *v;
@@ -41,7 +41,7 @@ e_int_config_window_display(E_Container *con, const char *params __UNUSED__)
v->basic.check_changed = _basic_check_changed;
/* create config diaolg for NULL object/data */
- cfd = e_config_dialog_new(con, _("Window Display"),
+ cfd = e_config_dialog_new(comp, _("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 b4ebad98ec..2251e09ce7 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_Container *con, const char *params __UNUSED__)
+e_int_config_window_geometry(E_Comp *comp, const char *params __UNUSED__)
{
E_Config_Dialog *cfd;
E_Config_Dialog_View *v;
@@ -61,7 +61,7 @@ e_int_config_window_geometry(E_Container *con, const char *params __UNUSED__)
v->basic.check_changed = _basic_check_changed;
/* create config diaolg for NULL object/data */
- cfd = e_config_dialog_new(con, _("Window Geometry"),
+ cfd = e_config_dialog_new(comp, _("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 b3eed21907..ccbbac5480 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_Container *con, const char *params __UNUSED__)
+e_int_config_window_process(E_Comp *comp, const char *params __UNUSED__)
{
E_Config_Dialog *cfd;
E_Config_Dialog_View *v;
@@ -36,7 +36,7 @@ e_int_config_window_process(E_Container *con, const char *params __UNUSED__)
v->basic.check_changed = _basic_check_changed;
/* create config diaolg for NULL object/data */
- cfd = e_config_dialog_new(con, _("Window Process Management"),
+ cfd = e_config_dialog_new(comp, _("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 3a80c31511..3275eb8cef 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_Container *con, const char *params __UNUSED__);
-E_Config_Dialog *e_int_config_window_process(E_Container *con, const char *params __UNUSED__);
+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_display(E_Container *con, 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_focus(E_Container *con, const char *params __UNUSED__);
+E_Config_Dialog *e_int_config_focus(E_Comp *comp, const char *params __UNUSED__);
-E_Config_Dialog *e_int_config_clientlist(E_Container *con, const char *params __UNUSED__);
+E_Config_Dialog *e_int_config_clientlist(E_Comp *comp, 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 eca507b4d1..64a6b27d75 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_Container *con, const char *params __UNUSED__)
+e_int_config_remembers(E_Comp *comp, const char *params __UNUSED__)
{
E_Config_Dialog *cfd;
E_Config_Dialog_View *v;
@@ -35,7 +35,7 @@ e_int_config_remembers(E_Container *con, const char *params __UNUSED__)
v->basic.create_widgets = _basic_create;
v->basic.check_changed = _basic_check_changed;
- cfd = e_config_dialog_new(con, _("Window Remembers"), "E",
+ cfd = e_config_dialog_new(comp, _("Window Remembers"), "E",
"windows/window_remembers",
"preferences-desktop-window-remember", 0, v, NULL);
return cfd;
@@ -306,7 +306,7 @@ _cb_edit(void *data, void *data2 __UNUSED__)
E_Config_Dialog *cfd;
rem = e_widget_ilist_item_data_get(ili);
- cfd = e_int_border_remember_edit(rem);
+ cfd = e_int_client_remember_edit(rem);
e_object_data_set(E_OBJECT(cfd), cfdata);
E_OBJECT_DEL_SET(cfd, _cb_edit_del);
cfdata->cfds = eina_list_append(cfdata->cfds, cfd);
diff --git a/src/modules/conf_window_remembers/e_mod_main.h b/src/modules/conf_window_remembers/e_mod_main.h
index 5d04cb1d3b..2b9e9e6009 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_Container *con, const char *params __UNUSED__);
+E_Config_Dialog *e_int_config_remembers(E_Comp *comp, const char *params __UNUSED__);
/**
* @addtogroup Optional_Conf
* @{
diff --git a/src/modules/connman/e_mod_config.c b/src/modules/connman/e_mod_config.c
index 35eadf5def..cc5a3c4763 100644
--- a/src/modules/connman/e_mod_config.c
+++ b/src/modules/connman/e_mod_config.c
@@ -48,7 +48,7 @@ _create_data(E_Config_Dialog *dialog)
}
E_Config_Dialog *
-e_connman_config_dialog_new(E_Container *con,
+e_connman_config_dialog_new(E_Comp *comp,
E_Connman_Module_Context *ctxt)
{
E_Config_Dialog *dialog;
@@ -66,7 +66,7 @@ e_connman_config_dialog_new(E_Container *con,
view->basic.apply_cfdata = _basic_apply;
dialog = e_config_dialog_new
- (con, _("Connection Manager"),
+ (comp, _("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 54aaaa3531..31a31a66c3 100644
--- a/src/modules/connman/e_mod_main.c
+++ b/src/modules/connman/e_mod_main.c
@@ -251,6 +251,14 @@ _econnman_popup_del_cb(void *obj)
}
static void
+_econnman_popup_del(void *data, Evas_Object *obj EINA_UNUSED)
+{
+ E_Connman_Instance *inst = data;
+
+ E_FREE_FUNC(inst->popup, e_object_del);
+}
+
+static void
_econnman_popup_new(E_Connman_Instance *inst)
{
E_Connman_Module_Context *ctxt = inst->ctxt;
@@ -262,8 +270,8 @@ _econnman_popup_new(E_Connman_Instance *inst)
if (!ctxt->cm)
return;
- inst->popup = e_gadcon_popup_new(inst->gcc);
- evas = inst->popup->win->evas;
+ inst->popup = e_gadcon_popup_new(inst->gcc, 0);
+ evas = e_comp_get(inst->gcc)->evas;
list = e_widget_list_add(evas, 0, 0);
inst->ui.popup.list = e_widget_ilist_add(evas, 24, 24, NULL);
@@ -285,7 +293,7 @@ _econnman_popup_new(E_Connman_Instance *inst)
/* 30,40 % -- min vga, max uvga */
_e_connman_widget_size_set(inst, list, 30, 40, 192, 192, 384, 384);
e_gadcon_popup_content_set(inst->popup, list);
- e_popup_autoclose(inst->popup->win, NULL, NULL, NULL);
+ e_comp_object_util_autoclose(inst->popup->comp_object, _econnman_popup_del, NULL, inst);
e_gadcon_popup_show(inst->popup);
e_object_data_set(E_OBJECT(inst->popup), inst);
E_OBJECT_DEL_SET(inst->popup, _econnman_popup_del_cb);
@@ -295,6 +303,7 @@ void
econnman_popup_del(E_Connman_Instance *inst)
{
E_FREE_FUNC(inst->popup, e_object_del);
+ inst->ui.popup.powered = inst->ui.popup.list = NULL;
}
static void
@@ -438,8 +447,6 @@ _econnman_cb_mouse_down(void *data, Evas *evas, Evas_Object *obj, void *event)
{
if (!inst->popup)
_econnman_popup_new(inst);
- else
- econnman_popup_del(inst);
}
else if (ev->button == 3)
_econnman_menu_new(inst, ev);
@@ -565,7 +572,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_Container *con, const char *params)
+_econnman_config(E_Comp *comp, const char *params)
{
E_Connman_Module_Context *ctxt;
@@ -577,7 +584,7 @@ _econnman_config(E_Container *con, const char *params)
return NULL;
if (!ctxt->conf_dialog)
- ctxt->conf_dialog = e_connman_config_dialog_new(con, ctxt);
+ ctxt->conf_dialog = e_connman_config_dialog_new(comp, ctxt);
return ctxt->conf_dialog;
}
diff --git a/src/modules/connman/e_mod_main.h b/src/modules/connman/e_mod_main.h
index 2f1338356e..2dee8ed21f 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_Container *con,
+E_Config_Dialog *e_connman_config_dialog_new(E_Comp *comp,
E_Connman_Module_Context *ctxt);
E_Connman_Agent *econnman_agent_new(Eldbus_Connection *eldbus_conn) EINA_ARG_NONNULL(1);
diff --git a/src/modules/contact/e_edges.c b/src/modules/contact/e_edges.c
index 6d906f27c9..74e22a42c2 100644
--- a/src/modules/contact/e_edges.c
+++ b/src/modules/contact/e_edges.c
@@ -36,21 +36,17 @@ static Eina_List *handlers = NULL;
void
e_edges_init(void)
{
- Eina_List *l, *ll, *lll;
- E_Manager *man;
- E_Container *con;
+ const Eina_List *l, *ll;
+ E_Comp *comp;
E_Zone *zone;
- EINA_LIST_FOREACH(e_manager_list(), l, man)
+ EINA_LIST_FOREACH(e_comp_list(), l, comp)
{
- EINA_LIST_FOREACH(man->containers, ll, con)
+ EINA_LIST_FOREACH(comp->zones, ll, zone)
{
- EINA_LIST_FOREACH(con->zones, lll, zone)
- {
- Edgeset *es = _edgeset_new(zone);
-
- if (es) edges = eina_list_append(edges, es);
- }
+ Edgeset *es = _edgeset_new(zone);
+
+ if (es) edges = eina_list_append(edges, es);
}
}
}
@@ -112,7 +108,7 @@ _handler_call(E_Edges_Event event, int d, double v)
static Evas_Object *
_input_obj(Edgeset *es, int x, int y, int w, int h)
{
- E_Comp *c = es->zone->container->manager->comp;
+ E_Comp *c = e_comp_get(es->zone);
Evas_Object *o = evas_object_rectangle_add(c->evas);
evas_object_color_set(o, 0, 0, 0, 0);
evas_object_move(o, x, y);
diff --git a/src/modules/contact/e_mod_main.c b/src/modules/contact/e_mod_main.c
index 1e309f4ff9..def007e6c9 100644
--- a/src/modules/contact/e_mod_main.c
+++ b/src/modules/contact/e_mod_main.c
@@ -7,28 +7,28 @@ _cb_in_left(void *data __UNUSED__, int d __UNUSED__, double v __UNUSED__)
{
// show PREV window in list from urrent focused window on top of current
// window but in an inital "off to the right" state in comp
- Eina_List *borders = (Eina_List *)e_policy_borders_get();
- E_Border *bd_active = (E_Border *)e_polict_border_active_get();
- E_Border *bd = NULL;
- Eina_List *bd_active_l = NULL;
- if (!bd_active)
+ Eina_List *clients = (Eina_List *)e_policy_clients_get();
+ E_Client *ec_active = (E_Client *)e_policy_client_active_get();
+ E_Client *ec = NULL;
+ Eina_List *ec_active_l = NULL;
+ if (!ec_active)
{
- if (!borders) return;
- bd = eina_list_last(borders)->data;
+ if (!clients) return;
+ ec = eina_list_last(clients)->data;
}
- if (!bd)
+ if (!ec)
{
- if (bd_active)
- bd_active_l = eina_list_data_find_list(borders, bd_active);
- if ((bd_active_l) && (bd_active_l->prev)) bd = bd_active_l->prev->data;
+ if (ec_active)
+ ec_active_l = eina_list_data_find_list(clients, ec_active);
+ if ((ec_active_l) && (ec_active_l->prev)) ec = ec_active_l->prev->data;
}
- if ((!bd) && (bd_active))
+ if ((!ec) && (ec_active))
{
- e_border_iconify(bd_active);
+ e_client_iconify(ec_active);
return;
}
- if (!bd) return;
- e_border_activate(bd, EINA_TRUE);
+ if (!ec) return;
+ e_client_activate(ec, EINA_TRUE);
}
static void
@@ -43,28 +43,28 @@ _cb_in_right(void *data __UNUSED__, int d __UNUSED__, double v __UNUSED__)
{
// show NEXT window in list from urrent focused window on top of current
// window but in an inital "off to the right" state in comp
- Eina_List *borders = (Eina_List *)e_policy_borders_get();
- E_Border *bd_active = (E_Border *)e_polict_border_active_get();
- E_Border *bd = NULL;
- Eina_List *bd_active_l = NULL;
- if (!bd_active)
+ Eina_List *clients = (Eina_List *)e_policy_clients_get();
+ E_Client *ec_active = (E_Client *)e_policy_client_active_get();
+ E_Client *ec = NULL;
+ Eina_List *ec_active_l = NULL;
+ if (!ec_active)
{
- if (!borders) return;
- bd = borders->data;
+ if (!clients) return;
+ ec = clients->data;
}
- if (!bd)
+ if (!ec)
{
- if (bd_active)
- bd_active_l = eina_list_data_find_list(borders, bd_active);
- if ((bd_active_l) && (bd_active_l->next)) bd = bd_active_l->next->data;
+ if (ec_active)
+ ec_active_l = eina_list_data_find_list(clients, ec_active);
+ if ((ec_active_l) && (ec_active_l->next)) ec = ec_active_l->next->data;
}
- if ((!bd) && (bd_active))
+ if ((!ec) && (ec_active))
{
- e_border_iconify(bd_active);
+ e_client_iconify(ec_active);
return;
}
- if (!bd) return;
- e_border_activate(bd, EINA_TRUE);
+ if (!ec) return;
+ e_client_activate(ec, EINA_TRUE);
}
static void
diff --git a/src/modules/contact/e_policy.c b/src/modules/contact/e_policy.c
index f4c40d08ac..fd7241607c 100644
--- a/src/modules/contact/e_policy.c
+++ b/src/modules/contact/e_policy.c
@@ -4,191 +4,186 @@ static Eina_Bool _cb_event_add(void *data __UNUSED__, int type __UNUSED__, void
static Eina_Bool _cb_event_del(void *data __UNUSED__, int type __UNUSED__, void *event);
static Eina_Bool _cb_event_focus_in(void *data __UNUSED__, int type __UNUSED__, void *event);
static Eina_Bool _cb_event_focus_out(void *data __UNUSED__, int type __UNUSED__, void *event);
-static void _cb_hook_post_fetch(void *data __UNUSED__, void *data2);
-static void _cb_hook_post_assign(void *data __UNUSED__, void *data2);
-static void _cb_hook_layout(void *data __UNUSED__, void *data2);
+static void _cb_hook_post_fetch(void *data __UNUSED__, E_Client *ec);
+static void _cb_hook_post_assign(void *data __UNUSED__, E_Client *ec);
+static void _cb_hook_layout(void *data __UNUSED__, E_Comp *comp);
static Eina_List *hooks = NULL;
static Eina_List *handlers = NULL;
static Eina_Bool kbd_on = EINA_FALSE;
static Eina_Bool kbd_override = EINA_FALSE;
-static Eina_List *borders = NULL;
-static E_Border *bd_active = NULL;
+static Eina_List *clients = NULL;
+static E_Client *ec_active = NULL;
#define LADD(l, f) l = eina_list_append(l, f)
void
e_policy_init(void)
{
- LADD(hooks, e_border_hook_add(E_BORDER_HOOK_EVAL_POST_FETCH,
+ LADD(hooks, e_client_hook_add(E_CLIENT_HOOK_EVAL_POST_FETCH,
_cb_hook_post_fetch, NULL));
- LADD(hooks, e_border_hook_add(E_BORDER_HOOK_EVAL_POST_BORDER_ASSIGN,
+ LADD(hooks, e_client_hook_add(E_CLIENT_HOOK_EVAL_POST_FRAME_ASSIGN,
_cb_hook_post_assign, NULL));
- LADD(hooks, e_border_hook_add(E_BORDER_HOOK_CONTAINER_LAYOUT,
- _cb_hook_layout, NULL));
- LADD(handlers, ecore_event_handler_add(E_EVENT_BORDER_ADD,
+ LADD(hooks, e_client_hook_add(E_CLIENT_HOOK_CANVAS_LAYOUT,
+ (E_Client_Hook_Cb)_cb_hook_layout, NULL));
+ LADD(handlers, ecore_event_handler_add(E_EVENT_CLIENT_ADD,
_cb_event_add, NULL));
- LADD(handlers, ecore_event_handler_add(E_EVENT_BORDER_REMOVE,
+ LADD(handlers, ecore_event_handler_add(E_EVENT_CLIENT_REMOVE,
_cb_event_del, NULL));
- LADD(handlers, ecore_event_handler_add(E_EVENT_BORDER_FOCUS_IN,
+ LADD(handlers, ecore_event_handler_add(E_EVENT_CLIENT_FOCUS_IN,
_cb_event_focus_in, NULL));
- LADD(handlers, ecore_event_handler_add(E_EVENT_BORDER_FOCUS_OUT,
+ LADD(handlers, ecore_event_handler_add(E_EVENT_CLIENT_FOCUS_OUT,
_cb_event_focus_out, NULL));
}
void
e_policy_shutdown(void)
{
- E_Border_Hook *bh;
+ E_Client_Hook *bh;
Ecore_Event_Handler *eh;
- EINA_LIST_FREE(hooks, bh) e_border_hook_del(bh);
+ EINA_LIST_FREE(hooks, bh) e_client_hook_del(bh);
EINA_LIST_FREE(handlers, eh) ecore_event_handler_del(eh);
}
void
e_policy_kbd_override_set(Eina_Bool override)
{
- Eina_List *l;
- E_Border *bd, *kbd = NULL;;
+ const Eina_List *l, *ll;
+ E_Client *ec, *kbd = NULL;;
+ E_Comp *comp;
if (kbd_override == override) return;
kbd_override = override;
- EINA_LIST_FOREACH(e_border_client_list(), l, bd)
- {
- if (bd->client.vkbd.vkbd)
- {
- kbd = bd;
- }
- }
+ EINA_LIST_FOREACH(e_comp_list(), l, comp)
+ EINA_LIST_FOREACH(comp->clients, ll, ec)
+ {
+ if (ec->vkbd.vkbd)
+ {
+ kbd = ec;
+ }
+ }
if (kbd)
{
- bd = kbd;
- e_border_uniconify(bd);
- e_border_raise(bd);
- e_border_show(bd);
+ ec = kbd;
+ e_client_uniconify(ec);
+ evas_object_raise(ec->frame);
+ evas_object_show(ec->frame);
}
}
const Eina_List *
-e_policy_borders_get(void)
+e_policy_clients_get(void)
{
- return borders;
+ return clients;
}
-const E_Border *
-e_polict_border_active_get(void)
+const E_Client *
+e_policy_client_active_get(void)
{
- return bd_active;
+ return ec_active;
}
static Eina_Bool
_cb_event_add(void *data __UNUSED__, int type __UNUSED__, void *event)
{
- E_Event_Border_Add *ev = event;
- E_Border *bd = ev->border;
+ E_Event_Client *ev = event;
+ E_Client *ec = ev->ec;
- if (bd_active) borders = eina_list_append_relative(borders, bd, bd_active);
- else borders = eina_list_prepend(borders, bd);
+ if (ec_active) clients = eina_list_append_relative(clients, ec, ec_active);
+ else clients = eina_list_prepend(clients, ec);
return ECORE_CALLBACK_PASS_ON;
}
static Eina_Bool
_cb_event_del(void *data __UNUSED__, int type __UNUSED__, void *event)
{
- E_Event_Border_Remove *ev = event;
- E_Border *bd = ev->border;
+ E_Event_Client *ev = event;
+ E_Client *ec = ev->ec;
- borders = eina_list_remove(borders, bd);
- if (bd_active == bd) bd_active = NULL;
+ clients = eina_list_remove(clients, ec);
+ if (ec_active == ec) ec_active = NULL;
return ECORE_CALLBACK_PASS_ON;
}
static Eina_Bool
_cb_event_focus_in(void *data __UNUSED__, int type __UNUSED__, void *event)
{
- E_Event_Border_Focus_In *ev = event;
- E_Border *bd = ev->border;
+ E_Event_Client *ev = event;
+ E_Client *ec = ev->ec;
- bd_active = bd;
+ ec_active = ec;
return ECORE_CALLBACK_PASS_ON;
}
static Eina_Bool
_cb_event_focus_out(void *data __UNUSED__, int type __UNUSED__, void *event)
{
- E_Event_Border_Focus_Out *ev = event;
- E_Border *bd = ev->border;
+ E_Event_Client *ev = event;
+ E_Client *ec = ev->ec;
- if (bd_active == bd) bd_active = NULL;
+ if (ec_active == ec) ec_active = NULL;
if (kbd_on) e_policy_kbd_override_set(EINA_FALSE);
return ECORE_CALLBACK_PASS_ON;
}
static void
-_cb_hook_post_fetch(void *data __UNUSED__, void *data2)
+_cb_hook_post_fetch(void *data __UNUSED__, E_Client *ec)
{
- E_Border *bd = data2;
-
- if (!bd) return;
- /* NB: for this policy we disable all remembers set on a border */
- if (bd->remember) e_remember_del(bd->remember);
- bd->remember = NULL;
+ /* NB: for this policy we disable all remembers set on a client */
+ if (ec->remember) e_remember_del(ec->remember);
+ ec->remember = NULL;
- /* set this border to borderless */
- bd->borderless = 1;
- bd->client.border.changed = 1;
+ /* set this client to borderless */
+ ec->borderless = 1;
+ EC_CHANGED(ec);
}
static void
-_cb_hook_post_assign(void *data __UNUSED__, void *data2)
+_cb_hook_post_assign(void *data __UNUSED__, E_Client *ec)
{
- E_Border *bd = data2;
-
- if (!bd) return;
-
- bd->internal_no_remember = 1;
+ ec->internal_no_remember = 1;
/* do not allow client to change these properties */
- bd->lock_client_size = 1;
- bd->lock_client_shade = 1;
- bd->lock_client_maximize = 1;
- bd->lock_client_location = 1;
- bd->lock_client_stacking = 1;
+ ec->lock_client_size = 1;
+ ec->lock_client_shade = 1;
+ ec->lock_client_maximize = 1;
+ ec->lock_client_location = 1;
+ ec->lock_client_stacking = 1;
/* do not allow the user to change these properties */
- bd->lock_user_location = 1;
- bd->lock_user_size = 1;
- bd->lock_user_shade = 1;
+ ec->lock_user_location = 1;
+ ec->lock_user_size = 1;
+ ec->lock_user_shade = 1;
/* clear any centered states */
/* NB: this is mainly needed for E's main config dialog */
- bd->client.e.state.centered = 0;
+ ec->e.state.centered = 0;
/* lock the border type so user/client cannot change */
- bd->lock_border = 1;
+ ec->lock_border = 1;
}
static void
-_cb_hook_layout(void *data __UNUSED__, void *data2)
+_cb_hook_layout(void *data __UNUSED__, E_Comp *comp)
{
- E_Container *con = data2;
Eina_List *l;
- E_Border *bd, *kbd = NULL;;
+ E_Client *ec, *kbd = NULL;;
Eina_Bool want_kbd = EINA_FALSE;
Eina_Bool have_focused = EINA_FALSE;
int kx = 0, ky = 0, kw = 0, kh = 0;
- if (!con) return;
+ if (!comp) return;
- EINA_LIST_FOREACH(e_border_client_list(), l, bd)
+ EINA_LIST_FOREACH(comp->clients, l, ec)
{
- if (bd->focused) have_focused = EINA_TRUE;
- if ((bd->focused) &&
- (bd->client.vkbd.state > ECORE_X_VIRTUAL_KEYBOARD_STATE_OFF))
+ if (e_client_util_ignored_get(ec)) continue;
+ if (ec->focused) have_focused = EINA_TRUE;
+ if ((ec->focused) &&
+ (ec->vkbd.state > ECORE_X_VIRTUAL_KEYBOARD_STATE_OFF))
want_kbd = EINA_TRUE;
- if (bd->client.vkbd.vkbd) kbd = bd;
+ if (ec->vkbd.vkbd) kbd = ec;
}
if ((have_focused) && (kbd_override)) want_kbd = EINA_TRUE;
@@ -196,59 +191,60 @@ _cb_hook_layout(void *data __UNUSED__, void *data2)
if (kbd)
{
kw = kbd->zone->w;
- kh = kbd->client.icccm.min_h;
+ kh = kbd->icccm.min_h;
kx = kbd->zone->x;
ky = kbd->zone->y + kbd->zone->h - kh;
}
- EINA_LIST_FOREACH(e_border_client_list(), l, bd)
+ EINA_LIST_FOREACH(comp->clients, l, ec)
{
int x, y, w, h;
- if (!bd->zone) continue;
+ if (!ec->zone) continue;
+ if (e_client_util_ignored_get(ec)) continue;
- w = bd->zone->w;
- h = bd->zone->h;
- x = bd->zone->x;
- y = bd->zone->y;
+ w = ec->zone->w;
+ h = ec->zone->h;
+ x = ec->zone->x;
+ y = ec->zone->y;
- if (bd->client.vkbd.vkbd)
+ if (ec->vkbd.vkbd)
{
x = kx; y = ky; w = kw; h = kh;
if (want_kbd)
{
- e_border_uniconify(bd);
- e_border_raise(bd);
- e_border_show(bd);
+ e_client_uniconify(ec);
+ evas_object_raise(ec->frame);
+ evas_object_show(ec->frame);
}
else
{
- e_border_iconify(bd);
+ e_client_iconify(ec);
}
}
- else if (((bd->client.netwm.type == ECORE_X_WINDOW_TYPE_DIALOG) ||
- (bd->client.icccm.transient_for != 0)) &&
- ((bd->client.icccm.min_w == bd->client.icccm.max_w) &&
- (bd->client.icccm.min_h == bd->client.icccm.max_h)))
+ else if (((ec->netwm.type == E_WINDOW_TYPE_DIALOG) ||
+ (ec->icccm.transient_for != 0)) &&
+ ((ec->icccm.min_w == ec->icccm.max_w) &&
+ (ec->icccm.min_h == ec->icccm.max_h)))
{
// center dialog at min size
- w = bd->client.icccm.min_w;
- h = bd->client.icccm.min_h;
- if (w > (bd->zone->w)) w = bd->zone->w;
- if (h > (bd->zone->h - kh)) h = (bd->zone->h - kh);
- x = bd->zone->x + ((bd->zone->w - w) / 2);
- y = bd->zone->y + ((bd->zone->h - kh - h) / 2);
+ w = ec->icccm.min_w;
+ h = ec->icccm.min_h;
+ if (w > (ec->zone->w)) w = ec->zone->w;
+ if (h > (ec->zone->h - kh)) h = (ec->zone->h - kh);
+ x = ec->zone->x + ((ec->zone->w - w) / 2);
+ y = ec->zone->y + ((ec->zone->h - kh - h) / 2);
}
else
{
- if (bd->client.illume.conformant.conformant)
+ if (ec->illume.conformant.conformant)
{
if (kbd_on != want_kbd)
{
if (want_kbd)
- ecore_x_e_illume_keyboard_geometry_set(bd->client.win,
+ ecore_x_e_illume_keyboard_geometry_set(e_client_util_win_get(ec),
kx, ky, kw, kh);
else
- ecore_x_e_illume_keyboard_geometry_set(bd->client.win,
+ ecore_x_e_illume_keyboard_geometry_set(e_client_util_win_get(ec),
0, 0, 0, 0);
}
}
@@ -257,31 +253,30 @@ _cb_hook_layout(void *data __UNUSED__, void *data2)
// just make all windows fill the zone...
if (want_kbd)
{
- w = bd->zone->w;
- h = bd->zone->h - kh;
- x = bd->zone->x;
- y = bd->zone->y;
+ w = ec->zone->w;
+ h = ec->zone->h - kh;
+ x = ec->zone->x;
+ y = ec->zone->y;
}
}
}
// implement the positioning/sizing
- if ((bd->x != x) || (bd->y != y))
+ if ((ec->x != x) || (ec->y != y))
{
- bd->placed = 1;
- bd->x = x;
- bd->y = y;
- bd->changes.pos = 1;
- bd->changed = 1;
+ ec->placed = 1;
+ ec->x = x;
+ ec->y = y;
+ ec->changes.pos = 1;
+ EC_CHANGED(ec);
}
- if ((bd->w != w) || (bd->h != h))
+ if ((ec->w != w) || (ec->h != h))
{
- bd->w = w;
- bd->h = h;
- bd->client.w = (bd->w - (bd->client_inset.l + bd->client_inset.r));
- bd->client.h = (bd->h - (bd->client_inset.t + bd->client_inset.b));
- bd->changes.size = 1;
- bd->changed = 1;
+ ec->w = w;
+ ec->h = h;
+ e_comp_object_frame_wh_unadjust(ec->frame, ec->w, ec->h, &ec->client.w, &ec->client.h);
+ ec->changes.size = 1;
+ EC_CHANGED(ec);
}
}
diff --git a/src/modules/contact/e_policy.h b/src/modules/contact/e_policy.h
index 6c98fca2ae..9f8a8ed3cd 100644
--- a/src/modules/contact/e_policy.h
+++ b/src/modules/contact/e_policy.h
@@ -4,7 +4,7 @@
void e_policy_init(void);
void e_policy_shutdown(void);
void e_policy_kbd_override_set(Eina_Bool override);
-const Eina_List *e_policy_borders_get(void);
-const E_Border *e_polict_border_active_get(void);
+const Eina_List *e_policy_clients_get(void);
+const E_Client *e_policy_client_active_get(void);
#endif
diff --git a/src/modules/cpufreq/e_mod_config.c b/src/modules/cpufreq/e_mod_config.c
index a6ac0ca629..4564e5b840 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_Container *con, const char *params __UNUSED__)
+e_int_config_cpufreq_module(E_Comp *comp, const char *params __UNUSED__)
{
E_Config_Dialog *cfd;
E_Config_Dialog_View *v;
@@ -35,7 +35,7 @@ e_int_config_cpufreq_module(E_Container *con, 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(con, _("Cpu Frequency Control Settings"),
+ cfd = e_config_dialog_new(comp, _("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 7183cb3f1c..10a5b1d78b 100644
--- a/src/modules/cpufreq/e_mod_main.c
+++ b/src/modules/cpufreq/e_mod_main.c
@@ -164,7 +164,7 @@ _cpufreq_cb_menu_configure(void *data __UNUSED__, E_Menu *m, E_Menu_Item *mi __U
{
if (!cpufreq_config) return;
if (cpufreq_config->config_dialog) return;
- e_int_config_cpufreq_module(m->zone->container, NULL);
+ e_int_config_cpufreq_module(m->zone->comp, NULL);
}
static void
@@ -498,10 +498,8 @@ _cpufreq_set_governor(const char *governor)
if (ret != 0)
{
E_Dialog *dia;
- E_Container *con;
- con = e_container_current_get(e_manager_current_get());
- if (!(dia = e_dialog_new(con, "E", "_e_mod_cpufreq_error_setfreq")))
+ if (!(dia = e_dialog_new(NULL, "E", "_e_mod_cpufreq_error_setfreq")))
return;
e_dialog_title_set(dia, "Enlightenment Cpufreq Module");
e_dialog_icon_set(dia, "enlightenment", 64);
@@ -526,10 +524,8 @@ _cpufreq_set_frequency(int frequency)
if (!cpufreq_config->status->can_set_frequency)
{
E_Dialog *dia;
- E_Container *con;
- con = e_container_current_get(e_manager_current_get());
- if (!(dia = e_dialog_new(con, "E", "_e_mod_cpufreq_error_setfreq")))
+ if (!(dia = e_dialog_new(NULL, "E", "_e_mod_cpufreq_error_setfreq")))
return;
e_dialog_title_set(dia, "Enlightenment Cpufreq Module");
e_dialog_icon_set(dia, "enlightenment", 64);
@@ -554,10 +550,8 @@ _cpufreq_set_frequency(int frequency)
if (ret != 0)
{
E_Dialog *dia;
- E_Container *con;
- con = e_container_current_get(e_manager_current_get());
- if (!(dia = e_dialog_new(con, "E", "_e_mod_cpufreq_error_setfreq")))
+ if (!(dia = e_dialog_new(NULL, "E", "_e_mod_cpufreq_error_setfreq")))
return;
e_dialog_title_set(dia, "Enlightenment Cpufreq Module");
e_dialog_icon_set(dia, "enlightenment", 64);
@@ -582,10 +576,8 @@ _cpufreq_set_pstate(int min, int max, int turbo)
if (ret != 0)
{
E_Dialog *dia;
- E_Container *con;
- con = e_container_current_get(e_manager_current_get());
- if (!(dia = e_dialog_new(con, "E", "_e_mod_cpufreq_error_setfreq")))
+ if (!(dia = e_dialog_new(NULL, "E", "_e_mod_cpufreq_error_setfreq")))
return;
e_dialog_title_set(dia, "Enlightenment Cpufreq Module");
e_dialog_icon_set(dia, "enlightenment", 64);
diff --git a/src/modules/cpufreq/e_mod_main.h b/src/modules/cpufreq/e_mod_main.h
index 5879cb8059..c701f6b5fa 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_Container *con, const char *params);
+E_Config_Dialog *e_int_config_cpufreq_module(E_Comp *comp, 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.c b/src/modules/everything/e_mod_main.c
index b41f5e5511..1ad490a617 100644
--- a/src/modules/everything/e_mod_main.c
+++ b/src/modules/everything/e_mod_main.c
@@ -549,10 +549,10 @@ _e_mod_action_cb(E_Object *obj, const char *params)
{
if (obj->type == E_MANAGER_TYPE)
zone = e_util_zone_current_get((E_Manager *)obj);
- else if (obj->type == E_CONTAINER_TYPE)
- zone = e_util_zone_current_get(((E_Container *)obj)->manager);
+ else if (obj->type == E_COMP_TYPE)
+ zone = e_zone_current_get((E_Comp *)obj);
else if (obj->type == E_ZONE_TYPE)
- zone = e_util_zone_current_get(((E_Zone *)obj)->container->manager);
+ zone = e_zone_current_get(((E_Zone *)obj)->comp);
else
zone = e_util_zone_current_get(e_manager_current_get());
}
diff --git a/src/modules/everything/e_mod_main.h b/src/modules/everything/e_mod_main.h
index d058115695..ed17881440 100644
--- a/src/modules/everything/e_mod_main.h
+++ b/src/modules/everything/e_mod_main.h
@@ -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_Container *con, const char *params);
-EAPI E_Config_Dialog *evry_collection_conf_dialog(E_Container *con, const char *params);
+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 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 4dae6eff79..caaf311b10 100644
--- a/src/modules/everything/evry.c
+++ b/src/modules/everything/evry.c
@@ -185,7 +185,8 @@ evry_show(E_Zone *zone, E_Zone_Edge edge, const char *params, Eina_Bool popup)
ecore_evas_name_class_set(win->ewin->ecore_evas, "E", "everything");
e_win_show(win->ewin);
- win->ewin->border->client.netwm.state.skip_taskbar = win->ewin->border->changed = 1;
+ win->ewin->client->netwm.state.skip_taskbar = 1;
+ EC_CHANGED(win->ewin->client);
win->grab = 1;
}
@@ -278,6 +279,7 @@ evry_hide(Evry_Window *win, int clear)
if (!win) return;
+ e_win_delete_callback_set(win->ewin, NULL);
e_win_hide(win->ewin);
_evry_state_clear(win);
@@ -331,8 +333,11 @@ evry_hide(Evry_Window *win, int clear)
win->visible = EINA_FALSE;
- for (i = 0; win->sel_list[i]; i++)
- _evry_selector_free(win->sel_list[i]);
+ if (win->sel_list)
+ {
+ for (i = 0; win->sel_list[i]; i++)
+ _evry_selector_free(win->sel_list[i]);
+ }
E_FREE(win->sel_list);
@@ -758,7 +763,7 @@ _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->container);
+ win->ewin = e_win_new(zone->comp);
e_win_borderless_set(win->ewin, 1);
e_win_no_remember_set(win->ewin, 1);
e_win_placed_set(win->ewin, 1);
@@ -933,7 +938,7 @@ _evry_cb_mouse(void *data, int type, void *event)
memcpy(sel + sel_length + s_len, "\r\n", 2);
sel_length += s_len + 2;
- d = e_drag_new(e_container_current_get(e_manager_current_get()),
+ d = e_drag_new(e_util_comp_current_get()),
ev->x, ev->y,
drag_types, 1, sel, sel_length, NULL,
_evry_cb_drag_finished);
@@ -956,7 +961,8 @@ _evry_cb_mouse(void *data, int type, void *event)
{
win->mouse_out = 0;
- if (!E_INSIDE(ev->x, ev->y, 0, 0, w->w, w->h))
+ 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))
{
win->mouse_out = 1;
return ECORE_CALLBACK_PASS_ON;
@@ -969,7 +975,8 @@ _evry_cb_mouse(void *data, int type, void *event)
win->mouse_button = 0;
if (win->mouse_out &&
- !E_INSIDE(ev->x, ev->y, 0, 0, w->w, w->h))
+ (!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)))
{
evry_hide(win, 0);
return ECORE_CALLBACK_PASS_ON;
@@ -1913,14 +1920,14 @@ _evry_cb_key_down(void *data, int type __UNUSED__, void *event)
E_Win *ewin = win->ewin;
e_grabinput_release(ewin->evas_win, ewin->evas_win);
- e_border_layer_set(ewin->border, E_LAYER_NORMAL);
+ evas_object_layer_set(ewin->client->frame, E_LAYER_CLIENT_NORMAL);
ecore_x_netwm_window_type_set(ewin->evas_win,
ECORE_X_WINDOW_TYPE_DIALOG);
- ewin->border->client.netwm.fetch.type = 1;
- ewin->border->client.netwm.state.skip_taskbar = 0;
- ewin->border->changed = 1;
- ewin->border->client.netwm.update.state = 1;
- ewin->border->internal_no_remember = 1;
+ 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);
win->grab = 0;
diff --git a/src/modules/everything/evry_api.h b/src/modules/everything/evry_api.h
index 1b83e00c4b..27997f9abc 100644
--- a/src/modules/everything/evry_api.h
+++ b/src/modules/everything/evry_api.h
@@ -33,7 +33,7 @@
#define EVRY_TYPE_APP 3
#define EVRY_TYPE_ACTION 4
#define EVRY_TYPE_PLUGIN 5
-#define EVRY_TYPE_BORDER 6
+#define EVRY_TYPE_CLIENT 6
#define EVRY_TYPE_TEXT 7
#define NUM_EVRY_TYPES 8
diff --git a/src/modules/everything/evry_config.c b/src/modules/everything/evry_config.c
index 04f20126d9..b71cc33d9a 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_Container *con, const char *params __UNUSED__)
+evry_config_dialog(E_Comp *comp, const char *params __UNUSED__)
{
E_Config_Dialog *cfd;
E_Config_Dialog_View *v;
@@ -74,7 +74,7 @@ evry_config_dialog(E_Container *con, 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(con,
+ cfd = e_config_dialog_new(comp,
_("Everything Settings"),
"E", "extensions/run_everything",
"system-run", 0, v, NULL);
@@ -349,9 +349,7 @@ _plugin_config_cb(void *data, void *data2 __UNUSED__)
if (!p) return;
printf(" %s\n", p->name);
- e_configure_registry_call(p->config_path,
- e_container_current_get(e_manager_current_get()),
- p->name);
+ e_configure_registry_call(p->config_path, NULL, p->name);
}
static Evas_Object *
@@ -607,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_Container *con, const char *params)
+evry_collection_conf_dialog(E_Comp *comp, const char *params)
{
E_Config_Dialog *cfd = NULL;
E_Config_Dialog_View *v = NULL;
@@ -630,7 +628,7 @@ evry_collection_conf_dialog(E_Container *con, const char *params)
snprintf(title, sizeof(title), "%s: %s", _("Everything Collection"), p->name);
- cfd = e_config_dialog_new(con, title, p->config_path, p->config_path,
+ cfd = e_config_dialog_new(comp, 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 5ff75ca06e..450eb0bb78 100644
--- a/src/modules/everything/evry_gadget.c
+++ b/src/modules/everything/evry_gadget.c
@@ -114,7 +114,7 @@ _gc_init(E_Gadcon *gc, const char *name, const char *id, const char *style)
inst->illume_mode = EINA_TRUE;
inst->handlers = eina_list_append(inst->handlers,
- ecore_event_handler_add(E_EVENT_BORDER_FOCUS_OUT,
+ ecore_event_handler_add(E_EVENT_CLIENT_FOCUS_OUT,
_cb_focus_out, inst));
}
@@ -237,8 +237,8 @@ _hide_done(void *data, Evas_Object *obj EINA_UNUSED, const char *s EINA_UNUSED,
evry_selectors_switch(inst->win, -1, 0);
evry_selectors_switch(inst->win, -1, 0);
- e_border_iconify(inst->win->ewin->border);
- e_comp_win_effect_set(inst->win->ewin->border->cw, "none");
+ e_client_iconify(inst->win->ewin->client);
+ e_comp_object_effect_set(inst->win->ewin->client->frame, "none");
inst->animating = 0;
}
@@ -247,22 +247,22 @@ _evry_hide_func(Evry_Window *win, int finished __UNUSED__)
{
Instance *inst = win->data;
- e_comp_win_effect_set(inst->win->ewin->border->cw, "pane");
+ e_comp_object_effect_set(inst->win->ewin->client->frame, "pane");
/* set geoms */
- e_comp_win_effect_params_set(inst->win->ewin->border->cw, 1,
+ 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->border->zone->w, inst->win->ewin->border->zone->h,
+ inst->win->ewin->client->zone->w, inst->win->ewin->client->zone->h,
inst->hide_x, inst->hide_y}, 8);
- e_comp_win_effect_params_set(inst->win->ewin->border->cw, 0, (int[]){0}, 1);
- e_comp_win_effect_start(inst->win->ewin->border->cw, _hide_done, inst);
+ 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);
inst->hidden = inst->animating = EINA_TRUE;
}
static Eina_Bool
_cb_focus_out(void *data, int type __UNUSED__, void *event)
{
- E_Event_Border_Focus_Out *ev;
+ E_Event_Client *ev;
Instance *inst;
ev = event;
@@ -273,7 +273,7 @@ _cb_focus_out(void *data, int type __UNUSED__, void *event)
if ((!inst) || (!inst->win))
return ECORE_CALLBACK_PASS_ON;
- if (inst->win->ewin->border != ev->border)
+ if (inst->win->ewin->client != ev->ec)
return ECORE_CALLBACK_PASS_ON;
_evry_hide_func(inst->win, 0);
@@ -410,10 +410,10 @@ _gadget_window_show(Instance *inst)
e_win_resize(ewin, pw, ph);
e_win_show(ewin);
- e_border_focus_set(ewin->border, 1, 1);
- ewin->border->client.netwm.state.skip_pager = 1;
- ewin->border->client.netwm.state.skip_taskbar = 1;
- ewin->border->sticky = 1;
+ 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;
inst->hidden = EINA_FALSE;
}
@@ -434,21 +434,21 @@ _button_cb_mouse_down(void *data, Evas *e __UNUSED__, Evas_Object *obj __UNUSED_
if (ev->button == 1)
{
Evry_Window *win;
- E_Border *bd;
+ E_Client *ec;
if (inst->win)
{
win = inst->win;
- bd = win->ewin->border;
+ ec = win->ewin->client;
- if (inst->hidden || !bd->focused)
+ if (inst->hidden || !ec->focused)
{
if (inst->animating)
- e_comp_win_effect_stop(bd->cw, NULL);
- e_comp_win_effect_set(bd->cw, "none");
- e_border_uniconify(bd);
- e_border_raise(bd);
- e_border_focus_set(bd, 1, 1);
+ e_comp_object_effect_stop(ec->frame, NULL);
+ e_comp_object_effect_set(ec->frame, "none");
+ e_client_uniconify(ec);
+ evas_object_raise(ec->frame);
+ evas_object_focus_set(ec->frame, 1);
inst->hidden = EINA_FALSE;
return;
}
@@ -546,7 +546,6 @@ static void
_conf_dialog(Instance *inst)
{
E_Config_Dialog_View *v = NULL;
- E_Container *con;
if (inst->cfd)
return;
@@ -562,8 +561,7 @@ _conf_dialog(Instance *inst)
v->basic.create_widgets = _basic_create;
v->basic.apply_cfdata = _basic_apply;
- con = e_container_current_get(e_manager_current_get());
- inst->cfd = e_config_dialog_new(con, _("Everything Gadgets"), "everything-gadgets",
+ inst->cfd = e_config_dialog_new(NULL, _("Everything Gadgets"), "everything-gadgets",
"launcher/everything-gadgets", NULL, 0, v, inst);
/* _conf->cfd = cfd; */
@@ -602,7 +600,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_container_current_get(e_manager_current_get()), "Start"); */
+ /* evry_collection_conf_dialog(e_util_comp_current_get()), "Start"); */
}
static void
diff --git a/src/modules/everything/evry_plug_apps.c b/src/modules/everything/evry_plug_apps.c
index 06b0f1017b..b37241ed9a 100644
--- a/src/modules/everything/evry_plug_apps.c
+++ b/src/modules/everything/evry_plug_apps.c
@@ -932,7 +932,7 @@ _edit_app_action(Evry_Action *act)
desktop->exec = strdup(app->file);
}
- e_desktop_edit(e_container_current_get(e_manager_current_get()), desktop);
+ e_desktop_edit(NULL, desktop);
return 1;
}
@@ -1009,7 +1009,7 @@ _new_app_action(Evry_Action *act)
desktop->mime_types = eina_list_clone(app->desktop->mime_types);
}
if (desktop)
- e_desktop_edit(e_container_current_get(e_manager_current_get()), desktop);
+ e_desktop_edit(NULL, desktop);
return 1;
}
@@ -1284,7 +1284,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_Container *con, const char *params __UNUSED__)
+_conf_dialog(E_Comp *comp, const char *params __UNUSED__)
{
E_Config_Dialog *cfd = NULL;
E_Config_Dialog_View *v = NULL;
@@ -1299,7 +1299,7 @@ _conf_dialog(E_Container *con, const char *params __UNUSED__)
v->basic.create_widgets = _basic_create;
v->basic.apply_cfdata = _basic_apply;
- cfd = e_config_dialog_new(con, _("Everything Applications"), "everything-apps",
+ cfd = e_config_dialog_new(comp, _("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 d8ea5d2da0..3103202853 100644
--- a/src/modules/everything/evry_plug_files.c
+++ b/src/modules/everything/evry_plug_files.c
@@ -1439,7 +1439,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_Container *con, const char *params __UNUSED__)
+_conf_dialog(E_Comp *comp, const char *params __UNUSED__)
{
E_Config_Dialog *cfd = NULL;
E_Config_Dialog_View *v = NULL;
@@ -1454,7 +1454,7 @@ _conf_dialog(E_Container *con, const char *params __UNUSED__)
v->basic.create_widgets = _basic_create;
v->basic.apply_cfdata = _basic_apply;
- cfd = e_config_dialog_new(con, _("Everything Files"), "everything-files",
+ cfd = e_config_dialog_new(comp, _("Everything Files"), "everything-files",
"extensions/everything-files", _module_icon, 0, v, NULL);
_conf->cfd = cfd;
diff --git a/src/modules/everything/evry_plug_settings.c b/src/modules/everything/evry_plug_settings.c
index af1e7b258a..2b48977c0e 100644
--- a/src/modules/everything/evry_plug_settings.c
+++ b/src/modules/everything/evry_plug_settings.c
@@ -165,7 +165,7 @@ _action(Evry_Action *action)
snprintf(buf, sizeof(buf), "%s/%s", it->ecat->cat, it->eci->item);
- e_configure_registry_call(buf, e_container_current_get(e_manager_current_get()), NULL);
+ e_configure_registry_call(buf, NULL, NULL);
return EVRY_ACTION_FINISHED;
}
diff --git a/src/modules/everything/evry_plug_windows.c b/src/modules/everything/evry_plug_windows.c
index 4ff937a5f6..43d321d1b0 100644
--- a/src/modules/everything/evry_plug_windows.c
+++ b/src/modules/everything/evry_plug_windows.c
@@ -8,12 +8,12 @@
#define BORDER_CLOSE 5
typedef struct _Plugin Plugin;
-typedef struct _Border_Item Border_Item;
+typedef struct _Border_Item Client_Item;
struct _Plugin
{
Evry_Plugin base;
- Eina_List *borders;
+ Eina_List *clients;
Eina_List *handlers;
const char *input;
};
@@ -21,7 +21,7 @@ struct _Plugin
struct _Border_Item
{
Evry_Item base;
- E_Border *border;
+ E_Client *client;
};
static const Evry_API *evry = NULL;
@@ -33,41 +33,43 @@ static Evas_Object *_icon_get(Evry_Item *it, Evas *e);
/***************************************************************************/
-#define GET_BORDER(_bd, _it) Border_Item * _bd = (Border_Item *)_it;
+#define GET_BORDER(_bd, _it) Client_Item * _bd = (Client_Item *)_it;
static void
-_border_item_free(Evry_Item *it)
+_client_item_free(Evry_Item *it)
{
GET_BORDER(bi, it);
- e_object_unref(E_OBJECT(bi->border));
+ e_object_unref(E_OBJECT(bi->client));
E_FREE(bi);
}
static int
-_border_item_add(Plugin *p, E_Border *bd)
+_client_item_add(Plugin *p, E_Client *ec)
{
- Border_Item *bi;
+ Client_Item *bi;
char buf[1024];
- if (bd->client.netwm.state.skip_taskbar)
+ if (ec->netwm.state.skip_taskbar)
return 0;
- if (bd->client.netwm.state.skip_pager)
+ if (ec->netwm.state.skip_pager)
+ return 0;
+ if (e_client_util_ignored_get(ec))
return 0;
- bi = EVRY_ITEM_NEW(Border_Item, p, e_border_name_get(bd),
- _icon_get, _border_item_free);
+ bi = EVRY_ITEM_NEW(Client_Item, p, e_client_name_get(ec),
+ _icon_get, _client_item_free);
snprintf(buf, sizeof(buf), "%d:%d %s",
- bd->desk->x, bd->desk->y,
- (bd->desktop ? bd->desktop->name : ""));
+ ec->desk->x, ec->desk->y,
+ (ec->desktop ? ec->desktop->name : ""));
EVRY_ITEM_DETAIL_SET(bi, buf);
- bi->border = bd;
- e_object_ref(E_OBJECT(bd));
+ bi->client = ec;
+ e_object_ref(E_OBJECT(ec));
- p->borders = eina_list_append(p->borders, bi);
+ p->clients = eina_list_append(p->clients, bi);
return 1;
}
@@ -75,23 +77,23 @@ _border_item_add(Plugin *p, E_Border *bd)
static Eina_Bool
_cb_border_remove(void *data, __UNUSED__ int type, void *event)
{
- E_Event_Border_Remove *ev = event;
- Border_Item *bi;
+ E_Event_Client *ev = event;
+ Client_Item *bi;
Eina_List *l;
Plugin *p = data;
- EINA_LIST_FOREACH (p->borders, l, bi)
- if (bi->border == ev->border)
+ EINA_LIST_FOREACH(p->clients, l, bi)
+ if (bi->client == ev->ec)
break;
if (!bi) return ECORE_CALLBACK_PASS_ON;
EVRY_PLUGIN_ITEMS_CLEAR(p);
- p->borders = eina_list_remove(p->borders, bi);
+ p->clients = eina_list_remove(p->clients, bi);
EVRY_ITEM_FREE(bi);
- EVRY_PLUGIN_ITEMS_ADD(p, p->borders, p->input, 1, 0);
+ EVRY_PLUGIN_ITEMS_ADD(p, p->clients, p->input, 1, 0);
EVRY_PLUGIN_UPDATE(p, EVRY_UPDATE_ADD);
@@ -99,17 +101,18 @@ _cb_border_remove(void *data, __UNUSED__ int type, void *event)
}
static Eina_Bool
-_cb_border_add(void *data, __UNUSED__ int type, void *event)
+_cb_client_add(void *data, __UNUSED__ int type, void *event)
{
- E_Event_Border_Add *ev = event;
+ E_Event_Client *ev = event;
Plugin *p = data;
- if (!_border_item_add(p, ev->border))
+ if (e_client_util_ignored_get(ev->ec)) return ECORE_CALLBACK_RENEW;
+ if (!_client_item_add(p, ev->ec))
return ECORE_CALLBACK_PASS_ON;
EVRY_PLUGIN_ITEMS_CLEAR(p);
- EVRY_PLUGIN_ITEMS_ADD(p, p->borders, p->input, 1, 0);
+ EVRY_PLUGIN_ITEMS_ADD(p, p->clients, p->input, 1, 0);
EVRY_PLUGIN_UPDATE(p, EVRY_UPDATE_ADD);
@@ -120,21 +123,21 @@ static Evry_Plugin *
_begin(Evry_Plugin *plugin, const Evry_Item *item __UNUSED__)
{
Plugin *p;
- E_Border *bd;
+ E_Client *ec;
Eina_List *l;
EVRY_PLUGIN_INSTANCE(p, plugin);
p->handlers = eina_list_append
(p->handlers, ecore_event_handler_add
- (E_EVENT_BORDER_REMOVE, _cb_border_remove, p));
+ (E_EVENT_CLIENT_REMOVE, _cb_border_remove, p));
p->handlers = eina_list_append
(p->handlers, ecore_event_handler_add
- (E_EVENT_BORDER_ADD, _cb_border_add, p));
+ (E_EVENT_CLIENT_ADD, _cb_client_add, p));
- EINA_LIST_FOREACH (e_border_focus_stack_get(), l, bd)
- _border_item_add(p, bd);
+ EINA_LIST_FOREACH (e_client_focus_stack_get(), l, ec)
+ _client_item_add(p, ec);
return EVRY_PLUGIN(p);
}
@@ -143,7 +146,7 @@ static void
_finish(Evry_Plugin *plugin)
{
Ecore_Event_Handler *h;
- Border_Item *bi;
+ Client_Item *bi;
GET_PLUGIN(p, plugin);
@@ -151,7 +154,7 @@ _finish(Evry_Plugin *plugin)
EVRY_PLUGIN_ITEMS_CLEAR(p);
- EINA_LIST_FREE (p->borders, bi)
+ EINA_LIST_FREE (p->clients, bi)
EVRY_ITEM_FREE(bi);
EINA_LIST_FREE (p->handlers, h)
@@ -174,7 +177,7 @@ _fetch(Evry_Plugin *plugin, const char *input)
if (input)
p->input = eina_stringshare_add(input);
- return EVRY_PLUGIN_ITEMS_ADD(p, p->borders, input, 1, 0);
+ return EVRY_PLUGIN_ITEMS_ADD(p, p->clients, input, 1, 0);
}
return 0;
@@ -186,87 +189,87 @@ _icon_get(Evry_Item *it, Evas *e)
GET_BORDER(bi, it);
Evas_Object *o = NULL;
- E_Border *bd = bi->border;
+ E_Client *ec = bi->client;
- if (bd->internal)
+ if (ec->internal)
{
- if (!bd->internal_icon)
+ if (!ec->internal_icon)
{
o = e_icon_add(e);
e_util_icon_theme_set(o, "enlightenment");
}
- else if (!bd->internal_icon_key)
+ else if (!ec->internal_icon_key)
{
char *ext;
- ext = strrchr(bd->internal_icon, '.');
+ ext = strrchr(ec->internal_icon, '.');
if ((ext) && ((!strcmp(ext, ".edj"))))
{
o = edje_object_add(e);
- if (!edje_object_file_set(o, bd->internal_icon, "icon"))
+ if (!edje_object_file_set(o, ec->internal_icon, "icon"))
e_util_icon_theme_set(o, "enlightenment");
}
else if (ext)
{
o = e_icon_add(e);
- e_icon_file_set(o, bd->internal_icon);
+ e_icon_file_set(o, ec->internal_icon);
}
else
{
o = e_icon_add(e);
e_icon_scale_size_set(o, 128);
- if (!e_util_icon_theme_set(o, bd->internal_icon))
+ if (!e_util_icon_theme_set(o, ec->internal_icon))
e_util_icon_theme_set(o, "enlightenment");
}
}
else
{
o = edje_object_add(e);
- edje_object_file_set(o, bd->internal_icon, bd->internal_icon_key);
+ edje_object_file_set(o, ec->internal_icon, ec->internal_icon_key);
}
return o;
}
- if (bd->client.netwm.icons)
+ if (ec->netwm.icons)
{
if (e_config->use_app_icon)
goto _use_netwm_icon;
- if (bd->remember && (bd->remember->prop.icon_preference == E_ICON_PREF_NETWM))
+ if (ec->remember && (ec->remember->prop.icon_preference == E_ICON_PREF_NETWM))
goto _use_netwm_icon;
}
- if (bd->desktop)
+ if (ec->desktop)
{
- o = e_util_desktop_icon_add(bd->desktop, 128, e);
+ o = e_util_desktop_icon_add(ec->desktop, 128, e);
if (o) return o;
}
_use_netwm_icon:
- if (bd->client.netwm.icons)
+ if (ec->netwm.icons)
{
int i, size, tmp, found = 0;
o = e_icon_add(e);
- size = bd->client.netwm.icons[0].width;
+ size = ec->netwm.icons[0].width;
- for (i = 1; i < bd->client.netwm.num_icons; i++)
+ for (i = 1; i < ec->netwm.num_icons; i++)
{
- if ((tmp = bd->client.netwm.icons[i].width) > size)
+ if ((tmp = ec->netwm.icons[i].width) > size)
{
size = tmp;
found = i;
}
}
- e_icon_data_set(o, bd->client.netwm.icons[found].data,
- bd->client.netwm.icons[found].width,
- bd->client.netwm.icons[found].height);
+ e_icon_data_set(o, ec->netwm.icons[found].data,
+ ec->netwm.icons[found].width,
+ ec->netwm.icons[found].height);
e_icon_alpha_set(o, 1);
return o;
}
- o = e_border_icon_add(bd, e);
+ o = e_client_icon_add(ec, e);
if (o) return o;
o = edje_object_add(e);
@@ -283,39 +286,39 @@ _check_border(Evry_Action *act, const Evry_Item *it)
GET_BORDER(bi, it);
int action = EVRY_ITEM_DATA_INT_GET(act);
- E_Border *bd = bi->border;
+ E_Client *ec = bi->client;
E_Zone *zone = e_util_zone_current_get(e_manager_current_get());
- if (!bd)
+ if (!ec)
{
- ERR("no border");
+ ERR("no client");
return 0;
}
switch (action)
{
case BORDER_CLOSE:
- if (bd->lock_close)
+ if (ec->lock_close)
return 0;
break;
case BORDER_SHOW:
- if (bd->lock_focus_in)
+ if (ec->lock_focus_in)
return 0;
break;
case BORDER_HIDE:
- if (bd->lock_user_iconify)
+ if (ec->lock_user_iconify)
return 0;
break;
case BORDER_FULLSCREEN:
- if (!bd->lock_user_fullscreen)
+ if (!ec->lock_user_fullscreen)
return 0;
break;
case BORDER_TODESK:
- if (bd->desk == (e_desk_current_get(zone)))
+ if (ec->desk == (e_desk_current_get(zone)))
return 0;
break;
}
@@ -329,42 +332,42 @@ _act_border(Evry_Action *act)
GET_BORDER(bi, act->it1.item);
int action = EVRY_ITEM_DATA_INT_GET(act);
- E_Border *bd = bi->border;
+ E_Client *ec = bi->client;
E_Zone *zone = e_util_zone_current_get(e_manager_current_get());
int focus = 0;
- if (!bd)
+ if (!ec)
{
- ERR("no border");
+ ERR("no client");
return 0;
}
switch (action)
{
case BORDER_CLOSE:
- e_border_act_close_begin(bd);
+ e_client_act_close_begin(ec);
break;
case BORDER_SHOW:
- if (bd->desk != (e_desk_current_get(zone)))
- e_desk_show(bd->desk);
+ if (ec->desk != (e_desk_current_get(zone)))
+ e_desk_show(ec->desk);
focus = 1;
break;
case BORDER_HIDE:
- e_border_iconify(bd);
+ e_client_iconify(ec);
break;
case BORDER_FULLSCREEN:
- if (!bd->fullscreen)
- e_border_fullscreen(bd, E_FULLSCREEN_RESIZE);
+ if (!ec->fullscreen)
+ e_client_fullscreen(ec, E_FULLSCREEN_RESIZE);
else
- e_border_unfullscreen(bd);
+ e_client_unfullscreen(ec);
break;
case BORDER_TODESK:
- if (bd->desk != (e_desk_current_get(zone)))
- e_border_desk_set(bd, e_desk_current_get(zone));
+ if (ec->desk != (e_desk_current_get(zone)))
+ e_client_desk_set(ec, e_desk_current_get(zone));
focus = 1;
break;
@@ -374,39 +377,39 @@ _act_border(Evry_Action *act)
if (focus)
{
- if (bd->shaded)
- e_border_unshade(bd, bd->shade.dir);
+ if (ec->shaded)
+ e_client_unshade(ec, ec->shade_dir);
- if (bd->iconic)
- e_border_uniconify(bd);
+ if (ec->iconic)
+ e_client_uniconify(ec);
else
- e_border_raise(bd);
+ evas_object_raise(ec->frame);
- if (!bd->lock_focus_out)
+ if (!ec->lock_focus_out)
{
- e_border_focus_set(bd, 1, 1);
- e_border_focus_latest_set(bd);
+ evas_object_focus_set(ec->frame, 1);
+ e_client_focus_latest_set(ec);
}
if ((e_config->focus_policy != E_FOCUS_CLICK) ||
(e_config->winlist_warp_at_end) ||
(e_config->winlist_warp_while_selecting))
{
- int warp_to_x = bd->x + (bd->w / 2);
- if (warp_to_x < (bd->zone->x + 1))
- warp_to_x = bd->zone->x + ((bd->x + bd->w - bd->zone->x) / 2);
- else if (warp_to_x >= (bd->zone->x + bd->zone->w - 1))
- warp_to_x = (bd->zone->x + bd->zone->w + bd->x) / 2;
-
- int warp_to_y = bd->y + (bd->h / 2);
- if (warp_to_y < (bd->zone->y + 1))
- warp_to_y = bd->zone->y + ((bd->y + bd->h - bd->zone->y) / 2);
- else if (warp_to_y >= (bd->zone->y + bd->zone->h - 1))
- warp_to_y = (bd->zone->y + bd->zone->h + bd->y) / 2;
-
- ecore_x_pointer_warp(bd->zone->container->win, warp_to_x, warp_to_y);
+ int warp_to_x = ec->x + (ec->w / 2);
+ if (warp_to_x < (ec->zone->x + 1))
+ warp_to_x = ec->zone->x + ((ec->x + ec->w - ec->zone->x) / 2);
+ else if (warp_to_x >= (ec->zone->x + ec->zone->w - 1))
+ warp_to_x = (ec->zone->x + ec->zone->w + ec->x) / 2;
+
+ int warp_to_y = ec->y + (ec->h / 2);
+ if (warp_to_y < (ec->zone->y + 1))
+ warp_to_y = ec->zone->y + ((ec->y + ec->h - ec->zone->y) / 2);
+ else if (warp_to_y >= (ec->zone->y + ec->zone->h - 1))
+ warp_to_y = (ec->zone->y + ec->zone->h + ec->y) / 2;
+
+ ecore_x_pointer_warp(ec->zone->comp->win, warp_to_x, warp_to_y);
}
- /* e_border_focus_set_with_pointer(bd); */
+ /* e_client_focus_set_with_pointer(ec); */
}
return 1;
@@ -423,12 +426,12 @@ _plugins_init(const Evry_API *_api)
return EINA_FALSE;
_plug = EVRY_PLUGIN_BASE(N_("Windows"), "preferences-system-windows",
- EVRY_TYPE_BORDER, _begin, _finish, _fetch);
+ EVRY_TYPE_CLIENT, _begin, _finish, _fetch);
_plug->transient = EINA_TRUE;
evry->plugin_register(_plug, EVRY_PLUGIN_SUBJECT, 2);
act = EVRY_ACTION_NEW(N_("Switch to Window"),
- EVRY_TYPE_BORDER, 0, "go-next",
+ EVRY_TYPE_CLIENT, 0, "go-next",
_act_border, _check_border);
EVRY_ITEM_DATA_INT_SET(act, BORDER_SHOW);
evry->action_register(act, 1);
@@ -436,28 +439,28 @@ _plugins_init(const Evry_API *_api)
_actions = eina_list_append(_actions, act);
act = EVRY_ACTION_NEW(N_("Iconify"),
- EVRY_TYPE_BORDER, 0, "go-down",
+ EVRY_TYPE_CLIENT, 0, "go-down",
_act_border, _check_border);
EVRY_ITEM_DATA_INT_SET(act, BORDER_HIDE);
_actions = eina_list_append(_actions, act);
evry->action_register(act, 2);
act = EVRY_ACTION_NEW(N_("Toggle Fullscreen"),
- EVRY_TYPE_BORDER, 0, "view-fullscreen",
+ EVRY_TYPE_CLIENT, 0, "view-fullscreen",
_act_border, _check_border);
EVRY_ITEM_DATA_INT_SET(act, BORDER_FULLSCREEN);
_actions = eina_list_append(_actions, act);
evry->action_register(act, 4);
act = EVRY_ACTION_NEW(N_("Close"),
- EVRY_TYPE_BORDER, 0, "list-remove",
+ EVRY_TYPE_CLIENT, 0, "list-remove",
_act_border, _check_border);
EVRY_ITEM_DATA_INT_SET(act, BORDER_CLOSE);
_actions = eina_list_append(_actions, act);
evry->action_register(act, 3);
act = EVRY_ACTION_NEW(N_("Send to Desktop"),
- EVRY_TYPE_BORDER, 0, "go-previous",
+ EVRY_TYPE_CLIENT, 0, "go-previous",
_act_border, _check_border);
EVRY_ITEM_DATA_INT_SET(act, BORDER_TODESK);
_actions = eina_list_append(_actions, act);
diff --git a/src/modules/fileman/e_fwin.c b/src/modules/fileman/e_fwin.c
index ca7bf16515..fe4beae98a 100644
--- a/src/modules/fileman/e_fwin.c
+++ b/src/modules/fileman/e_fwin.c
@@ -44,7 +44,7 @@ struct _E_Fwin
Ecore_Job *popup_del_job;
Eina_List *popup_handlers;
E_Fm2_Icon_Info *popup_icon;
- E_Popup *popup;
+ Evas_Object *popup;
Ecore_Timer *spring_timer;
Ecore_Timer *spring_close_timer;
@@ -104,7 +104,7 @@ 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_Container *con,
+static E_Fwin *_e_fwin_new(E_Comp *comp,
const char *dev,
const char *path);
static void _e_fwin_free(E_Fwin *fwin);
@@ -229,16 +229,31 @@ static void _e_fwin_op_registry_abort_cb(void *data,
static E_Fwin *drag_fwin = NULL;
+static E_Client_Hook *focus_out_hook = NULL;
+
/* local subsystem globals */
static Eina_List *fwins = NULL;
static E_Fm2_Mime_Handler *dir_handler = NULL;
static Efreet_Desktop *tdesktop = NULL;
static Eina_Stringshare *fwin_class = NULL;
+static void
+_e_fwin_client_hook_focus_unset(void *d EINA_UNUSED, E_Client *ec)
+{
+ E_Fwin *fwin;
+
+ /* if there is no new focused, set focus to zone fwin */
+ if (e_client_focused_get()) return;
+ fwin = e_fwin_zone_find(ec->zone);
+ if (fwin)
+ evas_object_focus_set(fwin->cur_page->fm_obj, 1);
+}
+
/* externally accessible functions */
int
e_fwin_init(void)
{
+ focus_out_hook = e_client_hook_add(E_CLIENT_HOOK_FOCUS_UNSET, _e_fwin_client_hook_focus_unset, NULL);
fwin_class = eina_stringshare_add("e_fwin");
tdesktop = e_util_terminal_desktop_get();
if (!tdesktop) return 1;
@@ -276,11 +291,11 @@ e_fwin_shutdown(void)
* "fwin" window
*/
void
-e_fwin_new(E_Container *con,
+e_fwin_new(E_Comp *comp,
const char *dev,
const char *path)
{
- _e_fwin_new(con, dev, path);
+ _e_fwin_new(comp, dev, path);
}
static Eina_Bool
@@ -434,7 +449,7 @@ e_fwin_zone_new(E_Zone *zone, void *p)
fwins = eina_list_append(fwins, fwin);
- o = e_fm2_add(zone->container->bg_evas);
+ o = e_fm2_add(zone->comp->evas);
evas_object_event_callback_add(o, EVAS_CALLBACK_DEL, _e_fwin_zone_shutdown, fwin);
page->fm_obj = o;
_e_fwin_config_set(page);
@@ -462,9 +477,10 @@ e_fwin_zone_new(E_Zone *zone, void *p)
evas_object_smart_callback_add(o, "icon_mouse_out", (Evas_Smart_Cb)_e_fwin_icon_mouse_out, fwin);
e_fm2_icon_menu_start_extend_callback_set(o, _e_fwin_cb_menu_extend_start, page);
e_fm2_underlay_hide(o);
+ evas_object_focus_set(o, !e_client_focused_get());
evas_object_show(o);
- o = e_scrollframe_add(zone->container->bg_evas);
+ o = e_scrollframe_add(zone->comp->evas);
e_scrollframe_custom_theme_set(o, "base/theme/fileman",
"e/fileman/desktop/scrollframe");
/* FIXME: this theme object will have more versions and options later
@@ -496,13 +512,12 @@ e_fwin_zone_new(E_Zone *zone, void *p)
evas_object_move(o, x, y);
evas_object_resize(o, w, h);
evas_object_show(o);
- E_LAYER_SET_UNDER(o, E_COMP_CANVAS_LAYER_DESKTOP);
+ evas_object_layer_set(o, E_LAYER_DESKTOP);
+ evas_object_lower(o);
page->scrollframe_obj = page->scr = o;
e_fm2_window_object_set(page->fm_obj, E_OBJECT(fwin->zone));
- evas_object_focus_set(page->fm_obj, 1);
-
e_fm2_path_set(page->fm_obj, path->dev, path->path);
fwin->cur_page = page;
@@ -544,9 +559,8 @@ _e_fwin_cb_toolbar_del(void *obj)
void
e_fwin_reload_all(void)
{
- Eina_List *l, *ll, *lll;
- E_Container *con;
- E_Manager *man;
+ const Eina_List *l, *ll;
+ E_Comp *comp;
E_Fwin *fwin;
E_Zone *zone;
@@ -607,25 +621,24 @@ e_fwin_reload_all(void)
}
/* Hook into zones */
- EINA_LIST_FOREACH(e_manager_list(), l, man)
- EINA_LIST_FOREACH(man->containers, ll, con)
- EINA_LIST_FOREACH(con->zones, lll, zone)
- {
- if (e_fwin_zone_find(zone)) continue;
- if (e_config->show_desktop_icons)
- e_fwin_zone_new(zone, e_mod_fileman_path_find(zone));
- }
+ EINA_LIST_FOREACH(e_comp_list(), l, comp)
+ EINA_LIST_FOREACH(comp->zones, ll, zone)
+ {
+ if (e_fwin_zone_find(zone)) continue;
+ if (e_config->show_desktop_icons)
+ e_fwin_zone_new(zone, e_mod_fileman_path_find(zone));
+ }
}
-int
+void *
e_fwin_zone_find(E_Zone *zone)
{
Eina_List *f;
E_Fwin *win;
EINA_LIST_FOREACH(fwins, f, win)
- if (win->zone == zone) return 1;
- return 0;
+ if (win->zone == zone) return win;
+ return NULL;
}
/* local subsystem functions */
@@ -634,10 +647,10 @@ _e_fwin_bg_mouse_down(E_Fwin *fwin, Evas_Object *obj __UNUSED__, void *event __U
{
int x, y, w, h, zx, zy, zw, zh, cx, cy, cw, ch;
- if (fwin->win->border->maximized) e_border_unmaximize(fwin->win->border, fwin->win->border->maximized);
- if (fwin->win->border->fullscreen) e_border_unfullscreen(fwin->win->border);
- e_zone_useful_geometry_get(fwin->win->border->zone, &zx, &zy, &zw, &zh);
- x = fwin->win->border->x, y = fwin->win->border->y;
+ 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 (!e_fm2_optimal_size_calc(fwin->cur_page->fm_obj, zw - x, zh - y, &w, &h)) return;
evas_object_geometry_get(fwin->cur_page->fm_obj, &cx, &cy, &cw, &ch);
if (x + w > zx + zw)
@@ -650,7 +663,7 @@ _e_fwin_bg_mouse_down(E_Fwin *fwin, Evas_Object *obj __UNUSED__, void *event __U
}
static E_Fwin *
-_e_fwin_new(E_Container *con,
+_e_fwin_new(E_Comp *comp,
const char *dev,
const char *path)
{
@@ -661,7 +674,7 @@ _e_fwin_new(E_Container *con,
fwin = E_OBJECT_ALLOC(E_Fwin, E_FWIN_TYPE, _e_fwin_free);
if (!fwin) return NULL;
- fwin->win = e_win_new(con);
+ fwin->win = e_win_new(comp);
if (!fwin->win)
{
free(fwin);
@@ -719,8 +732,8 @@ _e_fwin_new(E_Container *con,
e_win_show(fwin->win);
if (fwin->win->evas_win)
e_drop_xdnd_register_set(fwin->win->evas_win, 1);
- if (fwin->win->border)
- eina_stringshare_replace(&fwin->win->border->internal_icon,
+ if (fwin->win->client)
+ eina_stringshare_replace(&fwin->win->client->internal_icon,
"system-file-manager");
return fwin;
@@ -756,7 +769,7 @@ _e_fwin_free(E_Fwin *fwin)
fwin->fad = NULL;
}
if (fwin->popup_del_job) ecore_job_del(fwin->popup_del_job);
- if (fwin->popup) e_object_del(E_OBJECT(fwin->popup));
+ if (fwin->popup) evas_object_del(fwin->popup);
if (fwin->popup_timer) ecore_timer_del(fwin->popup_timer);
fwin->popup_timer = NULL;
E_FREE_LIST(fwin->popup_handlers, ecore_event_handler_del);
@@ -774,19 +787,19 @@ _e_fwin_icon_popup_handler(void *data, int type, void *event)
E_Fwin *fwin = data;
Ecore_Event_Mouse_IO *ev = event;
- if (type == ECORE_X_EVENT_MOUSE_IN)
+ if (type == ECORE_EVENT_MOUSE_IN)
{
if (fwin->zone)
{
- if (ev->event_window == fwin->zone->container->event_win) return ECORE_CALLBACK_RENEW;
+ if (ev->event_window == fwin->zone->comp->ee_win) return ECORE_CALLBACK_RENEW;
}
else
{
- if (ev->event_window == fwin->win->border->client.win) return ECORE_CALLBACK_RENEW;
+ if (ev->event_window == e_client_util_win_get(fwin->win->client)) return ECORE_CALLBACK_RENEW;
}
}
if (fwin->popup_timer) ecore_timer_del(fwin->popup_timer);
- if (fwin->popup) e_object_del(E_OBJECT(fwin->popup));
+ if (fwin->popup) evas_object_del(fwin->popup);
E_FREE_LIST(fwin->popup_handlers, ecore_event_handler_del);
fwin->popup_icon = NULL;
fwin->popup_timer = NULL;
@@ -807,23 +820,19 @@ _e_fwin_icon_popup(void *data)
if (!fwin->popup_icon) return EINA_FALSE;
snprintf(buf, sizeof(buf), "%s/%s", e_fm2_real_path_get(fwin->cur_page->fm_obj), fwin->popup_icon->file);
if (!ecore_file_can_read(buf)) return EINA_FALSE;
- if (fwin->popup) e_object_del(E_OBJECT(fwin->popup));
- zone = fwin->zone ?: fwin->win->border->zone;
- e_fm2_icon_geometry_get(fwin->popup_icon->ic, &x, &y, &w, &h);
- if (fwin->zone)
+ if (fwin->popup)
{
- evas_object_geometry_get(fwin->popup_icon->fm, &fx, &fy, NULL, NULL);
- fx -= fwin->zone->x;
- x -= fwin->zone->x;
- fy -= fwin->zone->y;
- y -= fwin->zone->y;
+ evas_object_hide(fwin->popup);
+ evas_object_del(fwin->popup);
}
+ zone = fwin->zone ?: fwin->win->client->zone;
+ e_fm2_icon_geometry_get(fwin->popup_icon->ic, &x, &y, &w, &h);
+ if (fwin->zone)
+ evas_object_geometry_get(fwin->popup_icon->fm, &fx, &fy, NULL, NULL);
else
- fx = fwin->win->border->x, fy = fwin->win->border->y;
- fwin->popup = e_popup_new(eina_list_data_get(zone->container->zones), 0, 0, 1, 1);
- e_popup_ignore_events_set(fwin->popup, 1);
+ fx = fwin->win->client->x, fy = fwin->win->client->y;
- bg = edje_object_add(fwin->popup->evas);
+ bg = edje_object_add(e_comp_get(zone)->evas);
e_theme_edje_object_set(bg, "base/theme/fileman",
"e/fileman/popup/default");
mw = zone->w * fileman_config->tooltip.size / 100.0;
@@ -833,9 +842,9 @@ _e_fwin_icon_popup(void *data)
fwin->popup_icon->label ?
fwin->popup_icon->label : fwin->popup_icon->file);
- list = e_widget_list_add(fwin->popup->evas, 0, 0);
+ list = e_widget_list_add(e_comp_get(zone)->evas, 0, 0);
- o = e_widget_filepreview_add(fwin->popup->evas, mw, mh, 0);
+ o = e_widget_filepreview_add(e_comp_get(zone)->evas, mw, mh, 0);
e_widget_filepreview_path_set(o, buf, fwin->popup_icon->mime);
e_widget_list_object_append(list, o, 1, 0, 0.5);
e_widget_size_min_get(list, &mw, &mh);
@@ -843,7 +852,6 @@ _e_fwin_icon_popup(void *data)
edje_object_part_swallow(bg, "e.swallow.content", list);
edje_object_size_min_calc(bg, &mw, &mh);
- e_popup_object_add(fwin->popup, list);
/* prefer tooltip left of icon */
px = (fx + x) - mw - 3;
@@ -864,8 +872,12 @@ _e_fwin_icon_popup(void *data)
py = (y + h / 2) - (mh / 2);
/* give up */
if (py < 0) py = 0;
- e_popup_move_resize(fwin->popup, px, py, mw, mh);
- e_popup_content_set(fwin->popup, bg);
+ fwin->popup = e_comp_object_util_add(bg, E_COMP_OBJECT_TYPE_POPUP);
+ evas_object_layer_set(fwin->popup, E_LAYER_POPUP);
+ evas_object_geometry_set(fwin->popup, px, py, mw, mh);
+ e_comp_object_util_del_list_append(fwin->popup, list);
+ e_comp_object_util_del_list_append(fwin->popup, o);
+ evas_object_pass_events_set(fwin->popup, 1);
if (!fwin->popup_handlers)
{
E_LIST_HANDLER_APPEND(fwin->popup_handlers, ECORE_X_EVENT_XDND_ENTER, _e_fwin_icon_popup_handler, fwin);
@@ -874,14 +886,15 @@ _e_fwin_icon_popup(void *data)
E_LIST_HANDLER_APPEND(fwin->popup_handlers, ECORE_EVENT_MOUSE_BUTTON_DOWN, _e_fwin_icon_popup_handler, fwin);
E_LIST_HANDLER_APPEND(fwin->popup_handlers, ECORE_X_EVENT_MOUSE_OUT, _e_fwin_icon_popup_handler, fwin);
}
- e_popup_show(fwin->popup);
+ evas_object_show(fwin->popup);
return EINA_FALSE;
}
static void
_e_fwin_icon_popup_del(E_Fwin *fwin)
{
- E_FREE_FUNC(fwin->popup, e_object_del);
+ evas_object_hide(fwin->popup);
+ E_FREE_FUNC(fwin->popup, evas_object_del);
fwin->popup_del_job = NULL;
}
@@ -1313,7 +1326,7 @@ _e_fwin_desktop_run(Efreet_Desktop *desktop,
}
if ((fwin->win) && (desktop))
{
- e_exec(fwin->win->border->zone, desktop, NULL, files, "fwin");
+ e_exec(fwin->win->client->zone, desktop, NULL, files, "fwin");
ici = selected->data;
if ((ici) && (ici->mime) && (desktop) && !(skip_history))
e_exehist_mime_desktop_add(ici->mime, desktop);
@@ -1415,7 +1428,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->border->zone, NULL, buf, NULL, "fwin");
+ e_exec(fwin->win->client->zone, NULL, buf, NULL, "fwin");
else if (fwin->zone)
e_exec(fwin->zone, NULL, buf, NULL, "fwin");
break;
@@ -1423,7 +1436,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->border->zone, NULL, buf, NULL, "fwin");
+ e_exec(fwin->win->client->zone, NULL, buf, NULL, "fwin");
else if (fwin->zone)
e_exec(fwin->zone, NULL, buf, NULL, "fwin");
break;
@@ -1431,7 +1444,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->border->zone, NULL, buf, NULL, "fwin");
+ e_exec(fwin->win->client->zone, NULL, buf, NULL, "fwin");
else if (fwin->zone)
e_exec(fwin->zone, NULL, buf, NULL, "fwin");
break;
@@ -1439,7 +1452,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->border->zone, NULL, buf, NULL, "fwin");
+ e_exec(fwin->win->client->zone, NULL, buf, NULL, "fwin");
else if (fwin->zone)
e_exec(fwin->zone, NULL, buf, NULL, "fwin");
break;
@@ -1450,7 +1463,7 @@ _e_fwin_file_exec(E_Fwin_Page *page,
if (desktop)
{
if (fwin->win)
- e_exec(fwin->win->border->zone, desktop, NULL, NULL, "fwin");
+ e_exec(fwin->win->client->zone, desktop, NULL, NULL, "fwin");
else if (fwin->zone)
e_exec(fwin->zone, desktop, NULL, NULL, "fwin");
e_exehist_mime_desktop_add(ici->mime, desktop);
@@ -1645,7 +1658,7 @@ _e_fwin_cb_resize(E_Win *win)
}
_e_fwin_toolbar_resize(fwin->cur_page);
if (fwin->zone)
- e_comp_win_resize(evas_object_data_get(fwin->cur_page->scrollframe_obj, "comp_win"), fwin->zone->w, fwin->zone->h);
+ evas_object_resize(fwin->cur_page->scrollframe_obj, fwin->zone->w, fwin->zone->h);
/* _e_fwin_geom_save(fwin); */
}
@@ -1891,12 +1904,12 @@ _e_fwin_cb_key_down(void *data,
{
if (!strcmp(ev->key, "n"))
{
- E_Container *con;
+ E_Comp *comp;
const char *dev, *path;
- con = e_container_current_get(e_manager_current_get());
+ comp = e_util_comp_current_get();
e_fm2_path_get(page->fm_obj, &dev, &path);
- e_fwin_new(con, dev, path);
+ e_fwin_new(comp, dev, path);
return;
}
if (!strcmp(ev->key, "w"))
@@ -1954,7 +1967,6 @@ _e_fwin_zone_move_resize(void *data, int type __UNUSED__, void *event)
{
E_Event_Zone_Move_Resize *ev = event;
E_Fwin *fwin = data;
- E_Comp_Win *cw;
int x, y, w, h, sx, sy, sw, sh;
if (!fwin) return ECORE_CALLBACK_PASS_ON;
@@ -1964,8 +1976,7 @@ _e_fwin_zone_move_resize(void *data, int type __UNUSED__, void *event)
evas_object_geometry_get(fwin->cur_page->scrollframe_obj, &sx, &sy, &sw, &sh);
/* if same, do nothing */
if ((sx == x) && (sy == y) && (sw == w) && (sh == h)) return ECORE_CALLBACK_RENEW;
- cw = evas_object_data_get(fwin->cur_page->scrollframe_obj, "comp_win");
- e_comp_win_moveresize(cw, x, y, w, h);
+ evas_object_geometry_set(fwin->cur_page->scrollframe_obj, x, y, w, h);
e_fm2_refresh(fwin->cur_page->fm_obj);
return ECORE_CALLBACK_RENEW;
}
@@ -2092,9 +2103,9 @@ _e_fwin_path(void *data, E_Menu *m __UNUSED__, E_Menu_Item *mi __UNUSED__)
path = e_fm2_real_path_get(data);
page = evas_object_data_get(data, "fm_page");
if (page->fwin->win)
- xwin = page->fwin->win->border->client.win;
+ xwin = e_client_util_win_get(page->fwin->win->client);
else
- xwin = page->fwin->zone->container->event_win;
+ xwin = page->fwin->zone->comp->ee_win;
ecore_x_selection_clipboard_set(xwin, path, strlen(path) + 1);
}
@@ -2107,7 +2118,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->border->client.icccm.class + 8);
+ act_fm->func.go(NULL, fwin->win->client->icccm.class + 8);
}
static void
@@ -2243,28 +2254,28 @@ _e_fwin_border_set(E_Fwin_Page *page, E_Fwin *fwin, E_Fm2_Icon_Info *ici)
ici->ic, NULL, NULL, 0, &itype);
if (!oic) return;
- eina_stringshare_replace(&fwin->win->border->internal_icon, NULL);
- eina_stringshare_replace(&fwin->win->border->internal_icon_key, NULL);
+ eina_stringshare_replace(&fwin->win->client->internal_icon, NULL);
+ eina_stringshare_replace(&fwin->win->client->internal_icon_key, NULL);
if (!strcmp(evas_object_type_get(oic), "edje"))
{
edje_object_file_get(oic, &file, &group);
- fwin->win->border->internal_icon = eina_stringshare_ref(file);
- fwin->win->border->internal_icon_key = eina_stringshare_ref(group);
+ fwin->win->client->internal_icon = eina_stringshare_ref(file);
+ fwin->win->client->internal_icon_key = eina_stringshare_ref(group);
}
else
{
e_icon_file_get(oic, &file, &group);
- fwin->win->border->internal_icon = eina_stringshare_ref(file);
- fwin->win->border->internal_icon_key = eina_stringshare_ref(group);
+ fwin->win->client->internal_icon = eina_stringshare_ref(file);
+ fwin->win->client->internal_icon_key = eina_stringshare_ref(group);
}
evas_object_del(oic);
- if (fwin->win->border->placed) return;
+ if (fwin->win->client->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->border->zone,
+ e_zone_useful_geometry_get(fwin->win->client->zone,
NULL, NULL, &zw, &zh);
EINA_LIST_FOREACH(e_config->remembers, ll, rem)
if (rem->class == class)
@@ -2303,13 +2314,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->border->zone->x + fwin->win->border->zone->w) < (w + nx))
+ if ((fwin->win->client->zone->x + fwin->win->client->zone->w) < (w + nx))
nx -= w;
- if ((fwin->win->border->zone->y + fwin->win->border->zone->h) < (h + ny))
+ if ((fwin->win->client->zone->y + fwin->win->client->zone->h) < (h + ny))
ny -= h;
e_win_move_resize(fwin->win, nx, ny, w, h);
- fwin->win->border->placed = 1;
+ fwin->win->client->placed = 1;
}
static E_Fwin *
@@ -2326,9 +2337,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->container, ici->link, "/");
+ fwin = _e_fwin_new(page->fwin->win->comp, ici->link, "/");
else if (page->fwin->zone)
- fwin = _e_fwin_new(page->fwin->zone->container, ici->link, "/");
+ fwin = _e_fwin_new(page->fwin->zone->comp, ici->link, "/");
}
else
{
@@ -2343,9 +2354,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->container, buf, "/");
+ fwin = _e_fwin_new(page->fwin->win->comp, buf, "/");
else if (page->fwin->zone)
- fwin = _e_fwin_new(page->fwin->zone->container, buf, "/");
+ fwin = _e_fwin_new(page->fwin->zone->comp, buf, "/");
}
else
{
@@ -2361,9 +2372,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->container, NULL, ici->real_link);
+ fwin = _e_fwin_new(page->fwin->win->comp, NULL, ici->real_link);
else if (page->fwin->zone)
- fwin = _e_fwin_new(page->fwin->zone->container, NULL, ici->real_link);
+ fwin = _e_fwin_new(page->fwin->zone->comp, NULL, ici->real_link);
}
else
{
@@ -2385,9 +2396,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->container, NULL, ici->link ?: buf);
+ fwin = _e_fwin_new(page->fwin->win->comp, NULL, ici->link ?: buf);
else if (page->fwin->zone)
- fwin = _e_fwin_new(page->fwin->zone->container, NULL, ici->link ?: buf);
+ fwin = _e_fwin_new(page->fwin->zone->comp, NULL, ici->link ?: buf);
}
else
{
@@ -2402,7 +2413,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->border))
+ if ((!fwin->win) || (!fwin->win->client))
{
_e_fwin_free(fwin);
return NULL;
@@ -2503,7 +2514,7 @@ _e_fwin_file_open_dialog(E_Fwin_Page *page,
{
if (fwin->win)
{
- if (e_exec(fwin->win->border->zone, desk, NULL, files_list, "fwin"))
+ if (e_exec(fwin->win->client->zone, desk, NULL, files_list, "fwin"))
need_dia = 0;
}
else if (fwin->zone)
@@ -2531,10 +2542,10 @@ _e_fwin_file_open_dialog(E_Fwin_Page *page,
}
if (fwin->win)
- dia = e_dialog_new(fwin->win->border->zone->container,
+ dia = e_dialog_new(fwin->win->comp,
"E", "_fwin_open_apps");
else if (fwin->zone)
- dia = e_dialog_new(fwin->zone->container,
+ dia = e_dialog_new(fwin->zone->comp,
"E", "_fwin_open_apps");
else return; /* make clang happy */
diff --git a/src/modules/fileman/e_fwin_nav.c b/src/modules/fileman/e_fwin_nav.c
index fffcd19803..898c95cb6d 100644
--- a/src/modules/fileman/e_fwin_nav.c
+++ b/src/modules/fileman/e_fwin_nav.c
@@ -514,7 +514,7 @@ _cb_mouse_down(void *data, Evas *e __UNUSED__, Evas_Object *obj __UNUSED__, void
m = e_menu_new();
m = e_gadcon_client_util_menu_items_append(inst->gcc, m, 0);
- ecore_x_pointer_xy_get(zone->container->win, &x, &y);
+ ecore_x_pointer_xy_get(zone->comp->win, &x, &y);
e_menu_activate_mouse(m, zone, x, y, 1, 1,
E_MENU_POP_DIRECTION_AUTO, ev->timestamp);
evas_event_feed_mouse_up(inst->gcc->gadcon->evas, ev->button,
diff --git a/src/modules/fileman/e_int_config_mime.c b/src/modules/fileman/e_int_config_mime.c
index a552f5259b..f992cb3424 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_Container *con, const char *params __UNUSED__)
+e_int_config_mime(E_Comp *comp, const char *params __UNUSED__)
{
E_Config_Dialog *cfd;
E_Config_Dialog_View *v;
@@ -57,7 +57,7 @@ e_int_config_mime(E_Container *con, const char *params __UNUSED__)
v->free_cfdata = _free_data;
v->basic.create_widgets = _basic_create;
- cfd = e_config_dialog_new(con, _("File Icons"), "E", "fileman/file_icons",
+ cfd = e_config_dialog_new(comp, _("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 63f98500da..24b876dc67 100644
--- a/src/modules/fileman/e_int_config_mime_edit.c
+++ b/src/modules/fileman/e_int_config_mime_edit.c
@@ -49,7 +49,6 @@ e_int_config_mime_edit(E_Config_Mime_Icon *data, void *data2)
{
E_Config_Dialog *cfd;
E_Config_Dialog_View *v;
- E_Container *con;
E_Config_Dialog_Data *cfdata;
if (e_config_dialog_find("E", "fileman/mime_edit_dialog")) return NULL;
@@ -57,7 +56,6 @@ e_int_config_mime_edit(E_Config_Mime_Icon *data, void *data2)
cfdata = E_NEW(E_Config_Dialog_Data, 1);
cfdata->data = data;
cfdata->data2 = data2;
- con = e_container_current_get(e_manager_current_get());
v = E_NEW(E_Config_Dialog_View, 1);
v->create_cfdata = _create_data;
@@ -66,7 +64,7 @@ e_int_config_mime_edit(E_Config_Mime_Icon *data, void *data2)
v->basic.check_changed = _basic_check;
v->basic.apply_cfdata = _basic_apply;
- cfd = e_config_dialog_new(con, _("File Icon"), "E",
+ cfd = e_config_dialog_new(NULL, _("File Icon"), "E",
"fileman/mime_edit_dialog",
"preferences-file-icons", 0, v, cfdata);
return cfd;
@@ -293,7 +291,7 @@ _cb_icon_sel(void *data, void *data2)
cfd = data2;
if (!cfd) return;
- dia = e_dialog_new(cfd->con, "E", "_mime_icon_select_dialog");
+ dia = e_dialog_new(cfd->comp, "E", "_mime_icon_select_dialog");
if (!dia) return;
if (cfdata->type == EDJ)
e_dialog_title_set(dia, _("Select an Edje file"));
diff --git a/src/modules/fileman/e_mod_config.c b/src/modules/fileman/e_mod_config.c
index bce0193c85..6ec2c71a59 100644
--- a/src/modules/fileman/e_mod_config.c
+++ b/src/modules/fileman/e_mod_config.c
@@ -105,8 +105,7 @@ static Evas_Object *_basic_create(E_Config_Dialog *cfd,
E_Config_Dialog_Data *cfdata);
E_Config_Dialog *
-e_int_config_fileman(E_Container *con,
- const char *params __UNUSED__)
+e_int_config_fileman(E_Comp *comp, const char *params __UNUSED__)
{
E_Config_Dialog *cfd;
E_Config_Dialog_View *v;
@@ -119,7 +118,7 @@ e_int_config_fileman(E_Container *con,
v->basic.create_widgets = _basic_create;
v->basic.check_changed = _basic_check_changed;
- cfd = e_config_dialog_new(con, _("File Manager Settings"), "E",
+ cfd = e_config_dialog_new(comp, _("File Manager Settings"), "E",
"fileman/fileman",
"system-file-manager", 0, v, NULL);
return cfd;
diff --git a/src/modules/fileman/e_mod_dbus.c b/src/modules/fileman/e_mod_dbus.c
index 28ad61ca5e..f9f79f90c4 100644
--- a/src/modules/fileman/e_mod_dbus.c
+++ b/src/modules/fileman/e_mod_dbus.c
@@ -120,7 +120,7 @@ _e_fileman_dbus_daemon_open_directory_cb(const Eldbus_Service_Interface *iface _
directory = "/";
}
- e_fwin_new(zone->container, dev, directory);
+ e_fwin_new(zone->comp, dev, directory);
free(dev);
free(to_free);
return eldbus_message_method_return_new(msg);
diff --git a/src/modules/fileman/e_mod_main.c b/src/modules/fileman/e_mod_main.c
index ecb96ec4e8..2ade38014b 100644
--- a/src/modules/fileman/e_mod_main.c
+++ b/src/modules/fileman/e_mod_main.c
@@ -30,9 +30,8 @@ EAPI E_Module_Api e_modapi =
EAPI void *
e_modapi_init(E_Module *m)
{
- Eina_List *l, *ll, *lll;
- E_Manager *man;
- E_Container *con;
+ const Eina_List *l, *ll;
+ E_Comp *comp;
E_Zone *zone;
conf_module = m;
@@ -66,21 +65,13 @@ e_modapi_init(E_Module *m)
e_fwin_init();
/* Hook into zones */
- for (l = e_manager_list(); l; l = l->next)
- {
- man = l->data;
- for (ll = man->containers; ll; ll = ll->next)
- {
- con = ll->data;
- for (lll = con->zones; lll; lll = lll->next)
- {
- zone = lll->data;
- if (e_fwin_zone_find(zone)) continue;
- if (e_config->show_desktop_icons)
- e_fwin_zone_new(zone, e_mod_fileman_path_find(zone));
- }
- }
- }
+ EINA_LIST_FOREACH(e_comp_list(), l, comp)
+ EINA_LIST_FOREACH(comp->zones, ll, zone)
+ {
+ if (e_fwin_zone_find(zone)) continue;
+ if (e_config->show_desktop_icons)
+ e_fwin_zone_new(zone, e_mod_fileman_path_find(zone));
+ }
zone_add_handler = ecore_event_handler_add(E_EVENT_ZONE_ADD,
_e_mod_zone_add, NULL);
@@ -96,9 +87,8 @@ e_modapi_init(E_Module *m)
EAPI int
e_modapi_shutdown(E_Module *m __UNUSED__)
{
- Eina_List *l, *ll, *lll;
- E_Manager *man;
- E_Container *con;
+ const Eina_List *l, *ll;
+ E_Comp *comp;
E_Zone *zone;
E_Config_Dialog *cfd;
@@ -108,20 +98,9 @@ e_modapi_shutdown(E_Module *m __UNUSED__)
zone_add_handler = NULL;
/* Unhook zone fm */
- for (l = e_manager_list(); l; l = l->next)
- {
- man = l->data;
- for (ll = man->containers; ll; ll = ll->next)
- {
- con = ll->data;
- for (lll = con->zones; lll; lll = lll->next)
- {
- zone = lll->data;
- if (!zone) continue;
- e_fwin_zone_shutdown(zone);
- }
- }
- }
+ EINA_LIST_FOREACH(e_comp_list(), l, comp)
+ EINA_LIST_FOREACH(comp->zones, ll, zone)
+ e_fwin_zone_shutdown(zone);
e_fwin_nav_shutdown();
@@ -191,32 +170,32 @@ _e_mod_action_fileman_cb(E_Object *obj,
{
if (obj->type == E_MANAGER_TYPE)
zone = e_util_zone_current_get((E_Manager *)obj);
- else if (obj->type == E_CONTAINER_TYPE)
- zone = e_util_zone_current_get(((E_Container *)obj)->manager);
+ else if (obj->type == E_COMP_TYPE)
+ zone = e_zone_current_get((E_Comp *)obj);
else if (obj->type == E_ZONE_TYPE)
- zone = e_util_zone_current_get(((E_Zone *)obj)->container->manager);
+ zone = e_zone_current_get(((E_Zone *)obj)->comp);
else
- zone = e_util_zone_current_get(e_manager_current_get());
+ zone = e_zone_current_get(e_comp_get(NULL));
}
if (!zone) zone = e_util_zone_current_get(e_manager_current_get());
if (zone)
{
if (params && params[0] == '/')
- e_fwin_new(zone->container, "/", params);
+ e_fwin_new(zone->comp, "/", params);
else if (params && params[0] == '~')
- e_fwin_new(zone->container, "~/", params + 1);
+ e_fwin_new(zone->comp, "~/", params + 1);
else if (params && strcmp(params, "(none)")) /* avoid matching paths that no longer exist */
{
char *path;
path = e_util_shell_env_path_eval(params);
if (path)
{
- e_fwin_new(zone->container, path, "/");
+ e_fwin_new(zone->comp, path, "/");
free(path);
}
}
else
- e_fwin_new(zone->container, "favorites", "/");
+ e_fwin_new(zone->comp, "favorites", "/");
}
}
@@ -375,7 +354,7 @@ e_mod_fileman_path_find(E_Zone *zone)
Fileman_Path *path;
EINA_LIST_FOREACH(fileman_config->paths, l, path)
- if (path->zone == zone->container->num + zone->num) break;
+ if (path->zone == zone->comp->num + zone->num) break;
if (l && fileman_config->view.desktop_navigation) return path;
if (l)
{
@@ -385,14 +364,14 @@ e_mod_fileman_path_find(E_Zone *zone)
else
{
path = E_NEW(Fileman_Path, 1);
- path->zone = zone->container->num + zone->num;
+ path->zone = zone->comp->num + zone->num;
path->dev = eina_stringshare_add("desktop");
fileman_config->paths = eina_list_append(fileman_config->paths, path);
path->desktop_mode = E_FM2_VIEW_MODE_CUSTOM_ICONS;
}
- if ((zone->container->num == 0) && (zone->num == 0))
+ if ((zone->comp->num == 0) && (zone->num == 0))
path->path = eina_stringshare_add("/");
else
- path->path = eina_stringshare_printf("%d", (zone->container->num + zone->num));
+ path->path = eina_stringshare_printf("%d", (zone->comp->num + zone->num));
return path;
}
diff --git a/src/modules/fileman/e_mod_main.h b/src/modules/fileman/e_mod_main.h
index d5eccee9e9..ea36267e3e 100644
--- a/src/modules/fileman/e_mod_main.h
+++ b/src/modules/fileman/e_mod_main.h
@@ -109,9 +109,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_Container *con, const char *params __UNUSED__);
+E_Config_Dialog *e_int_config_fileman(E_Comp *comp, 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_Container *con, const char *params __UNUSED__);
+E_Config_Dialog *e_int_config_mime(E_Comp *comp, const char *params __UNUSED__);
void e_int_config_mime_edit_done(void *data);
void e_fileman_dbus_init(void);
@@ -119,12 +119,12 @@ void e_fileman_dbus_shutdown(void);
int e_fwin_init (void);
int e_fwin_shutdown (void);
-void e_fwin_new (E_Container *con, const char *dev, const char *path);
+void e_fwin_new (E_Comp *comp, const char *dev, const char *path);
void e_fwin_zone_new (E_Zone *zone, void *path);
void e_fwin_zone_shutdown (E_Zone *zone);
void e_fwin_all_unsel (void *data);
void e_fwin_reload_all (void);
-int e_fwin_zone_find (E_Zone *zone);
+void *e_fwin_zone_find (E_Zone *zone);
Eina_Bool e_fwin_nav_init(void);
Eina_Bool e_fwin_nav_shutdown(void);
diff --git a/src/modules/fileman/e_mod_menu.c b/src/modules/fileman/e_mod_menu.c
index b98306e0ff..fc81cf588d 100644
--- a/src/modules/fileman/e_mod_menu.c
+++ b/src/modules/fileman/e_mod_menu.c
@@ -27,7 +27,7 @@ _e_mod_menu_gtk_cb(void *data,
if (fm && ((fileman_config->view.open_dirs_in_place && evas_object_data_get(fm, "page_is_window")) ||
(fileman_config->view.desktop_navigation && evas_object_data_get(fm, "page_is_zone"))))
e_fm2_path_set(fm, NULL, data);
- else if (m->zone) e_fwin_new(m->zone->container, NULL, data);
+ else if (m->zone) e_fwin_new(m->zone->comp, NULL, data);
}
static void
@@ -43,7 +43,7 @@ _e_mod_menu_virtual_cb(void *data,
if (fm && ((fileman_config->view.open_dirs_in_place && evas_object_data_get(fm, "page_is_window")) ||
(fileman_config->view.desktop_navigation && evas_object_data_get(fm, "page_is_zone"))))
e_fm2_path_set(fm, data, path ?: "/");
- else if (m->zone) e_fwin_new(m->zone->container, data, path ?: "/");
+ else if (m->zone) e_fwin_new(m->zone->comp, data, path ?: "/");
}
static void
@@ -62,7 +62,7 @@ _e_mod_menu_volume_cb(void *data,
(fileman_config->view.desktop_navigation && evas_object_data_get(fm, "page_is_zone"))))
e_fm2_path_set(fm, NULL, vol->mount_point);
else if (m->zone)
- e_fwin_new(m->zone->container, NULL, vol->mount_point);
+ e_fwin_new(m->zone->comp, NULL, vol->mount_point);
}
else
{
@@ -73,7 +73,7 @@ _e_mod_menu_volume_cb(void *data,
(fileman_config->view.desktop_navigation && evas_object_data_get(fm, "page_is_zone"))))
e_fm2_path_set(fm, buf, "/");
else if (m->zone)
- e_fwin_new(m->zone->container, buf, "/");
+ e_fwin_new(m->zone->comp, buf, "/");
}
}
@@ -94,7 +94,7 @@ _e_mod_menu_populate_cb(void *data,
(fileman_config->view.desktop_navigation && evas_object_data_get(fm, "page_is_zone"))))
e_fm2_path_set(fm, data, path ?: "/");
else if (m->zone)
- e_fwin_new(m->zone->container, data, path ?: "/");
+ e_fwin_new(m->zone->comp, data, path ?: "/");
}
static void
@@ -486,7 +486,7 @@ static void
_e_mod_menu_navigate_cb(void *d EINA_UNUSED, E_Menu *m, E_Menu_Item *mi EINA_UNUSED)
{
if (m->zone)
- e_fwin_new(m->zone->container, "~/", "/");
+ e_fwin_new(m->zone->comp, "~/", "/");
}
/* returns submenu so we can add Go to Parent */
diff --git a/src/modules/fileman_opinfo/e_mod_main.c b/src/modules/fileman_opinfo/e_mod_main.c
index 2b57cff289..03056b598b 100644
--- a/src/modules/fileman_opinfo/e_mod_main.c
+++ b/src/modules/fileman_opinfo/e_mod_main.c
@@ -262,21 +262,21 @@ _opinfo_op_registry_window_jump_cb(void *data, Evas_Object *obj __UNUSED__, cons
: e_win_evas_object_win_get(ere->e_fm);
if (!win) return;
- if (win->border)
+ if (win->client)
{
- if (win->border->iconic)
- e_border_uniconify(win->border);
- if (win->border->shaded)
- e_border_unshade(win->border, win->border->shade.dir);
+ if (win->client->iconic)
+ e_client_uniconify(win->client);
+ if (win->client->shaded)
+ e_client_unshade(win->client, win->client->shade_dir);
}
else
e_win_show(win);
e_win_raise(win);
- e_desk_show(win->border->desk);
- e_border_focus_set_with_pointer(win->border);
+ e_desk_show(win->client->desk);
+ e_client_focus_set_with_pointer(win->client);
if (ere->needs_attention && e_config->pointer_slide)
- e_border_pointer_warp_to_center(win->border);
+ e_client_pointer_warp_to_center(win->client);
}
static Eina_Bool
diff --git a/src/modules/gadman/e_mod_config.c b/src/modules/gadman/e_mod_config.c
index 29f8de4bc1..f56bdc02a3 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_Container *con, const char *params __UNUSED__)
+_config_gadman_module(E_Comp *comp, const char *params __UNUSED__)
{
E_Config_Dialog *cfd;
E_Config_Dialog_View *v;
@@ -76,7 +76,7 @@ _config_gadman_module(E_Container *con, 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(con, _("Desktop Gadgets"),
+ cfd = e_config_dialog_new(comp, _("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->border->zone) continue;
+ if (gc->zone != cfdata->cfd->dia->win->client->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 0c417f4866..5e3d62e90c 100644
--- a/src/modules/gadman/e_mod_gadman.c
+++ b/src/modules/gadman/e_mod_gadman.c
@@ -60,23 +60,23 @@ gadman_reset(void *d EINA_UNUSED)
E_FREE_FUNC(gadman_reset_job, ecore_job_del);
if (gadman_locked) return;
- evas_event_freeze(e_comp_get(Man->container)->evas);
+ evas_event_freeze(Man->comp->evas);
for (layer = 0; layer < GADMAN_LAYER_COUNT; layer++)
{
E_FREE_LIST(Man->gadcons[layer], e_object_del);
Man->gadgets[layer] = eina_list_free(Man->gadgets[layer]);
E_FREE_FUNC(Man->movers[layer], evas_object_del);
}
- E_FREE_FUNC(Man->overlay, e_object_del);
+ evas_object_hide(Man->overlay);
+ E_FREE_FUNC(Man->overlay, evas_object_del);
E_FREE_FUNC(Man->full_bg, evas_object_del);
- E_FREE_FUNC(Man->overlay_layer, evas_object_del);
if (_gadman_gadgets)
{
eina_hash_free_cb_set(_gadman_gadgets, EINA_FREE_CB(eina_list_free));
eina_hash_free(_gadman_gadgets);
}
/* iterating through zones - and making gadmans on each */
- EINA_LIST_FOREACH(Man->container->zones, l, zone)
+ EINA_LIST_FOREACH(Man->comp->zones, l, zone)
{
const char *layer_name[] = {"gadman", "gadman_top"};
@@ -98,7 +98,7 @@ gadman_reset(void *d EINA_UNUSED)
Man->conf->anim_bg = prev;
}
edje_object_message_signal_process(Man->full_bg);
- evas_event_thaw(e_comp_get(Man->container)->evas);
+ evas_event_thaw(Man->comp->evas);
}
void
@@ -112,9 +112,9 @@ gadman_init(E_Module *m)
Man->module = m;
gadman_locked = e_module_loading_get();
- Man->container = e_container_current_get(e_manager_current_get());
- Man->width = Man->container->w;
- Man->height = Man->container->h;
+ Man->comp = e_util_comp_current_get();
+ Man->width = Man->comp->man->w;
+ Man->height = Man->comp->man->h;
/* create and register "desktop" location */
location = Man->location[GADMAN_LAYER_BG] = e_gadcon_location_new(_("Desktop"), E_GADCON_SITE_DESKTOP,
@@ -156,8 +156,8 @@ gadman_shutdown(void)
eina_stringshare_del(Man->icon_name);
/* free manager */
- E_FREE_FUNC(Man->overlay, e_object_del);
- E_FREE_FUNC(Man->overlay_layer, evas_object_del);
+ evas_object_hide(Man->overlay);
+ E_FREE_FUNC(Man->overlay, evas_object_del);
if (_gadman_gadgets)
{
eina_hash_free_cb_set(_gadman_gadgets, EINA_FREE_CB(eina_list_free));
@@ -325,10 +325,10 @@ gadman_gadget_place(E_Gadcon_Client *gcc, const E_Gadcon_Client_Class *cc, E_Con
if (gcc->gadcon->id == ID_GADMAN_LAYER_TOP)
{
edje_object_signal_emit(gcc->o_frame, "e,state,visibility,hide", "e");
- evas_object_layer_set(gcc->o_frame, E_COMP_CANVAS_LAYER_POPUP);
+ evas_object_layer_set(gcc->o_frame, E_LAYER_POPUP);
}
else
- evas_object_layer_set(gcc->o_frame, E_COMP_CANVAS_LAYER_DESKTOP);
+ evas_object_layer_set(gcc->o_frame, E_LAYER_DESKTOP);
if (cc->name)
{
l = eina_hash_find(_gadman_gadgets, cc->name);
@@ -505,7 +505,7 @@ gadman_gadgets_show(void)
Eina_Bool editing = EINA_FALSE;
Man->visible = 1;
- e_popup_show(Man->overlay);
+ evas_object_show(Man->overlay);
if (Man->conf->bg_type == BG_STD)
{
@@ -631,7 +631,7 @@ gadman_update_bg(void)
r = (double)Man->conf->color_r * (200. / 255.);
g = (double)Man->conf->color_g * (200. / 255.);
b = (double)Man->conf->color_b * (200. / 255.);
- obj = evas_object_rectangle_add(e_comp_get(Man->container)->evas);
+ obj = evas_object_rectangle_add(Man->comp->evas);
evas_object_color_set(obj, lround(r), lround(g), lround(b), 200);
edje_object_part_swallow(Man->full_bg, "e.swallow.bg", obj);
}
@@ -641,18 +641,18 @@ gadman_update_bg(void)
ext = strrchr(Man->conf->custom_bg, '.');
if (!strcmp(ext, ".edj") || !strcmp(ext, ".EDJ"))
{
- //THIS IS FOR E18 backgrounds
- obj = edje_object_add(e_comp_get(Man->container)->evas);
+ //THIS IS FOR E19 backgrounds
+ obj = edje_object_add(Man->comp->evas);
edje_object_file_set(obj, Man->conf->custom_bg,
"e/desktop/background");
}
else
{
//THIS IS FOR A NORMAL IMAGE
- obj = evas_object_image_add(e_comp_get(Man->container)->evas);
+ obj = evas_object_image_add(Man->comp->evas);
evas_object_image_file_set(obj, Man->conf->custom_bg, NULL);
- evas_object_image_fill_set(obj, 0, 0, Man->container->w,
- Man->container->h);
+ evas_object_image_fill_set(obj, 0, 0, Man->comp->man->w,
+ Man->comp->man->h);
}
edje_object_part_swallow(Man->full_bg, "e.swallow.bg", obj);
break;
@@ -776,7 +776,7 @@ _gadman_gadcon_dnd_drop_cb(E_Gadcon *gc, E_Gadcon_Client *gcc)
/* checking if zone was changed for dragged gadget */
mover = _get_mover(gcc);
evas_object_geometry_get(mover, &gx, &gy, NULL, NULL);
- dst_zone = e_container_zone_at_point_get(e_container_current_get(e_manager_current_get()), gx, gy);
+ dst_zone = e_comp_zone_xy_get(e_util_comp_current_get(), gx, gy);
if (dst_zone && (gcc->gadcon->zone != dst_zone))
{
unsigned int layer = gcc->gadcon->id - ID_GADMAN_LAYER_BASE;
@@ -798,12 +798,9 @@ _gadman_overlay_create(void)
Eina_List *l;
E_Gadcon *gc;
- Man->overlay = e_popup_new(eina_list_data_get(Man->container->zones), 0, 0, Man->container->w, Man->container->h);
- e_popup_name_set(Man->overlay, "noshadow_gadman");
- e_popup_layer_set(Man->overlay, E_COMP_CANVAS_LAYER_LAYOUT, E_LAYER_FULLSCREEN);
-
/* create full background object */
- Man->full_bg = edje_object_add(e_comp_get(Man->container)->evas);
+ Man->full_bg = edje_object_add(Man->comp->evas);
+ evas_object_geometry_set(Man->full_bg, 0, 0, Man->comp->man->w, Man->comp->man->h);
e_theme_edje_object_set(Man->full_bg, "base/theme/gadman",
"e/gadman/full_bg");
edje_object_signal_callback_add(Man->full_bg, "mouse,down,*",
@@ -811,14 +808,13 @@ _gadman_overlay_create(void)
edje_object_signal_callback_add(Man->full_bg, "e,action,hide,stop",
"", on_hide_stop, NULL);
- e_popup_content_set(Man->overlay, Man->full_bg);
+ Man->overlay = e_comp_object_util_add(Man->full_bg, E_COMP_OBJECT_TYPE_NONE);
+ evas_object_layer_set(Man->overlay, E_LAYER_CLIENT_FULLSCREEN);
/* create placeholder rect to maintain our dnd stacking layer */
- Man->overlay_layer = evas_object_rectangle_add(e_comp_get(Man->container)->evas);
- evas_object_layer_set(Man->overlay_layer, E_COMP_CANVAS_LAYER_LAYOUT + E_LAYER_FULLSCREEN);
EINA_LIST_FOREACH(Man->gadcons[GADMAN_LAYER_TOP], l, gc)
{
- gc->drop_handler->base = Man->overlay_layer;
+ gc->drop_handler->base = Man->overlay;
gc->drop_handler->hidden = 1;
}
}
@@ -839,10 +835,10 @@ _gadman_gadcon_new(const char *name, Gadman_Layer_Type layer, E_Zone *zone, E_Ga
gc->orient = E_GADCON_ORIENT_FLOAT;
gc->location = loc;
- gc->evas = e_comp_get(Man->container)->evas;
- e_gadcon_ecore_evas_set(gc, e_comp_get(Man->container)->ee);
- e_gadcon_xdnd_window_set(gc, e_comp_get(Man->container)->ee_win);
- e_gadcon_dnd_window_set(gc, e_comp_get(Man->container)->ee_win);
+ gc->evas = Man->comp->evas;
+ e_gadcon_ecore_evas_set(gc, Man->comp->ee);
+ e_gadcon_xdnd_window_set(gc, Man->comp->ee_win);
+ e_gadcon_dnd_window_set(gc, Man->comp->ee_win);
e_gadcon_drop_handler_add(gc, _gadman_gadcon_dnd_enter_cb, _gadman_gadcon_dnd_leave_cb,
_gadman_gadcon_dnd_move_cb, _gadman_gadcon_dnd_drop_cb,
@@ -916,11 +912,11 @@ _create_mover(E_Gadcon *gc)
mover = edje_object_add(gc->evas);
if (gc->id == ID_GADMAN_LAYER_BG)
{
- evas_object_layer_set(mover, E_COMP_CANVAS_LAYER_DESKTOP);
+ evas_object_layer_set(mover, E_LAYER_DESKTOP);
evas_object_event_callback_add(mover, EVAS_CALLBACK_DEL, _mover_del, NULL);
}
else
- evas_object_layer_set(mover, E_COMP_CANVAS_LAYER_MENU);
+ evas_object_layer_set(mover, E_LAYER_MENU);
e_theme_edje_object_set(mover, "base/theme/gadman", "e/gadman/control");
edje_object_signal_callback_add(mover, "e,action,move,start", "",
@@ -1235,7 +1231,7 @@ on_menu_add(void *data __UNUSED__, E_Menu *m, E_Menu_Item *mi __UNUSED__)
{
if (Man->visible)
gadman_gadgets_hide();
- e_configure_registry_call("extensions/gadman", m->zone->container, NULL);
+ e_configure_registry_call("extensions/gadman", m->zone->comp, NULL);
}
static void
@@ -1540,7 +1536,7 @@ on_move(void *data, Evas_Object *o __UNUSED__, const char *em __UNUSED__, const
drag_gcc->dx = mx - ox;
drag_gcc->dy = my - oy;
- drag_gcc->drag.drag = drag = e_drag_new(gc->zone->container, mx, my,
+ drag_gcc->drag.drag = drag = e_drag_new(gc->zone->comp, mx, my,
drag_types, 1, drag_gcc, -1, NULL,
e_gadcon_drag_finished_cb);
if (!drag) return;
@@ -1569,7 +1565,7 @@ on_bg_click(void *data __UNUSED__, Evas_Object *o __UNUSED__, const char *em __U
static void
on_hide_stop(void *data __UNUSED__, Evas_Object *o __UNUSED__, const char *em __UNUSED__, const char *src __UNUSED__)
{
- e_popup_hide(Man->overlay);
+ evas_object_hide(Man->overlay);
}
static int
@@ -1642,6 +1638,7 @@ _e_gadman_cb_zone_change(void *data __UNUSED__, int type, void *event)
E_Gadcon_Client *gcc;
if (!Man) return ECORE_CALLBACK_RENEW;
+ if (gadman_locked) return ECORE_CALLBACK_RENEW;
if (type == E_EVENT_ZONE_MOVE_RESIZE)
{
/* probably zone dirty being set */
@@ -1666,10 +1663,10 @@ _e_gadman_cb_zone_change(void *data __UNUSED__, int type, void *event)
break;
}
}
- if (ev->zone == Man->overlay->zone)
+ if (ev->zone->comp == Man->comp)
{
- E_FREE_FUNC(Man->overlay, e_object_del);
- E_FREE_FUNC(Man->overlay_layer, evas_object_del);
+ evas_object_hide(Man->overlay);
+ E_FREE_FUNC(Man->overlay, evas_object_del);
_gadman_overlay_create();
}
return ECORE_CALLBACK_RENEW;
@@ -1687,7 +1684,7 @@ _e_gadman_cb_zone_change(void *data __UNUSED__, int type, void *event)
if (found) continue;
gc = _gadman_gadcon_new(layer_name[layer], layer, ev->zone, Man->location[layer]);
Man->gadcons[layer] = eina_list_append(Man->gadcons[layer], gc);
- gc->drop_handler->base = Man->overlay_layer;
+ gc->drop_handler->base = Man->overlay;
gc->drop_handler->hidden = 1;
}
return ECORE_CALLBACK_PASS_ON;
diff --git a/src/modules/gadman/e_mod_gadman.h b/src/modules/gadman/e_mod_gadman.h
index 0db978a54b..0d7e533812 100644
--- a/src/modules/gadman/e_mod_gadman.h
+++ b/src/modules/gadman/e_mod_gadman.h
@@ -52,7 +52,6 @@ struct _Manager
Eina_List *gadgets[GADMAN_LAYER_COUNT];
Evas_Object *movers[GADMAN_LAYER_COUNT];
Evas_Object *full_bg;
- Evas_Object *overlay_layer;
const char *icon_name;
E_Gadcon_Client *drag_gcc[GADMAN_LAYER_COUNT];
@@ -60,8 +59,8 @@ struct _Manager
Ecore_Event_Handler *add;
int visible;
- E_Popup *overlay;
- E_Container *container;
+ Evas_Object *overlay;
+ E_Comp *comp;
int width, height;
@@ -86,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_Container *con, const char *params __UNUSED__);
+E_Config_Dialog *_config_gadman_module(E_Comp *comp, 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 21d9ac605f..149d4ad48b 100644
--- a/src/modules/gadman/e_mod_main.c
+++ b/src/modules/gadman/e_mod_main.c
@@ -191,7 +191,7 @@ _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__)
{
- e_configure_registry_call("extensions/gadman", m->zone->container, NULL);
+ e_configure_registry_call("extensions/gadman", m->zone->comp, NULL);
}
static void
diff --git a/src/modules/ibar/e_mod_config.c b/src/modules/ibar/e_mod_config.c
index bc35d2d97f..dc91fc8779 100644
--- a/src/modules/ibar/e_mod_config.c
+++ b/src/modules/ibar/e_mod_config.c
@@ -52,7 +52,7 @@ _config_ibar_module(Config_Item *ci)
e_module_dir_get(ibar_config->module));
/* Create The Dialog */
- cfd = e_config_dialog_new(e_container_current_get(e_manager_current_get()),
+ cfd = e_config_dialog_new(NULL,
_("IBar Settings"),
"E", "_e_mod_ibar_config_dialog",
buf, 0, v, ci);
@@ -222,8 +222,7 @@ _cb_config(void *data, void *data2 __UNUSED__)
e_user_dir_snprintf(path, sizeof(path), "applications/bar/%s/.order",
cfdata->dir);
e_configure_registry_call("internal/ibar_other",
- e_container_current_get(e_manager_current_get()),
- path);
+ NULL, path);
}
static void
diff --git a/src/modules/ibar/e_mod_main.c b/src/modules/ibar/e_mod_main.c
index f6dc7ba8e6..9089f41a1f 100644
--- a/src/modules/ibar/e_mod_main.c
+++ b/src/modules/ibar/e_mod_main.c
@@ -532,13 +532,13 @@ _ibar_fill(IBar *b)
{
EINA_LIST_FOREACH(l, ll, exe)
{
- E_Border *bd;
+ E_Client *ec;
Eina_List *lll;
Eina_Bool skip = EINA_TRUE;
if (!exe->desktop) continue;
- EINA_LIST_FOREACH(exe->borders, lll, bd)
- if (!bd->client.netwm.state.skip_taskbar)
+ EINA_LIST_FOREACH(exe->clients, lll, ec)
+ if (!ec->netwm.state.skip_taskbar)
{
skip = EINA_FALSE;
break;
@@ -790,6 +790,7 @@ _ibar_icon_new(IBar *b, Efreet_Desktop *desktop, Eina_Bool notinorder)
evas_object_show(ic->o_holder);
ic->o_holder2 = edje_object_add(evas_object_evas_get(b->o_box));
+ evas_object_name_set(ic->o_holder2, "ibar_icon->o_holder2");
e_theme_edje_object_set(ic->o_holder2, "base/theme/modules/ibar",
"e/modules/ibar/icon_overlay");
evas_object_layer_set(ic->o_holder2, 9999);
@@ -942,11 +943,8 @@ _ibar_cb_obj_moveresize(void *data, Evas *e __UNUSED__, Evas_Object *obj __UNUSE
static void
_ibar_cb_menu_icon_new(void *data __UNUSED__, E_Menu *m __UNUSED__, E_Menu_Item *mi __UNUSED__)
{
- E_Container *con;
-
if (!e_configure_registry_exists("applications/new_application")) return;
- con = e_container_current_get(e_manager_current_get());
- e_configure_registry_call("applications/new_application", con, NULL);
+ e_configure_registry_call("applications/new_application", e_comp_get(NULL), NULL);
}
static void
@@ -959,8 +957,7 @@ _ibar_cb_menu_icon_add(void *data, E_Menu *m __UNUSED__, E_Menu_Item *mi __UNUSE
e_user_dir_snprintf(path, sizeof(path), "applications/bar/%s/.order",
b->inst->ci->dir);
e_configure_registry_call("internal/ibar_other",
- e_container_current_get(e_manager_current_get()),
- path);
+ NULL, path);
}
static void
@@ -969,7 +966,7 @@ _ibar_cb_menu_icon_properties(void *data, E_Menu *m __UNUSED__, E_Menu_Item *mi
IBar_Icon *ic;
ic = data;
- e_desktop_edit(ic->ibar->inst->gcc->gadcon->zone->container, ic->app);
+ e_desktop_edit(e_comp_get(ic->ibar->inst->gcc), ic->app);
}
static void
@@ -1006,16 +1003,16 @@ static void
_ibar_cb_icon_menu_mouse_up(void *data, Evas *e EINA_UNUSED, Evas_Object *obj, void *event_info EINA_UNUSED)
{
IBar_Icon *ic;
- E_Border *bd = data;
+ E_Client *ec = data;
Evas_Event_Mouse_Up *ev = event_info;
ic = evas_object_data_get(obj, "ibar_icon");
if (ev->button == 3)
{
- e_int_border_menu_show(bd, ev->canvas.x, ev->canvas.y, 0, ev->timestamp);
+ e_int_client_menu_show(ec, ev->canvas.x, ev->canvas.y, 0, ev->timestamp);
return;
}
- e_border_activate(bd, 1);
+ e_client_activate(ec, 1);
if (!ic) return;
edje_object_signal_emit(ic->menu->o_bg, "e,action,hide", "e");
}
@@ -1028,7 +1025,7 @@ _ibar_cb_icon_menu_del(void *obj)
}
static void
-_ibar_cb_icon_menu_autodel(void *data, void *pop EINA_UNUSED)
+_ibar_cb_icon_menu_autodel(void *data, Evas_Object *obj EINA_UNUSED)
{
IBar_Icon *ic = data;
@@ -1065,16 +1062,19 @@ _ibar_cb_icon_menu_img_del(void *data, Evas *e EINA_UNUSED, Evas_Object *obj EIN
edje_extern_object_min_size_set(ic->menu->o_bg, w, h);
if (e_box_orientation_get(ic->ibar->o_box))
{
- int ny;
+ int cx, cy, cw, ch, ny;
+ E_Zone *zone;
- if (ic->menu->win->y > (ic->menu->win->zone->h / 2))
- ny = ic->menu->win->y - (h - ic->menu->win->h);
+ evas_object_geometry_get(ic->menu->comp_object, &cx, &cy, &cw, &ch);
+ zone = e_comp_zone_xy_get(e_comp_get(ic->menu), cx, cy);
+ if (cy > (zone->h / 2))
+ ny = cy - (h - ch);
else
- ny = ic->menu->win->y;
- e_popup_move_resize(ic->menu->win, ic->menu->win->x, ny, w, h);
+ ny = cy;
+ evas_object_geometry_set(ic->menu->comp_object, cx, ny, w, h);
}
else
- e_popup_resize(ic->menu->win, w, h);
+ evas_object_resize(ic->menu->comp_object, w, h);
}
static void
@@ -1085,37 +1085,44 @@ _ibar_icon_menu(IBar_Icon *ic, Eina_Bool grab)
E_Exec_Instance *exe;
Evas *e;
int w, h;
+ Eina_Bool empty = EINA_TRUE;
if (!ic->exes) return; //FIXME
- ic->menu = e_gadcon_popup_new(ic->ibar->inst->gcc);
- e_popup_name_set(ic->menu->win, "noshadow-ibarmenu");
+ ic->menu = e_gadcon_popup_new(ic->ibar->inst->gcc, 1);
e_object_data_set(E_OBJECT(ic->menu), ic);
E_OBJECT_DEL_SET(ic->menu, _ibar_cb_icon_menu_del);
e = e_comp_get(ic->menu)->evas;
o = edje_object_add(e);
e_theme_edje_object_set(o, "base/theme/modules/ibar",
"e/modules/ibar/menu");
+ /* gadcon popups don't really prevent this,
+ * so away we go!
+ */
+ evas_object_del(ic->menu->comp_object);
+ ic->menu->o_bg = o;
+ ic->menu->comp_object = e_comp_object_util_add(o, E_COMP_OBJECT_TYPE_NONE);
+ evas_object_layer_set(ic->menu->comp_object, E_LAYER_POPUP);
EINA_LIST_FOREACH(ic->exes, l, exe)
{
Evas_Object *img;
const char *txt;
Eina_List *ll;
- E_Border *bd;
+ E_Client *ec;
- EINA_LIST_FOREACH(exe->borders, ll, bd)
+ EINA_LIST_FOREACH(exe->clients, ll, ec)
{
- if (bd->client.netwm.state.skip_taskbar) continue;
+ if (ec->netwm.state.skip_taskbar) continue;
it = edje_object_add(e);
- e_popup_object_add(ic->menu->win, it);
+ e_comp_object_util_del_list_append(ic->menu->comp_object, it);
e_theme_edje_object_set(it, "base/theme/modules/ibar",
"e/modules/ibar/menu/item");
- img = e_comp_win_image_mirror_add(bd->cw);
+ img = e_comp_object_util_mirror_add(ec->frame);
evas_object_event_callback_add(img, EVAS_CALLBACK_DEL,
_ibar_cb_icon_menu_img_del, it);
- txt = e_border_name_get(bd);
- w = bd->cw->pw;
- h = bd->cw->ph;
- e_popup_object_add(ic->menu->win, img);
+ txt = e_client_name_get(ec);
+ w = ec->client.w;
+ h = ec->client.h;
+ e_comp_object_util_del_list_append(ic->menu->comp_object, img);
evas_object_show(img);
edje_extern_object_aspect_set(img, EDJE_ASPECT_CONTROL_BOTH, w, h);
edje_object_part_swallow(it, "e.swallow.icon", img);
@@ -1126,12 +1133,13 @@ _ibar_icon_menu(IBar_Icon *ic, Eina_Bool grab)
evas_object_size_hint_min_set(it, w, h);
evas_object_show(it);
evas_object_event_callback_add(it, EVAS_CALLBACK_MOUSE_UP,
- _ibar_cb_icon_menu_mouse_up, bd);
+ _ibar_cb_icon_menu_mouse_up, ec);
evas_object_data_set(it, "ibar_icon", ic);
edje_object_part_box_append(o, "e.box", it);
+ empty = EINA_FALSE;
}
}
- if (!ic->menu->win->objects)
+ if (empty)
{
/* something crazy happened */
evas_object_del(o);
@@ -1141,15 +1149,11 @@ _ibar_icon_menu(IBar_Icon *ic, Eina_Bool grab)
edje_object_calc_force(o);
edje_object_size_min_calc(o, &w, &h);
edje_extern_object_min_size_set(o, w, h);
- /* gadcon popups don't really prevent this,
- * so away we go!
- */
- evas_object_del(ic->menu->o_bg);
- ic->menu->o_bg = o;
+
ic->menu->w = w, ic->menu->h = h;
edje_object_signal_callback_add(o, "e,action,hide,done", "*",
_ibar_cb_icon_menu_hidden, ic);
- e_popup_resize(ic->menu->win, w, h);
+ evas_object_resize(ic->menu->comp_object, w, h);
edje_object_signal_emit(o, "e,state,hidden", "e");
edje_object_message_signal_process(o);
e_gadcon_popup_show(ic->menu);
@@ -1157,19 +1161,17 @@ _ibar_icon_menu(IBar_Icon *ic, Eina_Bool grab)
{
Evas_Coord x, y, iw, ih, ox, oy;
evas_object_geometry_get(ic->o_holder, &x, &y, &iw, &ih);
- x -= ic->menu->win->zone->x;
- y -= ic->menu->win->zone->y;
- ox = ic->menu->win->x, oy = ic->menu->win->y;
+ evas_object_geometry_get(ic->menu->comp_object, &ox, &oy, NULL, NULL);
if (e_box_orientation_get(ic->ibar->o_box))
ox = (x + (iw / 2)) - (w / 2);
else
oy = (y + (ih / 2)) - (h / 2);
- e_popup_move(ic->menu->win, ox, oy);
+ evas_object_move(ic->menu->comp_object, ox, oy);
}
edje_object_signal_emit(o, "e,action,show", "e");
ic->menu_grabbed = grab;
if (grab)
- e_popup_autoclose(ic->menu->win, _ibar_cb_icon_menu_autodel, NULL, ic);
+ e_comp_object_util_autoclose(ic->menu->comp_object, _ibar_cb_icon_menu_autodel, NULL, ic);
}
static void
@@ -1379,12 +1381,12 @@ _ibar_cb_icon_wheel(void *data, Evas *e __UNUSED__, Evas_Object *obj __UNUSED__,
Evas_Event_Mouse_Wheel *ev = event_info;
E_Exec_Instance *exe;
IBar_Icon *ic = data;
- E_Border *cur, *sel = NULL;
+ E_Client *cur, *sel = NULL;
Eina_List *l;
if (!ic->exes) return;
- cur = e_border_focused_get();
+ cur = e_client_focused_get();
if (!ic->exe_current)
ic->exe_current = ic->exes;
@@ -1393,7 +1395,7 @@ _ibar_cb_icon_wheel(void *data, Evas *e __UNUSED__, Evas_Object *obj __UNUSED__,
{
if (cur && (cur->exe_inst == exe))
{
- l = eina_list_data_find_list(exe->borders, cur);
+ l = eina_list_data_find_list(exe->clients, cur);
if (l) sel = eina_list_data_get(eina_list_next(l));
}
if (!sel)
@@ -1407,7 +1409,7 @@ _ibar_cb_icon_wheel(void *data, Evas *e __UNUSED__, Evas_Object *obj __UNUSED__,
{
if (cur && (cur->exe_inst == exe))
{
- l = eina_list_data_find_list(exe->borders, cur);
+ l = eina_list_data_find_list(exe->clients, cur);
if (l) sel = eina_list_data_get(eina_list_prev(l));
}
if (!sel)
@@ -1421,11 +1423,11 @@ _ibar_cb_icon_wheel(void *data, Evas *e __UNUSED__, Evas_Object *obj __UNUSED__,
if (!sel)
{
exe = eina_list_data_get(ic->exe_current);
- sel = eina_list_data_get(exe->borders);
+ sel = eina_list_data_get(exe->clients);
}
if (sel)
- e_border_activate(sel, 1);
+ e_client_activate(sel, 1);
}
static void
@@ -1454,12 +1456,12 @@ _ibar_icon_go(IBar_Icon *ic, Eina_Bool keep_going)
{
Eina_List *l, *ll;
E_Exec_Instance *exe;
- E_Border *bd, *bdlast = NULL;
+ E_Client *ec, *eclast = NULL;
unsigned int count = 0;
EINA_LIST_FOREACH(ic->exes, l, exe)
{
- EINA_LIST_FOREACH(exe->borders, ll, bd)
+ EINA_LIST_FOREACH(exe->clients, ll, ec)
{
count++;
if (count > 1)
@@ -1467,11 +1469,11 @@ _ibar_icon_go(IBar_Icon *ic, Eina_Bool keep_going)
ecore_job_add((Ecore_Cb)_ibar_cb_icon_menu_cb, ic);
return;
}
- bdlast = bd;
+ eclast = ec;
}
}
- if (bdlast)
- e_border_activate(bdlast, 1);
+ if (eclast)
+ e_client_activate(eclast, 1);
return;
}
if (ic->app->type == EFREET_DESKTOP_TYPE_APPLICATION)
@@ -1483,7 +1485,6 @@ _ibar_icon_go(IBar_Icon *ic, Eina_Bool keep_going)
{
E_Exec_Instance *einst;
- if (ic->exe_inst) return;
einst = e_exec(ic->ibar->inst->gcc->gadcon->zone,
ic->app, NULL, NULL, "ibar");
if (einst)
@@ -1556,7 +1557,7 @@ _ibar_cb_icon_mouse_move(void *data, Evas *e __UNUSED__, Evas_Object *obj __UNUS
if (ic->ibar->inst->ci->lock_move) return;
evas_object_geometry_get(ic->o_icon, &x, &y, &w, &h);
- d = e_drag_new(ic->ibar->inst->gcc->gadcon->zone->container,
+ d = e_drag_new(ic->ibar->inst->gcc->gadcon->zone->comp,
x, y, drag_types, 1,
ic->app, -1, NULL, _ibar_cb_drag_finished);
efreet_desktop_ref(ic->app);
@@ -1585,7 +1586,6 @@ _ibar_cb_icon_move(void *data, Evas *e __UNUSED__, Evas_Object *obj __UNUSED__,
ic = data;
evas_object_geometry_get(ic->o_holder, &x, &y, NULL, NULL);
evas_object_move(ic->o_holder2, x, y);
- evas_object_raise(ic->o_holder2);
}
static void
@@ -1597,7 +1597,6 @@ _ibar_cb_icon_resize(void *data, Evas *e __UNUSED__, Evas_Object *obj __UNUSED__
ic = data;
evas_object_geometry_get(ic->o_holder, NULL, NULL, &w, &h);
evas_object_resize(ic->o_holder2, w, h);
- evas_object_raise(ic->o_holder2);
}
static void
@@ -1765,16 +1764,15 @@ _ibar_inst_cb_drop(void *data, const char *type, void *event_info)
app = ev->data;
else if (!strcmp(type, "enlightenment/border"))
{
- E_Border *bd;
+ E_Client *ec;
- bd = ev->data;
- app = bd->desktop;
+ ec = ev->data;
+ app = ec->desktop;
if (!app)
{
- app = e_desktop_border_create(bd);
+ app = e_desktop_client_create(ec);
efreet_desktop_save(app);
- e_desktop_edit(e_container_current_get(e_manager_current_get()),
- app);
+ e_desktop_edit(NULL, app);
}
}
else if (!strcmp(type, "text/uri-list"))
@@ -1904,8 +1902,8 @@ _ibar_cb_sort(IBar *b1, IBar *b2)
{
int id1, id2;
- id1 = z1->id + (z1->container->num * 100) + (z1->container->manager->num * 10000);
- id2 = z2->id + (z2->container->num * 100) + (z2->container->manager->num * 10000);
+ id1 = z1->id + (z1->comp->num * 100) + (z1->comp->num * 10000);
+ id2 = z2->id + (z2->comp->num * 100) + (z2->comp->num * 10000);
return id2 - id1;
}
return 0;
@@ -2270,19 +2268,20 @@ _ibar_cb_action_focus(E_Object *obj __UNUSED__, const char *params __UNUSED__, E
}
static Eina_Bool
-_ibar_cb_bd_prop(void *d EINA_UNUSED, int t EINA_UNUSED, E_Event_Border_Property *ev)
+_ibar_cb_client_prop(void *d EINA_UNUSED, int t EINA_UNUSED, E_Event_Client_Property *ev)
{
IBar *b;
Eina_List *l;
Eina_Bool skip;
- if ((!ev->border->exe_inst) || (!ev->border->exe_inst->desktop)) return ECORE_CALLBACK_RENEW;
- skip = ev->border->client.netwm.state.skip_taskbar;
+ if (e_client_util_ignored_get(ev->ec) || (!ev->ec->exe_inst) || (!ev->ec->exe_inst->desktop)) return ECORE_CALLBACK_RENEW;
+ if (!(ev->property & E_CLIENT_PROPERTY_NETWM_STATE)) return ECORE_CALLBACK_RENEW;
+ skip = ev->ec->netwm.state.skip_taskbar;
EINA_LIST_FOREACH(ibars, l, b)
{
IBar_Icon *ic;
- ic = eina_hash_find(b->icon_hash, _desktop_name_get(ev->border->exe_inst->desktop));
+ ic = eina_hash_find(b->icon_hash, _desktop_name_get(ev->ec->exe_inst->desktop));
if (skip && (!ic)) continue;
if (!skip)
{
@@ -2290,20 +2289,20 @@ _ibar_cb_bd_prop(void *d EINA_UNUSED, int t EINA_UNUSED, E_Event_Border_Property
{
_ibar_icon_signal_emit(ic, "e,state,started", "e");
if (!ic->exes) _ibar_icon_signal_emit(ic, "e,state,on", "e");
- if (!eina_list_data_find(ic->exes, ev->border->exe_inst))
- ic->exes = eina_list_append(ic->exes, ev->border->exe_inst);
+ if (!eina_list_data_find(ic->exes, ev->ec->exe_inst))
+ ic->exes = eina_list_append(ic->exes, ev->ec->exe_inst);
}
else if (!b->inst->ci->dont_add_nonorder)
{
_ibar_sep_create(b);
- ic = _ibar_icon_notinorder_new(b, ev->border->exe_inst);
+ ic = _ibar_icon_notinorder_new(b, ev->ec->exe_inst);
_ibar_resize_handle(b);
}
}
else
{
- ic->exes = eina_list_remove(ic->exes, ev->border->exe_inst);
- if (ic->exe_inst == ev->border->exe_inst) ic->exe_inst = NULL;
+ ic->exes = eina_list_remove(ic->exes, ev->ec->exe_inst);
+ if (ic->exe_inst == ev->ec->exe_inst) ic->exe_inst = NULL;
if (!ic->exes)
{
if (ic->not_in_order)
@@ -2363,14 +2362,14 @@ static Eina_Bool
_ibar_cb_exec_new_client(void *d EINA_UNUSED, int t EINA_UNUSED, E_Exec_Instance *exe)
{
IBar *b;
- E_Border *bd;
+ E_Client *ec;
Eina_List *l;
Eina_Bool skip;
if (!exe->desktop) return ECORE_CALLBACK_RENEW; //can't do anything here :(
if (!exe->desktop->icon) return ECORE_CALLBACK_RENEW;
- bd = eina_list_last_data_get(exe->borders); //only care about last (new) one
- skip = bd->client.netwm.state.skip_taskbar;
+ ec = eina_list_last_data_get(exe->clients); //only care about last (new) one
+ skip = ec->netwm.state.skip_taskbar;
EINA_LIST_FOREACH(ibars, l, b)
{
IBar_Icon *ic;
@@ -2399,14 +2398,14 @@ static Eina_Bool
_ibar_cb_exec_new(void *d EINA_UNUSED, int t EINA_UNUSED, E_Exec_Instance *exe)
{
IBar *b;
- E_Border *bd;
+ E_Client *ec;
Eina_List *l;
Eina_Bool skip = EINA_TRUE;
if (!exe->desktop) return ECORE_CALLBACK_RENEW; //can't do anything here :(
if (!exe->desktop->icon) return ECORE_CALLBACK_RENEW;
- EINA_LIST_FOREACH(exe->borders, l, bd)
- if (!bd->client.netwm.state.skip_taskbar)
+ EINA_LIST_FOREACH(exe->clients, l, ec)
+ if (!ec->netwm.state.skip_taskbar)
skip = EINA_FALSE;
EINA_LIST_FOREACH(ibars, l, b)
{
@@ -2494,8 +2493,8 @@ e_modapi_init(E_Module *m)
_ibar_cb_exec_new_client, NULL);
E_LIST_HANDLER_APPEND(ibar_config->handlers, E_EVENT_EXEC_DEL,
_ibar_cb_exec_del, NULL);
- E_LIST_HANDLER_APPEND(ibar_config->handlers, E_EVENT_BORDER_PROPERTY,
- _ibar_cb_bd_prop, NULL);
+ E_LIST_HANDLER_APPEND(ibar_config->handlers, E_EVENT_CLIENT_PROPERTY,
+ _ibar_cb_client_prop, NULL);
e_gadcon_provider_register(&_gadcon_class);
ibar_orders = eina_hash_string_superfast_new(NULL);
diff --git a/src/modules/ibox/e_mod_config.c b/src/modules/ibox/e_mod_config.c
index ae46855005..84226f5e44 100644
--- a/src/modules/ibox/e_mod_config.c
+++ b/src/modules/ibox/e_mod_config.c
@@ -45,7 +45,7 @@ _config_ibox_module(Config_Item *ci)
/* Create The Dialog */
snprintf(buf, sizeof(buf), "%s/e-module-ibox.edj", e_module_dir_get(ibox_config->module));
- cfd = e_config_dialog_new(e_container_current_get(e_manager_current_get()),
+ cfd = e_config_dialog_new(NULL,
_("IBox Settings"),
"E", "_e_mod_ibox_config_dialog",
buf, 0, v, ci);
@@ -88,9 +88,9 @@ _basic_create_widgets(E_Config_Dialog *cfd __UNUSED__, Evas *evas, E_Config_Dial
E_Radio_Group *rg;
Evas_Object *o, *of, *ob;
Evas_Object *show_check = NULL;
-
- Eina_List *l, *l2;
- int zone_count;
+ E_Comp *comp;
+ const Eina_List *l;
+ int zone_count = 0;
o = e_widget_list_add(evas, 0, 0);
@@ -134,20 +134,8 @@ _basic_create_widgets(E_Config_Dialog *cfd __UNUSED__, Evas *evas, E_Config_Dial
of = e_widget_framelist_add(evas, _("Screen"), 0);
- zone_count = 0;
- for (l = e_manager_list(); l; l = l->next)
- {
- E_Manager *man;
- man = l->data;
-
- for (l2 = man->containers; l2; l2 = l2->next)
- {
- E_Container *con;
-
- con = l2->data;
- zone_count += eina_list_count(con->zones);
- }
- }
+ EINA_LIST_FOREACH(e_comp_list(), l, comp)
+ zone_count += eina_list_count(comp->zones);
if (zone_count <= 1) cfdata->zone_policy = 1;
diff --git a/src/modules/ibox/e_mod_main.c b/src/modules/ibox/e_mod_main.c
index b01a71deed..8627267b1d 100644
--- a/src/modules/ibox/e_mod_main.c
+++ b/src/modules/ibox/e_mod_main.c
@@ -59,7 +59,7 @@ struct _IBox_Icon
Evas_Object *o_icon;
Evas_Object *o_holder2;
Evas_Object *o_icon2;
- E_Border *border;
+ E_Client *client;
struct
{
unsigned char start : 1;
@@ -78,9 +78,9 @@ static void _ibox_empty(IBox *b);
static void _ibox_orient_set(IBox *b, int horizontal);
static void _ibox_resize_handle(IBox *b);
static void _ibox_instance_drop_zone_recalc(Instance *inst);
-static IBox_Icon *_ibox_icon_find(IBox *b, E_Border *bd);
+static IBox_Icon *_ibox_icon_find(IBox *b, E_Client *ec);
static IBox_Icon *_ibox_icon_at_coord(IBox *b, Evas_Coord x, Evas_Coord y);
-static IBox_Icon *_ibox_icon_new(IBox *b, E_Border *bd);
+static IBox_Icon *_ibox_icon_new(IBox *b, E_Client *ec);
static void _ibox_icon_free(IBox_Icon *ic);
static void _ibox_icon_fill(IBox_Icon *ic);
static void _ibox_icon_fill_label(IBox_Icon *ic);
@@ -103,13 +103,11 @@ static void _ibox_inst_cb_leave(void *data, const char *type, void *even
static void _ibox_inst_cb_drop(void *data, const char *type, void *event_info);
static void _ibox_drop_position_update(Instance *inst, Evas_Coord x, Evas_Coord y);
static void _ibox_inst_cb_scroll(void *data);
-static Eina_Bool _ibox_cb_event_border_add(void *data, int type, void *event);
-static Eina_Bool _ibox_cb_event_border_remove(void *data, int type, void *event);
-static Eina_Bool _ibox_cb_event_border_iconify(void *data, int type, void *event);
-static Eina_Bool _ibox_cb_event_border_uniconify(void *data, int type, void *event);
-static Eina_Bool _ibox_cb_event_border_icon_change(void *data, int type, void *event);
-static Eina_Bool _ibox_cb_event_border_urgent_change(void *data, int type, void *event);
-static Eina_Bool _ibox_cb_event_border_zone_set(void *data, int type, void *event);
+static Eina_Bool _ibox_cb_event_client_add(void *data, int type, void *event);
+static Eina_Bool _ibox_cb_event_client_remove(void *data, int type, void *event);
+static Eina_Bool _ibox_cb_event_client_iconify(void *data, int type, void *event);
+static Eina_Bool _ibox_cb_event_client_uniconify(void *data, int type, void *event);
+static Eina_Bool _ibox_cb_event_client_zone_set(void *data, int type, void *event);
static Eina_Bool _ibox_cb_event_desk_show(void *data, int type, void *event);
static Config_Item *_ibox_config_item_get(const char *id);
@@ -354,31 +352,30 @@ static void
_ibox_fill(IBox *b)
{
IBox_Icon *ic;
- E_Border_List *bl;
- E_Border *bd;
+ E_Client *ec;
int ok;
int mw, mh, h;
- bl = e_container_border_list_first(b->zone->container);
- while ((bd = e_container_border_list_next(bl)))
+ E_CLIENT_FOREACH(b->zone->comp, ec)
{
+ if (e_client_util_ignored_get(ec)) continue;
ok = 0;
- if ((b->inst->ci->show_zone == 0) && (bd->iconic))
+ if ((b->inst->ci->show_zone == 0) && (ec->iconic))
{
ok = 1;
}
- else if ((b->inst->ci->show_zone == 1) && (bd->iconic))
+ else if ((b->inst->ci->show_zone == 1) && (ec->iconic))
{
- if (bd->sticky)
+ if (ec->sticky)
{
ok = 1;
}
- else if ((b->inst->ci->show_desk == 0) && (bd->zone == b->zone))
+ else if ((b->inst->ci->show_desk == 0) && (ec->zone == b->zone))
{
ok = 1;
}
- else if ((b->inst->ci->show_desk == 1) && (bd->zone == b->zone) &&
- (bd->desk == e_desk_current_get(b->zone)))
+ else if ((b->inst->ci->show_desk == 1) && (ec->zone == b->zone) &&
+ (ec->desk == e_desk_current_get(b->zone)))
{
ok = 1;
}
@@ -386,12 +383,11 @@ _ibox_fill(IBox *b)
if (ok)
{
- ic = _ibox_icon_new(b, bd);
+ ic = _ibox_icon_new(b, ec);
b->icons = eina_list_append(b->icons, ic);
e_box_pack_end(b->o_box, ic->o_holder);
}
}
- e_container_border_list_free(bl);
_ibox_empty_handle(b);
_ibox_resize_handle(b);
@@ -453,14 +449,14 @@ _ibox_instance_drop_zone_recalc(Instance *inst)
}
static IBox_Icon *
-_ibox_icon_find(IBox *b, E_Border *bd)
+_ibox_icon_find(IBox *b, E_Client *ec)
{
Eina_List *l;
IBox_Icon *ic;
EINA_LIST_FOREACH(b->icons, l, ic)
{
- if (ic->border == bd) return ic;
+ if (ic->client == ec) return ic;
}
return NULL;
}
@@ -482,14 +478,14 @@ _ibox_icon_at_coord(IBox *b, Evas_Coord x, Evas_Coord y)
}
static IBox_Icon *
-_ibox_icon_new(IBox *b, E_Border *bd)
+_ibox_icon_new(IBox *b, E_Client *ec)
{
IBox_Icon *ic;
ic = E_NEW(IBox_Icon, 1);
- e_object_ref(E_OBJECT(bd));
+ e_object_ref(E_OBJECT(ec));
ic->ibox = b;
- ic->border = bd;
+ ic->client = ec;
ic->o_holder = edje_object_add(evas_object_evas_get(b->o_box));
e_theme_edje_object_set(ic->o_holder, "base/theme/modules/ibox",
"e/modules/ibox/icon");
@@ -521,18 +517,18 @@ _ibox_icon_free(IBox_Icon *ic)
_ibox_icon_empty(ic);
evas_object_del(ic->o_holder);
evas_object_del(ic->o_holder2);
- e_object_unref(E_OBJECT(ic->border));
+ e_object_unref(E_OBJECT(ic->client));
free(ic);
}
static void
_ibox_icon_fill(IBox_Icon *ic)
{
- ic->o_icon = e_border_icon_add(ic->border, evas_object_evas_get(ic->ibox->o_box));
+ ic->o_icon = e_client_icon_add(ic->client, evas_object_evas_get(ic->ibox->o_box));
edje_object_part_swallow(ic->o_holder, "e.swallow.content", ic->o_icon);
evas_object_pass_events_set(ic->o_icon, 1);
evas_object_show(ic->o_icon);
- ic->o_icon2 = e_border_icon_add(ic->border, evas_object_evas_get(ic->ibox->o_box));
+ ic->o_icon2 = e_client_icon_add(ic->client, evas_object_evas_get(ic->ibox->o_box));
edje_object_part_swallow(ic->o_holder2, "e.swallow.content", ic->o_icon2);
evas_object_pass_events_set(ic->o_icon2, 1);
evas_object_show(ic->o_icon2);
@@ -548,27 +544,27 @@ _ibox_icon_fill_label(IBox_Icon *ic)
switch (ic->ibox->inst->ci->icon_label)
{
case 0:
- label = ic->border->client.netwm.name;
+ label = ic->client->netwm.name;
if (!label)
- label = ic->border->client.icccm.name;
+ label = ic->client->icccm.name;
break;
case 1:
- label = ic->border->client.icccm.title;
+ label = ic->client->icccm.title;
break;
case 2:
- label = ic->border->client.icccm.class;
+ label = ic->client->icccm.class;
break;
case 3:
- label = ic->border->client.netwm.icon_name;
+ label = ic->client->netwm.icon_name;
if (!label)
- label = ic->border->client.icccm.icon_name;
+ label = ic->client->icccm.icon_name;
break;
case 4:
- label = e_border_name_get(ic->border);
+ label = e_client_name_get(ic->client);
break;
}
@@ -700,8 +696,8 @@ _ibox_cb_icon_mouse_up(void *data, Evas *e __UNUSED__, Evas_Object *obj __UNUSED
ic = data;
if ((ev->button == 1) && (!ic->drag.dnd))
{
- e_border_uniconify(ic->border);
- e_border_focus_set(ic->border, 1, 1);
+ e_client_uniconify(ic->client);
+ evas_object_focus_set(ic->client->frame, 1);
}
}
@@ -731,15 +727,15 @@ _ibox_cb_icon_mouse_move(void *data, Evas *e __UNUSED__, Evas_Object *obj __UNUS
ic->drag.start = 0;
evas_object_geometry_get(ic->o_icon, &x, &y, &w, &h);
- d = e_drag_new(ic->ibox->inst->gcc->gadcon->zone->container,
+ d = e_drag_new(ic->ibox->inst->gcc->gadcon->zone->comp,
x, y, drag_types, 1,
- ic->border, -1, NULL, _ibox_cb_drag_finished);
- o = e_border_icon_add(ic->border, e_drag_evas_get(d));
+ ic->client, -1, NULL, _ibox_cb_drag_finished);
+ o = e_client_icon_add(ic->client, e_drag_evas_get(d));
e_drag_object_set(d, o);
e_drag_resize(d, w, h);
e_drag_start(d, ic->drag.x, ic->drag.y);
- e_object_ref(E_OBJECT(ic->border));
+ e_object_ref(E_OBJECT(ic->client));
ic->ibox->icons = eina_list_remove(ic->ibox->icons, ic);
_ibox_resize_handle(ic->ibox);
gcc = ic->ibox->inst->gcc;
@@ -776,11 +772,11 @@ _ibox_cb_icon_resize(void *data, Evas *e __UNUSED__, Evas_Object *obj __UNUSED__
static void
_ibox_cb_drag_finished(E_Drag *drag, int dropped)
{
- E_Border *bd;
+ E_Client *ec;
- bd = drag->data;
- if (!dropped) e_border_uniconify(bd);
- e_object_unref(E_OBJECT(bd));
+ ec = drag->data;
+ if (!dropped) e_client_uniconify(ec);
+ e_object_unref(E_OBJECT(ec));
}
static void
@@ -920,7 +916,7 @@ _ibox_inst_cb_drop(void *data, const char *type, void *event_info)
{
E_Event_Dnd_Drop *ev;
Instance *inst;
- E_Border *bd = NULL;
+ E_Client *ec = NULL;
IBox *b;
IBox_Icon *ic, *ic2;
Eina_List *l;
@@ -929,12 +925,12 @@ _ibox_inst_cb_drop(void *data, const char *type, void *event_info)
inst = data;
if (!strcmp(type, "enlightenment/border"))
{
- bd = ev->data;
- if (!bd) return;
+ ec = ev->data;
+ if (!ec) return;
}
else return;
- if (!bd->iconic) e_border_iconify(bd);
+ if (!ec->iconic) e_client_iconify(ec);
ic2 = inst->ibox->ic_drop_before;
if (ic2)
@@ -953,8 +949,8 @@ _ibox_inst_cb_drop(void *data, const char *type, void *event_info)
}
if (!ic2) goto atend;
b = inst->ibox;
- if (_ibox_icon_find(b, bd)) return;
- ic = _ibox_icon_new(b, bd);
+ if (_ibox_icon_find(b, ec)) return;
+ ic = _ibox_icon_new(b, ec);
if (!ic) return;
b->icons = eina_list_prepend_relative(b->icons, ic, ic2);
e_box_pack_before(b->o_box, ic->o_holder, ic2->o_holder);
@@ -963,8 +959,8 @@ _ibox_inst_cb_drop(void *data, const char *type, void *event_info)
{
atend:
b = inst->ibox;
- if (_ibox_icon_find(b, bd)) return;
- ic = _ibox_icon_new(b, bd);
+ if (_ibox_icon_find(b, ec)) return;
+ ic = _ibox_icon_new(b, ec);
if (!ic) return;
b->icons = eina_list_append(b->icons, ic);
e_box_pack_end(b->o_box, ic->o_holder);
@@ -981,25 +977,25 @@ atend:
}
static Eina_Bool
-_ibox_cb_event_border_add(void *data __UNUSED__, int type __UNUSED__, void *event)
+_ibox_cb_event_client_add(void *data __UNUSED__, int type __UNUSED__, void *event)
{
- E_Event_Border_Add *ev = event;
+ E_Event_Client *ev = event;
IBox *b;
IBox_Icon *ic;
E_Desk *desk;
Eina_List *ibox;
/* add if iconic */
- if (!ev->border->iconic) return ECORE_CALLBACK_RENEW;
- if (!ev->border->zone) return ECORE_CALLBACK_RENEW;
- desk = e_desk_current_get(ev->border->zone);
+ if (!ev->ec->iconic) return ECORE_CALLBACK_RENEW;
+ if (!ev->ec->zone) return ECORE_CALLBACK_RENEW;
+ desk = e_desk_current_get(ev->ec->zone);
- ibox = _ibox_zone_find(ev->border->zone);
+ ibox = _ibox_zone_find(ev->ec->zone);
EINA_LIST_FREE(ibox, b)
{
- if (_ibox_icon_find(b, ev->border)) continue;
- if ((b->inst->ci->show_desk) && (ev->border->desk != desk) && (!ev->border->sticky)) continue;
- ic = _ibox_icon_new(b, ev->border);
+ if (_ibox_icon_find(b, ev->ec)) continue;
+ if ((b->inst->ci->show_desk) && (ev->ec->desk != desk) && (!ev->ec->sticky)) continue;
+ ic = _ibox_icon_new(b, ev->ec);
if (!ic) continue;
b->icons = eina_list_append(b->icons, ic);
e_box_pack_end(b->o_box, ic->o_holder);
@@ -1011,19 +1007,19 @@ _ibox_cb_event_border_add(void *data __UNUSED__, int type __UNUSED__, void *even
}
static Eina_Bool
-_ibox_cb_event_border_remove(void *data __UNUSED__, int type __UNUSED__, void *event)
+_ibox_cb_event_client_remove(void *data __UNUSED__, int type __UNUSED__, void *event)
{
- E_Event_Border_Remove *ev;
+ E_Event_Client *ev;
IBox *b;
IBox_Icon *ic;
Eina_List *ibox;
ev = event;
/* find icon and remove if there */
- ibox = _ibox_zone_find(ev->border->zone);
+ ibox = _ibox_zone_find(ev->ec->zone);
EINA_LIST_FREE(ibox, b)
{
- ic = _ibox_icon_find(b, ev->border);
+ ic = _ibox_icon_find(b, ev->ec);
if (!ic) continue;
_ibox_icon_free(ic);
b->icons = eina_list_remove(b->icons, ic);
@@ -1036,9 +1032,9 @@ _ibox_cb_event_border_remove(void *data __UNUSED__, int type __UNUSED__, void *e
}
static Eina_Bool
-_ibox_cb_event_border_iconify(void *data __UNUSED__, int type __UNUSED__, void *event)
+_ibox_cb_event_client_iconify(void *data __UNUSED__, int type __UNUSED__, void *event)
{
- E_Event_Border_Iconify *ev;
+ E_Event_Client *ev;
IBox *b;
IBox_Icon *ic;
Eina_List *ibox;
@@ -1047,14 +1043,14 @@ _ibox_cb_event_border_iconify(void *data __UNUSED__, int type __UNUSED__, void *
ev = event;
/* add icon for ibox for right zone */
/* do some sort of anim when iconifying */
- desk = e_desk_current_get(ev->border->zone);
- ibox = _ibox_zone_find(ev->border->zone);
+ desk = e_desk_current_get(ev->ec->zone);
+ ibox = _ibox_zone_find(ev->ec->zone);
EINA_LIST_FREE(ibox, b)
{
int h, mw, mh;
- if (_ibox_icon_find(b, ev->border)) continue;
- if ((b->inst->ci->show_desk) && (ev->border->desk != desk) && (!ev->border->sticky)) continue;
- ic = _ibox_icon_new(b, ev->border);
+ if (_ibox_icon_find(b, ev->ec)) continue;
+ if ((b->inst->ci->show_desk) && (ev->ec->desk != desk) && (!ev->ec->sticky)) continue;
+ ic = _ibox_icon_new(b, ev->ec);
if (!ic) continue;
b->icons = eina_list_append(b->icons, ic);
e_box_pack_end(b->o_box, ic->o_holder);
@@ -1071,9 +1067,9 @@ _ibox_cb_event_border_iconify(void *data __UNUSED__, int type __UNUSED__, void *
}
static Eina_Bool
-_ibox_cb_event_border_uniconify(void *data __UNUSED__, int type __UNUSED__, void *event)
+_ibox_cb_event_client_uniconify(void *data __UNUSED__, int type __UNUSED__, void *event)
{
- E_Event_Border_Uniconify *ev;
+ E_Event_Client *ev;
IBox *b;
IBox_Icon *ic;
Eina_List *ibox;
@@ -1081,11 +1077,11 @@ _ibox_cb_event_border_uniconify(void *data __UNUSED__, int type __UNUSED__, void
ev = event;
/* del icon for ibox for right zone */
/* do some sort of anim when uniconifying */
- ibox = _ibox_zone_find(ev->border->zone);
+ ibox = _ibox_zone_find(ev->ec->zone);
EINA_LIST_FREE(ibox, b)
{
int mw, mh, h;
- ic = _ibox_icon_find(b, ev->border);
+ ic = _ibox_icon_find(b, ev->ec);
if (!ic) continue;
_ibox_icon_free(ic);
b->icons = eina_list_remove(b->icons, ic);
@@ -1103,43 +1099,25 @@ _ibox_cb_event_border_uniconify(void *data __UNUSED__, int type __UNUSED__, void
}
static Eina_Bool
-_ibox_cb_event_border_icon_change(void *data __UNUSED__, int type __UNUSED__, void *event)
+_ibox_cb_event_client_property(void *data __UNUSED__, int type __UNUSED__, E_Event_Client_Property *ev)
{
- E_Event_Border_Icon_Change *ev;
IBox *b;
IBox_Icon *ic;
Eina_List *ibox;
- ev = event;
- /* update icon */
- ibox = _ibox_zone_find(ev->border->zone);
- EINA_LIST_FREE(ibox, b)
- {
- ic = _ibox_icon_find(b, ev->border);
- if (!ic) continue;
- _ibox_icon_empty(ic);
- _ibox_icon_fill(ic);
- }
-
- return ECORE_CALLBACK_PASS_ON;
-}
-
-static Eina_Bool
-_ibox_cb_event_border_urgent_change(void *data __UNUSED__, int type __UNUSED__, void *event)
-{
- E_Event_Border_Urgent_Change *ev;
- IBox *b;
- IBox_Icon *ic;
- Eina_List *ibox;
-
- ev = event;
- /* update icon */
- ibox = _ibox_zone_find(ev->border->zone);
+ if ((ev->property & ~E_CLIENT_PROPERTY_ICON) && (ev->property & ~E_CLIENT_PROPERTY_URGENCY)) return ECORE_CALLBACK_RENEW;
+ ibox = _ibox_zone_find(ev->ec->zone);
EINA_LIST_FREE(ibox, b)
{
- ic = _ibox_icon_find(b, ev->border);
+ ic = _ibox_icon_find(b, ev->ec);
if (!ic) continue;
- if (ev->border->client.icccm.urgent)
+ if ((ev->property & E_CLIENT_PROPERTY_ICON))
+ {
+ _ibox_icon_empty(ic);
+ _ibox_icon_fill(ic);
+ continue;
+ }
+ if (ev->ec->icccm.urgent)
{
e_gadcon_urgent_show(b->inst->gcc->gadcon);
edje_object_signal_emit(ic->o_holder, "e,state,urgent", "e");
@@ -1156,13 +1134,13 @@ _ibox_cb_event_border_urgent_change(void *data __UNUSED__, int type __UNUSED__,
}
static Eina_Bool
-_ibox_cb_event_border_zone_set(void *data __UNUSED__, int type __UNUSED__, void *event)
+_ibox_cb_event_client_zone_set(void *data __UNUSED__, int type __UNUSED__, void *event)
{
- E_Event_Border_Zone_Set *ev;
+ E_Event_Client_Zone_Set *ev;
ev = event;
/* delete from current zone ibox, add to new one */
- if (ev->border->iconic)
+ if (ev->ec->iconic)
{
}
return 1;
@@ -1295,31 +1273,30 @@ e_modapi_init(E_Module *m)
ibox_config->module = m;
- E_LIST_HANDLER_APPEND(ibox_config->handlers, E_EVENT_BORDER_ADD, _ibox_cb_event_border_add, NULL);
- E_LIST_HANDLER_APPEND(ibox_config->handlers, E_EVENT_BORDER_REMOVE, _ibox_cb_event_border_remove, NULL);
- E_LIST_HANDLER_APPEND(ibox_config->handlers, E_EVENT_BORDER_ICONIFY, _ibox_cb_event_border_iconify, NULL);
- E_LIST_HANDLER_APPEND(ibox_config->handlers, E_EVENT_BORDER_UNICONIFY, _ibox_cb_event_border_uniconify, NULL);
- E_LIST_HANDLER_APPEND(ibox_config->handlers, E_EVENT_BORDER_ICON_CHANGE, _ibox_cb_event_border_icon_change, NULL);
- E_LIST_HANDLER_APPEND(ibox_config->handlers, E_EVENT_BORDER_URGENT_CHANGE, _ibox_cb_event_border_urgent_change, NULL);
- E_LIST_HANDLER_APPEND(ibox_config->handlers, E_EVENT_BORDER_ZONE_SET, _ibox_cb_event_border_zone_set, NULL);
+ E_LIST_HANDLER_APPEND(ibox_config->handlers, E_EVENT_CLIENT_ADD, _ibox_cb_event_client_add, NULL);
+ E_LIST_HANDLER_APPEND(ibox_config->handlers, E_EVENT_CLIENT_REMOVE, _ibox_cb_event_client_remove, NULL);
+ E_LIST_HANDLER_APPEND(ibox_config->handlers, E_EVENT_CLIENT_ICONIFY, _ibox_cb_event_client_iconify, NULL);
+ E_LIST_HANDLER_APPEND(ibox_config->handlers, E_EVENT_CLIENT_UNICONIFY, _ibox_cb_event_client_uniconify, NULL);
+ E_LIST_HANDLER_APPEND(ibox_config->handlers, E_EVENT_CLIENT_PROPERTY, _ibox_cb_event_client_property, NULL);
+ E_LIST_HANDLER_APPEND(ibox_config->handlers, E_EVENT_CLIENT_ZONE_SET, _ibox_cb_event_client_zone_set, NULL);
E_LIST_HANDLER_APPEND(ibox_config->handlers, E_EVENT_DESK_SHOW, _ibox_cb_event_desk_show, NULL);
/* FIXME: add these later for things taskbar-like functionality
ibox_config->handlers = eina_list_append
(ibox_config->handlers, ecore_event_handler_add
- (E_EVENT_BORDER_DESK_SET, _ibox_cb_event_border_zone_set, NULL));
+ (E_EVENT_CLIENT_DESK_SET, _ibox_cb_event_client_zone_set, NULL));
ibox_config->handlers = eina_list_append
(ibox_config->handlers, ecore_event_handler_add
- (E_EVENT_BORDER_SHOW, _ibox_cb_event_border_zone_set, NULL));
+ (E_EVENT_CLIENT_SHOW, _ibox_cb_event_client_zone_set, NULL));
ibox_config->handlers = eina_list_append
(ibox_config->handlers, ecore_event_handler_add
- (E_EVENT_BORDER_HIDE, _ibox_cb_event_border_zone_set, NULL));
+ (E_EVENT_CLIENT_HIDE, _ibox_cb_event_client_zone_set, NULL));
ibox_config->handlers = eina_list_append
(ibox_config->handlers, ecore_event_handler_add
- (E_EVENT_BORDER_STACK, _ibox_cb_event_border_zone_set, NULL));
+ (E_EVENT_CLIENT_STACK, _ibox_cb_event_client_zone_set, NULL));
ibox_config->handlers = eina_list_append
(ibox_config->handlers, ecore_event_handler_add
- (E_EVENT_BORDER_STICK, _ibox_cb_event_border_zone_set, NULL));
+ (E_EVENT_CLIENT_STICK, _ibox_cb_event_client_zone_set, NULL));
*/
e_gadcon_provider_register(&_gadcon_class);
return m;
diff --git a/src/modules/illume-home/e_mod_config.c b/src/modules/illume-home/e_mod_config.c
index 6e8e0b13ee..df489fd1d0 100644
--- a/src/modules/illume-home/e_mod_config.c
+++ b/src/modules/illume-home/e_mod_config.c
@@ -92,7 +92,7 @@ il_home_config_save(void)
}
void
-il_home_config_show(E_Container *con, const char *params __UNUSED__)
+il_home_config_show(E_Comp *comp, const char *params __UNUSED__)
{
E_Config_Dialog *cfd;
E_Config_Dialog_View *v = NULL;
@@ -107,7 +107,7 @@ il_home_config_show(E_Container *con, const char *params __UNUSED__)
v->normal_win = 1;
v->scroll = 1;
- cfd = e_config_dialog_new(con, _("Home Settings"), "E",
+ cfd = e_config_dialog_new(comp, _("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_config.h b/src/modules/illume-home/e_mod_config.h
index b7b04a9ff9..5e9eef1b2a 100644
--- a/src/modules/illume-home/e_mod_config.h
+++ b/src/modules/illume-home/e_mod_config.h
@@ -20,7 +20,7 @@ struct _Il_Home_Config
int il_home_config_init(E_Module *m);
int il_home_config_shutdown(void);
int il_home_config_save(void);
-void il_home_config_show(E_Container *con, const char *params);
+void il_home_config_show(E_Comp *comp, const char *params);
extern EAPI Il_Home_Config *il_home_cfg;
diff --git a/src/modules/illume-home/e_mod_main.c b/src/modules/illume-home/e_mod_main.c
index f5f24d9d8e..539fd2e232 100644
--- a/src/modules/illume-home/e_mod_main.c
+++ b/src/modules/illume-home/e_mod_main.c
@@ -24,7 +24,7 @@ struct _Il_Home_Exec
E_Busycover *cover;
Efreet_Desktop *desktop;
Ecore_Exe *exec;
- E_Border *border;
+ E_Client *client;
E_Zone *zone;
Ecore_Timer *timeout;
int startup_id;
@@ -37,7 +37,7 @@ static void _il_home_apps_populate(void);
static void _il_home_apps_unpopulate(void);
static void _il_home_desks_populate(void);
static void _il_home_desktop_run(Il_Home_Win *hwin, Efreet_Desktop *desktop);
-static E_Border *_il_home_desktop_find_border(E_Zone *zone, Efreet_Desktop *desktop);
+static E_Client *_il_home_desktop_find_border(E_Zone *zone, Efreet_Desktop *desktop);
static void _il_home_win_new(E_Zone *zone);
static void _il_home_win_cb_free(Il_Home_Win *hwin);
static void _il_home_win_cb_resize(E_Win *win);
@@ -70,8 +70,8 @@ EAPI E_Module_Api e_modapi = { E_MODULE_API_VERSION, "Illume Home" };
EAPI void *
e_modapi_init(E_Module *m)
{
- E_Manager *man;
- Eina_List *ml;
+ const Eina_List *l;
+ E_Comp *comp;
if (!il_home_config_init(m)) return NULL;
@@ -86,11 +86,11 @@ e_modapi_init(E_Module *m)
hdls =
eina_list_append(hdls,
- ecore_event_handler_add(E_EVENT_BORDER_ADD,
+ ecore_event_handler_add(E_EVENT_CLIENT_ADD,
_il_home_cb_border_add, NULL));
hdls =
eina_list_append(hdls,
- ecore_event_handler_add(E_EVENT_BORDER_REMOVE,
+ ecore_event_handler_add(E_EVENT_CLIENT_REMOVE,
_il_home_cb_border_del, NULL));
hdls =
eina_list_append(hdls,
@@ -111,25 +111,19 @@ e_modapi_init(E_Module *m)
ecore_event_handler_add(E_EVENT_BG_UPDATE,
_il_home_cb_bg_change, NULL));
- EINA_LIST_FOREACH(e_manager_list(), ml, man)
+ EINA_LIST_FOREACH(e_comp_list(), l, comp)
{
- E_Container *con;
- Eina_List *cl;
+ E_Zone *zone;
+ Eina_List *zl;
- EINA_LIST_FOREACH(man->containers, cl, con)
+ EINA_LIST_FOREACH(comp->zones, zl, zone)
{
- E_Zone *zone;
- Eina_List *zl;
-
- EINA_LIST_FOREACH(con->zones, zl, zone)
- {
- Ecore_X_Illume_Mode mode;
+ Ecore_X_Illume_Mode mode;
- mode = ecore_x_e_illume_mode_get(zone->black_win);
- _il_home_win_new(zone);
- if (mode > ECORE_X_ILLUME_MODE_SINGLE)
- _il_home_win_new(zone);
- }
+ mode = ecore_x_e_illume_mode_get(zone->black_win);
+ _il_home_win_new(zone);
+ if (mode > ECORE_X_ILLUME_MODE_SINGLE)
+ _il_home_win_new(zone);
}
}
@@ -284,26 +278,26 @@ _il_home_desktop_run(Il_Home_Win *hwin, Efreet_Desktop *desktop)
E_Exec_Instance *eins;
Il_Home_Exec *exec;
Eina_List *l;
- E_Border *bd;
+ E_Client *ec;
char buff[4096];
if ((!hwin) || (!desktop) || (!desktop->exec)) return;
EINA_LIST_FOREACH(exes, l, exec)
{
if (exec->desktop != desktop) continue;
- if ((exec->border) && (exec->border->zone == hwin->zone))
+ if ((exec->client) && (exec->client->zone == hwin->zone))
{
- e_border_uniconify(exec->border);
- e_border_raise(exec->border);
- e_border_focus_set(exec->border, 1, 1);
+ e_client_uniconify(exec->client);
+ evas_object_raise(exec->client->frame);
+ evas_object_focus_set(exec->client->frame, 1);
return;
}
}
- if ((bd = _il_home_desktop_find_border(hwin->zone, desktop)))
+ if ((ec = _il_home_desktop_find_border(hwin->zone, desktop)))
{
- e_border_uniconify(bd);
- e_border_raise(bd);
- e_border_focus_set(bd, 1, 1);
+ e_client_uniconify(ec);
+ evas_object_raise(ec->frame);
+ evas_object_focus_set(ec->frame, 1);
return;
}
@@ -326,11 +320,11 @@ _il_home_desktop_run(Il_Home_Win *hwin, Efreet_Desktop *desktop)
exes = eina_list_append(exes, exec);
}
-static E_Border *
+static E_Client *
_il_home_desktop_find_border(E_Zone *zone, Efreet_Desktop *desktop)
{
Eina_List *l;
- E_Border *bd;
+ E_Client *ec;
char *exe = NULL, *p;
if (!desktop) return NULL;
@@ -350,34 +344,35 @@ _il_home_desktop_find_border(E_Zone *zone, Efreet_Desktop *desktop)
if (p) strcpy(exe, p + 1);
}
- EINA_LIST_FOREACH(e_border_client_list(), l, bd)
+ EINA_LIST_FOREACH(zone->comp->clients, l, ec)
{
- if (bd->zone != zone) continue;
- if (e_exec_startup_id_pid_find(bd->client.netwm.pid,
- bd->client.netwm.startup_id) == desktop)
+ if (e_client_util_ignored_get(ec)) continue;
+ if (ec->zone != zone) continue;
+ if (e_exec_startup_id_pid_find(ec->netwm.pid,
+ ec->netwm.startup_id) == desktop)
{
free(exe);
- return bd;
+ return ec;
}
if (exe)
{
- if (bd->client.icccm.command.argv)
+ if (ec->icccm.command.argv)
{
char *pp;
- pp = strrchr(bd->client.icccm.command.argv[0], '/');
- if (!pp) pp = bd->client.icccm.command.argv[0];
+ pp = strrchr(ec->icccm.command.argv[0], '/');
+ if (!pp) pp = ec->icccm.command.argv[0];
if (!strcmp(exe, pp))
{
free(exe);
- return bd;
+ return ec;
}
}
- if ((bd->client.icccm.name) &&
- (!strcasecmp(bd->client.icccm.name, exe)))
+ if ((ec->icccm.name) &&
+ (!strcasecmp(ec->icccm.name, exe)))
{
free(exe);
- return bd;
+ return ec;
}
}
}
@@ -398,7 +393,7 @@ _il_home_win_new(E_Zone *zone)
if (!hwin) return;
hwin->zone = zone;
- hwin->win = e_win_new(zone->container);
+ hwin->win = e_win_new(zone->comp);
if (!hwin->win)
{
e_object_del(E_OBJECT(hwin));
@@ -417,9 +412,9 @@ _il_home_win_new(E_Zone *zone)
desk = e_desk_current_get(zone);
if (desk)
- bgfile = e_bg_file_get(zone->container->num, zone->num, desk->x, desk->y);
+ bgfile = e_bg_file_get(zone->comp->num, zone->num, desk->x, desk->y);
else
- bgfile = e_bg_file_get(zone->container->num, zone->num, -1, -1);
+ bgfile = e_bg_file_get(zone->comp->num, zone->num, -1, -1);
hwin->o_bg = edje_object_add(evas);
edje_object_file_set(hwin->o_bg, bgfile, "e/desktop/background");
@@ -453,7 +448,7 @@ _il_home_win_new(E_Zone *zone)
e_win_move_resize(hwin->win, zone->x, zone->y, zone->w, (zone->h / 2));
e_win_show(hwin->win);
- e_border_zone_set(hwin->win->border, zone);
+ e_client_zone_set(hwin->win->client, zone);
if (hwin->win->evas_win)
e_drop_xdnd_register_set(hwin->win->evas_win, EINA_TRUE);
@@ -572,29 +567,29 @@ _il_home_desktop_cache_update(void *data __UNUSED__, int type __UNUSED__, void *
static Eina_Bool
_il_home_cb_border_add(void *data __UNUSED__, int type __UNUSED__, void *event)
{
- E_Event_Border_Add *ev;
+ E_Event_Client *ev;
Il_Home_Exec *exe;
Eina_List *l;
ev = event;
EINA_LIST_FOREACH(exes, l, exe)
{
- if (!exe->border)
+ if (!exe->client)
{
- if ((exe->startup_id == ev->border->client.netwm.startup_id) ||
- (exe->pid == ev->border->client.netwm.pid))
+ if ((exe->startup_id == ev->ec->netwm.startup_id) ||
+ (exe->pid == ev->ec->netwm.pid))
{
- exe->border = ev->border;
+ exe->client = ev->ec;
}
}
- if (!exe->border) continue;
- if (exe->border->zone != exe->zone)
+ if (!exe->client) continue;
+ if (exe->client->zone != exe->zone)
{
- exe->border->zone = exe->zone;
- exe->border->x = exe->zone->x;
- exe->border->y = exe->zone->y;
- exe->border->changes.pos = 1;
- BD_CHANGED(exe->border);
+ exe->client->zone = exe->zone;
+ exe->client->x = exe->zone->x;
+ exe->client->y = exe->zone->y;
+ exe->client->changes.pos = 1;
+ EC_CHANGED(exe->client);
}
if (exe->handle)
{
@@ -610,19 +605,19 @@ _il_home_cb_border_add(void *data __UNUSED__, int type __UNUSED__, void *event)
static Eina_Bool
_il_home_cb_border_del(void *data __UNUSED__, int type __UNUSED__, void *event)
{
- E_Event_Border_Remove *ev;
+ E_Event_Client *ev;
Il_Home_Exec *exe;
Eina_List *l;
ev = event;
EINA_LIST_FOREACH(exes, l, exe)
{
- if (exe->border == ev->border)
+ if (exe->client == ev->ec)
{
exe->exec = NULL;
if (exe->handle) e_busycover_pop(exe->cover, exe->handle);
exe->handle = NULL;
- exe->border = NULL;
+ exe->client = NULL;
exes = eina_list_remove(exes, exe);
E_FREE(exe);
break;
@@ -666,7 +661,7 @@ _il_home_cb_exe_timeout(void *data)
if (!(exe = data)) return ECORE_CALLBACK_CANCEL;
if (exe->handle) e_busycover_pop(exe->cover, exe->handle);
exe->handle = NULL;
- if (!exe->border)
+ if (!exe->client)
{
exes = eina_list_remove(exes, exe);
if (exe->desktop) efreet_desktop_free(exe->desktop);
@@ -693,14 +688,14 @@ _il_home_cb_client_message(void *data __UNUSED__, int type __UNUSED__, void *eve
}
else if (ev->message_type == ECORE_X_ATOM_E_ILLUME_HOME_DEL)
{
- E_Border *bd;
+ E_Client *ec;
Eina_List *l;
Il_Home_Win *hwin;
- if (!(bd = e_border_find_by_client_window(ev->win))) return ECORE_CALLBACK_PASS_ON;
+ if (!(ec = e_pixmap_find_client(E_PIXMAP_TYPE_X, ev->win))) return ECORE_CALLBACK_PASS_ON;
EINA_LIST_FOREACH(hwins, l, hwin)
{
- if (hwin->win->border == bd)
+ if (hwin->win->client == ec)
{
hwins = eina_list_remove_list(hwins, hwins);
e_object_del(E_OBJECT(hwin));
@@ -747,9 +742,9 @@ _il_home_cb_bg_change(void *data __UNUSED__, int type, void *event __UNUSED__)
zone = hwin->zone;
desk = e_desk_current_get(zone);
if (desk)
- bgfile = e_bg_file_get(zone->container->num, zone->num, desk->x, desk->y);
+ bgfile = e_bg_file_get(zone->comp->num, zone->num, desk->x, desk->y);
else
- bgfile = e_bg_file_get(zone->container->num, zone->num, -1, -1);
+ bgfile = e_bg_file_get(zone->comp->num, zone->num, -1, -1);
edje_object_file_set(hwin->o_bg, bgfile, "e/desktop/background");
eina_stringshare_del(bgfile);
}
diff --git a/src/modules/illume-indicator/e_mod_ind_win.c b/src/modules/illume-indicator/e_mod_ind_win.c
index ae549d8668..f7ec45ea69 100644
--- a/src/modules/illume-indicator/e_mod_ind_win.c
+++ b/src/modules/illume-indicator/e_mod_ind_win.c
@@ -36,7 +36,7 @@ e_mod_ind_win_new(E_Zone *zone)
iwin->zone = zone;
/* create new window */
- iwin->win = e_win_new(zone->container);
+ iwin->win = e_win_new(zone->comp);
iwin->win->data = iwin;
/* set some properties on the window */
@@ -130,14 +130,14 @@ e_mod_ind_win_new(E_Zone *zone)
e_win_show(iwin->win);
/* set this window on proper zone */
- e_border_zone_set(iwin->win->border, zone);
- iwin->win->border->user_skip_winlist = 1;
- iwin->win->border->lock_focus_in = 1;
- iwin->win->border->lock_focus_out = 1;
+ e_client_zone_set(iwin->win->client, zone);
+ iwin->win->client->user_skip_winlist = 1;
+ iwin->win->client->lock_focus_in = 1;
+ iwin->win->client->lock_focus_out = 1;
/* set this window to be a dock window. This needs to be done after show
* as E will sometimes reset the window type */
- ecore_x_netwm_window_type_set(iwin->win->evas_win, ECORE_X_WINDOW_TYPE_DOCK);
+ ecore_x_netwm_window_type_set(iwin->win->evas_win, E_WINDOW_TYPE_DOCK);
/* tell conformant apps our position and size */
ecore_x_e_illume_indicator_geometry_set(zone->black_win, zone->x, zone->y,
@@ -195,7 +195,7 @@ _e_mod_ind_win_cb_win_prop(void *data, int type __UNUSED__, void *event)
ev = event;
if (!(iwin = data)) return ECORE_CALLBACK_PASS_ON;
- if (ev->win != iwin->win->container->manager->root)
+ if (ev->win != iwin->win->comp->man->root)
return ECORE_CALLBACK_PASS_ON;
if (ev->atom != ATM_ENLIGHTENMENT_SCALE) return ECORE_CALLBACK_PASS_ON;
@@ -208,7 +208,7 @@ _e_mod_ind_win_cb_win_prop(void *data, int type __UNUSED__, void *event)
/* 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)
* If we do not do this, than indicator does not change w/ scale anymore */
- iwin->win->border->client.icccm.fetch.size_pos_hints = 1;
+ iwin->win->client->icccm.fetch.size_pos_hints = 1;
/* resize this window */
e_win_resize(iwin->win, iwin->zone->w, mh);
@@ -269,12 +269,12 @@ _e_mod_ind_win_cb_mouse_down(void *data, Evas *evas __UNUSED__, Evas_Object *obj
iwin->mouse_down = 1;
/* make sure we can drag */
- if (iwin->win->border->client.illume.drag.locked) return;
+ if (iwin->win->client->illume.drag.locked) return;
iwin->drag.start = 1;
iwin->drag.dnd = 0;
iwin->drag.y = ev->output.y;
- iwin->drag.by = iwin->win->border->y;
+ iwin->drag.by = iwin->win->client->y;
}
else if (ev->button == 3)
{
@@ -312,32 +312,32 @@ _e_mod_ind_win_cb_mouse_up(void *data, Evas *evas __UNUSED__, Evas_Object *obj _
{
Ecore_X_Window xwin;
- xwin = iwin->win->border->zone->black_win;
+ xwin = iwin->win->client->zone->black_win;
ecore_x_e_illume_quickpanel_state_toggle(xwin);
}
else if (iwin->drag.dnd)
{
- E_Border *bd;
+ E_Client *ec;
- bd = iwin->win->border;
+ ec = iwin->win->client;
/* reset mouse pointer */
- e_pointer_type_pop(e_comp_get(bd)->pointer, bd, "move");
+ e_pointer_type_pop(e_comp_get(ec)->pointer, ec, "move");
/* tell edj we are done moving */
edje_object_signal_emit(iwin->o_base, "e,action,move,stop", "e");
/* send message that we are done dragging */
- ecore_x_e_illume_drag_end_send(bd->client.win);
+ ecore_x_e_illume_drag_end_send(e_client_util_win_get(ec));
/* update quickpanel position if needed */
- if (bd->y != iwin->drag.by)
- ecore_x_e_illume_quickpanel_position_update_send(bd->client.win);
+ if (ec->y != iwin->drag.by)
+ ecore_x_e_illume_quickpanel_position_update_send(e_client_util_win_get(ec));
/* tell conformant apps our position and size */
ecore_x_e_illume_indicator_geometry_set(iwin->zone->black_win,
- bd->x, bd->y,
- bd->w, bd->h);
+ ec->x, ec->y,
+ ec->w, ec->h);
}
iwin->drag.start = 0;
iwin->drag.dnd = 0;
@@ -351,11 +351,11 @@ _e_mod_ind_win_cb_mouse_move(void *data, Evas *evas __UNUSED__, Evas_Object *obj
{
Ind_Win *iwin;
Evas_Event_Mouse_Move *ev;
- E_Border *bd;
+ E_Client *ec;
ev = event;
if (!(iwin = data)) return;
- bd = iwin->win->border;
+ ec = iwin->win->client;
if (iwin->drag.start)
{
iwin->drag.dnd = 1;
@@ -363,17 +363,17 @@ _e_mod_ind_win_cb_mouse_move(void *data, Evas *evas __UNUSED__, Evas_Object *obj
/* change mouse pointer to indicate we are dragging */
e_pointer_type_push(e_comp_get(iwin->win)->pointer,
- iwin->win->border, "move");
+ iwin->win->client, "move");
/* tell edj we are going to start moving */
edje_object_signal_emit(iwin->o_base, "e,action,move,start", "e");
/* tell quickpanel to hide because we are going to drag */
- ecore_x_e_illume_quickpanel_state_send(bd->zone->black_win,
+ ecore_x_e_illume_quickpanel_state_send(ec->zone->black_win,
ECORE_X_ILLUME_QUICKPANEL_STATE_OFF);
/* send message that we are going to start dragging */
- ecore_x_e_illume_drag_start_send(bd->client.win);
+ ecore_x_e_illume_drag_start_send(e_client_util_win_get(ec));
}
/* make sure we are dragging */
@@ -385,7 +385,7 @@ _e_mod_ind_win_cb_mouse_move(void *data, Evas *evas __UNUSED__, Evas_Object *obj
py = ev->cur.output.y;
/* do moves in 'chunks' of screen size */
- dy = ((bd->zone->h - bd->h) / 8);
+ dy = ((ec->zone->h - ec->h) / 8);
/* are we moving up or down ? */
if (ev->cur.output.y > ev->prev.output.y)
@@ -401,23 +401,23 @@ _e_mod_ind_win_cb_mouse_move(void *data, Evas *evas __UNUSED__, Evas_Object *obj
else return;
if (py > iwin->drag.y)
- ny = bd->y + dy;
+ ny = ec->y + dy;
else if (py < iwin->drag.y)
- ny = bd->y - dy;
+ ny = ec->y - dy;
else return;
/* make sure we don't drag off the screen */
if (ny < iwin->zone->y)
ny = iwin->zone->y;
- else if ((ny + bd->h) > (iwin->zone->y + iwin->zone->h))
+ else if ((ny + ec->h) > (iwin->zone->y + iwin->zone->h))
return;
/* move the border if we need to */
- if (bd->y != ny)
+ if (ec->y != ny)
{
- bd->y = ny;
- bd->changes.pos = 1;
- BD_CHANGED(bd);
+ ec->y = ny;
+ ec->changes.pos = 1;
+ EC_CHANGED(ec);
e_win_move(iwin->win, iwin->win->x, ny);
}
}
diff --git a/src/modules/illume-indicator/e_mod_main.c b/src/modules/illume-indicator/e_mod_main.c
index f792997027..15ee34aeb1 100644
--- a/src/modules/illume-indicator/e_mod_main.c
+++ b/src/modules/illume-indicator/e_mod_main.c
@@ -18,8 +18,8 @@ EAPI E_Module_Api e_modapi = { E_MODULE_API_VERSION, "Illume-Indicator" };
EAPI void *
e_modapi_init(E_Module *m)
{
- E_Manager *man;
- Eina_List *ml;
+ const Eina_List *l;
+ E_Comp *comp;
/* set module priority so we load before others */
e_module_priority_set(m, 90);
@@ -49,30 +49,22 @@ e_modapi_init(E_Module *m)
}
#endif
- /* loop through the managers (root windows) */
- EINA_LIST_FOREACH(e_manager_list(), ml, man)
+ EINA_LIST_FOREACH(e_comp_list(), l, comp)
{
- E_Container *con;
- Eina_List *cl;
+ E_Zone *zone;
+ Eina_List *zl;
- /* loop through containers */
- EINA_LIST_FOREACH(man->containers, cl, con)
- {
- E_Zone *zone;
- Eina_List *zl;
-
- /* TODO: Make this configurable so illume2 can be run
- * on just one zone/screen/etc */
+ /* TODO: Make this configurable so illume2 can be run
+ * on just one zone/screen/etc */
- /* for each zone, create an indicator window */
- EINA_LIST_FOREACH(con->zones, zl, zone)
- {
- Ind_Win *iwin;
+ /* for each zone, create an indicator window */
+ EINA_LIST_FOREACH(comp->zones, zl, zone)
+ {
+ Ind_Win *iwin;
- /* try to create new indicator window */
- if (!(iwin = e_mod_ind_win_new(zone))) continue;
- iwins = eina_list_append(iwins, iwin);
- }
+ /* try to create new indicator window */
+ if (!(iwin = e_mod_ind_win_new(zone))) continue;
+ iwins = eina_list_append(iwins, iwin);
}
}
diff --git a/src/modules/illume-indicator/e_mod_notify.c b/src/modules/illume-indicator/e_mod_notify.c
index 75d7b843b0..7f655f0dde 100644
--- a/src/modules/illume-indicator/e_mod_notify.c
+++ b/src/modules/illume-indicator/e_mod_notify.c
@@ -180,7 +180,7 @@ _e_mod_notify_new(E_Notification_Notify *n, unsigned id)
zone = e_util_zone_current_get(e_manager_current_get());
nwin->zone = zone;
- nwin->win = e_win_new(zone->container);
+ nwin->win = e_win_new(zone->comp);
nwin->win->data = nwin;
e_win_name_class_set(nwin->win, "Illume-Notify", "Illume-Notify");
@@ -214,8 +214,8 @@ _e_mod_notify_new(E_Notification_Notify *n, unsigned id)
_e_mod_notify_refresh(nwin);
e_win_show(nwin->win);
- e_border_zone_set(nwin->win->border, zone);
- nwin->win->border->user_skip_winlist = 1;
+ e_client_zone_set(nwin->win->client, zone);
+ nwin->win->client->user_skip_winlist = 1;
return nwin;
}
diff --git a/src/modules/illume-kbd-toggle/e_mod_main.c b/src/modules/illume-kbd-toggle/e_mod_main.c
index ee5accd511..eafb8f43f6 100644
--- a/src/modules/illume-kbd-toggle/e_mod_main.c
+++ b/src/modules/illume-kbd-toggle/e_mod_main.c
@@ -83,11 +83,11 @@ _gc_init(E_Gadcon *gc, const char *name, const char *id, const char *style)
inst->handlers =
eina_list_append(inst->handlers,
- ecore_event_handler_add(E_EVENT_BORDER_FOCUS_IN,
+ ecore_event_handler_add(E_EVENT_CLIENT_FOCUS_IN,
_cb_border_focus_in, inst));
inst->handlers =
eina_list_append(inst->handlers,
- ecore_event_handler_add(E_EVENT_BORDER_REMOVE,
+ ecore_event_handler_add(E_EVENT_CLIENT_REMOVE,
_cb_border_remove, inst));
inst->handlers =
eina_list_append(inst->handlers,
@@ -151,14 +151,14 @@ static void
_cb_action_vkbd_enable(void *data, Evas_Object *obj __UNUSED__, const char *emission __UNUSED__, const char *source __UNUSED__)
{
Instance *inst;
- E_Border *bd;
+ E_Client *ec;
if (!(inst = data)) return;
- if (!(bd = e_border_focused_get())) return;
- if (bd->zone != inst->gcc->gadcon->zone) return;
- if (bd->client.vkbd.state >= ECORE_X_VIRTUAL_KEYBOARD_STATE_ON) return;
+ if (!(ec = e_client_focused_get())) return;
+ if (ec->zone != inst->gcc->gadcon->zone) return;
+ if (ec->vkbd.state >= ECORE_X_VIRTUAL_KEYBOARD_STATE_ON) return;
- ecore_x_e_virtual_keyboard_state_set(bd->client.win,
+ ecore_x_e_virtual_keyboard_state_set(e_client_util_win_get(ec),
ECORE_X_VIRTUAL_KEYBOARD_STATE_ON);
}
@@ -166,14 +166,14 @@ static void
_cb_action_vkbd_disable(void *data, Evas_Object *obj __UNUSED__, const char *emission __UNUSED__, const char *source __UNUSED__)
{
Instance *inst;
- E_Border *bd;
+ E_Client *ec;
if (!(inst = data)) return;
- if (!(bd = e_border_focused_get())) return;
- if (bd->zone != inst->gcc->gadcon->zone) return;
- if (bd->client.vkbd.state <= ECORE_X_VIRTUAL_KEYBOARD_STATE_OFF) return;
+ if (!(ec = e_client_focused_get())) return;
+ if (ec->zone != inst->gcc->gadcon->zone) return;
+ if (ec->vkbd.state <= ECORE_X_VIRTUAL_KEYBOARD_STATE_OFF) return;
- ecore_x_e_virtual_keyboard_state_set(bd->client.win,
+ ecore_x_e_virtual_keyboard_state_set(e_client_util_win_get(ec),
ECORE_X_VIRTUAL_KEYBOARD_STATE_OFF);
}
@@ -181,15 +181,15 @@ static Eina_Bool
_cb_border_focus_in(void *data, int type __UNUSED__, void *event)
{
Instance *inst;
- E_Event_Border_Focus_In *ev;
- E_Border *bd;
+ E_Event_Client *ev;
+ E_Client *ec;
if (!(inst = data)) return ECORE_CALLBACK_PASS_ON;
ev = event;
- if (ev->border->stolen) return ECORE_CALLBACK_PASS_ON;
- if (!(bd = ev->border)) return ECORE_CALLBACK_PASS_ON;
- if (bd->zone != inst->gcc->gadcon->zone) return ECORE_CALLBACK_PASS_ON;
- _set_btn_icon(inst->o_toggle, bd->client.vkbd.state);
+ if (ev->ec->stolen) return ECORE_CALLBACK_PASS_ON;
+ if (!(ec = ev->ec)) return ECORE_CALLBACK_PASS_ON;
+ if (ec->zone != inst->gcc->gadcon->zone) return ECORE_CALLBACK_PASS_ON;
+ _set_btn_icon(inst->o_toggle, ec->vkbd.state);
return ECORE_CALLBACK_PASS_ON;
}
@@ -208,17 +208,17 @@ _cb_border_property(void *data, int type __UNUSED__, void *event)
{
Instance *inst;
Ecore_X_Event_Window_Property *ev;
- E_Border *bd;
+ E_Client *ec;
ev = event;
if (ev->atom != ECORE_X_ATOM_E_VIRTUAL_KEYBOARD_STATE)
return ECORE_CALLBACK_PASS_ON;
- if (!(bd = e_border_find_by_client_window(ev->win)))
+ if (!(ec = e_pixmap_find_client(E_PIXMAP_TYPE_X, ev->win)))
return ECORE_CALLBACK_PASS_ON;
- if (!bd->focused) return ECORE_CALLBACK_PASS_ON;
+ if (!ec->focused) return ECORE_CALLBACK_PASS_ON;
if (!(inst = data)) return ECORE_CALLBACK_PASS_ON;
- if (bd->zone != inst->gcc->gadcon->zone) return ECORE_CALLBACK_PASS_ON;
- _set_btn_icon(inst->o_toggle, bd->client.vkbd.state);
+ if (ec->zone != inst->gcc->gadcon->zone) return ECORE_CALLBACK_PASS_ON;
+ _set_btn_icon(inst->o_toggle, ec->vkbd.state);
return ECORE_CALLBACK_PASS_ON;
}
diff --git a/src/modules/illume-keyboard/e_kbd_int.c b/src/modules/illume-keyboard/e_kbd_int.c
index 9ac965ee06..180f762f16 100644
--- a/src/modules/illume-keyboard/e_kbd_int.c
+++ b/src/modules/illume-keyboard/e_kbd_int.c
@@ -505,7 +505,8 @@ _e_kbd_int_zoomkey_down(E_Kbd_Int *ki)
const Eina_List *l;
if (!ki->zoomkey.popup) return;
- e_object_del(E_OBJECT(ki->zoomkey.popup));
+ evas_object_hide(ki->zoomkey.popup);
+ evas_object_del(ki->zoomkey.popup);
ki->zoomkey.popup = NULL;
ki->zoomkey.layout_obj = NULL;
ki->zoomkey.sublayout_obj = NULL;
@@ -528,14 +529,12 @@ _e_kbd_int_zoomkey_up(E_Kbd_Int *ki)
int sx, sy, sw, sh;
if (ki->zoomkey.popup) return;
- ki->zoomkey.popup = e_popup_new(ki->win->border->zone, -1, -1, 1, 1);
- e_popup_layer_set(ki->zoomkey.popup, E_COMP_CANVAS_LAYER_LAYOUT, 190);
- o = _theme_obj_new(ki->zoomkey.popup->evas, ki->themedir,
+ o = _theme_obj_new(e_comp_get(ki->win)->evas, ki->themedir,
"e/modules/kbd/zoom/default");
ki->zoomkey.base_obj = o;
- o = e_layout_add(ki->zoomkey.popup->evas);
+ o = e_layout_add(e_comp_get(ki->win)->evas);
e_layout_virtual_size_set(o, 100, 100);
edje_object_part_swallow(ki->zoomkey.base_obj, "e.swallow.content", o);
evas_object_show(o);
@@ -543,7 +542,7 @@ _e_kbd_int_zoomkey_up(E_Kbd_Int *ki)
e_layout_virtual_size_get(ki->layout_obj, &vw, &vh);
- o = e_layout_add(ki->zoomkey.popup->evas);
+ o = e_layout_add(e_comp_get(ki->win)->evas);
e_layout_virtual_size_set(o, vw, vh);
e_layout_pack(ki->zoomkey.layout_obj, o);
e_layout_child_move(o, 0, 0);
@@ -561,7 +560,7 @@ _e_kbd_int_zoomkey_up(E_Kbd_Int *ki)
int selected;
ky = l->data;
- o = _theme_obj_new(ki->zoomkey.popup->evas, ki->themedir,
+ o = _theme_obj_new(e_comp_get(ki->win)->evas, ki->themedir,
"e/modules/kbd/zoomkey/default");
label = "";
icon = NULL;
@@ -574,7 +573,7 @@ _e_kbd_int_zoomkey_up(E_Kbd_Int *ki)
edje_object_part_text_set(o, "e.text.label", label);
- o2 = e_icon_add(ki->zoomkey.popup->evas);
+ o2 = e_icon_add(e_comp_get(ki->win)->evas);
e_icon_fill_inside_set(o2, 1);
// e_icon_scale_up_set(o2, 0);
edje_object_part_swallow(o, "e.swallow.content", o2);
@@ -613,21 +612,18 @@ _e_kbd_int_zoomkey_up(E_Kbd_Int *ki)
}
edje_object_size_min_calc(ki->zoomkey.base_obj, &vw, &vh);
- e_zone_useful_geometry_get(ki->win->border->zone, &sx, &sy, &sw, &sh);
+ e_zone_useful_geometry_get(ki->win->client->zone, &sx, &sy, &sw, &sh);
sh -= ki->win->h;
mw = sw;
if ((vw > 0) && (mw > vw)) mw = vw;
mh = sh;
if ((vh > 0) && (mh > vh)) mh = vh;
- e_popup_move_resize(ki->zoomkey.popup,
+ ki->zoomkey.popup = e_comp_object_util_add(ki->zoomkey.base_obj, E_COMP_OBJECT_TYPE_POPUP);
+ evas_object_layer_set(ki->zoomkey.popup, E_LAYER_CLIENT_EDGE);
+ evas_object_geometry_set(ki->zoomkey.popup,
sx + ((sw - mw) / 2), sy + ((sh - mh) / 2), mw, mh);
- evas_object_resize(ki->zoomkey.base_obj,
- ki->zoomkey.popup->w, ki->zoomkey.popup->h);
- evas_object_show(ki->zoomkey.base_obj);
- e_popup_content_set(ki->zoomkey.popup, ki->zoomkey.base_obj);
- e_popup_show(ki->zoomkey.popup);
- e_popup_layer_set(ki->zoomkey.popup, E_COMP_CANVAS_LAYER_LAYOUT, 190);
+ evas_object_show(ki->zoomkey.popup);
}
static void
@@ -1410,7 +1406,8 @@ _e_kbd_int_dictlist_down(E_Kbd_Int *ki)
char *str;
if (!ki->dictlist.popup) return;
- e_object_del(E_OBJECT(ki->dictlist.popup));
+ evas_object_hide(ki->dictlist.popup);
+ evas_object_del(ki->dictlist.popup);
ki->dictlist.popup = NULL;
EINA_LIST_FREE(ki->dictlist.matches, str)
eina_stringshare_del(str);
@@ -1452,14 +1449,11 @@ _e_kbd_int_dictlist_up(E_Kbd_Int *ki)
if (ki->dictlist.popup) return;
- ki->dictlist.popup = e_popup_new(ki->win->border->zone, -1, -1, 1, 1);
- e_popup_layer_set(ki->dictlist.popup, E_COMP_CANVAS_LAYER_LAYOUT, 190);
-
- o = _theme_obj_new(ki->dictlist.popup->evas, ki->themedir,
+ o = _theme_obj_new(e_comp_get(ki->win)->evas, ki->themedir,
"e/modules/kbd/match/default");
ki->dictlist.base_obj = o;
- o = e_widget_ilist_add(ki->dictlist.popup->evas,
+ o = e_widget_ilist_add(e_comp_get(ki->win)->evas,
(32 * e_scale), (32 * e_scale), NULL);
e_widget_ilist_selector_set(o, 1);
e_widget_ilist_freeze(o);
@@ -1545,16 +1539,15 @@ _e_kbd_int_dictlist_up(E_Kbd_Int *ki)
ki->dictlist.ilist_obj);
edje_object_size_min_calc(ki->dictlist.base_obj, &mw, &mh);
- e_zone_useful_geometry_get(ki->win->border->zone, NULL, NULL, NULL, &sh);
+ e_zone_useful_geometry_get(ki->win->client->zone, NULL, NULL, NULL, &sh);
mw = ki->win->w;
if (mh > (sh - ki->win->h)) mh = (sh - ki->win->h);
- e_popup_move_resize(ki->dictlist.popup, 0, ki->win->y - mh, mw, mh);
- evas_object_resize(ki->dictlist.base_obj,
- ki->dictlist.popup->w, ki->dictlist.popup->h);
- evas_object_show(ki->dictlist.base_obj);
- e_popup_content_set(ki->dictlist.popup, ki->dictlist.base_obj);
- e_popup_show(ki->dictlist.popup);
+ ki->dictlist.popup = e_comp_object_util_add(ki->dictlist.base_obj, E_COMP_OBJECT_TYPE_POPUP);
+ evas_object_layer_set(ki->dictlist.popup, E_LAYER_CLIENT_EDGE);
+ evas_object_geometry_set(ki->dictlist.popup, 0, ki->win->y - mh, mw, mh);
+
+ evas_object_show(ki->dictlist.popup);
_e_kbd_int_matchlist_down(ki);
}
@@ -1564,7 +1557,8 @@ _e_kbd_int_matchlist_down(E_Kbd_Int *ki)
char *str;
if (!ki->matchlist.popup) return;
- e_object_del(E_OBJECT(ki->matchlist.popup));
+ evas_object_hide(ki->matchlist.popup);
+ evas_object_del(ki->matchlist.popup);
ki->matchlist.popup = NULL;
EINA_LIST_FREE(ki->matchlist.matches, str)
eina_stringshare_del(str);
@@ -1599,14 +1593,12 @@ _e_kbd_int_matchlist_up(E_Kbd_Int *ki)
if (!e_kbd_buf_string_matches_get(ki->kbuf)) return;
if (ki->matchlist.popup) return;
- ki->matchlist.popup = e_popup_new(ki->win->border->zone, -1, -1, 1, 1);
- e_popup_layer_set(ki->matchlist.popup, E_COMP_CANVAS_LAYER_LAYOUT, 190);
- o = _theme_obj_new(ki->matchlist.popup->evas, ki->themedir,
+ o = _theme_obj_new(e_comp_get(ki->win)->evas, ki->themedir,
"e/modules/kbd/match/default");
ki->matchlist.base_obj = o;
- o = e_widget_ilist_add(ki->matchlist.popup->evas,
+ o = e_widget_ilist_add(e_comp_get(ki->win)->evas,
(32 * e_scale), (32 * e_scale), NULL);
e_widget_ilist_selector_set(o, 1);
ki->matchlist.ilist_obj = o;
@@ -1649,16 +1641,14 @@ _e_kbd_int_matchlist_up(E_Kbd_Int *ki)
edje_extern_object_min_size_set(ki->matchlist.ilist_obj, 0, 0);
edje_object_part_swallow(ki->matchlist.base_obj, "e.swallow.content",
ki->matchlist.ilist_obj);
- e_zone_useful_geometry_get(ki->win->border->zone, NULL, NULL, NULL, &sh);
+ e_zone_useful_geometry_get(ki->win->client->zone, NULL, NULL, NULL, &sh);
mw = ki->win->w;
if (mh > (sh - ki->win->h)) mh = (sh - ki->win->h);
- e_popup_move_resize(ki->matchlist.popup,
+ ki->matchlist.popup = e_comp_object_util_add(ki->matchlist.base_obj, E_COMP_OBJECT_TYPE_POPUP);
+ evas_object_layer_set(ki->matchlist.popup, E_LAYER_CLIENT_EDGE);
+ evas_object_geometry_set(ki->matchlist.popup,
ki->win->x, ki->win->y - mh, mw, mh);
- evas_object_resize(ki->matchlist.base_obj,
- ki->matchlist.popup->w, ki->matchlist.popup->h);
- evas_object_show(ki->matchlist.base_obj);
- e_popup_content_set(ki->matchlist.popup, ki->matchlist.base_obj);
- e_popup_show(ki->matchlist.popup);
+ evas_object_show(ki->matchlist.popup);
_e_kbd_int_dictlist_down(ki);
}
@@ -1736,7 +1726,7 @@ e_kbd_int_new(const char *themedir, const char *syskbds, const char *sysdicts)
if (syskbds) ki->syskbds = eina_stringshare_add(syskbds);
if (sysdicts) ki->sysdicts = eina_stringshare_add(sysdicts);
zone = e_util_zone_current_get(e_manager_current_get());
- ki->win = e_win_new(zone->container);
+ ki->win = e_win_new(zone->comp);
states[0] = ECORE_X_WINDOW_STATE_SKIP_TASKBAR;
states[1] = ECORE_X_WINDOW_STATE_SKIP_PAGER;
ecore_x_netwm_window_state_set(ki->win->evas_win, states, 2);
@@ -1813,13 +1803,13 @@ e_kbd_int_new(const char *themedir, const char *syskbds, const char *sysdicts)
ecore_event_handler_add(ECORE_X_EVENT_CLIENT_MESSAGE,
_e_kbd_int_cb_client_message, ki);
ki->kbd_move_hdl =
- ecore_event_handler_add(E_EVENT_BORDER_MOVE,
+ ecore_event_handler_add(E_EVENT_CLIENT_MOVE,
_e_kbd_int_cb_border_move, ki);
e_win_show(ki->win);
- ki->win->border->user_skip_winlist = 1;
- ki->win->border->lock_focus_in = 1;
- ki->win->border->lock_focus_out = 1;
+ ki->win->client->user_skip_winlist = 1;
+ ki->win->client->lock_focus_in = 1;
+ ki->win->client->lock_focus_out = 1;
return ki;
}
@@ -1866,12 +1856,12 @@ _theme_obj_new(Evas *e, const char *custom_dir, const char *group)
static Eina_Bool
_e_kbd_int_cb_border_move(void *data, int type __UNUSED__, void *event)
{
- E_Event_Border_Move *ev;
+ E_Event_Client *ev;
E_Kbd_Int *ki;
ev = event;
if (!(ki = data)) return ECORE_CALLBACK_PASS_ON;
- if (ki->win->border != ev->border) return ECORE_CALLBACK_PASS_ON;
+ if (ki->win->client != ev->ec) return ECORE_CALLBACK_PASS_ON;
_e_kbd_int_zoomkey_down(ki);
_e_kbd_int_matchlist_down(ki);
_e_kbd_int_dictlist_down(ki);
diff --git a/src/modules/illume-keyboard/e_kbd_int.h b/src/modules/illume-keyboard/e_kbd_int.h
index 033a891494..f8ada480b3 100644
--- a/src/modules/illume-keyboard/e_kbd_int.h
+++ b/src/modules/illume-keyboard/e_kbd_int.h
@@ -63,21 +63,21 @@ struct _E_Kbd_Int
unsigned char zoom : 1;
} down;
struct {
- E_Popup *popup;
+ Evas_Object *popup;
Evas_Object *base_obj, *ilist_obj;
} layoutlist;
struct {
- E_Popup *popup;
+ Evas_Object *popup;
Evas_Object *base_obj, *ilist_obj;
Eina_List *matches;
} matchlist;
struct {
- E_Popup *popup;
+ Evas_Object *popup;
Evas_Object *base_obj, *ilist_obj;
Eina_List *matches;
} dictlist;
struct {
- E_Popup *popup;
+ Evas_Object *popup;
Evas_Object *base_obj, *layout_obj, *sublayout_obj;
E_Kbd_Int_Key *pressed;
} zoomkey;
diff --git a/src/modules/illume-keyboard/e_mod_config.c b/src/modules/illume-keyboard/e_mod_config.c
index 561166d735..234bda67f8 100644
--- a/src/modules/illume-keyboard/e_mod_config.c
+++ b/src/modules/illume-keyboard/e_mod_config.c
@@ -110,7 +110,7 @@ il_kbd_config_save(void)
}
EAPI void
-il_kbd_config_show(E_Container *con, const char *params __UNUSED__)
+il_kbd_config_show(E_Comp *comp, const char *params __UNUSED__)
{
E_Config_Dialog *cfd;
E_Config_Dialog_View *v;
@@ -125,7 +125,7 @@ il_kbd_config_show(E_Container *con, const char *params __UNUSED__)
v->normal_win = 1;
v->scroll = 1;
- cfd = e_config_dialog_new(con, _("Keyboard Settings"), "E",
+ cfd = e_config_dialog_new(comp, _("Keyboard Settings"), "E",
"_config_illume_keyboard_settings",
"enlightenment/keyboard_settings", 0, v, NULL);
il_kbd_cfg->cfd = cfd;
diff --git a/src/modules/illume-keyboard/e_mod_config.h b/src/modules/illume-keyboard/e_mod_config.h
index d529a3f5de..403c6afff0 100644
--- a/src/modules/illume-keyboard/e_mod_config.h
+++ b/src/modules/illume-keyboard/e_mod_config.h
@@ -28,7 +28,7 @@ EAPI int il_kbd_config_init(E_Module *m);
EAPI int il_kbd_config_shutdown(void);
EAPI int il_kbd_config_save(void);
-EAPI void il_kbd_config_show(E_Container *con, const char *params);
+EAPI void il_kbd_config_show(E_Comp *comp, const char *params);
extern EAPI Il_Kbd_Config *il_kbd_cfg;
diff --git a/src/modules/illume-softkey/e_mod_main.c b/src/modules/illume-softkey/e_mod_main.c
index 4ccf737b08..801343a383 100644
--- a/src/modules/illume-softkey/e_mod_main.c
+++ b/src/modules/illume-softkey/e_mod_main.c
@@ -14,8 +14,8 @@ EAPI E_Module_Api e_modapi = { E_MODULE_API_VERSION, "Illume-Softkey" };
EAPI void *
e_modapi_init(E_Module *m)
{
- E_Manager *man;
- Eina_List *ml;
+ const Eina_List *l;
+ E_Comp *comp;
/* set module priority so we load before others */
e_module_priority_set(m, 85);
@@ -32,27 +32,19 @@ e_modapi_init(E_Module *m)
return NULL;
}
- /* loop through the managers (root windows) */
- EINA_LIST_FOREACH(e_manager_list(), ml, man)
+ EINA_LIST_FOREACH(e_comp_list(), l, comp)
{
- E_Container *con;
- Eina_List *cl;
+ E_Zone *zone;
+ Eina_List *zl;
- /* loop through containers */
- EINA_LIST_FOREACH(man->containers, cl, con)
+ /* for each zone, create a softkey window */
+ EINA_LIST_FOREACH(comp->zones, zl, zone)
{
- E_Zone *zone;
- Eina_List *zl;
-
- /* for each zone, create a softkey window */
- EINA_LIST_FOREACH(con->zones, zl, zone)
- {
- Sft_Win *swin;
-
- /* try to create new softkey window */
- if (!(swin = e_mod_sft_win_new(zone))) continue;
- swins = eina_list_append(swins, swin);
- }
+ Sft_Win *swin;
+
+ /* try to create new softkey window */
+ if (!(swin = e_mod_sft_win_new(zone))) continue;
+ swins = eina_list_append(swins, swin);
}
}
diff --git a/src/modules/illume-softkey/e_mod_sft_win.c b/src/modules/illume-softkey/e_mod_sft_win.c
index 5937d59089..c2fd2d04a5 100644
--- a/src/modules/illume-softkey/e_mod_sft_win.c
+++ b/src/modules/illume-softkey/e_mod_sft_win.c
@@ -16,7 +16,7 @@ static void _e_mod_sft_win_cb_forward(void *data, void *data2 __UNUSED__);
static void _e_mod_sft_win_cb_win_pos(void *data, void *data2 __UNUSED__);
static void _e_mod_sft_win_pos_toggle_top(Sft_Win *swin);
static void _e_mod_sft_win_pos_toggle_left(Sft_Win *swin);
-static E_Border *_e_mod_sft_win_border_get(E_Zone *zone, int x, int y);
+static E_Client *_e_mod_sft_win_border_get(E_Zone *zone, int x, int y);
Sft_Win *
e_mod_sft_win_new(E_Zone *zone)
@@ -45,7 +45,7 @@ e_mod_sft_win_new(E_Zone *zone)
swin));
/* create new window */
- swin->win = e_win_new(zone->container);
+ swin->win = e_win_new(zone->comp);
swin->win->data = swin;
/* set some properties on the window */
@@ -100,15 +100,15 @@ e_mod_sft_win_new(E_Zone *zone)
/* show the window */
e_win_show(swin->win);
- e_border_zone_set(swin->win->border, zone);
- swin->win->border->user_skip_winlist = 1;
+ e_client_zone_set(swin->win->client, zone);
+ swin->win->client->user_skip_winlist = 1;
- swin->win->border->lock_focus_in = 1;
- swin->win->border->lock_focus_out = 1;
+ swin->win->client->lock_focus_in = 1;
+ swin->win->client->lock_focus_out = 1;
/* set this window to be a dock window. This needs to be done after show
* as E will sometimes reset the window type */
- ecore_x_netwm_window_type_set(swin->win->evas_win, ECORE_X_WINDOW_TYPE_DOCK);
+ ecore_x_netwm_window_type_set(swin->win->evas_win, E_WINDOW_TYPE_DOCK);
/* tell conformant apps our position and size */
ecore_x_e_illume_softkey_geometry_set(zone->black_win,
@@ -179,7 +179,7 @@ _e_mod_sft_win_cb_win_prop(void *data, int type __UNUSED__, void *event)
ev = event;
if (!(swin = data)) return ECORE_CALLBACK_PASS_ON;
- if (ev->win != swin->win->container->manager->root)
+ if (ev->win != swin->win->comp->man->root)
return ECORE_CALLBACK_PASS_ON;
if (ev->atom != ATM_ENLIGHTENMENT_SCALE) return ECORE_CALLBACK_PASS_ON;
@@ -189,7 +189,7 @@ _e_mod_sft_win_cb_win_prop(void *data, int type __UNUSED__, void *event)
/* 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)
* If we do not do this, than softkey does not change w/ scale anymore */
- swin->win->border->client.icccm.fetch.size_pos_hints = 1;
+ 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));
@@ -393,7 +393,7 @@ _e_mod_sft_win_cb_win_pos(void *data, void *data2 __UNUSED__)
static void
_e_mod_sft_win_pos_toggle_top(Sft_Win *swin)
{
- E_Border *t, *b;
+ E_Client *t, *b;
int y, h, tpos, bpos;
if (!swin) return;
@@ -415,14 +415,14 @@ _e_mod_sft_win_pos_toggle_top(Sft_Win *swin)
t = _e_mod_sft_win_border_get(swin->zone, swin->zone->x, tpos);
b = _e_mod_sft_win_border_get(swin->zone, swin->zone->x, bpos);
- if (t) e_border_move(t, t->x, bpos);
- if (b) e_border_move(b, b->x, tpos);
+ if (t) evas_object_move(t->frame, t->x, bpos);
+ if (b) evas_object_move(b->frame, b->x, tpos);
}
static void
_e_mod_sft_win_pos_toggle_left(Sft_Win *swin)
{
- E_Border *l, *r;
+ E_Client *l, *r;
int h, lpos, rpos;
if (!swin) return;
@@ -437,25 +437,26 @@ _e_mod_sft_win_pos_toggle_left(Sft_Win *swin)
l = _e_mod_sft_win_border_get(swin->zone, lpos, h);
r = _e_mod_sft_win_border_get(swin->zone, rpos, h);
- if (l) e_border_move(l, rpos, l->y);
- if (r) e_border_move(r, lpos, r->y);
+ if (l) evas_object_move(l->frame, rpos, l->y);
+ if (r) evas_object_move(r->frame, lpos, r->y);
}
-static E_Border *
+static E_Client *
_e_mod_sft_win_border_get(E_Zone *zone, int x, int y)
{
Eina_List *l;
- E_Border *bd;
+ E_Client *ec;
if (!zone) return NULL;
- EINA_LIST_REVERSE_FOREACH(e_border_client_list(), l, bd)
+ EINA_LIST_REVERSE_FOREACH(zone->comp->clients, l, ec)
{
- if (bd->zone != zone) continue;
- if (!bd->visible) continue;
- if ((bd->x != x) || (bd->y != y)) continue;
- if (bd->client.illume.quickpanel.quickpanel) continue;
+ if (e_client_util_ignored_get(ec)) continue;
+ if (ec->zone != zone) continue;
+ if (!ec->visible) continue;
+ if ((ec->x != x) || (ec->y != y)) continue;
+ if (ec->illume.quickpanel.quickpanel) continue;
- return bd;
+ return ec;
}
return NULL;
}
diff --git a/src/modules/illume2/e_illume.c b/src/modules/illume2/e_illume.c
index 96d21a6675..09644ac0ac 100644
--- a/src/modules/illume2/e_illume.c
+++ b/src/modules/illume2/e_illume.c
@@ -56,32 +56,32 @@ e_illume_zone_config_get(int id)
/**
* Determine if a given border is an Indicator window.
*
- * @param bd The border to test.
+ * @param ec The border to test.
* @return EINA_TRUE if it is an Indicator window, EINA_FALSE otherwise.
*
- * @note If @p bd is NULL then this function will return EINA_FALSE.
+ * @note If @p ec is NULL then this function will return EINA_FALSE.
*
* @note It is assumed that Indicator windows are of type
- * ECORE_X_WINDOW_TYPE_DOCK.
+ * E_WINDOW_TYPE_DOCK.
*
* @ingroup E_Illume_Main_Group
*/
EAPI Eina_Bool
-e_illume_border_is_indicator(E_Border *bd)
+e_illume_client_is_indicator(E_Client *ec)
{
/* make sure we have a border */
- if (!bd) return EINA_FALSE;
+ if (!ec) return EINA_FALSE;
/* indicator windows should be set to dock type, so check for that */
- if (bd->client.netwm.type != ECORE_X_WINDOW_TYPE_DOCK) return EINA_FALSE;
+ if (ec->netwm.type != E_WINDOW_TYPE_DOCK) return EINA_FALSE;
/* we have a dock window, check against any matches in config */
/* check if we are matching on name */
if (_e_illume_cfg->policy.indicator.match.name)
{
- if ((bd->client.icccm.name) &&
- (!strcmp(bd->client.icccm.name,
+ if ((ec->icccm.name) &&
+ (!strcmp(ec->icccm.name,
_e_illume_cfg->policy.indicator.name)))
return EINA_TRUE;
}
@@ -89,8 +89,8 @@ e_illume_border_is_indicator(E_Border *bd)
/* check if we are matching on class */
if (_e_illume_cfg->policy.indicator.match.class)
{
- if ((bd->client.icccm.class) &&
- (!strcmp(bd->client.icccm.class,
+ if ((ec->icccm.class) &&
+ (!strcmp(ec->icccm.class,
_e_illume_cfg->policy.indicator.class)))
return EINA_TRUE;
}
@@ -100,7 +100,7 @@ e_illume_border_is_indicator(E_Border *bd)
{
const char *title;
- if ((title = e_border_name_get(bd)))
+ if ((title = e_client_name_get(ec)))
if (!strcmp(title, _e_illume_cfg->policy.indicator.title))
return EINA_TRUE;
}
@@ -112,35 +112,35 @@ e_illume_border_is_indicator(E_Border *bd)
/**
* Determine if a given border is a Softkey window.
*
- * @param bd The border to test.
+ * @param ec The border to test.
* @return EINA_TRUE if it is a Softkey window, EINA_FALSE otherwise.
*
- * @note If @p bd is NULL then this function will return EINA_FALSE.
+ * @note If @p ec is NULL then this function will return EINA_FALSE.
*
* @note It is assumed that Softkey windows are of type
- * ECORE_X_WINDOW_TYPE_DOCK.
+ * E_WINDOW_TYPE_DOCK.
*
* @ingroup E_Illume_Main_Group
*/
EAPI Eina_Bool
-e_illume_border_is_softkey(E_Border *bd)
+e_illume_client_is_softkey(E_Client *ec)
{
/* make sure we have a border */
- if (!bd) return EINA_FALSE;
+ if (!ec) return EINA_FALSE;
/* legacy code from illume 1 */
- if (bd->client.qtopia.soft_menu) return EINA_TRUE;
+ if (ec->qtopia.soft_menu) return EINA_TRUE;
/* softkey windows should be set to dock type, so check for that */
- if (bd->client.netwm.type != ECORE_X_WINDOW_TYPE_DOCK) return EINA_FALSE;
+ if (ec->netwm.type != E_WINDOW_TYPE_DOCK) return EINA_FALSE;
/* we have a softkey window, check against any matches in config */
/* check if we are matching on name */
if (_e_illume_cfg->policy.softkey.match.name)
{
- if ((bd->client.icccm.name) &&
- (!strcmp(bd->client.icccm.name,
+ if ((ec->icccm.name) &&
+ (!strcmp(ec->icccm.name,
_e_illume_cfg->policy.softkey.name)))
return EINA_TRUE;
}
@@ -148,8 +148,8 @@ e_illume_border_is_softkey(E_Border *bd)
/* check if we are matching on class */
if (_e_illume_cfg->policy.softkey.match.class)
{
- if ((bd->client.icccm.class) &&
- (!strcmp(bd->client.icccm.class,
+ if ((ec->icccm.class) &&
+ (!strcmp(ec->icccm.class,
_e_illume_cfg->policy.softkey.class)))
return EINA_TRUE;
}
@@ -159,7 +159,7 @@ e_illume_border_is_softkey(E_Border *bd)
{
const char *title;
- if ((title = e_border_name_get(bd)))
+ if ((title = e_client_name_get(ec)))
if (!strcmp(title, _e_illume_cfg->policy.softkey.title))
return EINA_TRUE;
}
@@ -171,34 +171,34 @@ e_illume_border_is_softkey(E_Border *bd)
/**
* Determine if a given border is a Keyboard window.
*
- * @param bd The border to test.
+ * @param ec The border to test.
* @return EINA_TRUE if it is a Keyboard window, EINA_FALSE otherwise.
*
- * @note If @p bd is NULL then this function will return EINA_FALSE.
+ * @note If @p ec is NULL then this function will return EINA_FALSE.
*
* @ingroup E_Illume_Main_Group
*/
EAPI Eina_Bool
-e_illume_border_is_keyboard(E_Border *bd)
+e_illume_client_is_keyboard(E_Client *ec)
{
/* make sure we have a border */
- if (!bd) return EINA_FALSE;
+ if (!ec) return EINA_FALSE;
/* check for specific flag first */
- if (bd->client.vkbd.vkbd) return EINA_TRUE;
+ if (ec->vkbd.vkbd) return EINA_TRUE;
/* legacy code from illume 1 */
- if ((bd->client.icccm.name) &&
- ((!strcmp(bd->client.icccm.name, "multitap-pad"))) &&
- (bd->client.netwm.state.skip_taskbar) &&
- (bd->client.netwm.state.skip_pager))
+ if ((ec->icccm.name) &&
+ ((!strcmp(ec->icccm.name, "multitap-pad"))) &&
+ (ec->netwm.state.skip_taskbar) &&
+ (ec->netwm.state.skip_pager))
return EINA_TRUE;
/* check if we are matching on name */
if (_e_illume_cfg->policy.vkbd.match.name)
{
- if ((bd->client.icccm.name) &&
- (!strcmp(bd->client.icccm.name,
+ if ((ec->icccm.name) &&
+ (!strcmp(ec->icccm.name,
_e_illume_cfg->policy.vkbd.name)))
return EINA_TRUE;
}
@@ -206,8 +206,8 @@ e_illume_border_is_keyboard(E_Border *bd)
/* check if we are matching on class */
if (_e_illume_cfg->policy.vkbd.match.class)
{
- if ((bd->client.icccm.class) &&
- (!strcmp(bd->client.icccm.class,
+ if ((ec->icccm.class) &&
+ (!strcmp(ec->icccm.class,
_e_illume_cfg->policy.vkbd.class)))
return EINA_TRUE;
}
@@ -217,7 +217,7 @@ e_illume_border_is_keyboard(E_Border *bd)
{
const char *title;
- if ((title = e_border_name_get(bd)))
+ if ((title = e_client_name_get(ec)))
if (!strcmp(title, _e_illume_cfg->policy.vkbd.title))
return EINA_TRUE;
}
@@ -229,30 +229,30 @@ e_illume_border_is_keyboard(E_Border *bd)
/**
* Determine if a given border is a Home window.
*
- * @param bd The border to test.
+ * @param ec The border to test.
* @return EINA_TRUE if it is a Home window, EINA_FALSE otherwise.
*
- * @note If @p bd is NULL then this function will return EINA_FALSE.
+ * @note If @p ec is NULL then this function will return EINA_FALSE.
*
* @ingroup E_Illume_Main_Group
*/
EAPI Eina_Bool
-e_illume_border_is_home(E_Border *bd)
+e_illume_client_is_home(E_Client *ec)
{
/* make sure we have a border */
- if (!bd) return EINA_FALSE;
+ if (!ec) return EINA_FALSE;
/* skip windows which are not either 'normal' windows, or 'unknown' windows
* NB: Let 'unknown' windows pass through as a safety */
- if ((bd->client.netwm.type != ECORE_X_WINDOW_TYPE_NORMAL) &&
- (bd->client.netwm.type != ECORE_X_WINDOW_TYPE_UNKNOWN))
+ if ((ec->netwm.type != E_WINDOW_TYPE_NORMAL) &&
+ (ec->netwm.type != E_WINDOW_TYPE_UNKNOWN))
return EINA_FALSE;
/* check if we are matching on name */
if (_e_illume_cfg->policy.home.match.name)
{
- if ((bd->client.icccm.name) &&
- (!strcmp(bd->client.icccm.name,
+ if ((ec->icccm.name) &&
+ (!strcmp(ec->icccm.name,
_e_illume_cfg->policy.home.name)))
return EINA_TRUE;
}
@@ -260,8 +260,8 @@ e_illume_border_is_home(E_Border *bd)
/* check if we are matching on class */
if (_e_illume_cfg->policy.home.match.class)
{
- if ((bd->client.icccm.class) &&
- (!strcmp(bd->client.icccm.class,
+ if ((ec->icccm.class) &&
+ (!strcmp(ec->icccm.class,
_e_illume_cfg->policy.home.class)))
return EINA_TRUE;
}
@@ -271,7 +271,7 @@ e_illume_border_is_home(E_Border *bd)
{
const char *title;
- if ((title = e_border_name_get(bd)))
+ if ((title = e_client_name_get(ec)))
if (!strcmp(title, _e_illume_cfg->policy.home.title))
return EINA_TRUE;
}
@@ -283,28 +283,28 @@ e_illume_border_is_home(E_Border *bd)
/**
* Determine if a given border is a splash screen.
*
- * @param bd The border to test.
+ * @param ec The border to test.
* @return EINA_TRUE if it is a splash screen, EINA_FALSE otherwise.
*
- * @note If @p bd is NULL then this function will return EINA_FALSE.
+ * @note If @p ec is NULL then this function will return EINA_FALSE.
*
* @ingroup E_Illume_Main_Group
*/
EAPI Eina_Bool
-e_illume_border_is_splash(E_Border *bd)
+e_illume_client_is_splash(E_Client *ec)
{
/* make sure we have a border */
- if (!bd) return EINA_FALSE;
+ if (!ec) return EINA_FALSE;
/* check actual type */
- if (bd->client.netwm.type == ECORE_X_WINDOW_TYPE_SPLASH) return EINA_TRUE;
+ if (ec->netwm.type == E_WINDOW_TYPE_SPLASH) return EINA_TRUE;
/* check for transient flag */
-// if (bd->client.icccm.transient_for != 0) return EINA_TRUE;
+// if (ec->icccm.transient_for != 0) return EINA_TRUE;
/* NB: may or may not need to handle these. Needs Testing
- if (bd->client.netwm.extra_types)
- printf("\t\tBorder has extra types: %s\n", bd->client.icccm.class);
+ if (ec->netwm.extra_types)
+ printf("\t\tBorder has extra types: %s\n", ec->icccm.class);
*/
/* return a fallback */
@@ -314,33 +314,33 @@ e_illume_border_is_splash(E_Border *bd)
/**
* Determine if a given border is a dialog.
*
- * @param bd The border to test.
+ * @param ec The border to test.
* @return EINA_TRUE if it is a dialog, EINA_FALSE otherwise.
*
- * @note If @p bd is NULL then this function will return EINA_FALSE.
+ * @note If @p ec is NULL then this function will return EINA_FALSE.
*
* @ingroup E_Illume_Main_Group
*/
EAPI Eina_Bool
-e_illume_border_is_dialog(E_Border *bd)
+e_illume_client_is_dialog(E_Client *ec)
{
/* make sure we have a border */
- if (!bd) return EINA_FALSE;
+ if (!ec) return EINA_FALSE;
/* check actual type */
- if (bd->client.netwm.type == ECORE_X_WINDOW_TYPE_DIALOG) return EINA_TRUE;
+ if (ec->netwm.type == E_WINDOW_TYPE_DIALOG) return EINA_TRUE;
/* check for transient flag */
- if (bd->client.icccm.transient_for != 0) return EINA_TRUE;
+ if (ec->icccm.transient_for != 0) return EINA_TRUE;
/* check for client leader */
/* NB: disabled currently as some GTK windows set this even tho they are
* not a dialog. */
-// if (bd->client.icccm.client_leader) return EINA_TRUE;
+// if (ec->icccm.client_leader) return EINA_TRUE;
/* NB: may or may not need to handle these. Needs Testing
- if (bd->client.netwm.extra_types)
- printf("\t\tBorder has extra types: %s\n", bd->client.icccm.class);
+ if (ec->netwm.extra_types)
+ printf("\t\tBorder has extra types: %s\n", ec->icccm.class);
*/
/* return a fallback */
@@ -350,22 +350,22 @@ e_illume_border_is_dialog(E_Border *bd)
/**
* Determine if a given border is a QT VCLSalFrame.
*
- * @param bd The border to test.
+ * @param ec The border to test.
* @return EINA_TRUE if it is a VCLSalFrame, EINA_FALSE otherwise.
*
- * @note If @p bd is NULL then this function will return EINA_FALSE.
+ * @note If @p ec is NULL then this function will return EINA_FALSE.
*
* @ingroup E_Illume_Main_Group
*/
EAPI Eina_Bool
-e_illume_border_is_qt_frame(E_Border *bd)
+e_illume_client_is_qt_frame(E_Client *ec)
{
/* make sure we have a border */
- if (!bd) return EINA_FALSE;
+ if (!ec) return EINA_FALSE;
/* make sure we have the icccm name and compare it */
- if ((bd->client.icccm.name) &&
- (!strncmp(bd->client.icccm.name, "VCLSalFrame", 11)))
+ if ((ec->icccm.name) &&
+ (!strncmp(ec->icccm.name, "VCLSalFrame", 11)))
return EINA_TRUE;
/* return a fallback */
@@ -375,21 +375,21 @@ e_illume_border_is_qt_frame(E_Border *bd)
/**
* Determine if a given border is a fullscreen window.
*
- * @param bd The border to test.
+ * @param ec The border to test.
* @return EINA_TRUE if it is fullscreen, EINA_FALSE otherwise.
*
- * @note If @p bd is NULL then this function will return EINA_FALSE.
+ * @note If @p ec is NULL then this function will return EINA_FALSE.
*
* @ingroup E_Illume_Main_Group
*/
EAPI Eina_Bool
-e_illume_border_is_fullscreen(E_Border *bd)
+e_illume_client_is_fullscreen(E_Client *ec)
{
/* make sure we have a border */
- if (!bd) return EINA_FALSE;
+ if (!ec) return EINA_FALSE;
/* check for fullscreen */
- if ((bd->fullscreen) || (bd->need_fullscreen)) return EINA_TRUE;
+ if ((ec->fullscreen) || (ec->need_fullscreen)) return EINA_TRUE;
/* return a fallback */
return EINA_FALSE;
@@ -398,67 +398,67 @@ e_illume_border_is_fullscreen(E_Border *bd)
/**
* Determine if a given border is an illume conformant window.
*
- * @param bd The border to test.
+ * @param ec The border to test.
* @return EINA_TRUE if it is conformant, EINA_FALSE otherwise.
*
- * @note If @p bd is NULL then this function will return EINA_FALSE.
+ * @note If @p ec is NULL then this function will return EINA_FALSE.
*
* @ingroup E_Illume_Main_Group
*/
EAPI Eina_Bool
-e_illume_border_is_conformant(E_Border *bd)
+e_illume_client_is_conformant(E_Client *ec)
{
/* make sure we have a border */
- if (!bd) return EINA_FALSE;
+ if (!ec) return EINA_FALSE;
/* return if it is conformant or not */
- return bd->client.illume.conformant.conformant;
+ return ec->illume.conformant.conformant;
}
/**
* Determine if a given border is a quickpanel window.
*
- * @param bd The border to test.
+ * @param ec The border to test.
* @return EINA_TRUE if it is a quickpanel, EINA_FALSE otherwise.
*
- * @note If @p bd is NULL then this function will return EINA_FALSE.
+ * @note If @p ec is NULL then this function will return EINA_FALSE.
*
* @ingroup E_Illume_Main_Group
*/
EAPI Eina_Bool
-e_illume_border_is_quickpanel(E_Border *bd)
+e_illume_client_is_quickpanel(E_Client *ec)
{
/* make sure we have a border */
- if (!bd) return EINA_FALSE;
+ if (!ec) return EINA_FALSE;
/* return if it is a quickpanel or not */
- return bd->client.illume.quickpanel.quickpanel;
+ return ec->illume.quickpanel.quickpanel;
}
/**
* Determine if the border request a fixed size.
*
- * @param bd The border to get the minium space for.
+ * @param ec The border to get the minium space for.
* @return EINA_TRUE if border requested fixed size, EINA_FALSE otherwise.
*
- * @note If @p bd is NULL then this function will return EINA_FALSE.
+ * @note If @p ec is NULL then this function will return EINA_FALSE.
*
* @ingroup E_Illume_Main_Group
*/
EAPI Eina_Bool
-e_illume_border_is_fixed_size(E_Border *bd)
+e_illume_client_is_fixed_size(E_Client *ec)
{
/* make sure we have a border */
- if (!bd) return EINA_FALSE;
+ if (!ec) return EINA_FALSE;
- if ((bd->client.icccm.min_w == bd->client.icccm.max_w) &&
- (bd->client.icccm.min_h == bd->client.icccm.max_h))
+ if ((ec->icccm.min_w == ec->icccm.max_w) &&
+ (ec->icccm.min_h == ec->icccm.max_h))
return EINA_TRUE;
- if ((bd->client.mwm.exists) &&
- !((bd->client.mwm.func & ECORE_X_MWM_HINT_FUNC_ALL) ||
- (bd->client.mwm.func & ECORE_X_MWM_HINT_FUNC_MAXIMIZE) ||
- (bd->client.mwm.func & ECORE_X_MWM_HINT_FUNC_RESIZE)))
+ if ((ec->mwm.exists) &&
+ !((ec->mwm.func & ECORE_X_MWM_HINT_FUNC_ALL) ||
+ (ec->mwm.func & ECORE_X_MWM_HINT_FUNC_MAXIMIZE) ||
+ (ec->mwm.func & ECORE_X_MWM_HINT_FUNC_RESIZE)))
return EINA_TRUE;
return EINA_FALSE;
@@ -467,34 +467,34 @@ e_illume_border_is_fixed_size(E_Border *bd)
/**
* Retrieves the minimum space required to display this border.
*
- * @param bd The border to get the minium space for.
+ * @param ec The border to get the minium space for.
* @param w Pointer to an integer into which the width is to be stored.
* @param h Pointer to an integer into which the height is to be stored.
*
- * @note if @p bd is NULL then @p w and @p h will return @c 0.
+ * @note if @p ec is NULL then @p w and @p h will return @c 0.
*
* @ingroup E_Illume_Main_Group
*/
EAPI void
-e_illume_border_min_get(E_Border *bd, int *w, int *h)
+e_illume_client_min_get(E_Client *ec, int *w, int *h)
{
if (w) *w = 0;
if (h) *h = 0;
- if (!bd) return;
+ if (!ec) return;
if (w)
{
- if (bd->client.icccm.base_w > bd->client.icccm.min_w)
- *w = bd->client.icccm.base_w;
+ if (ec->icccm.base_w > ec->icccm.min_w)
+ *w = ec->icccm.base_w;
else
- *w = bd->client.icccm.min_w;
+ *w = ec->icccm.min_w;
}
if (h)
{
- if (bd->client.icccm.base_h > bd->client.icccm.min_h)
- *h = bd->client.icccm.base_h;
+ if (ec->icccm.base_h > ec->icccm.min_h)
+ *h = ec->icccm.base_h;
else
- *h = bd->client.icccm.min_h;
+ *h = ec->icccm.min_h;
}
}
@@ -511,39 +511,38 @@ e_illume_border_min_get(E_Border *bd, int *w, int *h)
*
* @ingroup E_Illume_Main_Group
*/
-EAPI E_Border *
-e_illume_border_at_xy_get(E_Zone *zone, int x, int y)
+EAPI E_Client *
+e_illume_client_at_xy_get(E_Zone *zone, int x, int y)
{
Eina_List *l;
- E_Border *bd;
+ E_Client *ec;
/* make sure we have a zone */
if (!zone) return NULL;
/* loop the border client list */
- /* NB: We use e_border_client_list here, rather than
- * e_container_border_list, because e_border_client_list is faster.
- * This is done in reverse order so we get the most recent border first */
- EINA_LIST_REVERSE_FOREACH(e_border_client_list(), l, bd)
+ /* This is done in reverse order so we get the most recent border first */
+ EINA_LIST_REVERSE_FOREACH(zone->comp->clients, l, ec)
{
+ if (e_client_util_ignored_get(ec)) continue;
/* check zone and skip borders not on this zone */
- if (bd->zone != zone) continue;
+ if (ec->zone != zone) continue;
/* skip invisibles */
- if (!bd->visible) continue;
+ if (!ec->visible) continue;
/* check position against given coordinates */
- if ((bd->x != x) || (bd->y != y)) continue;
+ if ((ec->x != x) || (ec->y != y)) continue;
/* filter out borders we don't want */
- if (e_illume_border_is_indicator(bd)) continue;
- if (e_illume_border_is_softkey(bd)) continue;
- if (e_illume_border_is_keyboard(bd)) continue;
- if (e_illume_border_is_quickpanel(bd)) continue;
- if (e_illume_border_is_home(bd)) continue;
+ if (e_illume_client_is_indicator(ec)) continue;
+ if (e_illume_client_is_softkey(ec)) continue;
+ if (e_illume_client_is_keyboard(ec)) continue;
+ if (e_illume_client_is_quickpanel(ec)) continue;
+ if (e_illume_client_is_home(ec)) continue;
/* found one, return it */
- return bd;
+ return ec;
}
/* return a fallback */
@@ -553,36 +552,36 @@ e_illume_border_at_xy_get(E_Zone *zone, int x, int y)
/**
* Retrieve the parent of a given dialog.
*
- * @param bd The border to get the parent of.
+ * @param ec The border to get the parent of.
* @return The border's parent, or NULL if no parent exists.
*
- * @note If @p bd is NULL then this function will return NULL.
+ * @note If @p ec is NULL then this function will return NULL.
*
* @ingroup E_Illume_Main_Group
*/
-EAPI E_Border *
-e_illume_border_parent_get(E_Border *bd)
+EAPI E_Client *
+e_illume_client_parent_get(E_Client *ec)
{
/* make sure we have a border */
- if (!bd) return NULL;
+ if (!ec) return NULL;
/* check for border's parent */
- if (bd->parent) return bd->parent;
+ if (ec->parent) return ec->parent;
- /* NB: TEST CODE - may need to check bd->leader here */
- if (bd->leader)
- printf("\tDialog Has Leader: %s\n", bd->client.icccm.name);
+ /* NB: TEST CODE - may need to check ec->leader here */
+ if (ec->leader)
+ printf("\tDialog Has Leader: %s\n", ec->icccm.name);
/* check for transient */
- if (bd->client.icccm.transient_for)
+ if (ec->icccm.transient_for)
{
/* try to find this borders parent */
- return e_border_find_by_client_window(bd->client.icccm.transient_for);
+ return e_pixmap_find_client(E_PIXMAP_TYPE_X, ec->icccm.transient_for);
}
- else if (bd->client.icccm.client_leader)
+ else if (ec->icccm.client_leader)
{
/* NB: using client_leader as parent. THIS NEEDS THOROUGH TESTING !! */
- return e_border_find_by_client_window(bd->client.icccm.client_leader);
+ return e_pixmap_find_client(E_PIXMAP_TYPE_X, ec->icccm.client_leader);
}
/* return a fallback */
@@ -592,67 +591,67 @@ e_illume_border_parent_get(E_Border *bd)
/**
* Show a given border.
*
- * @param bd The border to show.
+ * @param ec The border to show.
*
- * @note If @p bd is NULL then this function will return.
+ * @note If @p ec is NULL then this function will return.
*
* @ingroup E_Illume_Main_Group
*/
EAPI void
-e_illume_border_show(E_Border *bd)
+e_illume_client_show(E_Client *ec)
{
/* make sure we have a border */
- if (!bd) return;
+ if (!ec) return;
- e_border_uniconify(bd);
- e_border_raise(bd);
- e_border_show(bd);
+ e_client_uniconify(ec);
+ evas_object_raise(ec->frame);
+ evas_object_show(ec->frame);
return;
#if 0
unsigned int visible = 1;
-
+#error this is totally fucked
/* NB: We handle shows this way so we don't get extra layout events from
* the e_border calls */
- e_container_border_lower(bd);
- e_container_shape_show(bd->shape);
- if (!bd->need_reparent) ecore_x_window_show(bd->client.win);
- e_hints_window_visible_set(bd);
- bd->visible = 1;
- bd->changes.visible = 1;
- ecore_x_window_prop_card32_set(bd->client.win, E_ATOM_MAPPED, &visible, 1);
- ecore_x_window_prop_card32_set(bd->client.win, E_ATOM_MANAGED, &visible, 1);
+ evas_object_lower(ec->frame);
+ e_container_shape_show(ec->shape);
+ if (!ec->need_reparent) ecore_x_window_show(e_client_util_win_get(ec));
+ e_hints_window_visible_set(ec);
+ ec->visible = 1;
+ ec->changes.visible = 1;
+ ecore_x_window_prop_card32_set(e_client_util_win_get(ec), E_ATOM_MAPPED, &visible, 1);
+ ecore_x_window_prop_card32_set(e_client_util_win_get(ec), E_ATOM_MANAGED, &visible, 1);
#endif
}
/**
* Hide a given border.
*
- * @param bd The border to hide.
+ * @param ec The border to hide.
*
- * @note If @p bd is NULL then this function will return.
+ * @note If @p ec is NULL then this function will return.
*
* @ingroup E_Illume_Main_Group
*/
EAPI void
-e_illume_border_hide(E_Border *bd)
+e_illume_client_hide(E_Client *ec)
{
/* make sure we have a border */
- if (!bd) return;
+ if (!ec) return;
- e_border_iconify(bd);
+ e_client_iconify(ec);
return;
#if 0
unsigned int visible = 0;
-
+#error this is totally fucked
/* NB: We handle hides this way so we don't get extra layout events from
* the e_border calls */
- e_container_shape_hide(bd->shape);
- if (!bd->iconic) e_hints_window_hidden_set(bd);
- bd->visible = 0;
- bd->changes.visible = 1;
- ecore_x_window_prop_card32_set(bd->client.win, E_ATOM_MAPPED, &visible, 1);
+ e_container_shape_hide(ec->shape);
+ if (!ec->iconic) e_hints_window_hidden_set(ec);
+ ec->visible = 0;
+ ec->changes.visible = 1;
+ ecore_x_window_prop_card32_set(e_client_util_win_get(ec), E_ATOM_MAPPED, &visible, 1);
#endif
}
@@ -666,28 +665,27 @@ e_illume_border_hide(E_Border *bd)
*
* @ingroup E_Illume_Main_Group
*/
-EAPI E_Border *
-e_illume_border_indicator_get(E_Zone *zone)
+EAPI E_Client *
+e_illume_client_indicator_get(E_Zone *zone)
{
Eina_List *l;
- E_Border *bd;
+ E_Client *ec;
/* make sure we have a zone */
if (!zone) return NULL;
- /* loop the border client list */
- /* NB: We use e_border_client_list here, rather than
- * e_container_border_list, because e_border_client_list is faster */
- EINA_LIST_FOREACH(e_border_client_list(), l, bd)
+ /* loop the client list */
+ EINA_LIST_FOREACH(zone->comp->clients, l, ec)
{
+ if (e_client_util_ignored_get(ec)) continue;
/* check zone and skip borders not on this zone */
- if (bd->zone != zone) continue;
+ if (ec->zone != zone) continue;
/* skip borders that are not indicators */
- if (!e_illume_border_is_indicator(bd)) continue;
+ if (!e_illume_client_is_indicator(ec)) continue;
/* found one, return it */
- return bd;
+ return ec;
}
/* return a fallback */
@@ -706,9 +704,9 @@ e_illume_border_indicator_get(E_Zone *zone)
* @ingroup E_Illume_Main_Group
*/
EAPI void
-e_illume_border_indicator_pos_get(E_Zone *zone, int *x, int *y)
+e_illume_client_indicator_pos_get(E_Zone *zone, int *x, int *y)
{
- E_Border *ind;
+ E_Client *ind;
if (x) *x = 0;
if (y) *y = 0;
@@ -721,7 +719,7 @@ e_illume_border_indicator_pos_get(E_Zone *zone, int *x, int *y)
if (y) *y = zone->y;
/* try and get the Indicator on this zone */
- if (!(ind = e_illume_border_indicator_get(zone))) return;
+ if (!(ind = e_illume_client_indicator_get(zone))) return;
/* return Indicator position(s) */
if (x) *x = ind->x;
@@ -738,28 +736,27 @@ e_illume_border_indicator_pos_get(E_Zone *zone, int *x, int *y)
*
* @ingroup E_Illume_Main_Group
*/
-EAPI E_Border *
-e_illume_border_softkey_get(E_Zone *zone)
+EAPI E_Client *
+e_illume_client_softkey_get(E_Zone *zone)
{
Eina_List *l;
- E_Border *bd;
+ E_Client *ec;
/* make sure we have a zone */
if (!zone) return NULL;
/* loop the border client list */
- /* NB: We use e_border_client_list here, rather than
- * e_container_border_list, because e_border_client_list is faster */
- EINA_LIST_FOREACH(e_border_client_list(), l, bd)
+ EINA_LIST_FOREACH(zone->comp->clients, l, ec)
{
+ if (e_client_util_ignored_get(ec)) continue;
/* check zone and skip borders not on this zone */
- if (bd->zone != zone) continue;
+ if (ec->zone != zone) continue;
/* skip borders that are not indicators */
- if (!e_illume_border_is_softkey(bd)) continue;
+ if (!e_illume_client_is_softkey(ec)) continue;
/* found one, return it */
- return bd;
+ return ec;
}
/* return a fallback */
@@ -778,9 +775,9 @@ e_illume_border_softkey_get(E_Zone *zone)
* @ingroup E_Illume_Main_Group
*/
EAPI void
-e_illume_border_softkey_pos_get(E_Zone *zone, int *x, int *y)
+e_illume_client_softkey_pos_get(E_Zone *zone, int *x, int *y)
{
- E_Border *sft;
+ E_Client *sft;
if (x) *x = 0;
if (y) *y = 0;
@@ -793,7 +790,7 @@ e_illume_border_softkey_pos_get(E_Zone *zone, int *x, int *y)
if (y) *y = zone->y;
/* try and get the Softkey on this zone */
- if (!(sft = e_illume_border_softkey_get(zone))) return;
+ if (!(sft = e_illume_client_softkey_get(zone))) return;
/* return Indicator position(s) */
if (x) *x = sft->x;
@@ -856,16 +853,16 @@ e_illume_keyboard_safe_app_region_get(E_Zone *zone, int *x, int *y, int *w, int
/* if we don't have a border, get out */
/* NB: This basically means that we have the vkbd structure, but no
* app or module present to act as the vkbd */
- if (!_e_illume_kbd->border) return;
+ if (!_e_illume_kbd->client) return;
/* if the keyboard border is not on this zone, get out */
- if (_e_illume_kbd->border->zone != zone) return;
+ if (_e_illume_kbd->client->zone != zone) return;
if (!_e_illume_kbd->animator)
{
if (h)
{
- *h -= _e_illume_kbd->border->h;
+ *h -= _e_illume_kbd->client->h;
if (*h < 0) *h = 0;
}
}
@@ -881,28 +878,27 @@ e_illume_keyboard_safe_app_region_get(E_Zone *zone, int *x, int *y, int *w, int
*
* @ingroup E_Illume_Main_Group
*/
-EAPI E_Border *
-e_illume_border_home_get(E_Zone *zone)
+EAPI E_Client *
+e_illume_client_home_get(E_Zone *zone)
{
- E_Border *bd;
+ E_Client *ec;
Eina_List *l;
/* make sure we have a zone */
if (!zone) return NULL;
/* loop the border client list */
- /* NB: We use e_border_client_list here, rather than
- * e_container_border_list, because e_border_client_list is faster */
- EINA_LIST_FOREACH(e_border_client_list(), l, bd)
+ EINA_LIST_FOREACH(zone->comp->clients, l, ec)
{
+ if (e_client_util_ignored_get(ec)) continue;
/* check zone and skip borders not on this zone */
- if (bd->zone != zone) continue;
+ if (ec->zone != zone) continue;
/* skip borders that are not home windows */
- if (!e_illume_border_is_home(bd)) continue;
+ if (!e_illume_client_is_home(ec)) continue;
/* found one, return it */
- return bd;
+ return ec;
}
/* return a fallback */
@@ -920,27 +916,26 @@ e_illume_border_home_get(E_Zone *zone)
* @ingroup E_Illume_Main_Group
*/
EAPI Eina_List *
-e_illume_border_home_borders_get(E_Zone *zone)
+e_illume_client_home_borders_get(E_Zone *zone)
{
Eina_List *ret = NULL, *l;
- E_Border *bd;
+ E_Client *ec;
/* make sure we have a zone */
if (!zone) return NULL;
/* loop the border client list */
- /* NB: We use e_border_client_list here, rather than
- * e_container_border_list, because e_border_client_list is faster */
- EINA_LIST_FOREACH(e_border_client_list(), l, bd)
+ EINA_LIST_FOREACH(zone->comp->clients, l, ec)
{
+ if (e_client_util_ignored_get(ec)) continue;
/* check zone and skip borders not on this zone */
- if (bd->zone != zone) continue;
+ if (ec->zone != zone) continue;
/* skip borders that are not home windows */
- if (!e_illume_border_is_home(bd)) continue;
+ if (!e_illume_client_is_home(ec)) continue;
/* found one, append it to the list */
- ret = eina_list_append(ret, bd);
+ ret = eina_list_append(ret, ec);
}
/* return the list */
diff --git a/src/modules/illume2/e_illume.h b/src/modules/illume2/e_illume.h
index 4db00b753f..010fcb8e67 100644
--- a/src/modules/illume2/e_illume.h
+++ b/src/modules/illume2/e_illume.h
@@ -64,7 +64,7 @@ struct _E_Illume_Keyboard
{
E_Object e_obj_inherit;
- E_Border *border;
+ E_Client *client;
Ecore_Timer *timer;
Ecore_Animator *animator;
@@ -150,35 +150,35 @@ struct _E_Illume_Policy
* do in here.
* @warning Policies are required to implement this function. */
- void (*border_add) (E_Border *bd);
+ void (*border_add) (E_Client *ec);
/**< pointer to the function that Illume will call when a new border
* gets added. @note This function is optional. */
- void (*border_del) (E_Border *bd);
+ void (*border_del) (E_Client *ec);
/**< pointer to the function that Illume will call when a border gets
* deleted. @note This function is optional. */
- void (*border_focus_in) (E_Border *bd);
+ void (*border_focus_in) (E_Client *ec);
/**< pointer to the function that Illume will call when a border gets
* focus. @note This function is optional. */
- void (*border_focus_out) (E_Border *bd);
+ void (*border_focus_out) (E_Client *ec);
/**< pointer to the function that Illume will call when a border loses
* focus. @note This function is optional. */
- void (*border_activate) (E_Border *bd);
+ void (*border_activate) (E_Client *ec);
/**< pointer to the function that Illume will call when a border gets
* an activate message. @note This function is optional. */
- void (*border_post_fetch) (E_Border *bd);
+ void (*border_post_fetch) (E_Client *ec);
/**< pointer to the function that Illume will call when E signals a
* border post fetch. @note This function is optional. */
- void (*border_post_assign) (E_Border *bd);
+ void (*border_post_assign) (E_Client *ec);
/**< pointer to the function that Illume will call when E signals a
* border post assign. @note This function is optional. */
- void (*border_show) (E_Border *bd);
+ void (*border_show) (E_Client *ec);
/**< pointer to the function that Illume will call when a border gets
* shown. @note This function is optional. */
@@ -199,12 +199,12 @@ struct _E_Illume_Policy
* requested a border get closed. This is usually signaled from the
* Softkey window. @note This function is optional. */
- void (*drag_start) (E_Border *bd);
+ void (*drag_start) (E_Client *ec);
/**< pointer to the function that Illume will call when the user has
* started to drag the Indicator/Softkey windows.
* @note This function is optional. */
- void (*drag_end) (E_Border *bd);
+ void (*drag_end) (E_Client *ec);
/**< pointer to the function that Illume will call when the user has
* stopped draging the Indicator/Softkey windows.
* @note This function is optional. */
@@ -337,39 +337,39 @@ struct _E_Illume_Quickpanel
EAPI E_Illume_Config_Zone *e_illume_zone_config_get(int id);
/* general functions */
-EAPI Eina_Bool e_illume_border_is_indicator(E_Border *bd);
-EAPI Eina_Bool e_illume_border_is_softkey(E_Border *bd);
-EAPI Eina_Bool e_illume_border_is_keyboard(E_Border *bd);
-EAPI Eina_Bool e_illume_border_is_home(E_Border *bd);
-EAPI Eina_Bool e_illume_border_is_splash(E_Border *bd);
-EAPI Eina_Bool e_illume_border_is_dialog(E_Border *bd);
-EAPI Eina_Bool e_illume_border_is_qt_frame(E_Border *bd);
-EAPI Eina_Bool e_illume_border_is_fullscreen(E_Border *bd);
-EAPI Eina_Bool e_illume_border_is_conformant(E_Border *bd);
-EAPI Eina_Bool e_illume_border_is_quickpanel(E_Border *bd);
-EAPI Eina_Bool e_illume_border_is_fixed_size(E_Border *bd);
-
-EAPI void e_illume_border_min_get(E_Border *bd, int *w, int *h);
-EAPI E_Border *e_illume_border_at_xy_get(E_Zone *zone, int x, int y);
-EAPI E_Border *e_illume_border_parent_get(E_Border *bd);
-EAPI void e_illume_border_show(E_Border *bd);
-EAPI void e_illume_border_hide(E_Border *bd);
+EAPI Eina_Bool e_illume_client_is_indicator(E_Client *ec);
+EAPI Eina_Bool e_illume_client_is_softkey(E_Client *ec);
+EAPI Eina_Bool e_illume_client_is_keyboard(E_Client *ec);
+EAPI Eina_Bool e_illume_client_is_home(E_Client *ec);
+EAPI Eina_Bool e_illume_client_is_splash(E_Client *ec);
+EAPI Eina_Bool e_illume_client_is_dialog(E_Client *ec);
+EAPI Eina_Bool e_illume_client_is_qt_frame(E_Client *ec);
+EAPI Eina_Bool e_illume_client_is_fullscreen(E_Client *ec);
+EAPI Eina_Bool e_illume_client_is_conformant(E_Client *ec);
+EAPI Eina_Bool e_illume_client_is_quickpanel(E_Client *ec);
+EAPI Eina_Bool e_illume_client_is_fixed_size(E_Client *ec);
+
+EAPI void e_illume_client_min_get(E_Client *ec, int *w, int *h);
+EAPI E_Client *e_illume_client_at_xy_get(E_Zone *zone, int x, int y);
+EAPI E_Client *e_illume_client_parent_get(E_Client *ec);
+EAPI void e_illume_client_show(E_Client *ec);
+EAPI void e_illume_client_hide(E_Client *ec);
/* indicator functions */
-EAPI E_Border *e_illume_border_indicator_get(E_Zone *zone);
-EAPI void e_illume_border_indicator_pos_get(E_Zone *zone, int *x, int *y);
+EAPI E_Client *e_illume_client_indicator_get(E_Zone *zone);
+EAPI void e_illume_client_indicator_pos_get(E_Zone *zone, int *x, int *y);
/* softkey functions */
-EAPI E_Border *e_illume_border_softkey_get(E_Zone *zone);
-EAPI void e_illume_border_softkey_pos_get(E_Zone *zone, int *x, int *y);
+EAPI E_Client *e_illume_client_softkey_get(E_Zone *zone);
+EAPI void e_illume_client_softkey_pos_get(E_Zone *zone, int *x, int *y);
/* keyboard functions */
EAPI E_Illume_Keyboard *e_illume_keyboard_get(void);
EAPI void e_illume_keyboard_safe_app_region_get(E_Zone *zone, int *x, int *y, int *w, int *h);
/* home functions */
-EAPI E_Border *e_illume_border_home_get(E_Zone *zone);
-EAPI Eina_List *e_illume_border_home_borders_get(E_Zone *zone);
+EAPI E_Client *e_illume_client_home_get(E_Zone *zone);
+EAPI Eina_List *e_illume_client_home_borders_get(E_Zone *zone);
/* quickpanel functions */
EAPI E_Illume_Quickpanel *e_illume_quickpanel_by_zone_get(E_Zone *zone);
diff --git a/src/modules/illume2/e_mod_config.c b/src/modules/illume2/e_mod_config.c
index 25623168bd..22dab15bdd 100644
--- a/src/modules/illume2/e_mod_config.c
+++ b/src/modules/illume2/e_mod_config.c
@@ -203,7 +203,7 @@ _e_mod_illume_config_new(void)
_e_illume_cfg->policy.vkbd.class = eina_stringshare_add("Virtual-Keyboard");
_e_illume_cfg->policy.vkbd.name = eina_stringshare_add("Virtual-Keyboard");
_e_illume_cfg->policy.vkbd.title = eina_stringshare_add("Virtual Keyboard");
- _e_illume_cfg->policy.vkbd.type = ECORE_X_WINDOW_TYPE_NORMAL;
+ _e_illume_cfg->policy.vkbd.type = E_WINDOW_TYPE_NORMAL;
_e_illume_cfg->policy.vkbd.match.class = 0;
_e_illume_cfg->policy.vkbd.match.name = 1;
_e_illume_cfg->policy.vkbd.match.title = 1;
@@ -215,7 +215,7 @@ _e_mod_illume_config_new(void)
eina_stringshare_add("Illume-Indicator");
_e_illume_cfg->policy.indicator.title =
eina_stringshare_add("Illume Indicator");
- _e_illume_cfg->policy.indicator.type = ECORE_X_WINDOW_TYPE_DOCK;
+ _e_illume_cfg->policy.indicator.type = E_WINDOW_TYPE_DOCK;
_e_illume_cfg->policy.indicator.match.class = 0;
_e_illume_cfg->policy.indicator.match.name = 1;
_e_illume_cfg->policy.indicator.match.title = 1;
@@ -227,7 +227,7 @@ _e_mod_illume_config_new(void)
eina_stringshare_add("Illume-Softkey");
_e_illume_cfg->policy.softkey.title =
eina_stringshare_add("Illume Softkey");
- _e_illume_cfg->policy.softkey.type = ECORE_X_WINDOW_TYPE_DOCK;
+ _e_illume_cfg->policy.softkey.type = E_WINDOW_TYPE_DOCK;
_e_illume_cfg->policy.softkey.match.class = 0;
_e_illume_cfg->policy.softkey.match.name = 1;
_e_illume_cfg->policy.softkey.match.title = 1;
@@ -236,7 +236,7 @@ _e_mod_illume_config_new(void)
_e_illume_cfg->policy.home.class = eina_stringshare_add("Illume-Home");
_e_illume_cfg->policy.home.name = eina_stringshare_add("Illume-Home");
_e_illume_cfg->policy.home.title = eina_stringshare_add("Illume Home");
- _e_illume_cfg->policy.home.type = ECORE_X_WINDOW_TYPE_NORMAL;
+ _e_illume_cfg->policy.home.type = E_WINDOW_TYPE_NORMAL;
_e_illume_cfg->policy.home.match.class = 0;
_e_illume_cfg->policy.home.match.name = 1;
_e_illume_cfg->policy.home.match.title = 1;
diff --git a/src/modules/illume2/e_mod_config_animation.c b/src/modules/illume2/e_mod_config_animation.c
index 9091789fd0..ea420d47c3 100644
--- a/src/modules/illume2/e_mod_config_animation.c
+++ b/src/modules/illume2/e_mod_config_animation.c
@@ -11,7 +11,7 @@ static Eina_Bool _e_mod_illume_config_animation_timeout(void *data);
Ecore_Timer *_anim_change_timer = NULL;
void
-e_mod_illume_config_animation_show(E_Container *con, const char *params __UNUSED__)
+e_mod_illume_config_animation_show(E_Comp *comp, const char *params __UNUSED__)
{
E_Config_Dialog *cfd;
E_Config_Dialog_View *v;
@@ -28,7 +28,7 @@ e_mod_illume_config_animation_show(E_Container *con, const char *params __UNUSED
v->normal_win = 1;
v->scroll = 1;
- cfd = e_config_dialog_new(con, _("Animation Settings"), "E",
+ cfd = e_config_dialog_new(comp, _("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 eec6131eea..9b4561fcc5 100644
--- a/src/modules/illume2/e_mod_config_policy.c
+++ b/src/modules/illume2/e_mod_config_policy.c
@@ -14,7 +14,7 @@ Ecore_Timer *_policy_change_timer = NULL;
const char *_policy_name = NULL;
void
-e_mod_illume_config_policy_show(E_Container *con, const char *params __UNUSED__)
+e_mod_illume_config_policy_show(E_Comp *comp, const char *params __UNUSED__)
{
E_Config_Dialog *cfd;
E_Config_Dialog_View *v;
@@ -30,7 +30,7 @@ e_mod_illume_config_policy_show(E_Container *con, const char *params __UNUSED__)
v->basic_only = 1;
v->normal_win = 1;
v->scroll = 1;
- cfd = e_config_dialog_new(con, _("Policy"), "E", "illume/policy",
+ cfd = e_config_dialog_new(comp, _("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 af6d1387a1..57a2354078 100644
--- a/src/modules/illume2/e_mod_config_windows.c
+++ b/src/modules/illume2/e_mod_config_windows.c
@@ -18,7 +18,7 @@ Ecore_Timer *_windows_change_timer = NULL;
/* public functions */
void
-e_mod_illume_config_windows_show(E_Container *con, const char *params __UNUSED__)
+e_mod_illume_config_windows_show(E_Comp *comp, const char *params __UNUSED__)
{
E_Config_Dialog *cfd;
E_Config_Dialog_View *v;
@@ -34,7 +34,7 @@ e_mod_illume_config_windows_show(E_Container *con, const char *params __UNUSED__
v->basic_only = 1;
v->normal_win = 1;
v->scroll = 1;
- cfd = e_config_dialog_new(con, _("Window Settings"), "E",
+ cfd = e_config_dialog_new(comp, _("Window Settings"), "E",
"illume/windows",
"preferences-system-windows", 0, v, NULL);
if (!cfd) return;
diff --git a/src/modules/illume2/e_mod_kbd.c b/src/modules/illume2/e_mod_kbd.c
index 6a7bab5a1f..98aa1af3a6 100644
--- a/src/modules/illume2/e_mod_kbd.c
+++ b/src/modules/illume2/e_mod_kbd.c
@@ -7,23 +7,23 @@ static Eina_Bool _e_mod_kbd_cb_border_remove(void *data __UNUSED__, int type __U
static Eina_Bool _e_mod_kbd_cb_border_focus_in(void *data __UNUSED__, int type __UNUSED__, void *event);
static Eina_Bool _e_mod_kbd_cb_border_focus_out(void *data __UNUSED__, int type __UNUSED__, void *event);
static Eina_Bool _e_mod_kbd_cb_border_property(void *data __UNUSED__, int type __UNUSED__, void *event);
-static void _e_mod_kbd_cb_border_pre_post_fetch(void *data __UNUSED__, void *data2);
+static void _e_mod_kbd_cb_border_pre_post_fetch(void *data __UNUSED__, E_Client *ec);
static void _e_mod_kbd_cb_free(E_Illume_Keyboard *kbd);
static Eina_Bool _e_mod_kbd_cb_delay_hide(void *data __UNUSED__);
static void _e_mod_kbd_hide(void);
static void _e_mod_kbd_slide(int visible, double len);
static Eina_Bool _e_mod_kbd_cb_animate(void *data __UNUSED__);
-static E_Illume_Keyboard *_e_mod_kbd_by_border_get(E_Border *bd);
-static void _e_mod_kbd_border_adopt(E_Border *bd);
+static E_Illume_Keyboard *_e_mod_kbd_by_border_get(E_Client *ec);
+static void _e_mod_kbd_border_adopt(E_Client *ec);
static void _e_mod_kbd_layout_send(void);
static void _e_mod_kbd_geometry_send(void);
static void _e_mod_kbd_changes_send(void);
/* local variables */
static Eina_List *_kbd_hdls = NULL;
-static E_Border_Hook *_kbd_hook = NULL;
+static E_Client_Hook *_kbd_hook = NULL;
static Ecore_X_Atom _focused_state = 0;
-static E_Border *_focused_border = NULL, *_prev_focused_border = NULL;
+static E_Client *_focused_border = NULL, *_prev_focused_border = NULL;
int
e_mod_kbd_init(void)
@@ -36,17 +36,17 @@ e_mod_kbd_init(void)
NULL));
_kbd_hdls =
eina_list_append(_kbd_hdls,
- ecore_event_handler_add(E_EVENT_BORDER_REMOVE,
+ ecore_event_handler_add(E_EVENT_CLIENT_REMOVE,
_e_mod_kbd_cb_border_remove,
NULL));
_kbd_hdls =
eina_list_append(_kbd_hdls,
- ecore_event_handler_add(E_EVENT_BORDER_FOCUS_IN,
+ ecore_event_handler_add(E_EVENT_CLIENT_FOCUS_IN,
_e_mod_kbd_cb_border_focus_in,
NULL));
_kbd_hdls =
eina_list_append(_kbd_hdls,
- ecore_event_handler_add(E_EVENT_BORDER_FOCUS_OUT,
+ ecore_event_handler_add(E_EVENT_CLIENT_FOCUS_OUT,
_e_mod_kbd_cb_border_focus_out,
NULL));
_kbd_hdls =
@@ -56,7 +56,7 @@ e_mod_kbd_init(void)
NULL));
/* add hooks for events we are interested in */
- _kbd_hook = e_border_hook_add(E_BORDER_HOOK_EVAL_PRE_POST_FETCH,
+ _kbd_hook = e_client_hook_add(E_CLIENT_HOOK_EVAL_PRE_POST_FETCH,
_e_mod_kbd_cb_border_pre_post_fetch, NULL);
/* initialize the device subsystem */
@@ -74,7 +74,7 @@ e_mod_kbd_shutdown(void)
e_mod_kbd_device_shutdown();
/* destroy the hook */
- e_border_hook_del(_kbd_hook);
+ e_client_hook_del(_kbd_hook);
/* destroy the handlers and free the list */
EINA_LIST_FREE(_kbd_hdls, hdl)
@@ -137,10 +137,10 @@ e_mod_kbd_show(void)
if (_e_illume_kbd->animator) ecore_animator_del(_e_illume_kbd->animator);
_e_illume_kbd->animator = NULL;
- if ((_focused_border) && (_e_illume_kbd->border))
+ if ((_focused_border) && (_e_illume_kbd->client))
{
- if (_e_illume_kbd->border->zone != _focused_border->zone)
- e_border_zone_set(_e_illume_kbd->border, _focused_border->zone);
+ if (_e_illume_kbd->client->zone != _focused_border->zone)
+ e_client_zone_set(_e_illume_kbd->client, _focused_border->zone);
}
/* if it's disabled, get out */
@@ -152,14 +152,14 @@ e_mod_kbd_show(void)
if (_e_illume_cfg->animation.vkbd.duration <= 0)
{
/* show the border */
- if (_e_illume_kbd->border)
+ if (_e_illume_kbd->client)
{
- e_comp_win_effect_set(_e_illume_kbd->border->cw, "move");
+ e_comp_object_effect_set(_e_illume_kbd->client->frame, "move");
/* unuse location */
- e_comp_win_effect_params_set(_e_illume_kbd->border->cw, 0, (int[]){0}, 1);
- if (!_e_illume_kbd->border->visible)
- e_border_show(_e_illume_kbd->border);
- e_border_raise(_e_illume_kbd->border);
+ e_comp_object_effect_params_set(_e_illume_kbd->client->frame, 0, (int[]){0}, 1);
+ if (!_e_illume_kbd->client->visible)
+ evas_object_show(_e_illume_kbd->client->frame);
+ evas_object_raise(_e_illume_kbd->client->frame);
}
_e_illume_kbd->visible = 1;
@@ -170,11 +170,11 @@ e_mod_kbd_show(void)
else
{
/* show the border */
- if (_e_illume_kbd->border)
+ if (_e_illume_kbd->client)
{
- if (!_e_illume_kbd->border->visible)
- e_border_show(_e_illume_kbd->border);
- e_border_raise(_e_illume_kbd->border);
+ if (!_e_illume_kbd->client->visible)
+ evas_object_show(_e_illume_kbd->client->frame);
+ evas_object_raise(_e_illume_kbd->client->frame);
}
/* animate it */
@@ -207,8 +207,8 @@ e_mod_kbd_toggle(void)
void
e_mod_kbd_fullscreen_set(E_Zone *zone, int fullscreen)
{
- if (!_e_illume_kbd->border) return;
- if (_e_illume_kbd->border->zone != zone) return;
+ if (!_e_illume_kbd->client) return;
+ if (_e_illume_kbd->client->zone != zone) return;
if ((!!fullscreen) != _e_illume_kbd->fullscreen)
_e_illume_kbd->fullscreen = fullscreen;
}
@@ -216,7 +216,7 @@ e_mod_kbd_fullscreen_set(E_Zone *zone, int fullscreen)
void
e_mod_kbd_layout_set(E_Illume_Keyboard_Layout layout)
{
- if (!_e_illume_kbd->border) return;
+ if (!_e_illume_kbd->client) return;
_e_illume_kbd->layout = layout;
_e_mod_kbd_layout_send();
}
@@ -245,15 +245,15 @@ _e_mod_kbd_cb_client_message(void *data __UNUSED__, int type __UNUSED__, void *e
static Eina_Bool
_e_mod_kbd_cb_border_remove(void *data __UNUSED__, int type __UNUSED__, void *event)
{
- E_Event_Border_Remove *ev;
+ E_Event_Client *ev;
E_Illume_Keyboard *kbd;
ev = event;
/* if we removed the focused border, reset some variables */
- if ((_prev_focused_border) && (_prev_focused_border == ev->border))
+ if ((_prev_focused_border) && (_prev_focused_border == ev->ec))
_prev_focused_border = NULL;
- if ((_focused_border) && (_focused_border == ev->border))
+ if ((_focused_border) && (_focused_border == ev->ec))
{
e_mod_kbd_hide();
_focused_border = NULL;
@@ -262,30 +262,30 @@ _e_mod_kbd_cb_border_remove(void *data __UNUSED__, int type __UNUSED__, void *ev
}
/* try to find the keyboard for this border */
- if (!(kbd = _e_mod_kbd_by_border_get(ev->border)))
+ if (!(kbd = _e_mod_kbd_by_border_get(ev->ec)))
return ECORE_CALLBACK_PASS_ON;
- if ((kbd->border) && (kbd->border == ev->border))
+ if ((kbd->client) && (kbd->client == ev->ec))
{
- kbd->border = NULL;
+ kbd->client = NULL;
if (kbd->waiting_borders)
{
- E_Border *bd;
+ E_Client *ec;
- bd = kbd->waiting_borders->data;
+ ec = kbd->waiting_borders->data;
kbd->waiting_borders =
eina_list_remove_list(kbd->waiting_borders, kbd->waiting_borders);
- _e_mod_kbd_border_adopt(bd);
+ _e_mod_kbd_border_adopt(ec);
}
if (kbd->visible)
{
- e_border_hide(ev->border, 2);
+ evas_object_hide(ev->ec->frame);
e_mod_kbd_hide();
}
}
- else if (!kbd->border)
- kbd->waiting_borders = eina_list_remove(kbd->waiting_borders, ev->border);
+ else if (!kbd->client)
+ kbd->waiting_borders = eina_list_remove(kbd->waiting_borders, ev->ec);
return ECORE_CALLBACK_PASS_ON;
}
@@ -293,14 +293,14 @@ _e_mod_kbd_cb_border_remove(void *data __UNUSED__, int type __UNUSED__, void *ev
static Eina_Bool
_e_mod_kbd_cb_border_focus_in(void *data __UNUSED__, int type __UNUSED__, void *event)
{
- E_Event_Border_Focus_In *ev;
+ E_Event_Client *ev;
ev = event;
- if (_e_mod_kbd_by_border_get(ev->border)) return ECORE_CALLBACK_PASS_ON;
+ if (_e_mod_kbd_by_border_get(ev->ec)) return ECORE_CALLBACK_PASS_ON;
/* set focused border for kbd */
- _focused_border = ev->border;
- _focused_state = ev->border->client.vkbd.state;
+ _focused_border = ev->ec;
+ _focused_state = ev->ec->vkbd.state;
if (_focused_state <= ECORE_X_VIRTUAL_KEYBOARD_STATE_OFF)
e_mod_kbd_hide();
@@ -313,10 +313,10 @@ _e_mod_kbd_cb_border_focus_in(void *data __UNUSED__, int type __UNUSED__, void *
static Eina_Bool
_e_mod_kbd_cb_border_focus_out(void *data __UNUSED__, int type __UNUSED__, void *event)
{
- E_Event_Border_Focus_Out *ev;
+ E_Event_Client *ev;
ev = event;
- if (_e_mod_kbd_by_border_get(ev->border)) return ECORE_CALLBACK_PASS_ON;
+ if (_e_mod_kbd_by_border_get(ev->ec)) return ECORE_CALLBACK_PASS_ON;
_prev_focused_border = _focused_border;
@@ -326,10 +326,10 @@ _e_mod_kbd_cb_border_focus_out(void *data __UNUSED__, int type __UNUSED__, void
/* tell the focused border it changed so layout gets udpated */
if (_prev_focused_border && (!e_object_is_del(E_OBJECT(_prev_focused_border))))
{
- if (!e_illume_border_is_conformant(_prev_focused_border))
+ if (!e_illume_client_is_conformant(_prev_focused_border))
{
_prev_focused_border->changes.size = 1;
- BD_CHANGED(_prev_focused_border);
+ EC_CHANGED(_prev_focused_border);
}
}
@@ -344,7 +344,7 @@ static Eina_Bool
_e_mod_kbd_cb_border_property(void *data __UNUSED__, int type __UNUSED__, void *event)
{
Ecore_X_Event_Window_Property *ev;
- E_Border *bd;
+ E_Client *ec;
int fullscreen = 0;
ev = event;
@@ -354,36 +354,36 @@ _e_mod_kbd_cb_border_property(void *data __UNUSED__, int type __UNUSED__, void *
return ECORE_CALLBACK_PASS_ON;
/* make sure we have a border */
- if (!(bd = e_border_find_by_client_window(ev->win)))
+ if (!(ec = e_pixmap_find_client(E_PIXMAP_TYPE_X, ev->win)))
return ECORE_CALLBACK_PASS_ON;
-// printf("Kbd Border Property Change: %s\n", bd->client.icccm.name);
+// printf("Kbd Border Property Change: %s\n", ec->icccm.name);
/* if it's not focused, we don't care */
- if ((!bd->focused) || (_e_mod_kbd_by_border_get(bd)))
+ if ((!ec->focused) || (_e_mod_kbd_by_border_get(ec)))
return ECORE_CALLBACK_PASS_ON;
/* NB: Not sure why, but we seem to need to fetch kbd state here. This could
* be a result of filtering the container_hook_layout. Not real happy
* with this because it is an X round-trip, but it is here because this
* needs more time to investigate. */
- e_hints_window_virtual_keyboard_state_get(bd);
+ e_hints_window_virtual_keyboard_state_get(ec);
- if ((_focused_border) && (_focused_border == bd))
+ if ((_focused_border) && (_focused_border == ec))
{
/* if focused state is the same, get out */
- if (_focused_state == bd->client.vkbd.state)
+ if (_focused_state == ec->vkbd.state)
return ECORE_CALLBACK_PASS_ON;
}
/* set our variables */
- _focused_border = bd;
- _focused_state = bd->client.vkbd.state;
+ _focused_border = ec;
+ _focused_state = ec->vkbd.state;
/* handle a border needing fullscreen keyboard */
- if ((bd->need_fullscreen) || (bd->fullscreen)) fullscreen = 1;
+ if ((ec->need_fullscreen) || (ec->fullscreen)) fullscreen = 1;
if (_e_illume_kbd->fullscreen != fullscreen)
- e_mod_kbd_fullscreen_set(bd->zone, fullscreen);
+ e_mod_kbd_fullscreen_set(ec->zone, fullscreen);
if (_focused_state <= ECORE_X_VIRTUAL_KEYBOARD_STATE_OFF)
e_mod_kbd_hide();
@@ -394,30 +394,27 @@ _e_mod_kbd_cb_border_property(void *data __UNUSED__, int type __UNUSED__, void *
}
static void
-_e_mod_kbd_cb_border_pre_post_fetch(void *data __UNUSED__, void *data2)
+_e_mod_kbd_cb_border_pre_post_fetch(void *data __UNUSED__, E_Client *ec)
{
- E_Border *bd;
-
- if (!(bd = data2)) return;
- if (!bd->new_client) return;
- if (_e_mod_kbd_by_border_get(bd)) return;
- if (e_illume_border_is_keyboard(bd))
+ if (!ec->new_client) return;
+ if (_e_mod_kbd_by_border_get(ec)) return;
+ if (e_illume_client_is_keyboard(ec))
{
- if (!_e_illume_kbd->border)
- _e_mod_kbd_border_adopt(bd);
+ if (!_e_illume_kbd->client)
+ _e_mod_kbd_border_adopt(ec);
else
{
_e_illume_kbd->waiting_borders =
- eina_list_append(_e_illume_kbd->waiting_borders, bd);
+ eina_list_append(_e_illume_kbd->waiting_borders, ec);
}
- bd->stolen = 1;
+ ec->stolen = 1;
}
}
static void
_e_mod_kbd_cb_free(E_Illume_Keyboard *kbd)
{
- E_Border *bd;
+ E_Client *ec;
/* destroy the animator if it exists */
if (kbd->animator) ecore_animator_del(kbd->animator);
@@ -428,8 +425,8 @@ _e_mod_kbd_cb_free(E_Illume_Keyboard *kbd)
kbd->timer = NULL;
/* free the list of waiting borders */
- EINA_LIST_FREE(kbd->waiting_borders, bd)
- bd->stolen = 0;
+ EINA_LIST_FREE(kbd->waiting_borders, ec)
+ ec->stolen = 0;
/* free the keyboard structure */
E_FREE(kbd);
@@ -461,14 +458,14 @@ _e_mod_kbd_hide(void)
/* if we are not animating, just hide it */
if (_e_illume_cfg->animation.vkbd.duration <= 0)
{
- if (_e_illume_kbd->border)
+ if (_e_illume_kbd->client)
{
- e_comp_win_effect_set(_e_illume_kbd->border->cw, "move");
+ e_comp_object_effect_set(_e_illume_kbd->client->frame, "move");
/* set location */
- e_comp_win_effect_params_set(_e_illume_kbd->border->cw, 1, (int[]){0, _e_illume_kbd->border->h}, 2);
+ e_comp_object_effect_params_set(_e_illume_kbd->client->frame, 1, (int[]){0, _e_illume_kbd->client->h}, 2);
/* use location */
- e_comp_win_effect_params_set(_e_illume_kbd->border->cw, 0, (int[]){1}, 1);
- e_border_hide(_e_illume_kbd->border, 2);
+ e_comp_object_effect_params_set(_e_illume_kbd->client->frame, 0, (int[]){1}, 1);
+ evas_object_hide(_e_illume_kbd->client->frame);
}
}
else
@@ -488,8 +485,8 @@ _e_mod_kbd_slide(int visible, double len)
_e_illume_kbd->len = len;
_e_illume_kbd->adjust_start = _e_illume_kbd->adjust;
_e_illume_kbd->adjust_end = 0;
- if ((visible) && (_e_illume_kbd->border))
- _e_illume_kbd->adjust_end = _e_illume_kbd->border->h;
+ if ((visible) && (_e_illume_kbd->client))
+ _e_illume_kbd->adjust_end = _e_illume_kbd->client->h;
if (!_e_illume_kbd->animator)
_e_illume_kbd->animator = ecore_animator_add(_e_mod_kbd_cb_animate, NULL);
}
@@ -516,14 +513,14 @@ _e_mod_kbd_cb_animate(void *data __UNUSED__)
_e_illume_kbd->adjust = ((_e_illume_kbd->adjust_end * v) +
(_e_illume_kbd->adjust_start * (1.0 - v)));
- if ((_e_illume_kbd->border && _e_illume_kbd->border->cw))
+ if (_e_illume_kbd->client)
{
- e_comp_win_effect_set(_e_illume_kbd->border->cw, "move");
+ e_comp_object_effect_set(_e_illume_kbd->client->frame, "move");
/* set location */
- e_comp_win_effect_params_set(_e_illume_kbd->border->cw, 1,
- (int[]){0, _e_illume_kbd->border->h - _e_illume_kbd->adjust}, 2);
+ e_comp_object_effect_params_set(_e_illume_kbd->client->frame, 1,
+ (int[]){0, _e_illume_kbd->client->h - _e_illume_kbd->adjust}, 2);
/* use location */
- e_comp_win_effect_params_set(_e_illume_kbd->border->cw, 0, (int[]){1}, 1);
+ e_comp_object_effect_params_set(_e_illume_kbd->client->frame, 0, (int[]){1}, 1);
}
if (t == _e_illume_kbd->len)
@@ -531,8 +528,8 @@ _e_mod_kbd_cb_animate(void *data __UNUSED__)
_e_illume_kbd->animator = NULL;
if (_focused_state <= ECORE_X_VIRTUAL_KEYBOARD_STATE_OFF)
{
- if (_e_illume_kbd->border)
- e_border_hide(_e_illume_kbd->border, 2);
+ if (_e_illume_kbd->client)
+ evas_object_hide(_e_illume_kbd->client->frame);
_e_illume_kbd->visible = 0;
}
else
@@ -548,43 +545,37 @@ _e_mod_kbd_cb_animate(void *data __UNUSED__)
}
static E_Illume_Keyboard *
-_e_mod_kbd_by_border_get(E_Border *bd)
+_e_mod_kbd_by_border_get(E_Client *ec)
{
Eina_List *l;
- E_Border *over;
+ E_Client *over;
- if ((!bd) || (!bd->stolen)) return NULL;
+ if ((!ec) || (!ec->stolen)) return NULL;
/* if this border is the one that vkbd is working with, return the kbd */
- if (_e_illume_kbd->border == bd) return _e_illume_kbd;
+ if (_e_illume_kbd->client == ec) return _e_illume_kbd;
/* loop the waiting borders */
EINA_LIST_FOREACH(_e_illume_kbd->waiting_borders, l, over)
- if (over == bd) return _e_illume_kbd;
+ if (over == ec) return _e_illume_kbd;
return NULL;
}
static void
-_e_mod_kbd_border_adopt(E_Border *bd)
+_e_mod_kbd_border_adopt(E_Client *ec)
{
- if ((!_e_illume_kbd) || (!bd)) return;
+ if ((!_e_illume_kbd) || (!ec)) return;
- _e_illume_kbd->border = bd;
+ _e_illume_kbd->client = ec;
if (!_e_illume_kbd->visible)
{
- E_Comp_Win *cw = bd->cw;
-
- if (!cw) cw = e_comp_win_find(bd->win);
- if (cw)
- {
- e_comp_win_effect_set(cw, "move");
- /* set location */
- e_comp_win_effect_params_set(cw, 1, (int[]){0, bd->h}, 2);
- /* use location */
- e_comp_win_effect_params_set(cw, 0, (int[]){1}, 1);
- }
+ e_comp_object_effect_set(ec->frame, "move");
+ /* set location */
+ e_comp_object_effect_params_set(ec->frame, 1, (int[]){0, ec->h}, 2);
+ /* use location */
+ e_comp_object_effect_params_set(ec->frame, 0, (int[]){1}, 1);
_e_mod_kbd_layout_send();
}
}
@@ -629,8 +620,8 @@ _e_mod_kbd_layout_send(void)
else if (_e_illume_kbd->layout == E_ILLUME_KEYBOARD_LAYOUT_NONE)
type = ECORE_X_VIRTUAL_KEYBOARD_STATE_OFF;
}
- if (_e_illume_kbd->border)
- ecore_x_e_virtual_keyboard_state_send(_e_illume_kbd->border->client.win, type);
+ if (_e_illume_kbd->client)
+ ecore_x_e_virtual_keyboard_state_send(e_client_util_win_get(_e_illume_kbd->client), type);
}
static void
@@ -640,28 +631,28 @@ _e_mod_kbd_geometry_send(void)
int y = 0;
/* make sure we have a keyboard border */
- if (!_e_illume_kbd->border) return;
+ if (!_e_illume_kbd->client) return;
/* no need. we send geometry only when kbd is visible or invisible */
/* adjust Y for keyboard visibility */
- //if (_e_illume_kbd->border->fx.y <= 0)
- y = _e_illume_kbd->border->y;
+ //if (_e_illume_kbd->client->fx.y <= 0)
+ y = _e_illume_kbd->client->y;
if (_focused_border) zone = _focused_border->zone;
- else zone = _e_illume_kbd->border->zone;
+ else zone = _e_illume_kbd->client->zone;
if (_e_illume_kbd->visible)
ecore_x_e_illume_keyboard_geometry_set(zone->black_win,
- _e_illume_kbd->border->x,
+ _e_illume_kbd->client->x,
y,
- _e_illume_kbd->border->w,
- _e_illume_kbd->border->h);
+ _e_illume_kbd->client->w,
+ _e_illume_kbd->client->h);
else
ecore_x_e_illume_keyboard_geometry_set(zone->black_win,
- _e_illume_kbd->border->x,
- _e_illume_kbd->border->h + y,
- _e_illume_kbd->border->w,
- _e_illume_kbd->border->h);
+ _e_illume_kbd->client->x,
+ _e_illume_kbd->client->h + y,
+ _e_illume_kbd->client->w,
+ _e_illume_kbd->client->h);
}
static void
@@ -671,26 +662,26 @@ _e_mod_kbd_changes_send(void)
(_prev_focused_border != _focused_border))
{
/* tell previous focused border it changed so layout udpates */
- if (_prev_focused_border->client.vkbd.state >
+ if (_prev_focused_border->vkbd.state >
ECORE_X_VIRTUAL_KEYBOARD_STATE_UNKNOWN)
{
- if (!e_illume_border_is_conformant(_prev_focused_border))
+ if (!e_illume_client_is_conformant(_prev_focused_border))
{
_prev_focused_border->changes.size = 1;
- BD_CHANGED(_prev_focused_border);
+ EC_CHANGED(_prev_focused_border);
}
}
}
/* tell the focused border it changed so layout gets udpated */
if ((_focused_border) &&
- (_focused_border->client.vkbd.state >
+ (_focused_border->vkbd.state >
ECORE_X_VIRTUAL_KEYBOARD_STATE_UNKNOWN))
{
- if (!e_illume_border_is_conformant(_focused_border))
+ if (!e_illume_client_is_conformant(_focused_border))
{
_focused_border->changes.size = 1;
- BD_CHANGED(_focused_border);
+ EC_CHANGED(_focused_border);
}
}
}
diff --git a/src/modules/illume2/e_mod_main.c b/src/modules/illume2/e_mod_main.c
index 52e4f805e9..bd2fc4d600 100644
--- a/src/modules/illume2/e_mod_main.c
+++ b/src/modules/illume2/e_mod_main.c
@@ -15,9 +15,8 @@ EAPI E_Module_Api e_modapi = { E_MODULE_API_VERSION, "Illume2" };
EAPI void *
e_modapi_init(E_Module *m)
{
- Eina_List *ml, *cl, *zl;
- E_Manager *man;
- E_Container *con;
+ const Eina_List *cl, *zl;
+ E_Comp *comp;
E_Zone *zone;
Ecore_X_Window *zones;
int zcount = 0;
@@ -66,10 +65,9 @@ e_modapi_init(E_Module *m)
e_mod_kbd_hide();
/* loop zones and get count */
- EINA_LIST_FOREACH(e_manager_list(), ml, man)
- EINA_LIST_FOREACH(man->containers, cl, con)
- EINA_LIST_FOREACH(con->zones, zl, zone)
- zcount++;
+ EINA_LIST_FOREACH(e_comp_list(), cl, comp)
+ EINA_LIST_FOREACH(comp->zones, zl, zone)
+ zcount++;
/* allocate enough zones */
zones = calloc(zcount, sizeof(Ecore_X_Window));
@@ -95,31 +93,28 @@ e_modapi_init(E_Module *m)
zcount = 0;
/* loop the zones and create quickpanels for each one */
- EINA_LIST_FOREACH(e_manager_list(), ml, man)
+ EINA_LIST_FOREACH(e_comp_list(), cl, comp)
{
- EINA_LIST_FOREACH(man->containers, cl, con)
+ EINA_LIST_FOREACH(comp->zones, zl, zone)
{
- EINA_LIST_FOREACH(con->zones, zl, zone)
- {
- E_Illume_Quickpanel *qp;
+ E_Illume_Quickpanel *qp;
- /* set zone window in list of zones */
- zones[zcount] = zone->black_win;
+ /* set zone window in list of zones */
+ zones[zcount] = zone->black_win;
- /* increment zone count */
- zcount++;
+ /* increment zone count */
+ zcount++;
- /* try to create a new quickpanel for this zone */
- if (!(qp = e_mod_quickpanel_new(zone))) continue;
+ /* try to create a new quickpanel for this zone */
+ if (!(qp = e_mod_quickpanel_new(zone))) continue;
- /* append new qp to list */
- _e_illume_qps = eina_list_append(_e_illume_qps, qp);
- }
+ /* append new qp to list */
+ _e_illume_qps = eina_list_append(_e_illume_qps, qp);
}
/* set the zone list on this root. This is needed for some
* elm apps like elm_indicator so that they know how many
* indicators to create at startup */
- ecore_x_e_illume_zone_list_set(man->root, zones, zcount);
+ ecore_x_e_illume_zone_list_set(comp->man->root, zones, zcount);
}
/* free zones variable */
diff --git a/src/modules/illume2/e_mod_main.h b/src/modules/illume2/e_mod_main.h
index fd4580ce9e..1d01dfe1f5 100644
--- a/src/modules/illume2/e_mod_main.h
+++ b/src/modules/illume2/e_mod_main.h
@@ -40,9 +40,9 @@ int e_mod_illume_config_init(void);
int e_mod_illume_config_shutdown(void);
int e_mod_illume_config_save(void);
-void e_mod_illume_config_animation_show(E_Container *con, const char *params __UNUSED__);
-void e_mod_illume_config_policy_show(E_Container *con, const char *params __UNUSED__);
-void e_mod_illume_config_windows_show(E_Container *con, const char *params __UNUSED__);
+void e_mod_illume_config_animation_show(E_Comp *comp, const char *params __UNUSED__);
+void e_mod_illume_config_policy_show(E_Comp *comp, const char *params __UNUSED__);
+void e_mod_illume_config_windows_show(E_Comp *comp, const char *params __UNUSED__);
void e_mod_kbd_device_init(void);
void e_mod_kbd_device_shutdown(void);
int e_mod_policy_init(void);
diff --git a/src/modules/illume2/e_mod_policy.c b/src/modules/illume2/e_mod_policy.c
index 70e0389006..05dcba3411 100644
--- a/src/modules/illume2/e_mod_policy.c
+++ b/src/modules/illume2/e_mod_policy.c
@@ -16,9 +16,9 @@ static Eina_Bool _e_mod_policy_cb_zone_move_resize(void *data __UNUSED__, int ty
static Eina_Bool _e_mod_policy_cb_client_message(void *data __UNUSED__, int type __UNUSED__, void *event);
static Eina_Bool _e_mod_policy_cb_window_property(void *data __UNUSED__, int type __UNUSED__, void *event);
static Eina_Bool _e_mod_policy_cb_policy_change(void *data __UNUSED__, int type, void *event __UNUSED__);
-static void _e_mod_policy_cb_hook_post_fetch(void *data __UNUSED__, void *data2);
-static void _e_mod_policy_cb_hook_post_assign(void *data __UNUSED__, void *data2);
-static void _e_mod_policy_cb_hook_layout(void *data __UNUSED__, void *data2 __UNUSED__);
+static void _e_mod_policy_cb_hook_post_fetch(void *data __UNUSED__, E_Client *ec);
+static void _e_mod_policy_cb_hook_post_assign(void *data __UNUSED__, E_Client *ec);
+static void _e_mod_policy_cb_hook_layout(void *data __UNUSED__, E_Comp *comp);
/* local variables */
static E_Illume_Policy *_policy = NULL;
@@ -30,8 +30,8 @@ int E_ILLUME_POLICY_EVENT_CHANGE = 0;
int
e_mod_policy_init(void)
{
- Eina_List *ml;
- E_Manager *man;
+ const Eina_List *l;
+ E_Comp *comp;
char *file;
/* try to find the policy specified in config */
@@ -60,39 +60,32 @@ e_mod_policy_init(void)
_e_mod_policy_hooks_add();
/* loop the root windows */
- EINA_LIST_FOREACH(e_manager_list(), ml, man)
+ EINA_LIST_FOREACH(e_comp_list(), l, comp)
{
- Eina_List *cl;
- E_Container *con;
+ Eina_List *zl;
+ E_Zone *zone;
- /* loop the containers */
- EINA_LIST_FOREACH(man->containers, cl, con)
+ /* loop the zones */
+ EINA_LIST_FOREACH(comp->zones, zl, zone)
{
- Eina_List *zl;
- E_Zone *zone;
+ E_Illume_Config_Zone *cz;
+ Ecore_X_Illume_Mode mode = ECORE_X_ILLUME_MODE_SINGLE;
+
+ /* check for zone config */
+ if (!(cz = e_illume_zone_config_get(zone->num)))
+ continue;
- /* loop the zones */
- EINA_LIST_FOREACH(con->zones, zl, zone)
+ /* set mode on this zone */
+ if (cz->mode.dual == 0)
+ mode = ECORE_X_ILLUME_MODE_SINGLE;
+ else
{
- E_Illume_Config_Zone *cz;
- Ecore_X_Illume_Mode mode = ECORE_X_ILLUME_MODE_SINGLE;
-
- /* check for zone config */
- if (!(cz = e_illume_zone_config_get(zone->num)))
- continue;
-
- /* set mode on this zone */
- if (cz->mode.dual == 0)
- mode = ECORE_X_ILLUME_MODE_SINGLE;
- else
- {
- if ((cz->mode.dual == 1) && (cz->mode.side == 0))
- mode = ECORE_X_ILLUME_MODE_DUAL_TOP;
- else if ((cz->mode.dual == 1) && (cz->mode.side == 1))
- mode = ECORE_X_ILLUME_MODE_DUAL_LEFT;
- }
- ecore_x_e_illume_mode_set(zone->black_win, mode);
+ if ((cz->mode.dual == 1) && (cz->mode.side == 0))
+ mode = ECORE_X_ILLUME_MODE_DUAL_TOP;
+ else if ((cz->mode.dual == 1) && (cz->mode.side == 1))
+ mode = ECORE_X_ILLUME_MODE_DUAL_LEFT;
}
+ ecore_x_e_illume_mode_set(zone->black_win, mode);
}
}
@@ -103,7 +96,7 @@ int
e_mod_policy_shutdown(void)
{
Ecore_Event_Handler *hdl;
- E_Border_Hook *hook;
+ E_Client_Hook *hook;
/* remove the ecore event handlers */
EINA_LIST_FREE(_policy_hdls, hdl)
@@ -111,7 +104,7 @@ e_mod_policy_shutdown(void)
/* remove the border hooks */
EINA_LIST_FREE(_policy_hooks, hook)
- e_border_hook_del(hook);
+ e_client_hook_del(hook);
/* destroy the policy if it exists */
if (_policy) e_object_del(E_OBJECT(_policy));
@@ -231,25 +224,25 @@ _e_mod_policy_handlers_add(void)
{
_policy_hdls =
eina_list_append(_policy_hdls,
- ecore_event_handler_add(E_EVENT_BORDER_ADD,
+ ecore_event_handler_add(E_EVENT_CLIENT_ADD,
_e_mod_policy_cb_border_add, NULL));
_policy_hdls =
eina_list_append(_policy_hdls,
- ecore_event_handler_add(E_EVENT_BORDER_REMOVE,
+ ecore_event_handler_add(E_EVENT_CLIENT_REMOVE,
_e_mod_policy_cb_border_del, NULL));
_policy_hdls =
eina_list_append(_policy_hdls,
- ecore_event_handler_add(E_EVENT_BORDER_FOCUS_IN,
+ ecore_event_handler_add(E_EVENT_CLIENT_FOCUS_IN,
_e_mod_policy_cb_border_focus_in,
NULL));
_policy_hdls =
eina_list_append(_policy_hdls,
- ecore_event_handler_add(E_EVENT_BORDER_FOCUS_OUT,
+ ecore_event_handler_add(E_EVENT_CLIENT_FOCUS_OUT,
_e_mod_policy_cb_border_focus_out,
NULL));
_policy_hdls =
eina_list_append(_policy_hdls,
- ecore_event_handler_add(E_EVENT_BORDER_SHOW,
+ ecore_event_handler_add(E_EVENT_CLIENT_SHOW,
_e_mod_policy_cb_border_show,
NULL));
_policy_hdls =
@@ -279,16 +272,16 @@ _e_mod_policy_hooks_add(void)
{
_policy_hooks =
eina_list_append(_policy_hooks,
- e_border_hook_add(E_BORDER_HOOK_EVAL_POST_FETCH,
+ e_client_hook_add(E_CLIENT_HOOK_EVAL_POST_FETCH,
_e_mod_policy_cb_hook_post_fetch, NULL));
_policy_hooks =
eina_list_append(_policy_hooks,
- e_border_hook_add(E_BORDER_HOOK_EVAL_POST_BORDER_ASSIGN,
+ e_client_hook_add(E_CLIENT_HOOK_EVAL_POST_FRAME_ASSIGN,
_e_mod_policy_cb_hook_post_assign, NULL));
_policy_hooks =
eina_list_append(_policy_hooks,
- e_border_hook_add(E_BORDER_HOOK_CONTAINER_LAYOUT,
- _e_mod_policy_cb_hook_layout, NULL));
+ e_client_hook_add(E_CLIENT_HOOK_CANVAS_LAYOUT,
+ (E_Client_Hook_Cb)_e_mod_policy_cb_hook_layout, NULL));
}
static void
@@ -311,11 +304,11 @@ _e_mod_policy_cb_free(E_Illume_Policy *p)
static Eina_Bool
_e_mod_policy_cb_border_add(void *data __UNUSED__, int type __UNUSED__, void *event)
{
- E_Event_Border_Add *ev;
+ E_Event_Client *ev;
ev = event;
if ((_policy) && (_policy->funcs.border_add))
- _policy->funcs.border_add(ev->border);
+ _policy->funcs.border_add(ev->ec);
return ECORE_CALLBACK_PASS_ON;
}
@@ -323,11 +316,11 @@ _e_mod_policy_cb_border_add(void *data __UNUSED__, int type __UNUSED__, void *ev
static Eina_Bool
_e_mod_policy_cb_border_del(void *data __UNUSED__, int type __UNUSED__, void *event)
{
- E_Event_Border_Remove *ev;
+ E_Event_Client *ev;
ev = event;
if ((_policy) && (_policy->funcs.border_del))
- _policy->funcs.border_del(ev->border);
+ _policy->funcs.border_del(ev->ec);
return ECORE_CALLBACK_PASS_ON;
}
@@ -335,11 +328,11 @@ _e_mod_policy_cb_border_del(void *data __UNUSED__, int type __UNUSED__, void *ev
static Eina_Bool
_e_mod_policy_cb_border_focus_in(void *data __UNUSED__, int type __UNUSED__, void *event)
{
- E_Event_Border_Focus_In *ev;
+ E_Event_Client *ev;
ev = event;
if ((_policy) && (_policy->funcs.border_focus_in))
- _policy->funcs.border_focus_in(ev->border);
+ _policy->funcs.border_focus_in(ev->ec);
return ECORE_CALLBACK_PASS_ON;
}
@@ -347,11 +340,11 @@ _e_mod_policy_cb_border_focus_in(void *data __UNUSED__, int type __UNUSED__, voi
static Eina_Bool
_e_mod_policy_cb_border_focus_out(void *data __UNUSED__, int type __UNUSED__, void *event)
{
- E_Event_Border_Focus_Out *ev;
+ E_Event_Client *ev;
ev = event;
if ((_policy) && (_policy->funcs.border_focus_out))
- _policy->funcs.border_focus_out(ev->border);
+ _policy->funcs.border_focus_out(ev->ec);
return ECORE_CALLBACK_PASS_ON;
}
@@ -359,11 +352,11 @@ _e_mod_policy_cb_border_focus_out(void *data __UNUSED__, int type __UNUSED__, vo
static Eina_Bool
_e_mod_policy_cb_border_show(void *data __UNUSED__, int type __UNUSED__, void *event)
{
- E_Event_Border_Show *ev;
+ E_Event_Client *ev;
ev = event;
if ((_policy) && (_policy->funcs.border_show))
- _policy->funcs.border_show(ev->border);
+ _policy->funcs.border_show(ev->ec);
return ECORE_CALLBACK_PASS_ON;
}
@@ -384,13 +377,13 @@ static E_Zone *
_e_mod_zone_win_get(Ecore_X_Window win)
{
E_Zone *zone = NULL;
- E_Border *bd;
+ E_Client *ec;
- if (!(bd = e_border_find_by_client_window(win)))
+ if (!(ec = e_pixmap_find_client(E_PIXMAP_TYPE_X, win)))
{
if (!(zone = e_util_zone_window_find(win))) return NULL;
}
- else if (bd->zone) zone = bd->zone;
+ else if (ec->zone) zone = ec->zone;
return zone;
}
@@ -402,11 +395,11 @@ _e_mod_policy_cb_client_message(void *data __UNUSED__, int type __UNUSED__, void
ev = event;
if (ev->message_type == ECORE_X_ATOM_NET_ACTIVE_WINDOW)
{
- E_Border *bd;
+ E_Client *ec;
- if (!(bd = e_border_find_by_client_window(ev->win))) return ECORE_CALLBACK_PASS_ON;
+ if (!(ec = e_pixmap_find_client(E_PIXMAP_TYPE_X, ev->win))) return ECORE_CALLBACK_PASS_ON;
if ((_policy) && (_policy->funcs.border_activate))
- _policy->funcs.border_activate(bd);
+ _policy->funcs.border_activate(ec);
}
else if (ev->message_type == ECORE_X_ATOM_E_ILLUME_MODE)
{
@@ -450,19 +443,19 @@ _e_mod_policy_cb_client_message(void *data __UNUSED__, int type __UNUSED__, void
}
else if (ev->message_type == ECORE_X_ATOM_E_ILLUME_DRAG_START)
{
- E_Border *bd;
+ E_Client *ec;
- if (!(bd = e_border_find_by_client_window(ev->win))) return ECORE_CALLBACK_PASS_ON;
+ if (!(ec = e_pixmap_find_client(E_PIXMAP_TYPE_X, ev->win))) return ECORE_CALLBACK_PASS_ON;
if ((_policy) && (_policy->funcs.drag_start))
- _policy->funcs.drag_start(bd);
+ _policy->funcs.drag_start(ec);
}
else if (ev->message_type == ECORE_X_ATOM_E_ILLUME_DRAG_END)
{
- E_Border *bd;
+ E_Client *ec;
- if (!(bd = e_border_find_by_client_window(ev->win))) return ECORE_CALLBACK_PASS_ON;
+ if (!(ec = e_pixmap_find_client(E_PIXMAP_TYPE_X, ev->win))) return ECORE_CALLBACK_PASS_ON;
if ((_policy) && (_policy->funcs.drag_end))
- _policy->funcs.drag_end(bd);
+ _policy->funcs.drag_end(ec);
}
return ECORE_CALLBACK_PASS_ON;
@@ -499,44 +492,40 @@ _e_mod_policy_cb_policy_change(void *data __UNUSED__, int type, void *event __UN
}
static void
-_e_mod_policy_cb_hook_post_fetch(void *data __UNUSED__, void *data2)
+_e_mod_policy_cb_hook_post_fetch(void *data __UNUSED__, E_Client *ec)
{
- E_Border *bd;
-
- if (!(bd = data2)) return;
if ((_policy) && (_policy->funcs.border_post_fetch))
- _policy->funcs.border_post_fetch(bd);
+ _policy->funcs.border_post_fetch(ec);
}
static void
-_e_mod_policy_cb_hook_post_assign(void *data __UNUSED__, void *data2)
+_e_mod_policy_cb_hook_post_assign(void *data __UNUSED__, E_Client *ec)
{
- E_Border *bd;
-
- if (!(bd = data2)) return;
if ((_policy) && (_policy->funcs.border_post_assign))
- _policy->funcs.border_post_assign(bd);
+ _policy->funcs.border_post_assign(ec);
}
static void
-_e_mod_policy_cb_hook_layout(void *data __UNUSED__, void *data2 __UNUSED__)
+_e_mod_policy_cb_hook_layout(void *data __UNUSED__, E_Comp *comp)
{
E_Zone *zone;
- E_Border *bd;
- Eina_List *zl = NULL, *l;
+ E_Client *ec;
+ Eina_List *zl = NULL;
+ const Eina_List *l;
- /* loop through border list and find what changed */
- EINA_LIST_FOREACH(e_border_client_list(), l, bd)
+ /* loop through client list and find what changed */
+ EINA_LIST_FOREACH(comp->clients, l, ec)
{
- if ((bd->new_client) || (bd->pending_move_resize) ||
- (bd->changes.pos) || (bd->changes.size) || (bd->changes.visible) ||
- (bd->need_shape_export) || (bd->need_shape_merge))
+ if (e_client_util_ignored_get(ec)) continue;
+ if ((ec->new_client) ||
+ (ec->changes.pos) || (ec->changes.size) || (ec->changes.visible) ||
+ (ec->need_shape_export) || (ec->need_shape_merge))
{
/* NB: this border changed. add it's zone to list of what needs
* updating. This is done so we do not waste cpu cycles
* updating zones where nothing changed */
- if (!eina_list_data_find(zl, bd->zone))
- zl = eina_list_append(zl, bd->zone);
+ if (!eina_list_data_find(zl, ec->zone))
+ zl = eina_list_append(zl, ec->zone);
}
}
diff --git a/src/modules/illume2/e_mod_quickpanel.c b/src/modules/illume2/e_mod_quickpanel.c
index fb7d9ca61d..8b2913bfd2 100644
--- a/src/modules/illume2/e_mod_quickpanel.c
+++ b/src/modules/illume2/e_mod_quickpanel.c
@@ -8,7 +8,7 @@ static Eina_Bool _e_mod_quickpanel_cb_border_add(void *data __UNUSED__, int type
static Eina_Bool _e_mod_quickpanel_cb_border_remove(void *data __UNUSED__, int type __UNUSED__, void *event);
static Eina_Bool _e_mod_quickpanel_cb_border_resize(void *data __UNUSED__, int type __UNUSED__, void *event);
static Eina_Bool _e_mod_quickpanel_cb_border_uniconify(void *data __UNUSED__, int type __UNUSED__, void *event);
-static void _e_mod_quickpanel_cb_post_fetch(void *data __UNUSED__, void *data2);
+static void _e_mod_quickpanel_cb_post_fetch(void *data __UNUSED__, E_Client *ec);
static void _e_mod_quickpanel_cb_free(E_Illume_Quickpanel *qp);
static Eina_Bool _e_mod_quickpanel_cb_delay_hide(void *data);
static void _e_mod_quickpanel_slide(E_Illume_Quickpanel *qp, int visible, double len);
@@ -22,7 +22,7 @@ static void _e_mod_quickpanel_clickwin_hide(E_Illume_Quickpanel *qp);
/* local variables */
static Eina_List *_qp_hdls = NULL;
-static E_Border_Hook *_qp_hook = NULL;
+static E_Client_Hook *_qp_hook = NULL;
int
e_mod_quickpanel_init(void)
@@ -35,27 +35,27 @@ e_mod_quickpanel_init(void)
NULL));
_qp_hdls =
eina_list_append(_qp_hdls,
- ecore_event_handler_add(E_EVENT_BORDER_ADD,
+ ecore_event_handler_add(E_EVENT_CLIENT_ADD,
_e_mod_quickpanel_cb_border_add,
NULL));
_qp_hdls =
eina_list_append(_qp_hdls,
- ecore_event_handler_add(E_EVENT_BORDER_REMOVE,
+ ecore_event_handler_add(E_EVENT_CLIENT_REMOVE,
_e_mod_quickpanel_cb_border_remove,
NULL));
_qp_hdls =
eina_list_append(_qp_hdls,
- ecore_event_handler_add(E_EVENT_BORDER_RESIZE,
+ ecore_event_handler_add(E_EVENT_CLIENT_RESIZE,
_e_mod_quickpanel_cb_border_resize,
NULL));
_qp_hdls =
eina_list_append(_qp_hdls,
- ecore_event_handler_add(E_EVENT_BORDER_UNICONIFY,
+ ecore_event_handler_add(E_EVENT_CLIENT_UNICONIFY,
_e_mod_quickpanel_cb_border_uniconify,
NULL));
/* add hook for new borders so we can test for qp borders */
- _qp_hook = e_border_hook_add(E_BORDER_HOOK_EVAL_PRE_POST_FETCH,
+ _qp_hook = e_client_hook_add(E_CLIENT_HOOK_EVAL_PRE_POST_FETCH,
_e_mod_quickpanel_cb_post_fetch, NULL);
return 1;
@@ -71,7 +71,7 @@ e_mod_quickpanel_shutdown(void)
ecore_event_handler_del(hdl);
/* delete the border hook */
- if (_qp_hook) e_border_hook_del(_qp_hook);
+ if (_qp_hook) e_client_hook_del(_qp_hook);
_qp_hook = NULL;
return 1;
@@ -125,24 +125,24 @@ e_mod_quickpanel_show(E_Illume_Quickpanel *qp)
if (duration <= 0)
{
Eina_List *l;
- E_Border *bd;
+ E_Client *ec;
int ny = 0;
ny = qp->vert.isize;
if (qp->vert.dir == 1) ny = 0;
/* if we are not animating, just show the borders */
- EINA_LIST_FOREACH(qp->borders, l, bd)
+ EINA_LIST_FOREACH(qp->borders, l, ec)
{
- if (!bd->visible) e_illume_border_show(bd);
+ if (!ec->visible) e_illume_client_show(ec);
- if (qp->vert.dir) ny -= bd->h;
- e_comp_win_effect_set(bd->cw, "move");
+ if (qp->vert.dir) ny -= ec->h;
+ e_comp_object_effect_set(ec->frame, "move");
/* set location */
- e_comp_win_effect_params_set(bd->cw, 1, (int[]){0, ny}, 2);
+ e_comp_object_effect_params_set(ec->frame, 1, (int[]){0, ny}, 2);
/* use location */
- e_comp_win_effect_params_set(bd->cw, 0, (int[]){1}, 1);
- if (qp->vert.dir == 0) ny += bd->h;
+ e_comp_object_effect_params_set(ec->frame, 0, (int[]){1}, 1);
+ if (qp->vert.dir == 0) ny += ec->h;
}
qp->visible = 1;
_e_mod_quickpanel_clickwin_show(qp);
@@ -202,12 +202,12 @@ _e_mod_quickpanel_cb_client_message(void *data __UNUSED__, int type __UNUSED__,
}
else if (ev->message_type == ECORE_X_ATOM_E_ILLUME_QUICKPANEL_POSITION_UPDATE)
{
- E_Border *bd;
+ E_Client *ec;
E_Illume_Quickpanel *qp;
- if (!(bd = e_border_find_by_client_window(ev->win)))
+ if (!(ec = e_pixmap_find_client(E_PIXMAP_TYPE_X, ev->win)))
return ECORE_CALLBACK_PASS_ON;
- if (!(qp = e_illume_quickpanel_by_zone_get(bd->zone)))
+ if (!(qp = e_illume_quickpanel_by_zone_get(ec->zone)))
return ECORE_CALLBACK_PASS_ON;
_e_mod_quickpanel_position_update(qp);
}
@@ -231,29 +231,29 @@ _e_mod_quickpanel_cb_mouse_up(void *data, int type __UNUSED__, void *event)
static Eina_Bool
_e_mod_quickpanel_cb_border_add(void *data __UNUSED__, int type __UNUSED__, void *event)
{
- E_Event_Border_Add *ev;
+ E_Event_Client *ev;
E_Illume_Quickpanel *qp;
E_Zone *zone;
int iy;
ev = event;
- if (!ev->border->client.illume.quickpanel.quickpanel)
+ if (!ev->ec->illume.quickpanel.quickpanel)
return ECORE_CALLBACK_PASS_ON;
- if (!(zone = ev->border->zone)) return ECORE_CALLBACK_PASS_ON;
+ if (!(zone = ev->ec->zone)) return ECORE_CALLBACK_PASS_ON;
/* if this border should be on a different zone, get requested zone */
- if ((int)zone->num != ev->border->client.illume.quickpanel.zone)
+ if ((int)zone->num != ev->ec->illume.quickpanel.zone)
{
- E_Container *con;
+ E_Comp *comp;
int zn = 0;
/* find this zone */
- if (!(con = e_container_current_get(e_manager_current_get())))
+ if (!(comp = e_util_comp_current_get()))
return ECORE_CALLBACK_PASS_ON;
- zn = ev->border->client.illume.quickpanel.zone;
- zone = e_util_container_zone_number_get(con->num, zn);
- if (!zone) zone = e_util_container_zone_number_get(con->num, 0);
+ zn = ev->ec->illume.quickpanel.zone;
+ zone = e_util_comp_zone_number_get(comp->num, zn);
+ if (!zone) zone = e_util_comp_zone_number_get(comp->num, 0);
if (!zone) return ECORE_CALLBACK_PASS_ON;
}
@@ -261,19 +261,19 @@ _e_mod_quickpanel_cb_border_add(void *data __UNUSED__, int type __UNUSED__, void
return ECORE_CALLBACK_PASS_ON;
/* set position and zone */
- e_illume_border_indicator_pos_get(zone, NULL, &iy);
- if ((ev->border->x != zone->x) || (ev->border->y != iy))
- e_border_move(ev->border, zone->x, iy);
- if (ev->border->zone != zone)
- e_border_zone_set(ev->border, zone);
+ e_illume_client_indicator_pos_get(zone, NULL, &iy);
+ if ((ev->ec->x != zone->x) || (ev->ec->y != iy))
+ evas_object_move(ev->ec->frame, zone->x, iy);
+ if (ev->ec->zone != zone)
+ e_client_zone_set(ev->ec, zone);
/* hide this border */
- e_illume_border_hide(ev->border);
+ e_illume_client_hide(ev->ec);
- qp->vert.size += ev->border->h;
+ qp->vert.size += ev->ec->h;
/* add this border to QP border collection */
- qp->borders = eina_list_append(qp->borders, ev->border);
+ qp->borders = eina_list_append(qp->borders, ev->ec);
return ECORE_CALLBACK_PASS_ON;
}
@@ -281,30 +281,30 @@ _e_mod_quickpanel_cb_border_add(void *data __UNUSED__, int type __UNUSED__, void
static Eina_Bool
_e_mod_quickpanel_cb_border_remove(void *data __UNUSED__, int type __UNUSED__, void *event)
{
- E_Event_Border_Remove *ev;
+ E_Event_Client *ev;
E_Illume_Quickpanel *qp;
E_Zone *zone;
Eina_List *l;
- E_Border *bd;
+ E_Client *ec;
ev = event;
- if (!ev->border->client.illume.quickpanel.quickpanel)
+ if (!ev->ec->illume.quickpanel.quickpanel)
return ECORE_CALLBACK_PASS_ON;
- if (!(zone = ev->border->zone)) return ECORE_CALLBACK_PASS_ON;
+ if (!(zone = ev->ec->zone)) return ECORE_CALLBACK_PASS_ON;
/* if this border should be on a different zone, get requested zone */
- if ((int)zone->num != ev->border->client.illume.quickpanel.zone)
+ if ((int)zone->num != ev->ec->illume.quickpanel.zone)
{
- E_Container *con;
+ E_Comp *comp;
int zn = 0;
/* find this zone */
- if (!(con = e_container_current_get(e_manager_current_get())))
+ if (!(comp = e_util_comp_current_get()))
return ECORE_CALLBACK_PASS_ON;
- zn = ev->border->client.illume.quickpanel.zone;
- zone = e_util_container_zone_number_get(con->num, zn);
- if (!zone) zone = e_util_container_zone_number_get(con->num, 0);
+ zn = ev->ec->illume.quickpanel.zone;
+ zone = e_util_comp_zone_number_get(comp->num, zn);
+ if (!zone) zone = e_util_comp_zone_number_get(comp->num, 0);
if (!zone) return ECORE_CALLBACK_PASS_ON;
}
@@ -313,11 +313,11 @@ _e_mod_quickpanel_cb_border_remove(void *data __UNUSED__, int type __UNUSED__, v
/* add this border to QP border collection */
if (qp->borders)
- qp->borders = eina_list_remove(qp->borders, ev->border);
+ qp->borders = eina_list_remove(qp->borders, ev->ec);
qp->vert.size = 0;
- EINA_LIST_FOREACH(qp->borders, l, bd)
- qp->vert.size += bd->h;
+ EINA_LIST_FOREACH(qp->borders, l, ec)
+ qp->vert.size += ec->h;
return ECORE_CALLBACK_PASS_ON;
}
@@ -325,20 +325,20 @@ _e_mod_quickpanel_cb_border_remove(void *data __UNUSED__, int type __UNUSED__, v
static Eina_Bool
_e_mod_quickpanel_cb_border_resize(void *data __UNUSED__, int type __UNUSED__, void *event)
{
- E_Event_Border_Resize *ev;
+ E_Event_Client *ev;
E_Illume_Quickpanel *qp;
Eina_List *l;
- E_Border *bd;
+ E_Client *ec;
ev = event;
- if (!ev->border->client.illume.quickpanel.quickpanel)
+ if (!ev->ec->illume.quickpanel.quickpanel)
return ECORE_CALLBACK_PASS_ON;
- if (!(qp = e_illume_quickpanel_by_zone_get(ev->border->zone)))
+ if (!(qp = e_illume_quickpanel_by_zone_get(ev->ec->zone)))
return ECORE_CALLBACK_PASS_ON;
qp->vert.size = 0;
- EINA_LIST_FOREACH(qp->borders, l, bd)
- qp->vert.size += bd->h;
+ EINA_LIST_FOREACH(qp->borders, l, ec)
+ qp->vert.size += ec->h;
return ECORE_CALLBACK_PASS_ON;
}
@@ -346,32 +346,29 @@ _e_mod_quickpanel_cb_border_resize(void *data __UNUSED__, int type __UNUSED__, v
static Eina_Bool
_e_mod_quickpanel_cb_border_uniconify(void *data __UNUSED__, int type __UNUSED__, void *event)
{
- E_Event_Border_Uniconify *ev;
+ E_Event_Client *ev;
E_Illume_Quickpanel *qp;
ev = event;
- if (!ev->border->client.illume.quickpanel.quickpanel)
+ if (!ev->ec->illume.quickpanel.quickpanel)
return ECORE_CALLBACK_PASS_ON;
- if (!(qp = e_illume_quickpanel_by_zone_get(ev->border->zone)))
+ if (!(qp = e_illume_quickpanel_by_zone_get(ev->ec->zone)))
return ECORE_CALLBACK_PASS_ON;
e_mod_quickpanel_show(qp);
return ECORE_CALLBACK_PASS_ON;
}
static void
-_e_mod_quickpanel_cb_post_fetch(void *data __UNUSED__, void *data2)
+_e_mod_quickpanel_cb_post_fetch(void *data __UNUSED__, E_Client *ec)
{
- E_Border *bd;
-
- if (!(bd = data2)) return;
- if (!bd->client.illume.quickpanel.quickpanel) return;
- bd->stolen = 1;
+ if (!ec->illume.quickpanel.quickpanel) return;
+ ec->stolen = 1;
}
static void
_e_mod_quickpanel_cb_free(E_Illume_Quickpanel *qp)
{
- E_Border *bd;
+ E_Client *ec;
/* delete the animator if it exists */
if (qp->animator) ecore_animator_del(qp->animator);
@@ -390,8 +387,8 @@ _e_mod_quickpanel_cb_free(E_Illume_Quickpanel *qp)
qp->mouse_hdl = NULL;
/* set the borders of this quickpanel to not stolen */
- EINA_LIST_FREE(qp->borders, bd)
- bd->stolen = 0;
+ EINA_LIST_FREE(qp->borders, ec)
+ ec->stolen = 0;
/* free the structure */
E_FREE(qp);
@@ -451,15 +448,15 @@ _e_mod_quickpanel_hide(E_Illume_Quickpanel *qp)
if (duration <= 0)
{
Eina_List *l;
- E_Border *bd;
+ E_Client *ec;
/* if we are not animating, hide the qp borders */
- EINA_LIST_REVERSE_FOREACH(qp->borders, l, bd)
+ EINA_LIST_REVERSE_FOREACH(qp->borders, l, ec)
{
- e_comp_win_effect_set(bd->cw, "move");
+ e_comp_object_effect_set(ec->frame, "move");
/* unuse location */
- e_comp_win_effect_params_set(bd->cw, 0, (int[]){0}, 1);
- if (bd->visible) e_illume_border_hide(bd);
+ e_comp_object_effect_params_set(ec->frame, 0, (int[]){0}, 1);
+ if (ec->visible) e_illume_client_hide(ec);
}
qp->visible = 0;
_e_mod_quickpanel_clickwin_hide(qp);
@@ -516,15 +513,15 @@ static void
_e_mod_quickpanel_position_update(E_Illume_Quickpanel *qp)
{
Eina_List *l;
- E_Border *bd;
+ E_Client *ec;
int iy = 0;
if (!qp) return;
_e_mod_quickpanel_hide(qp);
if (!qp->zone) return;
- e_illume_border_indicator_pos_get(qp->zone, NULL, &iy);
- EINA_LIST_FOREACH(qp->borders, l, bd)
- e_border_move(bd, qp->zone->x, iy);
+ e_illume_client_indicator_pos_get(qp->zone, NULL, &iy);
+ EINA_LIST_FOREACH(qp->borders, l, ec)
+ evas_object_move(ec->frame, qp->zone->x, iy);
qp->vert.dir = 0;
if ((iy + qp->vert.isize + qp->vert.size) > qp->zone->h) qp->vert.dir = 1;
@@ -534,35 +531,35 @@ static void
_e_mod_quickpanel_animate_down(E_Illume_Quickpanel *qp)
{
Eina_List *l;
- E_Border *bd;
+ E_Client *ec;
int pbh = 0;
if (!qp) return;
pbh = (qp->vert.isize - qp->vert.size);
- EINA_LIST_FOREACH(qp->borders, l, bd)
+ EINA_LIST_FOREACH(qp->borders, l, ec)
{
/* don't adjust borders that are being deleted */
- if (e_object_is_del(E_OBJECT(bd))) continue;
- e_comp_win_effect_set(bd->cw, "move");
+ if (e_object_is_del(E_OBJECT(ec))) continue;
+ e_comp_object_effect_set(ec->frame, "move");
/* set location */
- e_comp_win_effect_params_set(bd->cw, 1,
+ e_comp_object_effect_params_set(ec->frame, 1,
(int[]){0, qp->vert.adjust + pbh}, 2);
/* use location */
- e_comp_win_effect_params_set(bd->cw, 0, (int[]){1}, 1);
- pbh += bd->h;
+ e_comp_object_effect_params_set(ec->frame, 0, (int[]){1}, 1);
+ pbh += ec->h;
if (!qp->visible)
{
if (qp->vert.adjust + pbh > 0)
{
- if (!bd->visible) e_illume_border_show(bd);
+ if (!ec->visible) e_illume_client_show(ec);
}
}
else
{
if (qp->vert.adjust + pbh <= 10)
{
- if (bd->visible) e_illume_border_hide(bd);
+ if (ec->visible) e_illume_client_hide(ec);
}
}
}
@@ -572,35 +569,35 @@ static void
_e_mod_quickpanel_animate_up(E_Illume_Quickpanel *qp)
{
Eina_List *l;
- E_Border *bd;
+ E_Client *ec;
int pbh = 0;
if (!qp) return;
pbh = qp->vert.size;
- EINA_LIST_FOREACH(qp->borders, l, bd)
+ EINA_LIST_FOREACH(qp->borders, l, ec)
{
/* don't adjust borders that are being deleted */
- if (e_object_is_del(E_OBJECT(bd))) continue;
- pbh -= bd->h;
- e_comp_win_effect_set(bd->cw, "move");
+ if (e_object_is_del(E_OBJECT(ec))) continue;
+ pbh -= ec->h;
+ e_comp_object_effect_set(ec->frame, "move");
/* set location */
- e_comp_win_effect_params_set(bd->cw, 1,
+ e_comp_object_effect_params_set(ec->frame, 1,
(int[]){0, qp->vert.adjust + pbh}, 2);
/* use location */
- e_comp_win_effect_params_set(bd->cw, 0, (int[]){1}, 1);
+ e_comp_object_effect_params_set(ec->frame, 0, (int[]){1}, 1);
if (!qp->visible)
{
if (qp->vert.adjust + pbh < 0)
{
- if (!bd->visible) e_illume_border_show(bd);
+ if (!ec->visible) e_illume_client_show(ec);
}
}
else
{
if (qp->vert.adjust + pbh >= -10)
{
- if (bd->visible) e_illume_border_hide(bd);
+ if (ec->visible) e_illume_client_hide(ec);
}
}
}
@@ -609,14 +606,14 @@ _e_mod_quickpanel_animate_up(E_Illume_Quickpanel *qp)
static void
_e_mod_quickpanel_clickwin_show(E_Illume_Quickpanel *qp)
{
- E_Border *ind;
+ E_Client *ind;
if ((!qp) || (!qp->borders) || (!qp->zone)) return;
if (!(ind = eina_list_nth(qp->borders, 0))) return;
if (qp->clickwin) ecore_x_window_free(qp->clickwin);
qp->clickwin = 0;
- qp->clickwin = ecore_x_window_input_new(qp->zone->container->win,
+ qp->clickwin = ecore_x_window_input_new(qp->zone->comp->win,
qp->zone->x, qp->zone->y,
qp->zone->w, qp->zone->h);
@@ -625,7 +622,7 @@ _e_mod_quickpanel_clickwin_show(E_Illume_Quickpanel *qp)
ECORE_X_WINDOW_CONFIGURE_MASK_STACK_MODE,
qp->zone->x, qp->zone->y,
qp->zone->w, qp->zone->h, 0,
- ind->win, ECORE_X_WINDOW_STACK_BELOW);
+ e_client_util_pwin_get(ind), ECORE_X_WINDOW_STACK_BELOW);
ecore_x_window_show(qp->clickwin);
}
diff --git a/src/modules/illume2/e_mod_select_window.c b/src/modules/illume2/e_mod_select_window.c
index 49fb12f63d..9f53aaadbf 100644
--- a/src/modules/illume2/e_mod_select_window.c
+++ b/src/modules/illume2/e_mod_select_window.c
@@ -7,7 +7,7 @@ static void _e_mod_illume_config_select_window_free_data(E_Config_Dialog *cfd, E
static Evas_Object *_e_mod_illume_config_select_window_create(E_Config_Dialog *cfd, Evas *evas, E_Config_Dialog_Data *cfdata);
static void _e_mod_illume_config_select_window_list_changed(void *data);
static Eina_Bool _e_mod_illume_config_select_window_change_timeout(void *data);
-static int _e_mod_illume_config_select_window_match(E_Border *bd);
+static int _e_mod_illume_config_select_window_match(E_Client *ec);
/* local variables */
E_Illume_Select_Window_Type stype;
@@ -32,7 +32,7 @@ e_mod_illume_config_select_window(E_Illume_Select_Window_Type type)
v->basic_only = 1;
v->normal_win = 1;
v->scroll = 1;
- cfd = e_config_dialog_new(e_container_current_get(e_manager_current_get()),
+ cfd = e_config_dialog_new(NULL,
_("Select Home Window"), "E",
"_config_illume_select_window",
"enlightenment/windows", 0, v, NULL);
@@ -56,7 +56,7 @@ static Evas_Object *
_e_mod_illume_config_select_window_create(E_Config_Dialog *cfd __UNUSED__, Evas *evas, E_Config_Dialog_Data *cfdata __UNUSED__)
{
Evas_Object *list, *ow;
- Eina_List *bds, *l;
+ Eina_List *ecs, *l;
E_Zone *zone;
int i, sel = -1;
@@ -70,21 +70,22 @@ _e_mod_illume_config_select_window_create(E_Config_Dialog *cfd __UNUSED__, Evas
e_widget_ilist_clear(ow);
e_widget_ilist_go(ow);
- if ((bds = e_border_client_list()))
+ if ((ecs = zone->comp->clients))
{
- for (i = 0, l = bds; l; l = l->next, i++)
+ for (i = 0, l = ecs; l; l = l->next, i++)
{
- E_Border *bd;
+ E_Client *ec;
const char *name;
- if (!(bd = l->data)) continue;
- if (bd->zone != zone) continue;
- if (e_object_is_del(E_OBJECT(bd))) continue;
- if (!(name = e_border_name_get(bd))) continue;
- if (_e_mod_illume_config_select_window_match(bd)) sel = i;
+ if (!(ec = l->data)) continue;
+ if (e_client_util_ignored_get(ec)) continue;
+ if (ec->zone != zone) continue;
+ if (e_object_is_del(E_OBJECT(ec))) continue;
+ if (!(name = e_client_name_get(ec))) continue;
+ if (_e_mod_illume_config_select_window_match(ec)) sel = i;
e_widget_ilist_append(ow, NULL, name,
_e_mod_illume_config_select_window_list_changed,
- bd, name);
+ ec, name);
}
}
@@ -101,14 +102,14 @@ _e_mod_illume_config_select_window_create(E_Config_Dialog *cfd __UNUSED__, Evas
static void
_e_mod_illume_config_select_window_list_changed(void *data)
{
- E_Border *bd;
+ E_Client *ec;
Ecore_X_Window_Type wtype;
char *title, *name, *class;
- if (!(bd = data)) return;
- title = ecore_x_icccm_title_get(bd->client.win);
- ecore_x_icccm_name_class_get(bd->client.win, &name, &class);
- ecore_x_netwm_window_type_get(bd->client.win, &wtype);
+ if (!(ec = data)) return;
+ title = ecore_x_icccm_title_get(e_client_util_win_get(ec));
+ ecore_x_icccm_name_class_get(e_client_util_win_get(ec), &name, &class);
+ ecore_x_netwm_window_type_get(e_client_util_win_get(ec), &wtype);
switch (stype)
{
@@ -152,16 +153,16 @@ _e_mod_illume_config_select_window_change_timeout(__UNUSED__ void *data)
}
static int
-_e_mod_illume_config_select_window_match(E_Border *bd)
+_e_mod_illume_config_select_window_match(E_Client *ec)
{
Ecore_X_Window_Type wtype;
char *title, *name, *class;
int match = 0;
- if (!bd) return 0;
- title = ecore_x_icccm_title_get(bd->client.win);
- ecore_x_icccm_name_class_get(bd->client.win, &name, &class);
- ecore_x_netwm_window_type_get(bd->client.win, &wtype);
+ if (!ec) return 0;
+ title = ecore_x_icccm_title_get(e_client_util_win_get(ec));
+ ecore_x_icccm_name_class_get(e_client_util_win_get(ec), &name, &class);
+ ecore_x_netwm_window_type_get(e_client_util_win_get(ec), &wtype);
switch (stype)
{
diff --git a/src/modules/illume2/policies/illume/policy.c b/src/modules/illume2/policies/illume/policy.c
index 5e619a2c4c..7de78af06e 100644
--- a/src/modules/illume2/policies/illume/policy.c
+++ b/src/modules/illume2/policies/illume/policy.c
@@ -9,67 +9,67 @@
#define DIALOG_USES_PIXEL_BORDER 1
/* local function prototypes */
-static void _policy_border_set_focus(E_Border *bd);
-static void _policy_border_move(E_Border *bd, int x, int y);
-static void _policy_border_resize(E_Border *bd, int w, int h);
-static void _policy_border_hide_above(E_Border *bd);
-static void _policy_border_hide_below(E_Border *bd);
-static void _policy_border_show_below(E_Border *bd);
+static void _policy_border_set_focus(E_Client *ec);
+static void _policy_border_move(E_Client *ec, int x, int y);
+static void _policy_border_resize(E_Client *ec, int w, int h);
+static void _policy_border_hide_above(E_Client *ec);
+static void _policy_border_hide_below(E_Client *ec);
+static void _policy_border_show_below(E_Client *ec);
static void _policy_zone_layout_update(E_Zone *zone);
-static void _policy_zone_layout_indicator(E_Border *bd, E_Illume_Config_Zone *cz);
-static void _policy_zone_layout_quickpanel(E_Border *bd);
-static void _policy_zone_layout_softkey(E_Border *bd, E_Illume_Config_Zone *cz);
-static void _policy_zone_layout_keyboard(E_Border *bd, E_Illume_Config_Zone *cz);
-static void _policy_zone_layout_home_single(E_Border *bd, E_Illume_Config_Zone *cz);
-static void _policy_zone_layout_home_dual_top(E_Border *bd, E_Illume_Config_Zone *cz);
-static void _policy_zone_layout_home_dual_custom(E_Border *bd, E_Illume_Config_Zone *cz);
-static void _policy_zone_layout_home_dual_left(E_Border *bd, E_Illume_Config_Zone *cz);
-static void _policy_zone_layout_fullscreen(E_Border *bd);
-static void _policy_zone_layout_app_single(E_Border *bd, E_Illume_Config_Zone *cz);
-static void _policy_zone_layout_app_dual_top(E_Border *bd, E_Illume_Config_Zone *cz);
-static void _policy_zone_layout_app_dual_custom(E_Border *bd, E_Illume_Config_Zone *cz);
-static void _policy_zone_layout_app_dual_left(E_Border *bd, E_Illume_Config_Zone *cz);
-static void _policy_zone_layout_dialog(E_Border *bd, E_Illume_Config_Zone *cz);
-static void _policy_zone_layout_splash(E_Border *bd, E_Illume_Config_Zone *cz);
-static void _policy_zone_layout_conformant_single(E_Border *bd, E_Illume_Config_Zone *cz);
-static void _policy_zone_layout_conformant_dual_top(E_Border *bd, E_Illume_Config_Zone *cz);
-static void _policy_zone_layout_conformant_dual_custom(E_Border *bd, E_Illume_Config_Zone *cz);
-static void _policy_zone_layout_conformant_dual_left(E_Border *bd, E_Illume_Config_Zone *cz);
+static void _policy_zone_layout_indicator(E_Client *ec, E_Illume_Config_Zone *cz);
+static void _policy_zone_layout_quickpanel(E_Client *ec);
+static void _policy_zone_layout_softkey(E_Client *ec, E_Illume_Config_Zone *cz);
+static void _policy_zone_layout_keyboard(E_Client *ec, E_Illume_Config_Zone *cz);
+static void _policy_zone_layout_home_single(E_Client *ec, E_Illume_Config_Zone *cz);
+static void _policy_zone_layout_home_dual_top(E_Client *ec, E_Illume_Config_Zone *cz);
+static void _policy_zone_layout_home_dual_custom(E_Client *ec, E_Illume_Config_Zone *cz);
+static void _policy_zone_layout_home_dual_left(E_Client *ec, E_Illume_Config_Zone *cz);
+static void _policy_zone_layout_fullscreen(E_Client *ec);
+static void _policy_zone_layout_app_single(E_Client *ec, E_Illume_Config_Zone *cz);
+static void _policy_zone_layout_app_dual_top(E_Client *ec, E_Illume_Config_Zone *cz);
+static void _policy_zone_layout_app_dual_custom(E_Client *ec, E_Illume_Config_Zone *cz);
+static void _policy_zone_layout_app_dual_left(E_Client *ec, E_Illume_Config_Zone *cz);
+static void _policy_zone_layout_dialog(E_Client *ec, E_Illume_Config_Zone *cz);
+static void _policy_zone_layout_splash(E_Client *ec, E_Illume_Config_Zone *cz);
+static void _policy_zone_layout_conformant_single(E_Client *ec, E_Illume_Config_Zone *cz);
+static void _policy_zone_layout_conformant_dual_top(E_Client *ec, E_Illume_Config_Zone *cz);
+static void _policy_zone_layout_conformant_dual_custom(E_Client *ec, E_Illume_Config_Zone *cz);
+static void _policy_zone_layout_conformant_dual_left(E_Client *ec, E_Illume_Config_Zone *cz);
static Eina_List *_pol_focus_stack;
/* local functions */
static void
-_policy_border_set_focus(E_Border *bd)
+_policy_border_set_focus(E_Client *ec)
{
- if (!bd) return;
+ if (!ec) return;
/* if focus is locked out then get out */
- if (bd->lock_focus_out) return;
+ if (ec->lock_focus_out) return;
/* make sure the border can accept or take focus */
- if ((bd->client.icccm.accepts_focus) || (bd->client.icccm.take_focus))
+ if ((ec->icccm.accepts_focus) || (ec->icccm.take_focus))
{
/* check E's focus settings */
if ((e_config->focus_setting == E_FOCUS_NEW_WINDOW) ||
- ((bd->parent) &&
+ ((ec->parent) &&
((e_config->focus_setting == E_FOCUS_NEW_DIALOG) ||
- ((bd->parent->focused) &&
+ ((ec->parent->focused) &&
(e_config->focus_setting == E_FOCUS_NEW_DIALOG_IF_OWNER_FOCUSED)))))
{
/* if the border was hidden due to layout, we need to unhide */
- if (!bd->visible) e_illume_border_show(bd);
+ if (!ec->visible) e_illume_client_show(ec);
- if ((bd->iconic) && (!bd->lock_user_iconify))
- e_border_uniconify(bd);
+ if ((ec->iconic) && (!ec->lock_user_iconify))
+ e_client_uniconify(ec);
- if (!bd->lock_user_stacking) e_border_raise(bd);
+ if (!ec->lock_user_stacking) evas_object_raise(ec->frame);
/* focus the border */
- e_border_focus_set(bd, 1, 1);
+ evas_object_focus_set(ec->frame, 1);
/* hide the border below this one */
- _policy_border_hide_below(bd);
+ _policy_border_hide_below(ec);
/* NB: since we skip needless border evals when container layout
* is called (to save cpu cycles), we need to
@@ -79,202 +79,166 @@ _policy_border_set_focus(E_Border *bd)
* This is potentially useless as THIS policy
* makes all windows borderless anyway, but it's in here for
* completeness
- e_border_focus_latest_set(bd);
- if (bd->bg_object)
- edje_object_signal_emit(bd->bg_object, "e,state,focused", "e");
- if (bd->icon_object)
- edje_object_signal_emit(bd->icon_object, "e,state,focused", "e");
- e_focus_event_focus_in(bd);
+ e_client_focus_latest_set(ec);
+ if (ec->bg_object)
+ edje_object_signal_emit(ec->bg_object, "e,state,focused", "e");
+ if (ec->icon_object)
+ edje_object_signal_emit(ec->icon_object, "e,state,focused", "e");
+ e_focus_event_focus_in(ec);
*/
}
}
}
static void
-_policy_border_move(E_Border *bd, int x, int y)
+_policy_border_move(E_Client *ec, int x, int y)
{
- if (!bd) return;
+ if (!ec) return;
/* NB: Qt uses a weird window type called 'VCLSalFrame' that needs to
- * have bd->placed set else it doesn't position correctly...
+ * have ec->placed set else it doesn't position correctly...
* this could be a result of E honoring the icccm request position,
* not sure */
/* NB: Seems something similar happens with elementary windows also
- * so for now just set bd->placed on all windows until this
+ * so for now just set ec->placed on all windows until this
* gets investigated */
- bd->placed = 1;
- bd->x = x;
- bd->y = y;
- bd->changes.pos = 1;
- BD_CHANGED(bd);
+ ec->placed = 1;
+ ec->x = x;
+ ec->y = y;
+ ec->changes.pos = 1;
+ EC_CHANGED(ec);
}
static void
-_policy_border_resize(E_Border *bd, int w, int h)
+_policy_border_resize(E_Client *ec, int w, int h)
{
- if (!bd) return;
-
- bd->w = w;
- bd->h = h;
- bd->client.w = (bd->w - (bd->client_inset.l + bd->client_inset.r));
- bd->client.h = (bd->h - (bd->client_inset.t + bd->client_inset.b));
- bd->changes.size = 1;
- BD_CHANGED(bd);
+ if (!ec) return;
+
+ ec->w = w;
+ ec->h = h;
+ e_comp_object_frame_wh_unadjust(ec->frame, ec->w, ec->h, &ec->client.w, &ec->client.h);
+ ec->changes.size = 1;
+ EC_CHANGED(ec);
}
static void
-_policy_border_hide_above(E_Border *bd)
+_policy_border_hide_above(E_Client *ec)
{
- int pos = 0, layer = 0, i;
-
- if (!bd) return;
+ E_Client *b;
- /* determine layering position */
- layer = bd->layer;
- if (layer < 0) layer = 0;
- pos = 1 + (layer / 50);
- if (pos > 10) pos = 10;
+ if (!ec) return;
- /* Find the windows above this one */
- for (i = (pos + 1); i < 11; i++)
+ E_CLIENT_REVERSE_FOREACH(ec->comp, b)
{
- Eina_List *l;
- E_Border *b;
-
- EINA_LIST_REVERSE_FOREACH(bd->zone->container->layers[i].clients, l, b)
- {
- /* skip if it's the same border */
- if (b == bd) continue;
-
- /* skip if it's not on this zone */
- if (b->zone != bd->zone) continue;
-
- /* skip special borders */
- if (e_illume_border_is_indicator(b)) continue;
- if (e_illume_border_is_softkey(b)) continue;
- if (e_illume_border_is_keyboard(b)) continue;
- if (e_illume_border_is_quickpanel(b)) continue;
- if (e_illume_border_is_home(b)) continue;
-
- e_border_iconify(b);
- }
+ if (e_client_util_ignored_get(b)) continue;
+ if (b->layer <= ec->layer) break;
+ /* skip if it's the same border */
+ if (b == ec) continue;
+
+ /* skip if it's not on this zone */
+ if (b->zone != ec->zone) continue;
+
+ /* skip special borders */
+ if (e_illume_client_is_indicator(b)) continue;
+ if (e_illume_client_is_softkey(b)) continue;
+ if (e_illume_client_is_keyboard(b)) continue;
+ if (e_illume_client_is_quickpanel(b)) continue;
+ if (e_illume_client_is_home(b)) continue;
+
+ e_client_iconify(b);
}
}
static void
-_policy_border_hide_below(E_Border *bd)
+_policy_border_hide_below(E_Client *ec)
{
- int pos = 0, layer = 0, i;
-
- if (!bd) return;
+ E_Client *b;
- /* determine layering position */
- layer = bd->layer;
- if (layer < 0) layer = 0;
- pos = 1 + (layer / 50);
- if (pos > 10) pos = 10;
+ if (!ec) return;
- /* Find the windows below this one */
- for (i = (pos - 1); i >= 0; i--)
+ E_CLIENT_FOREACH(ec->comp, b)
{
- Eina_List *l;
- E_Border *b;
-
- EINA_LIST_FOREACH(bd->zone->container->layers[i].clients, l, b)
- {
- /* skip if it's the same border */
- if (b == bd) continue;
+ if (e_client_util_ignored_get(b)) continue;
+ /* break if it's the same client */
+ if (b == ec) break;
- /* skip if it's not on this zone */
- if (b->zone != bd->zone) continue;
+ /* skip if it's not on this zone */
+ if (b->zone != ec->zone) continue;
- /* skip special borders */
- if (e_illume_border_is_indicator(b)) continue;
- if (e_illume_border_is_softkey(b)) continue;
- if (e_illume_border_is_keyboard(b)) continue;
- if (e_illume_border_is_quickpanel(b)) continue;
- if (e_illume_border_is_home(b)) continue;
+ /* skip special borders */
+ if (e_illume_client_is_indicator(b)) continue;
+ if (e_illume_client_is_softkey(b)) continue;
+ if (e_illume_client_is_keyboard(b)) continue;
+ if (e_illume_client_is_quickpanel(b)) continue;
+ if (e_illume_client_is_home(b)) continue;
- if ((bd->fullscreen) || (bd->need_fullscreen))
- {
- if (b->visible) e_illume_border_hide(b);
- }
- else
+ if ((ec->fullscreen) || (ec->need_fullscreen))
+ {
+ if (b->visible) e_illume_client_hide(b);
+ }
+ else
+ {
+ /* we need to check x/y position */
+ if (E_CONTAINS(ec->x, ec->y, ec->w, ec->h,
+ b->x, b->y, b->w, b->h))
{
- /* we need to check x/y position */
- if (E_CONTAINS(bd->x, bd->y, bd->w, bd->h,
- b->x, b->y, b->w, b->h))
- {
- if (b->visible) e_illume_border_hide(b);
- }
+ if (b->visible) e_illume_client_hide(b);
}
}
}
}
static void
-_policy_border_show_below(E_Border *bd)
+_policy_border_show_below(E_Client *ec)
{
Eina_List *l;
- E_Border *prev;
- int pos = 0, layer = 0, i;
+ E_Client *prev, *b;
// printf("Show Borders Below: %s %d %d\n",
-// bd->client.icccm.class, bd->x, bd->y);
+// ec->icccm.class, ec->x, ec->y);
- if (!bd) return;
+ if (!ec) return;
- if (bd->client.icccm.transient_for)
+ if (ec->icccm.transient_for)
{
- if ((prev = e_border_find_by_client_window(bd->client.icccm.transient_for)))
+ if ((prev = e_pixmap_find_client(E_PIXMAP_TYPE_X, ec->icccm.transient_for)))
{
_policy_border_set_focus(prev);
return;
}
}
- /* determine layering position */
- layer = bd->layer;
- if (layer < 0) layer = 0;
- pos = 1 + (layer / 50);
- if (pos > 10) pos = 10;
-
- /* Find the windows below this one */
- for (i = (pos + 1); i < 11; i++)
+ E_CLIENT_FOREACH(ec->comp, b)
{
- E_Border *b;
-
- EINA_LIST_REVERSE_FOREACH(bd->zone->container->layers[i].clients, l, b)
- {
- /* skip if it's the same border */
- if (b == bd) continue;
+ if (e_client_util_ignored_get(b)) continue;
+ /* break if it's the same border */
+ if (b == ec) break;
- /* skip if it's not on this zone */
- if (b->zone != bd->zone) continue;
+ /* skip if it's not on this zone */
+ if (b->zone != ec->zone) continue;
- /* skip special borders */
- if (e_illume_border_is_indicator(b)) continue;
- if (e_illume_border_is_softkey(b)) continue;
- if (e_illume_border_is_keyboard(b)) continue;
- if (e_illume_border_is_quickpanel(b)) continue;
- if (e_illume_border_is_home(b)) continue;
+ /* skip special borders */
+ if (e_illume_client_is_indicator(b)) continue;
+ if (e_illume_client_is_softkey(b)) continue;
+ if (e_illume_client_is_keyboard(b)) continue;
+ if (e_illume_client_is_quickpanel(b)) continue;
+ if (e_illume_client_is_home(b)) continue;
- if ((bd->fullscreen) || (bd->need_fullscreen))
+ if ((ec->fullscreen) || (ec->need_fullscreen))
+ {
+ _policy_border_set_focus(b);
+ return;
+ }
+ else
+ {
+ /* need to check x/y position */
+ if (E_CONTAINS(ec->x, ec->y, ec->w, ec->h,
+ b->x, b->y, b->w, b->h))
{
_policy_border_set_focus(b);
return;
}
- else
- {
- /* need to check x/y position */
- if (E_CONTAINS(bd->x, bd->y, bd->w, bd->h,
- b->x, b->y, b->w, b->h))
- {
- _policy_border_set_focus(b);
- return;
- }
- }
}
}
@@ -282,85 +246,86 @@ _policy_border_show_below(E_Border *bd)
* this one, so show previous window in stack */
EINA_LIST_REVERSE_FOREACH(_pol_focus_stack, l, prev)
{
- if (prev->zone != bd->zone) continue;
+ if (prev->zone != ec->zone) continue;
_policy_border_set_focus(prev);
return;
}
/* Fallback to focusing home if all above fails */
- _policy_focus_home(bd->zone);
+ _policy_focus_home(ec->zone);
}
static void
_policy_zone_layout_update(E_Zone *zone)
{
Eina_List *l;
- E_Border *bd;
+ E_Client *ec;
if (!zone) return;
- EINA_LIST_FOREACH(e_border_client_list(), l, bd)
+ EINA_LIST_FOREACH(zone->comp->clients, l, ec)
{
+ if (e_client_util_ignored_get(ec)) continue;
/* skip borders not on this zone */
- if (bd->zone != zone) continue;
+ if (ec->zone != zone) continue;
/* skip special windows */
- if (e_object_is_del(E_OBJECT(bd))) continue;
- if (e_illume_border_is_keyboard(bd)) continue;
- if (e_illume_border_is_quickpanel(bd)) continue;
+ if (e_object_is_del(E_OBJECT(ec))) continue;
+ if (e_illume_client_is_keyboard(ec)) continue;
+ if (e_illume_client_is_quickpanel(ec)) continue;
/* signal a changed pos here so layout gets updated */
- bd->changes.pos = 1;
- BD_CHANGED(bd);
+ ec->changes.pos = 1;
+ EC_CHANGED(ec);
}
}
static void
-_policy_zone_layout_indicator(E_Border *bd, E_Illume_Config_Zone *cz)
+_policy_zone_layout_indicator(E_Client *ec, E_Illume_Config_Zone *cz)
{
- if ((!bd) || (!cz)) return;
+ if ((!ec) || (!cz)) return;
/* grab minimum indicator size */
- e_illume_border_min_get(bd, NULL, &cz->indicator.size);
+ e_illume_client_min_get(ec, NULL, &cz->indicator.size);
/* no point in doing anything here if indicator is hidden */
- if ((!bd->new_client) && (!bd->visible))
+ if ((!ec->new_client) && (!ec->visible))
{
- ecore_x_e_illume_indicator_geometry_set(bd->zone->black_win,
+ ecore_x_e_illume_indicator_geometry_set(ec->zone->black_win,
0, 0, 0, 0);
return;
}
/* if we are dragging, then skip it for now */
- if (bd->client.illume.drag.drag)
+ if (ec->illume.drag.drag)
{
/* when dragging indicator, we need to trigger a layout update */
- ecore_x_e_illume_indicator_geometry_set(bd->zone->black_win,
+ ecore_x_e_illume_indicator_geometry_set(ec->zone->black_win,
0, 0, 0, 0);
- _policy_zone_layout_update(bd->zone);
+ _policy_zone_layout_update(ec->zone);
return;
}
-// printf("\tLayout Indicator: %d\n", bd->zone->num);
+// printf("\tLayout Indicator: %d\n", ec->zone->num);
/* lock indicator window from dragging if we need to */
if ((cz->mode.dual == 1) && (cz->mode.side == 0))
- ecore_x_e_illume_drag_locked_set(bd->client.win, 0);
+ ecore_x_e_illume_drag_locked_set(e_client_util_win_get(ec), 0);
else
- ecore_x_e_illume_drag_locked_set(bd->client.win, 1);
+ ecore_x_e_illume_drag_locked_set(e_client_util_win_get(ec), 1);
/* make sure it's the required width & height */
- if ((bd->w != bd->zone->w) || (bd->h != cz->indicator.size))
- _policy_border_resize(bd, bd->zone->w, cz->indicator.size);
+ if ((ec->w != ec->zone->w) || (ec->h != cz->indicator.size))
+ _policy_border_resize(ec, ec->zone->w, cz->indicator.size);
/* are we in single mode ? */
if (!cz->mode.dual)
{
/* move to 0, 0 (relative to zone) if needed */
- if ((bd->x != bd->zone->x) || (bd->y != bd->zone->y))
+ if ((ec->x != ec->zone->x) || (ec->y != ec->zone->y))
{
- _policy_border_move(bd, bd->zone->x, bd->zone->y);
- ecore_x_e_illume_quickpanel_position_update_send(bd->client.win);
+ _policy_border_move(ec, ec->zone->x, ec->zone->y);
+ ecore_x_e_illume_quickpanel_position_update_send(e_client_util_win_get(ec));
}
}
else
@@ -372,377 +337,377 @@ _policy_zone_layout_indicator(E_Border *bd, E_Illume_Config_Zone *cz)
* in this case, the indicator itself should be responsible for
* sending the quickpanel position update message when it is
* finished dragging */
- if (bd->x != bd->zone->x)
- _policy_border_move(bd, bd->zone->x, bd->y);
+ if (ec->x != ec->zone->x)
+ _policy_border_move(ec, ec->zone->x, ec->y);
}
else
{
/* move to 0, 0 (relative to zone) if needed */
- if ((bd->x != bd->zone->x) || (bd->y != bd->zone->y))
+ if ((ec->x != ec->zone->x) || (ec->y != ec->zone->y))
{
- _policy_border_move(bd, bd->zone->x, bd->zone->y);
- ecore_x_e_illume_quickpanel_position_update_send(bd->client.win);
+ _policy_border_move(ec, ec->zone->x, ec->zone->y);
+ ecore_x_e_illume_quickpanel_position_update_send(e_client_util_win_get(ec));
}
}
}
- ecore_x_e_illume_indicator_geometry_set(bd->zone->black_win,
- bd->x, bd->y,
- bd->w, bd->h);
+ ecore_x_e_illume_indicator_geometry_set(ec->zone->black_win,
+ ec->x, ec->y,
+ ec->w, ec->h);
/* set layer if needed */
- if (bd->layer != POL_INDICATOR_LAYER)
- e_border_layer_set(bd, POL_INDICATOR_LAYER);
+ if (ec->layer != POL_INDICATOR_LAYER)
+ evas_object_layer_set(ec->frame, POL_INDICATOR_LAYER);
}
static void
-_policy_zone_layout_quickpanel(E_Border *bd)
+_policy_zone_layout_quickpanel(E_Client *ec)
{
int mh;
- if (!bd) return;
+ if (!ec) return;
/* grab minimum size */
- e_illume_border_min_get(bd, NULL, &mh);
+ e_illume_client_min_get(ec, NULL, &mh);
/* resize if needed */
- if ((bd->w != bd->zone->w) || (bd->h != mh))
- _policy_border_resize(bd, bd->zone->w, mh);
+ if ((ec->w != ec->zone->w) || (ec->h != mh))
+ _policy_border_resize(ec, ec->zone->w, mh);
/* set layer if needed */
- if (bd->layer != POL_QUICKPANEL_LAYER)
- e_border_layer_set(bd, POL_QUICKPANEL_LAYER);
+ if (ec->layer != POL_QUICKPANEL_LAYER)
+ evas_object_layer_set(ec->frame, POL_QUICKPANEL_LAYER);
}
static void
-_policy_zone_layout_softkey(E_Border *bd, E_Illume_Config_Zone *cz)
+_policy_zone_layout_softkey(E_Client *ec, E_Illume_Config_Zone *cz)
{
int ny;
- if (!bd) return;
+ if (!ec) return;
/* grab minimum softkey size */
- e_illume_border_min_get(bd, NULL, &cz->softkey.size);
+ e_illume_client_min_get(ec, NULL, &cz->softkey.size);
/* no point in doing anything here if softkey is hidden */
- if (!bd->visible)
+ if (!ec->visible)
{
- ecore_x_e_illume_softkey_geometry_set(bd->zone->black_win,
+ ecore_x_e_illume_softkey_geometry_set(ec->zone->black_win,
0, 0, 0, 0);
return;
}
/* if we are dragging, then skip it for now */
/* NB: Disabled currently until we confirm that softkey should be draggable */
-// if (bd->client.illume.drag.drag) return;
+// if (ec->illume.drag.drag) return;
/* make sure it's the required width & height */
- if ((bd->w != bd->zone->w) || (bd->h != cz->softkey.size))
- _policy_border_resize(bd, bd->zone->w, cz->softkey.size);
+ if ((ec->w != ec->zone->w) || (ec->h != cz->softkey.size))
+ _policy_border_resize(ec, ec->zone->w, cz->softkey.size);
/* make sure it's in the correct position */
- ny = ((bd->zone->y + bd->zone->h) - cz->softkey.size);
+ ny = ((ec->zone->y + ec->zone->h) - cz->softkey.size);
/* NB: not sure why yet, but on startup the border->y is reporting
* that it is already in this position...but it's actually not.
* So for now, just disable the ny check until this gets sorted out */
-// if ((bd->x != bd->zone->x) || (bd->y != ny))
- _policy_border_move(bd, bd->zone->x, ny);
+// if ((ec->x != ec->zone->x) || (ec->y != ny))
+ _policy_border_move(ec, ec->zone->x, ny);
// set property for apps to find out they are
- ecore_x_e_illume_softkey_geometry_set(bd->zone->black_win,
- bd->x, bd->y,
- bd->w, bd->h);
+ ecore_x_e_illume_softkey_geometry_set(ec->zone->black_win,
+ ec->x, ec->y,
+ ec->w, ec->h);
/* set layer if needed */
- if (bd->layer != POL_SOFTKEY_LAYER)
- e_border_layer_set(bd, POL_SOFTKEY_LAYER);
+ if (ec->layer != POL_SOFTKEY_LAYER)
+ evas_object_layer_set(ec->frame, POL_SOFTKEY_LAYER);
}
static void
-_policy_zone_layout_keyboard(E_Border *bd, E_Illume_Config_Zone *cz)
+_policy_zone_layout_keyboard(E_Client *ec, E_Illume_Config_Zone *cz)
{
int ny, layer;
// printf("\tLayout Keyboard\n");
- if ((!bd) || (!cz)) return;
+ if ((!ec) || (!cz)) return;
/* no point in adjusting size or position if it's not visible */
- if (!bd->visible) return;
+ if (!ec->visible) return;
/* grab minimum keyboard size */
- e_illume_border_min_get(bd, NULL, &cz->vkbd.size);
+ e_illume_client_min_get(ec, NULL, &cz->vkbd.size);
/* make sure it's the required width & height */
- if ((bd->w != bd->zone->w) || (bd->h != cz->vkbd.size))
- _policy_border_resize(bd, bd->zone->w, cz->vkbd.size);
+ if ((ec->w != ec->zone->w) || (ec->h != cz->vkbd.size))
+ _policy_border_resize(ec, ec->zone->w, cz->vkbd.size);
/* make sure it's in the correct position */
- ny = ((bd->zone->y + bd->zone->h) - cz->vkbd.size);
- if ((bd->x != bd->zone->x) || (bd->y != ny))
- _policy_border_move(bd, bd->zone->x, ny);
+ ny = ((ec->zone->y + ec->zone->h) - cz->vkbd.size);
+ if ((ec->x != ec->zone->x) || (ec->y != ny))
+ _policy_border_move(ec, ec->zone->x, ny);
/* check layer according to fullscreen state */
- if ((bd->fullscreen) || (bd->need_fullscreen))
+ if ((ec->fullscreen) || (ec->need_fullscreen))
layer = POL_FULLSCREEN_LAYER;
else
layer = POL_KEYBOARD_LAYER;
/* set layer if needed */
- if ((int)bd->layer != layer) e_border_layer_set(bd, layer);
+ if ((int)ec->layer != layer) evas_object_layer_set(ec->frame, layer);
}
static void
-_policy_zone_layout_home_single(E_Border *bd, E_Illume_Config_Zone *cz)
+_policy_zone_layout_home_single(E_Client *ec, E_Illume_Config_Zone *cz)
{
int ny, nh, indsz = 0, sftsz = 0;
- E_Border *ind, *sft;
+ E_Client *ind, *sft;
- if ((!bd) || (!cz)) return;
+ if ((!ec) || (!cz)) return;
/* no point in adjusting size or position if it's not visible */
- if (!bd->visible) return;
+ if (!ec->visible) return;
-// printf("\tLayout Home Single: %s\n", bd->client.icccm.class);
+// printf("\tLayout Home Single: %s\n", ec->icccm.class);
indsz = cz->indicator.size;
sftsz = cz->softkey.size;
- if ((ind = e_illume_border_indicator_get(bd->zone)))
+ if ((ind = e_illume_client_indicator_get(ec->zone)))
{
if (!ind->visible) indsz = 0;
}
- if ((sft = e_illume_border_softkey_get(bd->zone)))
+ if ((sft = e_illume_client_softkey_get(ec->zone)))
{
if (!sft->visible) sftsz = 0;
}
/* make sure it's the required width & height */
- if (e_illume_border_is_conformant(bd)) nh = bd->zone->h;
- else nh = (bd->zone->h - indsz - sftsz);
+ if (e_illume_client_is_conformant(ec)) nh = ec->zone->h;
+ else nh = (ec->zone->h - indsz - sftsz);
- if ((bd->w != bd->zone->w) || (bd->h != nh))
- _policy_border_resize(bd, bd->zone->w, nh);
+ if ((ec->w != ec->zone->w) || (ec->h != nh))
+ _policy_border_resize(ec, ec->zone->w, nh);
/* move to correct position (relative to zone) if needed */
- if (e_illume_border_is_conformant(bd)) ny = bd->zone->y;
- else ny = (bd->zone->y + indsz);
- if ((bd->x != bd->zone->x) || (bd->y != ny))
- _policy_border_move(bd, bd->zone->x, ny);
+ if (e_illume_client_is_conformant(ec)) ny = ec->zone->y;
+ else ny = (ec->zone->y + indsz);
+ if ((ec->x != ec->zone->x) || (ec->y != ny))
+ _policy_border_move(ec, ec->zone->x, ny);
/* set layer if needed */
- if (bd->layer != POL_HOME_LAYER) e_border_layer_set(bd, POL_HOME_LAYER);
+ if (ec->layer != POL_HOME_LAYER) evas_object_layer_set(ec->frame, POL_HOME_LAYER);
}
static void
-_policy_zone_layout_home_dual_top(E_Border *bd, E_Illume_Config_Zone *cz)
+_policy_zone_layout_home_dual_top(E_Client *ec, E_Illume_Config_Zone *cz)
{
- E_Border *home, *ind, *sft;
+ E_Client *home, *ind, *sft;
int ny, nh, indsz = 0, sftsz = 0;
- if ((!bd) || (!cz)) return;
+ if ((!ec) || (!cz)) return;
/* no point in adjusting size or position if it's not visible */
- if (!bd->visible) return;
+ if (!ec->visible) return;
indsz = cz->indicator.size;
sftsz = cz->softkey.size;
- if ((ind = e_illume_border_indicator_get(bd->zone)))
+ if ((ind = e_illume_client_indicator_get(ec->zone)))
{
if (!ind->visible) indsz = 0;
}
- if ((sft = e_illume_border_softkey_get(bd->zone)))
+ if ((sft = e_illume_client_softkey_get(ec->zone)))
{
if (!sft->visible) sftsz = 0;
}
/* set some defaults */
- ny = (bd->zone->y + indsz);
- nh = ((bd->zone->h - indsz - sftsz) / 2);
+ ny = (ec->zone->y + indsz);
+ nh = ((ec->zone->h - indsz - sftsz) / 2);
/* see if there are any other home windows */
- home = e_illume_border_home_get(bd->zone);
+ home = e_illume_client_home_get(ec->zone);
if (home)
{
- if (bd != home) ny = (home->y + nh);
+ if (ec != home) ny = (home->y + nh);
}
/* make sure it's the required width & height */
- if ((bd->w != bd->zone->w) || (bd->h != nh))
- _policy_border_resize(bd, bd->zone->w, nh);
+ if ((ec->w != ec->zone->w) || (ec->h != nh))
+ _policy_border_resize(ec, ec->zone->w, nh);
/* move to correct position (relative to zone) if needed */
- if ((bd->x != bd->zone->x) || (bd->y != ny))
- _policy_border_move(bd, bd->zone->x, ny);
+ if ((ec->x != ec->zone->x) || (ec->y != ny))
+ _policy_border_move(ec, ec->zone->x, ny);
/* set layer if needed */
- if (bd->layer != POL_HOME_LAYER) e_border_layer_set(bd, POL_HOME_LAYER);
+ if (ec->layer != POL_HOME_LAYER) evas_object_layer_set(ec->frame, POL_HOME_LAYER);
}
static void
-_policy_zone_layout_home_dual_custom(E_Border *bd, E_Illume_Config_Zone *cz)
+_policy_zone_layout_home_dual_custom(E_Client *ec, E_Illume_Config_Zone *cz)
{
- E_Border *home;
+ E_Client *home;
int iy, ny, nh;
-// printf("\tLayout Home Dual Custom: %s\n", bd->client.icccm.class);
+// printf("\tLayout Home Dual Custom: %s\n", ec->icccm.class);
- if ((!bd) || (!cz)) return;
+ if ((!ec) || (!cz)) return;
/* no point in adjusting size or position if it's not visible */
- if (!bd->visible) return;
+ if (!ec->visible) return;
/* grab indicator position */
- e_illume_border_indicator_pos_get(bd->zone, NULL, &iy);
+ e_illume_client_indicator_pos_get(ec->zone, NULL, &iy);
/* set some defaults */
- ny = bd->zone->y;
+ ny = ec->zone->y;
nh = iy;
/* see if there are any other home windows */
- home = e_illume_border_home_get(bd->zone);
- if ((home) && (bd != home))
+ home = e_illume_client_home_get(ec->zone);
+ if ((home) && (ec != home))
{
ny = (iy + cz->indicator.size);
- nh = ((bd->zone->y + bd->zone->h) - ny - cz->softkey.size);
+ nh = ((ec->zone->y + ec->zone->h) - ny - cz->softkey.size);
}
/* make sure it's the required width & height */
- if ((bd->w != bd->zone->w) || (bd->h != nh))
- _policy_border_resize(bd, bd->zone->w, nh);
+ if ((ec->w != ec->zone->w) || (ec->h != nh))
+ _policy_border_resize(ec, ec->zone->w, nh);
/* move to correct position (relative to zone) if needed */
- if ((bd->x != bd->zone->x) || (bd->y != ny))
- _policy_border_move(bd, bd->zone->x, ny);
+ if ((ec->x != ec->zone->x) || (ec->y != ny))
+ _policy_border_move(ec, ec->zone->x, ny);
/* set layer if needed */
- if (bd->layer != POL_HOME_LAYER) e_border_layer_set(bd, POL_HOME_LAYER);
+ if (ec->layer != POL_HOME_LAYER) evas_object_layer_set(ec->frame, POL_HOME_LAYER);
}
static void
-_policy_zone_layout_home_dual_left(E_Border *bd, E_Illume_Config_Zone *cz)
+_policy_zone_layout_home_dual_left(E_Client *ec, E_Illume_Config_Zone *cz)
{
- E_Border *home;
+ E_Client *home;
int nx, nw, nh;
-// printf("\tLayout Home Dual Left: %s\n", bd->client.icccm.class);
+// printf("\tLayout Home Dual Left: %s\n", ec->icccm.class);
- if ((!bd) || (!cz)) return;
+ if ((!ec) || (!cz)) return;
/* no point in adjusting size or position if it's not visible */
- if (!bd->visible) return;
+ if (!ec->visible) return;
- nh = (bd->zone->h - cz->indicator.size - cz->softkey.size);
+ nh = (ec->zone->h - cz->indicator.size - cz->softkey.size);
/* set some defaults */
- nx = bd->zone->x;
- nw = (bd->zone->w / 2);
+ nx = ec->zone->x;
+ nw = (ec->zone->w / 2);
/* see if there are any other home windows */
- home = e_illume_border_home_get(bd->zone);
- if ((home) && (bd != home)) nx = (home->x + nw);
+ home = e_illume_client_home_get(ec->zone);
+ if ((home) && (ec != home)) nx = (home->x + nw);
/* make sure it's the required width & height */
- if ((bd->w != nw) || (bd->h != nh))
- _policy_border_resize(bd, nw, nh);
+ if ((ec->w != nw) || (ec->h != nh))
+ _policy_border_resize(ec, nw, nh);
/* move to correct position (relative to zone) if needed */
- if ((bd->x != nx) || (bd->y != (bd->zone->y + cz->indicator.size)))
- _policy_border_move(bd, nx, (bd->zone->y + cz->indicator.size));
+ if ((ec->x != nx) || (ec->y != (ec->zone->y + cz->indicator.size)))
+ _policy_border_move(ec, nx, (ec->zone->y + cz->indicator.size));
/* set layer if needed */
- if (bd->layer != POL_HOME_LAYER) e_border_layer_set(bd, POL_HOME_LAYER);
+ if (ec->layer != POL_HOME_LAYER) evas_object_layer_set(ec->frame, POL_HOME_LAYER);
}
static void
-_policy_zone_layout_fullscreen(E_Border *bd)
+_policy_zone_layout_fullscreen(E_Client *ec)
{
int kh;
-// printf("\tLayout Fullscreen: %s\n", bd->client.icccm.name);
+// printf("\tLayout Fullscreen: %s\n", ec->icccm.name);
- if (!bd) return;
+ if (!ec) return;
/* grab keyboard safe region */
- e_illume_keyboard_safe_app_region_get(bd->zone, NULL, NULL, NULL, &kh);
+ e_illume_keyboard_safe_app_region_get(ec->zone, NULL, NULL, NULL, &kh);
/* make sure it's the required width & height */
- if ((bd->w != bd->zone->w) || (bd->h != kh))
- _policy_border_resize(bd, bd->zone->w, kh);
+ if ((ec->w != ec->zone->w) || (ec->h != kh))
+ _policy_border_resize(ec, ec->zone->w, kh);
/* set layer if needed */
- if (bd->layer != POL_FULLSCREEN_LAYER)
- e_border_layer_set(bd, POL_FULLSCREEN_LAYER);
+ if (ec->layer != POL_FULLSCREEN_LAYER)
+ evas_object_layer_set(ec->frame, POL_FULLSCREEN_LAYER);
}
static void
-_policy_zone_layout_app_single(E_Border *bd, E_Illume_Config_Zone *cz)
+_policy_zone_layout_app_single(E_Client *ec, E_Illume_Config_Zone *cz)
{
int ky, kh, ny, nh;
- if ((!bd) || (!cz)) return;
- if ((!bd->new_client) && (!bd->visible)) return;
+ if ((!ec) || (!cz)) return;
+ if ((!ec->new_client) && (!ec->visible)) return;
-// printf("\tLayout App Single: %s\n", bd->client.icccm.name);
+// printf("\tLayout App Single: %s\n", ec->icccm.name);
/* grab keyboard safe region */
- e_illume_keyboard_safe_app_region_get(bd->zone, NULL, &ky, NULL, &kh);
+ e_illume_keyboard_safe_app_region_get(ec->zone, NULL, &ky, NULL, &kh);
/* make sure it's the required width & height */
- if (kh >= bd->zone->h)
+ if (kh >= ec->zone->h)
nh = (kh - cz->indicator.size - cz->softkey.size);
else
nh = (kh - cz->indicator.size);
/* resize if needed */
- if ((bd->w != bd->zone->w) || (bd->h != nh))
- _policy_border_resize(bd, bd->zone->w, nh);
+ if ((ec->w != ec->zone->w) || (ec->h != nh))
+ _policy_border_resize(ec, ec->zone->w, nh);
/* move to correct position (relative to zone) if needed */
- ny = (bd->zone->y + cz->indicator.size);
- if ((bd->x != bd->zone->x) || (bd->y != ny))
- _policy_border_move(bd, bd->zone->x, ny);
+ ny = (ec->zone->y + cz->indicator.size);
+ if ((ec->x != ec->zone->x) || (ec->y != ny))
+ _policy_border_move(ec, ec->zone->x, ny);
/* set layer if needed */
- if (bd->layer != POL_APP_LAYER) e_border_layer_set(bd, POL_APP_LAYER);
+ if (ec->layer != POL_APP_LAYER) evas_object_layer_set(ec->frame, POL_APP_LAYER);
}
static void
-_policy_zone_layout_app_dual_top(E_Border *bd, E_Illume_Config_Zone *cz)
+_policy_zone_layout_app_dual_top(E_Client *ec, E_Illume_Config_Zone *cz)
{
- E_Border *b;
+ E_Client *b;
int kh, ny, nh;
-// printf("\tLayout App Dual Top: %s\n", bd->client.icccm.name);
+// printf("\tLayout App Dual Top: %s\n", ec->icccm.name);
- if ((!bd) || (!cz)) return;
- if ((!bd->new_client) && (!bd->visible)) return;
+ if ((!ec) || (!cz)) return;
+ if ((!ec->new_client) && (!ec->visible)) return;
/* set a default Y position */
- ny = (bd->zone->y + cz->indicator.size);
+ ny = (ec->zone->y + cz->indicator.size);
- if ((bd->focused) &&
- (bd->client.vkbd.state > ECORE_X_VIRTUAL_KEYBOARD_STATE_OFF))
+ if ((ec->focused) &&
+ (ec->vkbd.state > ECORE_X_VIRTUAL_KEYBOARD_STATE_OFF))
{
/* grab keyboard safe region */
- e_illume_keyboard_safe_app_region_get(bd->zone, NULL, NULL, NULL, &kh);
+ e_illume_keyboard_safe_app_region_get(ec->zone, NULL, NULL, NULL, &kh);
nh = (kh - cz->indicator.size);
}
else
{
/* make sure it's the required width & height */
- nh = ((bd->zone->h - cz->indicator.size - cz->softkey.size) / 2);
+ nh = ((ec->zone->h - cz->indicator.size - cz->softkey.size) / 2);
}
/* see if there is a border already there. if so, check placement based on
* virtual keyboard usage */
- b = e_illume_border_at_xy_get(bd->zone, bd->zone->x, ny);
- if ((b) && (b != bd))
+ b = e_illume_client_at_xy_get(ec->zone, ec->zone->x, ny);
+ if ((b) && (b != ec))
{
/* does this border need keyboard ? */
- if ((bd->focused) &&
- (bd->client.vkbd.state > ECORE_X_VIRTUAL_KEYBOARD_STATE_OFF))
+ if ((ec->focused) &&
+ (ec->vkbd.state > ECORE_X_VIRTUAL_KEYBOARD_STATE_OFF))
{
int h;
/* move existing border to bottom if needed */
- h = ((bd->zone->h - cz->indicator.size - cz->softkey.size) / 2);
+ h = ((ec->zone->h - cz->indicator.size - cz->softkey.size) / 2);
if ((b->x != b->zone->x) || (b->y != (ny + h)))
_policy_border_move(b, b->zone->x, (ny + h));
@@ -755,115 +720,115 @@ _policy_zone_layout_app_dual_top(E_Border *bd, E_Illume_Config_Zone *cz)
}
/* resize if needed */
- if ((bd->w != bd->zone->w) || (bd->h != nh))
- _policy_border_resize(bd, bd->zone->w, nh);
+ if ((ec->w != ec->zone->w) || (ec->h != nh))
+ _policy_border_resize(ec, ec->zone->w, nh);
/* move to correct position (relative to zone) if needed */
- if ((bd->x != bd->zone->x) || (bd->y != ny))
- _policy_border_move(bd, bd->zone->x, ny);
+ if ((ec->x != ec->zone->x) || (ec->y != ny))
+ _policy_border_move(ec, ec->zone->x, ny);
/* set layer if needed */
- if (bd->layer != POL_APP_LAYER) e_border_layer_set(bd, POL_APP_LAYER);
+ if (ec->layer != POL_APP_LAYER) evas_object_layer_set(ec->frame, POL_APP_LAYER);
}
static void
-_policy_zone_layout_app_dual_custom(E_Border *bd, E_Illume_Config_Zone *cz)
+_policy_zone_layout_app_dual_custom(E_Client *ec, E_Illume_Config_Zone *cz)
{
- E_Border *app;
+ E_Client *app;
int iy, ny, nh;
-// printf("\tLayout App Dual Custom: %s\n", bd->client.icccm.class);
+// printf("\tLayout App Dual Custom: %s\n", ec->icccm.class);
- if ((!bd) || (!cz)) return;
- if ((!bd->new_client) && (!bd->visible)) return;
+ if ((!ec) || (!cz)) return;
+ if ((!ec->new_client) && (!ec->visible)) return;
/* grab indicator position */
- e_illume_border_indicator_pos_get(bd->zone, NULL, &iy);
+ e_illume_client_indicator_pos_get(ec->zone, NULL, &iy);
/* set a default position */
- ny = bd->zone->y;
+ ny = ec->zone->y;
nh = iy;
- app = e_illume_border_at_xy_get(bd->zone, bd->zone->x, bd->zone->y);
- if ((app) && (bd != app))
+ app = e_illume_client_at_xy_get(ec->zone, ec->zone->x, ec->zone->y);
+ if ((app) && (ec != app))
{
ny = (iy + cz->indicator.size);
- nh = ((bd->zone->y + bd->zone->h) - ny - cz->softkey.size);
+ nh = ((ec->zone->y + ec->zone->h) - ny - cz->softkey.size);
}
/* make sure it's the required width & height */
- if ((bd->w != bd->zone->w) || (bd->h != nh))
- _policy_border_resize(bd, bd->zone->w, nh);
+ if ((ec->w != ec->zone->w) || (ec->h != nh))
+ _policy_border_resize(ec, ec->zone->w, nh);
/* move to correct position (relative to zone) if needed */
- if ((bd->x != bd->zone->x) || (bd->y != ny))
- _policy_border_move(bd, bd->zone->x, ny);
+ if ((ec->x != ec->zone->x) || (ec->y != ny))
+ _policy_border_move(ec, ec->zone->x, ny);
/* set layer if needed */
- if (bd->layer != POL_APP_LAYER) e_border_layer_set(bd, POL_APP_LAYER);
+ if (ec->layer != POL_APP_LAYER) evas_object_layer_set(ec->frame, POL_APP_LAYER);
}
static void
-_policy_zone_layout_app_dual_left(E_Border *bd, E_Illume_Config_Zone *cz)
+_policy_zone_layout_app_dual_left(E_Client *ec, E_Illume_Config_Zone *cz)
{
- E_Border *b;
+ E_Client *b;
int ky, kh, nx, nw;
-// printf("\tLayout App Dual Left: %s\n", bd->client.icccm.name);
+// printf("\tLayout App Dual Left: %s\n", ec->icccm.name);
- if ((!bd) || (!cz)) return;
- if ((!bd->new_client) && (!bd->visible)) return;
+ if ((!ec) || (!cz)) return;
+ if ((!ec->new_client) && (!ec->visible)) return;
/* grab keyboard safe region */
- e_illume_keyboard_safe_app_region_get(bd->zone, NULL, &ky, NULL, &kh);
+ e_illume_keyboard_safe_app_region_get(ec->zone, NULL, &ky, NULL, &kh);
- if (kh >= bd->zone->h)
+ if (kh >= ec->zone->h)
kh = (kh - cz->indicator.size - cz->softkey.size);
else
kh = (kh - cz->indicator.size);
/* set some defaults */
- nx = bd->zone->x;
- nw = (bd->zone->w / 2);
+ nx = ec->zone->x;
+ nw = (ec->zone->w / 2);
/* see if there is a border already there. if so, place at right */
- b = e_illume_border_at_xy_get(bd->zone, nx, (ky + cz->indicator.size));
- if ((b) && (bd != b)) nx = b->x + nw;
+ b = e_illume_client_at_xy_get(ec->zone, nx, (ky + cz->indicator.size));
+ if ((b) && (ec != b)) nx = b->x + nw;
/* resize if needed */
- if ((bd->w != nw) || (bd->h != kh))
- _policy_border_resize(bd, nw, kh);
+ if ((ec->w != nw) || (ec->h != kh))
+ _policy_border_resize(ec, nw, kh);
/* move to correct position (relative to zone) if needed */
- if ((bd->x != nx) || (bd->y != (ky + cz->indicator.size)))
- _policy_border_move(bd, nx, (ky + cz->indicator.size));
+ if ((ec->x != nx) || (ec->y != (ky + cz->indicator.size)))
+ _policy_border_move(ec, nx, (ky + cz->indicator.size));
/* set layer if needed */
- if (bd->layer != POL_APP_LAYER) e_border_layer_set(bd, POL_APP_LAYER);
+ if (ec->layer != POL_APP_LAYER) evas_object_layer_set(ec->frame, POL_APP_LAYER);
}
static void
-_policy_zone_layout_dialog(E_Border *bd, E_Illume_Config_Zone *cz)
+_policy_zone_layout_dialog(E_Client *ec, E_Illume_Config_Zone *cz)
{
- E_Border *parent;
+ E_Client *parent;
int mw, mh, nx, ny;
-// printf("\tLayout Dialog: %s\n", bd->client.icccm.name);
+// printf("\tLayout Dialog: %s\n", ec->icccm.name);
/* NB: This policy ignores any ICCCM requested positions and centers the
* dialog on it's parent (if it exists) or on the zone */
- if ((!bd) || (!cz)) return;
+ if ((!ec) || (!cz)) return;
- mw = bd->w;
- mh = bd->h;
+ mw = ec->w;
+ mh = ec->h;
/* make sure it fits in this zone */
- if (mw > bd->zone->w) mw = bd->zone->w;
- if (mh > bd->zone->h) mh = bd->zone->h;
+ if (mw > ec->zone->w) mw = ec->zone->w;
+ if (mh > ec->zone->h) mh = ec->zone->h;
/* try to get this dialog's parent if it exists */
- parent = e_illume_border_parent_get(bd);
+ parent = e_illume_client_parent_get(ec);
/* if we have no parent, or we are in dual mode, then center on zone */
/* NB: we check dual mode because if we are in dual mode, dialogs tend to
@@ -872,8 +837,8 @@ _policy_zone_layout_dialog(E_Border *bd, E_Illume_Config_Zone *cz)
if ((!parent) || (cz->mode.dual == 1))
{
/* no parent or dual mode, center on screen */
- nx = (bd->zone->x + ((bd->zone->w - mw) / 2));
- ny = (bd->zone->y + ((bd->zone->h - mh) / 2));
+ nx = (ec->zone->x + ((ec->zone->w - mw) / 2));
+ ny = (ec->zone->y + ((ec->zone->h - mh) / 2));
}
else
{
@@ -890,43 +855,43 @@ _policy_zone_layout_dialog(E_Border *bd, E_Illume_Config_Zone *cz)
}
/* make sure it's the required width & height */
- if ((bd->w != mw) || (bd->h != mh))
- _policy_border_resize(bd, mw, mh);
+ if ((ec->w != mw) || (ec->h != mh))
+ _policy_border_resize(ec, mw, mh);
/* make sure it's in the correct position */
- if ((bd->x != nx) || (bd->y != ny))
- _policy_border_move(bd, nx, ny);
+ if ((ec->x != nx) || (ec->y != ny))
+ _policy_border_move(ec, nx, ny);
/* set layer if needed */
- if (bd->layer != POL_DIALOG_LAYER)
- e_border_layer_set(bd, POL_DIALOG_LAYER);
+ if (ec->layer != POL_DIALOG_LAYER)
+ evas_object_layer_set(ec->frame, POL_DIALOG_LAYER);
}
static void
-_policy_zone_layout_splash(E_Border *bd, E_Illume_Config_Zone *cz)
+_policy_zone_layout_splash(E_Client *ec, E_Illume_Config_Zone *cz)
{
- E_Border *parent = NULL;
+ E_Client *parent = NULL;
int mw, mh, nx, ny;
/* NB: This code is almost exactly the same as the dialog layout code
* (_policy_zone_layout_dialog) except for setting a different layer */
-// printf("\tLayout Splash: %s\n", bd->client.icccm.name);
+// printf("\tLayout Splash: %s\n", ec->icccm.name);
/* NB: This policy ignores any ICCCM requested positions and centers the
* splash screen on it's parent (if it exists) or on the zone */
- if ((!bd) || (!cz)) return;
+ if ((!ec) || (!cz)) return;
/* no point in adjusting size or position if it's not visible */
- if (!bd->visible) return;
+ if (!ec->visible) return;
/* grab minimum size */
- e_illume_border_min_get(bd, &mw, &mh);
+ e_illume_client_min_get(ec, &mw, &mh);
/* make sure it fits in this zone */
- if (mw > bd->zone->w) mw = bd->zone->w;
- if (mh > bd->zone->h) mh = bd->zone->h;
+ if (mw > ec->zone->w) mw = ec->zone->w;
+ if (mh > ec->zone->h) mh = ec->zone->h;
/* if we have no parent, or we are in dual mode, then center on zone */
/* NB: we check dual mode because if we are in dual mode, dialogs tend to
@@ -935,8 +900,8 @@ _policy_zone_layout_splash(E_Border *bd, E_Illume_Config_Zone *cz)
if ((!parent) || (cz->mode.dual == 1))
{
/* no parent or in dual mode, center on screen */
- nx = (bd->zone->x + ((bd->zone->w - mw) / 2));
- ny = (bd->zone->y + ((bd->zone->h - mh) / 2));
+ nx = (ec->zone->x + ((ec->zone->w - mw) / 2));
+ ny = (ec->zone->y + ((ec->zone->h - mh) / 2));
}
else
{
@@ -953,128 +918,128 @@ _policy_zone_layout_splash(E_Border *bd, E_Illume_Config_Zone *cz)
}
/* make sure it's the required width & height */
- if ((bd->w != mw) || (bd->h != mh))
- _policy_border_resize(bd, mw, mh);
+ if ((ec->w != mw) || (ec->h != mh))
+ _policy_border_resize(ec, mw, mh);
/* make sure it's in the correct position */
- if ((bd->x != nx) || (bd->y != ny))
- _policy_border_move(bd, nx, ny);
+ if ((ec->x != nx) || (ec->y != ny))
+ _policy_border_move(ec, nx, ny);
/* set layer if needed */
- if (bd->layer != POL_SPLASH_LAYER) e_border_layer_set(bd, POL_SPLASH_LAYER);
+ if (ec->layer != POL_SPLASH_LAYER) evas_object_layer_set(ec->frame, POL_SPLASH_LAYER);
}
static void
-_policy_zone_layout_conformant_single(E_Border *bd, E_Illume_Config_Zone *cz)
+_policy_zone_layout_conformant_single(E_Client *ec, E_Illume_Config_Zone *cz)
{
- if ((!bd) || (!cz)) return;
- if ((!bd->new_client) && (!bd->visible)) return;
+ if ((!ec) || (!cz)) return;
+ if ((!ec->new_client) && (!ec->visible)) return;
/* make sure it's the required width & height */
- if ((bd->w != bd->zone->w) || (bd->h != bd->zone->h))
- _policy_border_resize(bd, bd->zone->w, bd->zone->h);
+ if ((ec->w != ec->zone->w) || (ec->h != ec->zone->h))
+ _policy_border_resize(ec, ec->zone->w, ec->zone->h);
/* move to correct position (relative to zone) if needed */
- if ((bd->x != bd->zone->x) || (bd->y != bd->zone->y))
- _policy_border_move(bd, bd->zone->x, bd->zone->y);
+ if ((ec->x != ec->zone->x) || (ec->y != ec->zone->y))
+ _policy_border_move(ec, ec->zone->x, ec->zone->y);
/* set layer if needed */
- if (bd->layer != POL_CONFORMANT_LAYER)
- e_border_layer_set(bd, POL_CONFORMANT_LAYER);
+ if (ec->layer != POL_CONFORMANT_LAYER)
+ evas_object_layer_set(ec->frame, POL_CONFORMANT_LAYER);
}
static void
-_policy_zone_layout_conformant_dual_top(E_Border *bd, E_Illume_Config_Zone *cz)
+_policy_zone_layout_conformant_dual_top(E_Client *ec, E_Illume_Config_Zone *cz)
{
int nh, ny;
/* according to the docs I have, conformant windows are always on the
* bottom in dual-top mode */
- if ((!bd) || (!cz)) return;
- if ((!bd->new_client) && (!bd->visible)) return;
+ if ((!ec) || (!cz)) return;
+ if ((!ec->new_client) && (!ec->visible)) return;
/* set some defaults */
- nh = ((bd->zone->h - cz->indicator.size - cz->softkey.size) / 2);
- ny = (bd->zone->y + cz->indicator.size) + nh;
+ nh = ((ec->zone->h - cz->indicator.size - cz->softkey.size) / 2);
+ ny = (ec->zone->y + cz->indicator.size) + nh;
nh += cz->softkey.size;
/* make sure it's the required width & height */
- if ((bd->w != bd->zone->w) || (bd->h != nh))
- _policy_border_resize(bd, bd->zone->w, nh);
+ if ((ec->w != ec->zone->w) || (ec->h != nh))
+ _policy_border_resize(ec, ec->zone->w, nh);
/* move to correct position (relative to zone) if needed */
- if ((bd->x != bd->zone->x) || (bd->y != ny))
- _policy_border_move(bd, bd->zone->x, ny);
+ if ((ec->x != ec->zone->x) || (ec->y != ny))
+ _policy_border_move(ec, ec->zone->x, ny);
/* set layer if needed */
- if (bd->layer != POL_CONFORMANT_LAYER)
- e_border_layer_set(bd, POL_CONFORMANT_LAYER);
+ if (ec->layer != POL_CONFORMANT_LAYER)
+ evas_object_layer_set(ec->frame, POL_CONFORMANT_LAYER);
}
static void
-_policy_zone_layout_conformant_dual_custom(E_Border *bd, E_Illume_Config_Zone *cz)
+_policy_zone_layout_conformant_dual_custom(E_Client *ec, E_Illume_Config_Zone *cz)
{
int iy, nh;
-// printf("\tLayout Conformant Dual Custom: %s\n", bd->client.icccm.class);
+// printf("\tLayout Conformant Dual Custom: %s\n", ec->icccm.class);
- if ((!bd) || (!cz)) return;
- if ((!bd->new_client) && (!bd->visible)) return;
+ if ((!ec) || (!cz)) return;
+ if ((!ec->new_client) && (!ec->visible)) return;
/* grab indicator position */
- e_illume_border_indicator_pos_get(bd->zone, NULL, &iy);
+ e_illume_client_indicator_pos_get(ec->zone, NULL, &iy);
/* set some defaults */
- nh = ((bd->zone->y + bd->zone->h) - iy);
+ nh = ((ec->zone->y + ec->zone->h) - iy);
/* make sure it's the required width & height */
- if ((bd->w != bd->zone->w) || (bd->h != nh))
- _policy_border_resize(bd, bd->zone->w, nh);
+ if ((ec->w != ec->zone->w) || (ec->h != nh))
+ _policy_border_resize(ec, ec->zone->w, nh);
/* move to correct position (relative to zone) if needed */
- if ((bd->x != bd->zone->x) || (bd->y != iy))
- _policy_border_move(bd, bd->zone->x, iy);
+ if ((ec->x != ec->zone->x) || (ec->y != iy))
+ _policy_border_move(ec, ec->zone->x, iy);
/* set layer if needed */
- if (bd->layer != POL_CONFORMANT_LAYER)
- e_border_layer_set(bd, POL_CONFORMANT_LAYER);
+ if (ec->layer != POL_CONFORMANT_LAYER)
+ evas_object_layer_set(ec->frame, POL_CONFORMANT_LAYER);
}
static void
-_policy_zone_layout_conformant_dual_left(E_Border *bd, E_Illume_Config_Zone *cz)
+_policy_zone_layout_conformant_dual_left(E_Client *ec, E_Illume_Config_Zone *cz)
{
int nw, nx;
/* according to the docs I have, conformant windows are always on the
* left in dual-left mode */
- if ((!bd) || (!cz)) return;
- if ((!bd->new_client) && (!bd->visible)) return;
+ if ((!ec) || (!cz)) return;
+ if ((!ec->new_client) && (!ec->visible)) return;
/* set some defaults */
- nw = (bd->zone->w / 2);
- nx = (bd->zone->x);
+ nw = (ec->zone->w / 2);
+ nx = (ec->zone->x);
/* make sure it's the required width & height */
- if ((bd->w != nw) || (bd->h != bd->zone->h))
- _policy_border_resize(bd, nw, bd->zone->h);
+ if ((ec->w != nw) || (ec->h != ec->zone->h))
+ _policy_border_resize(ec, nw, ec->zone->h);
/* move to correct position (relative to zone) if needed */
- if ((bd->x != nx) || (bd->y != bd->zone->y))
- _policy_border_move(bd, nx, bd->zone->y);
+ if ((ec->x != nx) || (ec->y != ec->zone->y))
+ _policy_border_move(ec, nx, ec->zone->y);
/* set layer if needed */
- if (bd->layer != POL_CONFORMANT_LAYER)
- e_border_layer_set(bd, POL_CONFORMANT_LAYER);
+ if (ec->layer != POL_CONFORMANT_LAYER)
+ evas_object_layer_set(ec->frame, POL_CONFORMANT_LAYER);
}
/* policy functions */
void
-_policy_border_add(E_Border *bd)
+_policy_border_add(E_Client *ec)
{
- if (!bd) return;
+ if (!ec) return;
-// printf("\nBorder added: %s\n", bd->client.icccm.class);
+// printf("\nBorder added: %s\n", ec->icccm.class);
/* NB: this call sets an atom on the window that specifices the zone.
* the logic here is that any new windows created can access the zone
@@ -1084,174 +1049,174 @@ _policy_border_add(E_Border *bd)
* that apply to their respective zone only. Example: softkey sends close
* messages (or back messages to cycle focus) that should pertain just
* to it's current zone */
- ecore_x_e_illume_zone_set(bd->client.win, bd->zone->black_win);
+ ecore_x_e_illume_zone_set(e_client_util_win_get(ec), ec->zone->black_win);
/* ignore stolen borders. These are typically quickpanel or keyboards */
- if (bd->stolen) return;
+ if (ec->stolen) return;
/* if this is a fullscreen window, than we need to hide indicator window */
- /* NB: we could use the e_illume_border_is_fullscreen function here
+ /* NB: we could use the e_illume_client_is_fullscreen function here
* but we save ourselves a function call this way */
- if ((bd->fullscreen) || (bd->need_fullscreen))
+ if ((ec->fullscreen) || (ec->need_fullscreen))
{
- E_Border *ind, *sft;
+ E_Client *ind, *sft;
/* try to get the Indicator on this zone */
- if ((ind = e_illume_border_indicator_get(bd->zone)))
+ if ((ind = e_illume_client_indicator_get(ec->zone)))
{
/* we have the indicator, hide it if needed */
- if (ind->visible) e_illume_border_hide(ind);
+ if (ind->visible) e_illume_client_hide(ind);
}
/* conformant - may not need softkey */
- if ((sft = e_illume_border_softkey_get(bd->zone)))
+ if ((sft = e_illume_client_softkey_get(ec->zone)))
{
- if (e_illume_border_is_conformant(bd))
+ if (e_illume_client_is_conformant(ec))
{
- if (sft->visible) e_illume_border_hide(sft);
+ if (sft->visible) e_illume_client_hide(sft);
}
else
{
- if (!sft->visible) e_illume_border_show(sft);
+ if (!sft->visible) e_illume_client_show(sft);
}
}
}
/* Add this border to our focus stack if it can accept or take focus */
- if ((bd->client.icccm.accepts_focus) || (bd->client.icccm.take_focus))
- _pol_focus_stack = eina_list_append(_pol_focus_stack, bd);
+ if ((ec->icccm.accepts_focus) || (ec->icccm.take_focus))
+ _pol_focus_stack = eina_list_append(_pol_focus_stack, ec);
- if ((e_illume_border_is_softkey(bd)) || (e_illume_border_is_indicator(bd)))
- _policy_zone_layout_update(bd->zone);
+ if ((e_illume_client_is_softkey(ec)) || (e_illume_client_is_indicator(ec)))
+ _policy_zone_layout_update(ec->zone);
else
{
/* set focus on new border if we can */
- _policy_border_set_focus(bd);
+ _policy_border_set_focus(ec);
}
}
void
-_policy_border_del(E_Border *bd)
+_policy_border_del(E_Client *ec)
{
-// printf("Policy Border deleted: %s\n", bd->client.icccm.class);
+// printf("Policy Border deleted: %s\n", ec->icccm.class);
- if (!bd) return;
+ if (!ec) return;
/* if this is a fullscreen window, than we need to show indicator window */
- /* NB: we could use the e_illume_border_is_fullscreen function here
+ /* NB: we could use the e_illume_client_is_fullscreen function here
* but we save ourselves a function call this way */
- if ((bd->fullscreen) || (bd->need_fullscreen))
+ if ((ec->fullscreen) || (ec->need_fullscreen))
{
- E_Border *ind;
+ E_Client *ind;
/* try to get the Indicator on this zone */
- if ((ind = e_illume_border_indicator_get(bd->zone)))
+ if ((ind = e_illume_client_indicator_get(ec->zone)))
{
/* we have the indicator, show it if needed */
- if (!ind->visible) e_illume_border_show(ind);
+ if (!ind->visible) e_illume_client_show(ind);
}
- _policy_zone_layout_update(bd->zone);
+ _policy_zone_layout_update(ec->zone);
}
/* remove from our focus stack */
- if ((bd->client.icccm.accepts_focus) || (bd->client.icccm.take_focus))
- _pol_focus_stack = eina_list_remove(_pol_focus_stack, bd);
+ if ((ec->icccm.accepts_focus) || (ec->icccm.take_focus))
+ _pol_focus_stack = eina_list_remove(_pol_focus_stack, ec);
- if (e_illume_border_is_softkey(bd))
+ if (e_illume_client_is_softkey(ec))
{
E_Illume_Config_Zone *cz;
/* get the config for this zone */
- cz = e_illume_zone_config_get(bd->zone->num);
+ cz = e_illume_zone_config_get(ec->zone->num);
cz->softkey.size = 0;
- _policy_zone_layout_update(bd->zone);
+ _policy_zone_layout_update(ec->zone);
}
- else if (e_illume_border_is_indicator(bd))
+ else if (e_illume_client_is_indicator(ec))
{
E_Illume_Config_Zone *cz;
/* get the config for this zone */
- cz = e_illume_zone_config_get(bd->zone->num);
+ cz = e_illume_zone_config_get(ec->zone->num);
cz->indicator.size = 0;
- _policy_zone_layout_update(bd->zone);
+ _policy_zone_layout_update(ec->zone);
}
else
{
/* show the border below this one */
- _policy_border_show_below(bd);
+ _policy_border_show_below(ec);
}
}
void
-_policy_border_focus_in(E_Border *bd)
+_policy_border_focus_in(E_Client *ec)
{
- E_Border *ind;
+ E_Client *ind;
-// printf("Border focus in: %s\n", bd->client.icccm.name);
- if ((bd->fullscreen) || (bd->need_fullscreen))
+// printf("Border focus in: %s\n", ec->icccm.name);
+ if ((ec->fullscreen) || (ec->need_fullscreen))
{
/* try to get the Indicator on this zone */
- if ((ind = e_illume_border_indicator_get(bd->zone)))
+ if ((ind = e_illume_client_indicator_get(ec->zone)))
{
/* we have the indicator, hide it if needed */
- if (ind->visible) e_illume_border_hide(ind);
+ if (ind->visible) e_illume_client_hide(ind);
}
}
else
{
/* try to get the Indicator on this zone */
- if ((ind = e_illume_border_indicator_get(bd->zone)))
+ if ((ind = e_illume_client_indicator_get(ec->zone)))
{
/* we have the indicator, show it if needed */
- if (!ind->visible) e_illume_border_show(ind);
+ if (!ind->visible) e_illume_client_show(ind);
}
}
- _policy_zone_layout_update(bd->zone);
+ _policy_zone_layout_update(ec->zone);
}
void
-_policy_border_focus_out(E_Border *bd)
+_policy_border_focus_out(E_Client *ec)
{
- if (!bd) return;
+ if (!ec) return;
-// printf("Border focus out: %s\n", bd->client.icccm.name);
+// printf("Border focus out: %s\n", ec->icccm.name);
/* NB: if we got this focus_out event on a deleted border, we check if
* it is a transient (child) of another window. If it is, then we
* transfer focus back to the parent window */
- if (e_object_is_del(E_OBJECT(bd)))
+ if (e_object_is_del(E_OBJECT(ec)))
{
- if (e_illume_border_is_dialog(bd))
+ if (e_illume_client_is_dialog(ec))
{
- E_Border *parent;
+ E_Client *parent;
- if ((parent = e_illume_border_parent_get(bd)))
+ if ((parent = e_illume_client_parent_get(ec)))
_policy_border_set_focus(parent);
}
}
}
void
-_policy_border_activate(E_Border *bd)
+_policy_border_activate(E_Client *ec)
{
- E_Border *sft;
+ E_Client *sft;
- if (!bd) return;
+ if (!ec) return;
- printf("Border Activate: %s\n", bd->client.icccm.name);
+ printf("Border Activate: %s\n", ec->icccm.name);
/* NB: stolen borders may or may not need focus call...have to test */
- if (bd->stolen) return;
+ if (ec->stolen) return;
/* conformant windows hide the softkey */
- if ((sft = e_illume_border_softkey_get(bd->zone)))
+ if ((sft = e_illume_client_softkey_get(ec->zone)))
{
- if (e_illume_border_is_conformant(bd))
+ if (e_illume_client_is_conformant(ec))
{
- if (sft->visible) e_illume_border_hide(sft);
+ if (sft->visible) e_illume_client_hide(sft);
}
else
{
- if (!sft->visible) e_illume_border_show(sft);
+ if (!sft->visible) e_illume_client_show(sft);
}
}
@@ -1260,18 +1225,18 @@ _policy_border_activate(E_Border *bd)
* parts and use here :) */
/* if the border is iconified then uniconify if allowed */
- if ((bd->iconic) && (!bd->lock_user_iconify))
- e_border_uniconify(bd);
+ if ((ec->iconic) && (!ec->lock_user_iconify))
+ e_client_uniconify(ec);
/* set very high layer for this window as it needs attention and thus
* should show above everything */
- e_border_layer_set(bd, POL_ACTIVATE_LAYER);
+ evas_object_layer_set(ec->frame, POL_ACTIVATE_LAYER);
/* if we can raise the border do it */
- if (!bd->lock_user_stacking) e_border_raise(bd);
+ if (!ec->lock_user_stacking) evas_object_raise(ec->frame);
/* focus the border */
- e_border_focus_set(bd, 1, 1);
+ evas_object_focus_set(ec->frame, 1);
/* NB: since we skip needless border evals when container layout
* is called (to save cpu cycles), we need to
@@ -1281,86 +1246,86 @@ _policy_border_activate(E_Border *bd)
* This is potentially useless as THIS policy
* makes all windows borderless anyway, but it's in here for
* completeness
- e_border_focus_latest_set(bd);
- if (bd->bg_object)
- edje_object_signal_emit(bd->bg_object, "e,state,focused", "e");
- if (bd->icon_object)
- edje_object_signal_emit(bd->icon_object, "e,state,focused", "e");
- e_focus_event_focus_in(bd);
+ e_client_focus_latest_set(ec);
+ if (ec->bg_object)
+ edje_object_signal_emit(ec->bg_object, "e,state,focused", "e");
+ if (ec->icon_object)
+ edje_object_signal_emit(ec->icon_object, "e,state,focused", "e");
+ e_focus_event_focus_in(ec);
*/
}
void
-_policy_border_post_fetch(E_Border *bd)
+_policy_border_post_fetch(E_Client *ec)
{
// printf("Border post fetch\n");
- if (!bd) return;
+ if (!ec) return;
/* NB: for this policy we disable all remembers set on a border */
- if (bd->remember) e_remember_del(bd->remember);
- bd->remember = NULL;
+ if (ec->remember) e_remember_del(ec->remember);
+ ec->remember = NULL;
/* set this border to borderless */
#ifdef DIALOG_USES_PIXEL_BORDER
- if ((e_illume_border_is_dialog(bd)) && (e_illume_border_parent_get(bd)))
- eina_stringshare_replace(&bd->bordername, "pixel");
+ if ((e_illume_client_is_dialog(ec)) && (e_illume_client_parent_get(ec)))
+ eina_stringshare_replace(&ec->bordername, "pixel");
else
- bd->borderless = 1;
+ ec->borderless = 1;
#else
- bd->borderless = 1;
+ ec->borderless = 1;
#endif
/* tell E the border has changed */
- bd->client.border.changed = 1;
+ ec->border.changed = 1;
}
void
-_policy_border_post_assign(E_Border *bd)
+_policy_border_post_assign(E_Client *ec)
{
// printf("Border post assign\n");
- if (!bd) return;
+ if (!ec) return;
- bd->internal_no_remember = 1;
+ ec->internal_no_remember = 1;
/* do not allow client to change these properties */
- bd->lock_client_size = 1;
- bd->lock_client_shade = 1;
- bd->lock_client_maximize = 1;
- bd->lock_client_location = 1;
- bd->lock_client_stacking = 1;
+ ec->lock_client_size = 1;
+ ec->lock_client_shade = 1;
+ ec->lock_client_maximize = 1;
+ ec->lock_client_location = 1;
+ ec->lock_client_stacking = 1;
/* do not allow the user to change these properties */
- bd->lock_user_location = 1;
- bd->lock_user_size = 1;
- bd->lock_user_shade = 1;
+ ec->lock_user_location = 1;
+ ec->lock_user_size = 1;
+ ec->lock_user_shade = 1;
/* clear any centered states */
/* NB: this is mainly needed for E's main config dialog */
- bd->client.e.state.centered = 0;
+ ec->e.state.centered = 0;
/* lock the border type so user/client cannot change */
- bd->lock_border = 1;
+ ec->lock_border = 1;
}
void
-_policy_border_show(E_Border *bd)
+_policy_border_show(E_Client *ec)
{
- if (!bd) return;
+ if (!ec) return;
/* make sure we have a name so that we don't handle windows like E's root */
- if (!bd->client.icccm.name) return;
+ if (!ec->icccm.name) return;
-// printf("Border Show: %s\n", bd->client.icccm.class);
+// printf("Border Show: %s\n", ec->icccm.class);
/* trap for special windows so we can ignore hides below them */
- if (e_illume_border_is_indicator(bd)) return;
- if (e_illume_border_is_softkey(bd)) return;
- if (e_illume_border_is_quickpanel(bd)) return;
- if (e_illume_border_is_keyboard(bd)) return;
+ if (e_illume_client_is_indicator(ec)) return;
+ if (e_illume_client_is_softkey(ec)) return;
+ if (e_illume_client_is_quickpanel(ec)) return;
+ if (e_illume_client_is_keyboard(ec)) return;
- _policy_border_hide_below(bd);
+ _policy_border_hide_below(ec);
}
void
@@ -1368,7 +1333,7 @@ _policy_zone_layout(E_Zone *zone)
{
E_Illume_Config_Zone *cz;
Eina_List *l;
- E_Border *bd;
+ E_Client *ec;
if (!zone) return;
@@ -1378,40 +1343,41 @@ _policy_zone_layout(E_Zone *zone)
cz = e_illume_zone_config_get(zone->num);
/* loop through border list and update layout */
- EINA_LIST_FOREACH(e_border_client_list(), l, bd)
+ EINA_LIST_FOREACH(zone->comp->clients, l, ec)
{
+ if (e_client_util_ignored_get(ec)) continue;
/* skip borders that are being deleted */
- if (e_object_is_del(E_OBJECT(bd))) continue;
+ if (e_object_is_del(E_OBJECT(ec))) continue;
/* skip borders not on this zone */
- if (bd->zone != zone) continue;
+ if (ec->zone != zone) continue;
/* only update layout for this border if it really needs it */
- if ((!bd->new_client) && (!bd->changes.pos) && (!bd->changes.size) &&
- (!bd->changes.visible) && (!bd->pending_move_resize) &&
- (!bd->need_shape_export) && (!bd->need_shape_merge)) continue;
+ if ((!ec->new_client) && (!ec->changes.pos) && (!ec->changes.size) &&
+ (!ec->changes.visible) &&
+ (!ec->need_shape_export) && (!ec->need_shape_merge)) continue;
/* are we laying out an indicator ? */
- if (e_illume_border_is_indicator(bd))
- _policy_zone_layout_indicator(bd, cz);
+ if (e_illume_client_is_indicator(ec))
+ _policy_zone_layout_indicator(ec, cz);
/* are we layout out a quickpanel ? */
- else if (e_illume_border_is_quickpanel(bd))
- _policy_zone_layout_quickpanel(bd);
+ else if (e_illume_client_is_quickpanel(ec))
+ _policy_zone_layout_quickpanel(ec);
/* are we laying out a softkey ? */
- else if (e_illume_border_is_softkey(bd))
- _policy_zone_layout_softkey(bd, cz);
+ else if (e_illume_client_is_softkey(ec))
+ _policy_zone_layout_softkey(ec, cz);
/* are we laying out a keyboard ? */
- else if (e_illume_border_is_keyboard(bd))
- _policy_zone_layout_keyboard(bd, cz);
+ else if (e_illume_client_is_keyboard(ec))
+ _policy_zone_layout_keyboard(ec, cz);
/* are we layout out a home window ? */
- else if (e_illume_border_is_home(bd))
+ else if (e_illume_client_is_home(ec))
{
if (!cz->mode.dual)
- _policy_zone_layout_home_single(bd, cz);
+ _policy_zone_layout_home_single(ec, cz);
else
{
/* we are in dual-mode, check orientation */
@@ -1419,38 +1385,38 @@ _policy_zone_layout(E_Zone *zone)
{
int ty;
- e_illume_border_indicator_pos_get(bd->zone, NULL, &ty);
- if (ty <= bd->zone->y)
- _policy_zone_layout_home_dual_top(bd, cz);
+ e_illume_client_indicator_pos_get(ec->zone, NULL, &ty);
+ if (ty <= ec->zone->y)
+ _policy_zone_layout_home_dual_top(ec, cz);
else
- _policy_zone_layout_home_dual_custom(bd, cz);
+ _policy_zone_layout_home_dual_custom(ec, cz);
}
else
- _policy_zone_layout_home_dual_left(bd, cz);
+ _policy_zone_layout_home_dual_left(ec, cz);
}
}
/* are we laying out a fullscreen window ? */
- /* NB: we could use the e_illume_border_is_fullscreen function here
+ /* NB: we could use the e_illume_client_is_fullscreen function here
* but we save ourselves a function call this way. */
- else if ((bd->fullscreen) || (bd->need_fullscreen))
- _policy_zone_layout_fullscreen(bd);
+ else if ((ec->fullscreen) || (ec->need_fullscreen))
+ _policy_zone_layout_fullscreen(ec);
/* are we laying out a splash screen ? */
/* NB: we check splash before dialog so if a splash screen does not
* register as a splash, than the dialog trap should catch it */
- else if (e_illume_border_is_splash(bd))
- _policy_zone_layout_splash(bd, cz);
+ else if (e_illume_client_is_splash(ec))
+ _policy_zone_layout_splash(ec, cz);
/* are we laying out a dialog ? */
- else if (e_illume_border_is_dialog(bd))
- _policy_zone_layout_dialog(bd, cz);
+ else if (e_illume_client_is_dialog(ec))
+ _policy_zone_layout_dialog(ec, cz);
/* are we layout out a conformant window ? */
- else if (e_illume_border_is_conformant(bd))
+ else if (e_illume_client_is_conformant(ec))
{
if (!cz->mode.dual)
- _policy_zone_layout_conformant_single(bd, cz);
+ _policy_zone_layout_conformant_single(ec, cz);
else
{
/* we are in dual-mode, check orientation */
@@ -1458,14 +1424,14 @@ _policy_zone_layout(E_Zone *zone)
{
int ty;
- e_illume_border_indicator_pos_get(bd->zone, NULL, &ty);
- if (ty <= bd->zone->y)
- _policy_zone_layout_conformant_dual_top(bd, cz);
+ e_illume_client_indicator_pos_get(ec->zone, NULL, &ty);
+ if (ty <= ec->zone->y)
+ _policy_zone_layout_conformant_dual_top(ec, cz);
else
- _policy_zone_layout_conformant_dual_custom(bd, cz);
+ _policy_zone_layout_conformant_dual_custom(ec, cz);
}
else
- _policy_zone_layout_conformant_dual_left(bd, cz);
+ _policy_zone_layout_conformant_dual_left(ec, cz);
}
}
@@ -1474,7 +1440,7 @@ _policy_zone_layout(E_Zone *zone)
{
/* are we in single mode ? */
if (!cz->mode.dual)
- _policy_zone_layout_app_single(bd, cz);
+ _policy_zone_layout_app_single(ec, cz);
else
{
/* we are in dual-mode, check orientation */
@@ -1484,14 +1450,14 @@ _policy_zone_layout(E_Zone *zone)
/* grab the indicator position so we can tell if it
* is in a custom position or not (user dragged it) */
- e_illume_border_indicator_pos_get(bd->zone, NULL, &ty);
- if (ty <= bd->zone->y)
- _policy_zone_layout_app_dual_top(bd, cz);
+ e_illume_client_indicator_pos_get(ec->zone, NULL, &ty);
+ if (ty <= ec->zone->y)
+ _policy_zone_layout_app_dual_top(ec, cz);
else
- _policy_zone_layout_app_dual_custom(bd, cz);
+ _policy_zone_layout_app_dual_custom(ec, cz);
}
else
- _policy_zone_layout_app_dual_left(bd, cz);
+ _policy_zone_layout_app_dual_left(ec, cz);
}
}
}
@@ -1501,20 +1467,21 @@ void
_policy_zone_move_resize(E_Zone *zone)
{
Eina_List *l;
- E_Border *bd;
+ E_Client *ec;
// printf("Zone move resize\n");
if (!zone) return;
- EINA_LIST_FOREACH(e_border_client_list(), l, bd)
+ EINA_LIST_FOREACH(zone->comp->clients, l, ec)
{
+ if (e_client_util_ignored_get(ec)) continue;
/* skip borders not on this zone */
- if (bd->zone != zone) continue;
+ if (ec->zone != zone) continue;
/* signal a changed pos here so layout gets updated */
- bd->changes.pos = 1;
- BD_CHANGED(bd);
+ ec->changes.pos = 1;
+ EC_CHANGED(ec);
}
}
@@ -1523,7 +1490,7 @@ _policy_zone_mode_change(E_Zone *zone, Ecore_X_Atom mode)
{
E_Illume_Config_Zone *cz;
Eina_List *homes = NULL;
- E_Border *bd;
+ E_Client *ec;
int count;
// printf("Zone mode change: %d\n", zone->num);
@@ -1547,25 +1514,25 @@ _policy_zone_mode_change(E_Zone *zone, Ecore_X_Atom mode)
e_config_save_queue();
/* lock indicator window from dragging if we need to */
- bd = e_illume_border_indicator_get(zone);
- if (bd)
+ ec = e_illume_client_indicator_get(zone);
+ if (ec)
{
/* only dual-top mode can drag */
if ((cz->mode.dual == 1) && (cz->mode.side == 0))
{
/* only set locked if we need to */
- if (bd->client.illume.drag.locked != 0)
- ecore_x_e_illume_drag_locked_set(bd->client.win, 0);
+ if (ec->illume.drag.locked != 0)
+ ecore_x_e_illume_drag_locked_set(e_client_util_win_get(ec), 0);
}
else
{
/* only set locked if we need to */
- if (bd->client.illume.drag.locked != 1)
- ecore_x_e_illume_drag_locked_set(bd->client.win, 1);
+ if (ec->illume.drag.locked != 1)
+ ecore_x_e_illume_drag_locked_set(e_client_util_win_get(ec), 1);
}
}
- if (!(homes = e_illume_border_home_borders_get(zone))) return;
+ if (!(homes = e_illume_client_home_borders_get(zone))) return;
count = eina_list_count(homes);
@@ -1580,11 +1547,11 @@ _policy_zone_mode_change(E_Zone *zone, Ecore_X_Atom mode)
/* if we went to single mode, delete any extra home windows */
if (count >= 2)
{
- E_Border *home;
+ E_Client *home;
/* try to get a home window on this zone and remove it */
- if ((home = e_illume_border_home_get(zone)))
- ecore_x_e_illume_home_del_send(home->client.win);
+ if ((home = e_illume_client_home_get(zone)))
+ ecore_x_e_illume_home_del_send(e_client_util_win_get(home));
}
}
@@ -1595,79 +1562,79 @@ _policy_zone_mode_change(E_Zone *zone, Ecore_X_Atom mode)
void
_policy_zone_close(E_Zone *zone)
{
- E_Border *bd;
+ E_Client *ec;
if (!zone) return;
/* make sure we have a focused border */
- if (!(bd = e_border_focused_get())) return;
+ if (!(ec = e_client_focused_get())) return;
/* make sure focused border is on this zone */
- if (bd->zone != zone) return;
+ if (ec->zone != zone) return;
/* close this border */
- e_border_act_close_begin(bd);
+ e_client_act_close_begin(ec);
}
void
-_policy_drag_start(E_Border *bd)
+_policy_drag_start(E_Client *ec)
{
// printf("Drag start\n");
- if (!bd) return;
+ if (!ec) return;
/* ignore stolen borders */
- if (bd->stolen) return;
+ if (ec->stolen) return;
/* set property on this border to say we are dragging */
- ecore_x_e_illume_drag_set(bd->client.win, 1);
+ ecore_x_e_illume_drag_set(e_client_util_win_get(ec), 1);
/* set property on zone window that a drag is happening */
- ecore_x_e_illume_drag_set(bd->zone->black_win, 1);
+ ecore_x_e_illume_drag_set(ec->zone->black_win, 1);
}
void
-_policy_drag_end(E_Border *bd)
+_policy_drag_end(E_Client *ec)
{
// printf("Drag end\n");
- if (!bd) return;
+ if (!ec) return;
/* ignore stolen borders */
- if (bd->stolen) return;
+ if (ec->stolen) return;
/* set property on this border to say we are done dragging */
- ecore_x_e_illume_drag_set(bd->client.win, 0);
+ ecore_x_e_illume_drag_set(e_client_util_win_get(ec), 0);
/* set property on zone window that a drag is finished */
- ecore_x_e_illume_drag_set(bd->zone->black_win, 0);
+ ecore_x_e_illume_drag_set(ec->zone->black_win, 0);
}
void
_policy_focus_back(E_Zone *zone)
{
Eina_List *l, *fl = NULL;
- E_Border *bd, *fbd;
+ E_Client *ec, *fbd;
if (!zone) return;
if (eina_list_count(_pol_focus_stack) < 1) return;
// printf("Focus back\n");
- EINA_LIST_REVERSE_FOREACH(_pol_focus_stack, l, bd)
+ EINA_LIST_REVERSE_FOREACH(_pol_focus_stack, l, ec)
{
- if (bd->zone != zone) continue;
- fl = eina_list_append(fl, bd);
+ if (ec->zone != zone) continue;
+ fl = eina_list_append(fl, ec);
}
- if (!(fbd = e_border_focused_get())) return;
+ if (!(fbd = e_client_focused_get())) return;
if (fbd->parent) return;
- EINA_LIST_REVERSE_FOREACH(fl, l, bd)
+ EINA_LIST_REVERSE_FOREACH(fl, l, ec)
{
- if ((fbd) && (bd == fbd))
+ if ((fbd) && (ec == fbd))
{
- E_Border *b;
+ E_Client *b;
if ((l->next) && (b = l->next->data))
{
@@ -1692,27 +1659,27 @@ void
_policy_focus_forward(E_Zone *zone)
{
Eina_List *l, *fl = NULL;
- E_Border *bd, *fbd;
+ E_Client *ec, *fbd;
if (!zone) return;
if (eina_list_count(_pol_focus_stack) < 1) return;
// printf("Focus forward\n");
- EINA_LIST_FOREACH(_pol_focus_stack, l, bd)
+ EINA_LIST_FOREACH(_pol_focus_stack, l, ec)
{
- if (bd->zone != zone) continue;
- fl = eina_list_append(fl, bd);
+ if (ec->zone != zone) continue;
+ fl = eina_list_append(fl, ec);
}
- if (!(fbd = e_border_focused_get())) return;
+ if (!(fbd = e_client_focused_get())) return;
if (fbd->parent) return;
- EINA_LIST_FOREACH(fl, l, bd)
+ EINA_LIST_FOREACH(fl, l, ec)
{
- if ((fbd) && (bd == fbd))
+ if ((fbd) && (ec == fbd))
{
- E_Border *b;
+ E_Client *b;
if ((l->next) && (b = l->next->data))
{
@@ -1736,24 +1703,24 @@ _policy_focus_forward(E_Zone *zone)
void
_policy_focus_home(E_Zone *zone)
{
- E_Border *bd;
+ E_Client *ec;
if (!zone) return;
- if (!(bd = e_illume_border_home_get(zone))) return;
+ if (!(ec = e_illume_client_home_get(zone))) return;
/* if the border was hidden due to layout, we need to unhide */
- if (!bd->visible) e_illume_border_show(bd);
+ if (!ec->visible) e_illume_client_show(ec);
- if ((bd->iconic) && (!bd->lock_user_iconify))
- e_border_uniconify(bd);
+ if ((ec->iconic) && (!ec->lock_user_iconify))
+ e_client_uniconify(ec);
- if (!bd->lock_user_stacking) e_border_raise(bd);
+ if (!ec->lock_user_stacking) evas_object_raise(ec->frame);
/* hide the border(s) above this one */
- _policy_border_hide_above(bd);
+ _policy_border_hide_above(ec);
/* focus the border */
- e_border_focus_set(bd, 1, 1);
+ evas_object_focus_set(ec->frame, 1);
}
void
@@ -1764,43 +1731,43 @@ _policy_property_change(Ecore_X_Event_Window_Property *event)
/* we are interested in state changes here */
if (event->atom == ECORE_X_ATOM_NET_WM_STATE)
{
- E_Border *bd, *ind;
+ E_Client *ec, *ind;
- if (!(bd = e_border_find_by_client_window(event->win))) return;
+ if (!(ec = e_pixmap_find_client(E_PIXMAP_TYPE_X, event->win))) return;
/* not interested in stolen or invisible borders */
- if ((bd->stolen) || (!bd->visible)) return;
+ if ((ec->stolen) || (!ec->visible)) return;
/* make sure the border has a name or class */
/* NB: this check is here because some E borders get State Changes
* but do not have a name/class associated with them. Not entirely sure
* which ones they are, but I would guess Managers, Containers, or Zones.
* At any rate, we're not interested in those types of borders */
- if ((!bd->client.icccm.name) || (!bd->client.icccm.class)) return;
+ if ((!ec->icccm.name) || (!ec->icccm.class)) return;
/* NB: If we have reached this point, then it should be a fullscreen
* border that has toggled fullscreen on/off */
/* try to get the Indicator on this zone */
- if (!(ind = e_illume_border_indicator_get(bd->zone))) return;
+ if (!(ind = e_illume_client_indicator_get(ec->zone))) return;
/* if we are fullscreen, hide the indicator...else we show it */
- /* NB: we could use the e_illume_border_is_fullscreen function here
+ /* NB: we could use the e_illume_client_is_fullscreen function here
* but we save ourselves a function call this way */
- if ((bd->fullscreen) || (bd->need_fullscreen))
+ if ((ec->fullscreen) || (ec->need_fullscreen))
{
if (ind->visible)
{
- e_illume_border_hide(ind);
- _policy_zone_layout_update(bd->zone);
+ e_illume_client_hide(ind);
+ _policy_zone_layout_update(ec->zone);
}
}
else
{
if (!ind->visible)
{
- e_illume_border_show(ind);
- _policy_zone_layout_update(bd->zone);
+ e_illume_client_show(ind);
+ _policy_zone_layout_update(ec->zone);
}
}
}
@@ -1808,57 +1775,59 @@ _policy_property_change(Ecore_X_Event_Window_Property *event)
{
Eina_List *l;
E_Zone *zone;
- E_Border *bd;
+ E_Client *ec;
int x, y, w, h;
/* make sure this property changed on a zone */
if (!(zone = e_util_zone_window_find(event->win))) return;
/* get the geometry */
- if (!(bd = e_illume_border_indicator_get(zone))) return;
- x = bd->x;
- y = bd->y;
- w = bd->w;
- h = bd->h;
+ if (!(ec = e_illume_client_indicator_get(zone))) return;
+ x = ec->x;
+ y = ec->y;
+ w = ec->w;
+ h = ec->h;
/* look for conformant borders */
- EINA_LIST_FOREACH(e_border_client_list(), l, bd)
+ EINA_LIST_FOREACH(zone->comp->clients, l, ec)
{
- if (bd->zone != zone) continue;
- if (!e_illume_border_is_conformant(bd)) continue;
+ if (e_client_util_ignored_get(ec)) continue;
+ if (ec->zone != zone) continue;
+ if (!e_illume_client_is_conformant(ec)) continue;
/* set indicator geometry on conformant window */
/* NB: This is needed so that conformant apps get told about
* the indicator size/position...else they have no way of
* knowing that the geometry has been updated */
- ecore_x_e_illume_indicator_geometry_set(bd->client.win, x, y, w, h);
+ ecore_x_e_illume_indicator_geometry_set(e_client_util_win_get(ec), x, y, w, h);
}
}
else if (event->atom == ECORE_X_ATOM_E_ILLUME_SOFTKEY_GEOMETRY)
{
Eina_List *l;
E_Zone *zone;
- E_Border *bd;
+ E_Client *ec;
int x, y, w, h;
/* make sure this property changed on a zone */
if (!(zone = e_util_zone_window_find(event->win))) return;
- if (!(bd = e_illume_border_softkey_get(zone))) return;
- x = bd->x;
- y = bd->y;
- w = bd->w;
- h = bd->h;
+ if (!(ec = e_illume_client_softkey_get(zone))) return;
+ x = ec->x;
+ y = ec->y;
+ w = ec->w;
+ h = ec->h;
/* look for conformant borders */
- EINA_LIST_FOREACH(e_border_client_list(), l, bd)
+ EINA_LIST_FOREACH(zone->comp->clients, l, ec)
{
- if (bd->zone != zone) continue;
- if (!e_illume_border_is_conformant(bd)) continue;
+ if (e_client_util_ignored_get(ec)) continue;
+ if (ec->zone != zone) continue;
+ if (!e_illume_client_is_conformant(ec)) continue;
/* set softkey geometry on conformant window */
/* NB: This is needed so that conformant apps get told about
* the softkey size/position...else they have no way of
* knowing that the geometry has been updated */
- ecore_x_e_illume_softkey_geometry_set(bd->client.win, x, y, w, h);
+ ecore_x_e_illume_softkey_geometry_set(e_client_util_win_get(ec), x, y, w, h);
}
}
else if (event->atom == ECORE_X_ATOM_E_ILLUME_KEYBOARD_GEOMETRY)
@@ -1866,7 +1835,7 @@ _policy_property_change(Ecore_X_Event_Window_Property *event)
Eina_List *l;
E_Zone *zone;
E_Illume_Keyboard *kbd;
- E_Border *bd;
+ E_Client *ec;
int x, y, w, h;
/* make sure this property changed on a zone */
@@ -1874,50 +1843,48 @@ _policy_property_change(Ecore_X_Event_Window_Property *event)
/* get the keyboard */
if (!(kbd = e_illume_keyboard_get())) return;
- if (!kbd->border) return;
+ if (!kbd->client) return;
/* get the geometry */
- x = kbd->border->x;
- w = kbd->border->w;
- h = kbd->border->h;
+ x = kbd->client->x;
+ w = kbd->client->w;
+ h = kbd->client->h;
/* adjust for keyboard visibility because keyboard uses fx_offset */
y = 0;
- if (kbd->border->cw &&
- (!e_util_strcmp(edje_object_part_state_get(kbd->border->cw->effect_obj, "mover", NULL), "custom")))
- y = kbd->border->y;
+#warning this is totally broken on so many levels
+ //if (kbd->client->frame &&
+ //(!e_util_strcmp(edje_object_part_state_get(kbd->client->cw->effect_obj, "mover", NULL), "custom")))
+ //y = kbd->client->y;
/* look for conformant borders */
- EINA_LIST_FOREACH(e_border_client_list(), l, bd)
+ EINA_LIST_FOREACH(zone->comp->clients, l, ec)
{
- if (bd->zone != zone) continue;
- if (!e_illume_border_is_conformant(bd)) continue;
+ if (e_client_util_ignored_get(ec)) continue;
+ if (ec->zone != zone) continue;
+ if (!e_illume_client_is_conformant(ec)) continue;
/* set keyboard geometry on conformant window */
/* NB: This is needed so that conformant apps get told about
* the keyboard size/position...else they have no way of
* knowing that the geometry has been updated */
- ecore_x_e_illume_keyboard_geometry_set(bd->client.win, x, y, w, h);
+ ecore_x_e_illume_keyboard_geometry_set(e_client_util_win_get(ec), x, y, w, h);
}
}
else if (event->atom == ATM_ENLIGHTENMENT_SCALE)
{
- Eina_List *ml;
- E_Manager *man;
+ const Eina_List *l;
+ E_Comp *comp;
- EINA_LIST_FOREACH(e_manager_list(), ml, man)
+
+ EINA_LIST_FOREACH(e_comp_list(), l, comp)
{
- Eina_List *cl;
- E_Container *con;
+ Eina_List *zl;
+ E_Zone *zone;
- if (event->win != man->root) continue;
- EINA_LIST_FOREACH(man->containers, cl, con)
- {
- Eina_List *zl;
- E_Zone *zone;
+ if (event->win != comp->man->root) continue;
- EINA_LIST_FOREACH(con->zones, zl, zone)
- _policy_zone_layout_update(zone);
- }
+ EINA_LIST_FOREACH(comp->zones, zl, zone)
+ _policy_zone_layout_update(zone);
}
}
}
diff --git a/src/modules/illume2/policies/illume/policy.h b/src/modules/illume2/policies/illume/policy.h
index 30dbbe45de..717017c3fb 100644
--- a/src/modules/illume2/policies/illume/policy.h
+++ b/src/modules/illume2/policies/illume/policy.h
@@ -14,20 +14,20 @@
# define POL_APP_LAYER 100
# define POL_HOME_LAYER 90
-void _policy_border_add(E_Border *bd);
-void _policy_border_del(E_Border *bd);
-void _policy_border_focus_in(E_Border *bd);
-void _policy_border_focus_out(E_Border *bd);
-void _policy_border_activate(E_Border *bd);
-void _policy_border_post_fetch(E_Border *bd);
-void _policy_border_post_assign(E_Border *bd);
-void _policy_border_show(E_Border *bd);
+void _policy_border_add(E_Client *ec);
+void _policy_border_del(E_Client *ec);
+void _policy_border_focus_in(E_Client *ec);
+void _policy_border_focus_out(E_Client *ec);
+void _policy_border_activate(E_Client *ec);
+void _policy_border_post_fetch(E_Client *ec);
+void _policy_border_post_assign(E_Client *ec);
+void _policy_border_show(E_Client *ec);
void _policy_zone_layout(E_Zone *zone);
void _policy_zone_move_resize(E_Zone *zone);
void _policy_zone_mode_change(E_Zone *zone, Ecore_X_Atom mode);
void _policy_zone_close(E_Zone *zone);
-void _policy_drag_start(E_Border *bd);
-void _policy_drag_end(E_Border *bd);
+void _policy_drag_start(E_Client *ec);
+void _policy_drag_end(E_Client *ec);
void _policy_focus_back(E_Zone *zone);
void _policy_focus_forward(E_Zone *zone);
void _policy_focus_home(E_Zone *zone);
diff --git a/src/modules/illume2/policies/tablet/policy.c b/src/modules/illume2/policies/tablet/policy.c
index 935c540d43..5f9810b9b8 100644
--- a/src/modules/illume2/policies/tablet/policy.c
+++ b/src/modules/illume2/policies/tablet/policy.c
@@ -3,64 +3,64 @@
#include "e.h"
/* local function prototypes */
-static void _policy_border_set_focus(E_Border *bd);
-static void _policy_border_move(E_Border *bd, int x, int y);
-static void _policy_border_resize(E_Border *bd, int w, int h);
-static void _policy_border_hide_below(E_Border *bd);
+static void _policy_border_set_focus(E_Client *ec);
+static void _policy_border_move(E_Client *ec, int x, int y);
+static void _policy_border_resize(E_Client *ec, int w, int h);
+static void _policy_border_hide_below(E_Client *ec);
static void _policy_zone_layout_update(E_Zone *zone);
-static void _policy_zone_layout_indicator(E_Border *bd, E_Illume_Config_Zone *cz);
-static void _policy_zone_layout_quickpanel(E_Border *bd);
-static void _policy_zone_layout_softkey(E_Border *bd, E_Illume_Config_Zone *cz);
-static void _policy_zone_layout_keyboard(E_Border *bd, E_Illume_Config_Zone *cz);
-static void _policy_zone_layout_home_single(E_Border *bd, E_Illume_Config_Zone *cz);
-static void _policy_zone_layout_fullscreen(E_Border *bd);
-static void _policy_zone_layout_app_single(E_Border *bd, E_Illume_Config_Zone *cz);
-static void _policy_zone_layout_app_dual_top(E_Border *bd, E_Illume_Config_Zone *cz);
-static void _policy_zone_layout_app_dual_custom(E_Border *bd, E_Illume_Config_Zone *cz);
-static void _policy_zone_layout_app_dual_left(E_Border *bd, E_Illume_Config_Zone *cz, Eina_Bool force);
-static void _policy_zone_layout_dialog(E_Border *bd, E_Illume_Config_Zone *cz);
-static void _policy_zone_layout_splash(E_Border *bd, E_Illume_Config_Zone *cz);
-static void _policy_zone_layout_conformant_single(E_Border *bd, E_Illume_Config_Zone *cz);
+static void _policy_zone_layout_indicator(E_Client *ec, E_Illume_Config_Zone *cz);
+static void _policy_zone_layout_quickpanel(E_Client *ec);
+static void _policy_zone_layout_softkey(E_Client *ec, E_Illume_Config_Zone *cz);
+static void _policy_zone_layout_keyboard(E_Client *ec, E_Illume_Config_Zone *cz);
+static void _policy_zone_layout_home_single(E_Client *ec, E_Illume_Config_Zone *cz);
+static void _policy_zone_layout_fullscreen(E_Client *ec);
+static void _policy_zone_layout_app_single(E_Client *ec, E_Illume_Config_Zone *cz);
+static void _policy_zone_layout_app_dual_top(E_Client *ec, E_Illume_Config_Zone *cz);
+static void _policy_zone_layout_app_dual_custom(E_Client *ec, E_Illume_Config_Zone *cz);
+static void _policy_zone_layout_app_dual_left(E_Client *ec, E_Illume_Config_Zone *cz, Eina_Bool force);
+static void _policy_zone_layout_dialog(E_Client *ec, E_Illume_Config_Zone *cz);
+static void _policy_zone_layout_splash(E_Client *ec, E_Illume_Config_Zone *cz);
+static void _policy_zone_layout_conformant_single(E_Client *ec, E_Illume_Config_Zone *cz);
#if 0
-static void _policy_zone_layout_conformant_dual_top(E_Border *bd, E_Illume_Config_Zone *cz);
-static void _policy_zone_layout_conformant_dual_custom(E_Border *bd, E_Illume_Config_Zone *cz);
-static void _policy_zone_layout_conformant_dual_left(E_Border *bd, E_Illume_Config_Zone *cz);
+static void _policy_zone_layout_conformant_dual_top(E_Client *ec, E_Illume_Config_Zone *cz);
+static void _policy_zone_layout_conformant_dual_custom(E_Client *ec, E_Illume_Config_Zone *cz);
+static void _policy_zone_layout_conformant_dual_left(E_Client *ec, E_Illume_Config_Zone *cz);
#endif
static Eina_List *_pol_focus_stack;
/* local functions */
static void
-_policy_border_set_focus(E_Border *bd)
+_policy_border_set_focus(E_Client *ec)
{
- if (!bd) return;
- /* printf("_policy_border_set_focus %s\n", e_border_name_get(bd)); */
+ if (!ec) return;
+ /* printf("_policy_border_set_focus %s\n", e_client_name_get(ec)); */
/* if focus is locked out then get out */
- if (bd->lock_focus_out) return;
+ if (ec->lock_focus_out) return;
- if ((bd->client.icccm.accepts_focus) || (bd->client.icccm.take_focus))
+ if ((ec->icccm.accepts_focus) || (ec->icccm.take_focus))
{
/* check E's focus settings */
if ((e_config->focus_setting == E_FOCUS_NEW_WINDOW) ||
- ((bd->parent) &&
+ ((ec->parent) &&
((e_config->focus_setting == E_FOCUS_NEW_DIALOG) ||
- ((bd->parent->focused) &&
+ ((ec->parent->focused) &&
(e_config->focus_setting == E_FOCUS_NEW_DIALOG_IF_OWNER_FOCUSED)))))
{
/* if the border was hidden due to layout, we need to unhide */
- if (!bd->visible) e_illume_border_show(bd);
+ if (!ec->visible) e_illume_client_show(ec);
- if ((bd->iconic) && (!bd->lock_user_iconify))
- e_border_uniconify(bd);
+ if ((ec->iconic) && (!ec->lock_user_iconify))
+ e_client_uniconify(ec);
- if (!bd->lock_user_stacking) e_border_raise(bd);
+ if (!ec->lock_user_stacking) evas_object_raise(ec->frame);
/* focus the border */
- e_border_focus_set(bd, 1, 1);
- /* e_border_raise(bd); */
+ evas_object_focus_set(ec->frame, 1);
+ /* evas_object_raise(ec->frame); */
/* hide the border below this one */
- _policy_border_hide_below(bd);
+ _policy_border_hide_below(ec);
/* NB: since we skip needless border evals when container layout
* is called (to save cpu cycles), we need to
@@ -70,178 +70,152 @@ _policy_border_set_focus(E_Border *bd)
* This is potentially useless as THIS policy
* makes all windows borderless anyway, but it's in here for
* completeness
- e_border_focus_latest_set(bd);
- if (bd->bg_object)
- edje_object_signal_emit(bd->bg_object, "e,state,focused", "e");
- if (bd->icon_object)
- edje_object_signal_emit(bd->icon_object, "e,state,focused", "e");
- e_focus_event_focus_in(bd);
+ e_client_focus_latest_set(ec);
+ if (ec->bg_object)
+ edje_object_signal_emit(ec->bg_object, "e,state,focused", "e");
+ if (ec->icon_object)
+ edje_object_signal_emit(ec->icon_object, "e,state,focused", "e");
+ e_focus_event_focus_in(ec);
*/
}
}
}
static void
-_policy_border_move(E_Border *bd, int x, int y)
+_policy_border_move(E_Client *ec, int x, int y)
{
- if (!bd) return;
+ if (!ec) return;
- bd->x = x;
- bd->y = y;
- bd->changes.pos = 1;
- BD_CHANGED(bd);
+ ec->x = x;
+ ec->y = y;
+ ec->changes.pos = 1;
+ EC_CHANGED(ec);
}
static void
-_policy_border_resize(E_Border *bd, int w, int h)
+_policy_border_resize(E_Client *ec, int w, int h)
{
- if (!bd) return;
-
- bd->w = w;
- bd->h = h;
- bd->client.w = (bd->w - (bd->client_inset.l + bd->client_inset.r));
- bd->client.h = (bd->h - (bd->client_inset.t + bd->client_inset.b));
- bd->changes.size = 1;
- BD_CHANGED(bd);
+ if (!ec) return;
+
+ ec->w = w;
+ ec->h = h;
+ e_comp_object_frame_wh_unadjust(ec->frame, ec->w, ec->h, &ec->client.w, &ec->client.h);
+ ec->changes.size = 1;
+ EC_CHANGED(ec);
}
static void
-_policy_border_hide_below(E_Border *bd)
+_policy_border_hide_below(E_Client *ec)
{
- int pos = 0, i;
+ E_Client *b;
return;
// printf("Hide Borders Below: %s %d %d\n",
- // bd->client.icccm.name, bd->x, bd->y);
-
- if (!bd) return;
- /* printf("_policy_border_hide_below %s\n", e_border_name_get(bd)); */
- /* determine layering position */
- if (bd->layer <= 0) pos = 0;
- else if ((bd->layer > 0) && (bd->layer <= 50)) pos = 1;
- else if ((bd->layer > 50) && (bd->layer <= 100)) pos = 2;
- else if ((bd->layer > 100) && (bd->layer <= 150)) pos = 3;
- else if ((bd->layer > 150) && (bd->layer <= 200)) pos = 4;
- else pos = 5;
+ // ec->icccm.name, ec->x, ec->y);
+
+ if (!ec) return;
/* Find the windows below this one */
- for (i = pos; i >= 2; i--)
+ E_CLIENT_FOREACH(ec->comp, b)
{
- Eina_List *l;
- E_Border *b;
-
- EINA_LIST_FOREACH(bd->zone->container->layers[i].clients, l, b)
- {
- /* skip if it's the same border */
- if (b == bd) continue;
-
- /* skip if it's not on this zone */
- if (b->zone != bd->zone) continue;
-
- /* skip special borders */
- if (e_illume_border_is_indicator(b)) continue;
- if (e_illume_border_is_softkey(b)) continue;
- if (e_illume_border_is_keyboard(b)) continue;
- if (e_illume_border_is_quickpanel(b)) continue;
- if (e_illume_border_is_home(b)) continue;
-
- if ((bd->fullscreen) || (bd->need_fullscreen))
- {
- if (b->visible) e_illume_border_hide(b);
- }
- else
- {
- /* we need to check x/y position */
- if (E_CONTAINS(bd->x, bd->y, bd->w, bd->h,
- b->x, b->y, b->w, b->h))
- {
- if (b->visible) e_illume_border_hide(b);
- }
- }
- }
+ if (e_client_util_ignored_get(b)) continue;
+ if (b->layer < E_LAYER_CLIENT_BELOW) continue;
+ /* skip if it's the same border */
+ if (b == ec) break;
+
+ /* skip if it's not on this zone */
+ if (b->zone != ec->zone) continue;
+
+ /* skip special borders */
+ if (e_illume_client_is_indicator(b)) continue;
+ if (e_illume_client_is_softkey(b)) continue;
+ if (e_illume_client_is_keyboard(b)) continue;
+ if (e_illume_client_is_quickpanel(b)) continue;
+ if (e_illume_client_is_home(b)) continue;
+
+ if ((ec->fullscreen) || (ec->need_fullscreen))
+ {
+ if (b->visible) e_illume_client_hide(b);
+ }
+ else
+ {
+ /* we need to check x/y position */
+ if (E_CONTAINS(ec->x, ec->y, ec->w, ec->h,
+ b->x, b->y, b->w, b->h))
+ {
+ if (b->visible) e_illume_client_hide(b);
+ }
+ }
}
}
#if 0
static void
-_policy_border_show_below(E_Border *bd)
+_policy_border_show_below(E_Client *ec)
{
Eina_List *l;
- E_Border *prev;
- int pos = 0, i;
+ E_Client *prev, *b;
// printf("Show Borders Below: %s %d %d\n",
- // bd->client.icccm.class, bd->x, bd->y);
+ // ec->icccm.class, ec->x, ec->y);
- if (!bd) return;
- /* printf("_policy_border_show_below %s\n", e_border_name_get(bd)); */
- if (bd->client.icccm.transient_for)
+ if (!ec) return;
+ /* printf("_policy_border_show_below %s\n", e_client_name_get(ec)); */
+ if (ec->icccm.transient_for)
{
- if ((prev = e_border_find_by_client_window(bd->client.icccm.transient_for)))
+ if ((prev = e_pixmap_find_client(E_PIXMAP_TYPE_X, ec->icccm.transient_for)))
{
_policy_border_set_focus(prev);
return;
}
}
- /* determine layering position */
- if (bd->layer <= 0) pos = 0;
- else if ((bd->layer > 0) && (bd->layer <= 50)) pos = 1;
- else if ((bd->layer > 50) && (bd->layer <= 100)) pos = 2;
- else if ((bd->layer > 100) && (bd->layer <= 150)) pos = 3;
- else if ((bd->layer > 150) && (bd->layer <= 200)) pos = 4;
- else pos = 5;
-
/* Find the windows below this one */
- for (i = pos; i >= 2; i--)
+ E_CLIENT_FOREACH(ec->comp, b)
{
- E_Border *b;
-
- EINA_LIST_REVERSE_FOREACH(bd->zone->container->layers[i].clients, l, b)
- {
- /* skip if it's the same border */
- if (b == bd) continue;
-
- /* skip if it's not on this zone */
- if (b->zone != bd->zone) continue;
-
- /* skip special borders */
- if (e_illume_border_is_indicator(b)) continue;
- if (e_illume_border_is_softkey(b)) continue;
- if (e_illume_border_is_keyboard(b)) continue;
- if (e_illume_border_is_quickpanel(b)) continue;
- if (e_illume_border_is_home(b)) continue;
-
- if ((bd->fullscreen) || (bd->need_fullscreen))
- {
- _policy_border_set_focus(b);
- return;
- }
- else
- {
- /* need to check x/y position */
- if (E_CONTAINS(bd->x, bd->y, bd->w, bd->h,
- b->x, b->y, b->w, b->h))
- {
- _policy_border_set_focus(b);
- return;
- }
- }
- }
+ if (e_client_util_ignored_get(b)) continue;
+ if (b->layer < E_LAYER_CLIENT_BELOW) continue;
+ if (b == ec) break;
+
+ /* skip if it's not on this zone */
+ if (b->zone != ec->zone) continue;
+
+ /* skip special borders */
+ if (e_illume_client_is_indicator(b)) continue;
+ if (e_illume_client_is_softkey(b)) continue;
+ if (e_illume_client_is_keyboard(b)) continue;
+ if (e_illume_client_is_quickpanel(b)) continue;
+ if (e_illume_client_is_home(b)) continue;
+
+ if ((ec->fullscreen) || (ec->need_fullscreen))
+ {
+ _policy_border_set_focus(b);
+ return;
+ }
+ else
+ {
+ /* need to check x/y position */
+ if (E_CONTAINS(ec->x, ec->y, ec->w, ec->h,
+ b->x, b->y, b->w, b->h))
+ {
+ _policy_border_set_focus(b);
+ return;
+ }
+ }
}
/* if we reach here, then there is a problem with showing a window below
* this one, so show previous window in stack */
EINA_LIST_REVERSE_FOREACH(_pol_focus_stack, l, prev)
{
- if (prev->zone != bd->zone) continue;
+ if (prev->zone != ec->zone) continue;
_policy_border_set_focus(prev);
return;
}
/* Fallback to focusing home if all above fails */
- _policy_focus_home(bd->zone);
+ _policy_focus_home(ec->zone);
}
#endif
@@ -249,70 +223,71 @@ static void
_policy_zone_layout_update(E_Zone *zone)
{
Eina_List *l;
- E_Border *bd;
+ E_Client *ec;
if (!zone) return;
- EINA_LIST_FOREACH(e_border_client_list(), l, bd)
+ EINA_LIST_FOREACH(zone->comp->clients, l, ec)
{
+ if (e_client_util_ignored_get(ec)) continue;
/* skip borders not on this zone */
- if (bd->zone != zone) continue;
+ if (ec->zone != zone) continue;
/* skip special windows */
- if (e_object_is_del(E_OBJECT(bd))) continue;
- if (e_illume_border_is_keyboard(bd)) continue;
- if (e_illume_border_is_quickpanel(bd)) continue;
+ if (e_object_is_del(E_OBJECT(ec))) continue;
+ if (e_illume_client_is_keyboard(ec)) continue;
+ if (e_illume_client_is_quickpanel(ec)) continue;
/* signal a changed pos here so layout gets updated */
- bd->changes.pos = 1;
- BD_CHANGED(bd);
+ ec->changes.pos = 1;
+ EC_CHANGED(ec);
}
}
static void
-_policy_zone_layout_indicator(E_Border *bd, E_Illume_Config_Zone *cz)
+_policy_zone_layout_indicator(E_Client *ec, E_Illume_Config_Zone *cz)
{
- if ((!bd) || (!cz)) return;
+ if ((!ec) || (!cz)) return;
/* grab minimum indicator size */
- e_illume_border_min_get(bd, NULL, &cz->indicator.size);
+ e_illume_client_min_get(ec, NULL, &cz->indicator.size);
/* no point in doing anything here if indicator is hidden */
- if ((!bd->new_client) && (!bd->visible))
+ if ((!ec->new_client) && (!ec->visible))
{
- ecore_x_e_illume_indicator_geometry_set(bd->zone->black_win,
+ ecore_x_e_illume_indicator_geometry_set(ec->zone->black_win,
0, 0, 0, 0);
return;
}
/* if we are dragging, then skip it for now */
- if (bd->client.illume.drag.drag)
+ if (ec->illume.drag.drag)
{
/* when dragging indicator, we need to trigger a layout update */
- ecore_x_e_illume_indicator_geometry_set(bd->zone->black_win,
+ ecore_x_e_illume_indicator_geometry_set(ec->zone->black_win,
0, 0, 0, 0);
- _policy_zone_layout_update(bd->zone);
+ _policy_zone_layout_update(ec->zone);
return;
}
- // printf("\tLayout Indicator: %d\n", bd->zone->num);
+ // printf("\tLayout Indicator: %d\n", ec->zone->num);
/* lock indicator window from dragging if we need to */
if ((cz->mode.dual == 1) && (cz->mode.side == 0))
- ecore_x_e_illume_drag_locked_set(bd->client.win, 0);
+ ecore_x_e_illume_drag_locked_set(e_client_util_win_get(ec), 0);
else
- ecore_x_e_illume_drag_locked_set(bd->client.win, 1);
+ ecore_x_e_illume_drag_locked_set(e_client_util_win_get(ec), 1);
- if ((bd->w != bd->zone->w) || (bd->h != cz->indicator.size))
- _policy_border_resize(bd, bd->zone->w, cz->indicator.size);
+ if ((ec->w != ec->zone->w) || (ec->h != cz->indicator.size))
+ _policy_border_resize(ec, ec->zone->w, cz->indicator.size);
if (!cz->mode.dual)
{
/* move to 0, 0 (relative to zone) if needed */
- if ((bd->x != bd->zone->x) || (bd->y != bd->zone->y))
+ if ((ec->x != ec->zone->x) || (ec->y != ec->zone->y))
{
- _policy_border_move(bd, bd->zone->x, bd->zone->y);
- ecore_x_e_illume_quickpanel_position_update_send(bd->client.win);
+ _policy_border_move(ec, ec->zone->x, ec->zone->y);
+ ecore_x_e_illume_quickpanel_position_update_send(e_client_util_win_get(ec));
}
}
else
@@ -323,100 +298,100 @@ _policy_zone_layout_indicator(E_Border *bd, E_Illume_Config_Zone *cz)
* in this case, the indicator itself should be responsible for
* sending the quickpanel position update message when it is
* finished dragging */
- if (bd->x != bd->zone->x)
- _policy_border_move(bd, bd->zone->x, bd->y);
+ if (ec->x != ec->zone->x)
+ _policy_border_move(ec, ec->zone->x, ec->y);
}
else
{
/* move to 0, 0 (relative to zone) if needed */
- if ((bd->x != bd->zone->x) || (bd->y != bd->zone->y))
+ if ((ec->x != ec->zone->x) || (ec->y != ec->zone->y))
{
- _policy_border_move(bd, bd->zone->x, bd->zone->y);
- ecore_x_e_illume_quickpanel_position_update_send(bd->client.win);
+ _policy_border_move(ec, ec->zone->x, ec->zone->y);
+ ecore_x_e_illume_quickpanel_position_update_send(e_client_util_win_get(ec));
}
}
}
- ecore_x_e_illume_indicator_geometry_set(bd->zone->black_win,
- bd->x, bd->y,
- bd->w, bd->h);
+ ecore_x_e_illume_indicator_geometry_set(ec->zone->black_win,
+ ec->x, ec->y,
+ ec->w, ec->h);
- if (bd->layer != POL_INDICATOR_LAYER)
- e_border_layer_set(bd, POL_INDICATOR_LAYER);
+ if (ec->layer != POL_INDICATOR_LAYER)
+ evas_object_layer_set(ec->frame, POL_INDICATOR_LAYER);
}
#define ZONE_GEOMETRY \
int x, y, w, h; \
- e_zone_useful_geometry_get(bd->zone, &x, &y, &w, &h); \
- x += bd->zone->x; \
- y += bd->zone->y; \
+ e_zone_useful_geometry_get(ec->zone, &x, &y, &w, &h); \
+ x += ec->zone->x; \
+ y += ec->zone->y; \
static void
-_border_geometry_set(E_Border *bd, int x, int y, int w, int h, int layer)
+_border_geometry_set(E_Client *ec, int x, int y, int w, int h, int layer)
{
- if ((bd->w != w) || (bd->h != h))
- _policy_border_resize(bd, w, h);
+ if ((ec->w != w) || (ec->h != h))
+ _policy_border_resize(ec, w, h);
- if ((bd->x != x) || (bd->y != y))
- _policy_border_move(bd, x, y);
+ if ((ec->x != x) || (ec->y != y))
+ _policy_border_move(ec, x, y);
- if ((int)bd->layer != layer) e_border_layer_set(bd, layer);
+ if ((int)ec->layer != layer) evas_object_layer_set(ec->frame, layer);
}
static void
-_policy_zone_layout_quickpanel(E_Border *bd)
+_policy_zone_layout_quickpanel(E_Client *ec)
{
int mh;
- if (!bd) return;
+ if (!ec) return;
- e_illume_border_min_get(bd, NULL, &mh);
+ e_illume_client_min_get(ec, NULL, &mh);
- if ((bd->w != bd->zone->w) || (bd->h != mh))
- _policy_border_resize(bd, bd->zone->w, mh);
+ if ((ec->w != ec->zone->w) || (ec->h != mh))
+ _policy_border_resize(ec, ec->zone->w, mh);
- if (bd->layer != POL_QUICKPANEL_LAYER)
- e_border_layer_set(bd, POL_QUICKPANEL_LAYER);
+ if (ec->layer != POL_QUICKPANEL_LAYER)
+ evas_object_layer_set(ec->frame, POL_QUICKPANEL_LAYER);
}
static void
-_policy_zone_layout_softkey(E_Border *bd, E_Illume_Config_Zone *cz)
+_policy_zone_layout_softkey(E_Client *ec, E_Illume_Config_Zone *cz)
{
int ny;
- if ((!bd) || (!cz)) return;
- if (!bd->visible)
+ if ((!ec) || (!cz)) return;
+ if (!ec->visible)
{
- ecore_x_e_illume_softkey_geometry_set(bd->zone->black_win, 0, 0, 0, 0);
+ ecore_x_e_illume_softkey_geometry_set(ec->zone->black_win, 0, 0, 0, 0);
return;
}
ZONE_GEOMETRY;
- e_illume_border_min_get(bd, NULL, &cz->softkey.size);
+ e_illume_client_min_get(ec, NULL, &cz->softkey.size);
/* if we are dragging, then skip it for now */
/* NB: Disabled currently until we confirm that softkey should be draggable */
- // if (bd->client.illume.drag.drag) return;
+ // if (ec->illume.drag.drag) return;
- if ((bd->w != w) || (bd->h != cz->softkey.size))
- _policy_border_resize(bd, w, cz->softkey.size);
+ if ((ec->w != w) || (ec->h != cz->softkey.size))
+ _policy_border_resize(ec, w, cz->softkey.size);
- ny = ((bd->zone->y + bd->zone->h) - cz->softkey.size);
+ ny = ((ec->zone->y + ec->zone->h) - cz->softkey.size);
/* NB: not sure why yet, but on startup the border->y is reporting
* that it is already in this position...but it's actually not.
* So for now, just disable the ny check until this gets sorted out */
- if ((bd->x != x) || (bd->y != ny))
- _policy_border_move(bd, x, ny);
+ if ((ec->x != x) || (ec->y != ny))
+ _policy_border_move(ec, x, ny);
- /* _border_geometry_set(bd, x, ny, nw, nh, bd, POL_CONFORMANT_LAYER); */
+ /* _border_geometry_set(ec, x, ny, nw, nh, ec, POL_CONFORMANT_LAYER); */
- ecore_x_e_illume_softkey_geometry_set(bd->zone->black_win,
- bd->x, bd->y,
- bd->w, bd->h);
+ ecore_x_e_illume_softkey_geometry_set(ec->zone->black_win,
+ ec->x, ec->y,
+ ec->w, ec->h);
- if (bd->layer != POL_SOFTKEY_LAYER) e_border_layer_set(bd, POL_SOFTKEY_LAYER);
+ if (ec->layer != POL_SOFTKEY_LAYER) evas_object_layer_set(ec->frame, POL_SOFTKEY_LAYER);
}
@@ -424,15 +399,15 @@ _policy_zone_layout_softkey(E_Border *bd, E_Illume_Config_Zone *cz)
#define MIN_HEIGHT 100
static Eina_Bool
-_policy_layout_app_check(E_Border *bd)
+_policy_layout_app_check(E_Client *ec)
{
- if (!bd)
+ if (!ec)
return EINA_FALSE;
- if (!bd->visible)
+ if (!ec->visible)
return EINA_FALSE;
- if ((bd->desk != e_desk_current_get(bd->zone)) && (!bd->sticky))
+ if ((ec->desk != e_desk_current_get(ec->zone)) && (!ec->sticky))
return EINA_FALSE;
return EINA_TRUE;
@@ -440,14 +415,14 @@ _policy_layout_app_check(E_Border *bd)
static void
-_policy_keyboard_restrict(E_Border *bd, int *h)
+_policy_keyboard_restrict(E_Client *ec, int *h)
{
int kh;
- if (bd->client.vkbd.state > ECORE_X_VIRTUAL_KEYBOARD_STATE_OFF)
+ if (ec->vkbd.state > ECORE_X_VIRTUAL_KEYBOARD_STATE_OFF)
{
- e_illume_keyboard_safe_app_region_get(bd->zone, NULL, NULL, NULL, &kh);
- kh -= bd->zone->h - *h;
+ e_illume_keyboard_safe_app_region_get(ec->zone, NULL, NULL, NULL, &kh);
+ kh -= ec->zone->h - *h;
if ((kh < *h) && (kh > MIN_HEIGHT))
*h = kh;
}
@@ -471,125 +446,125 @@ _policy_softkey_restrict(E_Illume_Config_Zone *cz, int *y, int *h)
}
static void
-_policy_zone_layout_keyboard(E_Border *bd, E_Illume_Config_Zone *cz)
+_policy_zone_layout_keyboard(E_Client *ec, E_Illume_Config_Zone *cz)
{
int ny, layer;
- if ((!bd) || (!cz) || (!bd->visible)) return;
+ if ((!ec) || (!cz) || (!ec->visible)) return;
ZONE_GEOMETRY;
- e_illume_border_min_get(bd, NULL, &cz->vkbd.size);
+ e_illume_client_min_get(ec, NULL, &cz->vkbd.size);
- ny = ((bd->zone->y + bd->zone->h) - cz->vkbd.size);
+ ny = ((ec->zone->y + ec->zone->h) - cz->vkbd.size);
- /* if ((bd->fullscreen) || (bd->need_fullscreen))
+ /* if ((ec->fullscreen) || (ec->need_fullscreen))
* layer = POL_FULLSCREEN_LAYER;
* else */
layer = POL_KEYBOARD_LAYER;
- _border_geometry_set(bd, x, ny, w, cz->vkbd.size, layer);
+ _border_geometry_set(ec, x, ny, w, cz->vkbd.size, layer);
}
static void
-_policy_zone_layout_home_single(E_Border *bd, E_Illume_Config_Zone *cz)
+_policy_zone_layout_home_single(E_Client *ec, E_Illume_Config_Zone *cz)
{
- if ((!bd) || (!cz) || (!bd->visible)) return;
+ if ((!ec) || (!cz) || (!ec->visible)) return;
ZONE_GEOMETRY;
_policy_indicator_restrict(cz, &y, &h);
- _border_geometry_set(bd, x, y, w, h, POL_HOME_LAYER);
+ _border_geometry_set(ec, x, y, w, h, POL_HOME_LAYER);
}
static void
-_policy_zone_layout_fullscreen(E_Border *bd)
+_policy_zone_layout_fullscreen(E_Client *ec)
{
- if (!_policy_layout_app_check(bd)) return;
+ if (!_policy_layout_app_check(ec)) return;
ZONE_GEOMETRY;
- _policy_keyboard_restrict(bd, &h);
+ _policy_keyboard_restrict(ec, &h);
- _border_geometry_set(bd, x, y, w, h, POL_FULLSCREEN_LAYER);
+ _border_geometry_set(ec, x, y, w, h, POL_FULLSCREEN_LAYER);
}
static void
-_policy_zone_layout_app_single(E_Border *bd, E_Illume_Config_Zone *cz)
+_policy_zone_layout_app_single(E_Client *ec, E_Illume_Config_Zone *cz)
{
- if (!_policy_layout_app_check(bd)) return;
+ if (!_policy_layout_app_check(ec)) return;
ZONE_GEOMETRY;
- _policy_keyboard_restrict(bd, &h);
+ _policy_keyboard_restrict(ec, &h);
_policy_indicator_restrict(cz, &y, &h);
_policy_softkey_restrict(cz, &y, &h);
- _border_geometry_set(bd, x, y, w, h, POL_APP_LAYER);
+ _border_geometry_set(ec, x, y, w, h, POL_APP_LAYER);
}
static void
-_policy_zone_layout_app_dual_top(E_Border *bd, E_Illume_Config_Zone *cz)
+_policy_zone_layout_app_dual_top(E_Client *ec, E_Illume_Config_Zone *cz)
{
- E_Border *bd2;
+ E_Client *ec2;
- if (!_policy_layout_app_check(bd)) return;
+ if (!_policy_layout_app_check(ec)) return;
ZONE_GEOMETRY;
- _policy_keyboard_restrict(bd, &h);
+ _policy_keyboard_restrict(ec, &h);
_policy_indicator_restrict(cz, &y, &h);
_policy_softkey_restrict(cz, &y, &h);
- bd2 = e_illume_border_at_xy_get(bd->zone, x, y);
- if ((bd2) && (bd2 != bd))
+ ec2 = e_illume_client_at_xy_get(ec->zone, x, y);
+ if ((ec2) && (ec2 != ec))
{
- if ((bd->focused) && (bd->client.vkbd.state > ECORE_X_VIRTUAL_KEYBOARD_STATE_OFF))
- _border_geometry_set(bd2, x, h/2 + y, w, h/2, POL_APP_LAYER);
+ if ((ec->focused) && (ec->vkbd.state > ECORE_X_VIRTUAL_KEYBOARD_STATE_OFF))
+ _border_geometry_set(ec2, x, h/2 + y, w, h/2, POL_APP_LAYER);
else
y += h/2;
}
- _border_geometry_set(bd, x, y, w, h/2, POL_APP_LAYER);
+ _border_geometry_set(ec, x, y, w, h/2, POL_APP_LAYER);
}
static void
-_policy_zone_layout_app_dual_custom(E_Border *bd, E_Illume_Config_Zone *cz)
+_policy_zone_layout_app_dual_custom(E_Client *ec, E_Illume_Config_Zone *cz)
{
- E_Border *app;
+ E_Client *app;
int iy, ny, nh;
- if (!_policy_layout_app_check(bd)) return;
+ if (!_policy_layout_app_check(ec)) return;
ZONE_GEOMETRY;
- e_illume_border_indicator_pos_get(bd->zone, NULL, &iy);
+ e_illume_client_indicator_pos_get(ec->zone, NULL, &iy);
- ny = bd->zone->y;
+ ny = ec->zone->y;
nh = iy;
- app = e_illume_border_at_xy_get(bd->zone, bd->zone->x, bd->zone->y);
- if ((app) && (bd != app))
+ app = e_illume_client_at_xy_get(ec->zone, ec->zone->x, ec->zone->y);
+ if ((app) && (ec != app))
{
ny = (iy + cz->indicator.size);
- nh = ((bd->zone->y + bd->zone->h) - ny - cz->softkey.size);
+ nh = ((ec->zone->y + ec->zone->h) - ny - cz->softkey.size);
}
- _border_geometry_set(bd, x, ny, w, nh, POL_APP_LAYER);
+ _border_geometry_set(ec, x, ny, w, nh, POL_APP_LAYER);
}
static void
-_policy_zone_layout_app_dual_left(E_Border *bd, E_Illume_Config_Zone *cz, Eina_Bool force)
+_policy_zone_layout_app_dual_left(E_Client *ec, E_Illume_Config_Zone *cz, Eina_Bool force)
{
- E_Border *bd2;
+ E_Client *ec2;
int ky, kh, nx, nw;
- if (!_policy_layout_app_check(bd)) return;
+ if (!_policy_layout_app_check(ec)) return;
ZONE_GEOMETRY;
- e_illume_keyboard_safe_app_region_get(bd->zone, NULL, &ky, NULL, &kh);
+ e_illume_keyboard_safe_app_region_get(ec->zone, NULL, &ky, NULL, &kh);
- if (kh >= bd->zone->h)
+ if (kh >= ec->zone->h)
kh = (kh - cz->indicator.size - cz->softkey.size);
else
kh = (kh - cz->indicator.size);
@@ -600,46 +575,46 @@ _policy_zone_layout_app_dual_left(E_Border *bd, E_Illume_Config_Zone *cz, Eina_B
if (!force)
{
/* see if there is a border already there. if so, place at right */
- bd2 = e_illume_border_at_xy_get(bd->zone, nx, y);
- if ((bd2) && (bd != bd2)) nx = x + nw;
+ ec2 = e_illume_client_at_xy_get(ec->zone, nx, y);
+ if ((ec2) && (ec != ec2)) nx = x + nw;
}
- _border_geometry_set(bd, nx, y, nw, kh, POL_APP_LAYER);
+ _border_geometry_set(ec, nx, y, nw, kh, POL_APP_LAYER);
}
static void
-_policy_zone_layout_dialog(E_Border *bd, E_Illume_Config_Zone *cz)
+_policy_zone_layout_dialog(E_Client *ec, E_Illume_Config_Zone *cz)
{
- E_Border *parent;
+ E_Client *parent;
int mw, mh, nx, ny;
- /* if (!_policy_layout_app_check(bd)) return; */
- if ((!bd) || (!cz)) return;
- printf("place dialog %d - %dx%d\n", bd->placed, bd->w, bd->h);
+ /* if (!_policy_layout_app_check(ec)) return; */
+ if ((!ec) || (!cz)) return;
+ printf("place dialog %d - %dx%d\n", ec->placed, ec->w, ec->h);
- if (bd->placed)
+ if (ec->placed)
return;
ZONE_GEOMETRY;
- mw = bd->w;
- mh = bd->h;
+ mw = ec->w;
+ mh = ec->h;
- if (e_illume_border_is_fixed_size(bd))
+ if (e_illume_client_is_fixed_size(ec))
{
if (mw > w) mw = w;
if (mh > h) mh = h;
}
else
{
- if (w * 2/3 > bd->w)
+ if (w * 2/3 > ec->w)
mw = w * 2/3;
- if (h * 2/3 > bd->h)
+ if (h * 2/3 > ec->h)
mh = h * 2/3;
}
- parent = e_illume_border_parent_get(bd);
+ parent = e_illume_client_parent_get(ec);
if ((!parent) || (cz->mode.dual == 1))
{
@@ -655,27 +630,27 @@ _policy_zone_layout_dialog(E_Border *bd, E_Illume_Config_Zone *cz)
ny = (parent->y + ((parent->h - mh) / 2));
}
- bd->placed = 1;
+ ec->placed = 1;
- _border_geometry_set(bd, nx, ny, mw, mh, POL_DIALOG_LAYER);
+ _border_geometry_set(ec, nx, ny, mw, mh, POL_DIALOG_LAYER);
printf("set geom %d %d\n", mw, mh);
}
static void
-_policy_zone_layout_splash(E_Border *bd, E_Illume_Config_Zone *cz)
+_policy_zone_layout_splash(E_Client *ec, E_Illume_Config_Zone *cz)
{
- _policy_zone_layout_dialog(bd, cz);
+ _policy_zone_layout_dialog(ec, cz);
- if (bd->layer != POL_SPLASH_LAYER) e_border_layer_set(bd, POL_SPLASH_LAYER);
+ if (ec->layer != POL_SPLASH_LAYER) evas_object_layer_set(ec->frame, POL_SPLASH_LAYER);
}
static void
-_policy_zone_layout_conformant_single(E_Border *bd, E_Illume_Config_Zone *cz __UNUSED__)
+_policy_zone_layout_conformant_single(E_Client *ec, E_Illume_Config_Zone *cz __UNUSED__)
{
- if (!_policy_layout_app_check(bd)) return;
+ if (!_policy_layout_app_check(ec)) return;
- _border_geometry_set(bd, bd->zone->x, bd->zone->y,
- bd->zone->w, bd->zone->h,
+ _border_geometry_set(ec, ec->zone->x, ec->zone->y,
+ ec->zone->w, ec->zone->h,
POL_CONFORMANT_LAYER);
}
@@ -702,11 +677,11 @@ static Eina_List *desks = NULL;
/* policy functions */
void
-_policy_border_add(E_Border *bd)
+_policy_border_add(E_Client *ec)
{
- // printf("Border added: %s\n", bd->client.icccm.class);
+ // printf("Border added: %s\n", ec->icccm.class);
- if (!bd) return;
+ if (!ec) return;
/* NB: this call sets an atom on the window that specifices the zone.
* the logic here is that any new windows created can access the zone
@@ -716,66 +691,66 @@ _policy_border_add(E_Border *bd)
* that apply to their respective zone only. Example: softkey sends close
* messages (or back messages to cycle focus) that should pertain just
* to it's current zone */
- ecore_x_e_illume_zone_set(bd->client.win, bd->zone->black_win);
+ ecore_x_e_illume_zone_set(e_client_util_win_get(ec), ec->zone->black_win);
- if (e_illume_border_is_keyboard(bd))
+ if (e_illume_client_is_keyboard(ec))
{
- bd->sticky = 1;
- e_hints_window_sticky_set(bd, 1);
+ ec->sticky = 1;
+ e_hints_window_sticky_set(ec, 1);
}
- if (e_illume_border_is_home(bd))
+ if (e_illume_client_is_home(ec))
{
- bd->sticky = 1;
- e_hints_window_sticky_set(bd, 1);
+ ec->sticky = 1;
+ e_hints_window_sticky_set(ec, 1);
}
- if (e_illume_border_is_indicator(bd))
+ if (e_illume_client_is_indicator(ec))
{
- bd->sticky = 1;
- e_hints_window_sticky_set(bd, 1);
+ ec->sticky = 1;
+ e_hints_window_sticky_set(ec, 1);
}
- if (e_illume_border_is_softkey(bd))
+ if (e_illume_client_is_softkey(ec))
{
- bd->sticky = 1;
- e_hints_window_sticky_set(bd, 1);
+ ec->sticky = 1;
+ e_hints_window_sticky_set(ec, 1);
}
/* ignore stolen borders. These are typically quickpanel or keyboards */
- if (bd->stolen) return;
+ if (ec->stolen) return;
/* if this is a fullscreen window, than we need to hide indicator window */
- /* NB: we could use the e_illume_border_is_fullscreen function here
+ /* NB: we could use the e_illume_client_is_fullscreen function here
* but we save ourselves a function call this way */
- if ((bd->fullscreen) || (bd->need_fullscreen))
+ if ((ec->fullscreen) || (ec->need_fullscreen))
{
- E_Border *ind, *sft;
+ E_Client *ind, *sft;
- if ((ind = e_illume_border_indicator_get(bd->zone)))
+ if ((ind = e_illume_client_indicator_get(ec->zone)))
{
- if (ind->visible) e_illume_border_hide(ind);
+ if (ind->visible) e_illume_client_hide(ind);
}
- if ((sft = e_illume_border_softkey_get(bd->zone)))
+ if ((sft = e_illume_client_softkey_get(ec->zone)))
{
- if (e_illume_border_is_conformant(bd))
+ if (e_illume_client_is_conformant(ec))
{
if (sft->visible)
- e_illume_border_hide(sft);
+ e_illume_client_hide(sft);
else if (!sft->visible)
- e_illume_border_show(sft);
+ e_illume_client_show(sft);
}
}
}
#if 0
- if (bd->client.icccm.class)
+ if (ec->icccm.class)
{
Eina_List *l;
App_Desk *d;
- EINA_LIST_FIND(desks, d, (d->class == bd->client.icccm.class));
+ EINA_LIST_FIND(desks, d, (d->class == ec->icccm.class));
if (!d)
{
@@ -783,165 +758,165 @@ _policy_border_add(E_Border *bd)
d->desk
}
- d->borders = eina_list_append(d->borders, bd);
- e_border_desk_set(bd, d->desk);
+ d->borders = eina_list_append(d->borders, ec);
+ e_client_desk_set(ec, d->desk);
}
#endif
/* Add this border to our focus stack if it can accept or take focus */
- if ((bd->client.icccm.accepts_focus) || (bd->client.icccm.take_focus))
- _pol_focus_stack = eina_list_append(_pol_focus_stack, bd);
+ if ((ec->icccm.accepts_focus) || (ec->icccm.take_focus))
+ _pol_focus_stack = eina_list_append(_pol_focus_stack, ec);
- if ((e_illume_border_is_softkey(bd)) || (e_illume_border_is_indicator(bd)))
- _policy_zone_layout_update(bd->zone);
+ if ((e_illume_client_is_softkey(ec)) || (e_illume_client_is_indicator(ec)))
+ _policy_zone_layout_update(ec->zone);
else
{
/* set focus on new border if we can */
- _policy_border_set_focus(bd);
+ _policy_border_set_focus(ec);
}
}
void
-_policy_border_del(E_Border *bd)
+_policy_border_del(E_Client *ec)
{
- // printf("Policy Border deleted: %s\n", bd->client.icccm.class);
+ // printf("Policy Border deleted: %s\n", ec->icccm.class);
- if (!bd) return;
+ if (!ec) return;
/* if this is a fullscreen window, than we need to show indicator window */
- /* NB: we could use the e_illume_border_is_fullscreen function here
+ /* NB: we could use the e_illume_client_is_fullscreen function here
* but we save ourselves a function call this way */
- if ((bd->fullscreen) || (bd->need_fullscreen))
+ if ((ec->fullscreen) || (ec->need_fullscreen))
{
- E_Border *ind;
+ E_Client *ind;
/* try to get the Indicator on this zone */
- if ((ind = e_illume_border_indicator_get(bd->zone)))
+ if ((ind = e_illume_client_indicator_get(ec->zone)))
{
- if (!ind->visible) e_illume_border_show(ind);
+ if (!ind->visible) e_illume_client_show(ind);
}
- _policy_zone_layout_update(bd->zone);
+ _policy_zone_layout_update(ec->zone);
}
/* remove from focus stack */
- if ((bd->client.icccm.accepts_focus) || (bd->client.icccm.take_focus))
- _pol_focus_stack = eina_list_remove(_pol_focus_stack, bd);
+ if ((ec->icccm.accepts_focus) || (ec->icccm.take_focus))
+ _pol_focus_stack = eina_list_remove(_pol_focus_stack, ec);
- if (e_illume_border_is_softkey(bd))
+ if (e_illume_client_is_softkey(ec))
{
E_Illume_Config_Zone *cz;
- cz = e_illume_zone_config_get(bd->zone->num);
+ cz = e_illume_zone_config_get(ec->zone->num);
cz->softkey.size = 0;
- _policy_zone_layout_update(bd->zone);
+ _policy_zone_layout_update(ec->zone);
}
- else if (e_illume_border_is_indicator(bd))
+ else if (e_illume_client_is_indicator(ec))
{
E_Illume_Config_Zone *cz;
- cz = e_illume_zone_config_get(bd->zone->num);
+ cz = e_illume_zone_config_get(ec->zone->num);
cz->indicator.size = 0;
- _policy_zone_layout_update(bd->zone);
+ _policy_zone_layout_update(ec->zone);
}
/* else
* {
- * _policy_border_show_below(bd);
+ * _policy_border_show_below(ec);
* } */
}
void
-_policy_border_focus_in(E_Border *bd __UNUSED__)
+_policy_border_focus_in(E_Client *ec __UNUSED__)
{
- E_Border *ind;
+ E_Client *ind;
- // printf("Border focus in: %s\n", bd->client.icccm.name);
- if ((bd->fullscreen) || (bd->need_fullscreen))
+ // printf("Border focus in: %s\n", ec->icccm.name);
+ if ((ec->fullscreen) || (ec->need_fullscreen))
{
/* try to get the Indicator on this zone */
- if ((ind = e_illume_border_indicator_get(bd->zone)))
+ if ((ind = e_illume_client_indicator_get(ec->zone)))
{
/* we have the indicator, show it if needed */
- if (ind->visible) e_illume_border_hide(ind);
+ if (ind->visible) e_illume_client_hide(ind);
}
}
else
{
/* try to get the Indicator on this zone */
- if ((ind = e_illume_border_indicator_get(bd->zone)))
+ if ((ind = e_illume_client_indicator_get(ec->zone)))
{
/* we have the indicator, show it if needed */
- if (!ind->visible) e_illume_border_show(ind);
+ if (!ind->visible) e_illume_client_show(ind);
}
}
- _policy_zone_layout_update(bd->zone);
+ _policy_zone_layout_update(ec->zone);
}
void
-_policy_border_focus_out(E_Border *bd)
+_policy_border_focus_out(E_Client *ec)
{
- // printf("Border focus out: %s\n", bd->client.icccm.name);
+ // printf("Border focus out: %s\n", ec->icccm.name);
- if (!bd) return;
+ if (!ec) return;
/* NB: if we got this focus_out event on a deleted border, we check if
* it is a transient (child) of another window. If it is, then we
* transfer focus back to the parent window */
- if (e_object_is_del(E_OBJECT(bd)))
+ if (e_object_is_del(E_OBJECT(ec)))
{
- if (e_illume_border_is_dialog(bd))
+ if (e_illume_client_is_dialog(ec))
{
- E_Border *parent;
+ E_Client *parent;
- if ((parent = e_illume_border_parent_get(bd)))
+ if ((parent = e_illume_client_parent_get(ec)))
_policy_border_set_focus(parent);
}
}
}
void
-_policy_border_activate(E_Border *bd)
+_policy_border_activate(E_Client *ec)
{
- E_Border *sft;
+ E_Client *sft;
- // printf("Border Activate: %s\n", bd->client.icccm.name);
+ // printf("Border Activate: %s\n", ec->icccm.name);
- if (!bd) return;
+ if (!ec) return;
/* NB: stolen borders may or may not need focus call...have to test */
- if (bd->stolen) return;
+ if (ec->stolen) return;
/* conformant windows hide the softkey */
- if ((sft = e_illume_border_softkey_get(bd->zone)))
+ if ((sft = e_illume_client_softkey_get(ec->zone)))
{
- if (e_illume_border_is_conformant(bd))
+ if (e_illume_client_is_conformant(ec))
{
- if (sft->visible) e_illume_border_hide(sft);
+ if (sft->visible) e_illume_client_hide(sft);
}
else
{
- if (!sft->visible) e_illume_border_show(sft);
+ if (!sft->visible) e_illume_client_show(sft);
}
}
/* NB: We cannot use our set_focus function here because it does,
* occasionally fall through wrt E's focus policy, so cherry pick the good
* parts and use here :) */
- if (bd->desk != e_desk_current_get(bd->zone))
- e_desk_show(bd->desk);
+ if (ec->desk != e_desk_current_get(ec->zone))
+ e_desk_show(ec->desk);
/* if the border is iconified then uniconify if allowed */
- if ((bd->iconic) && (!bd->lock_user_iconify))
- e_border_uniconify(bd);
+ if ((ec->iconic) && (!ec->lock_user_iconify))
+ e_client_uniconify(ec);
/* set very high layer for this window as it needs attention and thus
* should show above everything */
- e_border_layer_set(bd, POL_ACTIVATE_LAYER);
+ evas_object_layer_set(ec->frame, POL_ACTIVATE_LAYER);
/* if we can raise the border do it */
- if (!bd->lock_user_stacking) e_border_raise(bd);
+ if (!ec->lock_user_stacking) evas_object_raise(ec->frame);
/* focus the border */
- e_border_focus_set(bd, 1, 1);
+ evas_object_focus_set(ec->frame, 1);
/* NB: since we skip needless border evals when container layout
* is called (to save cpu cycles), we need to
@@ -951,32 +926,32 @@ _policy_border_activate(E_Border *bd)
* This is potentially useless as THIS policy
* makes all windows borderless anyway, but it's in here for
* completeness
- e_border_focus_latest_set(bd);
- if (bd->bg_object)
- edje_object_signal_emit(bd->bg_object, "e,state,focused", "e");
- if (bd->icon_object)
- edje_object_signal_emit(bd->icon_object, "e,state,focused", "e");
- e_focus_event_focus_in(bd);
+ e_client_focus_latest_set(ec);
+ if (ec->bg_object)
+ edje_object_signal_emit(ec->bg_object, "e,state,focused", "e");
+ if (ec->icon_object)
+ edje_object_signal_emit(ec->icon_object, "e,state,focused", "e");
+ e_focus_event_focus_in(ec);
*/
}
static Eina_Bool
-_policy_border_is_dialog(E_Border *bd)
+_policy_border_is_dialog(E_Client *ec)
{
- if (e_illume_border_is_dialog(bd))
+ if (e_illume_client_is_dialog(ec))
return EINA_TRUE;
- if (bd->client.e.state.centered)
+ if (ec->e.state.centered)
return EINA_TRUE;
- if (bd->internal)
+ if (ec->internal)
{
- if (bd->client.icccm.class)
+ if (ec->icccm.class)
{
- if (!strncmp(bd->client.icccm.class, "Illume", 6))
+ if (!strncmp(ec->icccm.class, "Illume", 6))
return EINA_FALSE;
- if (!strncmp(bd->client.icccm.class, "e_fwin", 6))
+ if (!strncmp(ec->icccm.class, "e_fwin", 6))
return EINA_FALSE;
- if (!strncmp(bd->client.icccm.class, "every", 5))
+ if (!strncmp(ec->icccm.class, "every", 5))
return EINA_FALSE;
}
@@ -987,152 +962,153 @@ _policy_border_is_dialog(E_Border *bd)
}
void
-_policy_border_post_fetch(E_Border *bd)
+_policy_border_post_fetch(E_Client *ec)
{
- if (!bd) return;
+ if (!ec) return;
/* NB: for this policy we disable all remembers set on a border */
- if (bd->remember) e_remember_del(bd->remember);
- bd->remember = NULL;
+ if (ec->remember) e_remember_del(ec->remember);
+ ec->remember = NULL;
- if (_policy_border_is_dialog(bd))
+ if (_policy_border_is_dialog(ec))
{
return;
}
- else if (e_illume_border_is_fixed_size(bd))
+ else if (e_illume_client_is_fixed_size(ec))
{
return;
}
- else if (!bd->borderless)
+ else if (!ec->borderless)
{
- bd->borderless = 1;
- bd->client.border.changed = 1;
+ ec->borderless = 1;
+ ec->border.changed = 1;
}
}
void
-_policy_border_post_assign(E_Border *bd)
+_policy_border_post_assign(E_Client *ec)
{
- if (!bd) return;
+ if (!ec) return;
- bd->internal_no_remember = 1;
+ ec->internal_no_remember = 1;
- if (_policy_border_is_dialog(bd) ||
- e_illume_border_is_fixed_size(bd))
+ if (_policy_border_is_dialog(ec) ||
+ e_illume_client_is_fixed_size(ec))
return;
/* do not allow client to change these properties */
- bd->lock_client_size = 1;
- bd->lock_client_shade = 1;
- bd->lock_client_maximize = 1;
- bd->lock_client_location = 1;
- bd->lock_client_stacking = 1;
+ ec->lock_client_size = 1;
+ ec->lock_client_shade = 1;
+ ec->lock_client_maximize = 1;
+ ec->lock_client_location = 1;
+ ec->lock_client_stacking = 1;
/* do not allow the user to change these properties */
- /* bd->lock_user_location = 1;
- * bd->lock_user_size = 1;
- * bd->lock_user_shade = 1; */
+ /* ec->lock_user_location = 1;
+ * ec->lock_user_size = 1;
+ * ec->lock_user_shade = 1; */
/* clear any centered states */
/* NB: this is mainly needed for E's main config dialog */
- bd->client.e.state.centered = 0;
+ ec->e.state.centered = 0;
/* lock the border type so user/client cannot change */
- bd->lock_border = 1;
+ ec->lock_border = 1;
/* disable e's placement (and honoring of icccm.request_pos) */
- bd->placed = 1;
+ ec->placed = 1;
}
void
-_policy_border_show(E_Border *bd)
+_policy_border_show(E_Client *ec)
{
- if (!bd) return;
+ if (!ec) return;
- /* printf("_policy_border_show %s\n", e_border_name_get(bd)); */
+ /* printf("_policy_border_show %s\n", e_client_name_get(ec)); */
- if (!bd->client.icccm.name) return;
+ if (!ec->icccm.name) return;
- // printf("Border Show: %s\n", bd->client.icccm.class);
+ // printf("Border Show: %s\n", ec->icccm.class);
/* trap for special windows so we can ignore hides below them */
- if (e_illume_border_is_indicator(bd)) return;
- if (e_illume_border_is_softkey(bd)) return;
- if (e_illume_border_is_quickpanel(bd)) return;
- if (e_illume_border_is_keyboard(bd)) return;
+ if (e_illume_client_is_indicator(ec)) return;
+ if (e_illume_client_is_softkey(ec)) return;
+ if (e_illume_client_is_quickpanel(ec)) return;
+ if (e_illume_client_is_keyboard(ec)) return;
- _policy_border_hide_below(bd);
+ _policy_border_hide_below(ec);
}
-/* called on E_BORDER_HOOK_CONTAINER_LAYOUT (after e_border/eval0) */
+/* called on E_CLIENT_HOOK_CONTAINER_LAYOUT (after e_border/eval0) */
void
_policy_zone_layout(E_Zone *zone)
{
E_Illume_Config_Zone *cz;
Eina_List *l;
- E_Border *bd;
+ E_Client *ec;
if (!zone) return;
cz = e_illume_zone_config_get(zone->num);
- EINA_LIST_FOREACH(e_border_client_list(), l, bd)
+ EINA_LIST_FOREACH(zone->comp->clients, l, ec)
{
- if (e_object_is_del(E_OBJECT(bd))) continue;
+ if (e_client_util_ignored_get(ec)) continue;
+ if (e_object_is_del(E_OBJECT(ec))) continue;
- if (bd->zone != zone) continue;
+ if (ec->zone != zone) continue;
- if ((!bd->new_client) && (!bd->changes.pos) && (!bd->changes.size) &&
- (!bd->changes.visible) && (!bd->pending_move_resize) &&
- (!bd->need_shape_export) && (!bd->need_shape_merge)) continue;
+ if ((!ec->new_client) && (!ec->changes.pos) && (!ec->changes.size) &&
+ (!ec->changes.visible) &&
+ (!ec->need_shape_export) && (!ec->need_shape_merge)) continue;
- if (e_illume_border_is_indicator(bd))
- _policy_zone_layout_indicator(bd, cz);
+ if (e_illume_client_is_indicator(ec))
+ _policy_zone_layout_indicator(ec, cz);
- else if (e_illume_border_is_quickpanel(bd))
- _policy_zone_layout_quickpanel(bd);
+ else if (e_illume_client_is_quickpanel(ec))
+ _policy_zone_layout_quickpanel(ec);
- else if (e_illume_border_is_softkey(bd))
- _policy_zone_layout_softkey(bd, cz);
+ else if (e_illume_client_is_softkey(ec))
+ _policy_zone_layout_softkey(ec, cz);
- else if (e_illume_border_is_keyboard(bd))
- _policy_zone_layout_keyboard(bd, cz);
+ else if (e_illume_client_is_keyboard(ec))
+ _policy_zone_layout_keyboard(ec, cz);
- else if (e_illume_border_is_home(bd))
- _policy_zone_layout_home_single(bd, cz);
+ else if (e_illume_client_is_home(ec))
+ _policy_zone_layout_home_single(ec, cz);
- else if ((bd->fullscreen) || (bd->need_fullscreen))
- _policy_zone_layout_fullscreen(bd);
+ else if ((ec->fullscreen) || (ec->need_fullscreen))
+ _policy_zone_layout_fullscreen(ec);
- else if (e_illume_border_is_splash(bd))
- _policy_zone_layout_splash(bd, cz);
+ else if (e_illume_client_is_splash(ec))
+ _policy_zone_layout_splash(ec, cz);
- else if (_policy_border_is_dialog(bd))
- _policy_zone_layout_dialog(bd, cz);
+ else if (_policy_border_is_dialog(ec))
+ _policy_zone_layout_dialog(ec, cz);
- else if (e_illume_border_is_conformant(bd))
- _policy_zone_layout_conformant_single(bd, cz);
+ else if (e_illume_client_is_conformant(ec))
+ _policy_zone_layout_conformant_single(ec, cz);
- else if (e_illume_border_is_fixed_size(bd))
- _policy_zone_layout_dialog(bd, cz);
+ else if (e_illume_client_is_fixed_size(ec))
+ _policy_zone_layout_dialog(ec, cz);
- else if (bd->internal && bd->client.icccm.class &&
- (!strcmp(bd->client.icccm.class, "everything-window")))
+ else if (ec->internal && ec->icccm.class &&
+ (!strcmp(ec->icccm.class, "everything-window")))
{
- if (bd->client.vkbd.state == ECORE_X_VIRTUAL_KEYBOARD_STATE_ON)
- _policy_zone_layout_app_single(bd, cz);
+ if (ec->vkbd.state == ECORE_X_VIRTUAL_KEYBOARD_STATE_ON)
+ _policy_zone_layout_app_single(ec, cz);
/* else
- * _policy_zone_layout_app_dual_left(bd, cz, EINA_TRUE); */
- if (bd->layer != POL_ACTIVATE_LAYER)
- e_border_layer_set(bd, POL_ACTIVATE_LAYER);
+ * _policy_zone_layout_app_dual_left(ec, cz, EINA_TRUE); */
+ if (ec->layer != POL_ACTIVATE_LAYER)
+ evas_object_layer_set(ec->frame, POL_ACTIVATE_LAYER);
- /* if (bd->layer != POL_SPLASH_LAYER)
- * e_border_layer_set(bd, POL_SPLASH_LAYER); */
+ /* if (ec->layer != POL_SPLASH_LAYER)
+ * evas_object_layer_set(ec->frame, POL_SPLASH_LAYER); */
}
- else if (bd->client.e.state.centered)
- _policy_zone_layout_dialog(bd, cz);
+ else if (ec->e.state.centered)
+ _policy_zone_layout_dialog(ec, cz);
else if (!cz->mode.dual)
- _policy_zone_layout_app_single(bd, cz);
+ _policy_zone_layout_app_single(ec, cz);
else
{
if (cz->mode.side == 0)
@@ -1141,14 +1117,14 @@ _policy_zone_layout(E_Zone *zone)
/* grab the indicator position so we can tell if it
* is in a custom position or not (user dragged it) */
- e_illume_border_indicator_pos_get(bd->zone, NULL, &ty);
- if (ty <= bd->zone->y)
- _policy_zone_layout_app_dual_top(bd, cz);
+ e_illume_client_indicator_pos_get(ec->zone, NULL, &ty);
+ if (ty <= ec->zone->y)
+ _policy_zone_layout_app_dual_top(ec, cz);
else
- _policy_zone_layout_app_dual_custom(bd, cz);
+ _policy_zone_layout_app_dual_custom(ec, cz);
}
else
- _policy_zone_layout_app_dual_left(bd, cz, EINA_FALSE);
+ _policy_zone_layout_app_dual_left(ec, cz, EINA_FALSE);
}
}
}
@@ -1157,16 +1133,17 @@ void
_policy_zone_move_resize(E_Zone *zone)
{
Eina_List *l;
- E_Border *bd;
+ E_Client *ec;
if (!zone) return;
- EINA_LIST_FOREACH(e_border_client_list(), l, bd)
+ EINA_LIST_FOREACH(zone->comp->clients, l, ec)
{
- if (bd->zone != zone) continue;
+ if (e_client_util_ignored_get(ec)) continue;
+ if (ec->zone != zone) continue;
- bd->changes.pos = 1;
- BD_CHANGED(bd);
+ ec->changes.pos = 1;
+ EC_CHANGED(ec);
}
}
@@ -1175,7 +1152,7 @@ _policy_zone_mode_change(E_Zone *zone, Ecore_X_Atom mode)
{
E_Illume_Config_Zone *cz;
/* Eina_List *homes = NULL; */
- E_Border *bd;
+ E_Client *ec;
/* int count; */
if (!zone) return;
@@ -1195,25 +1172,25 @@ _policy_zone_mode_change(E_Zone *zone, Ecore_X_Atom mode)
e_config_save_queue();
/* lock indicator window from dragging if we need to */
- bd = e_illume_border_indicator_get(zone);
- if (bd)
+ ec = e_illume_client_indicator_get(zone);
+ if (ec)
{
/* only dual-top mode can drag */
if ((cz->mode.dual == 1) && (cz->mode.side == 0))
{
/* only set locked if we need to */
- if (bd->client.illume.drag.locked != 0)
- ecore_x_e_illume_drag_locked_set(bd->client.win, 0);
+ if (ec->illume.drag.locked != 0)
+ ecore_x_e_illume_drag_locked_set(e_client_util_win_get(ec), 0);
}
else
{
/* only set locked if we need to */
- if (bd->client.illume.drag.locked != 1)
- ecore_x_e_illume_drag_locked_set(bd->client.win, 1);
+ if (ec->illume.drag.locked != 1)
+ ecore_x_e_illume_drag_locked_set(e_client_util_win_get(ec), 1);
}
}
#if 0 /* split home window? wtf?! go home! */
- if (!(homes = e_illume_border_home_borders_get(zone))) return;
+ if (!(homes = e_illume_client_home_borders_get(zone))) return;
count = eina_list_count(homes);
@@ -1228,11 +1205,11 @@ _policy_zone_mode_change(E_Zone *zone, Ecore_X_Atom mode)
/* if we went to single mode, delete any extra home windows */
if (count >= 2)
{
- E_Border *home;
+ E_Client *home;
/* try to get a home window on this zone and remove it */
- if ((home = e_illume_border_home_get(zone)))
- ecore_x_e_illume_home_del_send(home->client.win);
+ if ((home = e_illume_client_home_get(zone)))
+ ecore_x_e_illume_home_del_send(e_client_util_win_get(home));
}
}
#endif
@@ -1243,70 +1220,70 @@ _policy_zone_mode_change(E_Zone *zone, Ecore_X_Atom mode)
void
_policy_zone_close(E_Zone *zone)
{
- E_Border *bd;
+ E_Client *ec;
if (!zone) return;
- if (!(bd = e_border_focused_get())) return;
+ if (!(ec = e_client_focused_get())) return;
- if (bd->zone != zone) return;
+ if (ec->zone != zone) return;
/* close this border */
- e_border_act_close_begin(bd);
+ e_client_act_close_begin(ec);
}
void
-_policy_drag_start(E_Border *bd)
+_policy_drag_start(E_Client *ec)
{
- if (!bd) return;
+ if (!ec) return;
- if (bd->stolen) return;
+ if (ec->stolen) return;
- ecore_x_e_illume_drag_set(bd->client.win, 1);
- ecore_x_e_illume_drag_set(bd->zone->black_win, 1);
+ ecore_x_e_illume_drag_set(e_client_util_win_get(ec), 1);
+ ecore_x_e_illume_drag_set(ec->zone->black_win, 1);
}
void
-_policy_drag_end(E_Border *bd)
+_policy_drag_end(E_Client *ec)
{
// printf("Drag end\n");
- if (!bd) return;
+ if (!ec) return;
- if (bd->stolen) return;
+ if (ec->stolen) return;
/* set property on this border to say we are done dragging */
- ecore_x_e_illume_drag_set(bd->client.win, 0);
+ ecore_x_e_illume_drag_set(e_client_util_win_get(ec), 0);
/* set property on zone window that a drag is finished */
- ecore_x_e_illume_drag_set(bd->zone->black_win, 0);
+ ecore_x_e_illume_drag_set(ec->zone->black_win, 0);
}
void
_policy_focus_back(E_Zone *zone)
{
Eina_List *l, *fl = NULL;
- E_Border *bd, *fbd;
+ E_Client *ec, *fbd;
if (!zone) return;
if (eina_list_count(_pol_focus_stack) < 1) return;
// printf("Focus back\n");
- EINA_LIST_REVERSE_FOREACH(_pol_focus_stack, l, bd)
+ EINA_LIST_REVERSE_FOREACH(_pol_focus_stack, l, ec)
{
- if (bd->zone != zone) continue;
- fl = eina_list_append(fl, bd);
+ if (ec->zone != zone) continue;
+ fl = eina_list_append(fl, ec);
}
- if (!(fbd = e_border_focused_get())) return;
+ if (!(fbd = e_client_focused_get())) return;
if (fbd->parent) return;
- EINA_LIST_REVERSE_FOREACH(fl, l, bd)
+ EINA_LIST_REVERSE_FOREACH(fl, l, ec)
{
- if ((fbd) && (bd == fbd))
+ if ((fbd) && (ec == fbd))
{
- E_Border *b;
+ E_Client *b;
if ((l->next) && (b = l->next->data))
{
@@ -1331,27 +1308,27 @@ void
_policy_focus_forward(E_Zone *zone)
{
Eina_List *l, *fl = NULL;
- E_Border *bd, *fbd;
+ E_Client *ec, *fbd;
if (!zone) return;
if (eina_list_count(_pol_focus_stack) < 1) return;
// printf("Focus forward\n");
- EINA_LIST_FOREACH(_pol_focus_stack, l, bd)
+ EINA_LIST_FOREACH(_pol_focus_stack, l, ec)
{
- if (bd->zone != zone) continue;
- fl = eina_list_append(fl, bd);
+ if (ec->zone != zone) continue;
+ fl = eina_list_append(fl, ec);
}
- if (!(fbd = e_border_focused_get())) return;
+ if (!(fbd = e_client_focused_get())) return;
if (fbd->parent) return;
- EINA_LIST_FOREACH(fl, l, bd)
+ EINA_LIST_FOREACH(fl, l, ec)
{
- if ((fbd) && (bd == fbd))
+ if ((fbd) && (ec == fbd))
{
- E_Border *b;
+ E_Client *b;
if ((l->next) && (b = l->next->data))
{
@@ -1375,11 +1352,11 @@ _policy_focus_forward(E_Zone *zone)
void
_policy_focus_home(E_Zone *zone)
{
- E_Border *bd;
+ E_Client *ec;
if (!zone) return;
- if (!(bd = e_illume_border_home_get(zone))) return;
- _policy_border_set_focus(bd);
+ if (!(ec = e_illume_client_home_get(zone))) return;
+ _policy_border_set_focus(ec);
}
void
@@ -1387,43 +1364,43 @@ _policy_property_change(Ecore_X_Event_Window_Property *event)
{
if (event->atom == ECORE_X_ATOM_NET_WM_STATE)
{
- E_Border *bd, *ind;
+ E_Client *ec, *ind;
- if (!(bd = e_border_find_by_client_window(event->win))) return;
+ if (!(ec = e_pixmap_find_client(E_PIXMAP_TYPE_X, event->win))) return;
/* not interested in stolen or invisible borders */
- if ((bd->stolen) || (!bd->visible)) return;
+ if ((ec->stolen) || (!ec->visible)) return;
/* make sure the border has a name or class */
/* NB: this check is here because some E borders get State Changes
* but do not have a name/class associated with them. Not entirely sure
* which ones they are, but I would guess Managers, Containers, or Zones.
* At any rate, we're not interested in those types of borders */
- if ((!bd->client.icccm.name) || (!bd->client.icccm.class)) return;
+ if ((!ec->icccm.name) || (!ec->icccm.class)) return;
/* NB: If we have reached this point, then it should be a fullscreen
* border that has toggled fullscreen on/off */
/* try to get the Indicator on this zone */
- if (!(ind = e_illume_border_indicator_get(bd->zone))) return;
+ if (!(ind = e_illume_client_indicator_get(ec->zone))) return;
/* if we are fullscreen, hide the indicator...else we show it */
- /* NB: we could use the e_illume_border_is_fullscreen function here
+ /* NB: we could use the e_illume_client_is_fullscreen function here
* but we save ourselves a function call this way */
- if ((bd->fullscreen) || (bd->need_fullscreen))
+ if ((ec->fullscreen) || (ec->need_fullscreen))
{
if (ind->visible)
{
- e_illume_border_hide(ind);
- _policy_zone_layout_update(bd->zone);
+ e_illume_client_hide(ind);
+ _policy_zone_layout_update(ec->zone);
}
}
else
{
if (!ind->visible)
{
- e_illume_border_show(ind);
- _policy_zone_layout_update(bd->zone);
+ e_illume_client_show(ind);
+ _policy_zone_layout_update(ec->zone);
}
}
}
@@ -1431,52 +1408,54 @@ _policy_property_change(Ecore_X_Event_Window_Property *event)
{
Eina_List *l;
E_Zone *zone;
- E_Border *bd;
+ E_Client *ec;
int x, y, w, h;
if (!(zone = e_util_zone_window_find(event->win))) return;
- if (!(bd = e_illume_border_indicator_get(zone))) return;
- x = bd->x;
- y = bd->y;
- w = bd->w;
- h = bd->h;
+ if (!(ec = e_illume_client_indicator_get(zone))) return;
+ x = ec->x;
+ y = ec->y;
+ w = ec->w;
+ h = ec->h;
- EINA_LIST_FOREACH(e_border_client_list(), l, bd)
- {
- if (bd->zone != zone) continue;
- if (!e_illume_border_is_conformant(bd)) continue;
+ EINA_LIST_FOREACH(zone->comp->clients, l, ec)
+ {
+ if (e_client_util_ignored_get(ec)) continue;
+ if (ec->zone != zone) continue;
+ if (!e_illume_client_is_conformant(ec)) continue;
/* set indicator geometry on conformant window */
/* NB: This is needed so that conformant apps get told about
* the indicator size/position...else they have no way of
* knowing that the geometry has been updated */
- ecore_x_e_illume_indicator_geometry_set(bd->client.win, x, y, w, h);
+ ecore_x_e_illume_indicator_geometry_set(e_client_util_win_get(ec), x, y, w, h);
}
}
else if (event->atom == ECORE_X_ATOM_E_ILLUME_SOFTKEY_GEOMETRY)
{
Eina_List *l;
E_Zone *zone;
- E_Border *bd;
+ E_Client *ec;
int x, y, w, h;
if (!(zone = e_util_zone_window_find(event->win))) return;
- if (!(bd = e_illume_border_softkey_get(zone))) return;
- x = bd->x;
- y = bd->y;
- w = bd->w;
- h = bd->h;
+ if (!(ec = e_illume_client_softkey_get(zone))) return;
+ x = ec->x;
+ y = ec->y;
+ w = ec->w;
+ h = ec->h;
- EINA_LIST_FOREACH(e_border_client_list(), l, bd)
- {
- if (bd->zone != zone) continue;
- if (!e_illume_border_is_conformant(bd)) continue;
+ EINA_LIST_FOREACH(zone->comp->clients, l, ec)
+ {
+ if (e_client_util_ignored_get(ec)) continue;
+ if (ec->zone != zone) continue;
+ if (!e_illume_client_is_conformant(ec)) continue;
/* set softkey geometry on conformant window */
/* NB: This is needed so that conformant apps get told about
* the softkey size/position...else they have no way of
* knowing that the geometry has been updated */
- ecore_x_e_illume_softkey_geometry_set(bd->client.win, x, y, w, h);
+ ecore_x_e_illume_softkey_geometry_set(e_client_util_win_get(ec), x, y, w, h);
}
}
else if (event->atom == ECORE_X_ATOM_E_ILLUME_KEYBOARD_GEOMETRY)
@@ -1484,55 +1463,53 @@ _policy_property_change(Ecore_X_Event_Window_Property *event)
Eina_List *l;
E_Zone *zone;
E_Illume_Keyboard *kbd;
- E_Border *bd;
+ E_Client *ec;
int x, y, w, h;
if (!(zone = e_util_zone_window_find(event->win))) return;
if (!(kbd = e_illume_keyboard_get())) return;
- if (!kbd->border) return;
+ if (!kbd->client) return;
- x = kbd->border->x;
- w = kbd->border->w;
- h = kbd->border->h;
+ x = kbd->client->x;
+ w = kbd->client->w;
+ h = kbd->client->h;
/* adjust Y for keyboard visibility because keyboard uses fx_offset */
y = 0;
- if (kbd->border->cw &&
- (!e_util_strcmp(edje_object_part_state_get(kbd->border->cw->effect_obj, "mover", NULL), "custom")))
- y = kbd->border->y;
+#warning this is totally broken on so many levels
+ //if (kbd->client->frame &&
+ //(!e_util_strcmp(edje_object_part_state_get(kbd->client->cw->effect_obj, "mover", NULL), "custom")))
+ //y = kbd->client->y;
/* look for conformant borders */
- EINA_LIST_FOREACH(e_border_client_list(), l, bd)
- {
- if (bd->zone != zone) continue;
- if (!e_illume_border_is_conformant(bd)) continue;
+ EINA_LIST_FOREACH(zone->comp->clients, l, ec)
+ {
+ if (e_client_util_ignored_get(ec)) continue;
+ if (ec->zone != zone) continue;
+ if (!e_illume_client_is_conformant(ec)) continue;
/* set keyboard geometry on conformant window */
/* NB: This is needed so that conformant apps get told about
* the keyboard size/position...else they have no way of
* knowing that the geometry has been updated */
- ecore_x_e_illume_keyboard_geometry_set(bd->client.win, x, y, w, h);
+ ecore_x_e_illume_keyboard_geometry_set(e_client_util_win_get(ec), x, y, w, h);
}
}
else if (event->atom == ATM_ENLIGHTENMENT_SCALE)
{
- Eina_List *ml;
- E_Manager *man;
+ const Eina_List *l;
+ E_Comp *comp;
- EINA_LIST_FOREACH(e_manager_list(), ml, man)
- {
- Eina_List *cl;
- E_Container *con;
+
+ EINA_LIST_FOREACH(e_comp_list(), l, comp)
+ {
+ Eina_List *zl;
+ E_Zone *zone;
- if (event->win != man->root) continue;
- EINA_LIST_FOREACH(man->containers, cl, con)
- {
- Eina_List *zl;
- E_Zone *zone;
+ if (event->win != comp->man->root) continue;
- EINA_LIST_FOREACH(con->zones, zl, zone)
- _policy_zone_layout_update(zone);
- }
- }
+ EINA_LIST_FOREACH(comp->zones, zl, zone)
+ _policy_zone_layout_update(zone);
+ }
}
}
diff --git a/src/modules/illume2/policies/tablet/policy.h b/src/modules/illume2/policies/tablet/policy.h
index 39af6afb06..cabe4b502f 100644
--- a/src/modules/illume2/policies/tablet/policy.h
+++ b/src/modules/illume2/policies/tablet/policy.h
@@ -14,21 +14,21 @@
# define POL_APP_LAYER 100
# define POL_HOME_LAYER 90
-void _policy_border_add(E_Border *bd);
-void _policy_border_del(E_Border *bd);
-void _policy_border_focus_in(E_Border *bd);
-void _policy_border_focus_out(E_Border *bd);
-void _policy_border_activate(E_Border *bd);
-void _policy_border_post_fetch(E_Border *bd);
-void _policy_border_post_assign(E_Border *bd);
-void _policy_border_show(E_Border *bd);
-void _policy_border_hide(E_Border *bd);
+void _policy_border_add(E_Client *ec);
+void _policy_border_del(E_Client *ec);
+void _policy_border_focus_in(E_Client *ec);
+void _policy_border_focus_out(E_Client *ec);
+void _policy_border_activate(E_Client *ec);
+void _policy_border_post_fetch(E_Client *ec);
+void _policy_border_post_assign(E_Client *ec);
+void _policy_border_show(E_Client *ec);
+void _policy_border_hide(E_Client *ec);
void _policy_zone_layout(E_Zone *zone);
void _policy_zone_move_resize(E_Zone *zone);
void _policy_zone_mode_change(E_Zone *zone, Ecore_X_Atom mode);
void _policy_zone_close(E_Zone *zone);
-void _policy_drag_start(E_Border *bd);
-void _policy_drag_end(E_Border *bd);
+void _policy_drag_start(E_Client *ec);
+void _policy_drag_end(E_Client *ec);
void _policy_focus_back(E_Zone *zone);
void _policy_focus_forward(E_Zone *zone);
void _policy_focus_home(E_Zone *zone);
diff --git a/src/modules/layout/e_mod_main.c b/src/modules/layout/e_mod_main.c
index d5320a28af..7dfe002294 100644
--- a/src/modules/layout/e_mod_main.c
+++ b/src/modules/layout/e_mod_main.c
@@ -15,10 +15,10 @@
/* actual module specifics */
static E_Module *layout_module = NULL;
-static E_Border_Hook *hook = NULL;
+static E_Client_Hook *hook = NULL;
static void
-_e_module_layout_cb_hook(void *data, E_Border *bd)
+_e_module_layout_cb_hook(void *data, E_Client *ec)
{
/* FIXME: make some modification based on policy */
printf("Window:\n"
@@ -26,33 +26,33 @@ _e_module_layout_cb_hook(void *data, E_Border *bd)
" Class: %s::%s\n"
" Geometry: %ix%i+%i+%i\n"
" New: %i\n"
- , bd->client.icccm.title, bd->client.netwm.name
- , bd->client.icccm.name, bd->client.icccm.class
+ , bd->icccm.title, bd->netwm.name
+ , bd->icccm.name, bd->icccm.class
, bd->x, bd->y, bd->w, bd->h
, bd->new_client
);
- if ((bd->client.icccm.transient_for != 0) ||
- (bd->client.netwm.type == ECORE_X_WINDOW_TYPE_DIALOG))
+ if ((bd->icccm.transient_for != 0) ||
+ (bd->netwm.type == ECORE_X_WINDOW_TYPE_DIALOG))
{
bd->client.e.state.centered = 1;
}
else
{
- e_border_unmaximize(bd, E_MAXIMIZE_BOTH);
- e_border_resize(bd, 1, 1);
- e_border_center(bd);
+ e_client_unmaximize(bd, E_MAXIMIZE_BOTH);
+ e_client_resize(bd, 1, 1);
+ e_client_center(bd);
if (bd->bordername) eina_stringshare_del(bd->bordername);
bd->bordername = eina_stringshare_add("borderless");
- bd->client.icccm.base_w = 1;
- bd->client.icccm.base_h = 1;
- bd->client.icccm.min_w = 1;
- bd->client.icccm.min_h = 1;
- bd->client.icccm.max_w = 32767;
- bd->client.icccm.max_h = 32767;
- bd->client.icccm.min_aspect = 0.0;
- bd->client.icccm.max_aspect = 0.0;
+ bd->icccm.base_w = 1;
+ bd->icccm.base_h = 1;
+ bd->icccm.min_w = 1;
+ bd->icccm.min_h = 1;
+ bd->icccm.max_w = 32767;
+ bd->icccm.max_h = 32767;
+ bd->icccm.min_aspect = 0.0;
+ bd->icccm.max_aspect = 0.0;
}
- e_border_maximize(bd, E_MAXIMIZE_FILL | E_MAXIMIZE_BOTH);
+ e_client_maximize(bd, E_MAXIMIZE_FILL | E_MAXIMIZE_BOTH);
}
/**/
@@ -78,7 +78,7 @@ e_modapi_init(E_Module *m)
{
layout_module = m;
- hook = e_border_hook_add(E_BORDER_HOOK_EVAL_POST_FETCH,
+ hook = e_client_hook_add(E_CLIENT_HOOK_EVAL_POST_FETCH,
_e_module_layout_cb_hook, NULL);
return m;
}
@@ -88,7 +88,7 @@ e_modapi_shutdown(E_Module *m)
{
if (hook)
{
- e_border_hook_del(hook);
+ e_client_hook_del(hook);
hook = NULL;
}
layout_module = NULL;
diff --git a/src/modules/mixer/app_mixer.c b/src/modules/mixer/app_mixer.c
index dd4f8cea96..05f09c3303 100644
--- a/src/modules/mixer/app_mixer.c
+++ b/src/modules/mixer/app_mixer.c
@@ -473,12 +473,12 @@ _cb_dialog_dismiss(void *data, E_Dialog *dialog)
}
E_Dialog *
-e_mixer_app_dialog_new(E_Container *con, void (*func)(E_Dialog *dialog, void *data), void *data)
+e_mixer_app_dialog_new(E_Comp *comp, void (*func)(E_Dialog *dialog, void *data), void *data)
{
E_Mixer_App_Dialog_Data *app;
E_Dialog *dialog;
- dialog = e_dialog_new(con, _e_mixer_Name, "e_mixer_app_dialog");
+ dialog = e_dialog_new(comp, _e_mixer_Name, "e_mixer_app_dialog");
if (!dialog)
return NULL;
diff --git a/src/modules/mixer/conf_gadget.c b/src/modules/mixer/conf_gadget.c
index 0a53c8c2b8..28ef0c43a2 100644
--- a/src/modules/mixer/conf_gadget.c
+++ b/src/modules/mixer/conf_gadget.c
@@ -367,7 +367,7 @@ e_mixer_config_pulse_toggle(void)
}
E_Config_Dialog *
-e_mixer_config_dialog_new(E_Container *con, E_Mixer_Gadget_Config *conf)
+e_mixer_config_dialog_new(E_Comp *comp, E_Mixer_Gadget_Config *conf)
{
E_Config_Dialog *dialog;
E_Config_Dialog_View *view;
@@ -384,7 +384,7 @@ e_mixer_config_dialog_new(E_Container *con, E_Mixer_Gadget_Config *conf)
view->basic.create_widgets = _basic_create;
view->basic.apply_cfdata = _basic_apply;
- dialog = e_config_dialog_new(con, _("Mixer Settings"),
+ dialog = e_config_dialog_new(comp, _("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 9915e2e897..8c44b372c4 100644
--- a/src/modules/mixer/conf_module.c
+++ b/src/modules/mixer/conf_module.c
@@ -138,7 +138,6 @@ static void
cb_mixer_call(void *data, void *data2 __UNUSED__)
{
E_Mixer_Module_Context *ctxt = data;
- E_Container *con;
if (ctxt->mixer_dialog)
{
@@ -146,8 +145,7 @@ cb_mixer_call(void *data, void *data2 __UNUSED__)
return;
}
- con = e_container_current_get(e_manager_current_get());
- ctxt->mixer_dialog = e_mixer_app_dialog_new(con, cb_mixer_app_del, ctxt);
+ ctxt->mixer_dialog = e_mixer_app_dialog_new(NULL, cb_mixer_app_del, ctxt);
}
static void
@@ -173,7 +171,7 @@ _basic_create(E_Config_Dialog *dialog, Evas *evas, E_Config_Dialog_Data *cfdata)
}
E_Config_Dialog *
-e_mixer_config_module_dialog_new(E_Container *con, E_Mixer_Module_Context *ctxt)
+e_mixer_config_module_dialog_new(E_Comp *comp, E_Mixer_Module_Context *ctxt)
{
E_Config_Dialog *dialog;
E_Config_Dialog_View *view;
@@ -190,7 +188,7 @@ e_mixer_config_module_dialog_new(E_Container *con, E_Mixer_Module_Context *ctxt)
view->basic.create_widgets = _basic_create;
view->basic.apply_cfdata = _basic_apply;
- dialog = e_config_dialog_new(con, _("Mixer Module Settings"),
+ dialog = e_config_dialog_new(comp, _("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 48699585f6..40bb351b0a 100644
--- a/src/modules/mixer/e_mod_main.c
+++ b/src/modules/mixer/e_mod_main.c
@@ -367,7 +367,7 @@ _mixer_popup_cb_mute_change(void *data, Evas_Object *obj, void *event __UNUSED__
static Evas_Object *
_mixer_popup_add_slider(E_Mixer_Instance *inst, int value, void (*cb)(void *data, Evas_Object *obj, void *event_info))
{
- Evas_Object *slider = e_slider_add(inst->popup->win->evas);
+ Evas_Object *slider = e_slider_add(e_comp_get(inst->popup)->evas);
evas_object_show(slider);
e_slider_orientation_set(slider, 0);
e_slider_value_set(slider, value);
@@ -451,17 +451,14 @@ _mixer_popup_key_down_cb(void *data, Ecore_Event_Key *ev)
static void
_mixer_popup_del(E_Mixer_Instance *inst)
{
- e_object_del(E_OBJECT(inst->popup));
inst->ui.label = NULL;
inst->ui.left = NULL;
inst->ui.right = NULL;
inst->ui.mute = NULL;
inst->ui.table = NULL;
inst->ui.button = NULL;
- inst->popup = NULL;
- if (inst->popup_timer)
- ecore_timer_del(inst->popup_timer);
- inst->popup_timer = NULL;
+ E_FREE_FUNC(inst->popup, e_object_del);
+ E_FREE_FUNC(inst->popup_timer, ecore_timer_del);
}
static void
@@ -471,6 +468,14 @@ _mixer_popup_del_cb(void *obj)
}
static void
+_mixer_popup_comp_del_cb(void *data, Evas_Object *obj EINA_UNUSED)
+{
+ E_Mixer_Instance *inst = data;
+
+ E_FREE_FUNC(inst->popup, e_object_del);
+}
+
+static void
_mixer_app_select_current(E_Dialog *dialog, E_Mixer_Instance *inst)
{
E_Mixer_Gadget_Config *conf = inst->conf;
@@ -483,7 +488,6 @@ _mixer_popup_cb_mixer(void *data, void *data2 __UNUSED__)
{
E_Mixer_Instance *inst = data;
E_Mixer_Module_Context *ctxt;
- E_Container *con;
_mixer_popup_del(inst);
@@ -496,8 +500,7 @@ _mixer_popup_cb_mixer(void *data, void *data2 __UNUSED__)
return;
}
- con = e_container_current_get(e_manager_current_get());
- ctxt->mixer_dialog = e_mixer_app_dialog_new(con, _mixer_app_cb_del, ctxt);
+ ctxt->mixer_dialog = e_mixer_app_dialog_new(NULL, _mixer_app_cb_del, ctxt);
_mixer_app_select_current(ctxt->mixer_dialog, inst);
}
@@ -524,8 +527,8 @@ _mixer_popup_new(E_Mixer_Instance *inst)
else
colspan = 2;
- inst->popup = e_gadcon_popup_new(inst->gcc);
- evas = inst->popup->win->evas;
+ inst->popup = e_gadcon_popup_new(inst->gcc, 0);
+ evas = e_comp_get(inst->gcc)->evas;
inst->ui.table = e_widget_table_add(evas, 0);
@@ -587,7 +590,8 @@ _mixer_popup_new(E_Mixer_Instance *inst)
e_widget_size_min_set(inst->ui.table, mw, mh);
e_gadcon_popup_content_set(inst->popup, inst->ui.table);
- e_popup_autoclose(inst->popup->win, NULL, _mixer_popup_key_down_cb, inst);
+ e_comp_object_util_autoclose(inst->popup->comp_object,
+ _mixer_popup_comp_del_cb, _mixer_popup_key_down_cb, inst);
e_gadcon_popup_show(inst->popup);
e_object_data_set(E_OBJECT(inst->popup), inst);
E_OBJECT_DEL_SET(inst->popup, _mixer_popup_del_cb);
@@ -628,12 +632,10 @@ static void
_mixer_menu_cb_cfg(void *data, E_Menu *menu __UNUSED__, E_Menu_Item *mi __UNUSED__)
{
E_Mixer_Instance *inst = data;
- E_Container *con;
if (inst->popup)
_mixer_popup_del(inst);
- con = e_container_current_get(e_manager_current_get());
- inst->conf->dialog = e_mixer_config_dialog_new(con, inst->conf);
+ inst->conf->dialog = e_mixer_config_dialog_new(NULL, inst->conf);
}
static void
@@ -1146,7 +1148,7 @@ _mixer_cb_volume_mute(E_Object *obj __UNUSED__, const char *params __UNUSED__)
}
static E_Config_Dialog *
-_mixer_module_config(E_Container *con, const char *params __UNUSED__)
+_mixer_module_config(E_Comp *comp, const char *params __UNUSED__)
{
E_Mixer_Module_Context *ctxt;
@@ -1167,7 +1169,7 @@ _mixer_module_config(E_Container *con, const char *params __UNUSED__)
return NULL;
}
- ctxt->conf_dialog = e_mixer_config_module_dialog_new(con, ctxt);
+ ctxt->conf_dialog = e_mixer_config_module_dialog_new(comp, ctxt);
return ctxt->conf_dialog;
}
diff --git a/src/modules/mixer/e_mod_main.h b/src/modules/mixer/e_mod_main.h
index d92633caa8..063bf6665c 100644
--- a/src/modules/mixer/e_mod_main.h
+++ b/src/modules/mixer/e_mod_main.h
@@ -85,9 +85,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_Container *con, E_Mixer_Module_Context *ctxt);
-E_Config_Dialog *e_mixer_config_dialog_new(E_Container *con, E_Mixer_Gadget_Config *conf);
-E_Dialog *e_mixer_app_dialog_new(E_Container *con, void (*func)(E_Dialog *dialog, void *data), void *data);
+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);
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/msgbus/msgbus_desktop.c b/src/modules/msgbus/msgbus_desktop.c
index 34999dac85..7d3d36316e 100644
--- a/src/modules/msgbus/msgbus_desktop.c
+++ b/src/modules/msgbus/msgbus_desktop.c
@@ -100,20 +100,20 @@ static Eldbus_Message *
cb_desktop_bgadd(const Eldbus_Service_Interface *iface __UNUSED__,
const Eldbus_Message *msg)
{
- int container, zone, desk_x, desk_y;
+ int manager, zone, desk_x, desk_y;
const char *path;
Eldbus_Message *reply = eldbus_message_method_return_new(msg);
- if (!eldbus_message_arguments_get(msg, "iiiis", &container, &zone, &desk_x,
+ if (!eldbus_message_arguments_get(msg, "iiiis", &manager, &zone, &desk_x,
&desk_y, &path))
{
ERR("could not get Add arguments");
return reply;
}
- DBG("add bg container=%d, zone=%d, pos=%d,%d path=%s",
- container, zone, desk_x, desk_y, path);
- e_bg_add(container, zone, desk_x, desk_y, path);
+ DBG("add bg manager=%d, zone=%d, pos=%d,%d path=%s",
+ manager, zone, desk_x, desk_y, path);
+ e_bg_add(manager, zone, desk_x, desk_y, path);
e_bg_update();
e_config_save_queue();
@@ -124,19 +124,19 @@ static Eldbus_Message *
cb_desktop_bgdel(const Eldbus_Service_Interface *iface __UNUSED__,
const Eldbus_Message *msg)
{
- int container, zone, desk_x, desk_y;
+ int manager, zone, desk_x, desk_y;
Eldbus_Message *reply = eldbus_message_method_return_new(msg);
- if (!eldbus_message_arguments_get(msg, "iiii", &container, &zone, &desk_x,
+ if (!eldbus_message_arguments_get(msg, "iiii", &manager, &zone, &desk_x,
&desk_y))
{
ERR("could not get Del arguments");
return reply;
}
- DBG("del bg container=%d, zone=%d, pos=%d,%d",
- container, zone, desk_x, desk_y);
- e_bg_del(container, zone, desk_x, desk_y);
+ DBG("del bg manager=%d, zone=%d, pos=%d,%d",
+ manager, zone, desk_x, desk_y);
+ e_bg_del(manager, zone, desk_x, desk_y);
e_bg_update();
e_config_save_queue();
@@ -170,11 +170,11 @@ cb_desktop_bglist(const Eldbus_Service_Interface *iface __UNUSED__,
{
continue;
}
- DBG("Background container=%d zone=%d pos=%d,%d path=%s",
- bg->container, bg->zone, bg->desk_x, bg->desk_y, bg->file);
+ DBG("Background manager=%d zone=%d pos=%d,%d path=%s",
+ bg->manager, bg->zone, bg->desk_x, bg->desk_y, bg->file);
eldbus_message_iter_arguments_append(array, "(iiiis)", &s);
if (!s) continue;
- eldbus_message_iter_arguments_append(s, "iiiis", bg->container, bg->zone,
+ eldbus_message_iter_arguments_append(s, "iiiis", bg->manager, bg->zone,
bg->desk_x, bg->desk_y, bg->file);
eldbus_message_iter_container_close(array, s);
}
@@ -197,9 +197,9 @@ static const Eldbus_Method desktop_methods[] = {
static const Eldbus_Method background_methods[] = {
{ "Add",
- ELDBUS_ARGS({"i", "container"}, {"i", "zone"}, {"i", "desk_x"}, {"i", "desk_y"}, {"s", "path"}),
+ ELDBUS_ARGS({"i", "manager"}, {"i", "zone"}, {"i", "desk_x"}, {"i", "desk_y"}, {"s", "path"}),
NULL, cb_desktop_bgadd },
- { "Del", ELDBUS_ARGS({"i", "container"}, {"i", "zone"}, {"i", "desk_x"}, {"i", "desk_y"}),
+ { "Del", ELDBUS_ARGS({"i", "manager"}, {"i", "zone"}, {"i", "desk_x"}, {"i", "desk_y"}),
NULL, cb_desktop_bgdel },
{ "List", ELDBUS_ARGS({"a(iiiis)", "array_of_bg"}), NULL, cb_desktop_bglist },
{ }
diff --git a/src/modules/music-control/ui.c b/src/modules/music-control/ui.c
index 00bf2a76e6..38dc84a6cf 100644
--- a/src/modules/music-control/ui.c
+++ b/src/modules/music-control/ui.c
@@ -50,7 +50,7 @@ _metadata_update(E_Music_Control_Instance *inst)
img = edje_object_part_swallow_get(inst->content_popup, "cover_swallow");
if (img)
{
- e_popup_object_remove(inst->popup->win, img);
+ e_comp_object_util_del_list_remove(inst->popup->comp_object, img);
evas_object_del(img);
}
if (inst->ctxt->meta_cover)
@@ -58,7 +58,7 @@ _metadata_update(E_Music_Control_Instance *inst)
img = evas_object_image_filled_add(evas_object_evas_get(inst->content_popup));
evas_object_image_file_set(img, inst->ctxt->meta_cover, NULL);
edje_object_part_swallow(inst->content_popup, "cover_swallow", img);
- e_popup_object_add(inst->popup->win, img);
+ e_comp_object_util_del_list_append(inst->popup->comp_object, img);
}
}
@@ -110,9 +110,9 @@ static void
_popup_new(E_Music_Control_Instance *inst)
{
Evas_Object *o;
- inst->popup = e_gadcon_popup_new(inst->gcc);
+ inst->popup = e_gadcon_popup_new(inst->gcc, 0);
- o = edje_object_add(inst->popup->win->evas);
+ o = edje_object_add(e_comp_get(inst->gcc)->evas);
e_theme_edje_object_set(o, "base/theme/modules/music-control",
"modules/music-control/popup");
edje_object_signal_callback_add(o, "btn,clicked", "*", _btn_clicked, inst);
@@ -124,7 +124,7 @@ _popup_new(E_Music_Control_Instance *inst)
_player_name_update(inst);
_play_state_update(inst, EINA_TRUE);
_metadata_update(inst);
- e_popup_autoclose(inst->popup->win, NULL, NULL, NULL);
+ e_comp_object_util_autoclose(inst->popup->comp_object, NULL, NULL, NULL);
e_gadcon_popup_show(inst->popup);
e_object_data_set(E_OBJECT(inst->popup), inst);
E_OBJECT_DEL_SET(inst->popup, _popup_del_cb);
@@ -237,7 +237,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->container, _("Music control Settings"), "E",
+ e_config_dialog_new(m->zone->comp, _("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 97c05306e5..7270cb1e06 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_Container *con,
+e_int_config_notification_module(E_Comp *comp,
const char *params __UNUSED__)
{
E_Config_Dialog *cfd = NULL;
@@ -48,7 +48,7 @@ e_int_config_notification_module(E_Container *con,
v->basic.check_changed = _basic_check_changed;
snprintf(buf, sizeof(buf), "%s/e-module-notification.edj", notification_mod->dir);
- cfd = e_config_dialog_new(con, _("Notification Settings"), "Notification",
+ cfd = e_config_dialog_new(comp, _("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 fe06ef3c6a..c25c37bd29 100644
--- a/src/modules/notification/e_mod_main.h
+++ b/src/modules/notification/e_mod_main.h
@@ -60,7 +60,7 @@ struct _Popup_Data
{
unsigned id;
E_Notification_Notify *notif;
- E_Popup *win;
+ Evas_Object *win;
Eina_List *mirrors;
Evas *e;
Evas_Object *theme;
@@ -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_Container *con, const char *params);
+E_Config_Dialog *e_int_config_notification_module(E_Comp *comp, const char *params);
extern E_Module *notification_mod;
extern Config *notification_cfg;
diff --git a/src/modules/notification/e_mod_popup.c b/src/modules/notification/e_mod_popup.c
index b78edd2d5e..f22f3b2e73 100644
--- a/src/modules/notification/e_mod_popup.c
+++ b/src/modules/notification/e_mod_popup.c
@@ -74,11 +74,7 @@ notification_popup_notify(E_Notification_Notify *n,
edje_object_signal_emit(popup->theme, "notification,new", "notification");
}
- if (popup->timer)
- {
- ecore_timer_del(popup->timer);
- popup->timer = NULL;
- }
+ E_FREE_FUNC(popup->timer, ecore_timer_del);
if (n->timeout < 0 || notification_cfg->force_timeout)
n->timeout = notification_cfg->timeout;
@@ -129,31 +125,37 @@ _notification_theme_cb_find(Popup_Data *popup,
const char *emission __UNUSED__,
const char *source __UNUSED__)
{
- Eina_List *l;
- E_Border *bd;
+ const Eina_List *l, *ll;
+ E_Client *ec;
+ E_Comp *comp;
if (!popup->app_name) return;
- EINA_LIST_FOREACH(e_border_client_list(), l, bd)
- {
- size_t len, test;
-
- len = strlen(popup->app_name);
- test = eina_strlen_bounded(bd->client.icccm.name, len + 1);
-
- /* We can't be sure that the app_name really match the application name.
- * Some plugin put their name instead. But this search gives some good
- * results.
- */
- if (strncasecmp(bd->client.icccm.name, popup->app_name, (test < len) ? test : len))
- continue;
-
- e_desk_show(bd->desk);
- e_border_show(bd);
- e_border_raise(bd);
- e_border_focus_set_with_pointer(bd);
- break;
- }
+ EINA_LIST_FOREACH(e_comp_list(), l, comp)
+ EINA_LIST_FOREACH(comp->clients, ll, ec)
+ {
+ size_t len, test;
+ const char *name;
+
+ if (e_client_util_ignored_get(ec)) continue;
+ len = strlen(popup->app_name);
+ name = e_client_name_get(ec);
+ if (!name) continue;
+ test = eina_strlen_bounded(name, len + 1);
+
+ /* We can't be sure that the app_name really match the application name.
+ * Some plugin put their name instead. But this search gives some good
+ * results.
+ */
+ if (strncasecmp(name, popup->app_name, (test < len) ? test : len))
+ continue;
+
+ e_desk_show(ec->desk);
+ evas_object_show(ec->frame);
+ evas_object_raise(ec->frame);
+ e_client_focus_set_with_pointer(ec);
+ break;
+ }
}
static void
@@ -179,9 +181,9 @@ _notification_popup_place_coords_get(int zw, int zh, int ow, int oh, int pos, in
}
static void
-_notification_popup_del_cb(void *obj)
+_notification_popup_del_cb(void *data, Evas *e EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *event_info EINA_UNUSED)
{
- Popup_Data *popup = e_object_data_get(obj);
+ Popup_Data *popup = data;
popup->win = NULL;
}
@@ -189,20 +191,18 @@ _notification_popup_del_cb(void *obj)
static Popup_Data *
_notification_popup_new(E_Notification_Notify *n, unsigned id)
{
- E_Container *con;
+ E_Comp *comp;
Popup_Data *popup;
char buf[PATH_MAX];
Eina_List *l;
int pos = next_pos;
- E_Manager *man;
E_Zone *zone = NULL;
switch (notification_cfg->dual_screen)
{
case POPUP_DISPLAY_POLICY_FIRST:
- man = eina_list_data_get(e_manager_list());
- con = eina_list_data_get(man->containers);
- zone = eina_list_data_get(con->zones);
+ comp = e_comp_get(NULL);
+ zone = eina_list_data_get(comp->zones);
break;
case POPUP_DISPLAY_POLICY_CURRENT:
case POPUP_DISPLAY_POLICY_ALL:
@@ -211,9 +211,9 @@ _notification_popup_new(E_Notification_Notify *n, unsigned id)
case POPUP_DISPLAY_POLICY_MULTI:
if ((notification_cfg->corner == CORNER_BR) ||
(notification_cfg->corner == CORNER_TR))
- zone = eina_list_last_data_get(e_util_container_current_get()->zones);
+ zone = eina_list_last_data_get(e_util_comp_current_get()->zones);
else
- zone = eina_list_data_get(e_util_container_current_get()->zones);
+ zone = eina_list_data_get(e_util_comp_current_get()->zones);
break;
}
@@ -225,18 +225,13 @@ _notification_popup_new(E_Notification_Notify *n, unsigned id)
EINA_SAFETY_ON_NULL_RETURN_VAL(popup, NULL);
popup->notif = n;
popup->id = id;
- /* Create the popup window */
- popup->win = e_popup_new(zone, 0, 0, 0, 0);
- E_OBJECT_DEL_SET(popup->win, _notification_popup_del_cb);
- e_object_data_set(E_OBJECT(popup->win), popup);
- e_popup_name_set(popup->win, "_e_popup_notification");
- popup->e = popup->win->evas;
+ popup->e = e_comp_get(zone)->evas;
/* Setup the theme */
snprintf(buf, sizeof(buf), "%s/e-module-notification.edj",
notification_mod->dir);
popup->theme = edje_object_add(popup->e);
- evas_object_name_set(popup->theme, "notification");
+ evas_object_name_set(popup->theme, "noshadow_notification");
if (!e_theme_edje_object_set(popup->theme,
"base/theme/modules/notification",
@@ -246,9 +241,11 @@ _notification_popup_new(E_Notification_Notify *n, unsigned id)
"modules/notification/main"))
edje_object_file_set(popup->theme, buf, "modules/notification/main");
- e_popup_content_set(popup->win, popup->theme);
+ /* Create the popup window */
+ popup->win = e_comp_object_util_add(popup->theme, E_COMP_OBJECT_TYPE_POPUP);
+ evas_object_layer_set(popup->win, E_LAYER_POPUP);
+ evas_object_event_callback_add(popup->win, EVAS_CALLBACK_DEL, _notification_popup_del_cb, popup);
- evas_object_show(popup->theme);
edje_object_signal_callback_add
(popup->theme, "notification,deleted", "theme",
(Edje_Signal_Cb)_notification_theme_cb_deleted, popup);
@@ -261,20 +258,22 @@ _notification_popup_new(E_Notification_Notify *n, unsigned id)
_notification_popup_refresh(popup);
next_pos = _notification_popup_place(popup, next_pos);
- e_popup_show(popup->win);
+ evas_object_show(popup->win);
if (notification_cfg->dual_screen == POPUP_DISPLAY_POLICY_ALL)
{
- EINA_LIST_FOREACH(popup->win->zone->container->zones, l, zone)
+ EINA_LIST_FOREACH(e_comp_evas_find(evas_object_evas_get(popup->win))->zones, l, zone)
{
Evas_Object *o;
- int x, y;
+ int x, y, w, h;
- if (zone == popup->win->zone) continue;
- o = e_comp_win_image_mirror_add(popup->win->cw);
+ if (zone == e_comp_object_util_zone_get(popup->win)) continue;
+ o = e_comp_object_util_mirror_add(popup->win);
evas_object_name_set(o, "notification_mirror");
evas_object_data_set(o, "zone", zone);
- evas_object_resize(o, popup->win->w, popup->win->h);
- _notification_popup_place_coords_get(zone->w, zone->h, popup->win->w, popup->win->h, pos, &x, &y);
+ evas_object_geometry_get(popup->win, NULL, NULL, &w, &h);
+ evas_object_resize(o, w, h);
+ evas_object_layer_set(o, E_LAYER_POPUP);
+ _notification_popup_place_coords_get(zone->w, zone->h, w, h, pos, &x, &y);
evas_object_move(o, zone->x + x, zone->y + y);
evas_object_show(o);
popup->mirrors = eina_list_append(popup->mirrors, o);
@@ -286,23 +285,25 @@ _notification_popup_new(E_Notification_Notify *n, unsigned id)
}
static int
-_notification_popup_place(Popup_Data *popup,
- int pos)
+_notification_popup_place(Popup_Data *popup, int pos)
{
- int x, y;
+ int x, y, w, h;
Eina_List *l;
Evas_Object *o;
+ E_Zone *zone;
if (!popup->win) return pos;
- _notification_popup_place_coords_get(popup->win->zone->w, popup->win->zone->h, popup->win->w, popup->win->h, pos, &x, &y);
- e_popup_move(popup->win, x, y);
+ evas_object_geometry_get(popup->win, NULL, NULL, &w, &h);
+ zone = e_comp_object_util_zone_get(popup->win);
+ _notification_popup_place_coords_get(zone->w, zone->h, w, h, pos, &x, &y);
+ evas_object_move(popup->win, x, y);
EINA_LIST_FOREACH(popup->mirrors, l, o)
{
- E_Zone *zone = evas_object_data_get(o, "zone");
- _notification_popup_place_coords_get(zone->w, zone->h, popup->win->w, popup->win->h, pos, &x, &y);
+ zone = evas_object_data_get(o, "zone");
+ _notification_popup_place_coords_get(zone->w, zone->h, w, h, pos, &x, &y);
evas_object_move(o, zone->x + x, zone->y + y);
}
- return pos + popup->win->h + 10;
+ return pos + h + 10;
}
static void
@@ -311,6 +312,7 @@ _notification_popup_refresh(Popup_Data *popup)
const char *icon_path;
const char *app_icon_max;
int w, h, width = 80, height = 80;
+ E_Zone *zone;
if (!popup) return;
@@ -318,9 +320,8 @@ _notification_popup_refresh(Popup_Data *popup)
if (popup->app_icon)
{
- e_popup_object_remove(popup->win, popup->app_icon);
- evas_object_del(popup->app_icon);
- popup->app_icon = NULL;
+ e_comp_object_util_del_list_remove(popup->win, popup->app_icon);
+ E_FREE_FUNC(popup->app_icon, evas_object_del);
}
app_icon_max = edje_object_data_get(popup->theme, "app_icon_max");
@@ -420,7 +421,7 @@ _notification_popup_refresh(Popup_Data *popup)
h = height;
}
- e_popup_object_add(popup->win, popup->app_icon);
+ e_comp_object_util_del_list_append(popup->win, popup->app_icon);
if ((w > width) || (h > height))
{
int v;
@@ -441,9 +442,10 @@ _notification_popup_refresh(Popup_Data *popup)
/* Compute the new size of the popup */
edje_object_calc_force(popup->theme);
edje_object_size_min_calc(popup->theme, &w, &h);
- w = MIN(w, popup->win->zone->w / 2);
- h = MIN(h, popup->win->zone->h / 2);
- e_popup_resize(popup->win, w, h);
+ zone = e_comp_object_util_zone_get(popup->win);
+ w = MIN(w, zone->w / 2);
+ h = MIN(h, zone->h / 2);
+ evas_object_resize(popup->win, w, h);
}
static Popup_Data *
@@ -505,7 +507,11 @@ _notification_popdown(Popup_Data *popup,
{
E_FREE_FUNC(popup->timer, ecore_timer_del);
popup->mirrors = eina_list_free(popup->mirrors);
- if (popup->win) e_object_del(E_OBJECT(popup->win));
+ if (popup->win)
+ {
+ evas_object_hide(popup->win);
+ evas_object_del(popup->win);
+ }
if (popup->notif)
{
e_notification_notify_close(popup->notif, reason);
diff --git a/src/modules/pager/e_mod_config.c b/src/modules/pager/e_mod_config.c
index 8c974d8d2c..895c02af1a 100644
--- a/src/modules/pager/e_mod_config.c
+++ b/src/modules/pager/e_mod_config.c
@@ -55,7 +55,7 @@ _config_pager_module(Config_Item *ci)
{
E_Config_Dialog *cfd;
E_Config_Dialog_View *v;
- E_Container *con;
+ E_Comp *comp;
char buff[PATH_MAX];
v = E_NEW(E_Config_Dialog_View, 1);
@@ -72,8 +72,8 @@ _config_pager_module(Config_Item *ci)
snprintf(buff, sizeof(buff), "%s/e-module-pager.edj",
pager_config->module->dir);
- con = e_container_current_get(e_manager_current_get());
- cfd = e_config_dialog_new(con, _("Pager Settings"), "E",
+ comp = e_comp_get(NULL);
+ cfd = e_config_dialog_new(comp, _("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 f69b11e75d..616ebe840b 100644
--- a/src/modules/pager/e_mod_main.c
+++ b/src/modules/pager/e_mod_main.c
@@ -73,7 +73,7 @@ struct _Pager_Desk
struct _Pager_Win
{
- E_Border *border;
+ E_Client *client;
Pager_Desk *desk;
Evas_Object *o_window;
Evas_Object *o_icon;
@@ -90,7 +90,7 @@ struct _Pager_Win
struct _Pager_Popup
{
- E_Popup *popup;
+ Evas_Object *popup;
Pager *pager;
Evas_Object *o_bg;
Ecore_Timer *timer;
@@ -104,25 +104,25 @@ static void _pager_inst_cb_menu_configure(void *data __UNUSED__, E_M
static void _pager_inst_cb_menu_virtual_desktops_dialog(void *data, E_Menu *m __UNUSED__, E_Menu_Item *mi __UNUSED__);
static void _pager_instance_drop_zone_recalc(Instance *inst);
static Eina_Bool _pager_cb_event_bg_update(void *data __UNUSED__, int type __UNUSED__, void *event);
-static Eina_Bool _pager_cb_event_border_resize(void *data __UNUSED__, int type __UNUSED__, void *event);
-static Eina_Bool _pager_cb_event_border_move(void *data __UNUSED__, int type __UNUSED__, void *event);
-static Eina_Bool _pager_cb_event_border_add(void *data __UNUSED__, int type __UNUSED__, void *event);
-static Eina_Bool _pager_cb_event_border_remove(void *data __UNUSED__, int type __UNUSED__, void *event);
-static Eina_Bool _pager_cb_event_border_iconify(void *data __UNUSED__, int type __UNUSED__, void *event);
-static Eina_Bool _pager_cb_event_border_uniconify(void *data __UNUSED__, int type __UNUSED__, void *event);
-static Eina_Bool _pager_cb_event_border_stick(void *data __UNUSED__, int type __UNUSED__, void *event);
-static Eina_Bool _pager_cb_event_border_unstick(void *data __UNUSED__, int type __UNUSED__, void *event);
-static Eina_Bool _pager_cb_event_border_desk_set(void *data __UNUSED__, int type __UNUSED__, void *event);
-static Eina_Bool _pager_cb_event_border_stack(void *data __UNUSED__, int type __UNUSED__, void *event);
-static Eina_Bool _pager_cb_event_border_icon_change(void *data __UNUSED__, int type __UNUSED__, void *event);
-static Eina_Bool _pager_cb_event_border_urgent_change(void *data __UNUSED__, int type __UNUSED__, void *event);
-static Eina_Bool _pager_cb_event_border_focus_in(void *data __UNUSED__, int type __UNUSED__, void *event);
-static Eina_Bool _pager_cb_event_border_focus_out(void *data __UNUSED__, int type __UNUSED__, void *event);
-static Eina_Bool _pager_cb_event_border_property(void *data __UNUSED__, int type __UNUSED__, void *event);
+static Eina_Bool _pager_cb_event_client_resize(void *data __UNUSED__, int type __UNUSED__, void *event);
+static Eina_Bool _pager_cb_event_client_move(void *data __UNUSED__, int type __UNUSED__, void *event);
+static Eina_Bool _pager_cb_event_client_add(void *data __UNUSED__, int type __UNUSED__, void *event);
+static Eina_Bool _pager_cb_event_client_remove(void *data __UNUSED__, int type __UNUSED__, void *event);
+static Eina_Bool _pager_cb_event_client_iconify(void *data __UNUSED__, int type __UNUSED__, void *event);
+static Eina_Bool _pager_cb_event_client_uniconify(void *data __UNUSED__, int type __UNUSED__, void *event);
+static Eina_Bool _pager_cb_event_client_stick(void *data __UNUSED__, int type __UNUSED__, void *event);
+static Eina_Bool _pager_cb_event_client_unstick(void *data __UNUSED__, int type __UNUSED__, void *event);
+static Eina_Bool _pager_cb_event_client_desk_set(void *data __UNUSED__, int type __UNUSED__, void *event);
+static Eina_Bool _pager_cb_event_client_stack(void *data __UNUSED__, int type __UNUSED__, void *event);
+static Eina_Bool _pager_cb_event_client_icon_change(void *data __UNUSED__, int type __UNUSED__, void *event);
+static Eina_Bool _pager_cb_event_client_urgent_change(void *data __UNUSED__, int type __UNUSED__, void *event);
+static Eina_Bool _pager_cb_event_client_focus_in(void *data __UNUSED__, int type __UNUSED__, void *event);
+static Eina_Bool _pager_cb_event_client_focus_out(void *data __UNUSED__, int type __UNUSED__, void *event);
+static Eina_Bool _pager_cb_event_client_property(void *data __UNUSED__, int type __UNUSED__, void *event);
static Eina_Bool _pager_cb_event_zone_desk_count_set(void *data __UNUSED__, int type __UNUSED__, void *event);
static Eina_Bool _pager_cb_event_desk_show(void *data __UNUSED__, int type __UNUSED__, void *event);
static Eina_Bool _pager_cb_event_desk_name_change(void *data __UNUSED__, int type __UNUSED__, void *event);
-static Eina_Bool _pager_cb_event_container_resize(void *data __UNUSED__, int type __UNUSED__, void *event);
+static Eina_Bool _pager_cb_event_compositor_resize(void *data __UNUSED__, int type __UNUSED__, void *event);
static void _pager_window_cb_mouse_down(void *data, Evas *e __UNUSED__, Evas_Object *obj __UNUSED__, void *event_info);
static void _pager_window_cb_mouse_up(void *data, Evas *e __UNUSED__, Evas_Object *obj __UNUSED__, void *event_info);
static void _pager_window_cb_mouse_move(void *data, Evas *e __UNUSED__, Evas_Object *obj __UNUSED__, void *event_info);
@@ -150,15 +150,15 @@ static Pager_Desk *_pager_desk_at_coord(Pager *p, Evas_Coord x, Evas_Coord
static void _pager_desk_select(Pager_Desk *pd);
static Pager_Desk *_pager_desk_find(Pager *p, E_Desk *desk);
static void _pager_desk_switch(Pager_Desk *pd1, Pager_Desk *pd2);
-static Pager_Win *_pager_window_new(Pager_Desk *pd, E_Border *border);
+static Pager_Win *_pager_window_new(Pager_Desk *pd, E_Client *client);
static void _pager_window_free(Pager_Win *pw);
static void _pager_window_move(Pager_Win *pw);
-static Pager_Win *_pager_window_find(Pager *p, E_Border *border);
-static Pager_Win *_pager_desk_window_find(Pager_Desk *pd, E_Border *border);
+static Pager_Win *_pager_window_find(Pager *p, E_Client *client);
+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_Container *con, const char *params);
+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);
@@ -401,7 +401,7 @@ _pager_desk_livethumb_setup(Pager_Desk *pd)
o = e_livethumb_thumb_get(pd->o_bg);
if (!o) o = edje_object_add(e_livethumb_evas_get(pd->o_bg));
- bgfile = e_bg_file_get(pd->desk->zone->container->num, pd->desk->zone->num, pd->desk->x, pd->desk->y);
+ bgfile = e_bg_file_get(pd->desk->zone->comp->num, pd->desk->zone->num, pd->desk->x, pd->desk->y);
edje_object_file_set(o, bgfile, "e/desktop/background");
e_livethumb_thumb_set(pd->o_bg, o);
eina_stringshare_del(bgfile);
@@ -412,8 +412,7 @@ _pager_desk_new(Pager *p, E_Desk *desk, int xpos, int ypos, Eina_Bool invert)
{
Pager_Desk *pd;
Evas_Object *o, *evo;
- E_Border_List *bl;
- E_Border *bd;
+ E_Client *ec;
int w, h;
Evas *e;
@@ -472,18 +471,17 @@ _pager_desk_new(Pager *p, E_Desk *desk, int xpos, int ypos, Eina_Bool invert)
edje_object_part_swallow(pd->o_desk, "e.swallow.content", pd->o_layout);
evas_object_show(o);
- bl = e_container_border_list_first(desk->zone->container);
- while ((bd = e_container_border_list_next(bl)))
+ E_CLIENT_FOREACH(desk->zone->comp, ec)
{
Pager_Win *pw;
- if ((bd->new_client) || (bd->zone != desk->zone) ||
- ((bd->desk != desk) && (!bd->sticky)))
+ if (e_client_util_ignored_get(ec)) continue;
+ if ((ec->new_client) || (ec->zone != desk->zone) ||
+ ((ec->desk != desk) && (!ec->sticky)))
continue;
- pw = _pager_window_new(pd, bd);
+ pw = _pager_window_new(pd, ec);
if (pw) pd->wins = eina_list_append(pd->wins, pw);
}
- e_container_border_list_free(bl);
return pd;
}
@@ -564,13 +562,15 @@ _pager_desk_switch(Pager_Desk *pd1, Pager_Desk *pd2)
/* Move opened windows from on desk to the other */
EINA_LIST_FOREACH(pd1->wins, l, pw)
{
- if ((!pw) || (!pw->border) || (pw->border->iconic)) continue;
- e_border_desk_set(pw->border, desk2);
+ if ((!pw) || (!pw->client) || (pw->client->iconic)) continue;
+ pw->client->hidden = 0;
+ e_client_desk_set(pw->client, desk2);
}
EINA_LIST_FOREACH(pd2->wins, l, pw)
{
- if ((!pw) || (!pw->border) || (pw->border->iconic)) continue;
- e_border_desk_set(pw->border, desk1);
+ if ((!pw) || (!pw->client) || (pw->client->iconic)) continue;
+ pw->client->hidden = 0;
+ e_client_desk_set(pw->client, desk1);
}
/* Modify desktop names in the config */
@@ -644,21 +644,21 @@ _pager_desk_switch(Pager_Desk *pd1, Pager_Desk *pd2)
}
static Pager_Win *
-_pager_window_new(Pager_Desk *pd, E_Border *border)
+_pager_window_new(Pager_Desk *pd, E_Client *client)
{
Pager_Win *pw;
Evas_Object *o;
int visible;
- if (!border) return NULL;
+ if (!client) return NULL;
pw = E_NEW(Pager_Win, 1);
if (!pw) return NULL;
- pw->border = border;
- e_object_ref(E_OBJECT(border));
+ pw->client = client;
+ e_object_ref(E_OBJECT(client));
- visible = ((!border->iconic) && (!border->client.netwm.state.skip_pager));
- pw->skip_winlist = border->client.netwm.state.skip_pager;
+ visible = ((!client->iconic) && (!client->netwm.state.skip_pager));
+ pw->skip_winlist = client->netwm.state.skip_pager;
pw->desk = pd;
o = edje_object_add(evas_object_evas_get(pd->pager->o_table));
@@ -677,7 +677,7 @@ _pager_window_new(Pager_Desk *pd, E_Border *border)
evas_object_event_callback_add(o, EVAS_CALLBACK_MOUSE_MOVE,
_pager_window_cb_mouse_move, pw);
- o = e_border_icon_add(border, evas_object_evas_get(pd->pager->o_table));
+ o = e_client_icon_add(client, evas_object_evas_get(pd->pager->o_table));
if (o)
{
pw->o_icon = o;
@@ -685,9 +685,9 @@ _pager_window_new(Pager_Desk *pd, E_Border *border)
edje_object_part_swallow(pw->o_window, "e.swallow.icon", o);
}
- if (border->client.icccm.urgent && !border->focused)
+ if (client->icccm.urgent && !client->focused)
{
- if (!(border->iconic))
+ if (!(client->iconic))
edje_object_signal_emit(pd->o_desk, "e,state,urgent", "e");
edje_object_signal_emit(pw->o_window, "e,state,urgent", "e");
}
@@ -705,7 +705,7 @@ _pager_window_free(Pager_Win *pw)
pw->desk->pager->dragging = 0;
if (pw->o_window) evas_object_del(pw->o_window);
if (pw->o_icon) evas_object_del(pw->o_icon);
- e_object_unref(E_OBJECT(pw->border));
+ e_object_unref(E_OBJECT(pw->client));
free(pw);
}
@@ -713,13 +713,13 @@ static void
_pager_window_move(Pager_Win *pw)
{
e_layout_child_move(pw->o_window,
- pw->border->x - pw->border->zone->x,
- pw->border->y - pw->border->zone->y);
- e_layout_child_resize(pw->o_window, pw->border->w, pw->border->h);
+ pw->client->x - pw->client->zone->x,
+ pw->client->y - pw->client->zone->y);
+ e_layout_child_resize(pw->o_window, pw->client->w, pw->client->h);
}
static Pager_Win *
-_pager_window_find(Pager *p, E_Border *border)
+_pager_window_find(Pager *p, E_Client *client)
{
Eina_List *l;
Pager_Desk *pd;
@@ -728,28 +728,28 @@ _pager_window_find(Pager *p, E_Border *border)
{
Pager_Win *pw;
- pw = _pager_desk_window_find(pd, border);
+ pw = _pager_desk_window_find(pd, client);
if (pw) return pw;
}
return NULL;
}
static Pager_Win *
-_pager_desk_window_find(Pager_Desk *pd, E_Border *border)
+_pager_desk_window_find(Pager_Desk *pd, E_Client *client)
{
Eina_List *l;
Pager_Win *pw;
EINA_LIST_FOREACH(pd->wins, l, pw)
- if (pw->border == border) return pw;
+ if (pw->client == client) return pw;
return NULL;
}
static void
-_pager_popup_cb_del(void *obj)
+_pager_popup_cb_del(void *data, Evas *e EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *event_info EINA_UNUSED)
{
- Pager_Popup *pp = e_object_data_get(obj);
+ Pager_Popup *pp = data;
E_FREE_FUNC(pp->timer, ecore_timer_del);
_pager_free(pp->pager);
free(pp);
@@ -767,16 +767,7 @@ _pager_popup_new(E_Zone *zone, int keyaction)
if (!pp) return NULL;
/* Show popup */
- pp->popup = e_popup_new(zone, 0, 0, 1, 1);
- e_popup_name_set(pp->popup, "pager_popup");
- e_popup_ignore_events_set(pp->popup, 1);
- if (!pp->popup)
- {
- free(pp);
- return NULL;
- }
-
- pp->pager = _pager_new(pp->popup->evas, zone, NULL);
+ pp->pager = _pager_new(zone->comp->evas, zone, NULL);
pp->pager->popup = pp;
pp->urgent = 0;
@@ -793,7 +784,8 @@ _pager_popup_new(E_Zone *zone, int keyaction)
evas_object_move(pp->pager->o_table, 0, 0);
evas_object_resize(pp->pager->o_table, width, height);
- pp->o_bg = edje_object_add(pp->popup->evas);
+ pp->o_bg = edje_object_add(zone->comp->evas);
+ evas_object_name_set(pp->o_bg, "pager_popup");
e_theme_edje_object_set(pp->o_bg, "base/theme/modules/pager",
"e/modules/pager/popup");
desk = e_desk_current_get(zone);
@@ -805,17 +797,13 @@ _pager_popup_new(E_Zone *zone, int keyaction)
edje_object_part_swallow(pp->o_bg, "e.swallow.content", pp->pager->o_table);
edje_object_size_min_calc(pp->o_bg, &w, &h);
- evas_object_move(pp->o_bg, 0, 0);
- evas_object_resize(pp->o_bg, w, h);
- e_popup_content_set(pp->popup, pp->o_bg);
+ pp->popup = e_comp_object_util_add(pp->o_bg, E_COMP_OBJECT_TYPE_POPUP);
+ evas_object_pass_events_set(pp->popup, 1);
e_zone_useful_geometry_get(zone, &zx, &zy, &zw, &zh);
- zx -= zone->x;
- zy -= zone->y;
- e_popup_move_resize(pp->popup,
- zx + ((zw - w) / 2), zy + ((zh - h) / 2), w, h);
- e_object_free_attach_func_set(E_OBJECT(pp->popup), _pager_popup_cb_del);
- e_object_data_set(E_OBJECT(pp->popup), pp);
- e_popup_show(pp->popup);
+ evas_object_geometry_set(pp->popup, zx, zy, w, h);
+ e_comp_object_util_center(pp->popup);
+ evas_object_event_callback_add(pp->popup, EVAS_CALLBACK_DEL, _pager_popup_cb_del, pp);
+ evas_object_show(pp->popup);
pp->timer = NULL;
@@ -826,7 +814,8 @@ static void
_pager_popup_free(Pager_Popup *pp)
{
E_FREE_FUNC(pp->timer, ecore_timer_del);
- e_object_del(E_OBJECT(pp->popup));
+ evas_object_hide(pp->popup);
+ evas_object_del(pp->popup);
}
static Pager_Popup *
@@ -899,7 +888,7 @@ _pager_inst_cb_menu_configure(void *data __UNUSED__, E_Menu *m __UNUSED__, E_Men
}
static E_Config_Dialog *
-_pager_config_dialog(E_Container *con __UNUSED__, const char *params __UNUSED__)
+_pager_config_dialog(E_Comp *comp __UNUSED__, const char *params __UNUSED__)
{
if (!pager_config) return NULL;
if (pager_config->config_dialog) return NULL;
@@ -915,7 +904,7 @@ _pager_inst_cb_menu_virtual_desktops_dialog(void *data, E_Menu *m __UNUSED__, E_
inst = data;
e_configure_registry_call("screen/virtual_desktops",
- inst->gcc->gadcon->zone->container, NULL);
+ inst->gcc->gadcon->zone->comp, NULL);
}
static void
@@ -960,9 +949,9 @@ _pager_cb_config_updated(void)
}
static Eina_Bool
-_pager_cb_event_border_resize(void *data __UNUSED__, int type __UNUSED__, void *event)
+_pager_cb_event_client_resize(void *data __UNUSED__, int type __UNUSED__, void *event)
{
- E_Event_Border_Resize *ev = event;
+ E_Event_Client *ev = event;
Eina_List *l, *l2;
Pager *p;
@@ -970,12 +959,12 @@ _pager_cb_event_border_resize(void *data __UNUSED__, int type __UNUSED__, void *
{
Pager_Desk *pd;
- if (p->zone != ev->border->zone) continue;
+ if (p->zone != ev->ec->zone) continue;
EINA_LIST_FOREACH(p->desks, l2, pd)
{
Pager_Win *pw;
- pw = _pager_desk_window_find(pd, ev->border);
+ pw = _pager_desk_window_find(pd, ev->ec);
if (pw) _pager_window_move(pw);
}
}
@@ -983,9 +972,9 @@ _pager_cb_event_border_resize(void *data __UNUSED__, int type __UNUSED__, void *
}
static Eina_Bool
-_pager_cb_event_border_move(void *data __UNUSED__, int type __UNUSED__, void *event)
+_pager_cb_event_client_move(void *data __UNUSED__, int type __UNUSED__, void *event)
{
- E_Event_Border_Move *ev = event;
+ E_Event_Client *ev = event;
Eina_List *l;
Pager_Win *pw;
Pager_Desk *pd;
@@ -995,19 +984,19 @@ _pager_cb_event_border_move(void *data __UNUSED__, int type __UNUSED__, void *ev
{
Eina_List *l2;
- if (p->zone != ev->border->zone) continue;
+ if (p->zone != ev->ec->zone) continue;
EINA_LIST_FOREACH(p->desks, l2, pd)
{
- pw = _pager_desk_window_find(pd, ev->border);
+ pw = _pager_desk_window_find(pd, ev->ec);
if (pw) _pager_window_move(pw);
}
}
- if ((act_popup) && (act_popup->pager->zone == ev->border->zone))
+ if ((act_popup) && (act_popup->pager->zone == ev->ec->zone))
{
EINA_LIST_FOREACH(act_popup->pager->desks, l, pd)
{
- pw = _pager_desk_window_find(pd, ev->border);
+ pw = _pager_desk_window_find(pd, ev->ec);
if (pw) _pager_window_move(pw);
}
}
@@ -1016,9 +1005,9 @@ _pager_cb_event_border_move(void *data __UNUSED__, int type __UNUSED__, void *ev
}
static Eina_Bool
-_pager_cb_event_border_add(void *data __UNUSED__, int type __UNUSED__, void *event)
+_pager_cb_event_client_add(void *data __UNUSED__, int type __UNUSED__, void *event)
{
- E_Event_Border_Add *ev = event;
+ E_Event_Client *ev = event;
Eina_List *l;
Pager *p;
@@ -1027,12 +1016,12 @@ _pager_cb_event_border_add(void *data __UNUSED__, int type __UNUSED__, void *eve
Pager_Desk *pd;
Pager_Win *pw;
- if ((p->zone != ev->border->zone) ||
- (_pager_window_find(p, ev->border)))
+ if ((p->zone != ev->ec->zone) ||
+ (_pager_window_find(p, ev->ec)))
continue;
- pd = _pager_desk_find(p, ev->border->desk);
+ pd = _pager_desk_find(p, ev->ec->desk);
if (!pd) continue;
- pw = _pager_window_new(pd, ev->border);
+ pw = _pager_window_new(pd, ev->ec);
if (pw) pd->wins = eina_list_append(pd->wins, pw);
}
@@ -1040,9 +1029,9 @@ _pager_cb_event_border_add(void *data __UNUSED__, int type __UNUSED__, void *eve
}
static Eina_Bool
-_pager_cb_event_border_remove(void *data __UNUSED__, int type __UNUSED__, void *event)
+_pager_cb_event_client_remove(void *data __UNUSED__, int type __UNUSED__, void *event)
{
- E_Event_Border_Remove *ev = event;
+ E_Event_Client *ev = event;
Eina_List *l;
Pager *p;
@@ -1051,13 +1040,13 @@ _pager_cb_event_border_remove(void *data __UNUSED__, int type __UNUSED__, void *
Eina_List *l2;
Pager_Desk *pd;
- if (p->zone != ev->border->zone) continue;
+ if (p->zone != ev->ec->zone) continue;
EINA_LIST_FOREACH(p->desks, l2, pd)
{
Pager_Win *pw;
- pw = _pager_desk_window_find(pd, ev->border);
+ pw = _pager_desk_window_find(pd, ev->ec);
if (!pw) continue;
pd->wins = eina_list_remove(pd->wins, pw);
_pager_window_free(pw);
@@ -1067,9 +1056,9 @@ _pager_cb_event_border_remove(void *data __UNUSED__, int type __UNUSED__, void *
}
static Eina_Bool
-_pager_cb_event_border_iconify(void *data __UNUSED__, int type __UNUSED__, void *event)
+_pager_cb_event_client_iconify(void *data __UNUSED__, int type __UNUSED__, void *event)
{
- E_Event_Border_Iconify *ev = event;
+ E_Event_Client *ev = event;
Eina_List *l;
Pager *p;
@@ -1078,13 +1067,13 @@ _pager_cb_event_border_iconify(void *data __UNUSED__, int type __UNUSED__, void
Eina_List *l2;
Pager_Desk *pd;
- if (p->zone != ev->border->zone) continue;
+ if (p->zone != ev->ec->zone) continue;
EINA_LIST_FOREACH(p->desks, l2, pd)
{
Pager_Win *pw;
- pw = _pager_desk_window_find(pd, ev->border);
+ pw = _pager_desk_window_find(pd, ev->ec);
if (!pw) continue;
if ((pw->drag.from_pager) && (pw->desk->pager->dragging))
pw->desk->pager->dragging = 0;
@@ -1096,9 +1085,9 @@ _pager_cb_event_border_iconify(void *data __UNUSED__, int type __UNUSED__, void
}
static Eina_Bool
-_pager_cb_event_border_uniconify(void *data __UNUSED__, int type __UNUSED__, void *event)
+_pager_cb_event_client_uniconify(void *data __UNUSED__, int type __UNUSED__, void *event)
{
- E_Event_Border_Uniconify *ev = event;
+ E_Event_Client *ev = event;
Eina_List *l;
Pager *p;
@@ -1107,13 +1096,13 @@ _pager_cb_event_border_uniconify(void *data __UNUSED__, int type __UNUSED__, voi
Eina_List *l2;
Pager_Desk *pd;
- if (p->zone != ev->border->zone) continue;
+ if (p->zone != ev->ec->zone) continue;
EINA_LIST_FOREACH(p->desks, l2, pd)
{
Pager_Win *pw;
- pw = _pager_desk_window_find(pd, ev->border);
+ pw = _pager_desk_window_find(pd, ev->ec);
if ((pw) && (!pw->skip_winlist)) evas_object_show(pw->o_window);
}
}
@@ -1122,9 +1111,9 @@ _pager_cb_event_border_uniconify(void *data __UNUSED__, int type __UNUSED__, voi
}
static Eina_Bool
-_pager_cb_event_border_stick(void *data __UNUSED__, int type __UNUSED__, void *event)
+_pager_cb_event_client_stick(void *data __UNUSED__, int type __UNUSED__, void *event)
{
- E_Event_Border_Stick *ev = event;
+ E_Event_Client *ev = event;
Eina_List *l;
Pager *p;
@@ -1134,14 +1123,14 @@ _pager_cb_event_border_stick(void *data __UNUSED__, int type __UNUSED__, void *e
Pager_Desk *pd;
Pager_Win *pw;
- if (p->zone != ev->border->zone) continue;
- pw = _pager_window_find(p, ev->border);
+ if (p->zone != ev->ec->zone) continue;
+ pw = _pager_window_find(p, ev->ec);
if (!pw) continue;
EINA_LIST_FOREACH(p->desks, l2, pd)
- if ((ev->border->desk != pd->desk) && (!_pager_desk_window_find(pd, ev->border)))
+ if ((ev->ec->desk != pd->desk) && (!_pager_desk_window_find(pd, ev->ec)))
{
- pw = _pager_window_new(pd, ev->border);
+ pw = _pager_window_new(pd, ev->ec);
if (pw) pd->wins = eina_list_append(pd->wins, pw);
}
}
@@ -1150,9 +1139,9 @@ _pager_cb_event_border_stick(void *data __UNUSED__, int type __UNUSED__, void *e
}
static Eina_Bool
-_pager_cb_event_border_unstick(void *data __UNUSED__, int type __UNUSED__, void *event)
+_pager_cb_event_client_unstick(void *data __UNUSED__, int type __UNUSED__, void *event)
{
- E_Event_Border_Unstick *ev = event;
+ E_Event_Client *ev = event;
Eina_List *l;
Pager *p;
@@ -1161,14 +1150,14 @@ _pager_cb_event_border_unstick(void *data __UNUSED__, int type __UNUSED__, void
Pager_Desk *pd;
Eina_List *l2;
- if (p->zone != ev->border->zone) continue;
+ if (p->zone != ev->ec->zone) continue;
EINA_LIST_FOREACH(p->desks, l2, pd)
- if (ev->border->desk != pd->desk)
+ if (ev->ec->desk != pd->desk)
{
Pager_Win *pw;
- pw = _pager_desk_window_find(pd, ev->border);
+ pw = _pager_desk_window_find(pd, ev->ec);
if (pw)
{
pd->wins = eina_list_remove(pd->wins, pw);
@@ -1180,20 +1169,20 @@ _pager_cb_event_border_unstick(void *data __UNUSED__, int type __UNUSED__, void
}
static void
-_pager_window_desk_change(Pager *pager, E_Border *bd)
+_pager_window_desk_change(Pager *pager, E_Client *ec)
{
Eina_List *l;
Pager_Win *pw;
Pager_Desk *pd;
- /* if this pager is not for the zone of the border */
- if (pager->zone != bd->zone)
+ /* if this pager is not for the zone of the client */
+ if (pager->zone != ec->zone)
{
/* look at all desks in the pager */
EINA_LIST_FOREACH(pager->desks, l, pd)
{
- /* find this border in this desk */
- pw = _pager_desk_window_find(pd, bd);
+ /* find this client in this desk */
+ pw = _pager_desk_window_find(pd, ec);
if (!pw) continue;
/* if it is found - remove it. it does not belong in this
* pager as it probably moves zones */
@@ -1202,13 +1191,13 @@ _pager_window_desk_change(Pager *pager, E_Border *bd)
}
return;
}
- /* and this pager zone is for this border */
+ /* and this pager zone is for this client */
/* see if the window is in this pager at all */
- pw = _pager_window_find(pager, bd);
+ pw = _pager_window_find(pager, ec);
if (pw)
{
/* is it sticky */
- if (bd->sticky)
+ if (ec->sticky)
{
/* if its sticky and in this pager - its already everywhere, so abort
* doing anything else */
@@ -1216,11 +1205,11 @@ _pager_window_desk_change(Pager *pager, E_Border *bd)
}
/* move it to the right desk */
/* find the pager desk of the target desk */
- pd = _pager_desk_find(pager, bd->desk);
+ pd = _pager_desk_find(pager, ec->desk);
if (pd)
{
Pager_Win *pw2 = NULL;
- E_Border *bd_above;
+ E_Client *ec_above;
/* remove it from whatever desk it was on */
pw->desk->wins = eina_list_remove(pw->desk->wins, pw);
@@ -1231,9 +1220,9 @@ _pager_window_desk_change(Pager *pager, E_Border *bd)
pd->wins = eina_list_append(pd->wins, pw);
e_layout_pack(pd->o_layout, pw->o_window);
- bd_above = e_util_desk_border_above(pw->border);
- if (bd_above)
- pw2 = _pager_desk_window_find(pd, bd_above);
+ ec_above = e_util_desk_client_above(pw->client);
+ if (ec_above)
+ pw2 = _pager_desk_window_find(pd, ec_above);
if (pw2)
e_layout_child_lower_below(pw->o_window, pw2->o_window);
else
@@ -1242,26 +1231,26 @@ _pager_window_desk_change(Pager *pager, E_Border *bd)
_pager_window_move(pw);
}
}
- /* the border isn't in this pager at all - it must have moved zones */
+ /* the client isn't in this pager at all - it must have moved zones */
else
{
- if (!bd->sticky)
+ if (!ec->sticky)
{
/* find the pager desk it needs to go to */
- pd = _pager_desk_find(pager, bd->desk);
- if ((pd) && (!_pager_desk_window_find(pd, bd)))
+ pd = _pager_desk_find(pager, ec->desk);
+ if ((pd) && (!_pager_desk_window_find(pd, ec)))
{
/* create it and add it */
- pw = _pager_window_new(pd, bd);
+ pw = _pager_window_new(pd, ec);
if (pw)
{
Pager_Win *pw2 = NULL;
- E_Border *bd_above;
+ E_Client *ec_above;
pd->wins = eina_list_append(pd->wins, pw);
- bd_above = e_util_desk_border_above(pw->border);
- if (bd_above)
- pw2 = _pager_desk_window_find(pd, bd_above);
+ ec_above = e_util_desk_client_above(pw->client);
+ if (ec_above)
+ pw2 = _pager_desk_window_find(pd, ec_above);
if (pw2)
e_layout_child_lower_below(pw->o_window, pw2->o_window);
else
@@ -1276,17 +1265,17 @@ _pager_window_desk_change(Pager *pager, E_Border *bd)
EINA_LIST_FOREACH(pager->desks, l, pd)
{
/* create it and add it */
- if (_pager_desk_window_find(pd, bd)) continue;
- pw = _pager_window_new(pd, bd);
+ if (_pager_desk_window_find(pd, ec)) continue;
+ pw = _pager_window_new(pd, ec);
if (pw)
{
Pager_Win *pw2 = NULL;
- E_Border *bd_above;
+ E_Client *ec_above;
pd->wins = eina_list_append(pd->wins, pw);
- bd_above = e_util_desk_border_above(pw->border);
- if (bd_above)
- pw2 = _pager_desk_window_find(pd, bd_above);
+ ec_above = e_util_desk_client_above(pw->client);
+ if (ec_above)
+ pw2 = _pager_desk_window_find(pd, ec_above);
if (pw2)
e_layout_child_lower_below(pw->o_window, pw2->o_window);
else
@@ -1299,22 +1288,22 @@ _pager_window_desk_change(Pager *pager, E_Border *bd)
}
static Eina_Bool
-_pager_cb_event_border_desk_set(void *data __UNUSED__, int type __UNUSED__, void *event)
+_pager_cb_event_client_desk_set(void *data __UNUSED__, int type __UNUSED__, void *event)
{
- E_Event_Border_Desk_Set *ev = event;
+ E_Event_Client_Desk_Set *ev = event;
Eina_List *l;
Pager *p;
EINA_LIST_FOREACH(pagers, l, p)
- _pager_window_desk_change(p, ev->border);
+ _pager_window_desk_change(p, ev->ec);
return ECORE_CALLBACK_PASS_ON;
}
static Eina_Bool
-_pager_cb_event_border_stack(void *data __UNUSED__, int type __UNUSED__, void *event)
+_pager_cb_event_client_stack(void *data __UNUSED__, int type __UNUSED__, void *event)
{
- E_Event_Border_Stack *ev = event;
+ E_Event_Client *ev = event;
Eina_List *l;
Pager *p;
@@ -1323,25 +1312,25 @@ _pager_cb_event_border_stack(void *data __UNUSED__, int type __UNUSED__, void *e
Eina_List *l2;
Pager_Desk *pd;
- if (p->zone != ev->border->zone) continue;
+ if (p->zone != ev->ec->zone) continue;
EINA_LIST_FOREACH(p->desks, l2, pd)
{
Pager_Win *pw, *pw2 = NULL;
- pw = _pager_desk_window_find(pd, ev->border);
+ pw = _pager_desk_window_find(pd, ev->ec);
if (pw)
{
- E_Border *bd;
+ E_Client *ec;
- bd = e_util_desk_border_below(ev->border);
- if (bd) pw2 = _pager_desk_window_find(pd, bd);
+ ec = e_util_desk_client_below(ev->ec);
+ if (ec) pw2 = _pager_desk_window_find(pd, ec);
if (pw2)
{
e_layout_child_raise_above(pw->o_window, pw2->o_window);
continue;
}
- bd = e_util_desk_border_above(ev->border);
- if (bd) pw2 = _pager_desk_window_find(pd, bd);
+ ec = e_util_desk_client_above(ev->ec);
+ if (ec) pw2 = _pager_desk_window_find(pd, ec);
if (pw2)
{
e_layout_child_lower_below(pw->o_window, pw2->o_window);
@@ -1355,23 +1344,24 @@ _pager_cb_event_border_stack(void *data __UNUSED__, int type __UNUSED__, void *e
}
static Eina_Bool
-_pager_cb_event_border_icon_change(void *data __UNUSED__, int type __UNUSED__, void *event)
+_pager_cb_event_client_icon_change(void *data __UNUSED__, int type __UNUSED__, void *event)
{
- E_Event_Border_Icon_Change *ev = event;
+ E_Event_Client_Property *ev = event;
Eina_List *l;
Pager *p;
+ if (!(ev->property & E_CLIENT_PROPERTY_ICON)) return ECORE_CALLBACK_RENEW;
EINA_LIST_FOREACH(pagers, l, p)
{
Eina_List *l2;
Pager_Desk *pd;
- if (p->zone != ev->border->zone) continue;
+ if (p->zone != ev->ec->zone) continue;
EINA_LIST_FOREACH(p->desks, l2, pd)
{
Pager_Win *pw;
- pw = _pager_desk_window_find(pd, ev->border);
+ pw = _pager_desk_window_find(pd, ev->ec);
if (pw)
{
Evas_Object *o;
@@ -1381,7 +1371,7 @@ _pager_cb_event_border_icon_change(void *data __UNUSED__, int type __UNUSED__, v
evas_object_del(pw->o_icon);
pw->o_icon = NULL;
}
- o = e_border_icon_add(ev->border,
+ o = e_client_icon_add(ev->ec,
evas_object_evas_get(p->o_table));
if (o)
{
@@ -1398,9 +1388,9 @@ _pager_cb_event_border_icon_change(void *data __UNUSED__, int type __UNUSED__, v
}
static Eina_Bool
-_pager_cb_event_border_urgent_change(void *data __UNUSED__, int type __UNUSED__, void *event)
+_pager_cb_event_client_urgent_change(void *data __UNUSED__, int type __UNUSED__, void *event)
{
- E_Event_Border_Urgent_Change *ev;
+ E_Event_Client_Property *ev = event;
Eina_List *l, *l2;
Pager_Popup *pp;
E_Zone *zone;
@@ -1409,16 +1399,16 @@ _pager_cb_event_border_urgent_change(void *data __UNUSED__, int type __UNUSED__,
Pager_Desk *pd;
Pager_Win *pw;
- ev = event;
- zone = ev->border->zone;
- urgent = ev->border->client.icccm.urgent;
+ if (!(ev->property & E_CLIENT_PROPERTY_URGENCY)) return ECORE_CALLBACK_RENEW;
+ zone = ev->ec->zone;
+ urgent = ev->ec->icccm.urgent;
if (pager_config->popup_urgent && (pager_config->popup_urgent_focus ||
- (!pager_config->popup_urgent_focus && !ev->border->focused)))
+ (!pager_config->popup_urgent_focus && !ev->ec->focused)))
{
pp = _pager_popup_find(zone);
- if ((!pp) && (urgent) && !(ev->border->iconic))
+ if ((!pp) && (urgent) && !(ev->ec->iconic))
{
pp = _pager_popup_new(zone, 0);
@@ -1435,12 +1425,12 @@ _pager_cb_event_border_urgent_change(void *data __UNUSED__, int type __UNUSED__,
EINA_LIST_FOREACH(p->desks, l2, pd)
{
- pw = _pager_desk_window_find(pd, ev->border);
+ pw = _pager_desk_window_find(pd, ev->ec);
if (pw)
{
- if (urgent && !ev->border->focused)
+ if (urgent && !ev->ec->focused)
{
- if (!(ev->border->iconic))
+ if (!(ev->ec->iconic))
{
if ((pd->pager) && (pd->pager->inst) &&
(!pager_config->popup_urgent))
@@ -1453,7 +1443,7 @@ _pager_cb_event_border_urgent_change(void *data __UNUSED__, int type __UNUSED__,
}
else
{
- if (!(ev->border->iconic))
+ if (!(ev->ec->iconic))
edje_object_signal_emit(pd->o_desk,
"e,state,not_urgent", "e");
edje_object_signal_emit(pw->o_window,
@@ -1467,9 +1457,9 @@ _pager_cb_event_border_urgent_change(void *data __UNUSED__, int type __UNUSED__,
}
static Eina_Bool
-_pager_cb_event_border_focus_in(void *data __UNUSED__, int type __UNUSED__, void *event)
+_pager_cb_event_client_focus_in(void *data __UNUSED__, int type __UNUSED__, void *event)
{
- E_Event_Border_Focus_In *ev;
+ E_Event_Client *ev = event;
Instance *inst;
Eina_List *l, *l2;
Pager_Popup *pp;
@@ -1477,8 +1467,7 @@ _pager_cb_event_border_focus_in(void *data __UNUSED__, int type __UNUSED__, void
Pager_Win *pw;
E_Zone *zone;
- ev = event;
- zone = ev->border->zone;
+ zone = ev->ec->zone;
EINA_LIST_FOREACH(pager_config->instances, l, inst)
{
@@ -1486,7 +1475,7 @@ _pager_cb_event_border_focus_in(void *data __UNUSED__, int type __UNUSED__, void
EINA_LIST_FOREACH(inst->pager->desks, l2, pd)
{
- pw = _pager_desk_window_find(pd, ev->border);
+ pw = _pager_desk_window_find(pd, ev->ec);
if (pw)
{
edje_object_signal_emit(pw->o_window,
@@ -1501,7 +1490,7 @@ _pager_cb_event_border_focus_in(void *data __UNUSED__, int type __UNUSED__, void
EINA_LIST_FOREACH(pp->pager->desks, l, pd)
{
- pw = _pager_desk_window_find(pd, ev->border);
+ pw = _pager_desk_window_find(pd, ev->ec);
if (pw)
{
edje_object_signal_emit(pw->o_window,
@@ -1514,9 +1503,9 @@ _pager_cb_event_border_focus_in(void *data __UNUSED__, int type __UNUSED__, void
}
static Eina_Bool
-_pager_cb_event_border_focus_out(void *data __UNUSED__, int type __UNUSED__, void *event)
+_pager_cb_event_client_focus_out(void *data __UNUSED__, int type __UNUSED__, void *event)
{
- E_Event_Border_Focus_Out *ev;
+ E_Event_Client *ev = event;
Eina_List *l;
Pager_Popup *pp;
Pager_Desk *pd;
@@ -1524,8 +1513,7 @@ _pager_cb_event_border_focus_out(void *data __UNUSED__, int type __UNUSED__, voi
Instance *inst;
E_Zone *zone;
- ev = event;
- zone = ev->border->zone;
+ zone = ev->ec->zone;
EINA_LIST_FOREACH(pager_config->instances, l, inst)
{
@@ -1535,7 +1523,7 @@ _pager_cb_event_border_focus_out(void *data __UNUSED__, int type __UNUSED__, voi
EINA_LIST_FOREACH(inst->pager->desks, l2, pd)
{
- pw = _pager_desk_window_find(pd, ev->border);
+ pw = _pager_desk_window_find(pd, ev->ec);
if (pw)
{
edje_object_signal_emit(pw->o_window,
@@ -1550,7 +1538,7 @@ _pager_cb_event_border_focus_out(void *data __UNUSED__, int type __UNUSED__, voi
EINA_LIST_FOREACH(pp->pager->desks, l, pd)
{
- pw = _pager_desk_window_find(pd, ev->border);
+ pw = _pager_desk_window_find(pd, ev->ec);
if (pw)
{
edje_object_signal_emit(pw->o_window,
@@ -1563,26 +1551,27 @@ _pager_cb_event_border_focus_out(void *data __UNUSED__, int type __UNUSED__, voi
}
static Eina_Bool
-_pager_cb_event_border_property(void *data __UNUSED__, int type __UNUSED__, void *event)
+_pager_cb_event_client_property(void *data __UNUSED__, int type __UNUSED__, void *event)
{
- E_Event_Border_Property *ev = event;
+ E_Event_Client_Property *ev = event;
Eina_List *l, *l2;
int found = 0;
Pager *p;
Pager_Win *pw;
Pager_Desk *pd;
+ if (!(ev->property & E_CLIENT_PROPERTY_NETWM_STATE)) return ECORE_CALLBACK_RENEW;
EINA_LIST_FOREACH(pagers, l, p)
{
- if (p->zone != ev->border->zone) continue;
+ if (p->zone != ev->ec->zone) continue;
EINA_LIST_FOREACH(p->desks, l2, pd)
{
- pw = _pager_desk_window_find(pd, ev->border);
+ pw = _pager_desk_window_find(pd, ev->ec);
if (pw)
{
found = 1;
- if (ev->border->client.netwm.state.skip_pager)
+ if (ev->ec->netwm.state.skip_pager)
{
pd->wins = eina_list_remove(pd->wins, pw);
_pager_window_free(pw);
@@ -1596,24 +1585,24 @@ _pager_cb_event_border_property(void *data __UNUSED__, int type __UNUSED__, void
* the skip_pager state may have changed to 1 */
EINA_LIST_FOREACH(pagers, l, p)
{
- if ((p->zone != ev->border->zone) ||
- (_pager_window_find(p, ev->border)))
+ if ((p->zone != ev->ec->zone) ||
+ (_pager_window_find(p, ev->ec)))
continue;
- if (!ev->border->sticky)
+ if (!ev->ec->sticky)
{
- pd = _pager_desk_find(p, ev->border->desk);
- if ((pd) && (!_pager_desk_window_find(pd, ev->border)))
+ pd = _pager_desk_find(p, ev->ec->desk);
+ if ((pd) && (!_pager_desk_window_find(pd, ev->ec)))
{
- pw = _pager_window_new(pd, ev->border);
+ pw = _pager_window_new(pd, ev->ec);
if (pw)
{
Pager_Win *pw2 = NULL;
- E_Border *bd;
+ E_Client *ec;
pd->wins = eina_list_append(pd->wins, pw);
- bd = e_util_desk_border_above(pw->border);
- if (bd)
- pw2 = _pager_desk_window_find(pd, bd);
+ ec = e_util_desk_client_above(pw->client);
+ if (ec)
+ pw2 = _pager_desk_window_find(pd, ec);
if (pw2)
e_layout_child_lower_below(pw->o_window, pw2->o_window);
else
@@ -1626,17 +1615,17 @@ _pager_cb_event_border_property(void *data __UNUSED__, int type __UNUSED__, void
{
EINA_LIST_FOREACH(p->desks, l2, pd)
{
- if (_pager_desk_window_find(pd, ev->border)) continue;
- pw = _pager_window_new(pd, ev->border);
+ if (_pager_desk_window_find(pd, ev->ec)) continue;
+ pw = _pager_window_new(pd, ev->ec);
if (pw)
{
Pager_Win *pw2 = NULL;
- E_Border *bd;
+ E_Client *ec;
pd->wins = eina_list_append(pd->wins, pw);
- bd = e_util_desk_border_above(pw->border);
- if (bd)
- pw2 = _pager_desk_window_find(pd, bd);
+ ec = e_util_desk_client_above(pw->client);
+ if (ec)
+ pw2 = _pager_desk_window_find(pd, ec);
if (pw2)
e_layout_child_lower_below(pw->o_window, pw2->o_window);
else
@@ -1738,8 +1727,7 @@ _pager_cb_event_bg_update(void *data __UNUSED__, int type __UNUSED__, void *even
Eina_List *l, *ll;
Pager *p;
Pager_Desk *pd;
- E_Manager *man;
- E_Container *con;
+ E_Comp *comp;
E_Zone *zone;
E_Desk *desk;
@@ -1750,10 +1738,9 @@ _pager_cb_event_bg_update(void *data __UNUSED__, int type __UNUSED__, void *even
_pager_desk_livethumb_setup(pd);
return ECORE_CALLBACK_RENEW;
}
- man = e_manager_current_get();
- con = eina_list_nth(man->containers, ev->container);
- if (!con) return ECORE_CALLBACK_RENEW;
- zone = eina_list_nth(con->zones, ev->zone);
+ comp = eina_list_nth(e_comp_list(), ev->manager);
+ if (!comp) return ECORE_CALLBACK_RENEW;
+ zone = eina_list_nth(comp->zones, ev->zone);
if (!zone) return ECORE_CALLBACK_RENEW;
desk = e_desk_at_xy_get(zone, ev->desk_x, ev->desk_y);
if (!zone) return ECORE_CALLBACK_RENEW;
@@ -1768,9 +1755,9 @@ _pager_cb_event_bg_update(void *data __UNUSED__, int type __UNUSED__, void *even
}
static Eina_Bool
-_pager_cb_event_container_resize(void *data __UNUSED__, int type __UNUSED__, void *event)
+_pager_cb_event_compositor_resize(void *data __UNUSED__, int type __UNUSED__, void *event)
{
- E_Event_Container_Resize *ev = event;
+ E_Event_Compositor_Resize *ev = event;
Eina_List *l;
Pager *p;
@@ -1779,7 +1766,7 @@ _pager_cb_event_container_resize(void *data __UNUSED__, int type __UNUSED__, voi
Eina_List *l2;
Pager_Desk *pd;
- if (p->zone->container != ev->container) continue;
+ if (p->zone->comp != ev->comp) continue;
EINA_LIST_FOREACH(p->desks, l2, pd)
e_layout_virtual_size_set(pd->o_layout, pd->desk->zone->w,
@@ -1842,7 +1829,7 @@ _pager_window_cb_mouse_up(void *data, Evas *e __UNUSED__, Evas_Object *obj __UNU
if (!pw->drag.from_pager)
{
edje_object_signal_emit(pw->desk->o_desk, "e,action,drag,out", "e");
- e_comp_win_effect_unclip(pw->border->cw);
+ e_comp_object_effect_unclip(pw->client->frame);
if (!pw->drag.start) p->just_dragged = 1;
pw->drag.in_pager = 0;
pw->drag.start = 0;
@@ -1870,7 +1857,7 @@ _pager_window_cb_mouse_move(void *data, Evas *e __UNUSED__, Evas_Object *obj __U
pw = data;
if (!pw) return;
- if (pw->border->lock_user_location) return;
+ if (pw->client->lock_user_location) return;
if ((pw->desk->pager->popup) && (!act_popup)) return;
/* prevent drag for a few pixels */
if (pw->drag.start)
@@ -1885,7 +1872,7 @@ _pager_window_cb_mouse_move(void *data, Evas *e __UNUSED__, Evas_Object *obj __U
pw->desk->pager->dragging = 1;
pw->drag.start = 0;
- e_comp_win_effect_clip(pw->border->cw);
+ e_comp_object_effect_clip(pw->client->frame);
edje_object_signal_emit(pw->desk->o_desk, "e,action,drag,in", "e");
pw->desk->pager->active_drop_pd = pw->desk;
}
@@ -1910,20 +1897,21 @@ _pager_window_cb_mouse_move(void *data, Evas *e __UNUSED__, Evas_Object *obj __U
if (pd != pw->desk)
{
edje_object_signal_emit(pw->desk->o_desk, "e,action,drag,out", "e");
- e_border_desk_set(pw->border, pd->desk);
+ pw->client->hidden = 0;
+ e_client_desk_set(pw->client, pd->desk);
edje_object_signal_emit(pd->o_desk, "e,action,drag,in", "e");
pd->pager->active_drop_pd = pd;
}
- mx = E_CLAMP(vx + zx, zx, zx + zw - pw->border->w);
- my = E_CLAMP(vy + zy, zy, zy + zh - pw->border->h);
- e_border_move(pw->border, mx, my);
+ mx = E_CLAMP(vx + zx, zx, zx + zw - pw->client->w);
+ my = E_CLAMP(vy + zy, zy, zy + zh - pw->client->h);
+ evas_object_move(pw->client->frame, mx, my);
}
else
{
evas_object_geometry_get(pw->o_window, &x, &y, &w, &h);
evas_object_hide(pw->o_window);
- drag = e_drag_new(pw->desk->pager->zone->container,
+ drag = e_drag_new(pw->desk->pager->zone->comp,
x, y, drag_types, 2, pw, -1,
_pager_window_cb_drag_convert,
_pager_window_cb_drag_finished);
@@ -1933,17 +1921,17 @@ _pager_window_cb_mouse_move(void *data, Evas *e __UNUSED__, Evas_Object *obj __U
"e/modules/pager/window");
evas_object_show(o);
- oo = e_border_icon_add(pw->border, drag->evas);
+ oo = e_client_icon_add(pw->client, drag->evas);
if (oo)
{
evas_object_show(oo);
edje_object_part_swallow(o, "e.swallow.icon", oo);
- e_popup_object_add(drag->pop, oo);
}
e_drag_object_set(drag, o);
e_drag_resize(drag, w, h);
e_drag_start(drag, x - pw->drag.dx, y - pw->drag.dy);
+ e_comp_object_util_del_list_append(drag->comp_object, oo);
/* this prevents the desk from switching on drags */
pw->drag.from_pager = pw->desk->pager;
@@ -1960,7 +1948,7 @@ _pager_window_cb_drag_convert(E_Drag *drag, const char *type)
pw = drag->data;
if (!strcmp(type, "enlightenment/pager_win")) return pw;
- if (!strcmp(type, "enlightenment/border")) return pw->border;
+ if (!strcmp(type, "enlightenment/border")) return pw->client;
return NULL;
}
@@ -1968,7 +1956,7 @@ static void
_pager_window_cb_drag_finished(E_Drag *drag, int dropped)
{
Pager_Win *pw;
- E_Container *cont;
+ E_Comp *comp;
E_Zone *zone;
E_Desk *desk;
int x, y, dx, dy;
@@ -1981,21 +1969,21 @@ _pager_window_cb_drag_finished(E_Drag *drag, int dropped)
int zx, zy, zw, zh;
/* wasn't dropped (on pager). move it to position of mouse on screen */
- cont = e_container_current_get(e_manager_current_get());
- zone = e_zone_current_get(cont);
+ comp = e_util_comp_current_get();
+ zone = e_zone_current_get(comp);
desk = e_desk_current_get(zone);
- e_border_zone_set(pw->border, zone);
- if ((pw->border->desk != desk) && (desk == e_desk_current_get(zone)))
+ e_client_zone_set(pw->client, zone);
+ if ((pw->client->desk != desk) && desk->visible)
{
- e_border_desk_set(pw->border, desk);
- e_comp_win_effect_set(pw->border->cw, NULL);
+ pw->client->hidden = 0;
+ e_client_desk_set(pw->client, desk);
}
ecore_x_pointer_last_xy_get(&x, &y);
- dx = (pw->border->w / 2);
- dy = (pw->border->h / 2);
+ dx = (pw->client->w / 2);
+ dy = (pw->client->h / 2);
e_zone_useful_geometry_get(zone, &zx, &zy, &zw, &zh);
@@ -2003,23 +1991,24 @@ _pager_window_cb_drag_finished(E_Drag *drag, int dropped)
if (dx < x)
{
x -= dx;
- if ((pw->border->w < zw) &&
- (x + pw->border->w > zx + zw))
- x -= x + pw->border->w - (zx + zw);
+ if ((pw->client->w < zw) &&
+ (x + pw->client->w > zx + zw))
+ x -= x + pw->client->w - (zx + zw);
}
else x = 0;
if (dy < y)
{
y -= dy;
- if ((pw->border->h < zh) &&
- (y + pw->border->h > zy + zh))
- y -= y + pw->border->h - (zy + zh);
+ if ((pw->client->h < zh) &&
+ (y + pw->client->h > zy + zh))
+ y -= y + pw->client->h - (zy + zh);
}
else y = 0;
- e_border_move(pw->border, x, y);
+ evas_object_move(pw->client->frame, x, y);
- if (!(pw->border->lock_user_stacking)) e_border_raise(pw->border);
+ if (!(pw->client->lock_user_stacking))
+ evas_object_raise(pw->client->frame);
}
if (pw->desk->pager->active_drop_pd)
{
@@ -2028,7 +2017,7 @@ _pager_window_cb_drag_finished(E_Drag *drag, int dropped)
}
if (pw->drag.from_pager) pw->drag.from_pager->dragging = 0;
pw->drag.from_pager = NULL;
- e_comp_win_effect_unclip(pw->border->cw);
+ e_comp_object_effect_unclip(pw->client->frame);
if (act_popup)
{
e_grabinput_get(input_window, 0, input_window);
@@ -2114,7 +2103,7 @@ _pager_drop_cb_drop(void *data, const char *type, void *event_info)
E_Event_Dnd_Drop *ev;
Pager_Desk *pd;
Pager_Desk *pd2 = NULL;
- E_Border *bd = NULL;
+ E_Client *ec = NULL;
Eina_List *l;
int dx = 0, dy = 0;
Pager_Win *pw = NULL;
@@ -2135,18 +2124,18 @@ _pager_drop_cb_drop(void *data, const char *type, void *event_info)
pw = (Pager_Win *)(ev->data);
if (pw)
{
- bd = pw->border;
+ ec = pw->client;
dx = pw->drag.dx;
dy = pw->drag.dy;
}
}
else if (!strcmp(type, "enlightenment/border"))
{
- bd = ev->data;
- e_layout_coord_virtual_to_canvas(pd->o_layout, bd->x, bd->y,
+ ec = ev->data;
+ e_layout_coord_virtual_to_canvas(pd->o_layout, ec->x, ec->y,
&wx, &wy);
- e_layout_coord_virtual_to_canvas(pd->o_layout, bd->x + bd->w,
- bd->y + bd->h, &wx2, &wy2);
+ e_layout_coord_virtual_to_canvas(pd->o_layout, ec->x + ec->w,
+ ec->y + ec->h, &wx2, &wy2);
dx = (wx - wx2) / 2;
dy = (wy - wy2) / 2;
}
@@ -2159,26 +2148,21 @@ _pager_drop_cb_drop(void *data, const char *type, void *event_info)
else
return;
- if (bd)
+ if (ec)
{
- E_Maximize max = bd->maximized;
- E_Fullscreen fs = bd->fullscreen_policy;
- Eina_Bool fullscreen = bd->fullscreen;
-
- if (bd->iconic) e_border_uniconify(bd);
- if (bd->maximized)
- e_border_unmaximize(bd, E_MAXIMIZE_BOTH);
- if (fullscreen) e_border_unfullscreen(bd);
- if (pd->desk != e_desk_current_get(pd->desk->zone))
- e_border_hide(bd, 2);
- else
- {
- if ((pd->desk != bd->desk) && (pw))
- e_comp_win_effect_set(pw->border->cw, NULL);
- }
- e_border_desk_set(bd, pd->desk);
- e_border_raise(bd);
-
+ E_Maximize max = ec->maximized;
+ E_Fullscreen fs = ec->fullscreen_policy;
+ Eina_Bool fullscreen = ec->fullscreen;
+
+ if (ec->iconic) e_client_uniconify(ec);
+ if (ec->maximized)
+ e_client_unmaximize(ec, E_MAXIMIZE_BOTH);
+ if (fullscreen) e_client_unfullscreen(ec);
+ if (pd->desk->visible)
+ ec->hidden = 0;
+ e_client_desk_set(ec, pd->desk);
+ evas_object_raise(ec->frame);
+
if ((!max) && (!fullscreen))
{
int zx, zy, zw, zh, mx, my;
@@ -2190,12 +2174,12 @@ _pager_drop_cb_drop(void *data, const char *type, void *event_info)
e_zone_useful_geometry_get(pd->desk->zone,
&zx, &zy, &zw, &zh);
- mx = E_CLAMP(nx + zx, zx, zx + zw - bd->w);
- my = E_CLAMP(ny + zy, zy, zy + zh - bd->h);
- e_border_move(bd, mx, my);
+ mx = E_CLAMP(nx + zx, zx, zx + zw - ec->w);
+ my = E_CLAMP(ny + zy, zy, zy + zh - ec->h);
+ evas_object_move(ec->frame, mx, my);
}
- if (max) e_border_maximize(bd, max);
- if (fullscreen) e_border_fullscreen(bd, fs);
+ if (max) e_client_maximize(ec, max);
+ if (fullscreen) e_client_fullscreen(ec, fs);
}
}
@@ -2304,7 +2288,7 @@ _pager_desk_cb_mouse_move(void *data, Evas *e __UNUSED__, Evas_Object *obj __UNU
if (pd->drag.in_pager && pd->pager)
{
evas_object_geometry_get(pd->o_desk, &x, &y, &w, &h);
- drag = e_drag_new(pd->pager->zone->container,
+ drag = e_drag_new(pd->pager->zone->comp,
x, y, drag_types, 1, pd, -1,
NULL, _pager_desk_cb_drag_finished);
@@ -2319,15 +2303,15 @@ _pager_desk_cb_mouse_move(void *data, Evas *e __UNUSED__, Evas_Object *obj __UNU
oo = e_layout_add(drag->evas);
e_layout_virtual_size_set(oo, pd->pager->zone->w, pd->pager->zone->h);
edje_object_part_swallow(o, "e.swallow.content", oo);
- e_popup_object_add(drag->pop, oo);
+ e_comp_object_util_del_list_append(drag->comp_object, oo);
evas_object_show(oo);
EINA_LIST_FOREACH(pd->wins, l, pw)
{
int zx, zy;
- if ((!pw) || (pw->border->iconic)
- || (pw->border->client.netwm.state.skip_pager))
+ if ((!pw) || (pw->client->iconic)
+ || (pw->client->netwm.state.skip_pager))
continue;
o = edje_object_add(drag->evas);
@@ -2337,16 +2321,16 @@ _pager_desk_cb_mouse_move(void *data, Evas *e __UNUSED__, Evas_Object *obj __UNU
e_layout_child_raise(o);
e_zone_useful_geometry_get(pw->desk->desk->zone,
&zx, &zy, NULL, NULL);
- e_layout_child_move(o, pw->border->x - zx, pw->border->y - zy);
- e_layout_child_resize(o, pw->border->w, pw->border->h);
- e_popup_object_add(drag->pop, o);
+ e_layout_child_move(o, pw->client->x - zx, pw->client->y - zy);
+ e_layout_child_resize(o, pw->client->w, pw->client->h);
+ e_comp_object_util_del_list_append(drag->comp_object, o);
evas_object_show(o);
- if ((o_icon = e_border_icon_add(pw->border, drag->evas)))
+ if ((o_icon = e_client_icon_add(pw->client, drag->evas)))
{
evas_object_show(o_icon);
edje_object_part_swallow(o, "e.swallow.icon", o_icon);
- e_popup_object_add(drag->pop, o_icon);
+ e_comp_object_util_del_list_append(drag->comp_object, o_icon);
}
}
e_drag_resize(drag, w, h);
@@ -2444,11 +2428,11 @@ _pager_popup_show(void)
E_Zone *zone;
int x, y, w, h;
Pager_Popup *pp;
- const char *drop[] =
- {
- "enlightenment/pager_win", "enlightenment/border",
- "enlightenment/vdesktop"
- };
+ //const char *drop[] =
+ //{
+ //"enlightenment/pager_win", "enlightenment/border",
+ //"enlightenment/vdesktop"
+ //};
if ((act_popup) || (input_window)) return 0;
@@ -2457,7 +2441,7 @@ _pager_popup_show(void)
pp = _pager_popup_find(zone);
if (pp) _pager_popup_free(pp);
- input_window = ecore_x_window_input_new(zone->container->win, 0, 0, 1, 1);
+ input_window = ecore_x_window_input_new(zone->comp->win, 0, 0, 1, 1);
ecore_x_window_show(input_window);
if (!e_grabinput_get(input_window, 0, input_window))
{
@@ -2487,15 +2471,8 @@ _pager_popup_show(void)
act_popup = _pager_popup_new(zone, 1);
- e_popup_ignore_events_set(act_popup->popup, 1);
-
evas_object_geometry_get(act_popup->pager->o_table, &x, &y, &w, &h);
- e_drop_handler_add(E_OBJECT(act_popup->popup), act_popup->pager,
- _pager_drop_cb_enter, _pager_drop_cb_move,
- _pager_drop_cb_leave, _pager_drop_cb_drop,
- drop, 3, x, y, w, h);
-
current_desk = e_desk_current_get(zone);
return 1;
@@ -2618,7 +2595,7 @@ _pager_popup_cb_mouse_down(void *data __UNUSED__, int type __UNUSED__, void *eve
ev = event;
if (ev->window != input_window) return ECORE_CALLBACK_PASS_ON;
- evas_event_feed_mouse_down(pp->popup->evas, ev->buttons,
+ evas_event_feed_mouse_down(evas_object_evas_get(pp->popup), ev->buttons,
0, ev->timestamp, NULL);
return ECORE_CALLBACK_PASS_ON;
}
@@ -2632,7 +2609,7 @@ _pager_popup_cb_mouse_up(void *data __UNUSED__, int type __UNUSED__, void *event
ev = event;
if (ev->window != input_window) return ECORE_CALLBACK_PASS_ON;
- evas_event_feed_mouse_up(pp->popup->evas, ev->buttons,
+ evas_event_feed_mouse_up(evas_object_evas_get(pp->popup), ev->buttons,
0, ev->timestamp, NULL);
return ECORE_CALLBACK_PASS_ON;
}
@@ -2642,13 +2619,15 @@ _pager_popup_cb_mouse_move(void *data __UNUSED__, int type __UNUSED__, void *eve
{
Ecore_Event_Mouse_Move *ev;
Pager_Popup *pp = act_popup;
+ int x, y;
ev = event;
if (ev->window != input_window) return 1;
- evas_event_feed_mouse_move(pp->popup->evas,
- ev->x - pp->popup->x + pp->pager->zone->x,
- ev->y - pp->popup->y + pp->pager->zone->y,
+ evas_object_geometry_get(pp->popup, &x, &y, NULL, NULL);
+ evas_event_feed_mouse_move(evas_object_evas_get(pp->popup),
+ ev->x - x + pp->pager->zone->x,
+ ev->y - y + pp->pager->zone->y,
ev->timestamp, NULL);
return ECORE_CALLBACK_PASS_ON;
}
@@ -2872,28 +2851,26 @@ e_modapi_init(E_Module *m)
E_CONFIG_LIMIT(pager_config->btn_desk, 0, 32);
E_CONFIG_LIMIT(pager_config->disable_live_preview, 0, 1);
- E_LIST_HANDLER_APPEND(pager_config->handlers, E_EVENT_BORDER_RESIZE, _pager_cb_event_border_resize, NULL);
- E_LIST_HANDLER_APPEND(pager_config->handlers, E_EVENT_BORDER_MOVE, _pager_cb_event_border_move, NULL);
- E_LIST_HANDLER_APPEND(pager_config->handlers, E_EVENT_BORDER_ADD, _pager_cb_event_border_add, NULL);
- E_LIST_HANDLER_APPEND(pager_config->handlers, E_EVENT_BORDER_REMOVE, _pager_cb_event_border_remove, NULL);
- E_LIST_HANDLER_APPEND(pager_config->handlers, E_EVENT_BORDER_ICONIFY, _pager_cb_event_border_iconify, NULL);
- E_LIST_HANDLER_APPEND(pager_config->handlers, E_EVENT_BORDER_UNICONIFY, _pager_cb_event_border_uniconify, NULL);
- E_LIST_HANDLER_APPEND(pager_config->handlers, E_EVENT_BORDER_STICK, _pager_cb_event_border_stick, NULL);
- E_LIST_HANDLER_APPEND(pager_config->handlers, E_EVENT_BORDER_UNSTICK, _pager_cb_event_border_unstick, NULL);
- E_LIST_HANDLER_APPEND(pager_config->handlers, E_EVENT_BORDER_DESK_SET, _pager_cb_event_border_desk_set, NULL);
- E_LIST_HANDLER_APPEND(pager_config->handlers, E_EVENT_BORDER_STACK, _pager_cb_event_border_stack, NULL);
- E_LIST_HANDLER_APPEND(pager_config->handlers, E_EVENT_BORDER_ICON_CHANGE, _pager_cb_event_border_icon_change, NULL);
- E_LIST_HANDLER_APPEND(pager_config->handlers, E_EVENT_BORDER_URGENT_CHANGE, _pager_cb_event_border_urgent_change, NULL);
- E_LIST_HANDLER_APPEND(pager_config->handlers, E_EVENT_BORDER_FOCUS_IN,
- _pager_cb_event_border_focus_in, NULL);
- E_LIST_HANDLER_APPEND(pager_config->handlers, E_EVENT_BORDER_FOCUS_OUT,
- _pager_cb_event_border_focus_out, NULL);
- E_LIST_HANDLER_APPEND(pager_config->handlers, E_EVENT_BORDER_PROPERTY, _pager_cb_event_border_property, NULL);
- E_LIST_HANDLER_APPEND(pager_config->handlers, E_EVENT_ZONE_DESK_COUNT_SET, _pager_cb_event_zone_desk_count_set, NULL);
- E_LIST_HANDLER_APPEND(pager_config->handlers, E_EVENT_DESK_SHOW, _pager_cb_event_desk_show, NULL);
- E_LIST_HANDLER_APPEND(pager_config->handlers, E_EVENT_DESK_NAME_CHANGE, _pager_cb_event_desk_name_change, NULL);
- E_LIST_HANDLER_APPEND(pager_config->handlers, E_EVENT_CONTAINER_RESIZE, _pager_cb_event_container_resize, NULL);
- E_LIST_HANDLER_APPEND(pager_config->handlers, E_EVENT_BG_UPDATE, _pager_cb_event_bg_update, NULL);
+ E_LIST_HANDLER_APPEND(pager_config->handlers, E_EVENT_CLIENT_RESIZE, _pager_cb_event_client_resize, NULL);
+ E_LIST_HANDLER_APPEND(pager_config->handlers, E_EVENT_CLIENT_MOVE, _pager_cb_event_client_move, NULL);
+ E_LIST_HANDLER_APPEND(pager_config->handlers, E_EVENT_CLIENT_ADD, _pager_cb_event_client_add, NULL);
+ E_LIST_HANDLER_APPEND(pager_config->handlers, E_EVENT_CLIENT_REMOVE, _pager_cb_event_client_remove, NULL);
+ E_LIST_HANDLER_APPEND(pager_config->handlers, E_EVENT_CLIENT_ICONIFY, _pager_cb_event_client_iconify, NULL);
+ E_LIST_HANDLER_APPEND(pager_config->handlers, E_EVENT_CLIENT_UNICONIFY, _pager_cb_event_client_uniconify, NULL);
+ E_LIST_HANDLER_APPEND(pager_config->handlers, E_EVENT_CLIENT_STICK, _pager_cb_event_client_stick, NULL);
+ E_LIST_HANDLER_APPEND(pager_config->handlers, E_EVENT_CLIENT_UNSTICK, _pager_cb_event_client_unstick, NULL);
+ E_LIST_HANDLER_APPEND(pager_config->handlers, E_EVENT_CLIENT_DESK_SET, _pager_cb_event_client_desk_set, NULL);
+ E_LIST_HANDLER_APPEND(pager_config->handlers, E_EVENT_CLIENT_STACK, _pager_cb_event_client_stack, NULL);
+ E_LIST_HANDLER_APPEND(pager_config->handlers, E_EVENT_CLIENT_PROPERTY, _pager_cb_event_client_icon_change, NULL);
+ E_LIST_HANDLER_APPEND(pager_config->handlers, E_EVENT_CLIENT_PROPERTY, _pager_cb_event_client_urgent_change, NULL);
+ E_LIST_HANDLER_APPEND(pager_config->handlers, E_EVENT_CLIENT_FOCUS_IN, _pager_cb_event_client_focus_in, NULL);
+ E_LIST_HANDLER_APPEND(pager_config->handlers, E_EVENT_CLIENT_FOCUS_OUT, _pager_cb_event_client_focus_out, NULL);
+ E_LIST_HANDLER_APPEND(pager_config->handlers, E_EVENT_CLIENT_PROPERTY, _pager_cb_event_client_property, NULL);
+ E_LIST_HANDLER_APPEND(pager_config->handlers, E_EVENT_ZONE_DESK_COUNT_SET, _pager_cb_event_zone_desk_count_set, NULL);
+ E_LIST_HANDLER_APPEND(pager_config->handlers, E_EVENT_DESK_SHOW, _pager_cb_event_desk_show, NULL);
+ E_LIST_HANDLER_APPEND(pager_config->handlers, E_EVENT_DESK_NAME_CHANGE, _pager_cb_event_desk_name_change, NULL);
+ E_LIST_HANDLER_APPEND(pager_config->handlers, E_EVENT_COMPOSITOR_RESIZE, _pager_cb_event_compositor_resize, NULL);
+ E_LIST_HANDLER_APPEND(pager_config->handlers, E_EVENT_BG_UPDATE, _pager_cb_event_bg_update, NULL);
pager_config->module = m;
diff --git a/src/modules/quickaccess/e_mod_config.c b/src/modules/quickaccess/e_mod_config.c
index b28931f630..c36a0300b9 100644
--- a/src/modules/quickaccess/e_mod_config.c
+++ b/src/modules/quickaccess/e_mod_config.c
@@ -542,7 +542,7 @@ e_qa_config_entry_add(E_Quick_Access_Entry *entry)
}
E_Config_Dialog *
-e_int_config_qa_module(E_Container *con, const char *params __UNUSED__)
+e_int_config_qa_module(E_Comp *comp, const char *params __UNUSED__)
{
E_Config_Dialog *cfd;
E_Config_Dialog_View *v;
@@ -561,7 +561,7 @@ e_int_config_qa_module(E_Container *con, 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(con, _("Quickaccess Settings"),
+ cfd = e_config_dialog_new(comp, _("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 53b598f215..8ce758a0ba 100644
--- a/src/modules/quickaccess/e_mod_main.h
+++ b/src/modules/quickaccess/e_mod_main.h
@@ -20,7 +20,7 @@ typedef struct E_Quick_Access_Entry
const char *class; /* icccm class, stringshared */
const char *cmd; /* stringshared */
Ecore_X_Window win; /* current window */
- E_Border *border; /* associated border, if any */
+ E_Client *client; /* associated client, if any */
Ecore_Event_Handler *exe_handler; /* for catching exe delete */
Ecore_Exe *exe; /* if executed cmd but still no border associated */
E_Dialog *dia; // used for option handling
@@ -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_Container *con, const char *params __UNUSED__);
+E_Config_Dialog *e_int_config_qa_module(E_Comp *comp, 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 92f2883bf0..84ab78e95d 100644
--- a/src/modules/quickaccess/e_mod_quickaccess.c
+++ b/src/modules/quickaccess/e_mod_quickaccess.c
@@ -15,7 +15,7 @@ static E_Grab_Dialog *eg = NULL;
static Eina_List *_e_qa_border_hooks = NULL;
static Eina_List *_e_qa_event_handlers = NULL;
-static E_Border_Menu_Hook *border_hook = NULL;
+static E_Client_Menu_Hook *border_hook = NULL;
static Eina_Bool qa_running = EINA_FALSE;
@@ -82,15 +82,15 @@ _e_qa_entry_find_exe(const Ecore_Exe *exe)
}
static E_Quick_Access_Entry *
-_e_qa_entry_find_border(const E_Border *bd)
+_e_qa_entry_find_border(const E_Client *ec)
{
E_Quick_Access_Entry *entry;
const Eina_List *n;
EINA_LIST_FOREACH(qa_config->transient_entries, n, entry)
- if ((entry->win == bd->client.win) || (entry->border == bd))
+ if ((ec->pixmap && (entry->win == e_client_util_win_get(ec))) || (entry->client == ec))
return entry;
EINA_LIST_FOREACH(qa_config->entries, n, entry)
- if (entry->border == bd)
+ if (entry->client == ec)
return entry;
return NULL;
}
@@ -127,13 +127,13 @@ _e_qa_entry_find_match_stringshared(const char *name, const char *class, Eina_Bo
}
static E_Quick_Access_Entry *
-_e_qa_entry_find_match(const E_Border *bd, Eina_Bool nontrans)
+_e_qa_entry_find_match(const E_Client *ec, Eina_Bool nontrans)
{
const char *name, *class;
E_Quick_Access_Entry *entry;
- name = bd->client.icccm.name;
- class = bd->client.icccm.class;
+ name = ec->icccm.name;
+ class = ec->icccm.class;
entry = _e_qa_entry_find_match_stringshared(name, class, nontrans);
return entry;
@@ -156,11 +156,11 @@ _e_qa_event_exe_del_cb(void *data, int type __UNUSED__, Ecore_Exe_Event_Del *ev)
}
static void
-_e_qa_entry_border_props_restore(E_Quick_Access_Entry *entry __UNUSED__, E_Border *bd)
+_e_qa_entry_border_props_restore(E_Quick_Access_Entry *entry __UNUSED__, E_Client *ec)
{
#undef SET
#define SET(X) \
- bd->X = 0
+ ec->X = 0
SET(lock_user_iconify);
SET(lock_client_iconify);
@@ -170,35 +170,36 @@ _e_qa_entry_border_props_restore(E_Quick_Access_Entry *entry __UNUSED__, E_Borde
SET(sticky);
#undef SET
- bd->client.netwm.state.skip_taskbar = 0;
- bd->client.netwm.state.skip_pager = 0;
- bd->changed = 1;
+ ec->netwm.state.skip_taskbar = 0;
+ ec->netwm.state.skip_pager = 0;
+ ec->changed = 1;
}
static void
_e_qa_border_activate(E_Quick_Access_Entry *entry)
{
entry->config.hidden = 0;
- if (!entry->border) return;
- if (entry->border->iconic)
+ if (!entry->client) return;
+ if (entry->client->iconic)
{
- if (!entry->border->lock_user_iconify)
- e_border_uniconify(entry->border);
+ if (!entry->client->lock_user_iconify)
+ e_client_uniconify(entry->client);
}
- if (entry->border->shaded)
+ if (entry->client->shaded)
{
- if (!entry->border->lock_user_shade)
- e_border_unshade(entry->border, entry->border->shade.dir);
+ if (!entry->client->lock_user_shade)
+ e_client_unshade(entry->client, entry->client->shade_dir);
}
- else if (entry->border->desk && entry->config.jump)
+ else if (entry->client->desk && entry->config.jump)
{
- if (!entry->border->sticky) e_desk_show(entry->border->desk);
+ if (!entry->client->sticky) e_desk_show(entry->client->desk);
}
- if (!entry->border->lock_user_stacking)
- e_border_raise(entry->border);
- e_border_show(entry->border);
- if (!entry->border->lock_focus_out)
- e_border_focus_set_with_pointer(entry->border);
+ if (!entry->client->lock_user_stacking)
+ evas_object_raise(entry->client->frame);
+ entry->client->hidden = 0;
+ evas_object_show(entry->client->frame);
+ if (!entry->client->lock_focus_out)
+ e_client_focus_set_with_pointer(entry->client);
}
static void
@@ -206,33 +207,34 @@ _e_qa_border_deactivate(E_Quick_Access_Entry *entry)
{
if (entry->config.jump) return;
entry->config.hidden = 1;
- if (!entry->border) return;
- e_border_hide(entry->border, 3);
+ if (!entry->client) return;
+ entry->client->hidden = 1;
+ evas_object_hide(entry->client->frame);
}
static void
_e_qa_entry_border_props_apply(E_Quick_Access_Entry *entry)
{
- if (!entry->border) return;
+ if (!entry->client) return;
- if (entry->config.autohide && (!entry->border->focused))
+ if (entry->config.autohide && (!entry->client->focused))
_e_qa_border_deactivate(entry);
#define SET(X) \
- entry->border->X = 1
+ entry->client->X = 1
if (entry->config.jump)
{
- entry->border->client.netwm.state.skip_taskbar = 0;
- entry->border->client.netwm.state.skip_pager = 0;
+ entry->client->netwm.state.skip_taskbar = 0;
+ entry->client->netwm.state.skip_pager = 0;
}
else
{
if (qa_config->skip_taskbar)
- SET(client.netwm.state.skip_taskbar);
+ SET(netwm.state.skip_taskbar);
if (qa_config->skip_pager)
- SET(client.netwm.state.skip_pager);
+ SET(netwm.state.skip_pager);
SET(sticky);
}
- //bd->client.e.state.centered = 1;
+ //ec->e.state.centered = 1;
SET(lock_user_iconify);
SET(lock_client_iconify);
SET(lock_user_sticky);
@@ -243,11 +245,11 @@ _e_qa_entry_border_props_apply(E_Quick_Access_Entry *entry)
}
static void
-_e_qa_entry_border_associate(E_Quick_Access_Entry *entry, E_Border *bd)
+_e_qa_entry_border_associate(E_Quick_Access_Entry *entry, E_Client *ec)
{
if (entry->exe) entry->exe = NULL; /* not waiting anymore */
- entry->border = bd;
+ entry->client = ec;
/* FIXME: doesn't work, causes window to flicker on associate
if (entry->config.hidden)
_e_qa_border_deactivate(entry);
@@ -264,7 +266,7 @@ _e_qa_entry_relaunch_setup_continue(void *data, E_Dialog *dia)
if (dia) e_object_del(E_OBJECT(dia));
entry->dia = NULL;
- if (!entry->border->client.icccm.command.argv)
+ if (!entry->client->icccm.command.argv)
{
e_util_dialog_show(_("Quickaccess Error"), _("Could not determine command for starting this application!"));
/* FIXME: e_entry_dialog? */
@@ -272,12 +274,12 @@ _e_qa_entry_relaunch_setup_continue(void *data, E_Dialog *dia)
}
entry->config.relaunch = 1;
buf[0] = 0;
- for (i = 0; i < entry->border->client.icccm.command.argc; i++)
+ for (i = 0; i < entry->client->icccm.command.argc; i++)
{
if ((sizeof(buf) - strlen(buf)) <
- (strlen(entry->border->client.icccm.command.argv[i]) - 2))
+ (strlen(entry->client->icccm.command.argv[i]) - 2))
break;
- strcat(buf, entry->border->client.icccm.command.argv[i]);
+ strcat(buf, entry->client->icccm.command.argv[i]);
strcat(buf, " ");
}
entry->cmd = eina_stringshare_add(buf);
@@ -390,7 +392,7 @@ _e_qa_entry_relaunch_setup(E_Quick_Access_Entry *entry)
entry->config.relaunch = 0;
return;
}
- if (!entry->border->client.icccm.command.argv)
+ if (!entry->client->icccm.command.argv)
{
free(opt);
e_util_dialog_show(_("Quickaccess Error"), _("Could not determine command for starting this application!"));
@@ -399,16 +401,16 @@ _e_qa_entry_relaunch_setup(E_Quick_Access_Entry *entry)
}
buf[0] = 0;
- for (i = 0; i < entry->border->client.icccm.command.argc; i++)
+ for (i = 0; i < entry->client->icccm.command.argc; i++)
{
if ((sizeof(buf) - strlen(buf)) <
- (strlen(entry->border->client.icccm.command.argv[i]) - 2))
+ (strlen(entry->client->icccm.command.argv[i]) - 2))
break;
- strcat(buf, entry->border->client.icccm.command.argv[i]);
+ strcat(buf, entry->client->icccm.command.argv[i]);
strcat(buf, " ");
}
name = entry->name;
- entry->name = eina_stringshare_printf("e-%s-%u", entry->name, entry->border->client.netwm.pid);
+ entry->name = eina_stringshare_printf("e-%s-%u", entry->name, entry->client->netwm.pid);
while (i)
{
i = 0;
@@ -419,7 +421,7 @@ _e_qa_entry_relaunch_setup(E_Quick_Access_Entry *entry)
if ((e->name == entry->name) || (e->id == entry->name))
{
eina_stringshare_del(entry->name);
- entry->name = eina_stringshare_printf("e-%s-%u%d", entry->name, entry->border->client.netwm.pid, i);
+ entry->name = eina_stringshare_printf("e-%s-%u%d", entry->name, entry->client->netwm.pid, i);
i++;
break;
}
@@ -463,13 +465,13 @@ _e_qa_border_new(E_Quick_Access_Entry *entry)
static void
_e_qa_del_cb(E_Object *obj __UNUSED__, const char *params __UNUSED__)
{
- _e_qa_bd_menu_del(_e_qa_entry_find_border(e_border_focused_get()), NULL, NULL);
+ _e_qa_bd_menu_del(_e_qa_entry_find_border(e_client_focused_get()), NULL, NULL);
}
static void
_e_qa_add_cb(E_Object *obj __UNUSED__, const char *params __UNUSED__)
{
- _e_qa_bd_menu_del(e_border_focused_get(), NULL, NULL);
+ _e_qa_bd_menu_del(e_client_focused_get(), NULL, NULL);
}
static void
@@ -492,11 +494,11 @@ _e_qa_toggle_cb(E_Object *obj __UNUSED__, const char *params)
return;
}
- if (entry->border)
+ if (entry->client)
{
if (entry->help_watch)
_e_qa_help_activate_hook(entry);
- if ((!entry->config.jump) && entry->border->visible && ((entry->border->client.icccm.accepts_focus && entry->border->focused) || entry->config.hide_when_behind))
+ if ((!entry->config.jump) && evas_object_visible_get(entry->client->frame) && ((entry->client->icccm.accepts_focus && entry->client->focused) || entry->config.hide_when_behind))
{
_e_qa_border_deactivate(entry);
return;
@@ -515,27 +517,27 @@ _e_qa_toggle_cb(E_Object *obj __UNUSED__, const char *params)
}
static void
-_e_qa_border_eval_pre_post_fetch_cb(void *data __UNUSED__, void *border)
+_e_qa_border_eval_pre_post_fetch_cb(void *data __UNUSED__, E_Client *ec)
{
- E_Border *bd = border;
E_Quick_Access_Entry *entry;
- if ((!bd->new_client) || (bd->internal)) return;
- if ((!bd->client.icccm.class) || (!bd->client.icccm.class[0])) return;
- if ((!bd->client.icccm.name) || (!bd->client.icccm.name[0])) return;
+ if (e_client_util_ignored_get(ec)) return;
+ if ((!ec->new_client) || (ec->internal)) return;
+ if ((!ec->icccm.class) || (!ec->icccm.class[0])) return;
+ if ((!ec->icccm.name) || (!ec->icccm.name[0])) return;
- entry = _e_qa_entry_find_match(bd, 0);
+ entry = _e_qa_entry_find_match(ec, 0);
if (!entry) return;
- DBG("border=%p matches entry %s", bd, entry->id);
- _e_qa_entry_border_associate(entry, bd);
+ DBG("border=%p matches entry %s", ec, entry->id);
+ _e_qa_entry_border_associate(entry, ec);
}
static Eina_Bool
-_e_qa_event_border_focus_out_cb(void *data __UNUSED__, int type __UNUSED__, E_Event_Border_Focus_Out *ev)
+_e_qa_event_border_focus_out_cb(void *data __UNUSED__, int type __UNUSED__, E_Event_Client *ev)
{
E_Quick_Access_Entry *entry;
- entry = _e_qa_entry_find_border(ev->border);
+ entry = _e_qa_entry_find_border(ev->ec);
if (entry && entry->config.autohide) _e_qa_border_deactivate(entry);
return ECORE_CALLBACK_RENEW;
}
@@ -546,17 +548,17 @@ _e_qa_event_module_init_end_cb(void *data __UNUSED__, int type __UNUSED__, void
Eina_List *l, *ll;
E_Quick_Access_Entry *entry;
unsigned int count;
- E_Border *bd;
+ E_Client *ec;
/* assume that by now, e has successfully placed all windows */
count = eina_list_count(qa_config->transient_entries);
EINA_LIST_FOREACH_SAFE(qa_config->transient_entries, l, ll, entry)
{
- if (entry->border) continue;
- entry->border = e_border_find_by_client_window(entry->win);
- if (entry->border)
+ if (entry->client) continue;
+ entry->client = e_pixmap_find_client(E_PIXMAP_TYPE_X, entry->win);
+ if (entry->client)
{
DBG("qa window for %u:transient:%s still exists; restoring", entry->win, entry->id);
- _e_qa_entry_border_associate(entry, entry->border);
+ _e_qa_entry_border_associate(entry, entry->client);
continue;
}
DBG("qa window for %u:transient:%s no longer exists; deleting", entry->win, entry->id);
@@ -567,38 +569,42 @@ _e_qa_event_module_init_end_cb(void *data __UNUSED__, int type __UNUSED__, void
count = 0;
EINA_LIST_FOREACH(qa_config->entries, l, entry)
{
- if (entry->config.relaunch && (!entry->border))
+ if (entry->config.relaunch && (!entry->client))
{
DBG("qa window for relaunch entry %s not present, starting", entry->id);
_e_qa_border_new(entry);
}
- if (entry->border) continue;
+ if (entry->client) continue;
count++;
}
if (count)
{
+ E_Comp *comp;
+ const Eina_List *lll;
/* some non-transient entries exist without assigned borders
* try assigning from existing borders
*/
- EINA_LIST_FOREACH(e_border_client_list(), l, bd)
- {
- entry = _e_qa_entry_find_match(bd, 1);
- if ((!entry) || entry->border) continue;
- DBG("border=%p matches entry %s", bd, entry->id);
- _e_qa_entry_border_associate(entry, bd);
- count--;
- if (!count) break;
- }
+ EINA_LIST_FOREACH(e_comp_list(), lll, comp)
+ EINA_LIST_FOREACH(comp->clients, l, ec)
+ {
+ if (e_client_util_ignored_get(ec)) continue;
+ entry = _e_qa_entry_find_match(ec, 1);
+ if ((!entry) || entry->client) continue;
+ DBG("border=%p matches entry %s", ec, entry->id);
+ _e_qa_entry_border_associate(entry, ec);
+ count--;
+ if (!count) break;
+ }
}
return ECORE_CALLBACK_RENEW;
}
static Eina_Bool
-_e_qa_event_border_remove_cb(void *data __UNUSED__, int type __UNUSED__, E_Event_Border_Remove *ev)
+_e_qa_event_border_remove_cb(void *data __UNUSED__, int type __UNUSED__, E_Event_Client *ev)
{
E_Quick_Access_Entry *entry;
- entry = _e_qa_entry_find_border(ev->border);
+ entry = _e_qa_entry_find_border(ev->ec);
if (!entry) return ECORE_CALLBACK_RENEW;
if (entry->transient)
{
@@ -607,7 +613,7 @@ _e_qa_event_border_remove_cb(void *data __UNUSED__, int type __UNUSED__, E_Event
return ECORE_CALLBACK_RENEW;
}
else if (entry->config.relaunch) _e_qa_border_new(entry);
- entry->border = NULL;
+ entry->client = NULL;
return ECORE_CALLBACK_RENEW;
}
@@ -624,25 +630,25 @@ _e_qa_entry_transient_convert(E_Quick_Access_Entry *entry)
return;
}
entry->transient = EINA_TRUE;
- entry->win = entry->border->client.win;
+ entry->win = e_client_util_win_get(entry->client);
eina_list_move(&qa_config->transient_entries, &qa_config->entries, entry);
eina_stringshare_replace(&entry->cmd, NULL);
entry->config.relaunch = 0;
}
static E_Quick_Access_Entry *
-_e_qa_entry_transient_new(E_Border *bd)
+_e_qa_entry_transient_new(E_Client *ec)
{
E_Quick_Access_Entry *entry;
char buf[8192];
- snprintf(buf, sizeof(buf), "%s:%u:%s", bd->client.icccm.name ?: "", bd->client.win, bd->client.icccm.class ?: "");
+ snprintf(buf, sizeof(buf), "%s:%u:%s", ec->icccm.name ?: "", (unsigned int)e_client_util_win_get(ec), ec->icccm.class ?: "");
entry = e_qa_entry_new(buf, EINA_TRUE);
- entry->win = bd->client.win;
- entry->name = eina_stringshare_ref(bd->client.icccm.name);
- entry->class = eina_stringshare_ref(bd->client.icccm.class);
- _e_qa_entry_border_associate(entry, bd);
+ entry->win = e_client_util_win_get(ec);
+ entry->name = eina_stringshare_ref(ec->icccm.name);
+ entry->class = eina_stringshare_ref(ec->icccm.class);
+ _e_qa_entry_border_associate(entry, ec);
qa_config->transient_entries = eina_list_append(qa_config->transient_entries, entry);
e_config_save_queue();
return entry;
@@ -652,7 +658,7 @@ static Eina_Bool
_grab_key_down_cb(void *data, int type __UNUSED__, void *event)
{
Ecore_Event_Key *ev = event;
- E_Border *bd = data;
+ E_Client *ec = data;
E_Config_Binding_Key *bi;
E_Quick_Access_Entry *entry;
unsigned int mod = E_BINDING_MODIFIER_NONE;
@@ -678,7 +684,7 @@ _grab_key_down_cb(void *data, int type __UNUSED__, void *event)
e_object_del(E_OBJECT(eg));
return ECORE_CALLBACK_RENEW;
}
- entry = _e_qa_entry_transient_new(bd);
+ entry = _e_qa_entry_transient_new(ec);
bi = E_NEW(E_Config_Binding_Key, 1);
@@ -732,7 +738,7 @@ _e_qa_bd_menu_jump(void *data, E_Menu *m __UNUSED__, E_Menu_Item *mi __UNUSED__)
if (entry->config.jump)
{
entry->config.autohide = entry->config.hide_when_behind = 0;
- _e_qa_entry_border_props_restore(entry, entry->border);
+ _e_qa_entry_border_props_restore(entry, entry->client);
}
else
_e_qa_entry_border_props_apply(entry);
@@ -780,11 +786,11 @@ _e_qa_bd_menu_config(void *data __UNUSED__, E_Menu *m __UNUSED__, E_Menu_Item *m
static void
_e_qa_bd_menu_add(void *data, E_Menu *m __UNUSED__, E_Menu_Item *mi __UNUSED__)
{
- E_Border *bd = data;
- if (!bd) return;
+ E_Client *ec = data;
+ if (!ec) return;
if (eg) return;
- eg = e_grab_dialog_show(NULL, EINA_FALSE, _grab_key_down_cb, NULL, NULL, bd);
- e_object_data_set(E_OBJECT(eg), bd);
+ eg = e_grab_dialog_show(NULL, EINA_FALSE, _grab_key_down_cb, NULL, NULL, ec);
+ e_object_data_set(E_OBJECT(eg), ec);
e_object_del_attach_func_set(E_OBJECT(eg), _grab_wnd_hide);
}
@@ -860,20 +866,20 @@ _e_qa_bd_menu_pre(void *data, E_Menu *m __UNUSED__, E_Menu_Item *mi)
}
static void
-_e_qa_bd_menu_hook(void *d __UNUSED__, E_Border *bd)
+_e_qa_bd_menu_hook(void *d __UNUSED__, E_Client *ec)
{
E_Menu_Item *mi;
E_Menu *m;
E_Quick_Access_Entry *entry;
char buf[PATH_MAX];
- if (!bd->border_menu) return;
- m = bd->border_menu;
+ if (!ec->border_menu) return;
+ m = ec->border_menu;
/* position menu item just before first separator */
mi = m->items->next->data;
mi = e_menu_item_new_relative(m, mi);
- entry = _e_qa_entry_find_border(bd);
+ entry = _e_qa_entry_find_border(ec);
if (entry)
{
e_menu_item_label_set(mi, _("Quickaccess..."));
@@ -883,7 +889,7 @@ _e_qa_bd_menu_hook(void *d __UNUSED__, E_Border *bd)
else
{
e_menu_item_label_set(mi, _("Add Quickaccess"));
- e_menu_item_callback_set(mi, _e_qa_bd_menu_add, bd);
+ e_menu_item_callback_set(mi, _e_qa_bd_menu_add, ec);
}
snprintf(buf, sizeof(buf), "%s/e-module-quickaccess.edj", e_module_dir_get(qa_mod->module));
e_menu_item_icon_edje_set(mi, buf, "icon");
@@ -905,7 +911,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->border);
+ entry = _e_qa_entry_find_border(qa_mod->demo_dia->win->client);
e_qa_entry_free(entry);
e_object_del(E_OBJECT(qa_mod->demo_dia));
}
@@ -982,7 +988,7 @@ _e_qa_help5(void *data __UNUSED__)
{
char buf[PATH_MAX];
- if (_e_qa_entry_find_border(qa_mod->demo_dia->win->border))
+ if (_e_qa_entry_find_border(qa_mod->demo_dia->win->client))
{
qa_mod->help_timer = ecore_timer_add(1, _e_qa_help_timer_cb, NULL);
return;
@@ -1034,7 +1040,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->border));
+ _e_qa_border_activate(_e_qa_entry_find_border(qa_mod->demo_dia->win->client));
qa_mod->help_dia = (E_Object*)e_confirm_dialog_show(_("Quickaccess Help"), buf,
_("Well done.<br>"
"Now to delete the entry we just made..."),
@@ -1063,7 +1069,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->border)))
+ if ((!qa_mod->demo_dia) || (!_e_qa_entry_find_border(qa_mod->demo_dia->win->client)))
{
_e_qa_help_timeout(NULL);
return;
@@ -1101,11 +1107,11 @@ _e_qa_help_bd_menu2_del(void *data __UNUSED__)
static Eina_Bool
_e_qa_help_timer_helper(void)
{
- E_Border *bd;
+ E_Client *ec;
E_Menu_Item *mi;
Eina_List *items;
- bd = qa_mod->demo_dia->win->border;
+ ec = qa_mod->demo_dia->win->client;
ecore_timer_interval_set(qa_mod->help_timer, 0.2);
mi = e_menu_item_active_get();
if (qa_mod->menu)
@@ -1136,7 +1142,7 @@ _e_qa_help_timer_helper(void)
qa_mod->help_timer = NULL;
return EINA_FALSE;
}
- items = bd->border_menu->items;
+ items = ec->border_menu->items;
}
do
{
@@ -1158,17 +1164,17 @@ _e_qa_help_timer_helper(void)
static Eina_Bool
_e_qa_help_timer2_cb(void *data __UNUSED__)
{
- E_Border *bd;
+ E_Client *ec;
- if ((!qa_mod->demo_dia) || (!qa_mod->demo_dia->win) || (!qa_mod->demo_dia->win->border))
+ if ((!qa_mod->demo_dia) || (!qa_mod->demo_dia->win) || (!qa_mod->demo_dia->win->client))
/* FIXME */
return EINA_TRUE;
- bd = qa_mod->demo_dia->win->border;
+ ec = qa_mod->demo_dia->win->client;
switch (qa_mod->demo_state)
{
case 0:
- e_object_free_attach_func_set(E_OBJECT(bd->border_menu), _e_qa_help_bd_menu2_del);
+ e_object_free_attach_func_set(E_OBJECT(ec->border_menu), _e_qa_help_bd_menu2_del);
break;
default:
if (_e_qa_help_timer_helper()) break;
@@ -1182,19 +1188,19 @@ _e_qa_help_timer2_cb(void *data __UNUSED__)
static Eina_Bool
_e_qa_help_timer_cb(void *data __UNUSED__)
{
- E_Border *bd;
+ E_Client *ec;
- if ((!qa_mod->demo_dia) || (!qa_mod->demo_dia->win) || (!qa_mod->demo_dia->win->border))
+ if ((!qa_mod->demo_dia) || (!qa_mod->demo_dia->win) || (!qa_mod->demo_dia->win->client))
/* wait longer */
return EINA_TRUE;
- bd = qa_mod->demo_dia->win->border;
+ ec = qa_mod->demo_dia->win->client;
switch (qa_mod->demo_state)
{
case 0:
- e_int_border_menu_show(bd, bd->x + bd->w * .5, bd->y + 5, 0, 0);
+ e_int_client_menu_show(ec, ec->x + ec->w * .5, ec->y + 5, 0, 0);
ecore_timer_interval_set(qa_mod->help_timer, 0.8);
- e_object_free_attach_func_set(E_OBJECT(bd->border_menu), _e_qa_help_bd_menu_del);
+ e_object_free_attach_func_set(E_OBJECT(ec->border_menu), _e_qa_help_bd_menu_del);
break;
default:
if (!_e_qa_help_timer_helper()) return EINA_FALSE;
@@ -1298,7 +1304,7 @@ Eina_Bool
e_qa_init(void)
{
Ecore_Event_Handler *eh;
- E_Border_Hook *h;
+ E_Client_Hook *h;
_act_toggle = eina_stringshare_add("qa_toggle");
_e_qa_toggle = e_action_add(_act_toggle);
@@ -1315,7 +1321,7 @@ e_qa_init(void)
return EINA_FALSE;
}
#define CB(id, func) \
- h = e_border_hook_add(E_BORDER_HOOK_##id, _e_qa_border_##func##_cb, NULL); \
+ h = e_client_hook_add(E_CLIENT_HOOK_##id, _e_qa_border_##func##_cb, NULL); \
_e_qa_border_hooks = eina_list_append(_e_qa_border_hooks, h)
CB(EVAL_PRE_POST_FETCH, eval_pre_post_fetch);
@@ -1325,8 +1331,8 @@ e_qa_init(void)
eh = ecore_event_handler_add(id, (Ecore_Event_Handler_Cb)_e_qa_event_##func##_cb, NULL); \
_e_qa_event_handlers = eina_list_append(_e_qa_event_handlers, eh)
- CB(E_EVENT_BORDER_FOCUS_OUT, border_focus_out);
- CB(E_EVENT_BORDER_REMOVE, border_remove);
+ CB(E_EVENT_CLIENT_FOCUS_OUT, border_focus_out);
+ CB(E_EVENT_CLIENT_REMOVE, border_remove);
CB(E_EVENT_MODULE_INIT_END, module_init_end);
CB(ECORE_EXE_EVENT_DEL, exe_del);
#undef CB
@@ -1339,7 +1345,7 @@ e_qa_init(void)
e_action_predef_name_set(_e_qa_name, _lbl_del, _act_del, NULL, NULL, 0);
INF("loaded qa module, registered %s action.", _act_toggle);
- border_hook = e_int_border_menu_hook_add(_e_qa_bd_menu_hook, NULL);
+ border_hook = e_int_client_menu_hook_add(_e_qa_bd_menu_hook, NULL);
if (!qa_config->first_run) _e_qa_first_run();
return EINA_TRUE;
@@ -1371,10 +1377,10 @@ e_qa_shutdown(void)
}
E_FREE_LIST(_e_qa_event_handlers, ecore_event_handler_del);
- E_FREE_LIST(_e_qa_border_hooks, e_border_hook_del);
+ E_FREE_LIST(_e_qa_border_hooks, e_client_hook_del);
if (qa_mod->help_timeout) ecore_timer_del(qa_mod->help_timeout);
_e_qa_help_timeout(NULL);
- e_int_border_menu_hook_del(border_hook);
+ e_int_client_menu_hook_del(border_hook);
border_hook = NULL;
INF("unloaded quickaccess module, unregistered %s action.", _act_toggle);
eina_stringshare_del(_act_toggle);
@@ -1387,7 +1393,7 @@ e_qa_entry_free(E_Quick_Access_Entry *entry)
{
if (!entry) return;
if (entry->exe_handler) ecore_event_handler_del(entry->exe_handler);
- if (entry->border) _e_qa_entry_border_props_restore(entry, entry->border);
+ if (entry->client) _e_qa_entry_border_props_restore(entry, entry->client);
if (entry->cfg_entry) e_qa_config_entry_free(entry);
e_qa_entry_bindings_cleanup(entry);
e_bindings_reset();
diff --git a/src/modules/shot/e_mod_main.c b/src/modules/shot/e_mod_main.c
index 4d990dbad6..2efdfea93d 100644
--- a/src/modules/shot/e_mod_main.c
+++ b/src/modules/shot/e_mod_main.c
@@ -20,7 +20,7 @@ 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;
static E_Manager *sman = NULL;
-static E_Container *scon = NULL;
+static E_Comp *scomp = NULL;
static int quality = 90;
static int screen = -1;
#define MAXZONES 64
@@ -36,7 +36,7 @@ static Ecore_Con_Url *url_up = NULL;
static Eina_List *handlers = NULL;
static char *url_ret = NULL;
static E_Dialog *fsel_dia = NULL;
-static E_Border_Menu_Hook *border_hook = NULL;
+static E_Client_Menu_Hook *border_hook = NULL;
static void _file_select_ok_cb(void *data __UNUSED__, E_Dialog *dia);
static void _file_select_cancel_cb(void *data __UNUSED__, E_Dialog *dia);
@@ -148,7 +148,7 @@ _screen_change_cb(void *data __UNUSED__, Evas_Object *obj __UNUSED__, void *even
Eina_List *l;
E_Zone *z;
- EINA_LIST_FOREACH(scon->zones, l, z)
+ EINA_LIST_FOREACH(scomp->zones, l, z)
{
if (screen == -1)
evas_object_color_set(o_rectdim[z->num], 0, 0, 0, 0);
@@ -181,7 +181,7 @@ _save_to(const char *file)
Eina_List *l;
E_Zone *z = NULL;
- EINA_LIST_FOREACH(scon->zones, l, z)
+ EINA_LIST_FOREACH(scomp->zones, l, z)
{
if (screen == (int)z->num) break;
z = NULL;
@@ -271,7 +271,7 @@ _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(scon, "E", "_e_shot_fsel");
+ fsel_dia = dia = e_dialog_new(scomp, "E", "_e_shot_fsel");
e_dialog_resizable_set(dia, 1);
e_dialog_title_set(dia, _("Select screenshot save location"));
o = e_widget_fsel_add(dia->win->evas, "desktop", "/",
@@ -516,7 +516,7 @@ _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(scon, "E", "_e_shot_share");
+ dia = e_dialog_new(scomp, "E", "_e_shot_share");
e_dialog_resizable_set(dia, 1);
e_dialog_title_set(dia, _("Uploading screenshot"));
@@ -578,7 +578,7 @@ _rect_down_cb(void *data __UNUSED__, Evas *e __UNUSED__, Evas_Object *obj __UNUS
if (ev->button != 1) return;
e_widget_radio_toggle_set(o_radio_all, 0);
- EINA_LIST_FOREACH(scon->zones, l, z)
+ EINA_LIST_FOREACH(scomp->zones, l, z)
{
if (obj == o_rectdim[z->num])
{
@@ -589,7 +589,7 @@ _rect_down_cb(void *data __UNUSED__, Evas *e __UNUSED__, Evas_Object *obj __UNUS
e_widget_radio_toggle_set(o_radio[z->num], 0);
}
- EINA_LIST_FOREACH(scon->zones, l, z)
+ EINA_LIST_FOREACH(scomp->zones, l, z)
{
if (screen == -1)
evas_object_color_set(o_rectdim[z->num], 0, 0, 0, 0);
@@ -601,7 +601,7 @@ _rect_down_cb(void *data __UNUSED__, Evas *e __UNUSED__, Evas_Object *obj __UNUS
}
static void
-_shot_now(E_Zone *zone, E_Border *bd)
+_shot_now(E_Zone *zone, E_Client *ec)
{
Ecore_X_Image *img;
unsigned char *src;
@@ -620,11 +620,11 @@ _shot_now(E_Zone *zone, E_Border *bd)
Ecore_X_Colormap colormap;
int depth;
- if ((!zone) && (!bd)) return;
+ if ((!zone) && (!ec)) return;
if (zone)
{
- sman = zone->container->manager;
- scon = zone->container;
+ sman = zone->comp->man;
+ scomp = zone->comp;
xwin = sman->root;
w = sw = sman->w;
h = sh = sman->h;
@@ -635,16 +635,16 @@ _shot_now(E_Zone *zone, E_Border *bd)
}
else
{
- xwin = e_comp_get(bd)->ee_win;
- x = bd->x, y = bd->y, sw = bd->w, sh = bd->h;
+ xwin = e_comp_get(ec)->ee_win;
+ x = ec->x, y = ec->y, sw = ec->w, sh = ec->h;
w = sw;
h = sh;
- x = E_CLAMP(x, bd->zone->x, bd->zone->x + bd->zone->w);
- y = E_CLAMP(y, bd->zone->y, bd->zone->y + bd->zone->h);
- sw = E_CLAMP(sw, 0, bd->zone->x + bd->zone->w - x);
- sh = E_CLAMP(sh, 0, bd->zone->y + bd->zone->h - y);
- visual = bd->client.initial_attributes.visual;
- depth = bd->client.initial_attributes.depth;
+ x = E_CLAMP(x, ec->zone->x, ec->zone->x + ec->zone->w);
+ y = E_CLAMP(y, ec->zone->y, ec->zone->y + ec->zone->h);
+ sw = E_CLAMP(sw, 0, ec->zone->x + ec->zone->w - x);
+ sh = E_CLAMP(sh, 0, ec->zone->y + ec->zone->h - y);
+ visual = e_pixmap_visual_get(ec->pixmap);
+ depth = ec->depth;
}
img = ecore_x_image_new(w, h, visual, depth);
ecore_x_image_get(img, xwin, x, y, 0, 0, sw, sh);
@@ -658,7 +658,7 @@ _shot_now(E_Zone *zone, E_Border *bd)
dst, (sw * sizeof(int)), 0, 0);
if (win) e_object_del(E_OBJECT(win));
- win = e_win_new(e_container_current_get(e_manager_current_get()));
+ win = e_win_new(e_util_comp_current_get());
evas = e_win_evas_get(win);
e_win_title_set(win, _("Where to put Screenshot..."));
@@ -731,7 +731,7 @@ _shot_now(E_Zone *zone, E_Border *bd)
if (zone)
{
screen = -1;
- if (eina_list_count(scon->zones) > 1)
+ if (eina_list_count(scomp->zones) > 1)
{
Eina_List *l;
E_Zone *z;
@@ -746,7 +746,7 @@ _shot_now(E_Zone *zone, E_Border *bd)
evas_object_smart_callback_add(o, "changed", _screen_change_cb, NULL);
e_widget_framelist_object_append(ol, o);
i = 0;
- EINA_LIST_FOREACH(scon->zones, l, z)
+ EINA_LIST_FOREACH(scomp->zones, l, z)
{
char buf[32];
@@ -826,7 +826,7 @@ _shot_now(E_Zone *zone, E_Border *bd)
e_win_size_min_set(win, w, h);
e_win_size_max_set(win, 99999, 99999);
e_win_show(win);
- e_win_border_icon_set(win, "screenshot");
+ e_win_client_icon_set(win, "screenshot");
if (!e_widget_focus_get(o_bg)) e_widget_focus_set(o_box, 1);
}
@@ -848,10 +848,10 @@ _shot_delay_border(void *data)
}
static void
-_shot_border(E_Border *bd)
+_shot_border(E_Client *ec)
{
if (border_timer) ecore_timer_del(border_timer);
- border_timer = ecore_timer_add(1.0, _shot_delay_border, bd);
+ border_timer = ecore_timer_add(1.0, _shot_delay_border, ec);
}
static void
@@ -876,15 +876,15 @@ _e_mod_menu_cb(void *data __UNUSED__, E_Menu *m, E_Menu_Item *mi __UNUSED__)
static void
_e_mod_action_border_cb(E_Object *obj __UNUSED__, const char *params __UNUSED__)
{
- E_Border *bd;
- bd = e_border_focused_get();
- if (!bd) return;
+ E_Client *ec;
+ ec = e_client_focused_get();
+ if (!ec) return;
if (border_timer)
{
ecore_timer_del(border_timer);
border_timer = NULL;
}
- _shot_now(NULL, bd);
+ _shot_now(NULL, ec);
}
static void
@@ -896,8 +896,8 @@ _e_mod_action_cb(E_Object *obj, const char *params __UNUSED__)
{
if (obj->type == E_MANAGER_TYPE)
zone = e_util_zone_current_get((E_Manager *)obj);
- else if (obj->type == E_CONTAINER_TYPE)
- zone = e_util_zone_current_get(((E_Container *)obj)->manager);
+ else if (obj->type == E_COMP_TYPE)
+ zone = e_zone_current_get((E_Comp *)obj);
else if (obj->type == E_ZONE_TYPE)
zone = ((E_Zone *)obj);
else
@@ -905,23 +905,19 @@ _e_mod_action_cb(E_Object *obj, const char *params __UNUSED__)
}
if (!zone) zone = e_util_zone_current_get(e_manager_current_get());
if (!zone) return;
- if (timer)
- {
- ecore_timer_del(timer);
- timer = NULL;
- }
+ E_FREE_FUNC(timer, ecore_timer_del);
_shot_now(zone, NULL);
}
static void
-_bd_hook(void *d __UNUSED__, E_Border *bd)
+_bd_hook(void *d __UNUSED__, E_Client *ec)
{
E_Menu_Item *mi;
E_Menu *m;
Eina_List *l;
- if (!bd->border_menu) return;
- if (bd->iconic || (bd->desk != e_desk_current_get(bd->zone))) return;
- m = bd->border_menu;
+ if (!ec->border_menu) return;
+ if (ec->iconic || (ec->desk != e_desk_current_get(ec->zone))) return;
+ m = ec->border_menu;
/* position menu item just before first separator */
EINA_LIST_FOREACH(m->items, l, mi)
@@ -934,7 +930,7 @@ _bd_hook(void *d __UNUSED__, E_Border *bd)
mi = e_menu_item_new_relative(m, mi);
e_menu_item_label_set(mi, _("Take Shot"));
e_util_menu_item_theme_icon_set(mi, "screenshot");
- e_menu_item_callback_set(mi, _e_mod_menu_border_cb, bd);
+ e_menu_item_callback_set(mi, _e_mod_menu_border_cb, ec);
}
static void
@@ -984,7 +980,7 @@ e_modapi_init(E_Module *m)
}
maug = e_int_menus_menu_augmentation_add_sorted
("main/2", _("Take Screenshot"), _e_mod_menu_add, NULL, NULL, NULL);
- border_hook = e_int_border_menu_hook_add(_bd_hook, NULL);
+ border_hook = e_int_client_menu_hook_add(_bd_hook, NULL);
return m;
}
@@ -1015,7 +1011,7 @@ e_modapi_shutdown(E_Module *m __UNUSED__)
act = NULL;
}
shot_module = NULL;
- e_int_border_menu_hook_del(border_hook);
+ e_int_client_menu_hook_del(border_hook);
ecore_con_url_shutdown();
return 1;
}
diff --git a/src/modules/syscon/e_int_config_syscon.c b/src/modules/syscon/e_int_config_syscon.c
index 1ee28001ce..2cd8e3d182 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_Container *con, const char *params __UNUSED__)
+e_int_config_syscon(E_Comp *comp, const char *params __UNUSED__)
{
E_Config_Dialog *cfd;
E_Config_Dialog_View *v;
@@ -40,7 +40,7 @@ e_int_config_syscon(E_Container *con, const char *params __UNUSED__)
v->basic.create_widgets = _basic_create;
v->basic.check_changed = _basic_check_changed;
- cfd = e_config_dialog_new(con, _("Syscon Settings"),
+ cfd = e_config_dialog_new(comp, _("Syscon Settings"),
"E", "windows/conf_syscon",
"system-shutdown", 0, v, NULL);
return cfd;
diff --git a/src/modules/syscon/e_mod_main.c b/src/modules/syscon/e_mod_main.c
index 89ed80c518..14c08412fa 100644
--- a/src/modules/syscon/e_mod_main.c
+++ b/src/modules/syscon/e_mod_main.c
@@ -84,10 +84,10 @@ _e_mod_action_syscon_cb(E_Object *obj, const char *params)
{
if (obj->type == E_MANAGER_TYPE)
zone = e_util_zone_current_get((E_Manager *)obj);
- else if (obj->type == E_CONTAINER_TYPE)
- zone = e_util_zone_current_get(((E_Container *)obj)->manager);
+ else if (obj->type == E_COMP_TYPE)
+ zone = e_zone_current_get((E_Comp *)obj);
else if (obj->type == E_ZONE_TYPE)
- zone = e_util_zone_current_get(((E_Zone *)obj)->container->manager);
+ zone = e_util_zone_current_get(((E_Zone *)obj)->comp->man);
else
zone = e_util_zone_current_get(e_manager_current_get());
}
diff --git a/src/modules/syscon/e_mod_main.h b/src/modules/syscon/e_mod_main.h
index eadbf1f646..37262afb13 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_Container *con, const char *params __UNUSED__);
+E_Config_Dialog *e_int_config_syscon(E_Comp *comp, const char *params __UNUSED__);
void e_syscon_gadget_init(E_Module *m);
void e_syscon_gadget_shutdown(void);
diff --git a/src/modules/syscon/e_syscon.c b/src/modules/syscon/e_syscon.c
index a87f758c84..6e26cd7462 100644
--- a/src/modules/syscon/e_syscon.c
+++ b/src/modules/syscon/e_syscon.c
@@ -10,8 +10,7 @@ static void _cb_signal_action_extra(void *data, Evas_Object *obj, const cha
static Eina_Bool _cb_timeout_defaction(void *data);
/* local subsystem globals */
-static E_Popup *popup = NULL;
-static Ecore_X_Window input_window = 0;
+static Evas_Object *popup = NULL;
static const char *do_defact = NULL;
static Eina_List *handlers = NULL;
static Evas_Object *o_bg = NULL;
@@ -48,6 +47,7 @@ e_syscon_show(E_Zone *zone, const char *defact)
int iw, ih;
Eina_List *l;
double t;
+ Evas *evas;
t = ecore_loop_time_get();
if (popup)
@@ -74,24 +74,11 @@ e_syscon_show(E_Zone *zone, const char *defact)
return 0;
}
- input_window = e_comp_get(zone)->ee_win;
- if (!e_grabinput_get(input_window, 1, input_window))
- {
- input_window = 0;
- return 0;
- }
+ if (!e_comp_grab_input(e_comp_get(zone), 1, 1)) return 0;
+ evas = e_comp_get(zone)->evas;
+ evas_event_freeze(evas);
- popup = e_popup_new(zone, 0, 0, 1, 1);
- if (!popup)
- {
- e_grabinput_release(input_window, input_window);
- input_window = 0;
- return 0;
- }
- e_popup_autoclose(popup, NULL, _cb_key_down, NULL);
- evas_event_freeze(popup->evas);
-
- o = edje_object_add(popup->evas);
+ o = edje_object_add(evas);
o_bg = o;
e_theme_edje_object_set(o, "base/theme/syscon",
"e/widgets/syscon/main");
@@ -101,6 +88,9 @@ e_syscon_show(E_Zone *zone, const char *defact)
edje_object_signal_callback_add(o, "e,action,syscon", "*",
_cb_signal_syscon, NULL);
+ popup = e_comp_object_util_add(o_bg, E_COMP_OBJECT_TYPE_POPUP);
+ evas_object_data_set(popup, "zone", zone);
+ e_comp_object_util_autoclose(popup, NULL, _cb_key_down, NULL);
act_count = 0;
show_time = t;
@@ -111,22 +101,22 @@ e_syscon_show(E_Zone *zone, const char *defact)
// extra (example for illume):
// home | close | kill
- o = e_flowlayout_add(popup->evas);
- e_popup_object_add(popup, o);
+ o = e_flowlayout_add(evas);
+ e_comp_object_util_del_list_append(popup, o);
o_flow_main = o;
e_flowlayout_orientation_set(o, 1);
e_flowlayout_flowdirection_set(o, 1, 1);
e_flowlayout_homogenous_set(o, 1);
- o = e_flowlayout_add(popup->evas);
- e_popup_object_add(popup, o);
+ o = e_flowlayout_add(evas);
+ e_comp_object_util_del_list_append(popup, o);
o_flow_secondary = o;
e_flowlayout_orientation_set(o, 1);
e_flowlayout_flowdirection_set(o, 1, 1);
e_flowlayout_homogenous_set(o, 1);
- o = e_flowlayout_add(popup->evas);
- e_popup_object_add(popup, o);
+ o = e_flowlayout_add(evas);
+ e_comp_object_util_del_list_append(popup, o);
o_flow_extra = o;
e_flowlayout_orientation_set(o, 1);
e_flowlayout_flowdirection_set(o, 1, 1);
@@ -161,7 +151,7 @@ e_syscon_show(E_Zone *zone, const char *defact)
else if ((!strcmp(sca->action, "hibernate")) &&
(!e_sys_action_possible_get(E_SYS_HIBERNATE)))
disabled = 1;
- o = edje_object_add(popup->evas);
+ o = edje_object_add(evas);
edje_object_signal_callback_add(o, "e,action,click", "",
_cb_signal_action, sca);
if (sca->button)
@@ -177,7 +167,7 @@ e_syscon_show(E_Zone *zone, const char *defact)
_(e_action_predef_label_get(sca->action, sca->params)));
if (sca->icon)
{
- o2 = e_icon_add(popup->evas);
+ o2 = e_icon_add(evas);
e_util_icon_theme_set(o2, sca->icon);
edje_object_part_swallow(o, "e.swallow.icon", o2);
evas_object_show(o2);
@@ -211,7 +201,7 @@ e_syscon_show(E_Zone *zone, const char *defact)
char buf[1024];
sca = l->data;
- o = edje_object_add(popup->evas);
+ o = edje_object_add(evas);
edje_object_signal_callback_add(o, "e,action,click", "", _cb_signal_action_extra, sca);
if (sca->button_name)
{
@@ -225,7 +215,7 @@ e_syscon_show(E_Zone *zone, const char *defact)
edje_object_part_text_set(o, "e.text.label", sca->label);
if (sca->icon_group)
{
- o2 = edje_object_add(popup->evas);
+ o2 = edje_object_add(evas);
e_util_edje_icon_set(o2, sca->icon_group);
edje_object_part_swallow(o, "e.swallow.icon", o2);
evas_object_show(o2);
@@ -271,11 +261,7 @@ e_syscon_show(E_Zone *zone, const char *defact)
if (h > zh) h = zh;
y = zy - zone->y + (zh - h) / 2;
- e_popup_move_resize(popup, x, y, w, h);
- evas_object_move(o_bg, 0, 0);
- evas_object_resize(o_bg, w, h);
- evas_object_show(o_bg);
- e_popup_content_set(popup, o_bg);
+ evas_object_geometry_set(popup, x, y, w, h);
if (e_config->syscon.do_input)
{
@@ -284,9 +270,9 @@ e_syscon_show(E_Zone *zone, const char *defact)
if (defact) do_defact = eina_stringshare_add(defact);
}
- evas_event_thaw(popup->evas);
+ evas_event_thaw(evas);
inevas = 0;
- e_popup_show(popup);
+ evas_object_show(popup);
return 1;
}
@@ -295,18 +281,12 @@ e_syscon_hide(void)
{
if (!popup) return;
- if (deftimer)
- {
- ecore_timer_del(deftimer);
- deftimer = NULL;
- }
- if (do_defact) eina_stringshare_del(do_defact);
- do_defact = NULL;
+ E_FREE_FUNC(deftimer, ecore_timer_del);
+ eina_stringshare_replace(&do_defact, NULL);
E_FREE_LIST(handlers, ecore_event_handler_del);
- e_object_del(E_OBJECT(popup));
- popup = NULL;
- e_grabinput_release(input_window, input_window);
- input_window = 0;
+ e_comp_ungrab_input(e_comp_util_evas_object_comp_get(popup), 1, 1);
+ evas_object_hide(popup);
+ E_FREE_FUNC(popup, evas_object_del);
o_selected_flow = o_selected = o_flow_extra = o_flow_main = o_flow_secondary = NULL;
}
@@ -409,7 +389,7 @@ _cb_key_down(__UNUSED__ void *data, Ecore_Event_Key *ev)
{
if (popup)
{
- e_syscon_show(popup->zone, do_defact);
+ e_syscon_show(evas_object_data_get(popup, "zone"), do_defact);
}
}
else
diff --git a/src/modules/syscon/e_syscon_gadget.c b/src/modules/syscon/e_syscon_gadget.c
index 31fe73bac6..9aa415b470 100644
--- a/src/modules/syscon/e_syscon_gadget.c
+++ b/src/modules/syscon/e_syscon_gadget.c
@@ -74,7 +74,7 @@ _cb_mouse_down(void *data, Evas *e __UNUSED__, Evas_Object *obj __UNUSED__, void
e_menu_item_toggle_set(mi, syscon_config->menu);
e_menu_item_callback_set(mi, _cb_menu_change, inst);
m = e_gadcon_client_util_menu_items_append(inst->gcc, m, 0);
- ecore_x_pointer_xy_get(zone->container->win, &x, &y);
+ ecore_x_pointer_xy_get(zone->comp->win, &x, &y);
e_menu_activate_mouse(m, zone, x, y, 1, 1,
E_MENU_POP_DIRECTION_AUTO, ev->timestamp);
evas_event_feed_mouse_up(inst->gcc->gadcon->evas, ev->button,
diff --git a/src/modules/systray/e_mod_main.c b/src/modules/systray/e_mod_main.c
index 321196720a..ce97fe6c65 100644
--- a/src/modules/systray/e_mod_main.c
+++ b/src/modules/systray/e_mod_main.c
@@ -114,7 +114,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->container, _("Systray Settings"), "E",
+ e_config_dialog_new(m->zone->comp, _("Systray Settings"), "E",
"_e_mod_systray_config_dialog",
NULL, 0, v, data);
}
@@ -245,8 +245,8 @@ _gc_init(E_Gadcon *gc, const char *name, const char *id, const char *style)
if (!inst)
return NULL;
inst->evas = gc->evas;
- inst->con = e_container_current_get(e_manager_current_get());
- if (!inst->con)
+ inst->comp = e_comp_get(NULL);
+ if (!inst->comp)
{
E_FREE(inst);
return NULL;
@@ -544,14 +544,14 @@ int
systray_manager_number_get(const Instance *inst)
{
EINA_SAFETY_ON_NULL_RETURN_VAL(inst, 0);
- return inst->con->manager->num;
+ return inst->comp->num;
}
Ecore_X_Window
systray_root_get(const Instance *inst)
{
EINA_SAFETY_ON_NULL_RETURN_VAL(inst, 0);
- return inst->con->manager->root;
+ return inst->comp->man->root;
}
static void
diff --git a/src/modules/systray/e_mod_main.h b/src/modules/systray/e_mod_main.h
index 700f5b8f83..d38e58e77b 100644
--- a/src/modules/systray/e_mod_main.h
+++ b/src/modules/systray/e_mod_main.h
@@ -21,7 +21,7 @@ typedef struct _E_Config_Dialog_Data Systray_Config;
struct _Instance
{
E_Gadcon_Client *gcc;
- E_Container *con;
+ E_Comp *comp;
Evas *evas;
Instance_Xembed *xembed;
Instance_Notifier_Host *notifier;
diff --git a/src/modules/systray/e_mod_notifier_host.c b/src/modules/systray/e_mod_notifier_host.c
index 7141a2738b..dc0d722568 100644
--- a/src/modules/systray/e_mod_notifier_host.c
+++ b/src/modules/systray/e_mod_notifier_host.c
@@ -157,7 +157,7 @@ _item_menu_new(Notifier_Item_Icon *ii)
e_menu_post_deactivate_callback_set(m, _menu_post_deactivate, gadcon);
zone = e_util_zone_current_get(e_manager_current_get());
- ecore_x_pointer_xy_get(zone->container->win, &x, &y);
+ ecore_x_pointer_xy_get(zone->comp->win, &x, &y);
e_menu_activate_mouse(m, zone, x, y, 1, 1, E_MENU_POP_DIRECTION_DOWN,
ecore_x_current_time_get());
}
diff --git a/src/modules/systray/e_mod_xembed.c b/src/modules/systray/e_mod_xembed.c
index bb8440ae6c..ca7cf0c5a6 100644
--- a/src/modules/systray/e_mod_xembed.c
+++ b/src/modules/systray/e_mod_xembed.c
@@ -65,12 +65,16 @@ struct _Instance_Xembed
Ecore_Event_Handler *reparent;
Ecore_Event_Handler *sel_clear;
Ecore_Event_Handler *configure;
+ Ecore_Event_Handler *client;
} handler;
struct
{
Ecore_Timer *retry;
} timer;
Eina_List *icons;
+
+ E_Client *ec;
+ Ecore_Timer *visibility_timer;
};
static Ecore_X_Atom _atom_manager = 0;
@@ -104,18 +108,53 @@ _xembed_win_resize(Instance_Xembed *xembed)
ecore_x_window_move_resize(xembed->win.base, last_x, last_y,
(first_x+first_w) - last_x,
(first_y+first_h) - last_y);
+ evas_object_geometry_set(xembed->ec->frame, last_x, last_y,
+ (first_x+first_w) - last_x,
+ (first_y+first_h) - last_y);
}
-void
-systray_xembed_size_updated(Instance_Xembed *xembed)
+static void
+_systray_xembed_restack(Instance_Xembed *xembed)
+{
+ E_Layer layer;
+ E_Shelf *es = xembed->inst->gcc->gadcon->shelf;
+
+ if (es)
+ {
+ layer = e_comp_canvas_layer_map_to(e_comp_canvas_layer_map(es->cfg->layer) + 1);
+ }
+ else
+ layer = E_LAYER_CLIENT_DESKTOP;
+ layer = E_CLAMP(layer, E_LAYER_CLIENT_DESKTOP, E_LAYER_CLIENT_ABOVE);
+ evas_object_layer_set(xembed->ec->frame, layer);
+}
+
+static Eina_Bool
+_systray_xembed_visible_check(Instance_Xembed *xembed)
{
if (eina_list_count(xembed->icons) == 0)
{
- ecore_x_window_hide(xembed->win.base);
- return;
+ evas_object_hide(xembed->ec->frame);
+ e_pixmap_dirty(xembed->ec->pixmap);
}
- ecore_x_window_show(xembed->win.base);
- _xembed_win_resize(xembed);
+ else
+ {
+ _xembed_win_resize(xembed);
+ _systray_xembed_restack(xembed);
+ evas_object_show(xembed->ec->frame);
+ }
+ xembed->visibility_timer = NULL;
+ return EINA_FALSE;
+}
+
+void
+systray_xembed_size_updated(Instance_Xembed *xembed)
+{
+
+ if (xembed->visibility_timer)
+ ecore_timer_reset(xembed->visibility_timer);
+ else
+ xembed->visibility_timer = ecore_timer_add(0.15, (Ecore_Task_Cb)_systray_xembed_visible_check, xembed);
}
static void
@@ -133,6 +172,22 @@ _systray_xembed_cb_resize(void *data, Evas *evas __UNUSED__, Evas_Object *o __UN
}
static void
+_systray_xembed_cb_hide(void *data, Evas *e EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *event_info EINA_UNUSED)
+{
+ Instance_Xembed *xembed = data;
+ if (xembed->ec)
+ evas_object_hide(xembed->ec->frame);
+}
+
+static void
+_systray_xembed_cb_show(void *data, Evas *e EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *event_info EINA_UNUSED)
+{
+ Instance_Xembed *xembed = data;
+ if (xembed->ec && eina_list_count(xembed->icons))
+ evas_object_show(xembed->ec->frame);
+}
+
+static void
_systray_xembed_icon_geometry_apply(Icon *icon)
{
const Evas_Object *box;
@@ -277,7 +332,6 @@ _systray_xembed_icon_add(Instance_Xembed *xembed, const Ecore_X_Window win)
1.0, (double)w / (double)h);
ecore_x_window_reparent(win, xembed->win.base, 0, 0);
- ecore_x_window_raise(win);
ecore_x_window_client_manage(win);
ecore_x_window_save_set_add(win);
ecore_x_window_shape_events_select(win, 1);
@@ -398,30 +452,15 @@ _systray_xembed_base_create(Instance_Xembed *xembed)
return EINA_FALSE;
evas_object_geometry_get(box, &x, &y, NULL, NULL);
- xembed->win.base = ecore_x_window_new(0, x, y, 1, 1);
+ xembed->win.base = ecore_x_window_override_new(0, x, y, 1, 1);
+ //fprintf(stderr, "xembed->win.base = %u\n", xembed->win.base);
ecore_x_icccm_title_set(xembed->win.base, "noshadow_systray_base");
ecore_x_icccm_name_class_set(xembed->win.base, "systray", "holder");
ecore_x_netwm_name_set(xembed->win.base, "noshadow_systray_base");
- ecore_x_window_reparent(xembed->win.base, xembed->win.parent, x, y);
if (!invis)
ecore_x_window_background_color_set(xembed->win.base, r, g, b);
ecore_x_window_show(xembed->win.base);
- if (xembed->inst->gcc->gadcon->shelf)
- {
- E_Shelf *es = xembed->inst->gcc->gadcon->shelf;
- if (es->popup)
- {
- if (es->layer)
- e_container_window_raise(xembed->inst->con, xembed->win.base, E_LAYER_ABOVE);
- else
- e_container_window_raise(xembed->inst->con, xembed->win.base, E_LAYER_BELOW);
- }
- else
- e_container_window_raise(xembed->inst->con, xembed->win.base, E_LAYER_DESKTOP);
- }
- else
- e_container_window_raise(xembed->inst->con, xembed->win.base, E_LAYER_DESKTOP);
return EINA_TRUE;
}
@@ -437,7 +476,7 @@ _systray_xembed_activate(Instance_Xembed *xembed)
atom = _systray_xembed_atom_st_get(systray_manager_number_get(xembed->inst));
old_win = ecore_x_selection_owner_get(atom);
- if (old_win && (old_win != e_comp_get(xembed->inst->con)->cm_selection)) return 0;
+ if (old_win && (old_win != xembed->inst->comp->cm_selection)) return 0;
if (xembed->win.base == 0)
{
@@ -445,7 +484,7 @@ _systray_xembed_activate(Instance_Xembed *xembed)
return 0;
}
- xembed->win.selection = e_comp_get(xembed->inst->con)->cm_selection;
+ xembed->win.selection = xembed->inst->comp->cm_selection;
if (old_win) return 1;
if (!_systray_xembed_selection_owner_set_current(xembed))
{
@@ -527,7 +566,6 @@ _systray_xembed_handle_request_dock(Instance_Xembed *xembed, Ecore_X_Event_Clien
{
Ecore_X_Window win = (Ecore_X_Window)ev->data.l[2];
Ecore_X_Time t;
- Ecore_X_Window_Attributes attr;
const Eina_List *l;
Icon *icon;
unsigned int val[2];
@@ -537,12 +575,6 @@ _systray_xembed_handle_request_dock(Instance_Xembed *xembed, Ecore_X_Event_Clien
if (icon->win == win)
return;
- if (!ecore_x_window_attributes_get(win, &attr))
- {
- fprintf(stderr, "SYSTRAY: could not get attributes of win %#x\n", win);
- return;
- }
-
icon = _systray_xembed_icon_add(xembed, win);
if (!icon)
return;
@@ -811,6 +843,27 @@ systray_xembed_orient_set(Instance_Xembed *xembed, E_Gadcon_Orient orient)
systray_size_updated(xembed->inst);
}
+static Eina_Bool
+_systray_xembed_client_add(Instance_Xembed *xembed, int t EINA_UNUSED, E_Event_Client *ev)
+{
+ if (e_client_util_win_get(ev->ec) == xembed->win.base)
+ {
+ /* this is some bullshit. */
+ xembed->ec = ev->ec;
+ ev->ec->internal_no_remember = ev->ec->borderless = ev->ec->visible = ev->ec->internal = 1;
+ ev->ec->border.changed = 1;
+ _xembed_win_resize(xembed);
+ ev->ec->icccm.take_focus = ev->ec->icccm.accepts_focus = 0;
+ EC_CHANGED(ev->ec);
+ if (eina_list_count(xembed->icons) == 0)
+ evas_object_hide(xembed->ec->frame);
+ else
+ evas_object_show(xembed->ec->frame);
+ _systray_xembed_restack(xembed);
+ }
+ return ECORE_CALLBACK_RENEW;
+}
+
Instance_Xembed *
systray_xembed_new(Instance *inst)
{
@@ -837,7 +890,13 @@ systray_xembed_new(Instance *inst)
_systray_xembed_cb_move, xembed);
evas_object_event_callback_add(ui, EVAS_CALLBACK_RESIZE,
_systray_xembed_cb_resize, xembed);
+ if (inst->gcc->gadcon->shelf)
+ {
+ evas_object_event_callback_add(inst->gcc->gadcon->shelf->comp_object, EVAS_CALLBACK_HIDE, _systray_xembed_cb_hide, xembed);
+ evas_object_event_callback_add(inst->gcc->gadcon->shelf->comp_object, EVAS_CALLBACK_SHOW, _systray_xembed_cb_show, xembed);
+ }
+ xembed->handler.client = ecore_event_handler_add(E_EVENT_CLIENT_ADD, (Ecore_Event_Handler_Cb)_systray_xembed_client_add, xembed);
xembed->handler.message = ecore_event_handler_add
(ECORE_X_EVENT_CLIENT_MESSAGE, _systray_xembed_cb_client_message,
xembed);
@@ -870,8 +929,14 @@ systray_xembed_free(Instance_Xembed *xembed)
_systray_xembed_cb_move);
evas_object_event_callback_del(ui, EVAS_CALLBACK_RESIZE,
_systray_xembed_cb_resize);
+ if (xembed->inst->gcc->gadcon->shelf)
+ {
+ evas_object_event_callback_del_full(xembed->inst->gcc->gadcon->shelf->comp_object, EVAS_CALLBACK_HIDE, _systray_xembed_cb_hide, xembed);
+ evas_object_event_callback_del_full(xembed->inst->gcc->gadcon->shelf->comp_object, EVAS_CALLBACK_SHOW, _systray_xembed_cb_show, xembed);
+ }
_systray_xembed_deactivate(xembed);
+ ecore_timer_del(xembed->visibility_timer);
if (xembed->handler.message)
ecore_event_handler_del(xembed->handler.message);
@@ -885,6 +950,7 @@ systray_xembed_free(Instance_Xembed *xembed)
ecore_event_handler_del(xembed->handler.sel_clear);
if (xembed->handler.configure)
ecore_event_handler_del(xembed->handler.configure);
+ ecore_event_handler_del(xembed->handler.client);
if (xembed->timer.retry)
ecore_timer_del(xembed->timer.retry);
diff --git a/src/modules/tasks/e_mod_config.c b/src/modules/tasks/e_mod_config.c
index be190818e3..f9edde3b3f 100644
--- a/src/modules/tasks/e_mod_config.c
+++ b/src/modules/tasks/e_mod_config.c
@@ -21,7 +21,7 @@ _config_tasks_module(Config_Item *ci)
{
E_Config_Dialog *cfd;
E_Config_Dialog_View *v;
- E_Container *con;
+ E_Comp *comp;
v = E_NEW(E_Config_Dialog_View, 1);
@@ -30,8 +30,8 @@ _config_tasks_module(Config_Item *ci)
v->basic.apply_cfdata = _basic_apply_data;
v->basic.create_widgets = _basic_create_widgets;
- con = e_container_current_get(e_manager_current_get());
- cfd = e_config_dialog_new(con, _("Tasks Configuration"), "Tasks",
+ comp = e_comp_get(NULL);
+ cfd = e_config_dialog_new(comp, _("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/tasks/e_mod_main.c b/src/modules/tasks/e_mod_main.c
index ddc009bcc4..1a9dedbbd9 100644
--- a/src/modules/tasks/e_mod_main.c
+++ b/src/modules/tasks/e_mod_main.c
@@ -34,6 +34,7 @@ struct _Tasks
E_Gadcon_Client *gcc; // The gadcon client
Evas_Object *o_items; // Table of items
Eina_List *items; // List of items
+ Eina_List *clients; // List of clients
E_Zone *zone; // Current Zone
Config_Item *config; // Configuration
int horizontal;
@@ -42,7 +43,7 @@ struct _Tasks
struct _Tasks_Item
{
Tasks *tasks; // Parent tasks
- E_Border *border; // The border this item points to
+ E_Client *client; // The client this item points to
Evas_Object *o_item; // The edje theme object
Evas_Object *o_icon; // The icon
Eina_Bool skip_taskbar : 1;
@@ -52,14 +53,14 @@ static Tasks *_tasks_new(Evas *evas, E_Zone *zone, const char *id);
static void _tasks_free(Tasks *tasks);
static void _tasks_refill(Tasks *tasks);
static void _tasks_refill_all();
-static void _tasks_refill_border(E_Border *border);
-static void _tasks_signal_emit(E_Border *border, char *sig, char *src);
+static void _tasks_refill_border(E_Client *ec);
+static void _tasks_signal_emit(E_Client *ec, char *sig, char *src);
-static Tasks_Item *_tasks_item_find(Tasks *tasks, E_Border *border);
-static Tasks_Item *_tasks_item_new(Tasks *tasks, E_Border *border);
+static Tasks_Item *_tasks_item_find(Tasks *tasks, E_Client *ec);
+static Tasks_Item *_tasks_item_new(Tasks *tasks, E_Client *ec);
-static int _tasks_item_check_add(Tasks *tasks, E_Border *border);
-static void _tasks_item_add(Tasks *tasks, E_Border *border);
+static int _tasks_item_check_add(Tasks *tasks, E_Client *ec);
+static void _tasks_item_add(Tasks *tasks, E_Client *ec);
static void _tasks_item_remove(Tasks_Item *item);
static void _tasks_item_refill(Tasks_Item *item);
static void _tasks_item_fill(Tasks_Item *item);
@@ -73,18 +74,18 @@ static void _tasks_cb_item_mouse_down(void *data, Evas *e, Evas_Object *
static void _tasks_cb_item_mouse_up(void *data, Evas *e, Evas_Object *obj, void *event_info);
static void _tasks_cb_item_mouse_wheel(void *data, Evas *e __UNUSED__, Evas_Object *obj __UNUSED__, void *event_info);
-static Eina_Bool _tasks_cb_event_border_add(void *data, int type, void *event);
-static Eina_Bool _tasks_cb_event_border_remove(void *data, int type, void *event);
-static Eina_Bool _tasks_cb_event_border_iconify(void *data, int type, void *event);
-static Eina_Bool _tasks_cb_event_border_uniconify(void *data, int type, void *event);
-static Eina_Bool _tasks_cb_event_border_icon_change(void *data, int type, void *event);
-static Eina_Bool _tasks_cb_event_border_title_change(void *data, int type, void *event);
-static Eina_Bool _tasks_cb_event_border_zone_set(void *data, int type, void *event);
-static Eina_Bool _tasks_cb_event_border_desk_set(void *data, int type, void *event);
+static Eina_Bool _tasks_cb_event_client_add(void *data, int type, void *event);
+static Eina_Bool _tasks_cb_event_client_remove(void *data, int type, void *event);
+static Eina_Bool _tasks_cb_event_client_iconify(void *data, int type, void *event);
+static Eina_Bool _tasks_cb_event_client_uniconify(void *data, int type, void *event);
+static Eina_Bool _tasks_cb_event_client_icon_change(void *data, int type, void *event);
+static Eina_Bool _tasks_cb_event_client_title_change(void *data, int type, void *event);
+static Eina_Bool _tasks_cb_event_client_zone_set(void *data, int type, void *event);
+static Eina_Bool _tasks_cb_event_client_desk_set(void *data, int type, void *event);
static Eina_Bool _tasks_cb_window_focus_in(void *data, int type, void *event);
static Eina_Bool _tasks_cb_window_focus_out(void *data, int type, void *event);
static Eina_Bool _tasks_cb_event_desk_show(void *data, int type, void *event);
-static Eina_Bool _tasks_cb_event_border_urgent_change(void *data, int type, void *event);
+static Eina_Bool _tasks_cb_event_client_urgent_change(void *data, int type, void *event);
static E_Config_DD *conf_edd = NULL;
static E_Config_DD *conf_item_edd = NULL;
@@ -139,44 +140,18 @@ e_modapi_init(E_Module *m)
tasks_config->module = m;
- tasks_config->handlers = eina_list_append
- (tasks_config->handlers, ecore_event_handler_add
- (E_EVENT_BORDER_ADD, _tasks_cb_event_border_add, NULL));
- tasks_config->handlers = eina_list_append
- (tasks_config->handlers, ecore_event_handler_add
- (E_EVENT_BORDER_REMOVE, _tasks_cb_event_border_remove, NULL));
- tasks_config->handlers = eina_list_append
- (tasks_config->handlers, ecore_event_handler_add
- (E_EVENT_BORDER_ICONIFY, _tasks_cb_event_border_iconify, NULL));
- tasks_config->handlers = eina_list_append
- (tasks_config->handlers, ecore_event_handler_add
- (E_EVENT_BORDER_UNICONIFY, _tasks_cb_event_border_uniconify, NULL));
- tasks_config->handlers = eina_list_append
- (tasks_config->handlers, ecore_event_handler_add
- (E_EVENT_BORDER_ICON_CHANGE, _tasks_cb_event_border_icon_change, NULL));
- tasks_config->handlers = eina_list_append
- (tasks_config->handlers, ecore_event_handler_add
- (E_EVENT_BORDER_DESK_SET, _tasks_cb_event_border_desk_set, NULL));
- tasks_config->handlers = eina_list_append
- (tasks_config->handlers, ecore_event_handler_add
- (E_EVENT_BORDER_ZONE_SET, _tasks_cb_event_border_zone_set, NULL));
- tasks_config->handlers = eina_list_append
- (tasks_config->handlers, ecore_event_handler_add
- (E_EVENT_BORDER_FOCUS_IN, _tasks_cb_window_focus_in, NULL));
- tasks_config->handlers = eina_list_append
- (tasks_config->handlers, ecore_event_handler_add
- (E_EVENT_BORDER_FOCUS_OUT, _tasks_cb_window_focus_out, NULL));
- tasks_config->handlers = eina_list_append
- (tasks_config->handlers, ecore_event_handler_add
- (E_EVENT_BORDER_TITLE_CHANGE, _tasks_cb_event_border_title_change, NULL));
- tasks_config->handlers = eina_list_append
- (tasks_config->handlers, ecore_event_handler_add
- (E_EVENT_DESK_SHOW, _tasks_cb_event_desk_show, NULL));
- tasks_config->handlers = eina_list_append
- (tasks_config->handlers, ecore_event_handler_add
- (E_EVENT_BORDER_URGENT_CHANGE, _tasks_cb_event_border_urgent_change, NULL));
-
- tasks_config->borders = eina_list_clone(e_border_client_list());
+ E_LIST_HANDLER_APPEND(tasks_config->handlers, E_EVENT_CLIENT_ADD, _tasks_cb_event_client_add, NULL);
+ E_LIST_HANDLER_APPEND(tasks_config->handlers, E_EVENT_CLIENT_REMOVE, _tasks_cb_event_client_remove, NULL);
+ E_LIST_HANDLER_APPEND(tasks_config->handlers, E_EVENT_CLIENT_ICONIFY, _tasks_cb_event_client_iconify, NULL);
+ E_LIST_HANDLER_APPEND(tasks_config->handlers, E_EVENT_CLIENT_UNICONIFY, _tasks_cb_event_client_uniconify, NULL);
+ E_LIST_HANDLER_APPEND(tasks_config->handlers, E_EVENT_CLIENT_PROPERTY, _tasks_cb_event_client_icon_change, NULL);
+ E_LIST_HANDLER_APPEND(tasks_config->handlers, E_EVENT_CLIENT_DESK_SET, _tasks_cb_event_client_desk_set, NULL);
+ E_LIST_HANDLER_APPEND(tasks_config->handlers, E_EVENT_CLIENT_ZONE_SET, _tasks_cb_event_client_zone_set, NULL);
+ E_LIST_HANDLER_APPEND(tasks_config->handlers, E_EVENT_CLIENT_FOCUS_IN, _tasks_cb_window_focus_in, NULL);
+ E_LIST_HANDLER_APPEND(tasks_config->handlers, E_EVENT_CLIENT_FOCUS_OUT, _tasks_cb_window_focus_out, NULL);
+ E_LIST_HANDLER_APPEND(tasks_config->handlers, E_EVENT_CLIENT_PROPERTY, _tasks_cb_event_client_title_change, NULL);
+ E_LIST_HANDLER_APPEND(tasks_config->handlers, E_EVENT_DESK_SHOW, _tasks_cb_event_desk_show, NULL);
+ E_LIST_HANDLER_APPEND(tasks_config->handlers, E_EVENT_CLIENT_PROPERTY, _tasks_cb_event_client_urgent_change, NULL);
e_gadcon_provider_register(&_gadcon_class);
return m;
@@ -210,8 +185,6 @@ e_modapi_shutdown(E_Module *m __UNUSED__)
ecore_event_handler_del(eh);
}
- eina_list_free(tasks_config->borders);
-
free(tasks_config);
tasks_config = NULL;
E_CONFIG_DD_FREE(conf_item_edd);
@@ -226,6 +199,17 @@ e_modapi_save(E_Module *m __UNUSED__)
return 1;
}
+static Tasks *
+_tasks_find(E_Comp *comp)
+{
+ Tasks *tasks;
+ Eina_List *l;
+
+ EINA_LIST_FOREACH(tasks_config->tasks, l, tasks)
+ if (tasks->zone->comp == comp) return tasks;
+ return NULL;
+}
+
/**************************************************************/
static E_Gadcon_Client *
@@ -346,11 +330,18 @@ static Tasks *
_tasks_new(Evas *evas, E_Zone *zone, const char *id)
{
Tasks *tasks;
+ Eina_List *l;
+ E_Client *ec;
tasks = E_NEW(Tasks, 1);
tasks->config = _tasks_config_item_get(id);
tasks->o_items = e_box_add(evas);
tasks->horizontal = 1;
+ EINA_LIST_FOREACH(zone->comp->clients, l, ec)
+ {
+ if (!e_client_util_ignored_get(ec))
+ tasks->clients = eina_list_append(tasks->clients, ec);
+ }
e_box_homogenous_set(tasks->o_items, 1);
e_box_orientation_set(tasks->o_items, tasks->horizontal);
@@ -365,6 +356,7 @@ _tasks_free(Tasks *tasks)
Tasks_Item *item;
EINA_LIST_FREE(tasks->items, item)
_tasks_item_free(item);
+ eina_list_free(tasks->clients);
evas_object_del(tasks->o_items);
free(tasks);
}
@@ -373,7 +365,7 @@ static void
_tasks_refill(Tasks *tasks)
{
Eina_List *l;
- E_Border *border;
+ E_Client *ec;
Tasks_Item *item;
Evas_Coord w, h;
@@ -382,9 +374,9 @@ _tasks_refill(Tasks *tasks)
item = tasks->items->data;
_tasks_item_remove(item);
}
- EINA_LIST_FOREACH(tasks_config->borders, l, border)
+ EINA_LIST_FOREACH(tasks->clients, l, ec)
{
- _tasks_item_check_add(tasks, border);
+ _tasks_item_check_add(tasks, ec);
}
if (tasks->items)
{
@@ -430,7 +422,7 @@ _tasks_refill_all(void)
}
static void
-_tasks_refill_border(E_Border *border)
+_tasks_refill_border(E_Client *ec)
{
const Eina_List *l;
Tasks *tasks;
@@ -442,7 +434,7 @@ _tasks_refill_border(E_Border *border)
Tasks_Item *item;
EINA_LIST_FOREACH(tasks->items, m, item)
{
- if (item->border == border)
+ if (item->client == ec)
{
_tasks_item_refill(item);
found = EINA_TRUE;
@@ -454,7 +446,7 @@ _tasks_refill_border(E_Border *border)
}
static void
-_tasks_signal_emit(E_Border *border, char *sig, char *src)
+_tasks_signal_emit(E_Client *ec, char *sig, char *src)
{
const Eina_List *l;
Tasks *tasks;
@@ -466,35 +458,35 @@ _tasks_signal_emit(E_Border *border, char *sig, char *src)
EINA_LIST_FOREACH(tasks->items, m, item)
{
- if (item->border == border)
+ if (item->client == ec)
_tasks_item_signal_emit(item, sig, src);
}
}
}
static Tasks_Item *
-_tasks_item_find(Tasks *tasks, E_Border *border)
+_tasks_item_find(Tasks *tasks, E_Client *ec)
{
const Eina_List *l;
Tasks_Item *item;
EINA_LIST_FOREACH(tasks->items, l, item)
{
- if (item->border == border) return item;
+ if (item->client == ec) return item;
}
return NULL;
}
static Tasks_Item *
-_tasks_item_new(Tasks *tasks, E_Border *border)
+_tasks_item_new(Tasks *tasks, E_Client *ec)
{
Tasks_Item *item;
item = E_NEW(Tasks_Item, 1);
- e_object_ref(E_OBJECT(border));
+ e_object_ref(E_OBJECT(ec));
item->tasks = tasks;
- item->border = border;
- item->skip_taskbar = border->client.netwm.state.skip_taskbar;
+ item->client = ec;
+ item->skip_taskbar = ec->netwm.state.skip_taskbar;
item->o_item = edje_object_add(evas_object_evas_get(tasks->o_items));
if (tasks->horizontal)
e_theme_edje_object_set(item->o_item,
@@ -532,29 +524,29 @@ _tasks_item_new(Tasks *tasks, E_Border *border)
}
static int
-_tasks_item_check_add(Tasks *tasks, E_Border *border)
+_tasks_item_check_add(Tasks *tasks, E_Client *ec)
{
- if (border->user_skip_winlist) return 1;
- if (border->client.netwm.state.skip_taskbar) return 1;
- if (_tasks_item_find(tasks, border)) return 1;
+ if (ec->user_skip_winlist) return 1;
+ if (ec->netwm.state.skip_taskbar) return 1;
+ if (_tasks_item_find(tasks, ec)) return 1;
if (!tasks->config) return 1;
if (!(tasks->config->show_all))
{
- if (border->zone != tasks->zone) return 1;
- if ((border->desk != e_desk_current_get(border->zone)) &&
- (!border->sticky))
+ if (ec->zone != tasks->zone) return 1;
+ if ((ec->desk != e_desk_current_get(ec->zone)) &&
+ (!ec->sticky))
return 1;
}
- _tasks_item_add(tasks, border);
+ _tasks_item_add(tasks, ec);
return 0;
}
static void
-_tasks_item_add(Tasks *tasks, E_Border *border)
+_tasks_item_add(Tasks *tasks, E_Client *ec)
{
Tasks_Item *item;
- item = _tasks_item_new(tasks, border);
+ item = _tasks_item_new(tasks, ec);
e_box_pack_end(tasks->o_items, item->o_item);
e_box_pack_options_set(item->o_item,
1, 1, /* fill */
@@ -578,7 +570,7 @@ static void
_tasks_item_free(Tasks_Item *item)
{
if (item->o_icon) evas_object_del(item->o_icon);
- e_object_unref(E_OBJECT(item->border));
+ e_object_unref(E_OBJECT(item->client));
evas_object_del(item->o_item);
free(item);
}
@@ -586,7 +578,7 @@ _tasks_item_free(Tasks_Item *item)
static void
_tasks_item_refill(Tasks_Item *item)
{
- if (item->border->client.netwm.state.skip_taskbar != item->skip_taskbar)
+ if (item->client->netwm.state.skip_taskbar != item->skip_taskbar)
{
_tasks_refill(item->tasks);
return;
@@ -604,7 +596,7 @@ _tasks_item_fill(Tasks_Item *item)
item->o_icon = NULL;
else
{
- item->o_icon = e_border_icon_add(item->border, evas_object_evas_get(item->tasks->o_items));
+ item->o_icon = e_client_icon_add(item->client, evas_object_evas_get(item->tasks->o_items));
edje_object_part_swallow(item->o_item, "e.swallow.icon", item->o_icon);
evas_object_pass_events_set(item->o_icon, 1);
evas_object_show(item->o_icon);
@@ -613,18 +605,18 @@ _tasks_item_fill(Tasks_Item *item)
if (item->tasks->config->icon_only)
label = "";
else
- label = e_border_name_get(item->border);
+ label = e_client_name_get(item->client);
edje_object_part_text_set(item->o_item, "e.text.label", label);
- if (item->border->iconic)
+ if (item->client->iconic)
_tasks_item_signal_emit(item, "e,state,iconified", "e");
else
_tasks_item_signal_emit(item, "e,state,uniconified", "e");
- if (item->border->focused)
+ if (item->client->focused)
_tasks_item_signal_emit(item, "e,state,focused", "e");
else
_tasks_item_signal_emit(item, "e,state,unfocused", "e");
- if (item->border->client.icccm.urgent && !item->border->focused)
+ if (item->client->icccm.urgent && !item->client->focused)
_tasks_item_signal_emit(item, "e,state,urgent", "e");
else
_tasks_item_signal_emit(item, "e,state,not_urgent", "e");
@@ -718,9 +710,9 @@ _tasks_cb_item_mouse_down(void *data, Evas *e __UNUSED__, Evas_Object *obj __UNU
e_gadcon_canvas_zone_geometry_get(item->tasks->gcc->gadcon, &cx, &cy, &cw, &ch);
- e_int_border_menu_create(item->border);
+ e_int_client_menu_create(item->client);
- mi = e_menu_item_new(item->border->border_menu);
+ mi = e_menu_item_new(item->client->border_menu);
e_menu_item_separator_set(mi, 1);
m = e_menu_new();
@@ -731,21 +723,21 @@ _tasks_cb_item_mouse_down(void *data, Evas *e __UNUSED__, Evas_Object *obj __UNU
m = e_gadcon_client_util_menu_items_append(item->tasks->gcc, m, 0);
- mi = e_menu_item_new(item->border->border_menu);
+ mi = e_menu_item_new(item->client->border_menu);
e_menu_item_label_set(mi, _("Tasks"));
e_menu_item_submenu_set(mi, m);
e_object_unref(E_OBJECT(m));
e_util_menu_item_theme_icon_set(mi, "preferences-system");
- e_gadcon_client_menu_set(item->tasks->gcc, item->border->border_menu);
+ e_gadcon_client_menu_set(item->tasks->gcc, item->client->border_menu);
- e_menu_activate_mouse(item->border->border_menu,
+ e_menu_activate_mouse(item->client->border_menu,
e_util_zone_current_get(e_manager_current_get()),
cx + ev->output.x, cy + ev->output.y, 1, 1,
E_MENU_POP_DIRECTION_DOWN, ev->timestamp);
evas_event_feed_mouse_up(item->tasks->gcc->gadcon->evas, ev->button,
EVAS_BUTTON_NONE, ev->timestamp, NULL);
/* gadcon menu post cb won't remove this so we'll do it now to prevent problems later */
- item->border->border_menu = NULL;
+ item->client->border_menu = NULL;
}
}
@@ -760,14 +752,14 @@ _tasks_cb_item_mouse_wheel(void *data, Evas *e __UNUSED__, Evas_Object *obj __UN
if (ev->z < 0)
{
- if (item->border->iconic)
- e_border_uniconify(item->border);
+ if (item->client->iconic)
+ e_client_uniconify(item->client);
else
- e_border_raise(item->border);
- e_border_focus_set(item->border, 1, 1);
+ evas_object_raise(item->client->frame);
+ evas_object_focus_set(item->client->frame, 1);
}
else if (ev->z > 0)
- e_border_iconify(item->border);
+ e_client_iconify(item->client);
}
static void
@@ -780,178 +772,170 @@ _tasks_cb_item_mouse_up(void *data, Evas *e __UNUSED__, Evas_Object *obj __UNUSE
item = data;
if (ev->button == 1)
{
- if (!item->border->sticky && item->tasks->config->show_all)
- e_desk_show(item->border->desk);
+ if (!item->client->sticky && item->tasks->config->show_all)
+ e_desk_show(item->client->desk);
if (evas_key_modifier_is_set(ev->modifiers, "Alt"))
{
- if (item->border->iconic)
- e_border_uniconify(item->border);
+ if (item->client->iconic)
+ e_client_uniconify(item->client);
else
- e_border_iconify(item->border);
+ e_client_iconify(item->client);
}
else if (evas_key_modifier_is_set(ev->modifiers, "Control"))
{
- if (item->border->maximized)
- e_border_unmaximize(item->border, e_config->maximize_policy);
+ if (item->client->maximized)
+ e_client_unmaximize(item->client, e_config->maximize_policy);
else
- e_border_maximize(item->border, e_config->maximize_policy);
+ e_client_maximize(item->client, e_config->maximize_policy);
}
else if (evas_key_modifier_is_set(ev->modifiers, "Shift"))
{
- if (item->border->shaded)
- e_border_unshade(item->border, item->border->shade.dir);
+ if (item->client->shaded)
+ e_client_unshade(item->client, item->client->shade_dir);
else
- e_border_shade(item->border, item->border->shade.dir);
+ e_client_shade(item->client, item->client->shade_dir);
}
else if (evas_key_modifier_is_set(ev->modifiers, "Super"))
{
- e_border_act_close_begin(item->border);
+ e_client_act_close_begin(item->client);
}
else
{
- if (item->border->iconic)
+ if (item->client->iconic)
{
- e_border_uniconify(item->border);
- e_border_focus_set(item->border, 1, 1);
+ e_client_uniconify(item->client);
+ evas_object_focus_set(item->client->frame, 1);
}
else
{
- if (item->border->focused)
+ if (item->client->focused)
{
- e_border_iconify(item->border);
+ e_client_iconify(item->client);
}
else
{
- e_border_raise(item->border);
- e_border_focus_set(item->border, 1, 1);
+ evas_object_raise(item->client->frame);
+ evas_object_focus_set(item->client->frame, 1);
}
}
}
}
else if (ev->button == 2)
{
- if (!item->border->sticky && item->tasks->config->show_all)
- e_desk_show(item->border->desk);
- e_border_raise(item->border);
- e_border_focus_set(item->border, 1, 1);
- if (item->border->maximized)
- e_border_unmaximize(item->border, e_config->maximize_policy);
+ if (!item->client->sticky && item->tasks->config->show_all)
+ e_desk_show(item->client->desk);
+ evas_object_raise(item->client->frame);
+ evas_object_focus_set(item->client->frame, 1);
+ if (item->client->maximized)
+ e_client_unmaximize(item->client, e_config->maximize_policy);
else
- e_border_maximize(item->border, e_config->maximize_policy);
+ e_client_maximize(item->client, e_config->maximize_policy);
}
}
/************ BORDER CALLBACKS *********************/
static Eina_Bool
-_tasks_cb_event_border_add(void *data __UNUSED__, int type __UNUSED__, void *event)
+_tasks_cb_event_client_add(void *data __UNUSED__, int type __UNUSED__, void *event)
{
- E_Event_Border_Add *ev = event;
+ E_Event_Client *ev = event;
+ Tasks *tasks = _tasks_find(ev->ec->comp);
- if ((!tasks_config->borders) || (!eina_list_data_find(tasks_config->borders, ev->border)))
+ if ((!tasks) || (e_client_util_ignored_get(ev->ec))) return ECORE_CALLBACK_RENEW;
+ if ((!tasks->clients) || (!eina_list_data_find(tasks->clients, ev->ec)))
{
- tasks_config->borders = eina_list_append(tasks_config->borders, ev->border);
+ tasks->clients = eina_list_append(tasks->clients, ev->ec);
_tasks_refill_all();
}
return EINA_TRUE;
}
static Eina_Bool
-_tasks_cb_event_border_remove(void *data __UNUSED__, int type __UNUSED__, void *event)
+_tasks_cb_event_client_remove(void *data __UNUSED__, int type __UNUSED__, void *event)
{
- E_Event_Border_Remove *ev;
+ E_Event_Client *ev = event;
+ Tasks *tasks = _tasks_find(ev->ec->comp);
- ev = event;
- tasks_config->borders = eina_list_remove(tasks_config->borders, ev->border);
+ if ((!tasks) || (e_client_util_ignored_get(ev->ec))) return ECORE_CALLBACK_RENEW;
+ tasks->clients = eina_list_remove(tasks->clients, ev->ec);
_tasks_refill_all();
return EINA_TRUE;
}
static Eina_Bool
-_tasks_cb_event_border_iconify(void *data __UNUSED__, int type __UNUSED__, void *event)
+_tasks_cb_event_client_iconify(void *data __UNUSED__, int type __UNUSED__, void *event)
{
- E_Event_Border_Iconify *ev;
-
- ev = event;
- _tasks_signal_emit(ev->border, "e,state,iconified", "e");
+ E_Event_Client *ev = event;
+ _tasks_signal_emit(ev->ec, "e,state,iconified", "e");
return EINA_TRUE;
}
static Eina_Bool
-_tasks_cb_event_border_uniconify(void *data __UNUSED__, int type __UNUSED__, void *event)
+_tasks_cb_event_client_uniconify(void *data __UNUSED__, int type __UNUSED__, void *event)
{
- E_Event_Border_Uniconify *ev;
-
- ev = event;
- _tasks_signal_emit(ev->border, "e,state,uniconified", "e");
+ E_Event_Client *ev = event;
+ _tasks_signal_emit(ev->ec, "e,state,uniconified", "e");
return EINA_TRUE;
}
static Eina_Bool
_tasks_cb_window_focus_in(void *data __UNUSED__, int type __UNUSED__, void *event)
{
- E_Event_Border_Focus_In *ev;
-
- ev = event;
- _tasks_signal_emit(ev->border, "e,state,focused", "e");
+ E_Event_Client *ev = event;
+ _tasks_signal_emit(ev->ec, "e,state,focused", "e");
return EINA_TRUE;
}
static Eina_Bool
_tasks_cb_window_focus_out(void *data __UNUSED__, int type __UNUSED__, void *event)
{
- E_Event_Border_Focus_Out *ev;
-
- ev = event;
- _tasks_signal_emit(ev->border, "e,state,unfocused", "e");
+ E_Event_Client *ev = event;
+ _tasks_signal_emit(ev->ec, "e,state,unfocused", "e");
return EINA_TRUE;
}
static Eina_Bool
-_tasks_cb_event_border_urgent_change(void *data __UNUSED__, int type __UNUSED__, void *event)
+_tasks_cb_event_client_urgent_change(void *data __UNUSED__, int type __UNUSED__, void *event)
{
- E_Event_Border_Urgent_Change *ev = event;
+ E_Event_Client_Property *ev = event;
- if (ev->border->client.icccm.urgent)
- _tasks_signal_emit(ev->border, "e,state,urgent", "e");
+ if (!(ev->property & E_CLIENT_PROPERTY_URGENCY)) return ECORE_CALLBACK_RENEW;
+ if (ev->ec->icccm.urgent && (!ev->ec->focused))
+ _tasks_signal_emit(ev->ec, "e,state,urgent", "e");
else
- _tasks_signal_emit(ev->border, "e,state,not_urgent", "e");
+ _tasks_signal_emit(ev->ec, "e,state,not_urgent", "e");
return EINA_TRUE;
}
static Eina_Bool
-_tasks_cb_event_border_title_change(void *data __UNUSED__, int type __UNUSED__, void *event)
+_tasks_cb_event_client_title_change(void *data __UNUSED__, int type __UNUSED__, void *event)
{
- E_Event_Border_Title_Change *ev;
- E_Border *border;
+ E_Event_Client_Property *ev = event;
- ev = event;
- border = ev->border;
- if (border) _tasks_refill_border(border);
+ if (!(ev->property & E_CLIENT_PROPERTY_TITLE)) return ECORE_CALLBACK_RENEW;
+ _tasks_refill_border(ev->ec);
return EINA_TRUE;
}
static Eina_Bool
-_tasks_cb_event_border_icon_change(void *data __UNUSED__, int type __UNUSED__, void *event)
+_tasks_cb_event_client_icon_change(void *data __UNUSED__, int type __UNUSED__, void *event)
{
- E_Event_Border_Icon_Change *ev;
- E_Border *border;
+ E_Event_Client_Property *ev = event;
- ev = event;
- border = ev->border;
- if (border) _tasks_refill_border(border);
+ if (!(ev->property & E_CLIENT_PROPERTY_ICON)) return ECORE_CALLBACK_RENEW;
+ _tasks_refill_border(ev->ec);
return EINA_TRUE;
}
static Eina_Bool
-_tasks_cb_event_border_zone_set(void *data __UNUSED__, int type __UNUSED__, void *event __UNUSED__)
+_tasks_cb_event_client_zone_set(void *data __UNUSED__, int type __UNUSED__, void *event __UNUSED__)
{
_tasks_refill_all();
return EINA_TRUE;
}
static Eina_Bool
-_tasks_cb_event_border_desk_set(void *data __UNUSED__, int type __UNUSED__, void *event __UNUSED__)
+_tasks_cb_event_client_desk_set(void *data __UNUSED__, int type __UNUSED__, void *event __UNUSED__)
{
_tasks_refill_all();
return EINA_TRUE;
diff --git a/src/modules/tasks/e_mod_main.h b/src/modules/tasks/e_mod_main.h
index be956fc069..caead1b9e5 100644
--- a/src/modules/tasks/e_mod_main.h
+++ b/src/modules/tasks/e_mod_main.h
@@ -8,7 +8,7 @@ struct _Config
{
E_Module *module;
Eina_List *tasks;
- Eina_List *borders;
+ Eina_List *clients;
Eina_List *items;
E_Menu *menu;
Eina_List *handlers;
diff --git a/src/modules/teamwork/e_mod_config.c b/src/modules/teamwork/e_mod_config.c
index d50c4d45af..d4971dcfbe 100644
--- a/src/modules/teamwork/e_mod_config.c
+++ b/src/modules/teamwork/e_mod_config.c
@@ -150,7 +150,7 @@ _basic_apply_data(E_Config_Dialog *cfd EINA_UNUSED,
}
EINTERN E_Config_Dialog *
-e_int_config_teamwork_module(E_Container *con, const char *params EINA_UNUSED)
+e_int_config_teamwork_module(E_Comp *comp, const char *params EINA_UNUSED)
{
E_Config_Dialog *cfd;
E_Config_Dialog_View *v;
@@ -166,7 +166,7 @@ e_int_config_teamwork_module(E_Container *con, const char *params EINA_UNUSED)
v->basic.create_widgets = _basic_create_widgets;
v->basic.check_changed = _basic_check_changed;
- cfd = e_config_dialog_new(con, _("Teamwork Settings"),
+ cfd = e_config_dialog_new(comp, _("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 88eb9ad67d..01a7ca27cb 100644
--- a/src/modules/teamwork/e_mod_main.h
+++ b/src/modules/teamwork/e_mod_main.h
@@ -39,7 +39,7 @@ typedef struct Mod
size_t media_size;
Eina_Inlist *media_list;
Eina_Hash *media;
- E_Popup *pop;
+ Evas_Object *pop;
Eina_Bool sticky : 1;
Eina_Bool force : 1;
Eina_Bool hidden : 1;
@@ -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_Container *con, const char *params EINA_UNUSED);
+EINTERN E_Config_Dialog *e_int_config_teamwork_module(E_Comp *comp, const char *params EINA_UNUSED);
EAPI int e_modapi_shutdown(E_Module *m __UNUSED__);
#undef DBG
diff --git a/src/modules/teamwork/e_mod_tw.c b/src/modules/teamwork/e_mod_tw.c
index d2244527b6..af6875194d 100644
--- a/src/modules/teamwork/e_mod_tw.c
+++ b/src/modules/teamwork/e_mod_tw.c
@@ -373,7 +373,7 @@ dbus_link_show_helper(const char *uri, Eina_Bool signal_open)
{
Teamwork_Link_Type type;
- if (tw_mod->pop && (!e_util_strcmp(e_object_data_get(E_OBJECT(tw_mod->pop)), uri))) return;
+ if (tw_mod->pop && (!e_util_strcmp(evas_object_data_get(tw_mod->pop, "uri"), uri))) return;
type = dbus_link_uri_type_get(uri);
switch (type)
{
@@ -428,7 +428,7 @@ dbus_link_hide_cb(const Eldbus_Service_Interface *iface EINA_UNUSED, const Eldbu
if (eldbus_message_arguments_get(msg, "s", &uri))
{
- if (tw_mod->pop && (!tw_mod->sticky) && (!e_util_strcmp(e_object_data_get(E_OBJECT(tw_mod->pop)), uri)))
+ if (tw_mod->pop && (!tw_mod->sticky) && (!e_util_strcmp(evas_object_data_get(tw_mod->pop, "uri"), uri)))
{
tw_hide(NULL);
tw_mod->force = 0;
@@ -463,10 +463,8 @@ dbus_link_mouse_out_cb(const Eldbus_Service_Interface *iface EINA_UNUSED, const
if (eldbus_message_arguments_get(msg, "suxii", &uri, &t, &win, &last_coords.x, &last_coords.y))
{
if (tw_mod->pop && (!tw_mod->sticky) &&
- (
- (tw_tmpfile && (!e_util_strcmp(e_object_data_get(E_OBJECT(tw_mod->pop)), tw_tmpfile))) ||
- (!e_util_strcmp(e_object_data_get(E_OBJECT(tw_mod->pop)), uri))
- ))
+ ((tw_tmpfile && (!e_util_strcmp(evas_object_data_get(tw_mod->pop, "uri"), tw_tmpfile))) ||
+ (!e_util_strcmp(evas_object_data_get(tw_mod->pop, "uri"), uri))))
{
if (tw_config->mouse_out_delay)
{
@@ -758,16 +756,17 @@ tw_idler_start(void)
}
static void
-tw_popup_del(void *obj)
+tw_popup_del(void *data EINA_UNUSED, Evas *e EINA_UNUSED, Evas_Object *obj, void *event_info EINA_UNUSED)
{
- eina_stringshare_del(e_object_data_get(obj));
+ eina_stringshare_del(evas_object_data_get(obj, "uri"));
}
EINTERN void
tw_popup_opacity_set(void)
{
- if (tw_mod->pop && tw_mod->pop->cw)
- e_comp_win_opacity_set(tw_mod->pop->cw, lround((double)255 * (tw_config->popup_opacity / 100.)));
+ int c = lround((double)255 * (tw_config->popup_opacity / 100.));
+ if (tw_mod->pop)
+ evas_object_color_set(tw_mod->pop, c, c, c, c);
}
static void
@@ -775,46 +774,51 @@ tw_show_helper(Evas_Object *o, int w, int h)
{
int px, py, pw, ph;
double ratio = tw_config->popup_size / 100.;
- E_Border *bd = NULL;
+ E_Client *ec = NULL;
+ E_Zone *zone = e_zone_current_get(e_util_comp_current_get());
- E_FREE_FUNC(tw_mod->pop, e_object_del);
+ evas_object_hide(tw_mod->pop);
+ evas_object_del(tw_mod->pop);
tw_mod->sticky = 0;
- tw_mod->pop = e_popup_new(e_zone_current_get(e_util_container_current_get()), 0, 0, 1, 1);
- e_popup_ignore_events_set(tw_mod->pop, 1);
- pw = MIN(w, (ratio * (double)tw_mod->pop->zone->w));
- pw = MIN(pw, tw_mod->pop->zone->w);
+ tw_mod->pop = e_comp_object_util_add(o, E_COMP_OBJECT_TYPE_POPUP);
+ evas_object_pass_events_set(tw_mod->pop, 1);
+ pw = MIN(w, (ratio * (double)zone->w));
+ pw = MIN(pw, zone->w);
if (pw == w) ph = h;
else
ph = lround((double)(pw * h) / ((double)w));
- if (ph > tw_mod->pop->zone->h)
+ if (ph > zone->h)
{
- ph = tw_mod->pop->zone->h;
+ ph = zone->h;
pw = lround((double)(ph * w) / ((double)h));
}
e_livethumb_vsize_set(o, pw, ph);
- e_popup_layer_set(tw_mod->pop, E_COMP_CANVAS_LAYER_POPUP, 0);
+ evas_object_layer_set(tw_mod->pop, E_LAYER_POPUP);
+ evas_object_resize(tw_mod->pop, pw, ph);
if ((!tw_win) && (last_coords.x == last_coords.y) && (last_coords.x == -1))
{
- px = lround(ratio * (double)tw_mod->pop->zone->w) - (pw / 2);
- py = lround(ratio * (double)tw_mod->pop->zone->h) - (ph / 2);
- if (px + pw > tw_mod->pop->zone->w)
- px = tw_mod->pop->zone->w - pw;
- if (py + ph > tw_mod->pop->zone->h)
- py = tw_mod->pop->zone->h - ph;
+ px = lround(ratio * (double)zone->w) - (pw / 2);
+ py = lround(ratio * (double)zone->h) - (ph / 2);
+ if (px + pw > zone->w)
+ px = zone->w - pw;
+ if (py + ph > zone->h)
+ py = zone->h - ph;
+ evas_object_move(tw_mod->pop, px, py);
}
- else if (tw_win && ((bd = e_border_find_by_client_window(tw_win))))
+ else if (tw_win && (((ec = e_pixmap_find_client(E_PIXMAP_TYPE_X, tw_win))) ||
+ ((ec = e_pixmap_find_client(E_PIXMAP_TYPE_WL, tw_win)))))
{
int x, y;
- x = bd->x + bd->client_inset.l + last_coords.x;
- y = bd->y + bd->client_inset.t + last_coords.y;
+ x = ec->client.x + last_coords.x;
+ y = ec->client.y + last_coords.y;
/* prefer tooltip left of last_coords */
px = x - pw - 3;
/* if it's offscreen, try right of last_coords */
if (px < 0) px = x + 3;
/* fuck this, stick it right on the last_coords */
- if (px + pw + 3 > tw_mod->pop->zone->w)
+ if (px + pw + 3 > zone->w)
px = (x / 2) - (pw / 2);
/* give up */
if (px < 0) px = 0;
@@ -824,21 +828,19 @@ tw_show_helper(Evas_Object *o, int w, int h)
/* if it's offscreen, try below last_coords */
if (py < 0) py = y + 3;
/* fuck this, stick it right on the last_coords */
- if (py + ph + 3 > tw_mod->pop->zone->h)
+ if (py + ph + 3 > zone->h)
py = (y / 2) - (ph / 2);
/* give up */
if (py < 0) py = 0;
+ evas_object_move(tw_mod->pop, px, py);
}
else
{
- px = (tw_mod->pop->zone->w / 2) - (pw / 2);
- py = (tw_mod->pop->zone->h / 2) - (pw / 2);
+ e_comp_object_util_center(tw_mod->pop);
}
- e_popup_move_resize(tw_mod->pop, px, py, pw, ph);
- e_popup_content_set(tw_mod->pop, o);
- e_popup_show(tw_mod->pop);
+ evas_object_show(tw_mod->pop);
tw_popup_opacity_set();
- E_OBJECT_DEL_SET(tw_mod->pop, tw_popup_del);
+ evas_object_event_callback_add(tw_mod->pop, EVAS_CALLBACK_DEL, tw_popup_del, NULL);
}
static Eina_Bool
@@ -872,7 +874,7 @@ tw_video_opened_cb(void *data, Evas_Object *obj, void *event_info EINA_UNUSED)
}
emotion_object_size_get(obj, &iw, &ih);
- zone = e_zone_current_get(e_util_container_current_get());
+ zone = e_zone_current_get(e_util_comp_current_get());
w = MIN(zone->w, (ratio * (double)zone->w));
ratio = emotion_object_ratio_get(obj);
if (ratio > 0.0) iw = (ih * ratio) + 0.5;
@@ -882,8 +884,8 @@ tw_video_opened_cb(void *data, Evas_Object *obj, void *event_info EINA_UNUSED)
h = (w * ih) / iw;
e_livethumb_thumb_set(data, obj);
tw_show_helper(data, w, h);
- e_popup_object_add(tw_mod->pop, obj);
- e_object_data_set(E_OBJECT(tw_mod->pop), eina_stringshare_add(emotion_object_file_get(obj)));
+ e_comp_object_util_del_list_append(tw_mod->pop, obj);
+ evas_object_data_set(tw_mod->pop, "uri", eina_stringshare_add(emotion_object_file_get(obj)));
evas_object_smart_callback_del_full(obj, "frame_decode", tw_video_opened_cb, data);
}
@@ -1065,8 +1067,8 @@ tw_show(Media *i)
}
e_livethumb_thumb_set(prev, ic);
tw_show_helper(prev, w, h);
- e_object_data_set(E_OBJECT(tw_mod->pop), eina_stringshare_ref(i->addr));
- e_popup_object_add(tw_mod->pop, ic);
+ evas_object_data_set(tw_mod->pop, "uri", eina_stringshare_ref(i->addr));
+ e_comp_object_util_del_list_append(tw_mod->pop, ic);
}
static void
@@ -1109,8 +1111,7 @@ tw_show_local_file(const char *uri)
}
e_livethumb_thumb_set(prev, o);
tw_show_helper(prev, w, h);
- e_popup_object_add(tw_mod->pop, o);
- e_object_data_set(E_OBJECT(tw_mod->pop), eina_stringshare_add(uri));
+ evas_object_data_set(tw_mod->pop, "uri", eina_stringshare_add(uri));
}
static void
@@ -1128,14 +1129,14 @@ tw_handler_hide(void)
}
static Eina_Bool
-desk_show(void *data EINA_UNUSED, int type EINA_UNUSED, E_Event_Border_Focus_Out *ev EINA_UNUSED)
+desk_show(void *data EINA_UNUSED, int type EINA_UNUSED, E_Event_Desk_Show *ev EINA_UNUSED)
{
if (tw_mod->pop) tw_handler_hide();
return ECORE_CALLBACK_RENEW;
}
static Eina_Bool
-focus_out(void *data EINA_UNUSED, int type EINA_UNUSED, E_Event_Border_Focus_Out *ev EINA_UNUSED)
+focus_out(void *data EINA_UNUSED, int type EINA_UNUSED, E_Event_Client *ev EINA_UNUSED)
{
if (e_config->focus_policy == E_FOCUS_CLICK) return ECORE_CALLBACK_RENEW;
if (tw_mod->pop) tw_handler_hide();
@@ -1158,7 +1159,8 @@ tw_hide(void *d EINA_UNUSED)
}
eina_stringshare_replace(&tw_tmpfile, NULL);
tw_win = 0;
- E_FREE_FUNC(tw_mod->pop, e_object_del);
+ evas_object_hide(tw_mod->pop);
+ E_FREE_FUNC(tw_mod->pop, evas_object_del);
last_coords.x = last_coords.y = 0;
E_FREE_FUNC(tw_hide_timer, ecore_timer_del);
download_media_cleanup();
@@ -1211,7 +1213,7 @@ e_tw_init(void)
E_LIST_HANDLER_APPEND(handlers, ECORE_CON_EVENT_URL_COMPLETE, download_media_complete, tw_mod);
E_LIST_HANDLER_APPEND(handlers, ECORE_CON_EVENT_URL_PROGRESS, download_media_status, tw_mod);
E_LIST_HANDLER_APPEND(handlers, ECORE_CON_EVENT_URL_DATA, download_media_data, tw_mod);
- E_LIST_HANDLER_APPEND(handlers, E_EVENT_BORDER_FOCUS_OUT, focus_out, tw_mod);
+ E_LIST_HANDLER_APPEND(handlers, E_EVENT_CLIENT_FOCUS_OUT, focus_out, tw_mod);
E_LIST_HANDLER_APPEND(handlers, E_EVENT_DESK_SHOW, desk_show, tw_mod);
tw_mod->media = eina_hash_string_superfast_new((Eina_Free_Cb)download_media_free);
@@ -1256,7 +1258,8 @@ e_tw_shutdown(void)
tw_hide(NULL);
last_coords.x = last_coords.y = 0;
eina_hash_free(tw_mod->media);
- E_FREE_FUNC(tw_mod->pop, e_object_del);
+ evas_object_hide(tw_mod->pop);
+ E_FREE_FUNC(tw_mod->pop, evas_object_del);
}
EINTERN void
diff --git a/src/modules/temperature/e_mod_config.c b/src/modules/temperature/e_mod_config.c
index df6e936b5f..90b4922ff7 100644
--- a/src/modules/temperature/e_mod_config.c
+++ b/src/modules/temperature/e_mod_config.c
@@ -52,7 +52,7 @@ config_temperature_module(Config_Face *inst)
snprintf(buff, sizeof(buff),
"%s/e-module-temperature.edj", inst->module->dir);
inst->config_dialog =
- e_config_dialog_new(e_container_current_get(e_manager_current_get()),
+ e_config_dialog_new(NULL,
_("Temperature Settings"), "E",
"_e_mod_temperature_config_dialog", buff, 0, v, inst);
}
diff --git a/src/modules/tiling/e_mod_config.c b/src/modules/tiling/e_mod_config.c
index 0682321046..a9c6adf8e6 100644
--- a/src/modules/tiling/e_mod_config.c
+++ b/src/modules/tiling/e_mod_config.c
@@ -168,11 +168,11 @@ _basic_create_widgets(E_Config_Dialog *cfd __UNUSED__,
E_Config_Dialog_Data *cfdata)
{
Evas_Object *o, *oc, *of;
- E_Container *con;
+ E_Comp *comp;
E_Zone *zone;
Eina_List *l;
- con = e_container_current_get(e_manager_current_get());
+ comp = e_comp_get(NULL);
o = e_widget_list_add(evas, 0, 0);
@@ -207,7 +207,7 @@ _basic_create_widgets(E_Config_Dialog *cfd __UNUSED__,
e_widget_ilist_multi_select_set(cfdata->o_zonelist, false);
e_widget_size_min_set(cfdata->o_zonelist, 100, 100);
e_widget_on_change_hook_set(cfdata->o_zonelist, _cb_zone_change, cfdata);
- for (l = con->zones; l; l = l->next) {
+ for (l = comp->zones; l; l = l->next) {
if (!(zone = l->data))
continue;
e_widget_ilist_append(cfdata->o_zonelist, NULL, zone->name, NULL, zone, NULL);
@@ -220,7 +220,7 @@ _basic_create_widgets(E_Config_Dialog *cfd __UNUSED__,
/* List of individual tiling modes */
cfdata->evas = evas;
- _fill_zone_config(eina_list_data_get(con->zones), cfdata);
+ _fill_zone_config(eina_list_data_get(comp->zones), cfdata);
e_widget_ilist_selected_set(cfdata->o_zonelist, 0);
@@ -331,7 +331,7 @@ _basic_apply_data(E_Config_Dialog *cfd __UNUSED__,
}
E_Config_Dialog *
-e_int_config_tiling_module(E_Container *con,
+e_int_config_tiling_module(E_Comp *comp,
const char *params __UNUSED__)
{
E_Config_Dialog *cfd;
@@ -350,7 +350,7 @@ e_int_config_tiling_module(E_Container *con,
snprintf(buf, sizeof(buf), "%s/e-module-tiling.edj",
e_module_dir_get(tiling_g.module));
- cfd = e_config_dialog_new(con,
+ cfd = e_config_dialog_new(comp,
_("Tiling Configuration"),
"E", "windows/tiling",
buf, 0, v, NULL);
diff --git a/src/modules/tiling/e_mod_tiling.c b/src/modules/tiling/e_mod_tiling.c
index 4e0c02a021..c5a3cf76ae 100644
--- a/src/modules/tiling/e_mod_tiling.c
+++ b/src/modules/tiling/e_mod_tiling.c
@@ -33,7 +33,7 @@ typedef struct geom_t {
} geom_t;
typedef struct overlay_t {
- E_Popup *popup;
+ Evas_Object *popup;
Evas_Object *obj;
} overlay_t;
@@ -41,11 +41,11 @@ typedef struct transition_overlay_t {
overlay_t overlay;
int stack;
char key[4];
- E_Border *bd;
+ E_Client *ec;
} transition_overlay_t;
-typedef struct Border_Extra {
- E_Border *border;
+typedef struct Client_Extra {
+ E_Client *client;
geom_t expected;
struct {
geom_t geom;
@@ -56,7 +56,7 @@ typedef struct Border_Extra {
} orig;
overlay_t overlay;
char key[4];
-} Border_Extra;
+} Client_Extra;
struct tiling_g tiling_g = {
.module = NULL,
@@ -66,7 +66,7 @@ struct tiling_g tiling_g = {
};
static void
-_add_border(E_Border *bd);
+_add_client(E_Client *ec);
/* }}} */
/* Globals {{{ */
@@ -79,23 +79,23 @@ static struct tiling_mod_main_g
int currently_switching_desktop;
Ecore_X_Window action_input_win;
Ecore_Event_Handler *handler_key,
- *handler_border_resize,
- *handler_border_move,
- *handler_border_add,
- *handler_border_remove,
- *handler_border_iconify,
- *handler_border_uniconify,
- *handler_border_stick,
- *handler_border_unstick,
+ *handler_client_resize,
+ *handler_client_move,
+ *handler_client_add,
+ *handler_client_remove,
+ *handler_client_iconify,
+ *handler_client_uniconify,
+ *handler_client_stick,
+ *handler_client_unstick,
*handler_desk_show,
*handler_desk_before_show,
*handler_desk_set,
- *handler_container_resize;
- E_Border_Hook *pre_border_assign_hook;
+ *handler_compositor_resize;
+ E_Client_Hook *pre_client_assign_hook;
Tiling_Info *tinfo;
Eina_Hash *info_hash;
- Eina_Hash *border_extras;
+ Eina_Hash *client_extras;
Eina_Hash *overlays;
E_Action *act_togglefloat,
@@ -126,8 +126,8 @@ static struct tiling_mod_main_g
overlay_t move_overlays[MOVE_COUNT];
transition_overlay_t *transition_overlay;
Ecore_Timer *action_timer;
- E_Border *focused_bd;
- void (*action_cb)(E_Border *bd, Border_Extra *extra);
+ E_Client *focused_ec;
+ void (*action_cb)(E_Client *ec, Client_Extra *extra);
tiling_input_mode_t input_mode;
char keys[4];
@@ -143,7 +143,7 @@ static E_Desk *
get_current_desk(void)
{
E_Manager *m = e_manager_current_get();
- E_Container *c = e_container_current_get(m);
+ E_Comp *c = m->comp;
E_Zone *z = e_zone_current_get(c);
return e_desk_current_get(z);
@@ -182,47 +182,47 @@ check_tinfo(const E_Desk *desk)
}
static int
-is_floating_window(const E_Border *bd)
+is_floating_window(const E_Client *ec)
{
- return EINA_LIST_IS_IN(_G.tinfo->floating_windows, bd);
+ return EINA_LIST_IS_IN(_G.tinfo->floating_windows, ec);
}
static int
-is_tilable(const E_Border *bd)
+is_tilable(const E_Client *ec)
{
- if (bd->client.icccm.min_h == bd->client.icccm.max_h
- && bd->client.icccm.max_h > 0)
+ if (ec->icccm.min_h == ec->icccm.max_h
+ && ec->icccm.max_h > 0)
return false;
- if (bd->client.icccm.gravity == ECORE_X_GRAVITY_STATIC)
+ if (ec->icccm.gravity == ECORE_X_GRAVITY_STATIC)
return false;
if (!tiling_g.config->tile_dialogs
- && ((bd->client.icccm.transient_for != 0)
- || (bd->client.netwm.type == ECORE_X_WINDOW_TYPE_DIALOG)))
+ && ((ec->icccm.transient_for != 0)
+ || (ec->netwm.type == E_WINDOW_TYPE_DIALOG)))
return false;
return true;
}
static void
-change_window_border(E_Border *bd,
+change_window_border(E_Client *ec,
const char *bordername)
{
- eina_stringshare_replace(&bd->bordername, bordername);
- bd->client.border.changed = true;
- bd->changes.border = true;
- bd->changed = true;
+ eina_stringshare_replace(&ec->bordername, bordername);
+ ec->border.changed = true;
+ ec->changes.border = true;
+ ec->changed = true;
- DBG("%p -> border %s", bd, bordername);
+ DBG("%p -> border %s", ec, bordername);
}
static int
-get_stack(const E_Border *bd)
+get_stack(const E_Client *ec)
{
int i;
for (i = 0; i < TILING_MAX_STACKS; i++) {
- if (EINA_LIST_IS_IN(_G.tinfo->stacks[i], bd))
+ if (EINA_LIST_IS_IN(_G.tinfo->stacks[i], ec))
return i;
}
return -1;
@@ -307,123 +307,123 @@ e_tiling_update_conf(void)
}
static void
-_e_border_move_resize(E_Border *bd,
+_e_client_move_resize(E_Client *ec,
int x,
int y,
int w,
int h)
{
- DBG("%p -> %dx%d+%d+%d", bd, w, h, x, y);
- e_border_move_resize(bd, x, y, w, h);
+ DBG("%p -> %dx%d+%d+%d", ec, w, h, x, y);
+ evas_object_geometry_set(ec->frame, x, y, w, h);
}
static void
-_e_border_move(E_Border *bd,
+_e_client_move(E_Client *ec,
int x,
int y)
{
- DBG("%p -> +%d+%d", bd, x, y);
- e_border_move(bd, x, y);
+ DBG("%p -> +%d+%d", ec, x, y);
+ evas_object_move(ec->frame, x, y);
}
static void
-_e_border_resize(E_Border *bd,
+_e_client_resize(E_Client *ec,
int w,
int h)
{
- DBG("%p -> %dx%d", bd, w, h);
- e_border_resize(bd, w, h);
+ DBG("%p -> %dx%d", ec, w, h);
+ evas_object_resize(ec->frame, w, h);
}
static void
-_e_border_maximize(E_Border *bd, E_Maximize max)
+_e_client_maximize(E_Client *ec, E_Maximize max)
{
- DBG("%p -> %s", bd,
+ DBG("%p -> %s", ec,
(max & E_MAXIMIZE_DIRECTION) == E_MAXIMIZE_NONE ? "NONE" :
(max & E_MAXIMIZE_DIRECTION) == E_MAXIMIZE_VERTICAL ? "VERTICAL" :
(max & E_MAXIMIZE_DIRECTION) == E_MAXIMIZE_HORIZONTAL ? "HORIZONTAL" :
"BOTH");
- DBG("new_client:%s, bd->maximized=%x",
- bd->new_client? "true": "false",
- bd->maximized);
- e_border_maximize(bd, max);
+ DBG("new_client:%s, ec->maximized=%x",
+ ec->new_client? "true": "false",
+ ec->maximized);
+ e_client_maximize(ec, max);
}
static void
-_e_border_unmaximize(E_Border *bd, E_Maximize max)
+_e_client_unmaximize(E_Client *ec, E_Maximize max)
{
- DBG("%p -> %s", bd,
+ DBG("%p -> %s", ec,
(max & E_MAXIMIZE_DIRECTION) == E_MAXIMIZE_NONE ? "NONE" :
(max & E_MAXIMIZE_DIRECTION) == E_MAXIMIZE_VERTICAL ? "VERTICAL" :
(max & E_MAXIMIZE_DIRECTION) == E_MAXIMIZE_HORIZONTAL ? "HORIZONTAL" :
"BOTH");
- e_border_unmaximize(bd, max);
+ e_client_unmaximize(ec, max);
}
static void
-_restore_border(E_Border *bd)
+_restore_client(E_Client *ec)
{
- Border_Extra *extra;
+ Client_Extra *extra;
- extra = eina_hash_find(_G.border_extras, &bd);
+ extra = eina_hash_find(_G.client_extras, &ec);
if (!extra) {
- ERR("No extra for %p", bd);
+ ERR("No extra for %p", ec);
return;
}
- _e_border_unmaximize(bd, E_MAXIMIZE_BOTH);
- _e_border_move_resize(bd,
+ _e_client_unmaximize(ec, E_MAXIMIZE_BOTH);
+ _e_client_move_resize(ec,
extra->orig.geom.x,
extra->orig.geom.y,
extra->orig.geom.w,
extra->orig.geom.h);
- e_border_layer_set(bd, extra->orig.layer);
+ evas_object_layer_set(ec->frame, extra->orig.layer);
if (extra->orig.maximized) {
- e_border_maximize(bd, extra->orig.maximized);
- bd->maximized = extra->orig.maximized;
+ e_client_maximize(ec, extra->orig.maximized);
+ ec->maximized = extra->orig.maximized;
}
DBG("Change window border back to %s for %p",
- extra->orig.bordername, bd);
- change_window_border(bd, (extra->orig.bordername)
+ extra->orig.bordername, ec);
+ change_window_border(ec, (extra->orig.bordername)
? extra->orig.bordername : "default");
}
-static Border_Extra *
-_get_or_create_border_extra(E_Border *bd)
+static Client_Extra *
+_get_or_create_client_extra(E_Client *ec)
{
- Border_Extra *extra;
+ Client_Extra *extra;
- extra = eina_hash_find(_G.border_extras, &bd);
+ extra = eina_hash_find(_G.client_extras, &ec);
if (!extra) {
- extra = E_NEW(Border_Extra, 1);
- *extra = (Border_Extra) {
- .border = bd,
+ extra = E_NEW(Client_Extra, 1);
+ *extra = (Client_Extra) {
+ .client = ec,
.expected = {
- .x = bd->x,
- .y = bd->y,
- .w = bd->w,
- .h = bd->h,
+ .x = ec->x,
+ .y = ec->y,
+ .w = ec->w,
+ .h = ec->h,
},
.orig = {
.geom = {
- .x = bd->x,
- .y = bd->y,
- .w = bd->w,
- .h = bd->h,
+ .x = ec->x,
+ .y = ec->y,
+ .w = ec->w,
+ .h = ec->h,
},
- .layer = bd->layer,
- .stacking = bd->client.netwm.state.stacking,
- .maximized = bd->maximized,
- .bordername = eina_stringshare_add(bd->bordername),
+ .layer = ec->layer,
+ .stacking = ec->netwm.state.stacking,
+ .maximized = ec->maximized,
+ .bordername = eina_stringshare_add(ec->bordername),
},
};
- eina_hash_direct_add(_G.border_extras, &extra->border, extra);
+ eina_hash_direct_add(_G.client_extras, &extra->client, extra);
} else {
extra->expected = (geom_t) {
- .x = bd->x,
- .y = bd->y,
- .w = bd->w,
- .h = bd->h,
+ .x = ec->x,
+ .y = ec->y,
+ .w = ec->w,
+ .h = ec->h,
};
}
@@ -436,14 +436,15 @@ _get_or_create_border_extra(E_Border *bd)
static void
_overlays_free_cb(void *data)
{
- Border_Extra *extra = data;
+ Client_Extra *extra = data;
if (extra->overlay.obj) {
evas_object_del(extra->overlay.obj);
extra->overlay.obj = NULL;
}
if (extra->overlay.popup) {
- e_object_del(E_OBJECT(extra->overlay.popup));
+ evas_object_hide(extra->overlay.popup);
+ evas_object_del(extra->overlay.popup);
extra->overlay.popup = NULL;
}
@@ -477,7 +478,7 @@ end_special_input(void)
_G.action_timer = NULL;
}
- _G.focused_bd = NULL;
+ _G.focused_ec = NULL;
_G.action_cb = NULL;
switch(_G.input_mode) {
@@ -490,7 +491,8 @@ end_special_input(void)
overlay->obj = NULL;
}
if (overlay->popup) {
- e_object_del(E_OBJECT(overlay->popup));
+ evas_object_hide(overlay->popup);
+ evas_object_del(overlay->popup);
overlay->popup = NULL;
}
}
@@ -501,7 +503,8 @@ end_special_input(void)
evas_object_del(_G.transition_overlay->overlay.obj);
}
if (_G.transition_overlay->overlay.popup) {
- e_object_del(E_OBJECT(_G.transition_overlay->overlay.popup));
+ evas_object_hide(_G.transition_overlay->overlay.popup);
+ evas_object_del(_G.transition_overlay->overlay.popup);
}
E_FREE(_G.transition_overlay);
_G.transition_overlay = NULL;
@@ -520,7 +523,7 @@ overlay_key_down(void *data __UNUSED__,
void *event)
{
Ecore_Event_Key *ev = event;
- Border_Extra *extra;
+ Client_Extra *extra;
if (ev->event_window != _G.action_input_win)
return ECORE_CALLBACK_PASS_ON;
@@ -549,7 +552,7 @@ overlay_key_down(void *data __UNUSED__,
extra = eina_hash_find(_G.overlays, _G.keys);
if (extra) {
- _G.action_cb(_G.focused_bd, extra);
+ _G.action_cb(_G.focused_ec, extra);
} else {
return ECORE_CALLBACK_RENEW;
}
@@ -568,8 +571,8 @@ _timeout_cb(void *data __UNUSED__)
}
static void
-_do_overlay(E_Border *focused_bd,
- void (*action_cb)(E_Border *, Border_Extra *),
+_do_overlay(E_Client *focused_ec,
+ void (*action_cb)(E_Client *, Client_Extra *),
tiling_input_mode_t input_mode)
{
Ecore_X_Window parent;
@@ -589,7 +592,7 @@ _do_overlay(E_Border *focused_bd,
_G.input_mode = input_mode;
- _G.focused_bd = focused_bd;
+ _G.focused_ec = focused_ec;
_G.action_cb = action_cb;
_G.overlays = eina_hash_string_small_new(_overlays_free_cb);
@@ -608,28 +611,24 @@ _do_overlay(E_Border *focused_bd,
for (i = 0; i < TILING_MAX_STACKS; i++) {
Eina_List *l;
- E_Border *bd;
+ E_Client *ec;
if (!_G.tinfo->stacks[i])
break;
- EINA_LIST_FOREACH(_G.tinfo->stacks[i], l, bd) {
- if (bd != focused_bd && n < nmax) {
- Border_Extra *extra;
+ EINA_LIST_FOREACH(_G.tinfo->stacks[i], l, ec) {
+ if (ec != focused_ec && n < nmax) {
+ Client_Extra *extra;
Evas_Coord ew, eh;
- extra = eina_hash_find(_G.border_extras, &bd);
+ extra = eina_hash_find(_G.client_extras, &ec);
if (!extra) {
- ERR("No extra for %p", bd);
+ ERR("No extra for %p", ec);
continue;
}
- extra->overlay.popup = e_popup_new(bd->zone, 0, 0, 1, 1);
- if (!extra->overlay.popup)
- continue;
-
- e_popup_layer_set(extra->overlay.popup, E_COMP_CANVAS_LAYER_LAYOUT, E_LAYER_NORMAL);
- extra->overlay.obj =
- edje_object_add(extra->overlay.popup->evas);
+ extra->overlay.obj = edje_object_add(ec->comp->evas);
+ extra->overlay.popup = e_comp_object_util_add(extra->overlay.obj, E_COMP_OBJECT_TYPE_POPUP);
+ evas_object_layer_set(extra->overlay.popup, E_LAYER_CLIENT_NORMAL);
e_theme_edje_object_set(extra->overlay.obj,
"base/theme/borders",
"e/widgets/border/default/resize");
@@ -658,29 +657,21 @@ _do_overlay(E_Border *focused_bd,
"e.text.label",
extra->key);
edje_object_size_min_calc(extra->overlay.obj, &ew, &eh);
- evas_object_move(extra->overlay.obj, 0, 0);
- evas_object_resize(extra->overlay.obj, ew, eh);
- evas_object_show(extra->overlay.obj);
- e_popup_content_set(extra->overlay.popup,
- extra->overlay.obj);
-
- evas_object_show(extra->overlay.obj);
- e_popup_show(extra->overlay.popup);
-
- e_popup_move_resize(extra->overlay.popup,
- (bd->x - extra->overlay.popup->zone->x) +
- ((bd->w - ew) / 2),
- (bd->y - extra->overlay.popup->zone->y) +
- ((bd->h - eh) / 2),
+
+ evas_object_geometry_set(extra->overlay.popup,
+ (ec->x - ec->zone->x) +
+ ((ec->w - ew) / 2),
+ (ec->y - ec->zone->y) +
+ ((ec->h - eh) / 2),
ew, eh);
- e_popup_show(extra->overlay.popup);
+ evas_object_show(extra->overlay.popup);
}
}
}
/* Get input */
- parent = _G.tinfo->desk->zone->container->win;
+ parent = _G.tinfo->desk->zone->comp->win;
_G.action_input_win = ecore_x_window_input_new(parent, 0, 0, 1, 1);
if (!_G.action_input_win) {
end_special_input();
@@ -728,19 +719,19 @@ _reorganize_stack(int stack)
h = _G.tinfo->size[stack];
for (l = _G.tinfo->stacks[stack]; l; l = l->next, i++) {
- E_Border *bd = l->data;
- Border_Extra *extra;
+ E_Client *ec = l->data;
+ Client_Extra *extra;
int d = (i * 2 * zw) % count
- (2 * cw) % count;
- extra = eina_hash_find(_G.border_extras, &bd);
+ extra = eina_hash_find(_G.client_extras, &ec);
if (!extra) {
- ERR("No extra for %p", bd);
+ ERR("No extra for %p", ec);
continue;
}
- if ((bd->maximized & E_MAXIMIZE_HORIZONTAL) && count != 1) {
- _e_border_unmaximize(bd, E_MAXIMIZE_HORIZONTAL);
+ if ((ec->maximized & E_MAXIMIZE_HORIZONTAL) && count != 1) {
+ _e_client_unmaximize(ec, E_MAXIMIZE_HORIZONTAL);
}
/* let's use a bresenham here */
@@ -750,7 +741,7 @@ _reorganize_stack(int stack)
extra->expected.h = h;
cw += extra->expected.w;
- _e_border_move_resize(bd,
+ _e_client_move_resize(ec,
extra->expected.x,
extra->expected.y,
extra->expected.w,
@@ -765,19 +756,19 @@ _reorganize_stack(int stack)
h = zh / count;
for (l = _G.tinfo->stacks[stack]; l; l = l->next, i++) {
- E_Border *bd = l->data;
- Border_Extra *extra;
+ E_Client *ec = l->data;
+ Client_Extra *extra;
int d = (i * 2 * zh) % count
- (2 * ch) % count;
- extra = eina_hash_find(_G.border_extras, &bd);
+ extra = eina_hash_find(_G.client_extras, &ec);
if (!extra) {
- ERR("No extra for %p", bd);
+ ERR("No extra for %p", ec);
continue;
}
- if ((bd->maximized & E_MAXIMIZE_VERTICAL) && count != 1) {
- _e_border_unmaximize(bd, E_MAXIMIZE_VERTICAL);
+ if ((ec->maximized & E_MAXIMIZE_VERTICAL) && count != 1) {
+ _e_client_unmaximize(ec, E_MAXIMIZE_VERTICAL);
}
/* let's use a bresenham here */
@@ -787,7 +778,7 @@ _reorganize_stack(int stack)
extra->expected.h = h + d;
ch += extra->expected.h;
- _e_border_move_resize(bd,
+ _e_client_move_resize(ec,
extra->expected.x,
extra->expected.y,
extra->expected.w,
@@ -795,12 +786,12 @@ _reorganize_stack(int stack)
}
}
} else {
- Border_Extra *extra;
- E_Border *bd = _G.tinfo->stacks[stack]->data;
+ Client_Extra *extra;
+ E_Client *ec = _G.tinfo->stacks[stack]->data;
- extra = eina_hash_find(_G.border_extras, &bd);
+ extra = eina_hash_find(_G.client_extras, &ec);
if (!extra) {
- ERR("No extra for %p", bd);
+ ERR("No extra for %p", ec);
return;
}
@@ -815,13 +806,13 @@ _reorganize_stack(int stack)
extra->expected.w = w;
extra->expected.h = _G.tinfo->size[stack];
- _e_border_move_resize(bd,
+ _e_client_move_resize(ec,
extra->expected.x,
extra->expected.y,
extra->expected.w,
extra->expected.h);
- _e_border_maximize(bd, E_MAXIMIZE_EXPAND | E_MAXIMIZE_HORIZONTAL);
+ _e_client_maximize(ec, E_MAXIMIZE_EXPAND | E_MAXIMIZE_HORIZONTAL);
} else {
int y, h;
@@ -833,13 +824,13 @@ _reorganize_stack(int stack)
extra->expected.w = _G.tinfo->size[stack];
extra->expected.h = h;
- _e_border_move_resize(bd,
+ _e_client_move_resize(ec,
extra->expected.x,
extra->expected.y,
extra->expected.w,
extra->expected.h);
- _e_border_maximize(bd, E_MAXIMIZE_EXPAND | E_MAXIMIZE_VERTICAL);
+ _e_client_maximize(ec, E_MAXIMIZE_EXPAND | E_MAXIMIZE_VERTICAL);
}
}
}
@@ -851,12 +842,12 @@ _move_resize_stack(int stack, int delta_pos, int delta_size)
Eina_List *l;
for (l = list; l; l = l->next) {
- E_Border *bd = l->data;
- Border_Extra *extra;
+ E_Client *ec = l->data;
+ Client_Extra *extra;
- extra = eina_hash_find(_G.border_extras, &bd);
+ extra = eina_hash_find(_G.client_extras, &ec);
if (!extra) {
- ERR("No extra for %p", bd);
+ ERR("No extra for %p", ec);
continue;
}
@@ -868,7 +859,7 @@ _move_resize_stack(int stack, int delta_pos, int delta_size)
extra->expected.w += delta_size;
}
- _e_border_move_resize(bd,
+ _e_client_move_resize(ec,
extra->expected.x,
extra->expected.y,
extra->expected.w,
@@ -884,12 +875,12 @@ _set_stack_geometry(int stack, int pos, int size)
{
Eina_List *l;
for (l = _G.tinfo->stacks[stack]; l; l = l->next) {
- E_Border *bd = l->data;
- Border_Extra *extra;
+ E_Client *ec = l->data;
+ Client_Extra *extra;
- extra = eina_hash_find(_G.border_extras, &bd);
+ extra = eina_hash_find(_G.client_extras, &ec);
if (!extra) {
- ERR("No extra for %p", bd);
+ ERR("No extra for %p", ec);
continue;
}
DBG("expected: %dx%d+%d+%d (%p)",
@@ -897,31 +888,31 @@ _set_stack_geometry(int stack, int pos, int size)
extra->expected.h,
extra->expected.x,
extra->expected.y,
- bd);
+ ec);
if (_G.tinfo->conf->use_rows) {
extra->expected.y = pos;
extra->expected.h = size;
- if (bd->maximized) {
- if (l->next && (bd->maximized & E_MAXIMIZE_HORIZONTAL))
- _e_border_unmaximize(bd, E_MAXIMIZE_HORIZONTAL);
- if (_G.tinfo->stacks[1] && (bd->maximized & E_MAXIMIZE_VERTICAL))
- _e_border_unmaximize(bd, E_MAXIMIZE_VERTICAL);
+ if (ec->maximized) {
+ if (l->next && (ec->maximized & E_MAXIMIZE_HORIZONTAL))
+ _e_client_unmaximize(ec, E_MAXIMIZE_HORIZONTAL);
+ if (_G.tinfo->stacks[1] && (ec->maximized & E_MAXIMIZE_VERTICAL))
+ _e_client_unmaximize(ec, E_MAXIMIZE_VERTICAL);
}
} else {
extra->expected.x = pos;
extra->expected.w = size;
- if (bd->maximized) {
- if (l->next && (bd->maximized & E_MAXIMIZE_VERTICAL))
- _e_border_unmaximize(bd, E_MAXIMIZE_VERTICAL);
- if (_G.tinfo->stacks[1] && (bd->maximized & E_MAXIMIZE_HORIZONTAL))
- _e_border_unmaximize(bd, E_MAXIMIZE_HORIZONTAL);
+ if (ec->maximized) {
+ if (l->next && (ec->maximized & E_MAXIMIZE_VERTICAL))
+ _e_client_unmaximize(ec, E_MAXIMIZE_VERTICAL);
+ if (_G.tinfo->stacks[1] && (ec->maximized & E_MAXIMIZE_HORIZONTAL))
+ _e_client_unmaximize(ec, E_MAXIMIZE_HORIZONTAL);
}
}
- _e_border_move_resize(bd,
+ _e_client_move_resize(ec,
extra->expected.x,
extra->expected.y,
extra->expected.w,
@@ -934,7 +925,7 @@ _set_stack_geometry(int stack, int pos, int size)
static void
_add_stack(void)
{
- int nb_borders;
+ int nb_clients;
Eina_List *l;
int i;
@@ -944,17 +935,17 @@ _add_stack(void)
_G.tinfo->conf->nb_stacks++;
if (_G.tinfo->conf->nb_stacks == 1) {
- for (l = e_border_focus_stack_get(); l; l = l->next) {
- E_Border *bd;
+ for (l = e_client_focus_stack_get(); l; l = l->next) {
+ E_Client *ec;
- bd = l->data;
- if (bd->desk == _G.tinfo->desk)
- _add_border(bd);
+ ec = l->data;
+ if (ec->desk == _G.tinfo->desk)
+ _add_client(ec);
}
}
- nb_borders = get_window_count();
+ nb_clients = get_window_count();
if (_G.tinfo->stacks[_G.tinfo->conf->nb_stacks - 2]
- && nb_borders >= _G.tinfo->conf->nb_stacks)
+ && nb_clients >= _G.tinfo->conf->nb_stacks)
{
int nb_stacks = _G.tinfo->conf->nb_stacks - 1;
int pos, s;
@@ -982,13 +973,13 @@ _add_stack(void)
_G.tinfo->stacks[i+1] = _G.tinfo->stacks[i];
_reorganize_stack(i+1);
} else {
- E_Border *bd = eina_list_last(_G.tinfo->stacks[i])->data;
+ E_Client *ec = eina_list_last(_G.tinfo->stacks[i])->data;
- EINA_LIST_REMOVE(_G.tinfo->stacks[i], bd);
+ EINA_LIST_REMOVE(_G.tinfo->stacks[i], ec);
_reorganize_stack(i);
_G.tinfo->stacks[i+1] = NULL;
- EINA_LIST_APPEND(_G.tinfo->stacks[i+1], bd);
+ EINA_LIST_APPEND(_G.tinfo->stacks[i+1], ec);
_reorganize_stack(i+1);
return;
}
@@ -1010,9 +1001,9 @@ _remove_stack(void)
if (!_G.tinfo->conf->nb_stacks) {
for (i = 0; i < TILING_MAX_STACKS; i++) {
for (l = _G.tinfo->stacks[i]; l; l = l->next) {
- E_Border *bd = l->data;
+ E_Client *ec = l->data;
- _restore_border(bd);
+ _restore_client(ec);
}
eina_list_free(_G.tinfo->stacks[i]);
_G.tinfo->stacks[i] = NULL;
@@ -1055,13 +1046,13 @@ _toggle_rows_cols(void)
int i;
#if 0
Eina_List *wins = NULL;
- E_Border *bd;
+ E_Client *ec;
_G.tinfo->conf->use_rows = !_G.tinfo->conf->use_rows;
for (i = 0; i < TILING_MAX_STACKS; i++) {
- EINA_LIST_FREE(_G.tinfo->stacks[i], bd) {
- EINA_LIST_APPEND(wins, bd);
- _restore_border(bd);
+ EINA_LIST_FREE(_G.tinfo->stacks[i], ec) {
+ EINA_LIST_APPEND(wins, ec);
+ _restore_client(ec);
}
_G.tinfo->stacks[i] = NULL;
_G.tinfo->pos[i] = 0;
@@ -1071,8 +1062,8 @@ _toggle_rows_cols(void)
DBG("reinsert (use_rows: %s)",
_G.tinfo->conf->use_rows ? "true":"false");
- EINA_LIST_FREE(wins, bd) {
- _add_border(bd);
+ EINA_LIST_FREE(wins, ec) {
+ _add_client(ec);
}
#else
int nb_stacks = get_stack_count();
@@ -1108,7 +1099,7 @@ void
change_desk_conf(struct _Config_vdesk *newconf)
{
E_Manager *m;
- E_Container *c;
+ E_Comp *c;
E_Zone *z;
E_Desk *d;
int old_nb_stacks = 0,
@@ -1118,9 +1109,8 @@ change_desk_conf(struct _Config_vdesk *newconf)
m = e_manager_current_get();
if (!m) return;
- c = e_container_current_get(m);
- if (!c) return;
- z = e_container_zone_number_get(c, newconf->zone_num);
+ c = m->comp;
+ z = e_comp_zone_number_get(c, newconf->zone_num);
if (!z) return;
d = e_desk_at_xy_get(z, newconf->x, newconf->y);
if (!d) return;
@@ -1146,9 +1136,9 @@ change_desk_conf(struct _Config_vdesk *newconf)
if (new_nb_stacks == 0) {
for (i = 0; i < TILING_MAX_STACKS; i++) {
for (l = _G.tinfo->stacks[i]; l; l = l->next) {
- E_Border *bd = l->data;
+ E_Client *ec = l->data;
- _restore_border(bd);
+ _restore_client(ec);
}
eina_list_free(_G.tinfo->stacks[i]);
_G.tinfo->stacks[i] = NULL;
@@ -1222,22 +1212,22 @@ _e_mod_action_tg_stack_cb(E_Object *obj __UNUSED__,
/* Reorganize windows {{{*/
static void
-_add_border(E_Border *bd)
+_add_client(E_Client *ec)
{
- Border_Extra *extra;
+ Client_Extra *extra;
int stack;
int i;
- if (!bd) {
+ if (!ec) {
return;
}
- if (is_floating_window(bd)) {
+ if (is_floating_window(ec)) {
return;
}
- if (!is_tilable(bd)) {
+ if (!is_tilable(ec)) {
return;
}
- if (bd->fullscreen) {
+ if (ec->fullscreen) {
return;
}
@@ -1245,12 +1235,12 @@ _add_border(E_Border *bd)
return;
}
- extra = _get_or_create_border_extra(bd);
+ extra = _get_or_create_client_extra(ec);
/* Stack tiled window below so that winlist doesn't mix up stacking */
- e_border_layer_set(bd, E_LAYER_BELOW);
+ evas_object_layer_set(ec->frame, E_LAYER_CLIENT_BELOW);
- DBG("adding %p", bd);
+ DBG("adding %p", ec);
if (_G.tinfo->stacks[0]) {
DBG("got stack 0");
@@ -1259,13 +1249,13 @@ _add_border(E_Border *bd)
stack = _G.tinfo->conf->nb_stacks - 1;
if (!_G.tinfo->stacks[stack]->next) {
- _e_border_unmaximize(_G.tinfo->stacks[stack]->data,
+ _e_client_unmaximize(_G.tinfo->stacks[stack]->data,
E_MAXIMIZE_BOTH);
}
- EINA_LIST_APPEND(_G.tinfo->stacks[stack], bd);
+ EINA_LIST_APPEND(_G.tinfo->stacks[stack], ec);
_reorganize_stack(stack);
- if (bd->maximized)
- _e_border_unmaximize(bd, E_MAXIMIZE_BOTH);
+ if (ec->maximized)
+ _e_client_unmaximize(ec, E_MAXIMIZE_BOTH);
} else {
/* Add stack */
int nb_stacks = get_stack_count();
@@ -1275,7 +1265,7 @@ _add_border(E_Border *bd)
DBG("add stack");
assert((0 <= nb_stacks) && (nb_stacks < TILING_MAX_STACKS));
- e_zone_useful_geometry_get(bd->zone, &x, &y, &w, &h);
+ e_zone_useful_geometry_get(ec->zone, &x, &y, &w, &h);
if (_G.tinfo->conf->use_rows) {
pos = y;
@@ -1285,7 +1275,7 @@ _add_border(E_Border *bd)
s = w;
}
- EINA_LIST_APPEND(_G.tinfo->stacks[nb_stacks], bd);
+ EINA_LIST_APPEND(_G.tinfo->stacks[nb_stacks], ec);
for (i = 0; i < nb_stacks; i++) {
@@ -1304,17 +1294,17 @@ _add_border(E_Border *bd)
extra->expected.y = pos;
extra->expected.w = w;
extra->expected.h = size;
- _e_border_maximize(bd, E_MAXIMIZE_EXPAND |
+ _e_client_maximize(ec, E_MAXIMIZE_EXPAND |
E_MAXIMIZE_HORIZONTAL);
} else {
extra->expected.x = pos;
extra->expected.y = y;
extra->expected.w = size;
extra->expected.h = h;
- _e_border_maximize(bd, E_MAXIMIZE_EXPAND |
+ _e_client_maximize(ec, E_MAXIMIZE_EXPAND |
E_MAXIMIZE_VERTICAL);
}
- _e_border_move_resize(bd,
+ _e_client_move_resize(ec,
extra->expected.x,
extra->expected.y,
extra->expected.w,
@@ -1324,27 +1314,27 @@ _add_border(E_Border *bd)
}
} else {
DBG("lonely window");
- e_zone_useful_geometry_get(bd->zone,
+ e_zone_useful_geometry_get(ec->zone,
&extra->expected.x,
&extra->expected.y,
&extra->expected.w,
&extra->expected.h);
- if (bd->maximized & E_MAXIMIZE_BOTH)
- _e_border_unmaximize(bd, E_MAXIMIZE_BOTH);
- _e_border_move_resize(bd,
+ if (ec->maximized & E_MAXIMIZE_BOTH)
+ _e_client_unmaximize(ec, E_MAXIMIZE_BOTH);
+ _e_client_move_resize(ec,
extra->expected.x,
extra->expected.y,
extra->expected.w,
extra->expected.h);
- _e_border_maximize(bd, E_MAXIMIZE_EXPAND | E_MAXIMIZE_BOTH);
- EINA_LIST_APPEND(_G.tinfo->stacks[0], bd);
+ _e_client_maximize(ec, E_MAXIMIZE_EXPAND | E_MAXIMIZE_BOTH);
+ EINA_LIST_APPEND(_G.tinfo->stacks[0], ec);
if (_G.tinfo->conf->use_rows) {
- e_zone_useful_geometry_get(bd->zone,
+ e_zone_useful_geometry_get(ec->zone,
NULL, &_G.tinfo->pos[0],
NULL, &_G.tinfo->size[0]);
} else {
- e_zone_useful_geometry_get(bd->zone,
+ e_zone_useful_geometry_get(ec->zone,
&_G.tinfo->pos[0], NULL,
&_G.tinfo->size[0], NULL);
}
@@ -1355,11 +1345,11 @@ _add_border(E_Border *bd)
extra->expected.h,
extra->expected.x,
extra->expected.y,
- bd);
+ ec);
}
static void
-_remove_border(E_Border *bd)
+_remove_client(E_Client *ec)
{
int stack;
int nb_stacks;
@@ -1367,21 +1357,21 @@ _remove_border(E_Border *bd)
nb_stacks = get_stack_count();
- stack = get_stack(bd);
+ stack = get_stack(ec);
if (stack < 0)
return;
- DBG("removing %p (%d%c)", bd, stack, _G.tinfo->conf->use_rows? 'r':'c');
+ DBG("removing %p (%d%c)", ec, stack, _G.tinfo->conf->use_rows? 'r':'c');
- EINA_LIST_REMOVE(_G.tinfo->stacks[stack], bd);
- eina_hash_del(_G.border_extras, bd, NULL);
+ EINA_LIST_REMOVE(_G.tinfo->stacks[stack], ec);
+ eina_hash_del(_G.client_extras, ec, NULL);
if (_G.tinfo->stacks[stack]) {
_reorganize_stack(stack);
} else {
- int nb_borders = get_window_count();
+ int nb_clients = get_window_count();
- if (nb_stacks > nb_borders) {
+ if (nb_stacks > nb_clients) {
int pos, s;
/* Remove stack */
@@ -1394,10 +1384,10 @@ _remove_border(E_Border *bd)
}
_G.tinfo->stacks[nb_stacks] = NULL;
if (_G.tinfo->conf->use_rows) {
- e_zone_useful_geometry_get(bd->zone,
+ e_zone_useful_geometry_get(ec->zone,
NULL, &pos, NULL, &s);
} else {
- e_zone_useful_geometry_get(bd->zone,
+ e_zone_useful_geometry_get(ec->zone,
&pos, NULL, &s, NULL);
}
for (i = 0; i < nb_stacks; i++) {
@@ -1417,12 +1407,12 @@ _remove_border(E_Border *bd)
_G.tinfo->stacks[j] = _G.tinfo->stacks[j+1];
_reorganize_stack(j);
}
- bd = _G.tinfo->stacks[i]->data;
- EINA_LIST_REMOVE(_G.tinfo->stacks[i], bd);
+ ec = _G.tinfo->stacks[i]->data;
+ EINA_LIST_REMOVE(_G.tinfo->stacks[i], ec);
_reorganize_stack(i);
_G.tinfo->stacks[i-1] = NULL;
- EINA_LIST_APPEND(_G.tinfo->stacks[i-1], bd);
+ EINA_LIST_APPEND(_G.tinfo->stacks[i-1], ec);
_reorganize_stack(i-1);
return;
}
@@ -1432,12 +1422,12 @@ _remove_border(E_Border *bd)
_G.tinfo->stacks[i+1] = _G.tinfo->stacks[i];
_reorganize_stack(i+1);
} else {
- bd = eina_list_last(_G.tinfo->stacks[i])->data;
- EINA_LIST_REMOVE(_G.tinfo->stacks[i], bd);
+ ec = eina_list_last(_G.tinfo->stacks[i])->data;
+ EINA_LIST_REMOVE(_G.tinfo->stacks[i], ec);
_reorganize_stack(i);
_G.tinfo->stacks[i+1] = NULL;
- EINA_LIST_APPEND(_G.tinfo->stacks[i+1], bd);
+ EINA_LIST_APPEND(_G.tinfo->stacks[i+1], ec);
_reorganize_stack(i+1);
return;
}
@@ -1447,56 +1437,56 @@ _remove_border(E_Border *bd)
}
static void
-_move_resize_border_stack(E_Border *bd, Border_Extra *extra,
+_move_resize_client_stack(E_Client *ec, Client_Extra *extra,
int stack, tiling_change_t change)
{
-#define _MOVE_RESIZE_BORDER_STACK(_pos, _size) \
+#define _MOVE_RESIZE_CLIENT_STACK(_pos, _size) \
if (change == TILING_RESIZE) { \
if (stack == TILING_MAX_STACKS || !_G.tinfo->stacks[stack + 1]) { \
/* You're not allowed to resize */ \
- bd->_size = extra->expected._size; \
+ ec->_size = extra->expected._size; \
} else { \
- int delta = bd->_size - extra->expected._size; \
+ int delta = ec->_size - extra->expected._size; \
\
if (delta + 1 > _G.tinfo->size[stack + 1]) \
delta = _G.tinfo->size[stack + 1] - 1; \
\
_move_resize_stack(stack, 0, delta); \
_move_resize_stack(stack + 1, delta, -delta); \
- extra->expected._size = bd->_size; \
+ extra->expected._size = ec->_size; \
} \
} else { \
if (stack == 0) { \
/* You're not allowed to move */ \
- bd->_pos = extra->expected._pos; \
+ ec->_pos = extra->expected._pos; \
} else { \
- int delta = bd->_pos - extra->expected._pos; \
+ int delta = ec->_pos - extra->expected._pos; \
\
if (delta + 1 > _G.tinfo->size[stack - 1]) \
delta = _G.tinfo->size[stack - 1] - 1; \
\
_move_resize_stack(stack, delta, -delta); \
_move_resize_stack(stack - 1, 0, delta); \
- extra->expected._pos = bd->_pos; \
+ extra->expected._pos = ec->_pos; \
} \
}
if (_G.tinfo->conf->use_rows) {
- _MOVE_RESIZE_BORDER_STACK(y, h)
+ _MOVE_RESIZE_CLIENT_STACK(y, h)
} else {
- _MOVE_RESIZE_BORDER_STACK(x, w)
+ _MOVE_RESIZE_CLIENT_STACK(x, w)
}
-#undef _MOVE_RESIZE_BORDER_STACK
+#undef _MOVE_RESIZE_CLIENT_STACK
}
static void
-_move_resize_border_in_stack(E_Border *bd, Border_Extra *extra,
+_move_resize_client_in_stack(E_Client *ec, Client_Extra *extra,
int stack, tiling_change_t change)
{
Eina_List *l;
- l = eina_list_data_find_list(_G.tinfo->stacks[stack], bd);
+ l = eina_list_data_find_list(_G.tinfo->stacks[stack], ec);
if (!l) {
- ERR("unable to bd %p in stack %d", bd, stack);
+ ERR("unable to ec %p in stack %d", ec, stack);
return;
}
@@ -1504,58 +1494,58 @@ _move_resize_border_in_stack(E_Border *bd, Border_Extra *extra,
case TILING_RESIZE:
if (!l->next) {
if (l->prev) {
- E_Border *prevbd = l->prev->data;
- Border_Extra *prevextra;
+ E_Client *prevec = l->prev->data;
+ Client_Extra *prevextra;
- prevextra = eina_hash_find(_G.border_extras, &prevbd);
+ prevextra = eina_hash_find(_G.client_extras, &prevec);
if (!prevextra) {
- ERR("No extra for %p", prevbd);
+ ERR("No extra for %p", prevec);
return;
}
if (_G.tinfo->conf->use_rows) {
int delta;
- delta = bd->w - extra->expected.w;
+ delta = ec->w - extra->expected.w;
prevextra->expected.w -= delta;
extra->expected.x -= delta;
- extra->expected.w = bd->w;
+ extra->expected.w = ec->w;
} else {
int delta;
- delta = bd->h - extra->expected.h;
+ delta = ec->h - extra->expected.h;
prevextra->expected.h -= delta;
extra->expected.y -= delta;
- extra->expected.h = bd->h;
+ extra->expected.h = ec->h;
}
- _e_border_resize(prevbd,
+ _e_client_resize(prevec,
prevextra->expected.w,
prevextra->expected.h);
- _e_border_move(bd,
+ _e_client_move(ec,
extra->expected.x,
extra->expected.y);
} else {
/* You're not allowed to resize */
- _e_border_resize(bd,
+ _e_client_resize(ec,
extra->expected.w,
extra->expected.h);
}
} else {
- E_Border *nextbd = l->next->data;
- Border_Extra *nextextra;
+ E_Client *nextec = l->next->data;
+ Client_Extra *nextextra;
- nextextra = eina_hash_find(_G.border_extras, &nextbd);
+ nextextra = eina_hash_find(_G.client_extras, &nextec);
if (!nextextra) {
- ERR("No extra for %p", nextbd);
+ ERR("No extra for %p", nextec);
return;
}
if (_G.tinfo->conf->use_rows) {
- int min_width = MAX(nextbd->client.icccm.base_w, 1);
+ int min_width = MAX(nextec->icccm.base_w, 1);
int delta;
- delta = bd->w - extra->expected.w;
+ delta = ec->w - extra->expected.w;
if (nextextra->expected.w - delta < min_width)
delta = nextextra->expected.w - min_width;
@@ -1564,10 +1554,10 @@ _move_resize_border_in_stack(E_Border *bd, Border_Extra *extra,
extra->expected.w += delta;
} else {
- int min_height = MAX(nextbd->client.icccm.base_h, 1);
+ int min_height = MAX(nextec->icccm.base_h, 1);
int delta;
- delta = bd->h - extra->expected.h;
+ delta = ec->h - extra->expected.h;
if (nextextra->expected.h - delta < min_height)
delta = nextextra->expected.h - min_height;
@@ -1577,12 +1567,12 @@ _move_resize_border_in_stack(E_Border *bd, Border_Extra *extra,
extra->expected.h += delta;
}
- _e_border_move_resize(nextbd,
+ _e_client_move_resize(nextec,
nextextra->expected.x,
nextextra->expected.y,
nextextra->expected.w,
nextextra->expected.h);
- _e_border_move_resize(bd,
+ _e_client_move_resize(ec,
extra->expected.x,
extra->expected.y,
extra->expected.w,
@@ -1593,27 +1583,27 @@ _move_resize_border_in_stack(E_Border *bd, Border_Extra *extra,
if (!l->prev) {
/* You're not allowed to move */
if (_G.tinfo->conf->use_rows) {
- bd->x = extra->expected.x;
+ ec->x = extra->expected.x;
} else {
- bd->y = extra->expected.y;
+ ec->y = extra->expected.y;
}
- _e_border_move(bd,
+ _e_client_move(ec,
extra->expected.x,
extra->expected.y);
- DBG("trying to move %p, but !l->prev", bd);
+ DBG("trying to move %p, but !l->prev", ec);
} else {
- E_Border *prevbd = l->prev->data;
- Border_Extra *prevextra;
+ E_Client *prevec = l->prev->data;
+ Client_Extra *prevextra;
- prevextra = eina_hash_find(_G.border_extras, &prevbd);
+ prevextra = eina_hash_find(_G.client_extras, &prevec);
if (!prevextra) {
- ERR("No extra for %p", prevbd);
+ ERR("No extra for %p", prevec);
return;
}
if (_G.tinfo->conf->use_rows) {
- int delta = bd->x - extra->expected.x;
- int min_width = MAX(prevbd->client.icccm.base_w, 1);
+ int delta = ec->x - extra->expected.x;
+ int min_width = MAX(prevec->icccm.base_w, 1);
if (prevextra->expected.w - delta < min_width)
delta = prevextra->expected.w - min_width;
@@ -1623,8 +1613,8 @@ _move_resize_border_in_stack(E_Border *bd, Border_Extra *extra,
extra->expected.x += delta;
extra->expected.w -= delta;
} else {
- int delta = bd->y - extra->expected.y;
- int min_height = MAX(prevbd->client.icccm.base_h, 1);
+ int delta = ec->y - extra->expected.y;
+ int min_height = MAX(prevec->icccm.base_h, 1);
if (prevextra->expected.h - delta < min_height)
delta = prevextra->expected.h - min_height;
@@ -1635,10 +1625,10 @@ _move_resize_border_in_stack(E_Border *bd, Border_Extra *extra,
extra->expected.h -= delta;
}
- _e_border_resize(prevbd,
+ _e_client_resize(prevec,
prevextra->expected.w,
prevextra->expected.h);
- _e_border_move_resize(bd,
+ _e_client_move_resize(ec,
extra->expected.x,
extra->expected.y,
extra->expected.w,
@@ -1654,22 +1644,22 @@ _move_resize_border_in_stack(E_Border *bd, Border_Extra *extra,
/* Toggle Floating {{{ */
static void
-toggle_floating(E_Border *bd)
+toggle_floating(E_Client *ec)
{
- if (!bd)
+ if (!ec)
return;
- check_tinfo(bd->desk);
+ check_tinfo(ec->desk);
if (!_G.tinfo->conf || !_G.tinfo->conf->nb_stacks)
return;
- if (EINA_LIST_IS_IN(_G.tinfo->floating_windows, bd)) {
- EINA_LIST_REMOVE(_G.tinfo->floating_windows, bd);
+ if (EINA_LIST_IS_IN(_G.tinfo->floating_windows, ec)) {
+ EINA_LIST_REMOVE(_G.tinfo->floating_windows, ec);
- _add_border(bd);
+ _add_client(ec);
} else {
- _remove_border(bd);
- _restore_border(bd);
- EINA_LIST_APPEND(_G.tinfo->floating_windows, bd);
+ _remove_client(ec);
+ _restore_client(ec);
+ EINA_LIST_APPEND(_G.tinfo->floating_windows, ec);
}
}
@@ -1679,37 +1669,37 @@ _e_mod_action_toggle_floating_cb(E_Object *obj __UNUSED__,
{
end_special_input();
- toggle_floating(e_border_focused_get());
+ toggle_floating(e_client_focused_get());
}
/* }}} */
/* {{{ Swap */
static void
-_action_swap(E_Border *bd_1,
- Border_Extra *extra_2)
+_action_swap(E_Client *ec_1,
+ Client_Extra *extra_2)
{
- Border_Extra *extra_1;
- E_Border *bd_2 = extra_2->border;
+ Client_Extra *extra_1;
+ E_Client *ec_2 = extra_2->client;
Eina_List *l_1 = NULL,
*l_2 = NULL;
geom_t gt;
- unsigned int bd_2_maximized;
+ unsigned int ec_2_maximized;
int i;
- extra_1 = eina_hash_find(_G.border_extras, &bd_1);
+ extra_1 = eina_hash_find(_G.client_extras, &ec_1);
if (!extra_1) {
- ERR("No extra for %p", bd_1);
+ ERR("No extra for %p", ec_1);
return;
}
for (i = 0; i < TILING_MAX_STACKS; i++) {
- if ((l_1 = eina_list_data_find_list(_G.tinfo->stacks[i], bd_1))) {
+ if ((l_1 = eina_list_data_find_list(_G.tinfo->stacks[i], ec_1))) {
break;
}
}
for (i = 0; i < TILING_MAX_STACKS; i++) {
- if ((l_2 = eina_list_data_find_list(_G.tinfo->stacks[i], bd_2))) {
+ if ((l_2 = eina_list_data_find_list(_G.tinfo->stacks[i], ec_2))) {
break;
}
}
@@ -1718,29 +1708,29 @@ _action_swap(E_Border *bd_1,
return;
}
- l_1->data = bd_2;
- l_2->data = bd_1;
+ l_1->data = ec_2;
+ l_2->data = ec_1;
gt = extra_2->expected;
extra_2->expected = extra_1->expected;
extra_1->expected = gt;
- bd_2_maximized = bd_2->maximized;
- if (bd_2->maximized)
- _e_border_unmaximize(bd_2, E_MAXIMIZE_BOTH);
- if (bd_1->maximized) {
- _e_border_unmaximize(bd_1, E_MAXIMIZE_BOTH);
- _e_border_maximize(bd_2, bd_1->maximized);
+ ec_2_maximized = ec_2->maximized;
+ if (ec_2->maximized)
+ _e_client_unmaximize(ec_2, E_MAXIMIZE_BOTH);
+ if (ec_1->maximized) {
+ _e_client_unmaximize(ec_1, E_MAXIMIZE_BOTH);
+ _e_client_maximize(ec_2, ec_1->maximized);
}
- if (bd_2_maximized) {
- _e_border_maximize(bd_1, bd_2_maximized);
+ if (ec_2_maximized) {
+ _e_client_maximize(ec_1, ec_2_maximized);
}
- _e_border_move_resize(bd_1,
+ _e_client_move_resize(ec_1,
extra_1->expected.x,
extra_1->expected.y,
extra_1->expected.w,
extra_1->expected.h);
- _e_border_move_resize(bd_2,
+ _e_client_move_resize(ec_2,
extra_2->expected.x,
extra_2->expected.y,
extra_2->expected.w,
@@ -1752,14 +1742,14 @@ _e_mod_action_swap_cb(E_Object *obj __UNUSED__,
const char *params __UNUSED__)
{
E_Desk *desk;
- E_Border *focused_bd;
+ E_Client *focused_ec;
desk = get_current_desk();
if (!desk)
return;
- focused_bd = e_border_focused_get();
- if (!focused_bd || focused_bd->desk != desk)
+ focused_ec = e_client_focused_get();
+ if (!focused_ec || focused_ec->desk != desk)
return;
check_tinfo(desk);
@@ -1767,32 +1757,32 @@ _e_mod_action_swap_cb(E_Object *obj __UNUSED__,
return;
}
- _do_overlay(focused_bd, _action_swap, INPUT_MODE_SWAPPING);
+ _do_overlay(focused_ec, _action_swap, INPUT_MODE_SWAPPING);
}
/* }}} */
/* Move {{{*/
static void
-_check_moving_anims(const E_Border *bd, const Border_Extra *extra, int stack)
+_check_moving_anims(const E_Client *ec, const Client_Extra *extra, int stack)
{
Eina_List *l = NULL;
overlay_t *overlay;
int nb_stacks = get_stack_count();
if (stack < 0) {
- stack = get_stack(bd);
+ stack = get_stack(ec);
if (stack < 0)
return;
}
if (!extra) {
- extra = eina_hash_find(_G.border_extras, &bd);
+ extra = eina_hash_find(_G.client_extras, &ec);
if (!extra) {
- ERR("No extra for %p", bd);
+ ERR("No extra for %p", ec);
return;
}
}
- l = eina_list_data_find_list(_G.tinfo->stacks[stack], bd);
+ l = eina_list_data_find_list(_G.tinfo->stacks[stack], ec);
if (!l)
return;
@@ -1800,49 +1790,40 @@ _check_moving_anims(const E_Border *bd, const Border_Extra *extra, int stack)
overlay = &_G.move_overlays[MOVE_LEFT];
if ((_G.tinfo->conf->use_rows && l->prev)
|| (!_G.tinfo->conf->use_rows && !_G.tinfo->stacks[TILING_MAX_STACKS -1]
- && (bd != _G.tinfo->stacks[0]->data || _G.tinfo->stacks[0]->next)))
+ && (ec != _G.tinfo->stacks[0]->data || _G.tinfo->stacks[0]->next)))
{
if (overlay->popup) {
Evas_Coord ew, eh;
edje_object_size_min_calc(overlay->obj, &ew, &eh);
- e_popup_move(_G.move_overlays[MOVE_LEFT].popup,
+ evas_object_move(_G.move_overlays[MOVE_LEFT].popup,
extra->expected.x - ew/2,
extra->expected.y + extra->expected.h/2 - eh/2);
} else {
Evas_Coord ew, eh;
- overlay->popup = e_popup_new(bd->zone, 0, 0, 1, 1);
- if (!overlay->popup)
- return;
-
- e_popup_layer_set(overlay->popup, E_COMP_CANVAS_LAYER_LAYOUT, E_LAYER_NORMAL);
- overlay->obj = edje_object_add(overlay->popup->evas);
+ overlay->obj = edje_object_add(ec->comp->evas);
_theme_edje_object_set(overlay->obj,
"modules/tiling/move/left");
edje_object_size_min_calc(overlay->obj, &ew, &eh);
- e_popup_content_set(overlay->popup,
- overlay->obj);
+ overlay->popup = e_comp_object_util_add(overlay->obj, E_COMP_OBJECT_TYPE_POPUP);
+ evas_object_layer_set(overlay->popup, E_LAYER_CLIENT_NORMAL);
evas_object_show(overlay->obj);
- e_popup_move_resize(overlay->popup,
+ evas_object_geometry_set(overlay->popup,
extra->expected.x - ew/2
- - overlay->popup->zone->x,
+ - ec->zone->x,
extra->expected.y + extra->expected.h/2
- eh/2
- - overlay->popup->zone->y,
+ - ec->zone->y,
ew,
eh);
- evas_object_resize(overlay->obj, ew, eh);
- e_popup_show(overlay->popup);
+ evas_object_show(overlay->popup);
}
} else if (overlay->popup) {
- if (overlay->obj) {
- evas_object_del(overlay->obj);
- overlay->obj = NULL;
- }
if (overlay->popup) {
- e_object_del(E_OBJECT(overlay->popup));
+ evas_object_hide(overlay->popup);
+ evas_object_del(overlay->popup);
overlay->popup = NULL;
}
}
@@ -1858,43 +1839,32 @@ _check_moving_anims(const E_Border *bd, const Border_Extra *extra, int stack)
Evas_Coord ew, eh;
edje_object_size_min_calc(overlay->obj, &ew, &eh);
- e_popup_move(_G.move_overlays[MOVE_RIGHT].popup,
+ evas_object_move(_G.move_overlays[MOVE_RIGHT].popup,
extra->expected.x + extra->expected.w - ew/2,
extra->expected.y + extra->expected.h/2 - eh/2);
} else {
Evas_Coord ew, eh;
- overlay->popup = e_popup_new(bd->zone, 0, 0, 1, 1);
- if (!overlay->popup)
- return;
-
- e_popup_layer_set(overlay->popup, E_COMP_CANVAS_LAYER_LAYOUT, E_LAYER_NORMAL);
- overlay->obj = edje_object_add(overlay->popup->evas);
+ overlay->obj = edje_object_add(ec->comp->evas);
+ overlay->popup = e_comp_object_util_add(overlay->obj, E_COMP_OBJECT_TYPE_POPUP);
+ evas_object_layer_set(overlay->popup, E_LAYER_CLIENT_NORMAL);
_theme_edje_object_set(overlay->obj,
"modules/tiling/move/right");
edje_object_size_min_calc(overlay->obj, &ew, &eh);
- e_popup_content_set(overlay->popup,
- overlay->obj);
- evas_object_show(overlay->obj);
- e_popup_move_resize(overlay->popup,
+ evas_object_geometry_set(overlay->popup,
extra->expected.x + extra->expected.w - ew/2
- - overlay->popup->zone->x,
+ - ec->zone->x,
extra->expected.y + extra->expected.h/2
- eh/2
- - overlay->popup->zone->y,
+ - ec->zone->y,
ew,
eh);
- evas_object_resize(overlay->obj, ew, eh);
-
- e_popup_show(overlay->popup);
+ evas_object_show(overlay->popup);
}
} else if (overlay->popup) {
- if (overlay->obj) {
- evas_object_del(overlay->obj);
- overlay->obj = NULL;
- }
if (overlay->popup) {
- e_object_del(E_OBJECT(overlay->popup));
+ evas_object_hide(overlay->popup);
+ evas_object_del(overlay->popup);
overlay->popup = NULL;
}
}
@@ -1903,48 +1873,38 @@ _check_moving_anims(const E_Border *bd, const Border_Extra *extra, int stack)
overlay = &_G.move_overlays[MOVE_UP];
if ((!_G.tinfo->conf->use_rows && l->prev)
|| (_G.tinfo->conf->use_rows && !_G.tinfo->stacks[TILING_MAX_STACKS -1]
- && (bd != _G.tinfo->stacks[0]->data || _G.tinfo->stacks[0]->next)))
+ && (ec != _G.tinfo->stacks[0]->data || _G.tinfo->stacks[0]->next)))
{
if (overlay->popup) {
Evas_Coord ew, eh;
edje_object_size_min_calc(overlay->obj, &ew, &eh);
- e_popup_move(_G.move_overlays[MOVE_UP].popup,
+ evas_object_move(_G.move_overlays[MOVE_UP].popup,
extra->expected.x + extra->expected.w/2 - ew/2,
extra->expected.y - eh/2);
} else {
Evas_Coord ew, eh;
- overlay->popup = e_popup_new(bd->zone, 0, 0, 1, 1);
- if (!overlay->popup)
- return;
-
- e_popup_layer_set(overlay->popup, E_COMP_CANVAS_LAYER_LAYOUT, E_LAYER_NORMAL);
- overlay->obj = edje_object_add(overlay->popup->evas);
+ overlay->obj = edje_object_add(ec->comp->evas);
+ overlay->popup = e_comp_object_util_add(overlay->obj, E_COMP_OBJECT_TYPE_POPUP);
+ evas_object_layer_set(overlay->popup, E_LAYER_CLIENT_NORMAL);
_theme_edje_object_set(overlay->obj, "modules/tiling/move/up");
edje_object_size_min_calc(overlay->obj, &ew, &eh);
- e_popup_content_set(overlay->popup,
- overlay->obj);
- evas_object_show(overlay->obj);
- e_popup_move_resize(overlay->popup,
+ evas_object_geometry_set(overlay->popup,
extra->expected.x + extra->expected.w/2
- ew/2
- - overlay->popup->zone->x,
+ - ec->zone->x,
extra->expected.y - eh/2
- - overlay->popup->zone->y,
+ - ec->zone->y,
ew,
eh);
- evas_object_resize(overlay->obj, ew, eh);
- e_popup_show(overlay->popup);
+ evas_object_show(overlay->popup);
}
} else if (overlay->popup) {
- if (overlay->obj) {
- evas_object_del(overlay->obj);
- overlay->obj = NULL;
- }
if (overlay->popup) {
- e_object_del(E_OBJECT(overlay->popup));
+ evas_object_hide(overlay->popup);
+ evas_object_del(overlay->popup);
overlay->popup = NULL;
}
}
@@ -1960,82 +1920,71 @@ _check_moving_anims(const E_Border *bd, const Border_Extra *extra, int stack)
Evas_Coord ew, eh;
edje_object_size_min_calc(overlay->obj, &ew, &eh);
- e_popup_move(_G.move_overlays[MOVE_DOWN].popup,
+ evas_object_move(_G.move_overlays[MOVE_DOWN].popup,
extra->expected.x + extra->expected.w/2 - ew/2,
extra->expected.y + extra->expected.h - eh/2);
} else {
Evas_Coord ew, eh;
- overlay->popup = e_popup_new(bd->zone, 0, 0, 1, 1);
- if (!overlay->popup)
- return;
-
- e_popup_layer_set(overlay->popup, E_COMP_CANVAS_LAYER_LAYOUT, E_LAYER_NORMAL);
- overlay->obj = edje_object_add(overlay->popup->evas);
+ overlay->obj = edje_object_add(ec->comp->evas);
+ overlay->popup = e_comp_object_util_add(overlay->obj, E_COMP_OBJECT_TYPE_POPUP);
+ evas_object_layer_set(overlay->popup, E_LAYER_CLIENT_NORMAL);
_theme_edje_object_set(overlay->obj,
"modules/tiling/move/down");
edje_object_size_min_calc(overlay->obj, &ew, &eh);
- e_popup_content_set(overlay->popup,
- overlay->obj);
- evas_object_show(overlay->obj);
- e_popup_move_resize(overlay->popup,
+ evas_object_geometry_set(overlay->popup,
extra->expected.x + extra->expected.w/2
- ew/2
- - overlay->popup->zone->x,
+ - ec->zone->x,
extra->expected.y + extra->expected.h - eh/2
- - overlay->popup->zone->y,
+ - ec->zone->y,
ew,
eh);
- evas_object_resize(overlay->obj, ew, eh);
-
- e_popup_show(overlay->popup);
+ evas_object_show(overlay->popup);
}
} else if (overlay->popup) {
- if (overlay->obj) {
- evas_object_del(overlay->obj);
- overlay->obj = NULL;
- }
if (overlay->popup) {
- e_object_del(E_OBJECT(overlay->popup));
+ evas_object_hide(overlay->popup);
+ evas_object_del(overlay->popup);
overlay->popup = NULL;
}
}
}
static void
-_move_right_rows_or_down_cols(E_Border *bd, Eina_Bool check_moving_anims)
+_move_right_rows_or_down_cols(E_Client *ec, Eina_Bool check_moving_anims)
{
- E_Border *bd_1 = bd,
- *bd_2 = NULL;
- Border_Extra *extra_1 = NULL,
+ E_Client *ec_1 = ec,
+ *ec_2 = NULL;
+ Client_Extra *extra_1 = NULL,
*extra_2 = NULL;
Eina_List *l_1 = NULL,
*l_2 = NULL;
int stack;
- stack = get_stack(bd);
+ stack = get_stack(ec);
if (stack < 0)
return;
- l_1 = eina_list_data_find_list(_G.tinfo->stacks[stack], bd_1);
+ l_1 = eina_list_data_find_list(_G.tinfo->stacks[stack], ec_1);
if (!l_1 || !l_1->next)
return;
l_2 = l_1->next;
- bd_2 = l_2->data;
+ ec_2 = l_2->data;
- extra_1 = eina_hash_find(_G.border_extras, &bd_1);
+ extra_1 = eina_hash_find(_G.client_extras, &ec_1);
if (!extra_1) {
- ERR("No extra for %p", bd_1);
+ ERR("No extra for %p", ec_1);
return;
}
- extra_2 = eina_hash_find(_G.border_extras, &bd_2);
+ extra_2 = eina_hash_find(_G.client_extras, &ec_2);
if (!extra_2) {
- ERR("No extra for %p", bd_2);
+ ERR("No extra for %p", ec_2);
return;
}
- l_1->data = bd_2;
- l_2->data = bd_1;
+ l_1->data = ec_2;
+ l_2->data = ec_1;
if (_G.tinfo->conf->use_rows) {
extra_2->expected.x = extra_1->expected.x;
@@ -2045,57 +1994,57 @@ _move_right_rows_or_down_cols(E_Border *bd, Eina_Bool check_moving_anims)
extra_1->expected.y += extra_2->expected.h;
}
- _e_border_move(bd_1,
+ _e_client_move(ec_1,
extra_1->expected.x,
extra_1->expected.y);
- _e_border_move(bd_2,
+ _e_client_move(ec_2,
extra_2->expected.x,
extra_2->expected.y);
if (check_moving_anims)
- _check_moving_anims(bd_1, extra_1, stack);
+ _check_moving_anims(ec_1, extra_1, stack);
- ecore_x_pointer_warp(_G.tinfo->desk->zone->container->win,
+ ecore_x_pointer_warp(_G.tinfo->desk->zone->comp->win,
extra_1->expected.x + extra_1->expected.w/2,
extra_1->expected.y + extra_1->expected.h/2);
}
static void
-_move_left_rows_or_up_cols(E_Border *bd, Eina_Bool check_moving_anims)
+_move_left_rows_or_up_cols(E_Client *ec, Eina_Bool check_moving_anims)
{
- E_Border *bd_1 = bd,
- *bd_2 = NULL;
- Border_Extra *extra_1 = NULL,
+ E_Client *ec_1 = ec,
+ *ec_2 = NULL;
+ Client_Extra *extra_1 = NULL,
*extra_2 = NULL;
Eina_List *l_1 = NULL,
*l_2 = NULL;
int stack;
- stack = get_stack(bd);
+ stack = get_stack(ec);
assert(stack >= 0);
- if (_G.tinfo->stacks[stack]->data == bd)
+ if (_G.tinfo->stacks[stack]->data == ec)
return;
- l_1 = eina_list_data_find_list(_G.tinfo->stacks[stack], bd_1);
+ l_1 = eina_list_data_find_list(_G.tinfo->stacks[stack], ec_1);
if (!l_1 || !l_1->prev)
return;
l_2 = l_1->prev;
- bd_2 = l_2->data;
+ ec_2 = l_2->data;
- extra_1 = eina_hash_find(_G.border_extras, &bd_1);
+ extra_1 = eina_hash_find(_G.client_extras, &ec_1);
if (!extra_1) {
- ERR("No extra for %p", bd_1);
+ ERR("No extra for %p", ec_1);
return;
}
- extra_2 = eina_hash_find(_G.border_extras, &bd_2);
+ extra_2 = eina_hash_find(_G.client_extras, &ec_2);
if (!extra_2) {
- ERR("No extra for %p", bd_2);
+ ERR("No extra for %p", ec_2);
return;
}
- l_1->data = bd_2;
- l_2->data = bd_1;
+ l_1->data = ec_2;
+ l_2->data = ec_1;
if (_G.tinfo->conf->use_rows) {
extra_1->expected.x = extra_2->expected.x;
@@ -2105,37 +2054,37 @@ _move_left_rows_or_up_cols(E_Border *bd, Eina_Bool check_moving_anims)
extra_2->expected.y += extra_1->expected.h;
}
- _e_border_move(bd_1,
+ _e_client_move(ec_1,
extra_1->expected.x,
extra_1->expected.y);
- _e_border_move(bd_2,
+ _e_client_move(ec_2,
extra_2->expected.x,
extra_2->expected.y);
if (check_moving_anims)
- _check_moving_anims(bd_1, extra_1, stack);
+ _check_moving_anims(ec_1, extra_1, stack);
- ecore_x_pointer_warp(_G.tinfo->desk->zone->container->win,
+ ecore_x_pointer_warp(_G.tinfo->desk->zone->comp->win,
extra_1->expected.x + extra_1->expected.w/2,
extra_1->expected.y + extra_1->expected.h/2);
}
static void
-_move_up_rows_or_left_cols(E_Border *bd, Eina_Bool check_moving_anims)
+_move_up_rows_or_left_cols(E_Client *ec, Eina_Bool check_moving_anims)
{
- Border_Extra *extra;
+ Client_Extra *extra;
int stack;
int i;
int nb_stacks;
- stack = get_stack(bd);
+ stack = get_stack(ec);
assert(stack >= 0);
nb_stacks = get_stack_count();
- extra = eina_hash_find(_G.border_extras, &bd);
+ extra = eina_hash_find(_G.client_extras, &ec);
if (!extra) {
- ERR("No extra for %p", bd);
+ ERR("No extra for %p", ec);
return;
}
@@ -2145,17 +2094,17 @@ _move_up_rows_or_left_cols(E_Border *bd, Eina_Bool check_moving_anims)
if (nb_stacks >= TILING_MAX_STACKS)
return;
- if (_G.tinfo->stacks[0]->data == bd && !_G.tinfo->stacks[0]->next)
+ if (_G.tinfo->stacks[0]->data == ec && !_G.tinfo->stacks[0]->next)
return;
- EINA_LIST_REMOVE(_G.tinfo->stacks[0], bd);
+ EINA_LIST_REMOVE(_G.tinfo->stacks[0], ec);
for (i = TILING_MAX_STACKS - 1; i > 0; i--) {
_G.tinfo->stacks[i] = _G.tinfo->stacks[i-1];
}
_G.tinfo->stacks[0] = NULL;
- EINA_LIST_APPEND(_G.tinfo->stacks[0], bd);
+ EINA_LIST_APPEND(_G.tinfo->stacks[0], ec);
- e_zone_useful_geometry_get(bd->zone, &x, &y, &w, &h);
+ e_zone_useful_geometry_get(ec->zone, &x, &y, &w, &h);
extra->expected.x = x;
extra->expected.y = y;
@@ -2188,37 +2137,37 @@ _move_up_rows_or_left_cols(E_Border *bd, Eina_Bool check_moving_anims)
}
_reorganize_stack(1);
- _e_border_move_resize(bd,
+ _e_client_move_resize(ec,
extra->expected.x,
extra->expected.y,
extra->expected.w,
extra->expected.h);
- _e_border_maximize(bd, E_MAXIMIZE_EXPAND | E_MAXIMIZE_VERTICAL);
+ _e_client_maximize(ec, E_MAXIMIZE_EXPAND | E_MAXIMIZE_VERTICAL);
if (nb_stacks + 1 > _G.tinfo->conf->nb_stacks) {
_G.tinfo->conf->nb_stacks = nb_stacks + 1;
e_config_save_queue();
}
if (check_moving_anims)
- _check_moving_anims(bd, extra, 0);
- ecore_x_pointer_warp(_G.tinfo->desk->zone->container->win,
+ _check_moving_anims(ec, extra, 0);
+ ecore_x_pointer_warp(_G.tinfo->desk->zone->comp->win,
extra->expected.x + extra->expected.w/2,
extra->expected.y + extra->expected.h/2);
return;
}
- EINA_LIST_REMOVE(_G.tinfo->stacks[stack], bd);
- EINA_LIST_APPEND(_G.tinfo->stacks[stack - 1], bd);
+ EINA_LIST_REMOVE(_G.tinfo->stacks[stack], ec);
+ EINA_LIST_APPEND(_G.tinfo->stacks[stack - 1], ec);
if (!_G.tinfo->stacks[stack]) {
int pos, s;
/* Remove stack */
if (_G.tinfo->conf->use_rows) {
- e_zone_useful_geometry_get(bd->zone,
+ e_zone_useful_geometry_get(ec->zone,
NULL, &pos, NULL, &s);
} else {
- e_zone_useful_geometry_get(bd->zone,
+ e_zone_useful_geometry_get(ec->zone,
&pos, NULL, &s, NULL);
}
@@ -2246,22 +2195,22 @@ _move_up_rows_or_left_cols(E_Border *bd, Eina_Bool check_moving_anims)
}
if (check_moving_anims)
- _check_moving_anims(bd, extra, stack - 1);
+ _check_moving_anims(ec, extra, stack - 1);
- ecore_x_pointer_warp(_G.tinfo->desk->zone->container->win,
+ ecore_x_pointer_warp(_G.tinfo->desk->zone->comp->win,
extra->expected.x + extra->expected.w/2,
extra->expected.y + extra->expected.h/2);
}
static void
-_move_down_rows_or_right_cols(E_Border *bd, Eina_Bool check_moving_anims)
+_move_down_rows_or_right_cols(E_Client *ec, Eina_Bool check_moving_anims)
{
int stack;
int nb_stacks;
- Border_Extra *extra;
+ Client_Extra *extra;
int i;
- stack = get_stack(bd);
+ stack = get_stack(ec);
assert(stack >= 0);
if (stack == TILING_MAX_STACKS - 1)
return;
@@ -2271,20 +2220,20 @@ _move_down_rows_or_right_cols(E_Border *bd, Eina_Bool check_moving_anims)
if (stack == nb_stacks - 1 && !_G.tinfo->stacks[stack]->next)
return;
- extra = eina_hash_find(_G.border_extras, &bd);
+ extra = eina_hash_find(_G.client_extras, &ec);
if (!extra) {
- ERR("No extra for %p", bd);
+ ERR("No extra for %p", ec);
return;
}
- EINA_LIST_REMOVE(_G.tinfo->stacks[stack], bd);
- EINA_LIST_APPEND(_G.tinfo->stacks[stack + 1], bd);
+ EINA_LIST_REMOVE(_G.tinfo->stacks[stack], ec);
+ EINA_LIST_APPEND(_G.tinfo->stacks[stack + 1], ec);
if (_G.tinfo->stacks[stack] && _G.tinfo->stacks[stack + 1]->next) {
_reorganize_stack(stack);
_reorganize_stack(stack + 1);
if (check_moving_anims)
- _check_moving_anims(bd, extra, stack + 1);
+ _check_moving_anims(ec, extra, stack + 1);
} else
if (_G.tinfo->stacks[stack]) {
/* Add stack */
@@ -2295,7 +2244,7 @@ _move_down_rows_or_right_cols(E_Border *bd, Eina_Bool check_moving_anims)
_reorganize_stack(stack);
- e_zone_useful_geometry_get(bd->zone, &x, &y, &w, &h);
+ e_zone_useful_geometry_get(ec->zone, &x, &y, &w, &h);
if (_G.tinfo->conf->use_rows) {
pos = y;
@@ -2327,24 +2276,24 @@ _move_down_rows_or_right_cols(E_Border *bd, Eina_Bool check_moving_anims)
extra->expected.w = size;
extra->expected.h = h;
}
- _e_border_move_resize(bd,
+ _e_client_move_resize(ec,
extra->expected.x,
extra->expected.y,
extra->expected.w,
extra->expected.h);
- _e_border_maximize(bd, E_MAXIMIZE_EXPAND | E_MAXIMIZE_HORIZONTAL);
+ _e_client_maximize(ec, E_MAXIMIZE_EXPAND | E_MAXIMIZE_HORIZONTAL);
if (nb_stacks + 1 > _G.tinfo->conf->nb_stacks) {
_G.tinfo->conf->nb_stacks = nb_stacks + 1;
e_config_save_queue();
}
if (check_moving_anims)
- _check_moving_anims(bd, extra, stack + 1);
+ _check_moving_anims(ec, extra, stack + 1);
} else {
int x, y, w, h, s, pos;
/* Remove stack */
- e_zone_useful_geometry_get(bd->zone, &x, &y, &w, &h);
+ e_zone_useful_geometry_get(ec->zone, &x, &y, &w, &h);
nb_stacks--;
@@ -2376,10 +2325,10 @@ _move_down_rows_or_right_cols(E_Border *bd, Eina_Bool check_moving_anims)
_G.tinfo->size[nb_stacks] = 0;
_reorganize_stack(stack);
if (check_moving_anims)
- _check_moving_anims(bd, extra, stack);
+ _check_moving_anims(ec, extra, stack);
}
- ecore_x_pointer_warp(_G.tinfo->desk->zone->container->win,
+ ecore_x_pointer_warp(_G.tinfo->desk->zone->comp->win,
extra->expected.x + extra->expected.w/2,
extra->expected.y + extra->expected.h/2);
}
@@ -2402,33 +2351,33 @@ move_key_down(void *data __UNUSED__,
|| (strcmp(ev->key, "k") == 0))
{
if (_G.tinfo->conf->use_rows)
- _move_up_rows_or_left_cols(_G.focused_bd, true);
+ _move_up_rows_or_left_cols(_G.focused_ec, true);
else
- _move_left_rows_or_up_cols(_G.focused_bd, true);
+ _move_left_rows_or_up_cols(_G.focused_ec, true);
return ECORE_CALLBACK_PASS_ON;
} else if ((strcmp(ev->key, "Down") == 0)
|| (strcmp(ev->key, "j") == 0))
{
if (_G.tinfo->conf->use_rows)
- _move_down_rows_or_right_cols(_G.focused_bd, true);
+ _move_down_rows_or_right_cols(_G.focused_ec, true);
else
- _move_right_rows_or_down_cols(_G.focused_bd, true);
+ _move_right_rows_or_down_cols(_G.focused_ec, true);
return ECORE_CALLBACK_PASS_ON;
} else if ((strcmp(ev->key, "Left") == 0)
|| (strcmp(ev->key, "h") == 0))
{
if (_G.tinfo->conf->use_rows)
- _move_left_rows_or_up_cols(_G.focused_bd, true);
+ _move_left_rows_or_up_cols(_G.focused_ec, true);
else
- _move_up_rows_or_left_cols(_G.focused_bd, true);
+ _move_up_rows_or_left_cols(_G.focused_ec, true);
return ECORE_CALLBACK_PASS_ON;
} else if ((strcmp(ev->key, "Right") == 0)
|| (strcmp(ev->key, "l") == 0))
{
if (_G.tinfo->conf->use_rows)
- _move_right_rows_or_down_cols(_G.focused_bd, true);
+ _move_right_rows_or_down_cols(_G.focused_ec, true);
else
- _move_down_rows_or_right_cols(_G.focused_bd, true);
+ _move_down_rows_or_right_cols(_G.focused_ec, true);
return ECORE_CALLBACK_PASS_ON;
}
@@ -2448,14 +2397,14 @@ _e_mod_action_move_direct_cb(E_Object *obj __UNUSED__,
const char *params)
{
E_Desk *desk;
- E_Border *focused_bd;
+ E_Client *focused_ec;
desk = get_current_desk();
if (!desk)
return;
- focused_bd = e_border_focused_get();
- if (!focused_bd || focused_bd->desk != desk)
+ focused_ec = e_client_focused_get();
+ if (!focused_ec || focused_ec->desk != desk)
return;
check_tinfo(desk);
@@ -2469,27 +2418,27 @@ _e_mod_action_move_direct_cb(E_Object *obj __UNUSED__,
switch (params[0]) {
case 'l': /* left */
if (_G.tinfo->conf->use_rows)
- _move_left_rows_or_up_cols(focused_bd, false);
+ _move_left_rows_or_up_cols(focused_ec, false);
else
- _move_up_rows_or_left_cols(focused_bd, false);
+ _move_up_rows_or_left_cols(focused_ec, false);
break;
case 'r': /* right */
if (_G.tinfo->conf->use_rows)
- _move_right_rows_or_down_cols(focused_bd, false);
+ _move_right_rows_or_down_cols(focused_ec, false);
else
- _move_down_rows_or_right_cols(focused_bd, false);
+ _move_down_rows_or_right_cols(focused_ec, false);
break;
case 'u': /* up */
if (_G.tinfo->conf->use_rows)
- _move_up_rows_or_left_cols(focused_bd, false);
+ _move_up_rows_or_left_cols(focused_ec, false);
else
- _move_left_rows_or_up_cols(focused_bd, false);
+ _move_left_rows_or_up_cols(focused_ec, false);
break;
case 'd': /* down */
if (_G.tinfo->conf->use_rows)
- _move_down_rows_or_right_cols(focused_bd, false);
+ _move_down_rows_or_right_cols(focused_ec, false);
else
- _move_right_rows_or_down_cols(focused_bd, false);
+ _move_right_rows_or_down_cols(focused_ec, false);
break;
}
}
@@ -2499,15 +2448,15 @@ _e_mod_action_move_cb(E_Object *obj __UNUSED__,
const char *params __UNUSED__)
{
E_Desk *desk;
- E_Border *focused_bd;
+ E_Client *focused_ec;
Ecore_X_Window parent;
desk = get_current_desk();
if (!desk)
return;
- focused_bd = e_border_focused_get();
- if (!focused_bd || focused_bd->desk != desk)
+ focused_ec = e_client_focused_get();
+ if (!focused_ec || focused_ec->desk != desk)
return;
check_tinfo(desk);
@@ -2515,12 +2464,12 @@ _e_mod_action_move_cb(E_Object *obj __UNUSED__,
return;
}
- _G.focused_bd = focused_bd;
+ _G.focused_ec = focused_ec;
_G.input_mode = INPUT_MODE_MOVING;
/* Get input */
- parent = focused_bd->zone->container->win;
+ parent = focused_ec->zone->comp->win;
_G.action_input_win = ecore_x_window_input_new(parent, 0, 0, 1, 1);
if (!_G.action_input_win) {
end_special_input();
@@ -2537,7 +2486,7 @@ _e_mod_action_move_cb(E_Object *obj __UNUSED__,
_G.handler_key = ecore_event_handler_add(ECORE_EVENT_KEY_DOWN,
move_key_down, NULL);
- _check_moving_anims(focused_bd, NULL, -1);
+ _check_moving_anims(focused_ec, NULL, -1);
}
/* }}} */
@@ -2548,12 +2497,9 @@ _transition_overlays_free_cb(void *data)
{
transition_overlay_t *trov = data;
- if (trov->overlay.obj) {
- evas_object_del(trov->overlay.obj);
- trov->overlay.obj = NULL;
- }
if (trov->overlay.popup) {
- e_object_del(E_OBJECT(trov->overlay.popup));
+ evas_object_hide(trov->overlay.popup);
+ evas_object_del(trov->overlay.popup);
trov->overlay.popup = NULL;
}
if (trov != _G.transition_overlay) {
@@ -2566,36 +2512,37 @@ _transition_move_cols(tiling_move_t direction)
{
int delta = TILING_RESIZE_STEP;
int stack;
- E_Popup *popup = NULL;
+ Evas_Object *popup = NULL;
if (!_G.transition_overlay)
return;
stack = _G.transition_overlay->stack;
- if (_G.transition_overlay->bd) {
+ if (_G.transition_overlay->ec) {
Eina_List *l = NULL;
- E_Border *bd = _G.transition_overlay->bd,
- *nextbd = NULL;
- Border_Extra *extra = NULL,
+ E_Client *ec = _G.transition_overlay->ec,
+ *nextec = NULL;
+ Client_Extra *extra = NULL,
*nextextra = NULL;
int min_height = 0;
+ int x, y;
- l = eina_list_data_find_list(_G.tinfo->stacks[stack], bd);
+ l = eina_list_data_find_list(_G.tinfo->stacks[stack], ec);
if (!l) {
- ERR("unable to bd %p in stack %d", bd, stack);
+ ERR("unable to ec %p in stack %d", ec, stack);
return;
}
- extra = eina_hash_find(_G.border_extras, &bd);
+ extra = eina_hash_find(_G.client_extras, &ec);
if (!extra) {
- ERR("No extra for %p", bd);
+ ERR("No extra for %p", ec);
return;
}
- nextbd = l->next->data;
- nextextra = eina_hash_find(_G.border_extras, &nextbd);
+ nextec = l->next->data;
+ nextextra = eina_hash_find(_G.client_extras, &nextec);
if (!nextextra) {
- ERR("No extra for %p", nextbd);
+ ERR("No extra for %p", nextec);
return;
}
@@ -2603,30 +2550,32 @@ _transition_move_cols(tiling_move_t direction)
delta *= -1;
}
- nextbd = l->next->data;
- min_height = MAX(nextbd->client.icccm.base_h, 1);
+ nextec = l->next->data;
+ min_height = MAX(nextec->icccm.base_h, 1);
if (nextextra->expected.h - delta < min_height)
delta = nextextra->expected.h - min_height;
nextextra->expected.y += delta;
nextextra->expected.h -= delta;
- _e_border_move_resize(nextbd,
+ _e_client_move_resize(nextec,
nextextra->expected.x,
nextextra->expected.y,
nextextra->expected.w,
nextextra->expected.h);
extra->expected.h += delta;
- _e_border_move_resize(bd,
+ _e_client_move_resize(ec,
extra->expected.x,
extra->expected.y,
extra->expected.w,
extra->expected.h);
popup = _G.transition_overlay->overlay.popup;
- e_popup_move(popup, popup->x, popup->y + delta);
+ evas_object_geometry_get(popup, &x, &y, NULL, NULL);
+ evas_object_move(popup, x, y + delta);
} else {
+ int x, y;
if (stack == TILING_MAX_STACKS || !_G.tinfo->stacks[stack + 1]) {
return;
@@ -2642,7 +2591,8 @@ _transition_move_cols(tiling_move_t direction)
_move_resize_stack(stack+1, delta, -delta);
popup = _G.transition_overlay->overlay.popup;
- e_popup_move(popup, popup->x + delta, popup->y);
+ evas_object_geometry_get(popup, &x, &y, NULL, NULL);
+ evas_object_move(popup, x + delta, y);
}
}
@@ -2651,36 +2601,37 @@ _transition_move_rows(tiling_move_t direction)
{
int delta = TILING_RESIZE_STEP;
int stack;
- E_Popup *popup = NULL;
+ int x, y;
+ Evas_Object *popup = NULL;
if (!_G.transition_overlay)
return;
stack = _G.transition_overlay->stack;
- if (_G.transition_overlay->bd) {
+ if (_G.transition_overlay->ec) {
Eina_List *l = NULL;
- E_Border *bd = _G.transition_overlay->bd,
- *nextbd = NULL;
- Border_Extra *extra = NULL,
+ E_Client *ec = _G.transition_overlay->ec,
+ *nextec = NULL;
+ Client_Extra *extra = NULL,
*nextextra = NULL;
int min_width = 0;
- l = eina_list_data_find_list(_G.tinfo->stacks[stack], bd);
+ l = eina_list_data_find_list(_G.tinfo->stacks[stack], ec);
if (!l) {
- ERR("unable to bd %p in stack %d", bd, stack);
+ ERR("unable to ec %p in stack %d", ec, stack);
return;
}
- extra = eina_hash_find(_G.border_extras, &bd);
+ extra = eina_hash_find(_G.client_extras, &ec);
if (!extra) {
- ERR("No extra for %p", bd);
+ ERR("No extra for %p", ec);
return;
}
- nextbd = l->next->data;
- nextextra = eina_hash_find(_G.border_extras, &nextbd);
+ nextec = l->next->data;
+ nextextra = eina_hash_find(_G.client_extras, &nextec);
if (!nextextra) {
- ERR("No extra for %p", nextbd);
+ ERR("No extra for %p", nextec);
return;
}
@@ -2688,29 +2639,30 @@ _transition_move_rows(tiling_move_t direction)
delta *= -1;
}
- nextbd = l->next->data;
- min_width = MAX(nextbd->client.icccm.base_w, 1);
+ nextec = l->next->data;
+ min_width = MAX(nextec->icccm.base_w, 1);
if (nextextra->expected.w - delta < min_width)
delta = nextextra->expected.w - min_width;
nextextra->expected.x += delta;
nextextra->expected.w -= delta;
- _e_border_move_resize(nextbd,
+ _e_client_move_resize(nextec,
nextextra->expected.x,
nextextra->expected.y,
nextextra->expected.w,
nextextra->expected.h);
extra->expected.w += delta;
- _e_border_move_resize(bd,
+ _e_client_move_resize(ec,
extra->expected.x,
extra->expected.y,
extra->expected.w,
extra->expected.h);
popup = _G.transition_overlay->overlay.popup;
- e_popup_move(popup, popup->x + delta, popup->y);
+ evas_object_geometry_get(popup, &x, &y, NULL, NULL);
+ evas_object_move(popup, x + delta, y);
} else {
if (stack == TILING_MAX_STACKS || !_G.tinfo->stacks[stack + 1]) {
@@ -2727,7 +2679,8 @@ _transition_move_rows(tiling_move_t direction)
_move_resize_stack(stack+1, delta, -delta);
popup = _G.transition_overlay->overlay.popup;
- e_popup_move(popup, popup->x, popup->y + delta);
+ evas_object_geometry_get(popup, &x, &y, NULL, NULL);
+ evas_object_move(popup, x, y + delta);
}
}
@@ -2752,15 +2705,15 @@ _transition_overlay_key_down(void *data __UNUSED__,
if (_G.transition_overlay) {
DBG("ev->key='%s'; %p %d", ev->key,
- _G.transition_overlay->bd, _G.tinfo->conf->use_rows);
+ _G.transition_overlay->ec, _G.tinfo->conf->use_rows);
if ((strcmp(ev->key, "Up") == 0)
|| (strcmp(ev->key, "k") == 0))
{
- if (_G.transition_overlay->bd && !_G.tinfo->conf->use_rows) {
+ if (_G.transition_overlay->ec && !_G.tinfo->conf->use_rows) {
_transition_move_cols(MOVE_UP);
return ECORE_CALLBACK_PASS_ON;
} else
- if (!_G.transition_overlay->bd && _G.tinfo->conf->use_rows) {
+ if (!_G.transition_overlay->ec && _G.tinfo->conf->use_rows) {
_transition_move_rows(MOVE_UP);
return ECORE_CALLBACK_PASS_ON;
}
@@ -2768,11 +2721,11 @@ _transition_overlay_key_down(void *data __UNUSED__,
if ((strcmp(ev->key, "Down") == 0)
|| (strcmp(ev->key, "j") == 0))
{
- if (_G.transition_overlay->bd && !_G.tinfo->conf->use_rows) {
+ if (_G.transition_overlay->ec && !_G.tinfo->conf->use_rows) {
_transition_move_cols(MOVE_DOWN);
return ECORE_CALLBACK_PASS_ON;
} else
- if (!_G.transition_overlay->bd && _G.tinfo->conf->use_rows) {
+ if (!_G.transition_overlay->ec && _G.tinfo->conf->use_rows) {
_transition_move_rows(MOVE_DOWN);
return ECORE_CALLBACK_PASS_ON;
}
@@ -2780,11 +2733,11 @@ _transition_overlay_key_down(void *data __UNUSED__,
if ((strcmp(ev->key, "Left") == 0)
|| (strcmp(ev->key, "h") == 0))
{
- if (!_G.transition_overlay->bd && !_G.tinfo->conf->use_rows) {
+ if (!_G.transition_overlay->ec && !_G.tinfo->conf->use_rows) {
_transition_move_cols(MOVE_LEFT);
return ECORE_CALLBACK_PASS_ON;
} else
- if (_G.transition_overlay->bd && _G.tinfo->conf->use_rows) {
+ if (_G.transition_overlay->ec && _G.tinfo->conf->use_rows) {
_transition_move_rows(MOVE_LEFT);
return ECORE_CALLBACK_PASS_ON;
}
@@ -2792,11 +2745,11 @@ _transition_overlay_key_down(void *data __UNUSED__,
if ((strcmp(ev->key, "Right") == 0)
|| (strcmp(ev->key, "l") == 0))
{
- if (!_G.transition_overlay->bd && !_G.tinfo->conf->use_rows) {
+ if (!_G.transition_overlay->ec && !_G.tinfo->conf->use_rows) {
_transition_move_cols(MOVE_RIGHT);
return ECORE_CALLBACK_PASS_ON;
} else
- if (_G.transition_overlay->bd && _G.tinfo->conf->use_rows) {
+ if (_G.transition_overlay->ec && _G.tinfo->conf->use_rows) {
_transition_move_rows(MOVE_RIGHT);
return ECORE_CALLBACK_PASS_ON;
}
@@ -2816,8 +2769,8 @@ _transition_overlay_key_down(void *data __UNUSED__,
ev->key[1]))
{
transition_overlay_t *trov = NULL;
- E_Border *bd = NULL;
- Border_Extra *extra = NULL;
+ E_Client *ec = NULL;
+ Client_Extra *extra = NULL;
Evas_Coord ew, eh;
char *key = _G.keys;
@@ -2830,30 +2783,29 @@ _transition_overlay_key_down(void *data __UNUSED__,
if (!trov) {
return ECORE_CALLBACK_RENEW;
}
- bd = trov->bd;
+ ec = trov->ec;
_G.transition_overlay = trov;
eina_hash_free(_G.overlays);
_G.overlays = NULL;
- if (bd) {
- extra = eina_hash_find(_G.border_extras, &bd);
+ if (ec) {
+ extra = eina_hash_find(_G.client_extras, &ec);
if (!extra) {
- ERR("No extra for %p", bd);
+ ERR("No extra for %p", ec);
goto stop;
}
}
- if (!trov->overlay.popup) {
- trov->overlay.popup = e_popup_new(_G.tinfo->desk->zone,
- 0, 0, 1, 1);
- e_popup_layer_set(trov->overlay.popup, E_COMP_CANVAS_LAYER_LAYOUT, E_LAYER_NORMAL);
- }
if (!trov->overlay.obj) {
trov->overlay.obj =
- edje_object_add(trov->overlay.popup->evas);
+ edje_object_add(e_comp_get(_G.tinfo->desk)->evas);
}
- if ((bd && !_G.tinfo->conf->use_rows)
- || (!bd && _G.tinfo->conf->use_rows)) {
+ if (!trov->overlay.popup) {
+ trov->overlay.popup = e_comp_object_util_add(trov->overlay.obj, E_COMP_OBJECT_TYPE_POPUP);
+ evas_object_layer_set(trov->overlay.popup, E_LAYER_CLIENT_NORMAL);
+ }
+ if ((ec && !_G.tinfo->conf->use_rows)
+ || (!ec && _G.tinfo->conf->use_rows)) {
_theme_edje_object_set(trov->overlay.obj,
"modules/tiling/transition/horizontal");
} else {
@@ -2862,44 +2814,40 @@ _transition_overlay_key_down(void *data __UNUSED__,
}
edje_object_size_min_calc(trov->overlay.obj, &ew, &eh);
- e_popup_content_set(trov->overlay.popup,
- trov->overlay.obj);
- evas_object_show(trov->overlay.obj);
- if (bd) {
+ if (ec) {
if (_G.tinfo->conf->use_rows) {
- e_popup_move_resize(trov->overlay.popup,
- (extra->expected.x - trov->overlay.popup->zone->x +
+ evas_object_geometry_set(trov->overlay.popup,
+ (extra->expected.x - trov->ec->zone->x +
extra->expected.w - (ew / 2)),
- (extra->expected.y - trov->overlay.popup->zone->y +
+ (extra->expected.y - trov->ec->zone->y +
((extra->expected.h - eh) / 2)),
ew, eh);
} else {
- e_popup_move_resize(trov->overlay.popup,
- (extra->expected.x - trov->overlay.popup->zone->x +
+ evas_object_geometry_set(trov->overlay.popup,
+ (extra->expected.x - trov->ec->zone->x +
((extra->expected.w - ew) / 2)),
- (extra->expected.y - trov->overlay.popup->zone->y +
+ (extra->expected.y - trov->ec->zone->y +
extra->expected.h - (eh / 2)),
ew, eh);
}
} else {
if (_G.tinfo->conf->use_rows) {
- e_popup_move_resize(trov->overlay.popup,
- (trov->overlay.popup->zone->w/2 - ew/2),
+ evas_object_geometry_set(trov->overlay.popup,
+ (trov->ec->zone->w/2 - ew/2),
(_G.tinfo->pos[trov->stack]
+ _G.tinfo->size[trov->stack]
- - trov->overlay.popup->zone->y - eh/2),
+ - trov->ec->zone->y - eh/2),
ew, eh);
} else {
- e_popup_move_resize(trov->overlay.popup,
+ evas_object_geometry_set(trov->overlay.popup,
(_G.tinfo->pos[trov->stack]
+ _G.tinfo->size[trov->stack]
- - trov->overlay.popup->zone->x - ew/2),
- (trov->overlay.popup->zone->h/2 - eh/2),
+ - trov->ec->zone->x - ew/2),
+ (trov->ec->zone->h/2 - eh/2),
ew, eh);
}
}
- evas_object_resize(trov->overlay.obj, ew, eh);
- e_popup_show(trov->overlay.popup);
+ evas_object_show(trov->overlay.popup);
return ECORE_CALLBACK_RENEW;
}
@@ -2946,33 +2894,27 @@ _do_transition_overlay(void)
for (i = 0; i < TILING_MAX_STACKS; i++) {
Eina_List *l;
- E_Border *bd;
+ E_Client *ec;
if (!_G.tinfo->stacks[i])
break;
- EINA_LIST_FOREACH(_G.tinfo->stacks[i], l, bd) {
+ EINA_LIST_FOREACH(_G.tinfo->stacks[i], l, ec) {
if (l->next && n < nmax) {
- Border_Extra *extra;
+ Client_Extra *extra;
Evas_Coord ew, eh;
transition_overlay_t *trov;
- extra = eina_hash_find(_G.border_extras, &bd);
+ extra = eina_hash_find(_G.client_extras, &ec);
if (!extra) {
- ERR("No extra for %p", bd);
+ ERR("No extra for %p", ec);
continue;
}
trov = E_NEW(transition_overlay_t, 1);
- trov->overlay.popup = e_popup_new(bd->zone, 0, 0, 1, 1);
- if (!trov->overlay.popup)
- {
- E_FREE(trov);
- continue;
- }
-
- e_popup_layer_set(trov->overlay.popup, E_COMP_CANVAS_LAYER_LAYOUT, E_LAYER_NORMAL);
- trov->overlay.obj = edje_object_add(trov->overlay.popup->evas);
+ trov->overlay.obj = edje_object_add(ec->comp->evas);
+ trov->overlay.popup = e_comp_object_util_add(trov->overlay.obj, E_COMP_OBJECT_TYPE_POPUP);
+ evas_object_layer_set(trov->overlay.popup, E_LAYER_CLIENT_NORMAL);
e_theme_edje_object_set(trov->overlay.obj,
"base/theme/borders",
"e/widgets/border/default/resize");
@@ -2996,39 +2938,31 @@ _do_transition_overlay(void)
}
n++;
trov->stack = i;
- trov->bd = bd;
+ trov->ec = ec;
eina_hash_add(_G.overlays, trov->key, trov);
edje_object_part_text_set(trov->overlay.obj,
"e.text.label",
trov->key);
edje_object_size_min_calc(trov->overlay.obj, &ew, &eh);
- evas_object_move(trov->overlay.obj, 0, 0);
- evas_object_resize(trov->overlay.obj, ew, eh);
- evas_object_show(trov->overlay.obj);
- e_popup_content_set(trov->overlay.popup,
- trov->overlay.obj);
-
- evas_object_show(trov->overlay.obj);
- e_popup_show(trov->overlay.popup);
if (_G.tinfo->conf->use_rows) {
- e_popup_move_resize(trov->overlay.popup,
- (extra->expected.x - trov->overlay.popup->zone->x +
+ evas_object_geometry_set(trov->overlay.popup,
+ (extra->expected.x - trov->ec->zone->x +
extra->expected.w - (ew / 2)),
- (extra->expected.y - trov->overlay.popup->zone->y +
+ (extra->expected.y - trov->ec->zone->y +
((extra->expected.h - eh) / 2)),
ew, eh);
} else {
- e_popup_move_resize(trov->overlay.popup,
- (extra->expected.x - trov->overlay.popup->zone->x +
+ evas_object_geometry_set(trov->overlay.popup,
+ (extra->expected.x - trov->ec->zone->x +
((extra->expected.w - ew) / 2)),
- (extra->expected.y - trov->overlay.popup->zone->y +
+ (extra->expected.y - trov->ec->zone->y +
extra->expected.h - (eh / 2)),
ew, eh);
}
- e_popup_show(trov->overlay.popup);
+ evas_object_show(trov->overlay.popup);
}
}
if (i != (TILING_MAX_STACKS - 1) &&
@@ -3039,13 +2973,9 @@ _do_transition_overlay(void)
trov = E_NEW(transition_overlay_t, 1);
- trov->overlay.popup = e_popup_new(_G.tinfo->desk->zone,
- 0, 0, 1, 1);
- if (!trov->overlay.popup)
- continue;
-
- e_popup_layer_set(trov->overlay.popup, E_COMP_CANVAS_LAYER_LAYOUT, E_LAYER_NORMAL);
- trov->overlay.obj = edje_object_add(trov->overlay.popup->evas);
+ trov->overlay.obj = edje_object_add(e_comp_get(_G.tinfo->desk)->evas);
+ trov->overlay.popup = e_comp_object_util_add(trov->overlay.obj, E_COMP_OBJECT_TYPE_POPUP);
+ evas_object_layer_set(trov->overlay.popup, E_LAYER_CLIENT_NORMAL);
e_theme_edje_object_set(trov->overlay.obj,
"base/theme/borders",
"e/widgets/border/default/resize");
@@ -3069,44 +2999,36 @@ _do_transition_overlay(void)
}
n++;
trov->stack = i;
- trov->bd = NULL;
+ trov->ec = NULL;
eina_hash_add(_G.overlays, trov->key, trov);
edje_object_part_text_set(trov->overlay.obj,
"e.text.label",
trov->key);
edje_object_size_min_calc(trov->overlay.obj, &ew, &eh);
- evas_object_move(trov->overlay.obj, 0, 0);
- evas_object_resize(trov->overlay.obj, ew, eh);
- evas_object_show(trov->overlay.obj);
- e_popup_content_set(trov->overlay.popup,
- trov->overlay.obj);
-
- evas_object_show(trov->overlay.obj);
- e_popup_show(trov->overlay.popup);
if (_G.tinfo->conf->use_rows) {
- e_popup_move_resize(trov->overlay.popup,
- (trov->overlay.popup->zone->w/2 - ew/2),
+ evas_object_geometry_set(trov->overlay.popup,
+ (trov->ec->zone->w/2 - ew/2),
(_G.tinfo->pos[trov->stack]
+ _G.tinfo->size[trov->stack]
- - trov->overlay.popup->zone->y - eh/2),
+ - trov->ec->zone->y - eh/2),
ew, eh);
} else {
- e_popup_move_resize(trov->overlay.popup,
+ evas_object_geometry_set(trov->overlay.popup,
(_G.tinfo->pos[trov->stack]
+ _G.tinfo->size[trov->stack]
- - trov->overlay.popup->zone->x - ew/2),
- (trov->overlay.popup->zone->h/2 - eh/2),
+ - trov->ec->zone->x - ew/2),
+ (trov->ec->zone->h/2 - eh/2),
ew, eh);
}
- e_popup_show(trov->overlay.popup);
+ evas_object_show(trov->overlay.popup);
}
}
/* Get input */
- parent = _G.tinfo->desk->zone->container->win;
+ parent = _G.tinfo->desk->zone->comp->win;
_G.action_input_win = ecore_x_window_input_new(parent, 0, 0, 1, 1);
if (!_G.action_input_win) {
end_special_input();
@@ -3159,7 +3081,7 @@ _warp_timer(void *data __UNUSED__)
_G.warp_x = (_G.warp_x * (1.0 - spd)) + (_G.warp_to_x * spd);
_G.warp_y = (_G.warp_y * (1.0 - spd)) + (_G.warp_to_y * spd);
- ecore_x_pointer_warp(_G.tinfo->desk->zone->container->win,
+ ecore_x_pointer_warp(_G.tinfo->desk->zone->comp->win,
_G.warp_x, _G.warp_y);
if (abs(_G.warp_x - _G.old_warp_x) <= 1
@@ -3175,16 +3097,16 @@ _warp_timer(void *data __UNUSED__)
}
static void
-_action_go(E_Border *data __UNUSED__,
- Border_Extra *extra_2)
+_action_go(E_Client *data __UNUSED__,
+ Client_Extra *extra_2)
{
- E_Border *bd = extra_2->border;
+ E_Client *ec = extra_2->client;
- _G.warp_to_x = bd->x + (bd->w / 2);
- _G.warp_to_y = bd->y + (bd->h / 2);
- ecore_x_pointer_xy_get(_G.tinfo->desk->zone->container->win,
+ _G.warp_to_x = ec->x + (ec->w / 2);
+ _G.warp_to_y = ec->y + (ec->h / 2);
+ ecore_x_pointer_xy_get(_G.tinfo->desk->zone->comp->win,
&_G.warp_x, &_G.warp_y);
- e_border_focus_latest_set(bd);
+ e_client_focus_latest_set(ec);
_G.warp_timer = ecore_timer_add(0.01, _warp_timer, NULL);
}
@@ -3214,7 +3136,7 @@ _e_mod_action_send_cb(E_Object *obj __UNUSED__,
const char *params) EINA_ARG_NONNULL(2)
{
E_Desk *desk;
- E_Border *bd;
+ E_Client *ec;
int x, y, w, h;
geom_t g;
@@ -3224,11 +3146,11 @@ _e_mod_action_send_cb(E_Object *obj __UNUSED__,
if (!desk)
return;
- bd = e_border_focused_get();
- if (!bd || bd->desk != desk)
+ ec = e_client_focused_get();
+ if (!ec || ec->desk != desk)
return;
- if (!is_tilable(bd))
+ if (!is_tilable(ec))
return;
check_tinfo(desk);
@@ -3236,26 +3158,26 @@ _e_mod_action_send_cb(E_Object *obj __UNUSED__,
return;
/* Fill initial values if not already done */
- _get_or_create_border_extra(bd);
+ _get_or_create_client_extra(ec);
if (!tiling_g.config->show_titles) {
- if ((bd->bordername && strcmp(bd->bordername, "pixel"))
- || !bd->bordername)
+ if ((ec->bordername && strcmp(ec->bordername, "pixel"))
+ || !ec->bordername)
{
- change_window_border(bd, "pixel");
+ change_window_border(ec, "pixel");
}
}
- if (bd->maximized)
- _e_border_unmaximize(bd, E_MAXIMIZE_BOTH);
+ if (ec->maximized)
+ _e_client_unmaximize(ec, E_MAXIMIZE_BOTH);
/* add to floating */
- if (!EINA_LIST_IS_IN(_G.tinfo->floating_windows, bd)) {
- _remove_border(bd);
- EINA_LIST_APPEND(_G.tinfo->floating_windows, bd);
+ if (!EINA_LIST_IS_IN(_G.tinfo->floating_windows, ec)) {
+ _remove_client(ec);
+ EINA_LIST_APPEND(_G.tinfo->floating_windows, ec);
}
- e_zone_useful_geometry_get(bd->zone, &x, &y, &w, &h);
+ e_zone_useful_geometry_get(ec->zone, &x, &y, &w, &h);
g.w = w / 2;
g.h = h / 2;
@@ -3278,84 +3200,84 @@ _e_mod_action_send_cb(E_Object *obj __UNUSED__,
g.x = w / 2;
}
}
- _e_border_move_resize(bd, g.x, g.y, g.w, g.h);
+ _e_client_move_resize(ec, g.x, g.y, g.w, g.h);
}
/* }}} */
/* Hooks {{{*/
static void
-_pre_border_assign_hook(void *data __UNUSED__,
- E_Border *bd)
+_pre_client_assign_hook(void *data __UNUSED__,
+ E_Client *ec)
{
if (tiling_g.config->show_titles)
return;
- if (!bd) {
+ if (!ec) {
return;
}
- check_tinfo(bd->desk);
+ check_tinfo(ec->desk);
if (!_G.tinfo->conf || !_G.tinfo->conf->nb_stacks) {
return;
}
- if (is_floating_window(bd)) {
+ if (is_floating_window(ec)) {
return;
}
- if (!is_tilable(bd)) {
+ if (!is_tilable(ec)) {
return;
}
- if (bd->fullscreen) {
+ if (ec->fullscreen) {
return;
}
/* Fill initial values if not already done */
- _get_or_create_border_extra(bd);
+ _get_or_create_client_extra(ec);
- if ((bd->bordername && strcmp(bd->bordername, "pixel"))
- || !bd->bordername)
+ if ((ec->bordername && strcmp(ec->bordername, "pixel"))
+ || !ec->bordername)
{
- change_window_border(bd, "pixel");
+ change_window_border(ec, "pixel");
}
}
-static void _move_or_resize(E_Border *bd)
+static void _move_or_resize(E_Client *ec)
{
- Border_Extra *extra;
+ Client_Extra *extra;
int stack = -1;
- if (!bd) {
+ if (!ec) {
return;
}
- check_tinfo(bd->desk);
+ check_tinfo(ec->desk);
if (!_G.tinfo->conf || !_G.tinfo->conf->nb_stacks) {
return;
}
- stack = get_stack(bd);
+ stack = get_stack(ec);
if (stack < 0) {
return;
}
- DBG("Resize: %p / '%s' / '%s', (%d,%d), changes(size=%d, position=%d, border=%d)"
- " g:%dx%d+%d+%d bdname:'%s' (stack:%d%c) maximized:%s fs:%s",
- bd, bd->client.icccm.title, bd->client.netwm.name,
- bd->desk->x, bd->desk->y,
- bd->changes.size, bd->changes.pos, bd->changes.border,
- bd->w, bd->h, bd->x, bd->y, bd->bordername,
+ DBG("Resize: %p / '%s' / '%s', (%d,%d), changes(size=%d, position=%d, client=%d)"
+ " g:%dx%d+%d+%d ecname:'%s' (stack:%d%c) maximized:%s fs:%s",
+ ec, ec->icccm.title, ec->netwm.name,
+ ec->desk->x, ec->desk->y,
+ ec->changes.size, ec->changes.pos, ec->changes.border,
+ ec->w, ec->h, ec->x, ec->y, ec->bordername,
stack, _G.tinfo->conf->use_rows? 'r':'c',
- (bd->maximized & E_MAXIMIZE_DIRECTION) == E_MAXIMIZE_NONE ? "NONE" :
- (bd->maximized & E_MAXIMIZE_DIRECTION) == E_MAXIMIZE_VERTICAL ? "VERTICAL" :
- (bd->maximized & E_MAXIMIZE_DIRECTION) == E_MAXIMIZE_HORIZONTAL ? "HORIZONTAL" :
- "BOTH", bd->fullscreen? "true": "false");
+ (ec->maximized & E_MAXIMIZE_DIRECTION) == E_MAXIMIZE_NONE ? "NONE" :
+ (ec->maximized & E_MAXIMIZE_DIRECTION) == E_MAXIMIZE_VERTICAL ? "VERTICAL" :
+ (ec->maximized & E_MAXIMIZE_DIRECTION) == E_MAXIMIZE_HORIZONTAL ? "HORIZONTAL" :
+ "BOTH", ec->fullscreen? "true": "false");
- extra = eina_hash_find(_G.border_extras, &bd);
+ extra = eina_hash_find(_G.client_extras, &ec);
if (!extra) {
- ERR("No extra for %p", bd);
+ ERR("No extra for %p", ec);
return;
}
@@ -3365,61 +3287,61 @@ static void _move_or_resize(E_Border *bd)
extra->expected.x,
extra->expected.y);
DBG("delta:%dx%d,%d,%d. step:%dx%d. base:%dx%d",
- bd->w - extra->expected.w, bd->h - extra->expected.h,
- bd->x - extra->expected.x, bd->y - extra->expected.y,
- bd->client.icccm.step_w, bd->client.icccm.step_h,
- bd->client.icccm.base_w, bd->client.icccm.base_h);
+ ec->w - extra->expected.w, ec->h - extra->expected.h,
+ ec->x - extra->expected.x, ec->y - extra->expected.y,
+ ec->icccm.step_w, ec->icccm.step_h,
+ ec->icccm.base_w, ec->icccm.base_h);
if (stack == 0 && !_G.tinfo->stacks[1] && !_G.tinfo->stacks[0]->next) {
- if (bd->maximized) {
- extra->expected.x = bd->x;
- extra->expected.y = bd->y;
- extra->expected.w = bd->w;
- extra->expected.h = bd->h;
+ if (ec->maximized) {
+ extra->expected.x = ec->x;
+ extra->expected.y = ec->y;
+ extra->expected.w = ec->w;
+ extra->expected.h = ec->h;
} else {
/* TODO: what if a window doesn't want to be maximized? */
- _e_border_unmaximize(bd, E_MAXIMIZE_BOTH);
- _e_border_maximize(bd, E_MAXIMIZE_EXPAND | E_MAXIMIZE_BOTH);
+ _e_client_unmaximize(ec, E_MAXIMIZE_BOTH);
+ _e_client_maximize(ec, E_MAXIMIZE_EXPAND | E_MAXIMIZE_BOTH);
}
}
- if (bd->x == extra->expected.x && bd->y == extra->expected.y
- && bd->w == extra->expected.w && bd->h == extra->expected.h)
+ if (ec->x == extra->expected.x && ec->y == extra->expected.y
+ && ec->w == extra->expected.w && ec->h == extra->expected.h)
{
return;
}
- if (bd->maximized) {
+ if (ec->maximized) {
if (_G.tinfo->conf->use_rows) {
- if (bd->maximized & E_MAXIMIZE_VERTICAL) {
- _e_border_unmaximize(bd, E_MAXIMIZE_VERTICAL);
- _e_border_move_resize(bd,
+ if (ec->maximized & E_MAXIMIZE_VERTICAL) {
+ _e_client_unmaximize(ec, E_MAXIMIZE_VERTICAL);
+ _e_client_move_resize(ec,
extra->expected.x,
extra->expected.y,
extra->expected.w,
extra->expected.h);
}
- if (bd->maximized & E_MAXIMIZE_HORIZONTAL
+ if (ec->maximized & E_MAXIMIZE_HORIZONTAL
&& eina_list_count(_G.tinfo->stacks[stack]) > 1) {
- _e_border_unmaximize(bd, E_MAXIMIZE_HORIZONTAL);
- _e_border_move_resize(bd,
+ _e_client_unmaximize(ec, E_MAXIMIZE_HORIZONTAL);
+ _e_client_move_resize(ec,
extra->expected.x,
extra->expected.y,
extra->expected.w,
extra->expected.h);
}
} else {
- if (bd->maximized & E_MAXIMIZE_HORIZONTAL) {
- _e_border_unmaximize(bd, E_MAXIMIZE_HORIZONTAL);
- _e_border_move_resize(bd,
+ if (ec->maximized & E_MAXIMIZE_HORIZONTAL) {
+ _e_client_unmaximize(ec, E_MAXIMIZE_HORIZONTAL);
+ _e_client_move_resize(ec,
extra->expected.x,
extra->expected.y,
extra->expected.w,
extra->expected.h);
}
- if (bd->maximized & E_MAXIMIZE_VERTICAL
+ if (ec->maximized & E_MAXIMIZE_VERTICAL
&& eina_list_count(_G.tinfo->stacks[stack]) > 1) {
- _e_border_unmaximize(bd, E_MAXIMIZE_VERTICAL);
- _e_border_move_resize(bd,
+ _e_client_unmaximize(ec, E_MAXIMIZE_VERTICAL);
+ _e_client_move_resize(ec,
extra->expected.x,
extra->expected.y,
extra->expected.w,
@@ -3428,63 +3350,64 @@ static void _move_or_resize(E_Border *bd)
}
}
- if (abs(extra->expected.w - bd->w) >= MAX(bd->client.icccm.step_w, 1)) {
+ if (abs(extra->expected.w - ec->w) >= MAX(ec->icccm.step_w, 1)) {
if (_G.tinfo->conf->use_rows)
- _move_resize_border_in_stack(bd, extra, stack, TILING_RESIZE);
+ _move_resize_client_in_stack(ec, extra, stack, TILING_RESIZE);
else
- _move_resize_border_stack(bd, extra, stack, TILING_RESIZE);
+ _move_resize_client_stack(ec, extra, stack, TILING_RESIZE);
}
- if (abs(extra->expected.h - bd->h) >= MAX(bd->client.icccm.step_h, 1)) {
+ if (abs(extra->expected.h - ec->h) >= MAX(ec->icccm.step_h, 1)) {
if (_G.tinfo->conf->use_rows)
- _move_resize_border_stack(bd, extra, stack, TILING_RESIZE);
+ _move_resize_client_stack(ec, extra, stack, TILING_RESIZE);
else
- _move_resize_border_in_stack(bd, extra, stack, TILING_RESIZE);
+ _move_resize_client_in_stack(ec, extra, stack, TILING_RESIZE);
}
- if (extra->expected.x != bd->x) {
+ if (extra->expected.x != ec->x) {
if (_G.tinfo->conf->use_rows)
- _move_resize_border_in_stack(bd, extra, stack, TILING_MOVE);
+ _move_resize_client_in_stack(ec, extra, stack, TILING_MOVE);
else
- _move_resize_border_stack(bd, extra, stack, TILING_MOVE);
+ _move_resize_client_stack(ec, extra, stack, TILING_MOVE);
}
- if (extra->expected.y != bd->y) {
+ if (extra->expected.y != ec->y) {
if (_G.tinfo->conf->use_rows)
- _move_resize_border_stack(bd, extra, stack, TILING_MOVE);
+ _move_resize_client_stack(ec, extra, stack, TILING_MOVE);
else
- _move_resize_border_in_stack(bd, extra, stack, TILING_MOVE);
+ _move_resize_client_in_stack(ec, extra, stack, TILING_MOVE);
}
if (_G.input_mode == INPUT_MODE_MOVING
- && bd == _G.focused_bd) {
- _check_moving_anims(bd, extra, stack);
+ && ec == _G.focused_ec) {
+ _check_moving_anims(ec, extra, stack);
}
}
static Eina_Bool
-_resize_hook(void *data __UNUSED__, int type __UNUSED__, E_Event_Border_Resize *event)
+_resize_hook(void *data __UNUSED__, int type __UNUSED__, E_Event_Client *event)
{
- E_Border *bd = event->border;
+ E_Client *ec = event->ec;
- _move_or_resize(bd);
+ _move_or_resize(ec);
return true;
}
static Eina_Bool
-_move_hook(void *data __UNUSED__, int type __UNUSED__, E_Event_Border_Move*event)
+_move_hook(void *data __UNUSED__, int type __UNUSED__, E_Event_Client*event)
{
- E_Border *bd = event->border;
+ E_Client *ec = event->ec;
- _move_or_resize(bd);
+ _move_or_resize(ec);
return true;
}
static Eina_Bool
-_add_hook(void *data __UNUSED__, int type __UNUSED__, E_Event_Border_Add *event)
+_add_hook(void *data __UNUSED__, int type __UNUSED__, E_Event_Client *event)
{
- E_Border *bd = event->border;
+ E_Client *ec = event->ec;
int stack = -1;
+ if (e_client_util_ignored_get(ec)) return ECORE_CALLBACK_RENEW;
if (_G.input_mode != INPUT_MODE_NONE
&& _G.input_mode != INPUT_MODE_MOVING
&& _G.input_mode != INPUT_MODE_TRANSITION)
@@ -3492,90 +3415,91 @@ _add_hook(void *data __UNUSED__, int type __UNUSED__, E_Event_Border_Add *event)
end_special_input();
}
- check_tinfo(bd->desk);
+ check_tinfo(ec->desk);
if (!_G.tinfo->conf || !_G.tinfo->conf->nb_stacks) {
return true;
}
- if (!is_tilable(bd)) {
+ if (!is_tilable(ec)) {
return true;
}
- stack = get_stack(bd);
+ stack = get_stack(ec);
if (stack >= 0) {
return true;
}
- DBG("Add: %p / '%s' / '%s', (%d,%d), changes(size=%d, position=%d, border=%d)"
- " g:%dx%d+%d+%d bdname:'%s' (stack:%d%c) maximized:%s fs:%s",
- bd, bd->client.icccm.title, bd->client.netwm.name,
- bd->desk->x, bd->desk->y,
- bd->changes.size, bd->changes.pos, bd->changes.border,
- bd->w, bd->h, bd->x, bd->y, bd->bordername,
+ DBG("Add: %p / '%s' / '%s', (%d,%d), changes(size=%d, position=%d, client=%d)"
+ " g:%dx%d+%d+%d ecname:'%s' (stack:%d%c) maximized:%s fs:%s",
+ ec, ec->icccm.title, ec->netwm.name,
+ ec->desk->x, ec->desk->y,
+ ec->changes.size, ec->changes.pos, ec->changes.border,
+ ec->w, ec->h, ec->x, ec->y, ec->bordername,
stack, _G.tinfo->conf->use_rows? 'r':'c',
- (bd->maximized & E_MAXIMIZE_DIRECTION) == E_MAXIMIZE_NONE ? "NONE" :
- (bd->maximized & E_MAXIMIZE_DIRECTION) == E_MAXIMIZE_VERTICAL ? "VERTICAL" :
- (bd->maximized & E_MAXIMIZE_DIRECTION) == E_MAXIMIZE_HORIZONTAL ? "HORIZONTAL" :
- "BOTH", bd->fullscreen? "true": "false");
+ (ec->maximized & E_MAXIMIZE_DIRECTION) == E_MAXIMIZE_NONE ? "NONE" :
+ (ec->maximized & E_MAXIMIZE_DIRECTION) == E_MAXIMIZE_VERTICAL ? "VERTICAL" :
+ (ec->maximized & E_MAXIMIZE_DIRECTION) == E_MAXIMIZE_HORIZONTAL ? "HORIZONTAL" :
+ "BOTH", ec->fullscreen? "true": "false");
- _add_border(bd);
+ _add_client(ec);
return true;
}
static Eina_Bool
-_remove_hook(void *data __UNUSED__, int type __UNUSED__, E_Event_Border_Remove *event)
+_remove_hook(void *data __UNUSED__, int type __UNUSED__, E_Event_Client *event)
{
- E_Border *bd = event->border;
+ E_Client *ec = event->ec;
+ if (e_client_util_ignored_get(ec)) return ECORE_CALLBACK_RENEW;
end_special_input();
if (_G.currently_switching_desktop)
return true;
- check_tinfo(bd->desk);
+ check_tinfo(ec->desk);
if (!_G.tinfo->conf)
return true;
- if (EINA_LIST_IS_IN(_G.tinfo->floating_windows, bd)) {
- EINA_LIST_REMOVE(_G.tinfo->floating_windows, bd);
+ if (EINA_LIST_IS_IN(_G.tinfo->floating_windows, ec)) {
+ EINA_LIST_REMOVE(_G.tinfo->floating_windows, ec);
return true;
}
- _remove_border(bd);
+ _remove_client(ec);
return true;
}
static bool
-_iconify_hook(void *data __UNUSED__, int type __UNUSED__, E_Event_Border_Iconify *event)
+_iconify_hook(void *data __UNUSED__, int type __UNUSED__, E_Event_Client *event)
{
- E_Border *bd = event->border;
+ E_Client *ec = event->ec;
- DBG("iconify hook: %p", bd);
+ DBG("iconify hook: %p", ec);
end_special_input();
- if (bd->deskshow)
+ if (ec->deskshow)
return true;
- check_tinfo(bd->desk);
+ check_tinfo(ec->desk);
if (!_G.tinfo->conf)
return true;
- if (EINA_LIST_IS_IN(_G.tinfo->floating_windows, bd)) {
+ if (EINA_LIST_IS_IN(_G.tinfo->floating_windows, ec)) {
return true;
}
- _remove_border(bd);
+ _remove_client(ec);
return true;
}
static bool
-_uniconify_hook(void *data __UNUSED__, int type __UNUSED__, E_Event_Border_Uniconify *event)
+_uniconify_hook(void *data __UNUSED__, int type __UNUSED__, E_Event_Client *event)
{
- E_Border *bd = event->border;
+ E_Client *ec = event->ec;
int stack = -1;
if (_G.input_mode != INPUT_MODE_NONE
@@ -3585,23 +3509,23 @@ _uniconify_hook(void *data __UNUSED__, int type __UNUSED__, E_Event_Border_Unico
end_special_input();
}
- if (bd->deskshow)
+ if (ec->deskshow)
return true;
- check_tinfo(bd->desk);
+ check_tinfo(ec->desk);
if (!_G.tinfo->conf || !_G.tinfo->conf->nb_stacks) {
return true;
}
- if (!is_tilable(bd)) {
+ if (!is_tilable(ec)) {
return true;
}
- stack = get_stack(bd);
+ stack = get_stack(ec);
if (stack >= 0) {
return true;
}
- _add_border(bd);
+ _add_client(ec);
return true;
}
@@ -3641,11 +3565,11 @@ _desk_before_show_hook(void *data __UNUSED__, int type __UNUSED__, void *event _
}
static bool
-_desk_set_hook(void *data __UNUSED__, int type __UNUSED__, E_Event_Border_Desk_Set *ev)
+_desk_set_hook(void *data __UNUSED__, int type __UNUSED__, E_Event_Client_Desk_Set *ev)
{
- DBG("%p: from (%d,%d) to (%d,%d)", ev->border,
+ DBG("%p: from (%d,%d) to (%d,%d)", ev->ec,
ev->desk->x, ev->desk->y,
- ev->border->desk->x, ev->border->desk->y);
+ ev->ec->desk->x, ev->ec->desk->y);
end_special_input();
@@ -3654,39 +3578,39 @@ _desk_set_hook(void *data __UNUSED__, int type __UNUSED__, E_Event_Border_Desk_S
return true;
}
- if (is_floating_window(ev->border)) {
- EINA_LIST_REMOVE(_G.tinfo->floating_windows, ev->border);
+ if (is_floating_window(ev->ec)) {
+ EINA_LIST_REMOVE(_G.tinfo->floating_windows, ev->ec);
} else {
- if (get_stack(ev->border) >= 0) {
- _remove_border(ev->border);
- _restore_border(ev->border);
+ if (get_stack(ev->ec) >= 0) {
+ _remove_client(ev->ec);
+ _restore_client(ev->ec);
}
}
- check_tinfo(ev->border->desk);
+ check_tinfo(ev->ec->desk);
if (!_G.tinfo->conf) {
return true;
}
- if (get_stack(ev->border) < 0)
- _add_border(ev->border);
+ if (get_stack(ev->ec) < 0)
+ _add_client(ev->ec);
return true;
}
static bool
-_container_resize_hook(void *data __UNUSED__, int type __UNUSED__, E_Event_Container_Resize *ev)
+_compositor_resize_hook(void *data __UNUSED__, int type __UNUSED__, E_Event_Compositor_Resize *ev)
{
Eina_List *l;
E_Zone *zone;
int x, y, i;
- EINA_LIST_FOREACH(ev->container->zones, l, zone) {
+ EINA_LIST_FOREACH(ev->comp->zones, l, zone) {
for (x = 0; x < zone->desk_x_count; x++) {
for (y = 0; y < zone->desk_y_count; y++) {
E_Desk *desk = zone->desks[x + (y * zone->desk_x_count)];
Eina_List *wins = NULL;
- E_Border *bd;
+ E_Client *ec;
check_tinfo(desk);
if (!_G.tinfo->conf || !_G.tinfo->conf->nb_stacks) {
@@ -3694,17 +3618,17 @@ _container_resize_hook(void *data __UNUSED__, int type __UNUSED__, E_Event_Conta
}
for (i = 0; i < TILING_MAX_STACKS; i++) {
- EINA_LIST_FREE(_G.tinfo->stacks[i], bd) {
- EINA_LIST_APPEND(wins, bd);
- _restore_border(bd);
+ EINA_LIST_FREE(_G.tinfo->stacks[i], ec) {
+ EINA_LIST_APPEND(wins, ec);
+ _restore_client(ec);
}
_G.tinfo->stacks[i] = NULL;
_G.tinfo->pos[i] = 0;
_G.tinfo->size[i] = 0;
}
- EINA_LIST_FREE(wins, bd) {
- _add_border(bd);
+ EINA_LIST_FREE(wins, ec) {
+ _add_client(ec);
}
}
}
@@ -3733,7 +3657,7 @@ _clear_info_hash(void *data)
static void
_clear_border_extras(void *data)
{
- Border_Extra *extra = data;
+ Client_Extra *extra = data;
eina_stringshare_del(extra->orig.bordername);
@@ -3762,31 +3686,30 @@ e_modapi_init(E_Module *m)
}
_G.info_hash = eina_hash_pointer_new(_clear_info_hash);
- _G.border_extras = eina_hash_pointer_new(_clear_border_extras);
+ _G.client_extras = eina_hash_pointer_new(_clear_border_extras);
- _G.pre_border_assign_hook = e_border_hook_add(
- E_BORDER_HOOK_EVAL_PRE_BORDER_ASSIGN,
- (void (*)(void*,void*))_pre_border_assign_hook, NULL);
+ _G.pre_client_assign_hook = e_client_hook_add(
+ E_CLIENT_HOOK_EVAL_PRE_FRAME_ASSIGN, _pre_client_assign_hook, NULL);
#define HANDLER(_h, _e, _f) \
_h = ecore_event_handler_add(E_EVENT_##_e, \
(Ecore_Event_Handler_Cb) _f, \
NULL);
- HANDLER(_G.handler_border_resize, BORDER_RESIZE, _resize_hook);
- HANDLER(_G.handler_border_move, BORDER_MOVE, _move_hook);
- HANDLER(_G.handler_border_add, BORDER_ADD, _add_hook);
- HANDLER(_G.handler_border_remove, BORDER_REMOVE, _remove_hook);
+ HANDLER(_G.handler_client_resize, CLIENT_RESIZE, _resize_hook);
+ HANDLER(_G.handler_client_move, CLIENT_MOVE, _move_hook);
+ HANDLER(_G.handler_client_add, CLIENT_ADD, _add_hook);
+ HANDLER(_G.handler_client_remove, CLIENT_REMOVE, _remove_hook);
- HANDLER(_G.handler_border_iconify, BORDER_ICONIFY, _iconify_hook);
- HANDLER(_G.handler_border_uniconify, BORDER_UNICONIFY, _uniconify_hook);
- HANDLER(_G.handler_border_stick, BORDER_STICK, _stick_hook);
- HANDLER(_G.handler_border_unstick, BORDER_UNSTICK, _unstick_hook);
+ HANDLER(_G.handler_client_iconify, CLIENT_ICONIFY, _iconify_hook);
+ HANDLER(_G.handler_client_uniconify, CLIENT_UNICONIFY, _uniconify_hook);
+ HANDLER(_G.handler_client_stick, CLIENT_STICK, _stick_hook);
+ HANDLER(_G.handler_client_unstick, CLIENT_UNSTICK, _unstick_hook);
HANDLER(_G.handler_desk_show, DESK_SHOW, _desk_show_hook);
HANDLER(_G.handler_desk_before_show, DESK_BEFORE_SHOW, _desk_before_show_hook);
- HANDLER(_G.handler_desk_set, BORDER_DESK_SET, _desk_set_hook);
- HANDLER(_G.handler_container_resize, CONTAINER_RESIZE, _container_resize_hook);
+ HANDLER(_G.handler_desk_set, CLIENT_DESK_SET, _desk_set_hook);
+ HANDLER(_G.handler_compositor_resize, COMPOSITOR_RESIZE, _compositor_resize_hook);
#undef HANDLER
#define ACTION_ADD(_act, _cb, _title, _value, _params, _example, _editable) \
@@ -3924,9 +3847,9 @@ _disable_desk(E_Desk *desk)
for (i = 0; i < TILING_MAX_STACKS; i++) {
for (l = _G.tinfo->stacks[i]; l; l = l->next) {
- E_Border *bd = l->data;
+ E_Client *ec = l->data;
- _restore_border(bd);
+ _restore_client(ec);
}
eina_list_free(_G.tinfo->stacks[i]);
_G.tinfo->stacks[i] = NULL;
@@ -3936,25 +3859,22 @@ _disable_desk(E_Desk *desk)
static void
_disable_all_tiling(void)
{
- Eina_List *l, *ll, *lll;
- E_Manager *man;
- E_Container *con;
+ const Eina_List *l, *ll;
+ E_Comp *comp;
E_Zone *zone;
E_Desk *desk;
int x, y;
- EINA_LIST_FOREACH(e_manager_list(), l, man) {
- EINA_LIST_FOREACH(man->containers, ll, con) {
- EINA_LIST_FOREACH(con->zones, lll, zone) {
- for (x = 0; x < zone->desk_x_count; x++) {
- for (y = 0; y < zone->desk_y_count; y++) {
- desk = zone->desks[x + (y * zone->desk_x_count)];
+ EINA_LIST_FOREACH(e_comp_list(), l, comp) {
+ EINA_LIST_FOREACH(comp->zones, ll, zone) {
+ for (x = 0; x < zone->desk_x_count; x++) {
+ for (y = 0; y < zone->desk_y_count; y++) {
+ desk = zone->desks[x + (y * zone->desk_x_count)];
- _disable_desk(desk);
- }
+ _disable_desk(desk);
}
- e_place_zone_region_smart_cleanup(zone);
}
+ e_place_zone_region_smart_cleanup(zone);
}
}
}
@@ -3969,9 +3889,9 @@ e_modapi_shutdown(E_Module *m __UNUSED__)
tiling_g.log_domain = -1;
}
- if (_G.pre_border_assign_hook) {
- e_border_hook_del(_G.pre_border_assign_hook);
- _G.pre_border_assign_hook = NULL;
+ if (_G.pre_client_assign_hook) {
+ e_client_hook_del(_G.pre_client_assign_hook);
+ _G.pre_client_assign_hook = NULL;
}
#define FREE_HANDLER(x) \
@@ -3979,15 +3899,15 @@ e_modapi_shutdown(E_Module *m __UNUSED__)
ecore_event_handler_del(x); \
x = NULL; \
}
- FREE_HANDLER(_G.handler_border_resize);
- FREE_HANDLER(_G.handler_border_move);
- FREE_HANDLER(_G.handler_border_add);
- FREE_HANDLER(_G.handler_border_remove);
+ FREE_HANDLER(_G.handler_client_resize);
+ FREE_HANDLER(_G.handler_client_move);
+ FREE_HANDLER(_G.handler_client_add);
+ FREE_HANDLER(_G.handler_client_remove);
- FREE_HANDLER(_G.handler_border_iconify);
- FREE_HANDLER(_G.handler_border_uniconify);
- FREE_HANDLER(_G.handler_border_stick);
- FREE_HANDLER(_G.handler_border_unstick);
+ FREE_HANDLER(_G.handler_client_iconify);
+ FREE_HANDLER(_G.handler_client_uniconify);
+ FREE_HANDLER(_G.handler_client_stick);
+ FREE_HANDLER(_G.handler_client_unstick);
FREE_HANDLER(_G.handler_desk_show);
FREE_HANDLER(_G.handler_desk_before_show);
@@ -4038,8 +3958,8 @@ e_modapi_shutdown(E_Module *m __UNUSED__)
eina_hash_free(_G.info_hash);
_G.info_hash = NULL;
- eina_hash_free(_G.border_extras);
- _G.border_extras = NULL;
+ eina_hash_free(_G.client_extras);
+ _G.client_extras = NULL;
_G.tinfo = NULL;
diff --git a/src/modules/tiling/e_mod_tiling.h b/src/modules/tiling/e_mod_tiling.h
index d77c9de694..c7594fd804 100644
--- a/src/modules/tiling/e_mod_tiling.h
+++ b/src/modules/tiling/e_mod_tiling.h
@@ -2,15 +2,11 @@
#define E_MOD_TILING_H
#include <e.h>
-#include <e_border.h>
-#include <e_shelf.h>
#include <stdbool.h>
#include <assert.h>
-#include "config.h"
-
typedef struct _Config Config;
typedef struct _Tiling_Info Tiling_Info;
@@ -72,7 +68,7 @@ struct _E_Config_Dialog_Data
Evas *evas;
};
-E_Config_Dialog *e_int_config_tiling_module(E_Container *con,
+E_Config_Dialog *e_int_config_tiling_module(E_Comp *comp,
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 be1df80fc2..6eb22dba4e 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_Container *con, const char *params __UNUSED__)
+e_int_config_winlist(E_Comp *comp, const char *params __UNUSED__)
{
E_Config_Dialog *cfd;
E_Config_Dialog_View *v;
@@ -50,7 +50,7 @@ e_int_config_winlist(E_Container *con, const char *params __UNUSED__)
v->basic.create_widgets = _basic_create;
v->basic.check_changed = _basic_check_changed;
- cfd = e_config_dialog_new(con, _("Window Switcher Settings"),
+ cfd = e_config_dialog_new(comp, _("Window Switcher Settings"),
"E", "windows/window_list",
"preferences-winlist", 0, v, NULL);
return cfd;
diff --git a/src/modules/winlist/e_mod_main.c b/src/modules/winlist/e_mod_main.c
index 91be226fbb..56252d10ce 100644
--- a/src/modules/winlist/e_mod_main.c
+++ b/src/modules/winlist/e_mod_main.c
@@ -119,10 +119,10 @@ _e_mod_action_winlist_cb_helper(E_Object *obj, const char *params, int modifiers
{
if (obj->type == E_MANAGER_TYPE)
zone = e_util_zone_current_get((E_Manager *)obj);
- else if (obj->type == E_CONTAINER_TYPE)
- zone = e_util_zone_current_get(((E_Container *)obj)->manager);
+ else if (obj->type == E_COMP_TYPE)
+ zone = e_util_zone_current_get(((E_Comp *)obj)->man);
else if (obj->type == E_ZONE_TYPE)
- zone = e_util_zone_current_get(((E_Zone *)obj)->container->manager);
+ zone = e_util_zone_current_get(((E_Zone *)obj)->comp->man);
else
zone = e_util_zone_current_get(e_manager_current_get());
}
diff --git a/src/modules/winlist/e_mod_main.h b/src/modules/winlist/e_mod_main.h
index f5c2592889..1f2bf7d6c7 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_Container *con, const char *params __UNUSED__);
+E_Config_Dialog *e_int_config_winlist(E_Comp *comp, const char *params __UNUSED__);
/**
* @addtogroup Optional_Control
* @{
diff --git a/src/modules/winlist/e_winlist.c b/src/modules/winlist/e_winlist.c
index 67b4f84a45..555cadcad0 100644
--- a/src/modules/winlist/e_winlist.c
+++ b/src/modules/winlist/e_winlist.c
@@ -8,14 +8,14 @@ struct _E_Winlist_Win
{
Evas_Object *bg_object;
Evas_Object *icon_object;
- E_Border *border;
+ E_Client *client;
unsigned char was_iconified : 1;
unsigned char was_shaded : 1;
};
static void _e_winlist_size_adjust(void);
-static void _e_winlist_border_add(E_Border *bd, E_Zone *zone, E_Desk *desk);
-static void _e_winlist_border_del(E_Border *bd);
+static void _e_winlist_client_add(E_Client *ec, E_Zone *zone, E_Desk *desk);
+static void _e_winlist_client_del(E_Client *ec);
static void _e_winlist_activate_nth(int n);
static void _e_winlist_activate(void);
static void _e_winlist_deactivate(void);
@@ -36,7 +36,8 @@ static void _e_winlist_cb_item_mouse_in(void *data, Evas *evas,
#endif
/* local subsystem globals */
-static E_Popup *_winlist = NULL;
+static Evas_Object *_winlist = NULL;
+static E_Zone *_winlist_zone = NULL;
static Evas_Object *_bg_object = NULL;
static Evas_Object *_list_object = NULL;
static Evas_Object *_icon_object = NULL;
@@ -45,7 +46,7 @@ static Eina_List *_win_selected = NULL;
static E_Desk *_last_desk = NULL;
static int _last_pointer_x = 0;
static int _last_pointer_y = 0;
-static E_Border *_last_border = NULL;
+static E_Client *_last_client = NULL;
static int _hold_count = 0;
static int _hold_mod = 0;
static E_Winlist_Activate_Type _activate_type = 0;
@@ -56,7 +57,7 @@ static double _scroll_align_to = 0.0;
static double _scroll_align = 0.0;
static Ecore_Timer *_scroll_timer = NULL;
static Ecore_Animator *_animator = NULL;
-static E_Border *_bd_next = NULL;
+static E_Client *_ec_next = NULL;
static Eina_Bool
_wmclass_picked(const Eina_List *lst, const char *wmclass)
@@ -94,7 +95,7 @@ e_winlist_show(E_Zone *zone, E_Winlist_Filter filter)
Evas_Object *o;
Eina_List *l;
E_Desk *desk;
- E_Border *bd;
+ E_Client *ec;
Eina_List *wmclasses = NULL;
E_OBJECT_CHECK_RETURN(zone, 0);
@@ -102,7 +103,7 @@ e_winlist_show(E_Zone *zone, E_Winlist_Filter filter)
if (_winlist) return 0;
- _input_window = ecore_x_window_input_new(zone->container->win, 0, 0, 1, 1);
+ _input_window = ecore_x_window_input_new(zone->comp->win, 0, 0, 1, 1);
ecore_x_window_show(_input_window);
if (!e_grabinput_get(_input_window, 0, _input_window))
{
@@ -116,72 +117,68 @@ e_winlist_show(E_Zone *zone, E_Winlist_Filter filter)
else if (w < e_config->winlist_pos_min_w)
w = e_config->winlist_pos_min_w;
if (w > zone->w) w = zone->w;
- x = (double)(zone->w - w) * e_config->winlist_pos_align_x;
+ x = zone->x + (double)(zone->w - w) * e_config->winlist_pos_align_x;
h = (double)zone->h * e_config->winlist_pos_size_h;
if (h > e_config->winlist_pos_max_h) h = e_config->winlist_pos_max_h;
else if (h < e_config->winlist_pos_min_h)
h = e_config->winlist_pos_min_h;
if (h > zone->h) h = zone->h;
- y = (double)(zone->h - h) * e_config->winlist_pos_align_y;
+ y = zone->y + (double)(zone->h - h) * e_config->winlist_pos_align_y;
- _winlist = e_popup_new(zone, x, y, w, h);
- if (!_winlist)
- {
- ecore_x_window_free(_input_window);
- e_grabinput_release(_input_window, _input_window);
- _input_window = 0;
- return 0;
- }
- e_border_move_cancel();
- e_border_resize_cancel();
- e_border_focus_track_freeze();
+ _winlist_zone = zone;
+ e_client_move_cancel();
+ e_client_resize_cancel();
+ e_client_focus_track_freeze();
- evas_event_feed_mouse_in(_winlist->evas, ecore_x_current_time_get(), NULL);
- evas_event_feed_mouse_move(_winlist->evas, -1000000, -1000000,
+ evas_event_feed_mouse_in(zone->comp->evas, ecore_x_current_time_get(), NULL);
+ evas_event_feed_mouse_move(zone->comp->evas, -1000000, -1000000,
ecore_x_current_time_get(), NULL);
- evas_event_freeze(_winlist->evas);
- o = edje_object_add(_winlist->evas);
+ evas_event_freeze(zone->comp->evas);
+ o = edje_object_add(zone->comp->evas);
+ _winlist = e_comp_object_util_add(o, E_COMP_OBJECT_TYPE_POPUP);
+ evas_object_layer_set(_winlist, E_LAYER_CLIENT_POPUP);
+ evas_object_move(_winlist, x, y);
_bg_object = o;
e_theme_edje_object_set(o, "base/theme/winlist",
"e/widgets/winlist/main");
- o = e_box_add(_winlist->evas);
+ o = e_box_add(zone->comp->evas);
_list_object = o;
e_box_align_set(o, 0.5, 0.0);
e_box_orientation_set(o, 0);
e_box_homogenous_set(o, 1);
- e_popup_object_add(_winlist, o);
+ e_comp_object_util_del_list_append(_winlist, o);
edje_object_part_swallow(_bg_object, "e.swallow.list", o);
edje_object_part_text_set(_bg_object, "e.text.title", _("Select a window"));
evas_object_show(o);
- _last_border = e_border_focused_get();
+ _last_client = e_client_focused_get();
- desk = e_desk_current_get(_winlist->zone);
+ desk = e_desk_current_get(_winlist_zone);
e_box_freeze(_list_object);
- EINA_LIST_FOREACH(e_border_focus_stack_get(), l, bd)
+ EINA_LIST_FOREACH(e_client_focus_stack_get(), l, ec)
{
Eina_Bool pick;
switch (filter)
{
case E_WINLIST_FILTER_CLASS_WINDOWS:
- if (!_last_border)
+ if (!_last_client)
pick = EINA_FALSE;
else
- pick = _last_border->client.icccm.class == bd->client.icccm.class;
+ pick = _last_client->icccm.class == ec->icccm.class;
break;
case E_WINLIST_FILTER_CLASSES:
- pick = (!_wmclass_picked(wmclasses, bd->client.icccm.class));
+ pick = (!_wmclass_picked(wmclasses, ec->icccm.class));
if (pick)
- wmclasses = eina_list_append(wmclasses, bd->client.icccm.class);
+ wmclasses = eina_list_append(wmclasses, ec->icccm.class);
break;
default:
pick = EINA_TRUE;
}
- if (pick) _e_winlist_border_add(bd, _winlist->zone, desk);
+ if (pick) _e_winlist_client_add(ec, _winlist_zone, desk);
}
e_box_thaw(_list_object);
eina_list_free(wmclasses);
@@ -194,9 +191,9 @@ e_winlist_show(E_Zone *zone, E_Winlist_Filter filter)
if (e_config->winlist_list_show_other_desk_windows ||
e_config->winlist_list_show_other_screen_windows)
- _last_desk = e_desk_current_get(_winlist->zone);
+ _last_desk = e_desk_current_get(_winlist_zone);
if (e_config->winlist_warp_while_selecting)
- ecore_x_pointer_xy_get(_winlist->zone->container->win,
+ ecore_evas_pointer_xy_get(_winlist_zone->comp->ee,
&_last_pointer_x, &_last_pointer_y);
_e_winlist_activate_nth(1);
@@ -206,14 +203,14 @@ e_winlist_show(E_Zone *zone, E_Winlist_Filter filter)
E_Winlist_Win *ww;
ww = eina_list_data_get(_win_selected);
- if (ww && (ww->border == _last_border))
+ if (ww && (ww->client == _last_client))
e_winlist_next();
}
- evas_event_thaw(_winlist->evas);
+ evas_event_thaw(zone->comp->evas);
_e_winlist_size_adjust();
- E_LIST_HANDLER_APPEND(_handlers, E_EVENT_BORDER_ADD, _e_winlist_cb_event_border_add, NULL);
- E_LIST_HANDLER_APPEND(_handlers, E_EVENT_BORDER_REMOVE, _e_winlist_cb_event_border_remove, NULL);
+ E_LIST_HANDLER_APPEND(_handlers, E_EVENT_CLIENT_ADD, _e_winlist_cb_event_border_add, NULL);
+ E_LIST_HANDLER_APPEND(_handlers, E_EVENT_CLIENT_REMOVE, _e_winlist_cb_event_border_remove, NULL);
E_LIST_HANDLER_APPEND(_handlers, ECORE_EVENT_KEY_DOWN, _e_winlist_cb_key_down, NULL);
E_LIST_HANDLER_APPEND(_handlers, ECORE_EVENT_KEY_UP, _e_winlist_cb_key_up, NULL);
E_LIST_HANDLER_APPEND(_handlers, ECORE_EVENT_MOUSE_BUTTON_DOWN, _e_winlist_cb_mouse_down, NULL);
@@ -221,36 +218,36 @@ e_winlist_show(E_Zone *zone, E_Winlist_Filter filter)
E_LIST_HANDLER_APPEND(_handlers, ECORE_EVENT_MOUSE_WHEEL, _e_winlist_cb_mouse_wheel, NULL);
E_LIST_HANDLER_APPEND(_handlers, ECORE_EVENT_MOUSE_MOVE, _e_winlist_cb_mouse_move, NULL);
- e_popup_content_set(_winlist, _bg_object);
- e_popup_show(_winlist);
+ evas_object_show(_winlist);
return 1;
}
void
e_winlist_hide(void)
{
- E_Border *bd = NULL;
+ E_Client *ec = NULL;
E_Winlist_Win *ww;
if (!_winlist) return;
if (_win_selected)
{
ww = _win_selected->data;
- bd = ww->border;
+ ec = ww->client;
}
- e_popup_hide(_winlist);
+ evas_object_hide(_winlist);
EINA_LIST_FREE(_wins, ww)
{
- if ((!bd) || (ww->border != bd))
- e_object_unref(E_OBJECT(ww->border));
+ if ((!ec) || (ww->client != ec))
+ e_object_unref(E_OBJECT(ww->client));
free(ww);
}
_win_selected = NULL;
_icon_object = NULL;
-
- e_object_del(E_OBJECT(_winlist));
- e_border_focus_track_thaw();
+
+ evas_object_del(_winlist);
+ e_client_focus_track_thaw();
_winlist = NULL;
+ _winlist_zone = NULL;
_hold_count = 0;
_hold_mod = 0;
_activate_type = 0;
@@ -263,45 +260,42 @@ e_winlist_hide(void)
e_grabinput_release(_input_window, _input_window);
ecore_x_window_free(_input_window);
_input_window = 0;
- if (bd)
+ if (ec)
{
- if (bd->shaded)
+ if (ec->shaded)
{
- if (!bd->lock_user_shade)
- e_border_unshade(bd, bd->shade.dir);
+ if (!ec->lock_user_shade)
+ e_client_unshade(ec, ec->shade_dir);
}
if (e_config->winlist_list_move_after_select)
{
- e_border_zone_set(bd, e_zone_current_get(e_util_container_current_get()));
- e_border_desk_set(bd, e_desk_current_get(bd->zone));
+ e_client_zone_set(ec, e_zone_current_get(e_util_comp_current_get()));
+ e_client_desk_set(ec, e_desk_current_get(ec->zone));
}
- else if (bd->desk)
+ else if (ec->desk)
{
- if (!bd->sticky) e_desk_show(bd->desk);
+ if (!ec->sticky) e_desk_show(ec->desk);
}
- if (!bd->lock_user_stacking)
- e_border_raise(bd);
+ if (!ec->lock_user_stacking)
+ evas_object_raise(ec->frame);
if ((e_config->focus_policy != E_FOCUS_CLICK) ||
(e_config->winlist_warp_at_end) ||
(e_config->winlist_warp_while_selecting))
{
- if (!e_border_pointer_warp_to_center_now(bd))
- e_border_focus_set(bd, 1, 0);
+ e_client_pointer_warp_to_center_now(ec);
}
- else if (!bd->lock_focus_out)
+ else if (!ec->lock_focus_out)
{
- if (bd->iconic)
- e_border_uniconify(bd);
- if (bd->shaded)
- e_border_unshade(bd, bd->shade.dir);
- e_border_focus_set(bd, 1, 1);
- e_border_focus_latest_set(bd);
+ if (ec->iconic)
+ e_client_uniconify(ec);
+ if (ec->shaded)
+ e_client_unshade(ec, ec->shade_dir);
+ evas_object_focus_set(ec->frame, 1);
+ e_client_focus_latest_set(ec);
}
- e_object_unref(E_OBJECT(bd));
+ e_object_unref(E_OBJECT(ec));
}
-
- e_border_idler_before();
}
void
@@ -355,58 +349,58 @@ e_winlist_prev(void)
void
e_winlist_left(E_Zone *zone)
{
- E_Border *bd;
+ E_Client *ec;
Eina_List *l;
E_Desk *desk;
- E_Border *bd_orig;
+ E_Client *ec_orig;
int delta = INT_MAX;
int delta2 = INT_MAX;
int center;
- _bd_next = NULL;
+ _ec_next = NULL;
E_OBJECT_CHECK_RETURN(zone, 0);
E_OBJECT_TYPE_CHECK_RETURN(zone, E_ZONE_TYPE, 0);
- bd_orig = e_border_focused_get();
- if (!bd_orig) return;
+ ec_orig = e_client_focused_get();
+ if (!ec_orig) return;
- center = bd_orig->x + bd_orig->w / 2;
+ center = ec_orig->x + ec_orig->w / 2;
desk = e_desk_current_get(zone);
- EINA_LIST_FOREACH(e_border_focus_stack_get(), l, bd)
+ EINA_LIST_FOREACH(e_client_focus_stack_get(), l, ec)
{
int center_next;
int delta_next;
int delta2_next;
- if (bd == bd_orig) continue;
- if ((!bd->client.icccm.accepts_focus) &&
- (!bd->client.icccm.take_focus)) continue;
- if (bd->client.netwm.state.skip_taskbar) continue;
- if (bd->user_skip_winlist) continue;
- if (bd->iconic)
+ if (ec == ec_orig) continue;
+ if ((!ec->icccm.accepts_focus) &&
+ (!ec->icccm.take_focus)) continue;
+ if (ec->netwm.state.skip_taskbar) continue;
+ if (ec->user_skip_winlist) continue;
+ if (ec->iconic)
{
if (!e_config->winlist_list_show_iconified) continue;
- if ((bd->zone != zone) &&
+ if ((ec->zone != zone) &&
(!e_config->winlist_list_show_other_screen_iconified))
continue;
- if ((bd->desk != desk) &&
+ if ((ec->desk != desk) &&
(!e_config->winlist_list_show_other_desk_iconified)) continue;
}
else
{
- if (bd->sticky)
+ if (ec->sticky)
{
- if ((bd->zone != zone) &&
+ if ((ec->zone != zone) &&
(!e_config->winlist_list_show_other_screen_windows))
continue;
}
else
{
- if (bd->desk != desk)
+ if (ec->desk != desk)
{
- if ((bd->zone) && (bd->zone != zone))
+ if ((ec->zone) && (ec->zone != zone))
{
if (!e_config->winlist_list_show_other_screen_windows)
continue;
@@ -416,101 +410,98 @@ e_winlist_left(E_Zone *zone)
}
}
}
- /* bd is suitable */
- center_next = bd->x + bd->w / 2;
+ /* ec is suitable */
+ center_next = ec->x + ec->w / 2;
if (center_next >= center) continue;
- delta_next = bd_orig->x - (bd->x + bd->w);
+ delta_next = ec_orig->x - (ec->x + ec->w);
if (delta_next < 0) delta_next = center - center_next;
- delta2_next = abs(bd_orig->y - bd_orig->h / 2 - bd->y + bd->h/2);
+ delta2_next = abs(ec_orig->y - ec_orig->h / 2 - ec->y + ec->h/2);
if (delta_next >= 0 && delta_next <= delta &&
delta2_next >= 0 && delta2_next <= delta2)
{
- _bd_next = bd;
+ _ec_next = ec;
delta = delta_next;
delta2 = delta2_next;
}
}
- if (_bd_next)
+ if (_ec_next)
{
- if (!bd_orig->lock_focus_out)
- e_border_focus_set(bd_orig, 0, 0);
-
if ((!e_config->winlist_no_warp_on_direction) &&
((e_config->focus_policy != E_FOCUS_CLICK) ||
(e_config->winlist_warp_at_end) ||
(e_config->winlist_warp_while_selecting)))
{
- if (!e_border_pointer_warp_to_center(_bd_next))
- e_border_focus_set(_bd_next, 1, 1);
+ if (!e_client_pointer_warp_to_center(_ec_next))
+ evas_object_focus_set(_ec_next->frame, 1);
if (!_animator)
_animator = ecore_animator_add(_e_winlist_animator, NULL);
}
- if ((!_bd_next->lock_user_stacking) &&
+ if ((!_ec_next->lock_user_stacking) &&
(e_config->winlist_list_raise_while_selecting))
- e_border_raise(_bd_next);
- if ((!_bd_next->lock_focus_out) &&
+ evas_object_raise(_ec_next->frame);
+ if ((!_ec_next->lock_focus_out) &&
(e_config->winlist_list_focus_while_selecting))
- e_border_focus_set(_bd_next, 1, 1);
+ evas_object_focus_set(_ec_next->frame, 1);
}
}
void
e_winlist_down(E_Zone *zone)
{
- E_Border *bd;
+ E_Client *ec;
Eina_List *l;
E_Desk *desk;
- E_Border *bd_orig;
+ E_Client *ec_orig;
int delta = INT_MAX;
int delta2 = INT_MAX;
int center;
- _bd_next = NULL;
+ _ec_next = NULL;
E_OBJECT_CHECK_RETURN(zone, 0);
E_OBJECT_TYPE_CHECK_RETURN(zone, E_ZONE_TYPE, 0);
- bd_orig = e_border_focused_get();
- if (!bd_orig) return;
+ ec_orig = e_client_focused_get();
+ if (!ec_orig) return;
- center = bd_orig->y + bd_orig->h / 2;
+ center = ec_orig->y + ec_orig->h / 2;
desk = e_desk_current_get(zone);
- EINA_LIST_FOREACH(e_border_focus_stack_get(), l, bd)
+ EINA_LIST_FOREACH(e_client_focus_stack_get(), l, ec)
{
int center_next;
int delta_next;
int delta2_next;
- if (bd == bd_orig) continue;
- if ((!bd->client.icccm.accepts_focus) &&
- (!bd->client.icccm.take_focus)) continue;
- if (bd->client.netwm.state.skip_taskbar) continue;
- if (bd->user_skip_winlist) continue;
- if (bd->iconic)
+ if (ec == ec_orig) continue;
+ if ((!ec->icccm.accepts_focus) &&
+ (!ec->icccm.take_focus)) continue;
+ if (ec->netwm.state.skip_taskbar) continue;
+ if (ec->user_skip_winlist) continue;
+ if (ec->iconic)
{
if (!e_config->winlist_list_show_iconified) continue;
- if ((bd->zone != zone) &&
+ if ((ec->zone != zone) &&
(!e_config->winlist_list_show_other_screen_iconified))
continue;
- if ((bd->desk != desk) &&
+ if ((ec->desk != desk) &&
(!e_config->winlist_list_show_other_desk_iconified)) continue;
}
else
{
- if (bd->sticky)
+ if (ec->sticky)
{
- if ((bd->zone != zone) &&
+ if ((ec->zone != zone) &&
(!e_config->winlist_list_show_other_screen_windows))
continue;
}
else
{
- if (bd->desk != desk)
+ if (ec->desk != desk)
{
- if ((bd->zone) && (bd->zone != zone))
+ if ((ec->zone) && (ec->zone != zone))
{
if (!e_config->winlist_list_show_other_screen_windows)
continue;
@@ -520,101 +511,98 @@ e_winlist_down(E_Zone *zone)
}
}
}
- /* bd is suitable */
- center_next = bd->y + bd->h / 2;
+ /* ec is suitable */
+ center_next = ec->y + ec->h / 2;
if (center_next <= center) continue;
- delta_next = bd->y - (bd_orig->y + bd_orig->h);
+ delta_next = ec->y - (ec_orig->y + ec_orig->h);
if (delta_next < 0) delta_next = center - center_next;
- delta2_next = abs(bd_orig->x - bd_orig->w / 2 - bd->x + bd->w/2);
+ delta2_next = abs(ec_orig->x - ec_orig->w / 2 - ec->x + ec->w/2);
if (delta_next >= 0 && delta_next <= delta &&
delta2_next >= 0 && delta2_next <= delta2)
{
- _bd_next = bd;
+ _ec_next = ec;
delta = delta_next;
delta2 = delta2_next;
}
}
- if (_bd_next)
+ if (_ec_next)
{
- if (!bd_orig->lock_focus_out)
- e_border_focus_set(bd_orig, 0, 0);
-
if ((!e_config->winlist_no_warp_on_direction) &&
((e_config->focus_policy != E_FOCUS_CLICK) ||
(e_config->winlist_warp_at_end) ||
(e_config->winlist_warp_while_selecting)))
{
- if (!e_border_pointer_warp_to_center(_bd_next))
- e_border_focus_set(_bd_next, 1, 1);
+ if (!e_client_pointer_warp_to_center(_ec_next))
+ evas_object_focus_set(_ec_next->frame, 1);
if (!_animator)
_animator = ecore_animator_add(_e_winlist_animator, NULL);
}
- if ((!_bd_next->lock_user_stacking) &&
+ if ((!_ec_next->lock_user_stacking) &&
(e_config->winlist_list_raise_while_selecting))
- e_border_raise(_bd_next);
- if ((!_bd_next->lock_focus_out) &&
+ evas_object_raise(_ec_next->frame);
+ if ((!_ec_next->lock_focus_out) &&
(e_config->winlist_list_focus_while_selecting))
- e_border_focus_set(_bd_next, 1, 1);
+ evas_object_focus_set(_ec_next->frame, 1);
}
}
void
e_winlist_up(E_Zone *zone)
{
- E_Border *bd;
+ E_Client *ec;
Eina_List *l;
E_Desk *desk;
- E_Border *bd_orig;
+ E_Client *ec_orig;
int delta = INT_MAX;
int delta2 = INT_MAX;
int center;
- _bd_next = NULL;
+ _ec_next = NULL;
E_OBJECT_CHECK_RETURN(zone, 0);
E_OBJECT_TYPE_CHECK_RETURN(zone, E_ZONE_TYPE, 0);
- bd_orig = e_border_focused_get();
- if (!bd_orig) return;
+ ec_orig = e_client_focused_get();
+ if (!ec_orig) return;
- center = bd_orig->y + bd_orig->h / 2;
+ center = ec_orig->y + ec_orig->h / 2;
desk = e_desk_current_get(zone);
- EINA_LIST_FOREACH(e_border_focus_stack_get(), l, bd)
+ EINA_LIST_FOREACH(e_client_focus_stack_get(), l, ec)
{
int center_next;
int delta_next;
int delta2_next;
- if (bd == bd_orig) continue;
- if ((!bd->client.icccm.accepts_focus) &&
- (!bd->client.icccm.take_focus)) continue;
- if (bd->client.netwm.state.skip_taskbar) continue;
- if (bd->user_skip_winlist) continue;
- if (bd->iconic)
+ if (ec == ec_orig) continue;
+ if ((!ec->icccm.accepts_focus) &&
+ (!ec->icccm.take_focus)) continue;
+ if (ec->netwm.state.skip_taskbar) continue;
+ if (ec->user_skip_winlist) continue;
+ if (ec->iconic)
{
if (!e_config->winlist_list_show_iconified) continue;
- if ((bd->zone != zone) &&
+ if ((ec->zone != zone) &&
(!e_config->winlist_list_show_other_screen_iconified))
continue;
- if ((bd->desk != desk) &&
+ if ((ec->desk != desk) &&
(!e_config->winlist_list_show_other_desk_iconified)) continue;
}
else
{
- if (bd->sticky)
+ if (ec->sticky)
{
- if ((bd->zone != zone) &&
+ if ((ec->zone != zone) &&
(!e_config->winlist_list_show_other_screen_windows))
continue;
}
else
{
- if (bd->desk != desk)
+ if (ec->desk != desk)
{
- if ((bd->zone) && (bd->zone != zone))
+ if ((ec->zone) && (ec->zone != zone))
{
if (!e_config->winlist_list_show_other_screen_windows)
continue;
@@ -624,101 +612,98 @@ e_winlist_up(E_Zone *zone)
}
}
}
- /* bd is suitable */
- center_next = bd->y + bd->h / 2;
+ /* ec is suitable */
+ center_next = ec->y + ec->h / 2;
if (center_next >= center) continue;
- delta_next = bd_orig->y - (bd->y + bd->h);
+ delta_next = ec_orig->y - (ec->y + ec->h);
if (delta_next < 0) delta_next = center - center_next;
- delta2_next = abs(bd_orig->x - bd_orig->w / 2 - bd->x + bd->w/2);
+ delta2_next = abs(ec_orig->x - ec_orig->w / 2 - ec->x + ec->w/2);
if (delta_next >= 0 && delta_next <= delta &&
delta2_next >= 0 && delta2_next <= delta2)
{
- _bd_next = bd;
+ _ec_next = ec;
delta = delta_next;
delta2 = delta2_next;
}
}
- if (_bd_next)
+ if (_ec_next)
{
- if (!bd_orig->lock_focus_out)
- e_border_focus_set(bd_orig, 0, 0);
-
if ((!e_config->winlist_no_warp_on_direction) &&
((e_config->focus_policy != E_FOCUS_CLICK) ||
(e_config->winlist_warp_at_end) ||
(e_config->winlist_warp_while_selecting)))
{
- if (!e_border_pointer_warp_to_center(_bd_next))
- e_border_focus_set(_bd_next, 1, 1);
+ if (!e_client_pointer_warp_to_center(_ec_next))
+ evas_object_focus_set(_ec_next->frame, 1);
if (!_animator)
_animator = ecore_animator_add(_e_winlist_animator, NULL);
}
- if ((!_bd_next->lock_user_stacking) &&
+ if ((!_ec_next->lock_user_stacking) &&
(e_config->winlist_list_raise_while_selecting))
- e_border_raise(_bd_next);
- if ((!_bd_next->lock_focus_out) &&
+ evas_object_raise(_ec_next->frame);
+ if ((!_ec_next->lock_focus_out) &&
(e_config->winlist_list_focus_while_selecting))
- e_border_focus_set(_bd_next, 1, 1);
+ evas_object_focus_set(_ec_next->frame, 1);
}
}
void
e_winlist_right(E_Zone *zone)
{
- E_Border *bd;
+ E_Client *ec;
Eina_List *l;
E_Desk *desk;
- E_Border *bd_orig;
+ E_Client *ec_orig;
int delta = INT_MAX;
int delta2 = INT_MAX;
int center;
- _bd_next = NULL;
+ _ec_next = NULL;
E_OBJECT_CHECK_RETURN(zone, 0);
E_OBJECT_TYPE_CHECK_RETURN(zone, E_ZONE_TYPE, 0);
- bd_orig = e_border_focused_get();
- if (!bd_orig) return;
+ ec_orig = e_client_focused_get();
+ if (!ec_orig) return;
- center = bd_orig->x + bd_orig->w / 2;
+ center = ec_orig->x + ec_orig->w / 2;
desk = e_desk_current_get(zone);
- EINA_LIST_FOREACH(e_border_focus_stack_get(), l, bd)
+ EINA_LIST_FOREACH(e_client_focus_stack_get(), l, ec)
{
int center_next;
int delta_next;
int delta2_next;
- if (bd == bd_orig) continue;
- if ((!bd->client.icccm.accepts_focus) &&
- (!bd->client.icccm.take_focus)) continue;
- if (bd->client.netwm.state.skip_taskbar) continue;
- if (bd->user_skip_winlist) continue;
- if (bd->iconic)
+ if (ec == ec_orig) continue;
+ if ((!ec->icccm.accepts_focus) &&
+ (!ec->icccm.take_focus)) continue;
+ if (ec->netwm.state.skip_taskbar) continue;
+ if (ec->user_skip_winlist) continue;
+ if (ec->iconic)
{
if (!e_config->winlist_list_show_iconified) continue;
- if ((bd->zone != zone) &&
+ if ((ec->zone != zone) &&
(!e_config->winlist_list_show_other_screen_iconified))
continue;
- if ((bd->desk != desk) &&
+ if ((ec->desk != desk) &&
(!e_config->winlist_list_show_other_desk_iconified)) continue;
}
else
{
- if (bd->sticky)
+ if (ec->sticky)
{
- if ((bd->zone != zone) &&
+ if ((ec->zone != zone) &&
(!e_config->winlist_list_show_other_screen_windows))
continue;
}
else
{
- if (bd->desk != desk)
+ if (ec->desk != desk)
{
- if ((bd->zone) && (bd->zone != zone))
+ if ((ec->zone) && (ec->zone != zone))
{
if (!e_config->winlist_list_show_other_screen_windows)
continue;
@@ -728,43 +713,40 @@ e_winlist_right(E_Zone *zone)
}
}
}
- /* bd is suitable */
- center_next = bd->x + bd->w / 2;
+ /* ec is suitable */
+ center_next = ec->x + ec->w / 2;
if (center_next <= center) continue;
- delta_next = bd->x - (bd_orig->x + bd_orig->w);
+ delta_next = ec->x - (ec_orig->x + ec_orig->w);
if (delta_next < 0) delta = center_next - center;
- delta2_next = abs(bd_orig->y - bd_orig->h / 2 - bd->y + bd->h/2);
+ delta2_next = abs(ec_orig->y - ec_orig->h / 2 - ec->y + ec->h/2);
if (delta_next >= 0 && delta_next <= delta &&
delta2_next >= 0 && delta2_next <= delta2)
{
- _bd_next = bd;
+ _ec_next = ec;
delta = delta_next;
delta2 = delta2_next;
}
}
- if (_bd_next)
+ if (_ec_next)
{
- if (!bd_orig->lock_focus_out)
- e_border_focus_set(bd_orig, 0, 0);
-
if ((!e_config->winlist_no_warp_on_direction) &&
((e_config->focus_policy != E_FOCUS_CLICK) ||
(e_config->winlist_warp_at_end) ||
(e_config->winlist_warp_while_selecting)))
{
- if (!e_border_pointer_warp_to_center(_bd_next))
- e_border_focus_set(_bd_next, 1, 1);
+ if (!e_client_pointer_warp_to_center(_ec_next))
+ evas_object_focus_set(_ec_next->frame, 1);
if (!_animator)
_animator = ecore_animator_add(_e_winlist_animator, NULL);
}
- if ((!_bd_next->lock_user_stacking) &&
+ if ((!_ec_next->lock_user_stacking) &&
(e_config->winlist_list_raise_while_selecting))
- e_border_raise(_bd_next);
- if ((!_bd_next->lock_focus_out) &&
+ evas_object_raise(_ec_next->frame);
+ if ((!_ec_next->lock_focus_out) &&
(e_config->winlist_list_focus_while_selecting))
- e_border_focus_set(_bd_next, 1, 1);
+ evas_object_focus_set(_ec_next->frame, 1);
}
}
@@ -799,60 +781,60 @@ _e_winlist_size_adjust(void)
edje_object_part_swallow(_bg_object, "e.swallow.list", _list_object);
e_box_thaw(_list_object);
- zone = _winlist->zone;
+ zone = _winlist_zone;
w = (double)zone->w * e_config->winlist_pos_size_w;
if (w < mw) w = mw;
if (w > e_config->winlist_pos_max_w) w = e_config->winlist_pos_max_w;
else if (w < e_config->winlist_pos_min_w)
w = e_config->winlist_pos_min_w;
if (w > zone->w) w = zone->w;
- x = (double)(zone->w - w) * e_config->winlist_pos_align_x;
+ x = zone->x + (double)(zone->w - w) * e_config->winlist_pos_align_x;
h = mh;
if (h > e_config->winlist_pos_max_h) h = e_config->winlist_pos_max_h;
else if (h < e_config->winlist_pos_min_h)
h = e_config->winlist_pos_min_h;
if (h > zone->h) h = zone->h;
- y = (double)(zone->h - h) * e_config->winlist_pos_align_y;
+ y = zone->y + (double)(zone->h - h) * e_config->winlist_pos_align_y;
- e_popup_move_resize(_winlist, x, y, w, h);
+ evas_object_geometry_set(_winlist, x, y, w, h);
}
static void
-_e_winlist_border_add(E_Border *bd, E_Zone *zone, E_Desk *desk)
+_e_winlist_client_add(E_Client *ec, E_Zone *zone, E_Desk *desk)
{
E_Winlist_Win *ww;
Evas_Coord mw, mh;
Evas_Object *o;
- if ((!bd->client.icccm.accepts_focus) &&
- (!bd->client.icccm.take_focus)) return;
- if (bd->client.netwm.state.skip_taskbar) return;
- if (bd->user_skip_winlist) return;
- if (bd->iconic)
+ if ((!ec->icccm.accepts_focus) &&
+ (!ec->icccm.take_focus)) return;
+ if (ec->netwm.state.skip_taskbar) return;
+ if (ec->user_skip_winlist) return;
+ if (ec->iconic)
{
if (!e_config->winlist_list_show_iconified) return;
- if ((bd->zone != zone) &&
+ if ((ec->zone != zone) &&
(!e_config->winlist_list_show_other_screen_iconified)) return;
- if ((bd->desk != desk) &&
+ if ((ec->desk != desk) &&
(!e_config->winlist_list_show_other_desk_iconified)) return;
}
else
{
- if (bd->sticky)
+ if (ec->sticky)
{
- if ((bd->zone != zone) &&
+ if ((ec->zone != zone) &&
(!e_config->winlist_list_show_other_screen_windows)) return;
}
else
{
- if (bd->desk != desk)
+ if (ec->desk != desk)
{
- if ((bd->zone) && (bd->zone != zone))
+ if ((ec->zone) && (ec->zone != zone))
{
if (!e_config->winlist_list_show_other_screen_windows)
return;
- if (bd->zone && bd->desk && (bd->desk != e_desk_current_get(bd->zone)))
+ if (ec->zone && ec->desk && (ec->desk != e_desk_current_get(ec->zone)))
{
if (!e_config->winlist_list_show_other_desk_windows)
return;
@@ -866,30 +848,30 @@ _e_winlist_border_add(E_Border *bd, E_Zone *zone, E_Desk *desk)
ww = E_NEW(E_Winlist_Win, 1);
if (!ww) return;
- ww->border = bd;
+ ww->client = ec;
_wins = eina_list_append(_wins, ww);
- o = edje_object_add(_winlist->evas);
- e_popup_object_add(_winlist, o);
+ o = edje_object_add(ec->comp->evas);
+ e_comp_object_util_del_list_append(_winlist, o);
ww->bg_object = o;
e_theme_edje_object_set(o, "base/theme/winlist",
"e/widgets/winlist/item");
- edje_object_part_text_set(o, "e.text.label", e_border_name_get(ww->border));
+ edje_object_part_text_set(o, "e.text.label", e_client_name_get(ww->client));
evas_object_show(o);
if (edje_object_part_exists(ww->bg_object, "e.swallow.icon"))
{
- o = e_border_icon_add(bd, _winlist->evas);
+ o = e_client_icon_add(ec, ec->comp->evas);
ww->icon_object = o;
- e_popup_object_add(_winlist, o);
+ e_comp_object_util_del_list_append(_winlist, o);
edje_object_part_swallow(ww->bg_object, "e.swallow.icon", o);
evas_object_show(o);
}
- if (bd->shaded)
+ if (ec->shaded)
edje_object_signal_emit(ww->bg_object, "e,state,shaded", "e");
- else if (bd->iconic)
+ else if (ec->iconic)
edje_object_signal_emit(ww->bg_object, "e,state,iconified", "e");
- else if (bd->desk != desk)
+ else if (ec->desk != desk)
{
- if (!((bd->sticky) && (bd->zone == zone)))
+ if (!((ec->sticky) && (ec->zone == zone)))
edje_object_signal_emit(ww->bg_object, "e,state,invisible", "e");
}
@@ -902,21 +884,21 @@ _e_winlist_border_add(E_Border *bd, E_Zone *zone, E_Desk *desk)
mw, mh, /* min */
9999, mh /* max */
);
- e_object_ref(E_OBJECT(ww->border));
+ e_object_ref(E_OBJECT(ww->client));
}
static void
-_e_winlist_border_del(E_Border *bd)
+_e_winlist_client_del(E_Client *ec)
{
E_Winlist_Win *ww;
Eina_List *l;
- if (bd == _last_border) _last_border = NULL;
+ if (ec == _last_client) _last_client = NULL;
EINA_LIST_FOREACH(_wins, l, ww)
{
- if (ww->border == bd)
+ if (ww->client == ec)
{
- e_object_unref(E_OBJECT(ww->border));
+ e_object_unref(E_OBJECT(ww->client));
if (l == _win_selected)
{
_win_selected = l->next;
@@ -924,11 +906,11 @@ _e_winlist_border_del(E_Border *bd)
_e_winlist_show_active();
_e_winlist_activate();
}
- e_popup_object_remove(_winlist, ww->bg_object);
+ e_comp_object_util_del_list_remove(_winlist, ww->bg_object);
evas_object_del(ww->bg_object);
if (ww->icon_object)
{
- e_popup_object_remove(_winlist, ww->icon_object);
+ e_comp_object_util_del_list_remove(_winlist, ww->icon_object);
evas_object_del(ww->icon_object);
}
E_FREE(ww);
@@ -969,45 +951,42 @@ _e_winlist_activate(void)
edje_object_signal_emit(ww->icon_object,
"e,state,selected", "e");
- if ((ww->border->iconic) &&
+ if ((ww->client->iconic) &&
(e_config->winlist_list_uncover_while_selecting))
{
- if (!ww->border->lock_user_iconify)
- e_border_uniconify(ww->border);
+ if (!ww->client->lock_user_iconify)
+ e_client_uniconify(ww->client);
ww->was_iconified = 1;
ok = 1;
}
- if ((!ww->border->sticky) &&
- (ww->border->desk != e_desk_current_get(_winlist->zone)) &&
+ if ((!ww->client->sticky) &&
+ (ww->client->desk != e_desk_current_get(_winlist_zone)) &&
(e_config->winlist_list_jump_desk_while_selecting))
{
- if (ww->border->desk) e_desk_show(ww->border->desk);
+ if (ww->client->desk) e_desk_show(ww->client->desk);
ok = 1;
}
- if (((ww->border->shaded) ||
- ((ww->border->changes.shaded) &&
- (ww->border->shade.val != ww->border->shaded) &&
- (ww->border->shade.val))) &&
- (ww->border->desk == e_desk_current_get(_winlist->zone)) &&
+ if ((ww->client->shaded || ww->client->shading) &&
+ (ww->client->desk == e_desk_current_get(_winlist_zone)) &&
(e_config->winlist_list_uncover_while_selecting))
{
- if (!ww->border->lock_user_shade)
- e_border_unshade(ww->border, ww->border->shade.dir);
+ if (!ww->client->lock_user_shade)
+ e_client_unshade(ww->client, ww->client->shade_dir);
ww->was_shaded = 1;
ok = 1;
}
- if ((!ww->border->iconic) &&
- ((ww->border->desk == e_desk_current_get(_winlist->zone)) ||
- (ww->border->sticky)))
+ if ((!ww->client->iconic) &&
+ ((ww->client->desk == e_desk_current_get(_winlist_zone)) ||
+ (ww->client->sticky)))
ok = 1;
if (ok)
{
int set = 1;
if (e_config->winlist_warp_while_selecting)
{
- if (!e_border_pointer_warp_to_center_now(ww->border))
+ if (!e_client_pointer_warp_to_center_now(ww->client))
{
- e_border_focus_set(ww->border, 1, 1);
+ evas_object_focus_set(ww->client->frame, 1);
set = 0;
}
if (!_animator)
@@ -1018,29 +997,29 @@ _e_winlist_activate(void)
E_FREE_FUNC(_animator, ecore_animator_del);
}
- if ((!ww->border->lock_user_stacking) &&
+ if ((!ww->client->lock_user_stacking) &&
(e_config->winlist_list_raise_while_selecting))
- e_border_raise(ww->border);
- if ((!ww->border->lock_focus_out) &&
+ evas_object_raise(ww->client->frame);
+ if ((!ww->client->lock_focus_out) &&
(e_config->winlist_list_focus_while_selecting))
{
- e_border_focus_set(ww->border, 1, set);
- if (set) e_border_focus_set(ww->border, 1, 0);
+ if (set)
+ evas_object_focus_set(ww->client->frame, 1);
}
}
edje_object_part_text_set(_bg_object, "e.text.label",
- e_border_name_get(ww->border));
+ e_client_name_get(ww->client));
if (_icon_object)
{
- e_popup_object_remove(_winlist, _icon_object);
+ e_comp_object_util_del_list_remove(_winlist, _icon_object);
evas_object_del(_icon_object);
_icon_object = NULL;
}
if (edje_object_part_exists(_bg_object, "e.swallow.icon"))
{
- o = e_border_icon_add(ww->border, _winlist->evas);
+ o = e_client_icon_add(ww->client, evas_object_evas_get(_winlist));
_icon_object = o;
- e_popup_object_add(_winlist, o);
+ e_comp_object_util_del_list_append(_winlist, o);
edje_object_part_swallow(_bg_object, "e.swallow.icon", o);
evas_object_show(o);
}
@@ -1057,13 +1036,13 @@ _e_winlist_deactivate(void)
ww = _win_selected->data;
if (ww->was_shaded)
{
- if (!ww->border->lock_user_shade)
- e_border_shade(ww->border, ww->border->shade.dir);
+ if (!ww->client->lock_user_shade)
+ e_client_shade(ww->client, ww->client->shade_dir);
}
if (ww->was_iconified)
{
- if (!ww->border->lock_user_iconify)
- e_border_iconify(ww->border);
+ if (!ww->client->lock_user_iconify)
+ e_client_iconify(ww->client);
}
ww->was_shaded = 0;
ww->was_iconified = 0;
@@ -1072,8 +1051,8 @@ _e_winlist_deactivate(void)
if (ww->icon_object)
edje_object_signal_emit(ww->icon_object,
"e,state,unselected", "e");
- if (!ww->border->lock_focus_in)
- e_border_focus_set(ww->border, 0, 0);
+ if (!ww->client->lock_focus_in)
+ evas_object_focus_set(ww->client->frame, 0);
}
static void
@@ -1113,15 +1092,15 @@ _e_winlist_restore_desktop(void)
e_config->winlist_list_show_other_screen_windows))
e_desk_show(_last_desk);
if (e_config->winlist_warp_while_selecting)
- ecore_x_pointer_warp(_winlist->zone->container->win,
+ ecore_x_pointer_warp(_winlist_zone->comp->win,
_last_pointer_x, _last_pointer_y);
_e_winlist_deactivate();
_win_selected = NULL;
e_winlist_hide();
- if (_last_border)
+ if (_last_client)
{
- e_border_focus_set(_last_border, 1, 1);
- _last_border = NULL;
+ evas_object_focus_set(_last_client->frame, 1);
+ _last_client = NULL;
}
}
@@ -1129,11 +1108,10 @@ static Eina_Bool
_e_winlist_cb_event_border_add(void *data __UNUSED__, int type __UNUSED__,
void *event)
{
- E_Event_Border_Add *ev;
+ E_Event_Client *ev = event;
- ev = event;
- _e_winlist_border_add(ev->border, _winlist->zone,
- e_desk_current_get(_winlist->zone));
+ _e_winlist_client_add(ev->ec, _winlist_zone,
+ e_desk_current_get(_winlist_zone));
_e_winlist_size_adjust();
return ECORE_CALLBACK_PASS_ON;
}
@@ -1142,10 +1120,9 @@ static Eina_Bool
_e_winlist_cb_event_border_remove(void *data __UNUSED__, int type __UNUSED__,
void *event)
{
- E_Event_Border_Remove *ev;
+ E_Event_Client *ev = event;
- ev = event;
- _e_winlist_border_del(ev->border);
+ _e_winlist_client_del(ev->ec);
_e_winlist_size_adjust();
return ECORE_CALLBACK_PASS_ON;
}
@@ -1217,9 +1194,9 @@ _e_winlist_cb_key_down(void *data __UNUSED__, int type __UNUSED__, void *event)
{
if (!_act_winlist) continue;
if (_act_winlist->func.go_key)
- _act_winlist->func.go_key(E_OBJECT(_winlist->zone), binding->params, ev);
+ _act_winlist->func.go_key(E_OBJECT(_winlist_zone), binding->params, ev);
else if (_act_winlist->func.go)
- _act_winlist->func.go(E_OBJECT(_winlist->zone), binding->params);
+ _act_winlist->func.go(E_OBJECT(_winlist_zone), binding->params);
}
}
}
@@ -1283,9 +1260,9 @@ _e_winlist_cb_key_up(void *data __UNUSED__, int type __UNUSED__, void *event)
{
if (!_act_winlist) continue;
if (_act_winlist->func.end_key)
- _act_winlist->func.end_key(E_OBJECT(_winlist->zone), binding->params, ev);
+ _act_winlist->func.end_key(E_OBJECT(_winlist_zone), binding->params, ev);
else if (_act_winlist->func.end)
- _act_winlist->func.end(E_OBJECT(_winlist->zone), binding->params);
+ _act_winlist->func.end(E_OBJECT(_winlist_zone), binding->params);
}
}
@@ -1300,7 +1277,7 @@ _e_winlist_cb_mouse_down(void *data __UNUSED__, int type __UNUSED__, void *event
ev = event;
if (ev->window != _input_window) return ECORE_CALLBACK_PASS_ON;
e_bindings_mouse_down_ecore_event_handle(E_BINDING_CONTEXT_WINLIST,
- E_OBJECT(_winlist->zone), ev);
+ E_OBJECT(_winlist_zone), ev);
return ECORE_CALLBACK_PASS_ON;
}
@@ -1311,7 +1288,7 @@ _e_winlist_cb_mouse_up(void *data __UNUSED__, int type __UNUSED__, void *event)
ev = event;
if (ev->window != _input_window) return ECORE_CALLBACK_PASS_ON;
- if (e_bindings_mouse_up_ecore_event_handle(E_BINDING_CONTEXT_WINLIST, E_OBJECT(_winlist->zone), ev))
+ if (e_bindings_mouse_up_ecore_event_handle(E_BINDING_CONTEXT_WINLIST, E_OBJECT(_winlist_zone), ev))
return ECORE_CALLBACK_RENEW;
if (_activate_type != E_WINLIST_ACTIVATE_TYPE_MOUSE) return ECORE_CALLBACK_RENEW;
if (!--_hold_count) e_winlist_hide();
@@ -1327,7 +1304,7 @@ _e_winlist_cb_mouse_wheel(void *data __UNUSED__, int type __UNUSED__, void *even
ev = event;
if (ev->window != _input_window) return ECORE_CALLBACK_PASS_ON;
e_bindings_wheel_ecore_event_handle(E_BINDING_CONTEXT_WINLIST,
- E_OBJECT(_winlist->zone), ev);
+ E_OBJECT(_winlist_zone), ev);
if (ev->z < 0) /* up */
{
for (i = ev->z; i < 0; i++)
@@ -1345,14 +1322,14 @@ static Eina_Bool
_e_winlist_cb_mouse_move(void *data __UNUSED__, int type __UNUSED__, void *event)
{
Ecore_Event_Mouse_Move *ev;
+ int x, y, w, h;
ev = event;
if (ev->window != _input_window) return ECORE_CALLBACK_PASS_ON;
+ evas_object_geometry_get(_winlist, &x, &y, &w, &h);
/* only feed mouse move if it's within the winlist popup */
- if (E_INSIDE(ev->x - _winlist->zone->x, ev->y - _winlist->zone->y, _winlist->x, _winlist->y, _winlist->w, _winlist->h))
- evas_event_feed_mouse_move(_winlist->evas, ev->x - _winlist->x +
- _winlist->zone->x, ev->y - _winlist->y +
- _winlist->zone->y, ev->timestamp, NULL);
+ if (E_INSIDE(ev->x, ev->y, x, y, w, h))
+ evas_event_feed_mouse_move(evas_object_evas_get(_winlist), ev->x, ev->y, ev->timestamp, NULL);
return ECORE_CALLBACK_PASS_ON;
}
diff --git a/src/modules/wizard/e_wizard.c b/src/modules/wizard/e_wizard.c
index cd3bd6e0f9..05bc452cd4 100644
--- a/src/modules/wizard/e_wizard.c
+++ b/src/modules/wizard/e_wizard.c
@@ -1,8 +1,8 @@
#include "e_wizard.h"
static void _e_wizard_next_eval(void);
-static E_Popup *_e_wizard_main_new(E_Zone *zone);
-static E_Popup *_e_wizard_extra_new(E_Zone *zone);
+static Evas_Object *_e_wizard_main_new(E_Zone *zone);
+static Evas_Object *_e_wizard_extra_new(E_Zone *zone);
static Eina_Bool _e_wizard_cb_key_down(void *data EINA_UNUSED, int type EINA_UNUSED, void *event);
static void _e_wizard_cb_next(void *data, Evas_Object *obj, const char *emission, const char *source);
@@ -12,7 +12,7 @@ static Eina_Bool _e_wizard_cb_next_page(void *data);
static Eina_Bool _e_wizard_cb_desktops_update(void *data, int ev_type, void *ev);
static Eina_Bool _e_wizard_cb_icons_update(void *data, int ev_type, void *ev);
-static E_Popup *pop = NULL;
+static Evas_Object *pop = NULL;
static Eina_List *pops = NULL;
static Evas_Object *o_bg = NULL;
static Evas_Object *o_content = NULL;
@@ -25,9 +25,7 @@ static int next_can = 0;
static Eina_List *handlers = NULL;
static Eina_Bool got_desktops = EINA_FALSE;
static Eina_Bool got_icons = EINA_FALSE;
-#if (EFREET_VERSION_MAJOR > 1) || (EFREET_VERSION_MINOR >= 8)
static Eina_Bool xdg_error = EINA_FALSE;
-#endif
static Eina_Bool need_xdg_desktops = EINA_FALSE;
static Eina_Bool need_xdg_icons = EINA_FALSE;
@@ -36,26 +34,18 @@ static Ecore_Timer *next_timer = NULL;
EAPI int
e_wizard_init(void)
{
- E_Manager *man;
- Eina_List *l;
+ E_Comp *comp;
+ E_Zone *zone;
+ const Eina_List *l, *ll;
- EINA_LIST_FOREACH(e_manager_list(), l, man)
+ EINA_LIST_FOREACH(e_comp_list(), l, comp)
{
- E_Container *con;
- Eina_List *l2;
-
- EINA_LIST_FOREACH(man->containers, l2, con)
+ EINA_LIST_FOREACH(comp->zones, ll, zone)
{
- Eina_List *l3;
- E_Zone *zone;
-
- EINA_LIST_FOREACH(con->zones, l3, zone)
- {
- if (!pop)
- pop = _e_wizard_main_new(zone);
- else
- pops = eina_list_append(pops, _e_wizard_extra_new(zone));
- }
+ if (!pop)
+ pop = _e_wizard_main_new(zone);
+ else
+ pops = eina_list_append(pops, _e_wizard_extra_new(zone));
}
}
@@ -71,16 +61,9 @@ e_wizard_init(void)
EAPI int
e_wizard_shutdown(void)
{
- E_Object *eo;
+ E_FREE_FUNC(pop, evas_object_del);
+ E_FREE_LIST(pops, evas_object_del);
- if (pop)
- {
- e_object_del(E_OBJECT(pop));
- pop = NULL;
- }
-
- EINA_LIST_FREE(pops, eo)
- e_object_del(eo);
while (pages)
e_wizard_page_del(pages);
@@ -189,7 +172,7 @@ e_wizard_page_add(void *handle,
if (!pg) return NULL;
pg->handle = handle;
- pg->evas = pop->evas;
+ pg->evas = evas_object_evas_get(pop);
pg->init = init_cb;
pg->shutdown = shutdown_cb;
@@ -271,46 +254,37 @@ _e_wizard_next_eval(void)
}
}
-static E_Popup *
+static Evas_Object *
_e_wizard_main_new(E_Zone *zone)
{
- E_Popup *popup;
-
- popup = e_popup_new(zone, 0, 0, zone->w, zone->h);
- o_bg = edje_object_add(popup->evas);
+ o_bg = edje_object_add(zone->comp->evas);
e_theme_edje_object_set(o_bg, "base/theme/wizard", "e/wizard/main");
edje_object_part_text_set(o_bg, "e.text.title", _("Welcome to Enlightenment"));
edje_object_signal_callback_add(o_bg, "e,action,next", "",
- _e_wizard_cb_next, popup);
- e_popup_move_resize(popup, 0, 0, zone->w, zone->h);
- e_popup_layer_set(popup, E_COMP_CANVAS_LAYER_POPUP, 0);
- e_popup_content_set(popup, o_bg);
+ _e_wizard_cb_next, o_bg);
+ evas_object_geometry_set(o_bg, zone->x, zone->y, zone->w, zone->h);
+ evas_object_layer_set(o_bg, E_LAYER_POPUP);
/* set up next/prev buttons */
// edje_object_signal_emit(o_bg, "e,state,next,disable", "e");
e_wizard_labels_update();
- e_popup_show(popup);
- return popup;
+ evas_object_show(o_bg);
+ return o_bg;
}
-static E_Popup *
+static Evas_Object *
_e_wizard_extra_new(E_Zone *zone)
{
- E_Popup *popup;
Evas_Object *o;
- popup = e_popup_new(zone, 0, 0, zone->w, zone->h);
- e_popup_layer_set(popup, E_COMP_CANVAS_LAYER_POPUP, 0);
- o = edje_object_add(popup->evas);
+ o = edje_object_add(zone->comp->evas);
e_theme_edje_object_set(o, "base/theme/wizard", "e/wizard/extra");
- evas_object_move(o, 0, 0);
- evas_object_resize(o, zone->w, zone->h);
+ evas_object_geometry_set(o, zone->x, zone->y, zone->w, zone->h);
+ evas_object_layer_set(o, E_LAYER_POPUP);
evas_object_show(o);
- e_popup_content_set(popup, o);
- e_popup_show(popup);
- return popup;
+ return o;
}
static Eina_Bool
diff --git a/src/modules/wizard/page_050.c b/src/modules/wizard/page_050.c
index ceddfeed62..917df6e550 100644
--- a/src/modules/wizard/page_050.c
+++ b/src/modules/wizard/page_050.c
@@ -71,7 +71,7 @@ _scale_preview_new(Evas *e, double sc, double *scp)
evas_object_show(bg);
cm = edje_object_add(e_widget_preview_evas_get(ob));
- e_theme_edje_object_set(cm, "base/theme/borders", "e/comp/border/default");
+ e_theme_edje_object_set(cm, "base/theme/comp", "e/comp/frame/default");
evas_object_move(cm, 16, 16);
evas_object_resize(cm, 180 * sc, 80);
evas_object_show(cm);
diff --git a/src/modules/wl_desktop_shell/e_mod_main.c b/src/modules/wl_desktop_shell/e_mod_main.c
index e3c297ccd4..114516f031 100644
--- a/src/modules/wl_desktop_shell/e_mod_main.c
+++ b/src/modules/wl_desktop_shell/e_mod_main.c
@@ -41,24 +41,24 @@ static void _e_wl_shell_shell_surface_type_set(E_Wayland_Shell_Surface *ewss);
static void _e_wl_shell_shell_surface_type_reset(E_Wayland_Shell_Surface *ewss);
static void _e_wl_shell_shell_surface_cb_destroy(struct wl_listener *listener, void *data EINA_UNUSED);
static int _e_wl_shell_shell_surface_cb_ping_timeout(void *data);
-static void _e_wl_shell_shell_surface_cb_ee_resize(Ecore_Evas *ee);
-static void _e_wl_shell_shell_surface_cb_render_post(void *data, Evas *evas EINA_UNUSED, void *event EINA_UNUSED);
-static void _e_wl_shell_shell_surface_cb_focus_in(void *data, Evas_Object *obj EINA_UNUSED, void *event EINA_UNUSED);
-static void _e_wl_shell_shell_surface_cb_focus_out(void *data, Evas_Object *obj EINA_UNUSED, void *event EINA_UNUSED);
-static void _e_wl_shell_shell_surface_cb_mouse_in(void *data, Evas_Object *obj EINA_UNUSED, void *event EINA_UNUSED);
-static void _e_wl_shell_shell_surface_cb_mouse_out(void *data, Evas_Object *obj EINA_UNUSED, void *event);
-static void _e_wl_shell_shell_surface_cb_mouse_move(void *data, Evas_Object *obj EINA_UNUSED, void *event);
-static void _e_wl_shell_shell_surface_cb_mouse_up(void *data, Evas_Object *obj EINA_UNUSED, void *event);
-static void _e_wl_shell_shell_surface_cb_mouse_down(void *data, Evas_Object *obj EINA_UNUSED, void *event);
-static void _e_wl_shell_shell_surface_cb_mouse_wheel(void *data, Evas_Object *obj EINA_UNUSED, void *event);
-static void _e_wl_shell_shell_surface_cb_key_up(void *data, Evas_Object *obj EINA_UNUSED, void *event);
-static void _e_wl_shell_shell_surface_cb_key_down(void *data, Evas_Object *obj EINA_UNUSED, void *event);
-static void _e_wl_shell_shell_surface_cb_bd_move_end(void *data, void *bd);
-static void _e_wl_shell_shell_surface_cb_bd_resize_update(void *data, void *bd);
-static void _e_wl_shell_shell_surface_cb_bd_resize_end(void *data, void *bd);
-
-static void _e_wl_shell_mouse_down_helper(E_Border *bd, int button, Evas_Point *output, E_Binding_Event_Mouse_Button *ev, Eina_Bool move);
-static void _e_wl_shell_mouse_up_helper(E_Border *bd, int button, Evas_Point *output, E_Binding_Event_Mouse_Button *ev);
+
+static void _e_wl_shell_render_post(void *data, Evas *e EINA_UNUSED, void *event EINA_UNUSED);
+static void _e_wl_shell_shell_surface_cb_mouse_out(void *data, Evas *e EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *event);
+static void _e_wl_shell_shell_surface_cb_mouse_move(void *data, Evas *e EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *event);
+static void _e_wl_shell_shell_surface_cb_mouse_up(void *data, Evas *e EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *event);
+static void _e_wl_shell_shell_surface_cb_mouse_down(void *data, Evas *e EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *event);
+static void _e_wl_shell_shell_surface_cb_mouse_wheel(void *data, Evas *e EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *event);
+static void _e_wl_shell_shell_surface_cb_key_up(void *data, Evas *e EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *event);
+static void _e_wl_shell_shell_surface_cb_key_down(void *data, Evas *e EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *event EINA_UNUSED);
+static void _e_wl_shell_shell_surface_cb_ec_hook_focus_set(void *data, E_Client *ec);
+static void _e_wl_shell_shell_surface_cb_ec_hook_focus_unset(void *data, E_Client *ec);
+static void _e_wl_shell_shell_surface_cb_ec_hook_move_end(void *data, E_Client *ec);
+static void _e_wl_shell_shell_surface_cb_ec_hook_resize_update(void *data, E_Client *ec);
+static void _e_wl_shell_shell_surface_cb_ec_hook_resize_end(void *data, E_Client *ec);
+static void _e_wl_shell_surface_cb_smart_client_resize(void *data, Evas_Object *obj, void *event_info);
+
+static void _e_wl_shell_mouse_down_helper(E_Client *ec, int button, Evas_Point *output, E_Binding_Event_Mouse_Button *ev, Eina_Bool move);
+static void _e_wl_shell_mouse_up_helper(E_Client *ec, int button, Evas_Point *output, E_Binding_Event_Mouse_Button *ev EINA_UNUSED);
/* shell surface interface prototypes */
static void _e_wl_shell_shell_surface_cb_pong(struct wl_client *client EINA_UNUSED, struct wl_resource *resource, unsigned int serial);
@@ -155,6 +155,8 @@ static const struct wl_pointer_grab_interface _e_busy_grab_interface =
/* local variables */
+static Eina_List *ec_hooks = NULL;
+
/* external variables */
EAPI E_Module_Api e_modapi = { E_MODULE_API_VERSION, "Wl_Desktop_Shell" };
@@ -165,7 +167,8 @@ e_modapi_init(E_Module *m)
E_Wayland_Desktop_Shell *shell = NULL;
struct wl_global *gshell = NULL;
E_Wayland_Input *input = NULL;
- Eina_List *l = NULL;
+ const Eina_List *l = NULL;
+ E_Comp *comp;
/* test for valid compositor */
if (!_e_wl_comp) return NULL;
@@ -218,6 +221,27 @@ e_modapi_init(E_Module *m)
wl_signal_add(&input->wl.seat.pointer->focus_signal, lst);
}
+ ec_hooks = eina_list_append(ec_hooks,
+ e_client_hook_add(E_CLIENT_HOOK_FOCUS_SET,
+ _e_wl_shell_shell_surface_cb_ec_hook_focus_set, NULL));
+ ec_hooks = eina_list_append(ec_hooks,
+ e_client_hook_add(E_CLIENT_HOOK_FOCUS_UNSET,
+ _e_wl_shell_shell_surface_cb_ec_hook_focus_unset, NULL));
+
+ ec_hooks = eina_list_append(ec_hooks,
+ e_client_hook_add(E_CLIENT_HOOK_MOVE_END,
+ _e_wl_shell_shell_surface_cb_ec_hook_move_end, NULL));
+ ec_hooks = eina_list_append(ec_hooks,
+ e_client_hook_add(E_CLIENT_HOOK_RESIZE_END,
+ _e_wl_shell_shell_surface_cb_ec_hook_resize_end, NULL));
+ ec_hooks = eina_list_append(ec_hooks,
+ e_client_hook_add(E_CLIENT_HOOK_RESIZE_UPDATE,
+ _e_wl_shell_shell_surface_cb_ec_hook_resize_update, NULL));
+
+ EINA_LIST_FOREACH(e_comp_list(), l, comp)
+ evas_event_callback_add(comp->evas, EVAS_CALLBACK_RENDER_POST,
+ _e_wl_shell_render_post, NULL);
+
return m;
err:
@@ -236,6 +260,13 @@ err:
EAPI int
e_modapi_shutdown(E_Module *m EINA_UNUSED)
{
+ const Eina_List *l;
+ E_Comp *comp;
+
+ E_FREE_LIST(ec_hooks, e_client_hook_del);
+ EINA_LIST_FOREACH(e_comp_list(), l, comp)
+ evas_event_callback_del_full(comp->evas, EVAS_CALLBACK_RENDER_POST,
+ _e_wl_shell_render_post, NULL);
/* nothing to do here as shell will get the destroy callback from
* the compositor and we can cleanup there */
return 1;
@@ -574,92 +605,49 @@ _e_wl_shell_shell_surface_create(void *shell, E_Wayland_Surface *ews, const void
static void
_e_wl_shell_shell_surface_create_toplevel(E_Wayland_Surface *ews)
{
- E_Container *con;
+ E_Comp *comp;
/* get the current container */
- con = e_container_current_get(e_manager_current_get());
-
- /* create the ecore_evas */
- ews->ee = ecore_evas_new(NULL, ews->geometry.x, ews->geometry.y,
- ews->geometry.w, ews->geometry.h, NULL);
- ecore_evas_alpha_set(ews->ee, EINA_TRUE);
- ecore_evas_borderless_set(ews->ee, EINA_TRUE);
- ecore_evas_callback_resize_set(ews->ee,
- _e_wl_shell_shell_surface_cb_ee_resize);
- ecore_evas_data_set(ews->ee, "surface", ews);
-
- /* ecore_evas_input_event_unregister(ews->ee); */
-
- ews->evas_win = ecore_evas_window_get(ews->ee);
-
- /* get a reference to the canvas */
- ews->evas = ecore_evas_get(ews->ee);
-
- /* setup a post_render callback */
- evas_event_callback_add(ews->evas, EVAS_CALLBACK_RENDER_POST,
- _e_wl_shell_shell_surface_cb_render_post, ews);
-
- /* create a surface smart object */
- ews->obj = e_surface_add(ews->evas);
- evas_object_move(ews->obj, 0, 0);
- evas_object_resize(ews->obj, ews->geometry.w, ews->geometry.h);
- evas_object_show(ews->obj);
-
- /* hook smart object callbacks */
- evas_object_smart_callback_add(ews->obj, "mouse_in",
- _e_wl_shell_shell_surface_cb_mouse_in, ews);
- evas_object_smart_callback_add(ews->obj, "mouse_out",
+ comp = e_util_comp_current_get();
+
+ /* create the e client for this surface */
+ ews->ec = e_pixmap_find_client(E_PIXMAP_TYPE_WL, e_pixmap_window_get(ews->pixmap));
+ if (!ews->ec)
+ ews->ec = e_client_new(comp, ews->pixmap, 1, 0);
+ e_pixmap_ref(ews->pixmap);
+ ews->ec->argb = 1;
+ ews->ec->no_shape_cut = 1; // specify no input shape cutting for this client
+ ews->ec->lock_border = ews->ec->borderless = !ews->ec->internal;
+ ews->ec->border.changed = ews->ec->changes.border = !ews->ec->borderless;
+ ews->ec->comp_data = (E_Comp_Client_Data*)ews;
+ ews->ec->icccm.title = eina_stringshare_ref(ews->shell_surface->title);
+ ews->ec->icccm.class = eina_stringshare_ref(ews->shell_surface->clas);
+ EC_CHANGED(ews->ec);
+
+ /* hook object callbacks */
+ evas_object_event_callback_add(ews->ec->frame, EVAS_CALLBACK_MOUSE_OUT,
_e_wl_shell_shell_surface_cb_mouse_out, ews);
- evas_object_smart_callback_add(ews->obj, "mouse_move",
+ evas_object_event_callback_add(ews->ec->frame, EVAS_CALLBACK_MOUSE_MOVE,
_e_wl_shell_shell_surface_cb_mouse_move, ews);
- evas_object_smart_callback_add(ews->obj, "mouse_up",
+ evas_object_event_callback_add(ews->ec->frame, EVAS_CALLBACK_MOUSE_UP,
_e_wl_shell_shell_surface_cb_mouse_up, ews);
- evas_object_smart_callback_add(ews->obj, "mouse_down",
+ evas_object_event_callback_add(ews->ec->frame, EVAS_CALLBACK_MOUSE_DOWN,
_e_wl_shell_shell_surface_cb_mouse_down, ews);
- evas_object_smart_callback_add(ews->obj, "mouse_wheel",
+ evas_object_event_callback_add(ews->ec->frame, EVAS_CALLBACK_MOUSE_WHEEL,
_e_wl_shell_shell_surface_cb_mouse_wheel, ews);
- evas_object_smart_callback_add(ews->obj, "key_up",
+ evas_object_event_callback_add(ews->ec->frame, EVAS_CALLBACK_KEY_UP,
_e_wl_shell_shell_surface_cb_key_up, ews);
- evas_object_smart_callback_add(ews->obj, "key_down",
+ evas_object_event_callback_add(ews->ec->frame, EVAS_CALLBACK_KEY_DOWN,
_e_wl_shell_shell_surface_cb_key_down, ews);
- evas_object_smart_callback_add(ews->obj, "focus_in",
- _e_wl_shell_shell_surface_cb_focus_in, ews);
- evas_object_smart_callback_add(ews->obj, "focus_out",
- _e_wl_shell_shell_surface_cb_focus_out, ews);
-
- ecore_x_icccm_size_pos_hints_set(ews->evas_win, 0, ECORE_X_GRAVITY_NW,
- 0, 0, 9999, 9999, 0, 0, 1, 1, 0.0, 0.0);
- ecore_x_icccm_transient_for_unset(ews->evas_win);
- ecore_x_netwm_window_type_set(ews->evas_win, ECORE_X_WINDOW_TYPE_NORMAL);
-
- ecore_evas_lower(ews->ee);
-
- /* create the e border for this surface */
- ews->bd = e_border_new(con, ews->evas_win, 1, 1);
- e_surface_border_input_set(ews->obj, ews->bd);
- ews->bd->re_manage = 0;
- ews->bd->internal = 1;
- ews->bd->internal_ecore_evas = ews->ee;
- ews->bd->internal_no_remember = 1;
- ews->bd->internal_no_reopen = 1;
-
- e_border_move_resize(ews->bd, ews->geometry.x, ews->geometry.y,
+ evas_object_smart_callback_add(ews->ec->frame, "client_resize",
+ _e_wl_shell_surface_cb_smart_client_resize, ews);
+
+ ews->ec->client.w = ews->geometry.w;
+ ews->ec->client.h = ews->geometry.h;
+ evas_object_geometry_set(ews->ec->frame, ews->geometry.x, ews->geometry.y,
ews->geometry.w, ews->geometry.h);
- e_border_show(ews->bd);
-
- ews->bd_hooks =
- eina_list_append(ews->bd_hooks,
- e_border_hook_add(E_BORDER_HOOK_MOVE_END,
- _e_wl_shell_shell_surface_cb_bd_move_end, ews));
- ews->bd_hooks =
- eina_list_append(ews->bd_hooks,
- e_border_hook_add(E_BORDER_HOOK_RESIZE_END,
- _e_wl_shell_shell_surface_cb_bd_resize_end, ews));
- ews->bd_hooks =
- eina_list_append(ews->bd_hooks,
- e_border_hook_add(E_BORDER_HOOK_RESIZE_UPDATE,
- _e_wl_shell_shell_surface_cb_bd_resize_update, ews));
+ evas_object_show(ews->ec->frame);
ews->mapped = EINA_TRUE;
}
@@ -668,76 +656,55 @@ static void
_e_wl_shell_shell_surface_create_popup(E_Wayland_Surface *ews)
{
E_Wayland_Shell_Surface *ewss = NULL;
- Ecore_X_Window parent = 0;
struct wl_seat *seat;
- char opts[PATH_MAX];
+ //char opts[PATH_MAX];
+ E_Comp *comp;
/* try to get the shell surface */
if (!(ewss = ews->shell_surface)) return;
-
+ /* get the current comp */
if (ewss->parent)
- parent = ecore_evas_window_get(ewss->parent->ee);
-
- snprintf(opts, sizeof(opts), "parent=%d", parent);
-
- /* create an ecore evas to represent this 'popup' */
- ews->ee = ecore_evas_new(NULL, ewss->popup.x, ewss->popup.y,
- ews->geometry.w, ews->geometry.h, opts);
-
- ecore_evas_alpha_set(ews->ee, EINA_TRUE);
- ecore_evas_borderless_set(ews->ee, EINA_TRUE);
- ecore_evas_override_set(ews->ee, EINA_TRUE);
- ecore_evas_callback_resize_set(ews->ee,
- _e_wl_shell_shell_surface_cb_ee_resize);
- ecore_evas_data_set(ews->ee, "surface", ews);
-
- ecore_evas_input_event_unregister(ews->ee);
-
- ews->evas_win = ecore_evas_window_get(ews->ee);
-
- /* get a reference to the canvas */
- ews->evas = ecore_evas_get(ews->ee);
-
- /* setup a post_render callback */
- evas_event_callback_add(ews->evas, EVAS_CALLBACK_RENDER_POST,
- _e_wl_shell_shell_surface_cb_render_post, ews);
-
- /* create a surface smart object */
- ews->obj = e_surface_add(ews->evas);
- evas_object_move(ews->obj, 0, 0);
- evas_object_resize(ews->obj, ews->geometry.w, ews->geometry.h);
- evas_object_show(ews->obj);
-
- /* hook smart object callbacks */
- evas_object_smart_callback_add(ews->obj, "mouse_in",
- _e_wl_shell_shell_surface_cb_mouse_in, ews);
- evas_object_smart_callback_add(ews->obj, "mouse_out",
+ comp = ewss->parent->ec->comp;
+ else
+ comp = e_util_comp_current_get();
+
+ /* create the e client for this surface */
+ ews->ec = e_pixmap_find_client(E_PIXMAP_TYPE_WL, e_pixmap_window_get(ews->pixmap));
+ if (!ews->ec)
+ ews->ec = e_client_new(comp, ews->pixmap, 1, 0);
+ e_pixmap_ref(ews->pixmap);
+ ews->ec->argb = 1;
+ ews->ec->no_shape_cut = 1; // specify no input shape cutting for this client
+ ews->ec->lock_border = ews->ec->borderless = !ews->ec->internal;
+ ews->ec->border.changed = ews->ec->changes.border = !ews->ec->borderless;
+ ews->ec->comp_data = (E_Comp_Client_Data*)ews;
+ ews->ec->icccm.title = eina_stringshare_ref(ewss->title);
+ ews->ec->icccm.class = eina_stringshare_ref(ewss->clas);
+ EC_CHANGED(ews->ec);
+
+ /* hook object callbacks */
+ evas_object_event_callback_add(ews->ec->frame, EVAS_CALLBACK_MOUSE_OUT,
_e_wl_shell_shell_surface_cb_mouse_out, ews);
- evas_object_smart_callback_add(ews->obj, "mouse_move",
+ evas_object_event_callback_add(ews->ec->frame, EVAS_CALLBACK_MOUSE_MOVE,
_e_wl_shell_shell_surface_cb_mouse_move, ews);
- evas_object_smart_callback_add(ews->obj, "mouse_up",
+ evas_object_event_callback_add(ews->ec->frame, EVAS_CALLBACK_MOUSE_UP,
_e_wl_shell_shell_surface_cb_mouse_up, ews);
- evas_object_smart_callback_add(ews->obj, "mouse_down",
+ evas_object_event_callback_add(ews->ec->frame, EVAS_CALLBACK_MOUSE_DOWN,
_e_wl_shell_shell_surface_cb_mouse_down, ews);
- evas_object_smart_callback_add(ews->obj, "mouse_wheel",
+ evas_object_event_callback_add(ews->ec->frame, EVAS_CALLBACK_MOUSE_WHEEL,
_e_wl_shell_shell_surface_cb_mouse_wheel, ews);
- evas_object_smart_callback_add(ews->obj, "key_up",
+ evas_object_event_callback_add(ews->ec->frame, EVAS_CALLBACK_KEY_UP,
_e_wl_shell_shell_surface_cb_key_up, ews);
- evas_object_smart_callback_add(ews->obj, "key_down",
+ evas_object_event_callback_add(ews->ec->frame, EVAS_CALLBACK_KEY_DOWN,
_e_wl_shell_shell_surface_cb_key_down, ews);
- evas_object_smart_callback_add(ews->obj, "focus_in",
- _e_wl_shell_shell_surface_cb_focus_in, ews);
- evas_object_smart_callback_add(ews->obj, "focus_out",
- _e_wl_shell_shell_surface_cb_focus_out, ews);
+ evas_object_smart_callback_add(ews->ec->frame, "client_resize",
+ _e_wl_shell_surface_cb_smart_client_resize, ews);
- ecore_x_icccm_size_pos_hints_set(ews->evas_win, 0, ECORE_X_GRAVITY_NW,
- 0, 0, 9999, 9999, 0, 0, 1, 1, 0.0, 0.0);
-
- ecore_x_icccm_transient_for_set(ews->evas_win, parent);
- ecore_x_netwm_window_type_set(ews->evas_win, ECORE_X_WINDOW_TYPE_POPUP_MENU);
-
- /* ecore_evas_lower(ews->ee); */
- ecore_evas_show(ews->ee);
+ ews->ec->client.w = ews->geometry.w;
+ ews->ec->client.h = ews->geometry.h;
+ evas_object_geometry_set(ews->ec->frame, ews->geometry.x, ews->geometry.y,
+ ews->geometry.w, ews->geometry.h);
+ evas_object_show(ews->ec->frame);
ews->mapped = EINA_TRUE;
/* set popup properties */
@@ -839,20 +806,25 @@ _e_wl_shell_shell_surface_configure(E_Wayland_Surface *ews, Evas_Coord x, Evas_C
else if ((changed_type) || (x != 0) || (y != 0) ||
(ews->geometry.w != w) || (ews->geometry.h != h))
{
- Evas_Coord fx = 0, fy = 0;
- Evas_Coord tx = 0, ty = 0;
-
- fx += ews->geometry.x;
- fy += ews->geometry.y;
-
- tx = x + ews->geometry.x;
- ty = y + ews->geometry.y;
-
- ews->geometry.x = ews->geometry.x + tx - fx;
- ews->geometry.y = ews->geometry.y + ty - fy;
+ if (ews->ec && e_client_resizing_get(ews->ec)) return;
ews->geometry.w = w;
ews->geometry.h = h;
ews->geometry.changed = EINA_TRUE;
+ if (ews->ec)
+ {
+ if ((ews->geometry.x != x) || (ews->geometry.y != y))
+ {
+ ews->ec->client.x = ews->geometry.x = x;
+ ews->ec->client.y = ews->geometry.y = y;
+ e_comp_object_frame_xy_adjust(ews->ec->frame, x, y, &ews->ec->x, &ews->ec->y);
+ ews->ec->changes.size = 1;
+ }
+ ews->ec->client.w = w;
+ ews->ec->client.h = h;
+ e_comp_object_frame_wh_adjust(ews->ec->frame, w, h, &ews->ec->w, &ews->ec->h);
+ ews->ec->changes.pos = 1;
+ EC_CHANGED(ews->ec);
+ }
}
}
@@ -907,11 +879,10 @@ _e_wl_shell_shell_surface_map(E_Wayland_Surface *ews, Evas_Coord x, Evas_Coord y
case E_WAYLAND_SHELL_SURFACE_TYPE_POPUP:
_e_wl_shell_shell_surface_create_popup(ews);
break;
- default:
- break;
+ default: return;
}
- if (ews->bd)
- e_comp_wl_border_surface_add(ews->id, ews->bd);
+ if (ews->ec && ews->ec->icccm.title)
+ e_comp_object_frame_title_set(ews->ec->frame, ews->ec->icccm.title);
}
static void
@@ -919,13 +890,9 @@ _e_wl_shell_shell_surface_unmap(E_Wayland_Surface *ews)
{
Eina_List *l = NULL;
E_Wayland_Input *input;
- E_Border_Hook *hook;
if (!ews) return;
- EINA_LIST_FREE(ews->bd_hooks, hook)
- e_border_hook_del(hook);
-
EINA_LIST_FOREACH(_e_wl_comp->seats, l, input)
{
if ((input->wl.seat.keyboard) &&
@@ -936,38 +903,40 @@ _e_wl_shell_shell_surface_unmap(E_Wayland_Surface *ews)
wl_pointer_set_focus(input->wl.seat.pointer, NULL, 0, 0);
}
- if (ews->obj)
- {
- /* delete smart callbacks */
- evas_object_smart_callback_del(ews->obj, "mouse_in",
- _e_wl_shell_shell_surface_cb_mouse_in);
- evas_object_smart_callback_del(ews->obj, "mouse_out",
- _e_wl_shell_shell_surface_cb_mouse_out);
- evas_object_smart_callback_del(ews->obj, "mouse_move",
- _e_wl_shell_shell_surface_cb_mouse_move);
- evas_object_smart_callback_del(ews->obj, "mouse_up",
- _e_wl_shell_shell_surface_cb_mouse_up);
- evas_object_smart_callback_del(ews->obj, "mouse_down",
- _e_wl_shell_shell_surface_cb_mouse_down);
- evas_object_smart_callback_del(ews->obj, "mouse_wheel",
- _e_wl_shell_shell_surface_cb_mouse_wheel);
- evas_object_smart_callback_del(ews->obj, "key_up",
- _e_wl_shell_shell_surface_cb_key_up);
- evas_object_smart_callback_del(ews->obj, "key_down",
- _e_wl_shell_shell_surface_cb_key_down);
- evas_object_smart_callback_del(ews->obj, "focus_in",
- _e_wl_shell_shell_surface_cb_focus_in);
- evas_object_smart_callback_del(ews->obj, "focus_out",
- _e_wl_shell_shell_surface_cb_focus_out);
-
- /* delete the object */
- evas_object_del(ews->obj);
- }
-
- if (ews->bd)
+ if (ews->ec)
{
- e_comp_wl_border_surface_del(ews->id);
- e_object_del(E_OBJECT(ews->bd));
+ evas_object_event_callback_del_full(ews->ec->frame, EVAS_CALLBACK_MOUSE_OUT,
+ _e_wl_shell_shell_surface_cb_mouse_out, ews);
+ evas_object_event_callback_del_full(ews->ec->frame, EVAS_CALLBACK_MOUSE_MOVE,
+ _e_wl_shell_shell_surface_cb_mouse_move, ews);
+ evas_object_event_callback_del_full(ews->ec->frame, EVAS_CALLBACK_MOUSE_UP,
+ _e_wl_shell_shell_surface_cb_mouse_up, ews);
+ evas_object_event_callback_del_full(ews->ec->frame, EVAS_CALLBACK_MOUSE_DOWN,
+ _e_wl_shell_shell_surface_cb_mouse_down, ews);
+ evas_object_event_callback_del_full(ews->ec->frame, EVAS_CALLBACK_MOUSE_WHEEL,
+ _e_wl_shell_shell_surface_cb_mouse_wheel, ews);
+ evas_object_event_callback_del_full(ews->ec->frame, EVAS_CALLBACK_KEY_UP,
+ _e_wl_shell_shell_surface_cb_key_up, ews);
+ evas_object_event_callback_del_full(ews->ec->frame, EVAS_CALLBACK_KEY_DOWN,
+ _e_wl_shell_shell_surface_cb_key_down, ews);
+ evas_object_smart_callback_del_full(ews->ec->frame, "client_resize",
+ _e_wl_shell_surface_cb_smart_client_resize, ews);
+
+
+ /* surface probably has render updates pending:
+ * - check ourselves before we wreck ourselves
+ * - copy image
+ * - re-render
+ */
+ e_pixmap_image_clear(ews->pixmap, 0);
+ e_pixmap_dirty(ews->pixmap);
+ if (e_pixmap_refresh(ews->pixmap))
+ {
+ e_comp_object_damage(ews->ec->frame, 0, 0, ews->ec->w, ews->ec->h);
+ e_comp_object_render(ews->ec->frame);
+ }
+ e_comp_object_render_update_del(ews->ec->frame);
+ e_object_del(E_OBJECT(ews->ec));
}
ews->mapped = EINA_FALSE;
@@ -1016,10 +985,9 @@ _e_wl_shell_shell_surface_type_reset(E_Wayland_Shell_Surface *ewss)
switch (ewss->type)
{
case E_WAYLAND_SHELL_SURFACE_TYPE_FULLSCREEN:
- /* ecore_evas_fullscreen_set(ewss->surface->ee, EINA_FALSE); */
- /* unfullscreen the border */
- if (ewss->surface->bd)
- e_border_unfullscreen(ewss->surface->bd);
+ /* unfullscreen the client */
+ if (ewss->surface->ec)
+ e_client_unfullscreen(ewss->surface->ec);
/* restore the saved geometry */
ewss->surface->geometry.x = ewss->saved.x;
@@ -1029,9 +997,9 @@ _e_wl_shell_shell_surface_type_reset(E_Wayland_Shell_Surface *ewss)
ewss->surface->geometry.changed = EINA_TRUE;
break;
case E_WAYLAND_SHELL_SURFACE_TYPE_MAXIMIZED:
- /* unmaximize the border */
- if (ewss->surface->bd)
- e_border_unmaximize(ewss->surface->bd,
+ /* unmaximize the client */
+ if (ewss->surface->ec)
+ e_client_unmaximize(ewss->surface->ec,
(e_config->maximize_policy & E_MAXIMIZE_TYPE) |
E_MAXIMIZE_BOTH);
@@ -1080,8 +1048,9 @@ _e_wl_shell_shell_surface_cb_destroy(struct wl_listener *listener, void *data EI
ewss->ping_timer = NULL;
}
- free(ewss->title);
wl_list_remove(&ewss->wl.link);
+ eina_stringshare_del(ewss->clas);
+ eina_stringshare_del(ewss->title);
free(ewss);
}
}
@@ -1097,6 +1066,9 @@ _e_wl_shell_shell_surface_cb_ping_timeout(void *data)
ewss->active = EINA_FALSE;
+ /* this can be NULL if there's a long enough timeout */
+ if (!ewss->surface->input) return 1;
+
/* TODO: this should loop inputs */
/* try to allocate space for our grab structure */
@@ -1114,191 +1086,70 @@ _e_wl_shell_shell_surface_cb_ping_timeout(void *data)
}
static void
-_e_wl_shell_shell_surface_cb_ee_resize(Ecore_Evas *ee)
+_e_wl_shell_render_post(void *data EINA_UNUSED, Evas *e EINA_UNUSED, void *event EINA_UNUSED)
{
- E_Wayland_Surface *ews = NULL;
-
- /* try to get the surface structure of this ecore_evas */
- if (!(ews = ecore_evas_data_get(ee, "surface")))
- return;
-
- /* if we have the surface smart object */
- if (ews->obj)
- {
- int w = 0, h = 0;
-
- /* grab the requested geometry */
- ecore_evas_request_geometry_get(ee, NULL, NULL, &w, &h);
-
- /* resize the surface smart object */
- evas_object_resize(ews->obj, w, h);
- }
-}
-
-static void
-_e_wl_shell_shell_surface_cb_render_post(void *data, Evas *evas EINA_UNUSED, void *event EINA_UNUSED)
-{
- E_Wayland_Surface *ews = NULL;
- unsigned int secs = 0;
+ E_Wayland_Surface *ews;
+ unsigned int secs;
E_Wayland_Surface_Frame_Callback *cb = NULL, *ncb = NULL;
- /* try to cast data to our surface structure */
- if (!(ews = data)) return;
-
/* grab the current server time */
secs = e_comp_wl_time_get();
- /* for each frame callback in the surface, signal it is done */
- wl_list_for_each_safe(cb, ncb, &ews->wl.frames, wl.link)
- {
- wl_callback_send_done(cb->wl.resource, secs);
- wl_resource_destroy(cb->wl.resource);
- }
-}
-
-static void
-_e_wl_shell_shell_surface_cb_focus_in(void *data, Evas_Object *obj EINA_UNUSED, void *event EINA_UNUSED)
-{
- E_Wayland_Surface *ews = NULL;
- E_Wayland_Input *input = NULL;
- Eina_List *l = NULL;
-
- /* try to cast data to our surface structure */
- if (!(ews = data)) return;
-
- /* if this surface is not visible, get out */
- if (!ews->mapped) return;
-
- /* loop the list of inputs */
- EINA_LIST_FOREACH(_e_wl_comp->seats, l, input)
- {
- /* set keyboard focus */
- wl_keyboard_set_focus(input->wl.seat.keyboard, ews->wl.surface);
-
- /* update the keyboard focus in the data device */
- wl_data_device_set_keyboard_focus(&input->wl.seat);
- }
-}
-
-static void
-_e_wl_shell_shell_surface_cb_focus_out(void *data, Evas_Object *obj EINA_UNUSED, void *event EINA_UNUSED)
-{
- E_Wayland_Surface *ews = NULL;
- E_Wayland_Input *input = NULL;
- Eina_List *l = NULL;
- struct wl_pointer *ptr;
-
- /* try to cast data to our surface structure */
- if (!(ews = data)) return;
-
- /* if this surface is not visible, get out */
- if (!ews->mapped) return;
-
- if ((ptr = _e_wl_comp->input->wl.seat.pointer))
- {
- if (ews->wl.surface == ptr->current)
- return;
- }
-
- /* loop the list of inputs */
- EINA_LIST_FOREACH(_e_wl_comp->seats, l, input)
- {
- /* set keyboard focus */
- wl_keyboard_set_focus(input->wl.seat.keyboard, NULL);
-
- /* end any keyboard grabs */
- wl_keyboard_end_grab(input->wl.seat.keyboard);
- }
-}
-
-static void
-_e_wl_shell_shell_surface_cb_mouse_in(void *data, Evas_Object *obj EINA_UNUSED, void *event EINA_UNUSED)
-{
- E_Wayland_Surface *ews = NULL;
- struct wl_pointer *ptr = NULL;
-
- /* try to cast data to our surface structure */
- if (!(ews = data)) return;
-
- /* if this surface is not visible, get out */
- if (!ews->mapped) return;
-
- /* try to get the pointer from this input */
- if ((ptr = _e_wl_comp->input->wl.seat.pointer))
+ EINA_INLIST_FOREACH(_e_wl_comp->surfaces, ews)
{
- /* if the mouse entered this surface & it is not the current surface */
- if (ews->wl.surface != ptr->current)
+ if (!ews->updates) break;
+ /* for each frame callback in the surface, signal it is done */
+ wl_list_for_each_safe(cb, ncb, &ews->wl.frames, wl.link)
{
- const struct wl_pointer_grab_interface *grab;
-
- /* set this surface as the current */
- grab = ptr->grab->interface;
- ptr->current = ews->wl.surface;
-
- /* send a pointer focus event */
- grab->focus(ptr->grab, ews->wl.surface,
- ptr->current_x, ptr->current_y);
+ wl_callback_send_done(cb->wl.resource, secs);
+ wl_resource_destroy(cb->wl.resource);
}
+ ews->updates = 0;
}
}
static void
-_e_wl_shell_shell_surface_cb_mouse_out(void *data, Evas_Object *obj EINA_UNUSED, void *event)
+_e_wl_shell_shell_surface_cb_mouse_out(void *data, Evas *e EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *event)
{
E_Wayland_Surface *ews = NULL;
+ Evas_Event_Mouse_Out *ev = event;
struct wl_pointer *ptr = NULL;
- Evas_Event_Mouse_Out *ev;
-
- ev = event;
/* try to cast data to our surface structure */
if (!(ews = data)) return;
- if (E_INSIDE(ev->canvas.x, ev->canvas.y, ews->geometry.x, ews->geometry.y,
- ews->geometry.w, ews->geometry.h))
- return;
-
- /* if (!ews->input) return; */
-
/* try to get the pointer from this input */
if ((ptr = _e_wl_comp->input->wl.seat.pointer))
{
- /* if we have a pointer grab and this is the currently focused surface */
- /* if ((ptr->grab) && (ptr->focus == ptr->current)) */
- /* return; */
-
- /* unset the pointer image */
- ecore_x_window_cursor_set(ecore_evas_window_get(ews->ee), 0);
+ ptr->x = wl_fixed_from_int(ev->output.x - ews->ec->client.x);
+ ptr->y = wl_fixed_from_int(ev->output.y - ews->ec->client.y);
- /* set pointer focus */
- ptr->current = NULL;
+ ptr->current_x = ptr->x;
+ ptr->current_y = ptr->y;
+ ptr->grab->x = ptr->x;
+ ptr->grab->y = ptr->y;
- /* NB: Ideally, we should call this function to tell the
- * pointer that nothing has focus, HOWEVER, when we do
- * it breaks re-entrant focus of some wayland clients:
- *
- * NB: I sent a patch for this already to the wayland devs */
- wl_pointer_set_focus(ptr, NULL, 0, 0);
+ /* send this mouse movement to wayland */
+ ptr->grab->interface->motion(ptr->grab, ev->timestamp,
+ ptr->grab->x, ptr->grab->y);
}
}
static void
-_e_wl_shell_shell_surface_cb_mouse_move(void *data, Evas_Object *obj EINA_UNUSED, void *event)
+_e_wl_shell_shell_surface_cb_mouse_move(void *data, Evas *e EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *event)
{
E_Wayland_Surface *ews = NULL;
- Evas_Event_Mouse_Move *ev;
+ Evas_Event_Mouse_Move *ev = event;
struct wl_pointer *ptr = NULL;
- ev = event;
-
/* try to cast data to our surface structure */
if (!(ews = data)) return;
/* try to get the pointer from this input */
if ((ptr = _e_wl_comp->input->wl.seat.pointer))
{
- ptr->x = wl_fixed_from_int(ev->cur.output.x);
- ptr->y = wl_fixed_from_int(ev->cur.output.y);
+ ptr->x = wl_fixed_from_int(ev->cur.output.x - ews->ec->client.x);
+ ptr->y = wl_fixed_from_int(ev->cur.output.y - ews->ec->client.y);
ptr->current_x = ptr->x;
ptr->current_y = ptr->y;
@@ -1312,7 +1163,7 @@ _e_wl_shell_shell_surface_cb_mouse_move(void *data, Evas_Object *obj EINA_UNUSED
}
static void
-_e_wl_shell_shell_surface_cb_mouse_up(void *data, Evas_Object *obj EINA_UNUSED, void *event)
+_e_wl_shell_shell_surface_cb_mouse_up(void *data, Evas *e EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *event)
{
E_Wayland_Surface *ews = NULL;
struct wl_pointer *ptr = NULL;
@@ -1346,7 +1197,7 @@ _e_wl_shell_shell_surface_cb_mouse_up(void *data, Evas_Object *obj EINA_UNUSED,
}
static void
-_e_wl_shell_shell_surface_cb_mouse_down(void *data, Evas_Object *obj EINA_UNUSED, void *event)
+_e_wl_shell_shell_surface_cb_mouse_down(void *data, Evas *e EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *event)
{
E_Wayland_Surface *ews = NULL;
struct wl_pointer *ptr = NULL;
@@ -1378,9 +1229,8 @@ _e_wl_shell_shell_surface_cb_mouse_down(void *data, Evas_Object *obj EINA_UNUSED
/* update some pointer properties */
if (ptr->button_count == 0)
{
- ptr->x = wl_fixed_from_int(ev->output.x);
- ptr->y = wl_fixed_from_int(ev->output.y);
-
+ ptr->x = wl_fixed_from_int(ev->output.x - ews->ec->client.x);
+ ptr->y = wl_fixed_from_int(ev->output.y - ews->ec->client.y);
ptr->grab_x = ptr->x;
ptr->grab_y = ptr->y;
ptr->grab_button = btn;
@@ -1399,7 +1249,7 @@ _e_wl_shell_shell_surface_cb_mouse_down(void *data, Evas_Object *obj EINA_UNUSED
}
static void
-_e_wl_shell_shell_surface_cb_mouse_wheel(void *data, Evas_Object *obj EINA_UNUSED, void *event)
+_e_wl_shell_shell_surface_cb_mouse_wheel(void *data, Evas *e EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *event)
{
E_Wayland_Surface *ews = NULL;
struct wl_pointer *ptr = NULL;
@@ -1440,7 +1290,7 @@ _e_wl_shell_shell_surface_cb_mouse_wheel(void *data, Evas_Object *obj EINA_UNUSE
}
static void
-_e_wl_shell_shell_surface_cb_key_up(void *data, Evas_Object *obj EINA_UNUSED, void *event)
+_e_wl_shell_shell_surface_cb_key_up(void *data, Evas *e EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *event)
{
Evas_Event_Key_Up *ev;
E_Wayland_Surface *ews = NULL;
@@ -1490,7 +1340,7 @@ _e_wl_shell_shell_surface_cb_key_up(void *data, Evas_Object *obj EINA_UNUSED, vo
}
static void
-_e_wl_shell_shell_surface_cb_key_down(void *data, Evas_Object *obj EINA_UNUSED, void *event)
+_e_wl_shell_shell_surface_cb_key_down(void *data, Evas *e EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *event EINA_UNUSED)
{
Evas_Event_Key_Down *ev;
E_Wayland_Surface *ews = NULL;
@@ -1518,7 +1368,6 @@ _e_wl_shell_shell_surface_cb_key_down(void *data, Evas_Object *obj EINA_UNUSED,
/* if the compositor has a ping callback, call it on this surface */
if (_e_wl_comp->ping_cb) _e_wl_comp->ping_cb(ews, serial);
- /* get the keycode for this key from X */
key = ecore_x_keysym_keycode_get(ev->keyname) - 8;
/* update the keyboards grab properties */
@@ -1554,19 +1403,80 @@ _e_wl_shell_shell_surface_cb_key_down(void *data, Evas_Object *obj EINA_UNUSED,
}
static void
-_e_wl_shell_shell_surface_cb_bd_move_end(void *data, void *bd)
+_e_wl_shell_shell_surface_cb_ec_hook_focus_unset(void *data EINA_UNUSED, E_Client *ec)
{
E_Wayland_Surface *ews = NULL;
- struct wl_pointer *ptr = NULL;
- E_Border *border = NULL;
+ E_Wayland_Input *input = NULL;
+ Eina_List *l = NULL;
+
+ if (e_pixmap_type_get(ec->pixmap) != E_PIXMAP_TYPE_WL) return;
+ /* try to cast data to our surface structure */
+ if (!(ews = (E_Wayland_Surface*)ec->comp_data)) return;
+
+ /* if this surface is not visible, get out */
+ if (!ews->mapped) return;
- /* FIXME: wayland move/resize with keyboard ? */
+ /* loop the list of inputs */
+ EINA_LIST_FOREACH(_e_wl_comp->seats, l, input)
+ {
+ /* set keyboard focus */
+ wl_keyboard_set_focus(input->wl.seat.keyboard, NULL);
+
+ /* end any keyboard grabs */
+ wl_keyboard_end_grab(input->wl.seat.keyboard);
+ }
+}
+
+static void
+_e_wl_shell_shell_surface_cb_ec_hook_focus_set(void *data EINA_UNUSED, E_Client *ec)
+{
+ E_Wayland_Surface *ews = NULL;
+ E_Wayland_Input *input = NULL;
+ struct wl_pointer *ptr = NULL;
+ Eina_List *l = NULL;
+ if (e_pixmap_type_get(ec->pixmap) != E_PIXMAP_TYPE_WL) return;
/* try to cast data to our surface structure */
- if (!(ews = data)) return;
+ if (!(ews = (E_Wayland_Surface*)ec->comp_data)) return;
+
+ /* try to get the pointer from this input */
+ if ((ptr = _e_wl_comp->input->wl.seat.pointer))
+ {
+ /* if the mouse entered this surface & it is not the current surface */
+ if (ews->wl.surface != ptr->current)
+ {
+ const struct wl_pointer_grab_interface *grab;
+
+ /* set this surface as the current */
+ grab = ptr->grab->interface;
+ ptr->current = ews->wl.surface;
+
+ /* send a pointer focus event */
+ grab->focus(ptr->grab, ews->wl.surface,
+ ptr->current_x, ptr->current_y);
+ }
+ }
+ /* loop the list of inputs */
+ EINA_LIST_FOREACH(_e_wl_comp->seats, l, input)
+ {
+ /* set keyboard focus */
+ wl_keyboard_set_focus(input->wl.seat.keyboard, ews->wl.surface);
+
+ /* update the keyboard focus in the data device */
+ wl_data_device_set_keyboard_focus(&input->wl.seat);
+ }
+}
+
+static void
+_e_wl_shell_shell_surface_cb_ec_hook_move_end(void *data EINA_UNUSED, E_Client *ec)
+{
+ E_Wayland_Surface *ews = NULL;
+ struct wl_pointer *ptr = NULL;
- border = bd;
- if (border != ews->bd) return;
+return;
+ if (e_pixmap_type_get(ec->pixmap) != E_PIXMAP_TYPE_WL) return;
+ /* try to cast data to our surface structure */
+ if (!(ews = (E_Wayland_Surface*)ec->comp_data)) return;
/* try to get the pointer from this input */
if ((ptr = _e_wl_comp->input->wl.seat.pointer))
@@ -1593,72 +1503,66 @@ _e_wl_shell_shell_surface_cb_bd_move_end(void *data, void *bd)
}
static void
-_e_wl_shell_shell_surface_cb_bd_resize_update(void *data, void *bd)
+_e_wl_shell_shell_surface_cb_ec_hook_resize_end(void *data EINA_UNUSED, E_Client *ec)
{
- /* E_Wayland_Shell_Grab *grab = NULL; */
E_Wayland_Surface *ews = NULL;
struct wl_pointer *ptr = NULL;
- E_Border *border = NULL;
-
+return;
+ if (e_pixmap_type_get(ec->pixmap) != E_PIXMAP_TYPE_WL) return;
/* try to cast data to our surface structure */
- if (!(ews = data)) return;
-
- border = bd;
- if (border != ews->bd) return;
+ if (!(ews = (E_Wayland_Surface*)ec->comp_data)) return;
/* try to get the pointer from this input */
if ((ptr = _e_wl_comp->input->wl.seat.pointer))
{
- Evas_Coord w = 0, h = 0;
-
+ /* do we have a valid pointer grab ? */
if (!ptr->grab) return;
+ /* is this grab the 'move' interface ? */
if (ptr->grab->interface != &_e_resize_grab_interface)
return;
+ /* does this shell have a valid shell surface ? */
if (!ews->shell_surface) return;
+ /* is the shell surface the same one in the grab ? */
if ((ptr->current) && (ptr->current != ews->wl.surface)) return;
- /* if (!(grab = (E_Wayland_Shell_Grab *)ptr->grab)) return; */
+ ptr->button_count--;
- w = border->w;
- h = border->h;
+ /* send this button press to the pointer */
+ ptr->grab->interface->button(ptr->grab,
+ ptr->grab_time,
+ ptr->grab_button,
+ WL_POINTER_BUTTON_STATE_RELEASED);
- wl_shell_surface_send_configure(ews->shell_surface->wl.resource,
- ptr->grab->edges, w, h);
+ if (ptr->button_count == 1)
+ ptr->grab_serial = wl_display_get_serial(_e_wl_comp->wl.display);
}
}
static void
-_e_wl_shell_shell_surface_cb_bd_resize_end(void *data, void *bd)
+_e_wl_shell_shell_surface_cb_ec_hook_resize_update(void *data EINA_UNUSED, E_Client *ec)
{
E_Wayland_Surface *ews = NULL;
struct wl_pointer *ptr = NULL;
- E_Border *border = NULL;
-
- /* FIXME: wayland move/resize with keyboard ? */
-
+return;
+ if (e_pixmap_type_get(ec->pixmap) != E_PIXMAP_TYPE_WL) return;
/* try to cast data to our surface structure */
- if (!(ews = data)) return;
-
- border = bd;
- if (border != ews->bd) return;
+ if (!(ews = (E_Wayland_Surface*)ec->comp_data)) return;
/* try to get the pointer from this input */
if ((ptr = _e_wl_comp->input->wl.seat.pointer))
{
- /* do we have a valid pointer grab ? */
+ Evas_Coord w = 0, h = 0;
+
if (!ptr->grab) return;
- /* is this grab the 'move' interface ? */
if (ptr->grab->interface != &_e_resize_grab_interface)
return;
- /* does this shell have a valid shell surface ? */
if (!ews->shell_surface) return;
- /* is the shell surface the same one in the grab ? */
if ((ptr->current) && (ptr->current != ews->wl.surface)) return;
/* send this button press to the pointer */
@@ -1666,6 +1570,36 @@ _e_wl_shell_shell_surface_cb_bd_resize_end(void *data, void *bd)
ptr->grab_time,
ptr->grab_button,
WL_POINTER_BUTTON_STATE_RELEASED);
+ w = ec->client.w;
+ h = ec->client.h;
+
+ wl_shell_surface_send_configure(ews->shell_surface->wl.resource,
+ ptr->grab->edges, w, h);
+ }
+}
+
+static void
+_e_wl_shell_surface_cb_smart_client_resize(void *data, Evas_Object *obj EINA_UNUSED, void *event_info EINA_UNUSED)
+{
+ E_Wayland_Shell_Grab *grab = NULL;
+ E_Wayland_Surface *ews = NULL;
+ struct wl_pointer *ptr = NULL;
+
+ /* try to cast data to our surface structure */
+ ews = data;
+
+ /* try to get the pointer from this input */
+ if ((ptr = _e_wl_comp->input->wl.seat.pointer))
+ {
+ Evas_Coord w = 0, h = 0;
+
+ if (!(grab = (E_Wayland_Shell_Grab *)ptr->grab)) return;
+
+ w = ews->ec->client.w;
+ h = ews->ec->client.h;
+
+ wl_shell_surface_send_configure(ews->shell_surface->wl.resource,
+ grab->edges, w, h);
}
}
@@ -1711,93 +1645,94 @@ _e_wl_shell_shell_surface_cb_pong(struct wl_client *client EINA_UNUSED, struct w
}
static void
-_e_wl_shell_mouse_down_helper(E_Border *bd, int button, Evas_Point *output, E_Binding_Event_Mouse_Button *ev, Eina_Bool move)
+_e_wl_shell_mouse_down_helper(E_Client *ec, int button, Evas_Point *output, E_Binding_Event_Mouse_Button *ev, Eina_Bool move)
{
+ INF("MOUSE DOWN: %dx%d", output->x, output->y);
if ((button >= 1) && (button <= 3))
{
- bd->mouse.last_down[button - 1].mx = output->x;
- bd->mouse.last_down[button - 1].my = output->y;
- bd->mouse.last_down[button - 1].x = bd->x;
- bd->mouse.last_down[button - 1].y = bd->y;
- bd->mouse.last_down[button - 1].w = bd->w;
- bd->mouse.last_down[button - 1].h = bd->h;
+ ec->mouse.last_down[button - 1].mx = output->x;
+ ec->mouse.last_down[button - 1].my = output->y;
+ ec->mouse.last_down[button - 1].x = ec->x;
+ ec->mouse.last_down[button - 1].y = ec->y;
+ ec->mouse.last_down[button - 1].w = ec->w;
+ ec->mouse.last_down[button - 1].h = ec->h;
}
else
{
- bd->moveinfo.down.x = bd->x;
- bd->moveinfo.down.y = bd->y;
- bd->moveinfo.down.w = bd->w;
- bd->moveinfo.down.h = bd->h;
+ ec->moveinfo.down.x = ec->x;
+ ec->moveinfo.down.y = ec->y;
+ ec->moveinfo.down.w = ec->w;
+ ec->moveinfo.down.h = ec->h;
}
- bd->mouse.current.mx = output->x;
- bd->mouse.current.my = output->y;
+ ec->mouse.current.mx = output->x;
+ ec->mouse.current.my = output->y;
if (move)
{
- /* tell E to start moving the border */
- e_border_act_move_begin(bd, ev);
+ /* tell E to start moving the client */
+ e_client_act_move_begin(ec, ev);
/* we have to get a reference to the window_move action here, or else
- * when e_border stops the move we will never get notified */
- bd->cur_mouse_action = e_action_find("window_move");
- if (bd->cur_mouse_action)
- e_object_ref(E_OBJECT(bd->cur_mouse_action));
+ * when e_client stops the move we will never get notified */
+ ec->cur_mouse_action = e_action_find("window_move");
+ if (ec->cur_mouse_action)
+ e_object_ref(E_OBJECT(ec->cur_mouse_action));
}
else
{
- /* tell E to start resizing the border */
- e_border_act_resize_begin(bd, ev);
+ /* tell E to start resizing the client */
+ e_client_act_resize_begin(ec, ev);
/* we have to get a reference to the window_resize action here,
- * or else when e_border stops the resize we will never get notified */
- bd->cur_mouse_action = e_action_find("window_resize");
- if (bd->cur_mouse_action)
- e_object_ref(E_OBJECT(bd->cur_mouse_action));
+ * or else when e_client stops the resize we will never get notified */
+ ec->cur_mouse_action = e_action_find("window_resize");
+ if (ec->cur_mouse_action)
+ e_object_ref(E_OBJECT(ec->cur_mouse_action));
}
- e_focus_event_mouse_down(bd);
+ e_focus_event_mouse_down(ec);
if ((button >= 1) && (button <= 3))
{
- bd->mouse.last_down[button - 1].mx = output->x;
- bd->mouse.last_down[button - 1].my = output->y;
- bd->mouse.last_down[button - 1].x = bd->x;
- bd->mouse.last_down[button - 1].y = bd->y;
- bd->mouse.last_down[button - 1].w = bd->w;
- bd->mouse.last_down[button - 1].h = bd->h;
+ ec->mouse.last_down[button - 1].mx = output->x;
+ ec->mouse.last_down[button - 1].my = output->y;
+ ec->mouse.last_down[button - 1].x = ec->x;
+ ec->mouse.last_down[button - 1].y = ec->y;
+ ec->mouse.last_down[button - 1].w = ec->w;
+ ec->mouse.last_down[button - 1].h = ec->h;
}
else
{
- bd->moveinfo.down.x = bd->x;
- bd->moveinfo.down.y = bd->y;
- bd->moveinfo.down.w = bd->w;
- bd->moveinfo.down.h = bd->h;
+ ec->moveinfo.down.x = ec->x;
+ ec->moveinfo.down.y = ec->y;
+ ec->moveinfo.down.w = ec->w;
+ ec->moveinfo.down.h = ec->h;
}
- bd->mouse.current.mx = output->x;
- bd->mouse.current.my = output->y;
+ ec->mouse.current.mx = output->x;
+ ec->mouse.current.my = output->y;
}
static void
-_e_wl_shell_mouse_up_helper(E_Border *bd, int button, Evas_Point *output, E_Binding_Event_Mouse_Button *ev EINA_UNUSED)
+_e_wl_shell_mouse_up_helper(E_Client *ec, int button, Evas_Point *output, E_Binding_Event_Mouse_Button *ev EINA_UNUSED)
{
if ((button >= 1) && (button <= 3))
{
- bd->mouse.last_up[button - 1].mx = output->x;
- bd->mouse.last_up[button - 1].my = output->y;
- bd->mouse.last_up[button - 1].x = bd->x;
- bd->mouse.last_up[button - 1].y = bd->y;
+ ec->mouse.last_up[button - 1].mx = output->x;
+ ec->mouse.last_up[button - 1].my = output->y;
+ ec->mouse.last_up[button - 1].x = ec->x;
+ ec->mouse.last_up[button - 1].y = ec->y;
}
- bd->mouse.current.mx = output->x;
- bd->mouse.current.my = output->y;
+ ec->mouse.current.mx = output->x;
+ ec->mouse.current.my = output->y;
if ((button >= 1) && (button <= 3))
{
- bd->mouse.last_up[button - 1].mx = output->x;
- bd->mouse.last_up[button - 1].my = output->y;
- bd->mouse.last_up[button - 1].x = bd->x;
- bd->mouse.last_up[button - 1].y = bd->y;
+ ec->mouse.last_up[button - 1].mx = output->x;
+ ec->mouse.last_up[button - 1].my = output->y;
+ ec->mouse.last_up[button - 1].x = ec->x;
+ ec->mouse.last_up[button - 1].y = ec->y;
}
- bd->drag.start = 0;
+ ec->drag.start = 0;
}
static void
@@ -1806,7 +1741,7 @@ _e_wl_shell_shell_surface_cb_move(struct wl_client *client EINA_UNUSED, struct w
E_Wayland_Input *input = NULL;
E_Wayland_Shell_Surface *ewss = NULL;
E_Wayland_Shell_Grab *grab = NULL;
- E_Binding_Event_Mouse_Button *ev;
+ E_Binding_Event_Mouse_Button ev;
struct wl_pointer *ptr = NULL;
/* try to cast the seat resource to our input structure */
@@ -1841,27 +1776,23 @@ _e_wl_shell_shell_surface_cb_move(struct wl_client *client EINA_UNUSED, struct w
&_e_move_grab_interface,
E_DESKTOP_SHELL_CURSOR_MOVE);
- /* create a fake binding event for mouse button */
- ev = E_NEW(E_Binding_Event_Mouse_Button, 1);
-
/* set button property of the binding event */
if (grab->grab.pointer->grab_button == BTN_LEFT)
- ev->button = 1;
+ ev.button = 1;
else if (grab->grab.pointer->grab_button == BTN_MIDDLE)
- ev->button = 2;
+ ev.button = 2;
else if (grab->grab.pointer->grab_button == BTN_RIGHT)
- ev->button = 3;
+ ev.button = 3;
+ else
+ ev.button = 0;
/* set the clicked location in the binding event */
- ev->canvas.x = wl_fixed_to_int(ptr->x) +
- (ewss->surface->bd->x + ewss->surface->bd->client_inset.l);
- ev->canvas.y = wl_fixed_to_int(ptr->y) +
- (ewss->surface->bd->y + ewss->surface->bd->client_inset.t);
+ e_comp_object_frame_xy_unadjust(ewss->surface->ec->frame, wl_fixed_to_int(ptr->x), wl_fixed_to_int(ptr->y), &ev.canvas.x, &ev.canvas.y);
/* call our helper function to initiate a move */
- _e_wl_shell_mouse_down_helper(ewss->surface->bd, ev->button,
- &(Evas_Point){ev->canvas.x, ev->canvas.y},
- ev, EINA_TRUE);
+ _e_wl_shell_mouse_down_helper(ewss->surface->ec, ev.button,
+ &(Evas_Point){ev.canvas.x + ewss->surface->ec->client.x, ev.canvas.y + ewss->surface->ec->client.y},
+ &ev, EINA_TRUE);
}
static void
@@ -1870,7 +1801,7 @@ _e_wl_shell_shell_surface_cb_resize(struct wl_client *client EINA_UNUSED, struct
E_Wayland_Input *input = NULL;
E_Wayland_Shell_Surface *ewss = NULL;
E_Wayland_Shell_Grab *grab = NULL;
- E_Binding_Event_Mouse_Button *ev;
+ E_Binding_Event_Mouse_Button ev;
struct wl_pointer *ptr = NULL;
/* try to cast the seat resource to our input structure */
@@ -1912,26 +1843,22 @@ _e_wl_shell_shell_surface_cb_resize(struct wl_client *client EINA_UNUSED, struct
_e_wl_shell_grab_start(grab, ewss, input->wl.seat.pointer,
&_e_resize_grab_interface, edges);
- /* create a fake binding event for mouse button */
- ev = E_NEW(E_Binding_Event_Mouse_Button, 1);
-
if (grab->grab.pointer->grab_button == BTN_LEFT)
- ev->button = 1;
+ ev.button = 1;
else if (grab->grab.pointer->grab_button == BTN_MIDDLE)
- ev->button = 2;
+ ev.button = 2;
else if (grab->grab.pointer->grab_button == BTN_RIGHT)
- ev->button = 3;
+ ev.button = 3;
+ else
+ ev.button = 0;
/* set the clicked location in the binding event */
- ev->canvas.x = wl_fixed_to_int(ptr->x) +
- (ewss->surface->bd->x + ewss->surface->bd->client_inset.l);
- ev->canvas.y = wl_fixed_to_int(ptr->y) +
- (ewss->surface->bd->y + ewss->surface->bd->client_inset.t);
+ e_comp_object_frame_xy_unadjust(ewss->surface->ec->frame, wl_fixed_to_int(ptr->x), wl_fixed_to_int(ptr->y), &ev.canvas.x, &ev.canvas.y);
/* call our helper function to initiate a resize */
- _e_wl_shell_mouse_down_helper(ewss->surface->bd, ev->button,
- &(Evas_Point){ev->canvas.x, ev->canvas.y},
- ev, EINA_FALSE);
+ _e_wl_shell_mouse_down_helper(ewss->surface->ec, ev.button,
+ &(Evas_Point){ev.canvas.x + ewss->surface->ec->client.x, ev.canvas.y + ewss->surface->ec->client.y},
+ &ev, EINA_FALSE);
}
static void
@@ -1975,7 +1902,7 @@ _e_wl_shell_shell_surface_cb_fullscreen_set(struct wl_client *client EINA_UNUSED
/* NB FIXME: Disable fullscreen support for right now.
*
- * Appears to be some recent issue with e_border...
+ * Appears to be some recent issue with e_client...
*
* Needs looking into */
return;
@@ -1987,18 +1914,16 @@ _e_wl_shell_shell_surface_cb_fullscreen_set(struct wl_client *client EINA_UNUSED
/* set next surface type */
ewss->next_type = E_WAYLAND_SHELL_SURFACE_TYPE_TOPLEVEL;
- /* check for valid border */
- if (ewss->surface->bd)
+ /* check for valid client */
+ if (ewss->surface->ec)
{
- /* ecore_evas_fullscreen_set(ewss->surface->ee, EINA_TRUE); */
-
/* tell E to fullscreen this window */
- e_border_fullscreen(ewss->surface->bd, E_FULLSCREEN_RESIZE);
+ e_client_fullscreen(ewss->surface->ec, E_FULLSCREEN_RESIZE);
/* send configure message to the shell surface to inform of new size */
wl_shell_surface_send_configure(ewss->wl.resource, 0,
- ewss->surface->bd->w,
- ewss->surface->bd->h);
+ ewss->surface->ec->w,
+ ewss->surface->ec->h);
}
}
@@ -2038,22 +1963,22 @@ _e_wl_shell_shell_surface_cb_maximized_set(struct wl_client *client EINA_UNUSED,
/* set next surface type */
ewss->next_type = E_WAYLAND_SHELL_SURFACE_TYPE_MAXIMIZED;
- /* check for valid border */
- if (ewss->surface->bd)
+ /* check for valid client */
+ if (ewss->surface->ec)
{
unsigned int edges = 0;
edges = (WL_SHELL_SURFACE_RESIZE_TOP | WL_SHELL_SURFACE_RESIZE_LEFT);
/* tell E to maximize this window */
- e_border_maximize(ewss->surface->bd,
+ e_client_maximize(ewss->surface->ec,
(e_config->maximize_policy & E_MAXIMIZE_TYPE) |
E_MAXIMIZE_BOTH);
/* send configure message to the shell surface to inform of new size */
wl_shell_surface_send_configure(ewss->wl.resource, edges,
- ewss->surface->bd->w,
- ewss->surface->bd->h);
+ ewss->surface->ec->w,
+ ewss->surface->ec->h);
}
}
@@ -2061,48 +1986,29 @@ static void
_e_wl_shell_shell_surface_cb_title_set(struct wl_client *client EINA_UNUSED, struct wl_resource *resource, const char *title)
{
E_Wayland_Shell_Surface *ewss = NULL;
- E_Wayland_Surface *ews = NULL;
/* try to cast the resource to our shell surface */
if (!(ewss = wl_resource_get_user_data(resource)))
return;
- /* free any previous title */
- free(ewss->title);
-
- /* set new title */
- ewss->title = strdup(title);
-
- /* update ecore_evas with new title */
- if ((ews = ewss->surface))
- {
- if (ews->ee)
- ecore_evas_title_set(ews->ee, ewss->title);
- }
+ eina_stringshare_replace(&ewss->title, title);
+ if (!ewss->surface->ec) return;
+ eina_stringshare_refplace(&ewss->surface->ec->icccm.title, ewss->title);
+ e_comp_object_frame_title_set(ewss->surface->ec->frame, title);
}
static void
_e_wl_shell_shell_surface_cb_class_set(struct wl_client *client EINA_UNUSED, struct wl_resource *resource, const char *clas)
{
E_Wayland_Shell_Surface *ewss = NULL;
- E_Wayland_Surface *ews = NULL;
/* try to cast the resource to our shell surface */
if (!(ewss = wl_resource_get_user_data(resource)))
return;
- /* free any previous class */
- free(ewss->clas);
-
- /* set new class */
- ewss->clas = strdup(clas);
-
- /* update ecore_evas with new class */
- if ((ews = ewss->surface))
- {
- if (ews->ee)
- ecore_evas_name_class_set(ews->ee, ewss->title, ewss->clas);
- }
+ eina_stringshare_replace(&ewss->clas, clas);
+ if (!ewss->surface->ec) return;
+ eina_stringshare_refplace(&ewss->surface->ec->icccm.class, clas);
}
/* shell move_grab interface functions */
@@ -2122,7 +2028,7 @@ static void
_e_wl_shell_move_grab_cb_motion(struct wl_pointer_grab *grab EINA_UNUSED, unsigned int timestamp EINA_UNUSED, wl_fixed_t x EINA_UNUSED, wl_fixed_t y EINA_UNUSED)
{
/* FIXME: This needs to become a no-op as the actual surface movement
- * is handled by e_border now */
+ * is handled by e_client now */
}
static void
@@ -2156,34 +2062,32 @@ _e_wl_shell_move_grab_cb_button(struct wl_pointer_grab *grab, unsigned int times
(state == WL_POINTER_BUTTON_STATE_RELEASED))
{
E_Wayland_Surface *ews = NULL;
- int btn = 0, x, y;
+ E_Binding_Event_Mouse_Button ev;
if (!(ews = ewsg->shell_surface->surface)) return;
/* set button property of the binding event */
if (ptr->grab_button == BTN_LEFT)
- btn = 1;
+ ev.button = 1;
else if (ptr->grab_button == BTN_MIDDLE)
- btn = 2;
+ ev.button = 2;
else if (ptr->grab_button == BTN_RIGHT)
- btn = 3;
+ ev.button = 3;
/* set the clicked location in the binding event */
- x = wl_fixed_to_int(ptr->x) +
- (ews->bd->x + ews->bd->client_inset.l);
- y = wl_fixed_to_int(ptr->y) +
- (ews->bd->y + ews->bd->client_inset.t);
+ e_comp_object_frame_xy_unadjust(ews->ec->frame, wl_fixed_to_int(ptr->x), wl_fixed_to_int(ptr->y), &ev.canvas.x, &ev.canvas.y);
/* call our helper function to end a move */
- _e_wl_shell_mouse_up_helper(ews->bd, btn,
- &(Evas_Point){x, y}, NULL);
+ _e_wl_shell_mouse_up_helper(ews->ec, ev.button,
+ &(Evas_Point){ev.canvas.x + ews->ec->client.x, ev.canvas.y + ews->ec->client.y},
+ &ev);
/* end the grab */
_e_wl_shell_grab_end(ewsg);
free(grab);
/* set surface geometry */
- _e_wl_shell_shell_surface_configure(ews, ews->bd->x, ews->bd->y,
+ _e_wl_shell_shell_surface_configure(ews, ews->ec->x, ews->ec->y,
ews->geometry.w,
ews->geometry.h);
}
@@ -2206,7 +2110,7 @@ static void
_e_wl_shell_resize_grab_cb_motion(struct wl_pointer_grab *grab EINA_UNUSED, unsigned int timestamp EINA_UNUSED, wl_fixed_t x EINA_UNUSED, wl_fixed_t y EINA_UNUSED)
{
/* FIXME: This needs to become a no-op as the actual surface resize
- * is handled by e_border now */
+ * is handled by e_client now */
}
static void
@@ -2240,34 +2144,32 @@ _e_wl_shell_resize_grab_cb_button(struct wl_pointer_grab *grab, unsigned int tim
(state == WL_POINTER_BUTTON_STATE_RELEASED))
{
E_Wayland_Surface *ews = NULL;
- int btn = 0, x, y;
+ E_Binding_Event_Mouse_Button ev;
if (!(ews = ewsg->shell_surface->surface)) return;
/* set button property of the binding event */
if (ptr->grab_button == BTN_LEFT)
- btn = 1;
+ ev.button = 1;
else if (ptr->grab_button == BTN_MIDDLE)
- btn = 2;
+ ev.button = 2;
else if (ptr->grab_button == BTN_RIGHT)
- btn = 3;
+ ev.button = 3;
/* set the clicked location in the binding event */
- x = wl_fixed_to_int(ptr->x) +
- (ews->bd->x + ews->bd->client_inset.l);
- y = wl_fixed_to_int(ptr->y) +
- (ews->bd->y + ews->bd->client_inset.t);
+ e_comp_object_frame_xy_unadjust(ews->ec->frame, wl_fixed_to_int(ptr->x), wl_fixed_to_int(ptr->y), &ev.canvas.x, &ev.canvas.y);
/* call our helper function to end a move */
- _e_wl_shell_mouse_up_helper(ews->bd, btn,
- &(Evas_Point){x, y}, NULL);
+ _e_wl_shell_mouse_up_helper(ews->ec, ev.button,
+ &(Evas_Point){ev.canvas.x + ews->ec->client.x, ev.canvas.y + ews->ec->client.y},
+ &ev);
/* end the grab */
_e_wl_shell_grab_end(ewsg);
free(grab);
/* set surface geometry */
- _e_wl_shell_shell_surface_configure(ews, ews->bd->x, ews->bd->y,
+ _e_wl_shell_shell_surface_configure(ews, ews->ec->x, ews->ec->y,
ews->geometry.w,
ews->geometry.h);
}
diff --git a/src/modules/xkbswitch/e_mod_config.c b/src/modules/xkbswitch/e_mod_config.c
index 2f063d5e94..a621cbd817 100644
--- a/src/modules/xkbswitch/e_mod_config.c
+++ b/src/modules/xkbswitch/e_mod_config.c
@@ -57,7 +57,7 @@ static Eina_Bool _cb_fill_delay(void *data);
/* Externals */
E_Config_Dialog *
-_xkb_cfg_dialog(E_Container *con, const char *params __UNUSED__)
+_xkb_cfg_dialog(E_Comp *comp, const char *params __UNUSED__)
{
E_Config_Dialog *cfd;
E_Config_Dialog_View *v;
@@ -71,7 +71,7 @@ _xkb_cfg_dialog(E_Container *con, const char *params __UNUSED__)
v->basic.create_widgets = _basic_create;
v->basic.apply_cfdata = _basic_apply;
- cfd = e_config_dialog_new(con, _("Keyboard Settings"), "E",
+ cfd = e_config_dialog_new(comp, _("Keyboard Settings"), "E",
"keyboard_and_mouse/xkbswitch",
"preferences-desktop-keyboard",
0, v, NULL);
@@ -451,7 +451,7 @@ _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->con, "E", "xkbswitch_config_add_dialog"))) return NULL;
+ if (!(dlg = e_dialog_new(_xkb.cfd->comp, "E", "xkbswitch_config_add_dialog"))) return NULL;
e_dialog_resizable_set(dlg, 1);
dlg->data = cfdata;
diff --git a/src/modules/xkbswitch/e_mod_main.c b/src/modules/xkbswitch/e_mod_main.c
index ddcbb35995..213987f605 100644
--- a/src/modules/xkbswitch/e_mod_main.c
+++ b/src/modules/xkbswitch/e_mod_main.c
@@ -480,7 +480,7 @@ static void
_e_xkb_cb_menu_configure(void *data __UNUSED__, E_Menu *mn, E_Menu_Item *mi __UNUSED__)
{
if (_xkb.cfd) return;
- _xkb_cfg_dialog(mn->zone->container, NULL);
+ _xkb_cfg_dialog(mn->zone->comp, NULL);
}
static void
diff --git a/src/modules/xkbswitch/e_mod_main.h b/src/modules/xkbswitch/e_mod_main.h
index bfeefd1a35..f02adf457c 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_Container *con, const char *params);
+E_Config_Dialog *_xkb_cfg_dialog(E_Comp *comp, const char *params);
extern Xkb _xkb;