2005-05-14 07:08:16 -07:00
|
|
|
#include "e.h"
|
|
|
|
#include "e_mod_main.h"
|
|
|
|
|
2006-05-17 23:30:33 -07:00
|
|
|
/* gadcon requirements */
|
2006-05-31 09:31:51 -07:00
|
|
|
static E_Gadcon_Client *_gc_init(E_Gadcon *gc, const char *name, const char *id, const char *style);
|
2012-08-15 00:00:02 -07:00
|
|
|
static void _gc_shutdown(E_Gadcon_Client *gcc);
|
|
|
|
static void _gc_orient(E_Gadcon_Client *gcc, E_Gadcon_Orient orient);
|
|
|
|
static const char *_gc_label(const E_Gadcon_Client_Class *client_class);
|
|
|
|
static Evas_Object *_gc_icon(const E_Gadcon_Client_Class *client_class, Evas *evas);
|
|
|
|
static const char *_gc_id_new(const E_Gadcon_Client_Class *client_class);
|
|
|
|
static void _gc_id_del(const E_Gadcon_Client_Class *client_class, const char *id);
|
2006-05-17 23:30:33 -07:00
|
|
|
/* and actually define the gadcon class that this module provides (just 1) */
|
|
|
|
static const E_Gadcon_Client_Class _gadcon_class =
|
2005-09-23 10:13:47 -07:00
|
|
|
{
|
2006-05-17 23:30:33 -07:00
|
|
|
GADCON_CLIENT_CLASS_VERSION,
|
2012-08-15 00:00:02 -07:00
|
|
|
"ibox",
|
|
|
|
{
|
|
|
|
_gc_init, _gc_shutdown, _gc_orient, _gc_label, _gc_icon, _gc_id_new, _gc_id_del,
|
|
|
|
e_gadcon_site_is_not_toolbar
|
|
|
|
},
|
2006-08-08 23:38:35 -07:00
|
|
|
E_GADCON_CLIENT_STYLE_INSET
|
2005-09-23 10:13:47 -07:00
|
|
|
};
|
|
|
|
|
2006-05-17 23:30:33 -07:00
|
|
|
/* actual module specifics */
|
|
|
|
|
|
|
|
typedef struct _Instance Instance;
|
|
|
|
|
|
|
|
typedef struct _IBox IBox;
|
|
|
|
typedef struct _IBox_Icon IBox_Icon;
|
|
|
|
|
|
|
|
struct _Instance
|
2005-05-14 07:08:16 -07:00
|
|
|
{
|
2006-05-17 23:30:33 -07:00
|
|
|
E_Gadcon_Client *gcc;
|
2014-01-29 10:25:38 -08:00
|
|
|
E_Comp_Object_Mover *iconify_provider;
|
2006-05-17 23:30:33 -07:00
|
|
|
Evas_Object *o_ibox;
|
|
|
|
IBox *ibox;
|
|
|
|
E_Drop_Handler *drop_handler;
|
2007-09-15 17:02:53 -07:00
|
|
|
Config_Item *ci;
|
2012-08-15 00:00:02 -07:00
|
|
|
E_Gadcon_Orient orient;
|
2006-05-17 23:30:33 -07:00
|
|
|
};
|
2005-05-14 07:08:16 -07:00
|
|
|
|
2006-05-17 23:30:33 -07:00
|
|
|
struct _IBox
|
|
|
|
{
|
2012-08-15 00:00:02 -07:00
|
|
|
Instance *inst;
|
|
|
|
Evas_Object *o_box;
|
|
|
|
Evas_Object *o_drop;
|
|
|
|
Evas_Object *o_drop_over;
|
|
|
|
Evas_Object *o_empty;
|
|
|
|
IBox_Icon *ic_drop_before;
|
|
|
|
int drop_before;
|
|
|
|
Eina_List *icons;
|
|
|
|
E_Zone *zone;
|
|
|
|
Evas_Coord dnd_x, dnd_y;
|
2006-05-17 23:30:33 -07:00
|
|
|
};
|
2005-05-14 07:08:16 -07:00
|
|
|
|
2006-05-17 23:30:33 -07:00
|
|
|
struct _IBox_Icon
|
2005-05-14 07:08:16 -07:00
|
|
|
{
|
2006-05-17 23:30:33 -07:00
|
|
|
IBox *ibox;
|
|
|
|
Evas_Object *o_holder;
|
|
|
|
Evas_Object *o_icon;
|
|
|
|
Evas_Object *o_holder2;
|
|
|
|
Evas_Object *o_icon2;
|
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
2014-01-14 17:19:12 -08:00
|
|
|
E_Client *client;
|
2012-08-15 00:00:02 -07:00
|
|
|
struct
|
|
|
|
{
|
2017-11-08 06:22:24 -08:00
|
|
|
unsigned char start E_BITFIELD;
|
|
|
|
unsigned char dnd E_BITFIELD;
|
2012-08-15 00:00:02 -07:00
|
|
|
int x, y;
|
|
|
|
int dx, dy;
|
|
|
|
} drag;
|
2006-05-17 23:30:33 -07:00
|
|
|
};
|
2005-05-14 07:08:16 -07:00
|
|
|
|
2015-01-01 14:29:25 -08:00
|
|
|
static IBox *_ibox_new(Evas_Object *parent, E_Zone *zone);
|
2012-08-15 00:00:02 -07:00
|
|
|
static void _ibox_free(IBox *b);
|
|
|
|
static void _ibox_cb_empty_mouse_down(void *data, Evas *e, Evas_Object *obj, void *event_info);
|
|
|
|
static void _ibox_empty_handle(IBox *b);
|
|
|
|
static void _ibox_fill(IBox *b);
|
|
|
|
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);
|
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
2014-01-14 17:19:12 -08:00
|
|
|
static IBox_Icon *_ibox_icon_find(IBox *b, E_Client *ec);
|
2012-08-15 00:00:02 -07:00
|
|
|
static IBox_Icon *_ibox_icon_at_coord(IBox *b, Evas_Coord x, Evas_Coord y);
|
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
2014-01-14 17:19:12 -08:00
|
|
|
static IBox_Icon *_ibox_icon_new(IBox *b, E_Client *ec);
|
2012-08-15 00:00:02 -07:00
|
|
|
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);
|
2020-07-22 07:18:23 -07:00
|
|
|
static void _ibox_icon_fill_preview(IBox_Icon *ic, Eina_Bool is_retry);
|
2012-08-15 00:00:02 -07:00
|
|
|
static void _ibox_icon_empty(IBox_Icon *ic);
|
|
|
|
static void _ibox_icon_signal_emit(IBox_Icon *ic, char *sig, char *src);
|
|
|
|
static Eina_List *_ibox_zone_find(E_Zone *zone);
|
|
|
|
static void _ibox_cb_obj_moveresize(void *data, Evas *e, Evas_Object *obj, void *event_info);
|
|
|
|
static void _ibox_cb_menu_configuration(void *data, E_Menu *m, E_Menu_Item *mi);
|
|
|
|
static void _ibox_cb_icon_mouse_in(void *data, Evas *e, Evas_Object *obj, void *event_info);
|
|
|
|
static void _ibox_cb_icon_mouse_out(void *data, Evas *e, Evas_Object *obj, void *event_info);
|
|
|
|
static void _ibox_cb_icon_mouse_down(void *data, Evas *e, Evas_Object *obj, void *event_info);
|
|
|
|
static void _ibox_cb_icon_mouse_up(void *data, Evas *e, Evas_Object *obj, void *event_info);
|
|
|
|
static void _ibox_cb_icon_mouse_move(void *data, Evas *e, Evas_Object *obj, void *event_info);
|
|
|
|
static void _ibox_cb_icon_move(void *data, Evas *e, Evas_Object *obj, void *event_info);
|
|
|
|
static void _ibox_cb_icon_resize(void *data, Evas *e, Evas_Object *obj, void *event_info);
|
|
|
|
static void _ibox_cb_drag_finished(E_Drag *drag, int dropped);
|
|
|
|
static void _ibox_inst_cb_enter(void *data, const char *type, void *event_info);
|
|
|
|
static void _ibox_inst_cb_move(void *data, const char *type, void *event_info);
|
|
|
|
static void _ibox_inst_cb_leave(void *data, const char *type, void *event_info);
|
|
|
|
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);
|
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
2014-01-14 17:19:12 -08:00
|
|
|
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);
|
2012-08-15 00:00:02 -07:00
|
|
|
static Eina_Bool _ibox_cb_event_desk_show(void *data, int type, void *event);
|
2006-05-25 06:25:37 -07:00
|
|
|
static Config_Item *_ibox_config_item_get(const char *id);
|
2006-05-17 23:30:33 -07:00
|
|
|
|
2006-05-25 06:25:37 -07:00
|
|
|
static E_Config_DD *conf_edd = NULL;
|
|
|
|
static E_Config_DD *conf_item_edd = NULL;
|
2006-05-17 23:30:33 -07:00
|
|
|
|
|
|
|
Config *ibox_config = NULL;
|
|
|
|
|
2014-01-29 01:51:21 -08:00
|
|
|
static void
|
2014-01-29 10:25:38 -08:00
|
|
|
_ibox_cb_iconify_end_cb(void *data, Evas_Object *obj EINA_UNUSED, const char *sig EINA_UNUSED, const char *src EINA_UNUSED)
|
|
|
|
{
|
|
|
|
E_Client *ec = data;
|
|
|
|
|
|
|
|
evas_object_layer_set(ec->frame, ec->layer);
|
|
|
|
ec->layer_block = 0;
|
|
|
|
if (ec->iconic)
|
|
|
|
evas_object_hide(ec->frame);
|
|
|
|
}
|
|
|
|
|
|
|
|
static Eina_Bool
|
|
|
|
_ibox_cb_iconify_provider(void *data, Evas_Object *obj, const char *signal)
|
2014-01-29 01:51:21 -08:00
|
|
|
{
|
|
|
|
Instance *inst = data;
|
|
|
|
IBox_Icon *ic;
|
|
|
|
Evas_Coord ox, oy, ow, oh;
|
|
|
|
Eina_List *l;
|
2014-01-29 10:25:38 -08:00
|
|
|
E_Client *ec;
|
2014-05-07 02:48:18 -07:00
|
|
|
ox = oy = ow = oh = 0;
|
2014-01-29 10:25:38 -08:00
|
|
|
|
|
|
|
ec = e_comp_object_client_get(obj);
|
2014-01-29 14:45:02 -08:00
|
|
|
if (ec->zone != inst->gcc->gadcon->zone) return EINA_FALSE;
|
2014-01-29 10:25:38 -08:00
|
|
|
if (!strcmp(signal, "e,action,uniconify"))
|
2014-01-29 01:51:21 -08:00
|
|
|
{
|
2014-01-29 10:25:38 -08:00
|
|
|
EINA_LIST_FOREACH(inst->ibox->icons, l, ic)
|
2014-01-29 01:51:21 -08:00
|
|
|
{
|
2014-01-29 10:25:38 -08:00
|
|
|
if (ic->client == ec)
|
|
|
|
{
|
|
|
|
evas_object_geometry_get(ic->o_holder, &ox, &oy, &ow, &oh);
|
|
|
|
break;
|
|
|
|
}
|
2014-01-29 01:51:21 -08:00
|
|
|
}
|
|
|
|
}
|
2014-01-29 10:25:38 -08:00
|
|
|
else
|
|
|
|
{
|
|
|
|
// XXX: ibox doesn't know yet where a new icon might go... so assume right
|
|
|
|
// edge of ibox
|
|
|
|
evas_object_geometry_get(inst->ibox->o_box, &ox, &oy, &ow, &oh);
|
|
|
|
ox += ow - 1;
|
|
|
|
oy += (oh / 2);
|
|
|
|
}
|
|
|
|
ec->layer_block = 1;
|
|
|
|
evas_object_layer_set(ec->frame, E_LAYER_CLIENT_PRIO);
|
|
|
|
e_comp_object_effect_set(ec->frame, "iconify/ibox");
|
|
|
|
e_comp_object_effect_params_set(ec->frame, 1, (int[]){ec->x, ec->y, ec->w, ec->h, ox, oy, ow, oh}, 8);
|
|
|
|
e_comp_object_effect_params_set(ec->frame, 0, (int[]){!!strcmp(signal, "e,action,iconify")}, 1);
|
|
|
|
e_comp_object_effect_start(ec->frame, _ibox_cb_iconify_end_cb, ec);
|
|
|
|
return EINA_TRUE;
|
2014-01-29 01:51:21 -08:00
|
|
|
}
|
|
|
|
|
2006-05-17 23:30:33 -07:00
|
|
|
static E_Gadcon_Client *
|
2006-05-31 09:31:51 -07:00
|
|
|
_gc_init(E_Gadcon *gc, const char *name, const char *id, const char *style)
|
2006-05-17 23:30:33 -07:00
|
|
|
{
|
|
|
|
IBox *b;
|
|
|
|
Evas_Object *o;
|
|
|
|
E_Gadcon_Client *gcc;
|
|
|
|
Instance *inst;
|
|
|
|
Evas_Coord x, y, w, h;
|
|
|
|
const char *drop[] = { "enlightenment/border" };
|
2006-05-25 06:25:37 -07:00
|
|
|
Config_Item *ci;
|
2007-01-02 12:55:12 -08:00
|
|
|
|
2006-05-17 23:30:33 -07:00
|
|
|
inst = E_NEW(Instance, 1);
|
|
|
|
|
2006-05-25 06:25:37 -07:00
|
|
|
ci = _ibox_config_item_get(id);
|
2007-09-15 17:02:53 -07:00
|
|
|
inst->ci = ci;
|
2007-01-02 12:55:12 -08:00
|
|
|
|
2015-12-11 13:17:57 -08:00
|
|
|
b = _ibox_new(gc->o_container ?: e_comp->elm, gc->zone);
|
2006-05-17 23:30:33 -07:00
|
|
|
b->inst = inst;
|
|
|
|
inst->ibox = b;
|
|
|
|
o = b->o_box;
|
2006-12-30 15:32:25 -08:00
|
|
|
gcc = e_gadcon_client_new(gc, name, id, style, o);
|
2006-05-17 23:30:33 -07:00
|
|
|
gcc->data = inst;
|
2012-09-20 06:52:38 -07:00
|
|
|
ci->gcc = gcc;
|
2007-01-02 12:55:12 -08:00
|
|
|
|
2006-05-17 23:30:33 -07:00
|
|
|
inst->gcc = gcc;
|
|
|
|
inst->o_ibox = o;
|
2008-11-05 11:43:26 -08:00
|
|
|
inst->orient = E_GADCON_ORIENT_HORIZ;
|
2014-03-05 05:19:15 -08:00
|
|
|
_ibox_fill(b);
|
2007-01-02 12:55:12 -08:00
|
|
|
|
2006-05-17 23:30:33 -07:00
|
|
|
evas_object_geometry_get(o, &x, &y, &w, &h);
|
|
|
|
inst->drop_handler =
|
2015-04-27 12:39:43 -07:00
|
|
|
e_drop_handler_add(E_OBJECT(inst->gcc), NULL, inst,
|
2012-08-15 00:00:02 -07:00
|
|
|
_ibox_inst_cb_enter, _ibox_inst_cb_move,
|
|
|
|
_ibox_inst_cb_leave, _ibox_inst_cb_drop,
|
|
|
|
drop, 1, x, y, w, h);
|
2006-05-17 23:30:33 -07:00
|
|
|
evas_object_event_callback_add(o, EVAS_CALLBACK_MOVE,
|
2012-08-15 00:00:02 -07:00
|
|
|
_ibox_cb_obj_moveresize, inst);
|
2016-12-06 07:49:31 -08:00
|
|
|
evas_object_event_callback_add(o, EVAS_CALLBACK_RESIZE,
|
2012-08-15 00:00:02 -07:00
|
|
|
_ibox_cb_obj_moveresize, inst);
|
2008-10-22 04:49:33 -07:00
|
|
|
ibox_config->instances = eina_list_append(ibox_config->instances, inst);
|
2014-01-29 01:51:21 -08:00
|
|
|
// add highest priority iconify provider - tasks and ibar can do this
|
|
|
|
// but lower priority
|
2014-01-29 10:25:38 -08:00
|
|
|
inst->iconify_provider = e_comp_object_effect_mover_add(100, "e,action,*iconify", _ibox_cb_iconify_provider, inst);
|
2006-05-17 23:30:33 -07:00
|
|
|
return gcc;
|
|
|
|
}
|
2005-05-14 07:08:16 -07:00
|
|
|
|
2006-05-17 23:30:33 -07:00
|
|
|
static void
|
|
|
|
_gc_shutdown(E_Gadcon_Client *gcc)
|
|
|
|
{
|
|
|
|
Instance *inst;
|
2007-01-02 12:55:12 -08:00
|
|
|
|
2006-05-17 23:30:33 -07:00
|
|
|
inst = gcc->data;
|
2014-01-29 10:25:38 -08:00
|
|
|
e_comp_object_effect_mover_del(inst->iconify_provider);
|
2012-09-20 06:52:38 -07:00
|
|
|
inst->ci->gcc = NULL;
|
2008-10-22 04:49:33 -07:00
|
|
|
ibox_config->instances = eina_list_remove(ibox_config->instances, inst);
|
2006-05-17 23:30:33 -07:00
|
|
|
e_drop_handler_del(inst->drop_handler);
|
|
|
|
_ibox_free(inst->ibox);
|
|
|
|
free(inst);
|
2005-05-14 07:08:16 -07:00
|
|
|
}
|
|
|
|
|
2006-05-17 23:30:33 -07:00
|
|
|
static void
|
2008-11-03 19:57:45 -08:00
|
|
|
_gc_orient(E_Gadcon_Client *gcc, E_Gadcon_Orient orient)
|
2005-05-14 07:08:16 -07:00
|
|
|
{
|
2006-05-17 23:30:33 -07:00
|
|
|
Instance *inst;
|
2007-01-02 12:55:12 -08:00
|
|
|
|
2006-05-17 23:30:33 -07:00
|
|
|
inst = gcc->data;
|
2010-08-19 08:49:25 -07:00
|
|
|
if ((int)orient != -1) inst->orient = orient;
|
2008-11-05 11:43:26 -08:00
|
|
|
|
|
|
|
switch (inst->orient)
|
2006-05-17 23:30:33 -07:00
|
|
|
{
|
|
|
|
case E_GADCON_ORIENT_FLOAT:
|
|
|
|
case E_GADCON_ORIENT_HORIZ:
|
|
|
|
case E_GADCON_ORIENT_TOP:
|
|
|
|
case E_GADCON_ORIENT_BOTTOM:
|
|
|
|
case E_GADCON_ORIENT_CORNER_TL:
|
|
|
|
case E_GADCON_ORIENT_CORNER_TR:
|
|
|
|
case E_GADCON_ORIENT_CORNER_BL:
|
|
|
|
case E_GADCON_ORIENT_CORNER_BR:
|
2012-08-15 00:00:02 -07:00
|
|
|
_ibox_orient_set(inst->ibox, 1);
|
|
|
|
e_gadcon_client_aspect_set(gcc, eina_list_count(inst->ibox->icons) * 16, 16);
|
|
|
|
break;
|
|
|
|
|
2006-05-17 23:30:33 -07:00
|
|
|
case E_GADCON_ORIENT_VERT:
|
|
|
|
case E_GADCON_ORIENT_LEFT:
|
|
|
|
case E_GADCON_ORIENT_RIGHT:
|
|
|
|
case E_GADCON_ORIENT_CORNER_LT:
|
|
|
|
case E_GADCON_ORIENT_CORNER_RT:
|
|
|
|
case E_GADCON_ORIENT_CORNER_LB:
|
|
|
|
case E_GADCON_ORIENT_CORNER_RB:
|
2012-08-15 00:00:02 -07:00
|
|
|
_ibox_orient_set(inst->ibox, 0);
|
|
|
|
e_gadcon_client_aspect_set(gcc, 16, eina_list_count(inst->ibox->icons) * 16);
|
|
|
|
break;
|
|
|
|
|
2006-05-17 23:30:33 -07:00
|
|
|
default:
|
2012-08-15 00:00:02 -07:00
|
|
|
break;
|
2006-05-17 23:30:33 -07:00
|
|
|
}
|
|
|
|
e_gadcon_client_min_size_set(gcc, 16, 16);
|
|
|
|
}
|
2005-05-14 07:08:16 -07:00
|
|
|
|
2011-11-14 13:46:57 -08:00
|
|
|
static const char *
|
2015-03-18 15:09:09 -07:00
|
|
|
_gc_label(const E_Gadcon_Client_Class *client_class EINA_UNUSED)
|
2006-05-17 23:30:33 -07:00
|
|
|
{
|
|
|
|
return _("IBox");
|
2005-05-14 07:08:16 -07:00
|
|
|
}
|
|
|
|
|
2006-05-17 23:30:33 -07:00
|
|
|
static Evas_Object *
|
2015-03-18 15:09:09 -07:00
|
|
|
_gc_icon(const E_Gadcon_Client_Class *client_class EINA_UNUSED, Evas *evas)
|
2005-05-14 07:08:16 -07:00
|
|
|
{
|
2006-05-17 23:30:33 -07:00
|
|
|
Evas_Object *o;
|
2010-08-19 08:49:25 -07:00
|
|
|
char buf[PATH_MAX];
|
2007-01-02 12:55:12 -08:00
|
|
|
|
2006-05-17 23:30:33 -07:00
|
|
|
o = edje_object_add(evas);
|
2007-03-24 16:12:23 -07:00
|
|
|
snprintf(buf, sizeof(buf), "%s/e-module-ibox.edj",
|
2012-08-15 00:00:02 -07:00
|
|
|
e_module_dir_get(ibox_config->module));
|
2006-05-17 23:30:33 -07:00
|
|
|
edje_object_file_set(o, buf, "icon");
|
|
|
|
return o;
|
|
|
|
}
|
2007-09-15 17:02:53 -07:00
|
|
|
|
|
|
|
static const char *
|
2012-07-27 01:25:22 -07:00
|
|
|
_gc_id_new(const E_Gadcon_Client_Class *client_class)
|
2007-09-15 17:02:53 -07:00
|
|
|
{
|
2012-08-22 00:32:12 -07:00
|
|
|
static char buf[4096];
|
2007-09-15 17:02:53 -07:00
|
|
|
|
2012-08-15 00:00:02 -07:00
|
|
|
snprintf(buf, sizeof(buf), "%s.%d", client_class->name,
|
2012-06-22 00:21:51 -07:00
|
|
|
eina_list_count(ibox_config->instances) + 1);
|
|
|
|
return buf;
|
2007-09-15 17:02:53 -07:00
|
|
|
}
|
|
|
|
|
|
|
|
static void
|
2015-03-18 15:09:09 -07:00
|
|
|
_gc_id_del(const E_Gadcon_Client_Class *client_class EINA_UNUSED, const char *id EINA_UNUSED)
|
2007-09-15 17:02:53 -07:00
|
|
|
{
|
2008-10-20 18:10:42 -07:00
|
|
|
/* yes - don't do this. on shutdown gadgets are deleted and this means config
|
|
|
|
* for them is deleted - that means empty config is saved. keep them around
|
|
|
|
* as if u add a gadget back it can pick up its old config again
|
2007-09-15 17:02:53 -07:00
|
|
|
Config_Item *ci;
|
|
|
|
|
|
|
|
ci = _ibox_config_item_get(id);
|
|
|
|
if (ci)
|
|
|
|
{
|
2012-08-15 00:00:02 -07:00
|
|
|
if (ci->id) eina_stringshare_del(ci->id);
|
|
|
|
ibox_config->items = eina_list_remove(ibox_config->items, ci);
|
2007-09-15 17:02:53 -07:00
|
|
|
}
|
2008-10-20 18:10:42 -07:00
|
|
|
*/
|
2007-09-15 17:02:53 -07:00
|
|
|
}
|
|
|
|
|
2006-05-17 23:30:33 -07:00
|
|
|
static IBox *
|
2015-01-01 14:29:25 -08:00
|
|
|
_ibox_new(Evas_Object *parent, E_Zone *zone)
|
2006-05-17 23:30:33 -07:00
|
|
|
{
|
|
|
|
IBox *b;
|
2007-01-02 12:55:12 -08:00
|
|
|
|
2006-05-17 23:30:33 -07:00
|
|
|
b = E_NEW(IBox, 1);
|
2015-01-20 16:20:04 -08:00
|
|
|
b->o_box = elm_box_add(e_win_evas_object_win_get(parent));
|
2015-01-01 14:29:25 -08:00
|
|
|
elm_box_homogeneous_set(b->o_box, 1);
|
|
|
|
elm_box_horizontal_set(b->o_box, 1);
|
|
|
|
elm_box_align_set(b->o_box, 0.5, 0.5);
|
2006-05-17 23:30:33 -07:00
|
|
|
b->zone = zone;
|
|
|
|
return b;
|
2005-05-14 07:08:16 -07:00
|
|
|
}
|
|
|
|
|
2006-05-17 23:30:33 -07:00
|
|
|
static void
|
|
|
|
_ibox_free(IBox *b)
|
2005-05-14 07:08:16 -07:00
|
|
|
{
|
2006-05-17 23:30:33 -07:00
|
|
|
_ibox_empty(b);
|
|
|
|
evas_object_del(b->o_box);
|
|
|
|
if (b->o_drop) evas_object_del(b->o_drop);
|
|
|
|
if (b->o_drop_over) evas_object_del(b->o_drop_over);
|
|
|
|
if (b->o_empty) evas_object_del(b->o_empty);
|
|
|
|
free(b);
|
2005-05-14 07:08:16 -07:00
|
|
|
}
|
|
|
|
|
2006-05-17 23:30:33 -07:00
|
|
|
static void
|
2015-03-18 15:09:09 -07:00
|
|
|
_ibox_cb_empty_mouse_down(void *data, Evas *e EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *event_info)
|
2005-12-17 03:21:54 -08:00
|
|
|
{
|
2006-05-17 23:30:33 -07:00
|
|
|
Evas_Event_Mouse_Down *ev;
|
|
|
|
IBox *b;
|
2012-08-15 00:22:04 -07:00
|
|
|
E_Menu *m;
|
|
|
|
E_Menu_Item *mi;
|
|
|
|
int cx, cy;
|
2007-01-02 12:55:12 -08:00
|
|
|
|
2006-05-17 23:30:33 -07:00
|
|
|
ev = event_info;
|
|
|
|
b = data;
|
2012-08-15 00:22:04 -07:00
|
|
|
if (ev->button != 3) return;
|
|
|
|
|
|
|
|
m = e_menu_new();
|
|
|
|
mi = e_menu_item_new(m);
|
|
|
|
e_menu_item_label_set(mi, _("Settings"));
|
|
|
|
e_util_menu_item_theme_icon_set(mi, "configure");
|
|
|
|
e_menu_item_callback_set(mi, _ibox_cb_menu_configuration, b);
|
|
|
|
|
|
|
|
m = e_gadcon_client_util_menu_items_append(b->inst->gcc, m, 0);
|
|
|
|
|
|
|
|
e_gadcon_canvas_zone_geometry_get(b->inst->gcc->gadcon,
|
|
|
|
&cx, &cy, NULL, NULL);
|
|
|
|
e_menu_activate_mouse(m,
|
2015-03-13 14:47:36 -07:00
|
|
|
e_zone_current_get(),
|
2012-08-15 00:22:04 -07:00
|
|
|
cx + ev->output.x, cy + ev->output.y, 1, 1,
|
|
|
|
E_MENU_POP_DIRECTION_DOWN, ev->timestamp);
|
|
|
|
evas_event_feed_mouse_up(b->inst->gcc->gadcon->evas, ev->button,
|
|
|
|
EVAS_BUTTON_NONE, ev->timestamp, NULL);
|
2005-12-17 03:21:54 -08:00
|
|
|
}
|
|
|
|
|
2006-05-17 23:30:33 -07:00
|
|
|
static void
|
|
|
|
_ibox_empty_handle(IBox *b)
|
2005-05-14 07:08:16 -07:00
|
|
|
{
|
2016-12-06 08:23:19 -08:00
|
|
|
if (!b->o_empty)
|
2005-05-14 07:08:16 -07:00
|
|
|
{
|
2016-12-06 08:23:19 -08:00
|
|
|
b->o_empty = evas_object_rectangle_add(evas_object_evas_get(b->o_box));
|
|
|
|
evas_object_event_callback_add(b->o_empty, EVAS_CALLBACK_MOUSE_DOWN, _ibox_cb_empty_mouse_down, b);
|
|
|
|
evas_object_color_set(b->o_empty, 0, 0, 0, 0);
|
|
|
|
E_EXPAND(b->o_empty);
|
|
|
|
E_FILL(b->o_empty);
|
2006-05-17 23:30:33 -07:00
|
|
|
}
|
2016-12-06 08:23:19 -08:00
|
|
|
if (b->icons) return;
|
|
|
|
evas_object_show(b->o_empty);
|
|
|
|
elm_box_pack_end(b->o_box, b->o_empty);
|
2005-05-14 07:08:16 -07:00
|
|
|
}
|
|
|
|
|
|
|
|
static void
|
2006-05-17 23:30:33 -07:00
|
|
|
_ibox_fill(IBox *b)
|
2005-05-14 07:08:16 -07:00
|
|
|
{
|
2006-05-17 23:30:33 -07:00
|
|
|
IBox_Icon *ic;
|
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
2014-01-14 17:19:12 -08:00
|
|
|
E_Client *ec;
|
2006-06-02 17:03:09 -07:00
|
|
|
int ok;
|
2012-09-20 06:52:38 -07:00
|
|
|
int mw, mh, h;
|
2007-01-02 12:55:12 -08:00
|
|
|
|
2015-03-13 12:45:07 -07:00
|
|
|
E_CLIENT_FOREACH(ec)
|
2005-05-14 07:08:16 -07:00
|
|
|
{
|
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
2014-01-14 17:19:12 -08:00
|
|
|
if (e_client_util_ignored_get(ec)) continue;
|
2012-08-15 00:00:02 -07:00
|
|
|
ok = 0;
|
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
2014-01-14 17:19:12 -08:00
|
|
|
if ((b->inst->ci->show_zone == 0) && (ec->iconic))
|
2012-08-15 00:00:02 -07:00
|
|
|
{
|
|
|
|
ok = 1;
|
|
|
|
}
|
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
2014-01-14 17:19:12 -08:00
|
|
|
else if ((b->inst->ci->show_zone == 1) && (ec->iconic))
|
2012-08-15 00:00:02 -07:00
|
|
|
{
|
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
2014-01-14 17:19:12 -08:00
|
|
|
if (ec->sticky)
|
2012-08-15 00:00:02 -07:00
|
|
|
{
|
|
|
|
ok = 1;
|
|
|
|
}
|
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
2014-01-14 17:19:12 -08:00
|
|
|
else if ((b->inst->ci->show_desk == 0) && (ec->zone == b->zone))
|
2012-08-15 00:00:02 -07:00
|
|
|
{
|
|
|
|
ok = 1;
|
|
|
|
}
|
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
2014-01-14 17:19:12 -08:00
|
|
|
else if ((b->inst->ci->show_desk == 1) && (ec->zone == b->zone) &&
|
|
|
|
(ec->desk == e_desk_current_get(b->zone)))
|
2012-08-15 00:00:02 -07:00
|
|
|
{
|
|
|
|
ok = 1;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
if (ok)
|
|
|
|
{
|
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
2014-01-14 17:19:12 -08:00
|
|
|
ic = _ibox_icon_new(b, ec);
|
2012-08-15 00:00:02 -07:00
|
|
|
b->icons = eina_list_append(b->icons, ic);
|
2015-01-01 14:29:25 -08:00
|
|
|
elm_box_pack_end(b->o_box, ic->o_holder);
|
2012-08-15 00:00:02 -07:00
|
|
|
}
|
2005-05-14 07:08:16 -07:00
|
|
|
}
|
2007-01-02 12:55:12 -08:00
|
|
|
|
2006-05-17 23:30:33 -07:00
|
|
|
_ibox_empty_handle(b);
|
|
|
|
_ibox_resize_handle(b);
|
2012-09-20 06:52:38 -07:00
|
|
|
if (!b->inst->gcc) return;
|
|
|
|
if (!b->inst->ci->expand_on_desktop) return;
|
|
|
|
if (!e_gadcon_site_is_desktop(b->inst->gcc->gadcon->location->site)) return;
|
2015-01-01 14:29:25 -08:00
|
|
|
elm_box_recalculate(b->o_box);
|
|
|
|
evas_object_size_hint_min_get(b->o_box, &mw, &mh);
|
2015-12-11 13:17:57 -08:00
|
|
|
if ((!mw) && (!mh))
|
|
|
|
evas_object_geometry_get(b->o_box, NULL, NULL, &mw, &mh);
|
2012-09-20 06:52:38 -07:00
|
|
|
evas_object_geometry_get(b->inst->gcc->o_frame, NULL, NULL, NULL, &h);
|
|
|
|
evas_object_resize(b->inst->gcc->o_frame, MIN(mw, b->inst->gcc->gadcon->zone->w), MAX(h, mh));
|
2005-05-14 07:08:16 -07:00
|
|
|
}
|
|
|
|
|
|
|
|
static void
|
2006-05-17 23:30:33 -07:00
|
|
|
_ibox_empty(IBox *b)
|
2005-05-14 07:08:16 -07:00
|
|
|
{
|
2012-09-20 06:52:38 -07:00
|
|
|
E_FREE_LIST(b->icons, _ibox_icon_free);
|
2006-05-17 23:30:33 -07:00
|
|
|
_ibox_empty_handle(b);
|
2005-05-14 07:08:16 -07:00
|
|
|
}
|
|
|
|
|
|
|
|
static void
|
2006-05-17 23:30:33 -07:00
|
|
|
_ibox_orient_set(IBox *b, int horizontal)
|
2005-05-14 07:08:16 -07:00
|
|
|
{
|
2015-01-01 14:29:25 -08:00
|
|
|
elm_box_horizontal_set(b->o_box, horizontal);
|
|
|
|
elm_box_align_set(b->o_box, 0.5, 0.5);
|
2005-05-14 07:08:16 -07:00
|
|
|
}
|
|
|
|
|
2005-12-13 06:32:18 -08:00
|
|
|
static void
|
2006-05-17 23:30:33 -07:00
|
|
|
_ibox_resize_handle(IBox *b)
|
2005-12-13 06:32:18 -08:00
|
|
|
{
|
2008-10-22 04:49:33 -07:00
|
|
|
Eina_List *l;
|
2006-05-17 23:30:33 -07:00
|
|
|
IBox_Icon *ic;
|
2012-09-20 06:52:38 -07:00
|
|
|
int w, h;
|
2007-01-02 12:55:12 -08:00
|
|
|
|
2006-05-17 23:30:33 -07:00
|
|
|
evas_object_geometry_get(b->o_box, NULL, NULL, &w, &h);
|
2016-12-06 07:49:31 -08:00
|
|
|
if (elm_box_horizontal_get(b->o_box))
|
|
|
|
w = h;
|
|
|
|
else
|
|
|
|
h = w;
|
2016-12-06 08:23:19 -08:00
|
|
|
if (w || h)
|
|
|
|
evas_object_size_hint_min_set(b->o_empty, w, h);
|
|
|
|
if (b->icons && evas_object_visible_get(b->o_empty))
|
|
|
|
{
|
|
|
|
elm_box_unpack(b->o_box, b->o_empty);
|
|
|
|
evas_object_hide(b->o_empty);
|
|
|
|
}
|
2012-09-20 03:49:19 -07:00
|
|
|
EINA_LIST_FOREACH(b->icons, l, ic)
|
2006-05-17 23:30:33 -07:00
|
|
|
{
|
2015-01-01 14:29:25 -08:00
|
|
|
evas_object_size_hint_min_set(ic->o_holder, w, h);
|
|
|
|
evas_object_size_hint_max_set(ic->o_holder, w, h);
|
2006-05-17 23:30:33 -07:00
|
|
|
}
|
2005-12-13 06:32:18 -08:00
|
|
|
}
|
|
|
|
|
2005-05-14 07:08:16 -07:00
|
|
|
static void
|
2006-05-17 23:30:33 -07:00
|
|
|
_ibox_instance_drop_zone_recalc(Instance *inst)
|
2005-05-14 07:08:16 -07:00
|
|
|
{
|
2006-05-17 23:30:33 -07:00
|
|
|
Evas_Coord x, y, w, h;
|
2007-01-02 12:55:12 -08:00
|
|
|
|
2010-11-08 12:11:45 -08:00
|
|
|
e_gadcon_client_viewport_geometry_get(inst->gcc, &x, &y, &w, &h);
|
2006-09-16 23:12:48 -07:00
|
|
|
e_drop_handler_geometry_set(inst->drop_handler, x, y, w, h);
|
2007-01-02 12:55:12 -08:00
|
|
|
}
|
2005-05-14 07:08:16 -07:00
|
|
|
|
|
|
|
static IBox_Icon *
|
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
2014-01-14 17:19:12 -08:00
|
|
|
_ibox_icon_find(IBox *b, E_Client *ec)
|
2005-05-14 07:08:16 -07:00
|
|
|
{
|
2008-10-22 04:49:33 -07:00
|
|
|
Eina_List *l;
|
2005-05-14 07:08:16 -07:00
|
|
|
IBox_Icon *ic;
|
2007-01-02 12:55:12 -08:00
|
|
|
|
2012-09-20 03:49:19 -07:00
|
|
|
EINA_LIST_FOREACH(b->icons, l, ic)
|
2005-05-14 07:08:16 -07:00
|
|
|
{
|
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
2014-01-14 17:19:12 -08:00
|
|
|
if (ic->client == ec) return ic;
|
2005-05-14 07:08:16 -07:00
|
|
|
}
|
2006-05-17 23:30:33 -07:00
|
|
|
return NULL;
|
2005-05-14 07:08:16 -07:00
|
|
|
}
|
|
|
|
|
|
|
|
static IBox_Icon *
|
2006-05-17 23:30:33 -07:00
|
|
|
_ibox_icon_at_coord(IBox *b, Evas_Coord x, Evas_Coord y)
|
2005-05-14 07:08:16 -07:00
|
|
|
{
|
2008-10-22 04:49:33 -07:00
|
|
|
Eina_List *l;
|
2006-05-17 23:30:33 -07:00
|
|
|
IBox_Icon *ic;
|
2007-01-02 12:55:12 -08:00
|
|
|
|
2012-09-20 03:49:19 -07:00
|
|
|
EINA_LIST_FOREACH(b->icons, l, ic)
|
2005-05-14 07:08:16 -07:00
|
|
|
{
|
2006-05-17 23:30:33 -07:00
|
|
|
Evas_Coord dx, dy, dw, dh;
|
2012-08-15 00:00:02 -07:00
|
|
|
|
2006-05-17 23:30:33 -07:00
|
|
|
evas_object_geometry_get(ic->o_holder, &dx, &dy, &dw, &dh);
|
2012-08-15 00:00:02 -07:00
|
|
|
if (E_INSIDE(x, y, dx, dy, dw, dh)) return ic;
|
2005-05-14 07:08:16 -07:00
|
|
|
}
|
|
|
|
return NULL;
|
|
|
|
}
|
|
|
|
|
2021-01-22 01:18:02 -08:00
|
|
|
static Eina_Bool
|
|
|
|
_ibox_cb_icon_fill_timer(void *data)
|
|
|
|
{
|
|
|
|
IBox_Icon *ic = data;
|
|
|
|
|
|
|
|
_ibox_icon_fill(ic);
|
|
|
|
|
|
|
|
return EINA_FALSE;
|
|
|
|
}
|
|
|
|
|
2006-05-17 23:30:33 -07:00
|
|
|
static IBox_Icon *
|
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
2014-01-14 17:19:12 -08:00
|
|
|
_ibox_icon_new(IBox *b, E_Client *ec)
|
2005-05-14 07:08:16 -07:00
|
|
|
{
|
2006-05-17 23:30:33 -07:00
|
|
|
IBox_Icon *ic;
|
2007-01-02 12:55:12 -08:00
|
|
|
|
2006-05-17 23:30:33 -07:00
|
|
|
ic = E_NEW(IBox_Icon, 1);
|
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
2014-01-14 17:19:12 -08:00
|
|
|
e_object_ref(E_OBJECT(ec));
|
2006-05-17 23:30:33 -07:00
|
|
|
ic->ibox = b;
|
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
2014-01-14 17:19:12 -08:00
|
|
|
ic->client = ec;
|
2006-05-17 23:30:33 -07:00
|
|
|
ic->o_holder = edje_object_add(evas_object_evas_get(b->o_box));
|
2015-01-01 14:29:25 -08:00
|
|
|
E_FILL(ic->o_holder);
|
2006-05-17 23:30:33 -07:00
|
|
|
e_theme_edje_object_set(ic->o_holder, "base/theme/modules/ibox",
|
2012-08-15 00:00:02 -07:00
|
|
|
"e/modules/ibox/icon");
|
|
|
|
evas_object_event_callback_add(ic->o_holder, EVAS_CALLBACK_MOUSE_IN, _ibox_cb_icon_mouse_in, ic);
|
2006-05-17 23:30:33 -07:00
|
|
|
evas_object_event_callback_add(ic->o_holder, EVAS_CALLBACK_MOUSE_OUT, _ibox_cb_icon_mouse_out, ic);
|
|
|
|
evas_object_event_callback_add(ic->o_holder, EVAS_CALLBACK_MOUSE_DOWN, _ibox_cb_icon_mouse_down, ic);
|
|
|
|
evas_object_event_callback_add(ic->o_holder, EVAS_CALLBACK_MOUSE_UP, _ibox_cb_icon_mouse_up, ic);
|
|
|
|
evas_object_event_callback_add(ic->o_holder, EVAS_CALLBACK_MOUSE_MOVE, _ibox_cb_icon_mouse_move, ic);
|
|
|
|
evas_object_event_callback_add(ic->o_holder, EVAS_CALLBACK_MOVE, _ibox_cb_icon_move, ic);
|
|
|
|
evas_object_event_callback_add(ic->o_holder, EVAS_CALLBACK_RESIZE, _ibox_cb_icon_resize, ic);
|
|
|
|
evas_object_show(ic->o_holder);
|
2007-01-02 12:55:12 -08:00
|
|
|
|
2006-05-17 23:30:33 -07:00
|
|
|
ic->o_holder2 = edje_object_add(evas_object_evas_get(b->o_box));
|
|
|
|
e_theme_edje_object_set(ic->o_holder2, "base/theme/modules/ibox",
|
2012-08-15 00:00:02 -07:00
|
|
|
"e/modules/ibox/icon_overlay");
|
2006-05-17 23:30:33 -07:00
|
|
|
evas_object_layer_set(ic->o_holder2, 9999);
|
|
|
|
evas_object_pass_events_set(ic->o_holder2, 1);
|
|
|
|
evas_object_show(ic->o_holder2);
|
2007-01-02 12:55:12 -08:00
|
|
|
|
2021-01-22 01:18:02 -08:00
|
|
|
ecore_timer_add(0.1, _ibox_cb_icon_fill_timer, ic);
|
2006-05-17 23:30:33 -07:00
|
|
|
return ic;
|
2005-05-14 07:08:16 -07:00
|
|
|
}
|
|
|
|
|
|
|
|
static void
|
2006-05-17 23:30:33 -07:00
|
|
|
_ibox_icon_free(IBox_Icon *ic)
|
2005-05-14 07:08:16 -07:00
|
|
|
{
|
2006-05-17 23:30:33 -07:00
|
|
|
if (ic->ibox->ic_drop_before == ic)
|
|
|
|
ic->ibox->ic_drop_before = NULL;
|
|
|
|
_ibox_icon_empty(ic);
|
|
|
|
evas_object_del(ic->o_holder);
|
|
|
|
evas_object_del(ic->o_holder2);
|
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
2014-01-14 17:19:12 -08:00
|
|
|
e_object_unref(E_OBJECT(ic->client));
|
2006-05-17 23:30:33 -07:00
|
|
|
free(ic);
|
2005-05-14 07:08:16 -07:00
|
|
|
}
|
|
|
|
|
|
|
|
static void
|
2020-07-07 07:59:28 -07:00
|
|
|
_ibox_icon_fill_icon(IBox_Icon *ic)
|
2005-05-14 07:08:16 -07:00
|
|
|
{
|
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
2014-01-14 17:19:12 -08:00
|
|
|
ic->o_icon = e_client_icon_add(ic->client, evas_object_evas_get(ic->ibox->o_box));
|
2006-08-22 00:39:11 -07:00
|
|
|
edje_object_part_swallow(ic->o_holder, "e.swallow.content", ic->o_icon);
|
2006-05-17 23:30:33 -07:00
|
|
|
evas_object_pass_events_set(ic->o_icon, 1);
|
|
|
|
evas_object_show(ic->o_icon);
|
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
2014-01-14 17:19:12 -08:00
|
|
|
ic->o_icon2 = e_client_icon_add(ic->client, evas_object_evas_get(ic->ibox->o_box));
|
2006-08-22 00:39:11 -07:00
|
|
|
edje_object_part_swallow(ic->o_holder2, "e.swallow.content", ic->o_icon2);
|
2006-05-17 23:30:33 -07:00
|
|
|
evas_object_pass_events_set(ic->o_icon2, 1);
|
|
|
|
evas_object_show(ic->o_icon2);
|
2020-07-07 07:59:28 -07:00
|
|
|
}
|
|
|
|
|
2020-07-22 07:18:23 -07:00
|
|
|
static Eina_Bool
|
|
|
|
_ibox_icon_fill_timer(void *data)
|
|
|
|
{
|
|
|
|
IBox_Icon *ic = data;
|
|
|
|
|
|
|
|
_ibox_icon_fill_preview(ic, EINA_TRUE);
|
|
|
|
|
|
|
|
return EINA_FALSE;
|
|
|
|
}
|
|
|
|
|
2020-07-07 07:59:28 -07:00
|
|
|
static void
|
2020-07-22 07:18:23 -07:00
|
|
|
_ibox_icon_fill_preview(IBox_Icon *ic, Eina_Bool is_retry)
|
2020-07-07 07:59:28 -07:00
|
|
|
{
|
|
|
|
E_Client *ec;
|
|
|
|
Evas_Object *img, *img2;
|
2021-01-25 00:19:17 -08:00
|
|
|
int w, h;
|
2020-07-07 07:59:28 -07:00
|
|
|
|
|
|
|
ec = ic->client;
|
|
|
|
|
2020-11-06 18:49:41 -08:00
|
|
|
img = e_comp_object_util_frame_mirror_add(ec->frame);
|
2020-07-22 07:18:23 -07:00
|
|
|
if (!img && !is_retry)
|
|
|
|
{
|
|
|
|
ecore_timer_add(0.5, _ibox_icon_fill_timer, ic);
|
|
|
|
return;
|
|
|
|
}
|
2021-01-25 00:19:17 -08:00
|
|
|
w = ec->client.w;
|
|
|
|
h = ec->client.h;
|
|
|
|
if (ec->shaded)
|
|
|
|
evas_object_geometry_get(ec->frame_object, NULL, NULL, &w, &h);
|
|
|
|
evas_object_size_hint_aspect_set(img, EVAS_ASPECT_CONTROL_BOTH, w, h);
|
|
|
|
evas_object_size_hint_max_set(img, w, h);
|
2020-07-07 07:59:28 -07:00
|
|
|
ic->o_icon = img;
|
|
|
|
edje_object_part_swallow(ic->o_holder, "e.swallow.preview", ic->o_icon);
|
|
|
|
evas_object_pass_events_set(ic->o_icon, 1);
|
|
|
|
evas_object_show(ic->o_icon);
|
|
|
|
|
2020-11-06 18:49:41 -08:00
|
|
|
img2 = e_comp_object_util_frame_mirror_add(ec->frame);
|
2021-01-25 00:19:17 -08:00
|
|
|
evas_object_size_hint_aspect_set(img2, EVAS_ASPECT_CONTROL_BOTH, w, h);
|
2020-07-07 07:59:28 -07:00
|
|
|
ic->o_icon2 = img2;
|
|
|
|
edje_object_part_swallow(ic->o_holder2, "e.swallow.preview", ic->o_icon2);
|
|
|
|
evas_object_pass_events_set(ic->o_icon2, 1);
|
|
|
|
evas_object_show(ic->o_icon2);
|
|
|
|
}
|
|
|
|
|
|
|
|
static void
|
|
|
|
_ibox_icon_fill(IBox_Icon *ic)
|
|
|
|
{
|
|
|
|
if ((ic->ibox->inst->ci->show_preview) && (edje_object_part_exists(ic->o_holder, "e.swallow.preview")))
|
2020-07-22 07:18:23 -07:00
|
|
|
_ibox_icon_fill_preview(ic, EINA_FALSE);
|
2020-07-07 07:59:28 -07:00
|
|
|
else
|
|
|
|
_ibox_icon_fill_icon(ic);
|
2007-01-02 12:55:12 -08:00
|
|
|
|
|
|
|
_ibox_icon_fill_label(ic);
|
2014-03-05 05:19:15 -08:00
|
|
|
|
|
|
|
if (ic->client->urgent)
|
|
|
|
{
|
|
|
|
e_gadcon_urgent_show(ic->ibox->inst->gcc->gadcon);
|
|
|
|
edje_object_signal_emit(ic->o_holder, "e,state,urgent", "e");
|
|
|
|
edje_object_signal_emit(ic->o_holder2, "e,state,urgent", "e");
|
|
|
|
}
|
2007-01-02 12:55:12 -08:00
|
|
|
}
|
|
|
|
|
|
|
|
static void
|
|
|
|
_ibox_icon_fill_label(IBox_Icon *ic)
|
|
|
|
{
|
2008-01-27 11:33:27 -08:00
|
|
|
const char *label = NULL;
|
2007-01-02 12:55:12 -08:00
|
|
|
|
2007-09-15 17:02:53 -07:00
|
|
|
switch (ic->ibox->inst->ci->icon_label)
|
2006-06-02 18:49:33 -07:00
|
|
|
{
|
|
|
|
case 0:
|
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
2014-01-14 17:19:12 -08:00
|
|
|
label = ic->client->netwm.name;
|
2012-08-15 00:00:02 -07:00
|
|
|
if (!label)
|
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
2014-01-14 17:19:12 -08:00
|
|
|
label = ic->client->icccm.name;
|
2012-08-15 00:00:02 -07:00
|
|
|
break;
|
|
|
|
|
2006-06-02 18:49:33 -07:00
|
|
|
case 1:
|
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
2014-01-14 17:19:12 -08:00
|
|
|
label = ic->client->icccm.title;
|
2012-08-15 00:00:02 -07:00
|
|
|
break;
|
|
|
|
|
2006-06-02 18:49:33 -07:00
|
|
|
case 2:
|
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
2014-01-14 17:19:12 -08:00
|
|
|
label = ic->client->icccm.class;
|
2012-08-15 00:00:02 -07:00
|
|
|
break;
|
|
|
|
|
2006-06-02 18:49:33 -07:00
|
|
|
case 3:
|
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
2014-01-14 17:19:12 -08:00
|
|
|
label = ic->client->netwm.icon_name;
|
2012-08-15 00:00:02 -07:00
|
|
|
if (!label)
|
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
2014-01-14 17:19:12 -08:00
|
|
|
label = ic->client->icccm.icon_name;
|
2012-08-15 00:00:02 -07:00
|
|
|
break;
|
|
|
|
|
2008-01-20 22:11:56 -08:00
|
|
|
case 4:
|
2014-02-05 07:55:50 -08:00
|
|
|
label = e_client_util_name_get(ic->client);
|
2012-08-15 00:00:02 -07:00
|
|
|
break;
|
2006-06-02 18:49:33 -07:00
|
|
|
}
|
2007-01-02 12:55:12 -08:00
|
|
|
|
2006-05-17 23:30:33 -07:00
|
|
|
if (!label) label = "?";
|
2006-08-22 00:39:11 -07:00
|
|
|
edje_object_part_text_set(ic->o_holder2, "e.text.label", label);
|
2005-05-14 07:08:16 -07:00
|
|
|
}
|
|
|
|
|
|
|
|
static void
|
2006-05-17 23:30:33 -07:00
|
|
|
_ibox_icon_empty(IBox_Icon *ic)
|
2005-05-14 07:08:16 -07:00
|
|
|
{
|
2006-05-17 23:30:33 -07:00
|
|
|
if (ic->o_icon) evas_object_del(ic->o_icon);
|
|
|
|
if (ic->o_icon2) evas_object_del(ic->o_icon2);
|
|
|
|
ic->o_icon = NULL;
|
|
|
|
ic->o_icon2 = NULL;
|
2005-05-14 07:08:16 -07:00
|
|
|
}
|
|
|
|
|
|
|
|
static void
|
2006-05-17 23:30:33 -07:00
|
|
|
_ibox_icon_signal_emit(IBox_Icon *ic, char *sig, char *src)
|
2005-05-14 07:08:16 -07:00
|
|
|
{
|
2006-05-17 23:30:33 -07:00
|
|
|
if (ic->o_holder)
|
|
|
|
edje_object_signal_emit(ic->o_holder, sig, src);
|
2014-08-20 15:05:34 -07:00
|
|
|
if (ic->o_icon && e_icon_edje_get(ic->o_icon))
|
2017-01-01 05:19:51 -08:00
|
|
|
e_icon_edje_emit(ic->o_icon, sig, src);
|
2006-05-17 23:30:33 -07:00
|
|
|
if (ic->o_holder2)
|
|
|
|
edje_object_signal_emit(ic->o_holder2, sig, src);
|
2014-08-20 15:05:34 -07:00
|
|
|
if (ic->o_icon2 && e_icon_edje_get(ic->o_icon2))
|
2017-01-01 05:19:51 -08:00
|
|
|
e_icon_edje_emit(ic->o_icon2, sig, src);
|
2006-05-17 23:30:33 -07:00
|
|
|
}
|
|
|
|
|
2008-10-22 04:49:33 -07:00
|
|
|
static Eina_List *
|
2006-05-17 23:30:33 -07:00
|
|
|
_ibox_zone_find(E_Zone *zone)
|
|
|
|
{
|
2008-10-22 04:49:33 -07:00
|
|
|
Eina_List *ibox = NULL;
|
|
|
|
Eina_List *l;
|
2012-09-20 03:49:19 -07:00
|
|
|
Instance *inst;
|
2006-06-02 17:03:09 -07:00
|
|
|
|
2012-09-20 03:49:19 -07:00
|
|
|
EINA_LIST_FOREACH(ibox_config->instances, l, inst)
|
2005-05-14 07:08:16 -07:00
|
|
|
{
|
2012-08-15 00:00:02 -07:00
|
|
|
if (inst->ci->show_zone == 0)
|
|
|
|
ibox = eina_list_append(ibox, inst->ibox);
|
|
|
|
else if ((inst->ci->show_zone == 1) && (inst->ibox->zone == zone))
|
|
|
|
ibox = eina_list_append(ibox, inst->ibox);
|
2005-05-14 07:08:16 -07:00
|
|
|
}
|
2006-06-02 17:03:09 -07:00
|
|
|
return ibox;
|
2005-05-14 07:08:16 -07:00
|
|
|
}
|
|
|
|
|
|
|
|
static void
|
2015-03-18 15:09:09 -07:00
|
|
|
_ibox_cb_obj_moveresize(void *data, Evas *e EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *event_info EINA_UNUSED)
|
2005-05-14 07:08:16 -07:00
|
|
|
{
|
2006-05-17 23:30:33 -07:00
|
|
|
Instance *inst;
|
2007-01-02 12:55:12 -08:00
|
|
|
|
2006-05-17 23:30:33 -07:00
|
|
|
inst = data;
|
|
|
|
_ibox_resize_handle(inst->ibox);
|
|
|
|
_ibox_instance_drop_zone_recalc(inst);
|
|
|
|
}
|
2005-10-08 12:44:32 -07:00
|
|
|
|
2005-05-14 07:08:16 -07:00
|
|
|
static void
|
2015-03-18 15:09:09 -07:00
|
|
|
_ibox_cb_icon_mouse_in(void *data, Evas *e EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *event_info EINA_UNUSED)
|
2005-05-14 07:08:16 -07:00
|
|
|
{
|
|
|
|
IBox_Icon *ic;
|
2007-01-02 12:55:12 -08:00
|
|
|
|
2005-05-14 07:08:16 -07:00
|
|
|
ic = data;
|
2006-08-22 00:39:11 -07:00
|
|
|
_ibox_icon_signal_emit(ic, "e,state,focused", "e");
|
2007-09-15 17:02:53 -07:00
|
|
|
if (ic->ibox->inst->ci->show_label)
|
2007-01-02 12:55:12 -08:00
|
|
|
{
|
2012-08-15 00:00:02 -07:00
|
|
|
_ibox_icon_fill_label(ic);
|
|
|
|
_ibox_icon_signal_emit(ic, "e,action,show,label", "e");
|
2007-01-02 12:55:12 -08:00
|
|
|
}
|
2005-05-14 07:08:16 -07:00
|
|
|
}
|
|
|
|
|
|
|
|
static void
|
2015-03-18 15:09:09 -07:00
|
|
|
_ibox_cb_icon_mouse_out(void *data, Evas *e EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *event_info EINA_UNUSED)
|
2005-05-14 07:08:16 -07:00
|
|
|
{
|
|
|
|
IBox_Icon *ic;
|
2007-01-02 12:55:12 -08:00
|
|
|
|
2005-05-14 07:08:16 -07:00
|
|
|
ic = data;
|
2006-08-22 00:39:11 -07:00
|
|
|
_ibox_icon_signal_emit(ic, "e,state,unfocused", "e");
|
2007-09-15 17:02:53 -07:00
|
|
|
if (ic->ibox->inst->ci->show_label)
|
2006-08-22 00:39:11 -07:00
|
|
|
_ibox_icon_signal_emit(ic, "e,action,hide,label", "e");
|
2005-05-14 07:08:16 -07:00
|
|
|
}
|
|
|
|
|
|
|
|
static void
|
2015-03-18 15:09:09 -07:00
|
|
|
_ibox_cb_icon_mouse_down(void *data, Evas *e EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *event_info)
|
2005-05-14 07:08:16 -07:00
|
|
|
{
|
2006-05-17 23:30:33 -07:00
|
|
|
Evas_Event_Mouse_Down *ev;
|
|
|
|
IBox_Icon *ic;
|
2007-01-02 12:55:12 -08:00
|
|
|
|
2006-05-17 23:30:33 -07:00
|
|
|
ev = event_info;
|
|
|
|
ic = data;
|
|
|
|
if (ev->button == 1)
|
|
|
|
{
|
2012-08-15 00:00:02 -07:00
|
|
|
ic->drag.x = ev->output.x;
|
|
|
|
ic->drag.y = ev->output.y;
|
|
|
|
ic->drag.start = 1;
|
|
|
|
ic->drag.dnd = 0;
|
2006-05-17 23:30:33 -07:00
|
|
|
}
|
2012-08-15 00:22:04 -07:00
|
|
|
else if (ev->button == 3)
|
2006-05-17 23:30:33 -07:00
|
|
|
{
|
2012-08-15 00:00:02 -07:00
|
|
|
E_Menu *m;
|
|
|
|
E_Menu_Item *mi;
|
|
|
|
int cx, cy;
|
|
|
|
|
|
|
|
m = e_menu_new();
|
|
|
|
|
|
|
|
/* FIXME: other icon options go here too */
|
|
|
|
mi = e_menu_item_new(m);
|
|
|
|
e_menu_item_label_set(mi, _("Settings"));
|
|
|
|
e_util_menu_item_theme_icon_set(mi, "configure");
|
|
|
|
e_menu_item_callback_set(mi, _ibox_cb_menu_configuration, ic->ibox);
|
|
|
|
|
|
|
|
m = e_gadcon_client_util_menu_items_append(ic->ibox->inst->gcc, m, 0);
|
|
|
|
|
|
|
|
e_gadcon_canvas_zone_geometry_get(ic->ibox->inst->gcc->gadcon,
|
|
|
|
&cx, &cy, NULL, NULL);
|
|
|
|
e_menu_activate_mouse(m,
|
2015-03-13 14:47:36 -07:00
|
|
|
e_zone_current_get(),
|
2012-08-15 00:00:02 -07:00
|
|
|
cx + ev->output.x, cy + ev->output.y, 1, 1,
|
|
|
|
E_MENU_POP_DIRECTION_DOWN, ev->timestamp);
|
2006-05-17 23:30:33 -07:00
|
|
|
}
|
2005-05-14 07:08:16 -07:00
|
|
|
}
|
|
|
|
|
|
|
|
static void
|
2015-03-18 15:09:09 -07:00
|
|
|
_ibox_cb_icon_mouse_up(void *data, Evas *e EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *event_info)
|
2005-05-14 07:08:16 -07:00
|
|
|
{
|
2006-05-17 23:30:33 -07:00
|
|
|
Evas_Event_Mouse_Up *ev;
|
|
|
|
IBox_Icon *ic;
|
2007-01-02 12:55:12 -08:00
|
|
|
|
2006-05-17 23:30:33 -07:00
|
|
|
ev = event_info;
|
|
|
|
ic = data;
|
|
|
|
if ((ev->button == 1) && (!ic->drag.dnd))
|
2007-01-02 12:55:12 -08:00
|
|
|
{
|
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
2014-01-14 17:19:12 -08:00
|
|
|
e_client_uniconify(ic->client);
|
|
|
|
evas_object_focus_set(ic->client->frame, 1);
|
2006-05-27 15:58:09 -07:00
|
|
|
}
|
2005-05-14 07:08:16 -07:00
|
|
|
}
|
|
|
|
|
|
|
|
static void
|
2015-03-18 15:09:09 -07:00
|
|
|
_ibox_cb_icon_mouse_move(void *data, Evas *e EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *event_info)
|
2005-05-14 07:08:16 -07:00
|
|
|
{
|
2006-05-17 23:30:33 -07:00
|
|
|
Evas_Event_Mouse_Move *ev;
|
2005-05-14 07:08:16 -07:00
|
|
|
IBox_Icon *ic;
|
2007-01-02 12:55:12 -08:00
|
|
|
|
2005-05-14 07:08:16 -07:00
|
|
|
ev = event_info;
|
|
|
|
ic = data;
|
2006-05-17 23:30:33 -07:00
|
|
|
if (ic->drag.start)
|
|
|
|
{
|
2012-08-15 00:00:02 -07:00
|
|
|
int dx, dy;
|
|
|
|
|
|
|
|
dx = ev->cur.output.x - ic->drag.x;
|
|
|
|
dy = ev->cur.output.y - ic->drag.y;
|
|
|
|
if (((dx * dx) + (dy * dy)) >
|
|
|
|
(e_config->drag_resist * e_config->drag_resist))
|
|
|
|
{
|
|
|
|
E_Drag *d;
|
|
|
|
Evas_Object *o;
|
|
|
|
Evas_Coord x, y, w, h;
|
|
|
|
const char *drag_types[] = { "enlightenment/border" };
|
|
|
|
E_Gadcon_Client *gcc;
|
|
|
|
ic->drag.dnd = 1;
|
|
|
|
ic->drag.start = 0;
|
|
|
|
|
|
|
|
evas_object_geometry_get(ic->o_icon, &x, &y, &w, &h);
|
2015-03-13 13:14:48 -07:00
|
|
|
d = e_drag_new(x, y, drag_types, 1,
|
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
2014-01-14 17:19:12 -08:00
|
|
|
ic->client, -1, NULL, _ibox_cb_drag_finished);
|
2015-08-12 12:39:42 -07:00
|
|
|
d->button_mask = evas_pointer_button_down_mask_get(e_comp->evas);
|
2012-08-15 00:00:02 -07:00
|
|
|
|
2020-07-12 01:55:37 -07:00
|
|
|
if (!ic->ibox->inst->ci->show_preview)
|
|
|
|
o = e_client_icon_add(ic->client, e_drag_evas_get(d));
|
|
|
|
else
|
|
|
|
{
|
2020-08-19 03:53:16 -07:00
|
|
|
E_Client *ec = ic->client;
|
2020-11-06 18:49:41 -08:00
|
|
|
o = e_comp_object_util_frame_mirror_add(ec->frame);
|
2020-08-19 03:53:16 -07:00
|
|
|
evas_object_size_hint_aspect_set(o, EVAS_ASPECT_CONTROL_BOTH, ec->client.w, ec->client.h);
|
2020-07-12 01:55:37 -07:00
|
|
|
evas_object_size_hint_max_set(o, w, h);
|
|
|
|
}
|
|
|
|
e_drag_object_set(d, o);
|
2012-08-15 00:00:02 -07:00
|
|
|
e_drag_resize(d, w, h);
|
|
|
|
e_drag_start(d, ic->drag.x, ic->drag.y);
|
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
2014-01-14 17:19:12 -08:00
|
|
|
e_object_ref(E_OBJECT(ic->client));
|
2012-08-15 00:00:02 -07:00
|
|
|
gcc = ic->ibox->inst->gcc;
|
|
|
|
_gc_orient(gcc, -1);
|
|
|
|
}
|
2006-05-17 23:30:33 -07:00
|
|
|
}
|
2005-05-14 07:08:16 -07:00
|
|
|
}
|
|
|
|
|
|
|
|
static void
|
2015-03-18 15:09:09 -07:00
|
|
|
_ibox_cb_icon_move(void *data, Evas *e EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *event_info EINA_UNUSED)
|
2005-05-14 07:08:16 -07:00
|
|
|
{
|
|
|
|
IBox_Icon *ic;
|
2006-05-17 23:30:33 -07:00
|
|
|
Evas_Coord x, y;
|
2007-01-02 12:55:12 -08:00
|
|
|
|
2005-05-14 07:08:16 -07:00
|
|
|
ic = data;
|
2006-05-17 23:30:33 -07:00
|
|
|
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);
|
2005-05-14 07:08:16 -07:00
|
|
|
}
|
|
|
|
|
|
|
|
static void
|
2015-03-18 15:09:09 -07:00
|
|
|
_ibox_cb_icon_resize(void *data, Evas *e EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *event_info EINA_UNUSED)
|
2005-05-14 07:08:16 -07:00
|
|
|
{
|
|
|
|
IBox_Icon *ic;
|
2006-05-17 23:30:33 -07:00
|
|
|
Evas_Coord w, h;
|
2007-01-02 12:55:12 -08:00
|
|
|
|
2005-05-14 07:08:16 -07:00
|
|
|
ic = data;
|
2006-05-17 23:30:33 -07:00
|
|
|
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);
|
2005-05-14 07:08:16 -07:00
|
|
|
}
|
|
|
|
|
|
|
|
static void
|
2006-05-17 23:30:33 -07:00
|
|
|
_ibox_cb_drag_finished(E_Drag *drag, int dropped)
|
2005-05-14 07:08:16 -07:00
|
|
|
{
|
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
2014-01-14 17:19:12 -08:00
|
|
|
E_Client *ec;
|
2007-01-02 12:55:12 -08:00
|
|
|
|
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
2014-01-14 17:19:12 -08:00
|
|
|
ec = drag->data;
|
|
|
|
if (!dropped) e_client_uniconify(ec);
|
|
|
|
e_object_unref(E_OBJECT(ec));
|
2006-05-17 23:30:33 -07:00
|
|
|
}
|
2005-05-14 07:08:16 -07:00
|
|
|
|
2006-05-17 23:30:33 -07:00
|
|
|
static void
|
2015-03-18 15:09:09 -07:00
|
|
|
_ibox_cb_drop_move(void *data, Evas *e EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *event_info EINA_UNUSED)
|
2006-05-17 23:30:33 -07:00
|
|
|
{
|
|
|
|
IBox *b;
|
|
|
|
Evas_Coord x, y;
|
2007-01-02 12:55:12 -08:00
|
|
|
|
2006-05-17 23:30:33 -07:00
|
|
|
b = data;
|
|
|
|
evas_object_geometry_get(b->o_drop, &x, &y, NULL, NULL);
|
|
|
|
evas_object_move(b->o_drop_over, x, y);
|
2005-05-14 07:08:16 -07:00
|
|
|
}
|
|
|
|
|
|
|
|
static void
|
2015-03-18 15:09:09 -07:00
|
|
|
_ibox_cb_drop_resize(void *data, Evas *e EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *event_info EINA_UNUSED)
|
2005-05-14 07:08:16 -07:00
|
|
|
{
|
2006-05-17 23:30:33 -07:00
|
|
|
IBox *b;
|
|
|
|
Evas_Coord w, h;
|
2007-01-02 12:55:12 -08:00
|
|
|
|
2006-05-17 23:30:33 -07:00
|
|
|
b = data;
|
|
|
|
evas_object_geometry_get(b->o_drop, NULL, NULL, &w, &h);
|
|
|
|
evas_object_resize(b->o_drop_over, w, h);
|
|
|
|
}
|
2005-05-14 07:08:16 -07:00
|
|
|
|
2006-05-17 23:30:33 -07:00
|
|
|
static void
|
2006-11-14 22:24:30 -08:00
|
|
|
_ibox_inst_cb_scroll(void *data)
|
2006-05-17 23:30:33 -07:00
|
|
|
{
|
|
|
|
Instance *inst;
|
2006-11-14 22:24:30 -08:00
|
|
|
|
|
|
|
/* Update the position of the dnd to handle for autoscrolling
|
|
|
|
* gadgets. */
|
2006-05-17 23:30:33 -07:00
|
|
|
inst = data;
|
2006-11-14 22:24:30 -08:00
|
|
|
_ibox_drop_position_update(inst, inst->ibox->dnd_x, inst->ibox->dnd_y);
|
|
|
|
}
|
|
|
|
|
|
|
|
static void
|
|
|
|
_ibox_drop_position_update(Instance *inst, Evas_Coord x, Evas_Coord y)
|
|
|
|
{
|
|
|
|
IBox_Icon *ic;
|
|
|
|
|
|
|
|
inst->ibox->dnd_x = x;
|
|
|
|
inst->ibox->dnd_y = y;
|
|
|
|
|
|
|
|
if (inst->ibox->o_drop)
|
2015-01-01 14:29:25 -08:00
|
|
|
elm_box_unpack(inst->ibox->o_box, inst->ibox->o_drop);
|
2010-11-09 13:14:38 -08:00
|
|
|
ic = _ibox_icon_at_coord(inst->ibox, x, y);
|
2006-05-17 23:30:33 -07:00
|
|
|
inst->ibox->ic_drop_before = ic;
|
|
|
|
if (ic)
|
|
|
|
{
|
2012-08-15 00:00:02 -07:00
|
|
|
Evas_Coord ix, iy, iw, ih;
|
|
|
|
int before = 0;
|
|
|
|
|
|
|
|
evas_object_geometry_get(ic->o_holder, &ix, &iy, &iw, &ih);
|
2015-01-01 14:29:25 -08:00
|
|
|
if (elm_box_horizontal_get(inst->ibox->o_box))
|
2012-08-15 00:00:02 -07:00
|
|
|
{
|
2020-07-12 01:55:37 -07:00
|
|
|
if (x < (ix + iw)) before = 1;
|
2012-08-15 00:00:02 -07:00
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
2020-07-12 01:55:37 -07:00
|
|
|
if (y < (iy + ih)) before = 1;
|
2012-08-15 00:00:02 -07:00
|
|
|
}
|
|
|
|
if (before)
|
2015-01-01 14:29:25 -08:00
|
|
|
elm_box_pack_before(inst->ibox->o_box, inst->ibox->o_drop, ic->o_holder);
|
2012-08-15 00:00:02 -07:00
|
|
|
else
|
2015-01-01 14:29:25 -08:00
|
|
|
elm_box_pack_after(inst->ibox->o_box, inst->ibox->o_drop, ic->o_holder);
|
2012-08-15 00:00:02 -07:00
|
|
|
inst->ibox->drop_before = before;
|
2006-05-17 23:30:33 -07:00
|
|
|
}
|
2015-01-01 14:29:25 -08:00
|
|
|
else elm_box_pack_end(inst->ibox->o_box, inst->ibox->o_drop);
|
|
|
|
evas_object_size_hint_min_set(inst->ibox->o_drop, 1, 1);
|
2006-05-17 23:30:33 -07:00
|
|
|
_ibox_resize_handle(inst->ibox);
|
2008-11-05 11:43:26 -08:00
|
|
|
_gc_orient(inst->gcc, -1);
|
2006-11-14 22:24:30 -08:00
|
|
|
}
|
|
|
|
|
|
|
|
static void
|
2015-03-18 15:09:09 -07:00
|
|
|
_ibox_inst_cb_enter(void *data, const char *type EINA_UNUSED, void *event_info)
|
2006-11-14 22:24:30 -08:00
|
|
|
{
|
|
|
|
E_Event_Dnd_Enter *ev;
|
|
|
|
Instance *inst;
|
2020-07-12 01:55:37 -07:00
|
|
|
E_Client *ec;
|
2006-11-14 22:24:30 -08:00
|
|
|
Evas_Object *o, *o2;
|
2006-12-14 11:37:51 -08:00
|
|
|
|
2006-11-14 22:24:30 -08:00
|
|
|
ev = event_info;
|
|
|
|
inst = data;
|
2020-07-12 01:55:37 -07:00
|
|
|
|
|
|
|
ec = ev->data;
|
|
|
|
|
|
|
|
if (_ibox_icon_find(inst->ibox, ec)) return;
|
|
|
|
|
2006-11-14 22:24:30 -08:00
|
|
|
o = edje_object_add(evas_object_evas_get(inst->ibox->o_box));
|
|
|
|
inst->ibox->o_drop = o;
|
2015-01-01 14:29:25 -08:00
|
|
|
E_EXPAND(inst->ibox->o_drop);
|
|
|
|
E_FILL(inst->ibox->o_drop);
|
2006-11-14 22:24:30 -08:00
|
|
|
o2 = edje_object_add(evas_object_evas_get(inst->ibox->o_box));
|
|
|
|
inst->ibox->o_drop_over = o2;
|
|
|
|
evas_object_event_callback_add(o, EVAS_CALLBACK_MOVE, _ibox_cb_drop_move, inst->ibox);
|
|
|
|
evas_object_event_callback_add(o, EVAS_CALLBACK_RESIZE, _ibox_cb_drop_resize, inst->ibox);
|
|
|
|
e_theme_edje_object_set(o, "base/theme/modules/ibox",
|
2012-08-15 00:00:02 -07:00
|
|
|
"e/modules/ibox/drop");
|
2006-11-14 22:24:30 -08:00
|
|
|
e_theme_edje_object_set(o2, "base/theme/modules/ibox",
|
2012-08-15 00:00:02 -07:00
|
|
|
"e/modules/ibox/drop_overlay");
|
2006-11-14 22:24:30 -08:00
|
|
|
evas_object_layer_set(o2, 19999);
|
|
|
|
evas_object_show(o);
|
|
|
|
evas_object_show(o2);
|
|
|
|
_ibox_drop_position_update(inst, ev->x, ev->y);
|
|
|
|
e_gadcon_client_autoscroll_cb_set(inst->gcc, _ibox_inst_cb_scroll, inst);
|
2006-11-12 03:32:44 -08:00
|
|
|
e_gadcon_client_autoscroll_update(inst->gcc, ev->x, ev->y);
|
2005-05-14 07:08:16 -07:00
|
|
|
}
|
|
|
|
|
|
|
|
static void
|
2015-03-18 15:09:09 -07:00
|
|
|
_ibox_inst_cb_move(void *data, const char *type EINA_UNUSED, void *event_info)
|
2005-05-14 07:08:16 -07:00
|
|
|
{
|
2006-05-17 23:30:33 -07:00
|
|
|
E_Event_Dnd_Move *ev;
|
|
|
|
Instance *inst;
|
2006-12-14 11:37:51 -08:00
|
|
|
|
2005-05-14 07:08:16 -07:00
|
|
|
ev = event_info;
|
2006-05-17 23:30:33 -07:00
|
|
|
inst = data;
|
2020-07-12 01:55:37 -07:00
|
|
|
|
2006-11-14 22:24:30 -08:00
|
|
|
_ibox_drop_position_update(inst, ev->x, ev->y);
|
2006-11-12 03:32:44 -08:00
|
|
|
e_gadcon_client_autoscroll_update(inst->gcc, ev->x, ev->y);
|
2005-05-14 07:08:16 -07:00
|
|
|
}
|
|
|
|
|
|
|
|
static void
|
2015-03-18 15:09:09 -07:00
|
|
|
_ibox_inst_cb_leave(void *data, const char *type EINA_UNUSED, void *event_info EINA_UNUSED)
|
2005-05-14 07:08:16 -07:00
|
|
|
{
|
2006-05-17 23:30:33 -07:00
|
|
|
Instance *inst;
|
2007-01-02 12:55:12 -08:00
|
|
|
|
2006-05-17 23:30:33 -07:00
|
|
|
inst = data;
|
|
|
|
inst->ibox->ic_drop_before = NULL;
|
|
|
|
evas_object_del(inst->ibox->o_drop);
|
|
|
|
inst->ibox->o_drop = NULL;
|
|
|
|
evas_object_del(inst->ibox->o_drop_over);
|
|
|
|
inst->ibox->o_drop_over = NULL;
|
2006-11-14 22:24:30 -08:00
|
|
|
e_gadcon_client_autoscroll_cb_set(inst->gcc, NULL, NULL);
|
2006-05-17 23:30:33 -07:00
|
|
|
_ibox_resize_handle(inst->ibox);
|
2008-11-05 11:43:26 -08:00
|
|
|
_gc_orient(inst->gcc, -1);
|
2005-05-14 07:08:16 -07:00
|
|
|
}
|
|
|
|
|
|
|
|
static void
|
2006-05-17 23:30:33 -07:00
|
|
|
_ibox_inst_cb_drop(void *data, const char *type, void *event_info)
|
2005-05-14 07:08:16 -07:00
|
|
|
{
|
2006-05-17 23:30:33 -07:00
|
|
|
E_Event_Dnd_Drop *ev;
|
|
|
|
Instance *inst;
|
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
2014-01-14 17:19:12 -08:00
|
|
|
E_Client *ec = NULL;
|
2006-05-17 23:30:33 -07:00
|
|
|
IBox *b;
|
|
|
|
IBox_Icon *ic, *ic2;
|
2008-10-22 04:49:33 -07:00
|
|
|
Eina_List *l;
|
2007-01-02 12:55:12 -08:00
|
|
|
|
2005-05-14 07:08:16 -07:00
|
|
|
ev = event_info;
|
2006-05-17 23:30:33 -07:00
|
|
|
inst = data;
|
|
|
|
if (!strcmp(type, "enlightenment/border"))
|
|
|
|
{
|
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
2014-01-14 17:19:12 -08:00
|
|
|
ec = ev->data;
|
|
|
|
if (!ec) return;
|
2006-05-17 23:30:33 -07:00
|
|
|
}
|
2009-01-12 09:11:34 -08:00
|
|
|
else return;
|
2007-01-02 12:55:12 -08:00
|
|
|
|
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
2014-01-14 17:19:12 -08:00
|
|
|
if (!ec->iconic) e_client_iconify(ec);
|
2007-01-02 12:55:12 -08:00
|
|
|
|
2006-05-17 23:30:33 -07:00
|
|
|
ic2 = inst->ibox->ic_drop_before;
|
|
|
|
if (ic2)
|
|
|
|
{
|
2012-08-15 00:00:02 -07:00
|
|
|
/* Add new eapp before this icon */
|
|
|
|
if (!inst->ibox->drop_before)
|
|
|
|
{
|
2012-09-20 03:49:19 -07:00
|
|
|
EINA_LIST_FOREACH(inst->ibox->icons, l, ic)
|
2012-08-15 00:00:02 -07:00
|
|
|
{
|
2012-09-20 03:49:19 -07:00
|
|
|
if (ic == ic2)
|
2012-08-15 00:00:02 -07:00
|
|
|
{
|
2012-09-20 03:49:19 -07:00
|
|
|
ic2 = eina_list_data_get(l->next);
|
2012-08-15 00:00:02 -07:00
|
|
|
break;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
if (!ic2) goto atend;
|
|
|
|
b = inst->ibox;
|
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
2014-01-14 17:19:12 -08:00
|
|
|
if (_ibox_icon_find(b, ec)) return;
|
|
|
|
ic = _ibox_icon_new(b, ec);
|
2012-08-15 00:00:02 -07:00
|
|
|
if (!ic) return;
|
|
|
|
b->icons = eina_list_prepend_relative(b->icons, ic, ic2);
|
2015-01-01 14:29:25 -08:00
|
|
|
elm_box_pack_before(b->o_box, ic->o_holder, ic2->o_holder);
|
2006-05-17 23:30:33 -07:00
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
2012-08-15 00:00:02 -07:00
|
|
|
atend:
|
|
|
|
b = inst->ibox;
|
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
2014-01-14 17:19:12 -08:00
|
|
|
if (_ibox_icon_find(b, ec)) return;
|
|
|
|
ic = _ibox_icon_new(b, ec);
|
2012-08-15 00:00:02 -07:00
|
|
|
if (!ic) return;
|
|
|
|
b->icons = eina_list_append(b->icons, ic);
|
2015-01-01 14:29:25 -08:00
|
|
|
elm_box_pack_end(b->o_box, ic->o_holder);
|
2006-05-17 23:30:33 -07:00
|
|
|
}
|
2007-01-02 12:55:12 -08:00
|
|
|
|
2006-05-17 23:30:33 -07:00
|
|
|
evas_object_del(inst->ibox->o_drop);
|
|
|
|
inst->ibox->o_drop = NULL;
|
|
|
|
evas_object_del(inst->ibox->o_drop_over);
|
|
|
|
inst->ibox->o_drop_over = NULL;
|
|
|
|
_ibox_empty_handle(b);
|
2006-11-14 22:24:30 -08:00
|
|
|
e_gadcon_client_autoscroll_cb_set(inst->gcc, NULL, NULL);
|
2006-05-17 23:30:33 -07:00
|
|
|
_ibox_resize_handle(inst->ibox);
|
2008-11-05 11:43:26 -08:00
|
|
|
_gc_orient(inst->gcc, -1);
|
2005-05-14 07:08:16 -07:00
|
|
|
}
|
|
|
|
|
2010-06-24 09:19:12 -07:00
|
|
|
static Eina_Bool
|
2015-03-18 15:09:09 -07:00
|
|
|
_ibox_cb_event_client_add(void *data EINA_UNUSED, int type EINA_UNUSED, void *event)
|
2005-05-14 07:08:16 -07:00
|
|
|
{
|
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
2014-01-14 17:19:12 -08:00
|
|
|
E_Event_Client *ev = event;
|
2006-05-17 23:30:33 -07:00
|
|
|
IBox *b;
|
|
|
|
IBox_Icon *ic;
|
2007-03-18 10:15:59 -07:00
|
|
|
E_Desk *desk;
|
2013-03-26 04:51:40 -07:00
|
|
|
Eina_List *ibox;
|
2007-01-02 12:55:12 -08:00
|
|
|
|
2006-05-17 23:30:33 -07:00
|
|
|
/* add if iconic */
|
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
2014-01-14 17:19:12 -08:00
|
|
|
if (!ev->ec->iconic) return ECORE_CALLBACK_RENEW;
|
|
|
|
if (!ev->ec->zone) return ECORE_CALLBACK_RENEW;
|
|
|
|
desk = e_desk_current_get(ev->ec->zone);
|
2020-05-13 12:32:55 -07:00
|
|
|
|
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
2014-01-14 17:19:12 -08:00
|
|
|
ibox = _ibox_zone_find(ev->ec->zone);
|
2013-03-26 04:51:40 -07:00
|
|
|
EINA_LIST_FREE(ibox, b)
|
2005-05-14 07:08:16 -07:00
|
|
|
{
|
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
2014-01-14 17:19:12 -08:00
|
|
|
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);
|
2013-03-26 04:51:40 -07:00
|
|
|
if (!ic) continue;
|
|
|
|
b->icons = eina_list_append(b->icons, ic);
|
2015-01-01 14:29:25 -08:00
|
|
|
elm_box_pack_end(b->o_box, ic->o_holder);
|
2013-03-26 04:51:40 -07:00
|
|
|
_ibox_empty_handle(b);
|
|
|
|
_ibox_resize_handle(b);
|
|
|
|
_gc_orient(b->inst->gcc, -1);
|
2005-05-14 07:08:16 -07:00
|
|
|
}
|
2010-06-24 09:19:12 -07:00
|
|
|
return ECORE_CALLBACK_PASS_ON;
|
2005-05-14 07:08:16 -07:00
|
|
|
}
|
|
|
|
|
2010-06-24 09:19:12 -07:00
|
|
|
static Eina_Bool
|
2015-03-18 15:09:09 -07:00
|
|
|
_ibox_cb_event_client_remove(void *data EINA_UNUSED, int type EINA_UNUSED, void *event)
|
2005-05-14 07:08:16 -07:00
|
|
|
{
|
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
2014-01-14 17:19:12 -08:00
|
|
|
E_Event_Client *ev;
|
2006-05-17 23:30:33 -07:00
|
|
|
IBox *b;
|
|
|
|
IBox_Icon *ic;
|
2012-09-20 03:58:05 -07:00
|
|
|
Eina_List *ibox;
|
2007-01-02 12:55:12 -08:00
|
|
|
|
2006-05-17 23:30:33 -07:00
|
|
|
ev = event;
|
|
|
|
/* find icon and remove if there */
|
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
2014-01-14 17:19:12 -08:00
|
|
|
ibox = _ibox_zone_find(ev->ec->zone);
|
2012-09-20 03:58:05 -07:00
|
|
|
EINA_LIST_FREE(ibox, b)
|
2007-01-02 12:55:12 -08:00
|
|
|
{
|
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
2014-01-14 17:19:12 -08:00
|
|
|
ic = _ibox_icon_find(b, ev->ec);
|
2012-08-15 00:00:02 -07:00
|
|
|
if (!ic) continue;
|
|
|
|
b->icons = eina_list_remove(b->icons, ic);
|
2019-08-06 04:36:22 -07:00
|
|
|
_ibox_icon_free(ic);
|
2012-08-15 00:00:02 -07:00
|
|
|
_ibox_empty_handle(b);
|
|
|
|
_ibox_resize_handle(b);
|
|
|
|
_gc_orient(b->inst->gcc, -1);
|
2006-06-02 17:03:09 -07:00
|
|
|
}
|
|
|
|
|
2010-06-24 09:19:12 -07:00
|
|
|
return ECORE_CALLBACK_PASS_ON;
|
2005-05-14 07:08:16 -07:00
|
|
|
}
|
|
|
|
|
2010-06-24 09:19:12 -07:00
|
|
|
static Eina_Bool
|
2015-03-18 15:09:09 -07:00
|
|
|
_ibox_cb_event_client_iconify(void *data EINA_UNUSED, int type EINA_UNUSED, void *event)
|
2005-05-14 07:08:16 -07:00
|
|
|
{
|
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
2014-01-14 17:19:12 -08:00
|
|
|
E_Event_Client *ev;
|
2006-05-17 23:30:33 -07:00
|
|
|
IBox *b;
|
2005-05-14 07:08:16 -07:00
|
|
|
IBox_Icon *ic;
|
2012-09-20 03:58:05 -07:00
|
|
|
Eina_List *ibox;
|
2007-03-18 10:15:59 -07:00
|
|
|
E_Desk *desk;
|
2007-01-02 12:55:12 -08:00
|
|
|
|
2005-05-14 07:08:16 -07:00
|
|
|
ev = event;
|
2006-05-17 23:30:33 -07:00
|
|
|
/* add icon for ibox for right zone */
|
|
|
|
/* do some sort of anim when iconifying */
|
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
2014-01-14 17:19:12 -08:00
|
|
|
desk = e_desk_current_get(ev->ec->zone);
|
|
|
|
ibox = _ibox_zone_find(ev->ec->zone);
|
2012-09-20 03:58:05 -07:00
|
|
|
EINA_LIST_FREE(ibox, b)
|
2007-01-02 12:55:12 -08:00
|
|
|
{
|
2012-09-20 06:52:38 -07:00
|
|
|
int h, mw, mh;
|
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
2014-01-14 17:19:12 -08:00
|
|
|
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);
|
2012-08-15 00:00:02 -07:00
|
|
|
if (!ic) continue;
|
|
|
|
b->icons = eina_list_append(b->icons, ic);
|
2015-01-01 14:29:25 -08:00
|
|
|
elm_box_pack_end(b->o_box, ic->o_holder);
|
2012-08-15 00:00:02 -07:00
|
|
|
_ibox_empty_handle(b);
|
|
|
|
_ibox_resize_handle(b);
|
|
|
|
_gc_orient(b->inst->gcc, -1);
|
2012-09-20 06:52:38 -07:00
|
|
|
if (!b->inst->ci->expand_on_desktop) continue;
|
|
|
|
if (!e_gadcon_site_is_desktop(b->inst->gcc->gadcon->location->site)) continue;
|
2015-01-01 14:29:25 -08:00
|
|
|
elm_box_recalculate(b->o_box);
|
|
|
|
evas_object_size_hint_min_get(b->o_box, &mw, &mh);
|
2015-12-11 13:17:57 -08:00
|
|
|
if ((!mw) && (!mh))
|
|
|
|
evas_object_geometry_get(b->o_box, NULL, NULL, &mw, &mh);
|
2012-09-20 06:52:38 -07:00
|
|
|
evas_object_geometry_get(b->inst->gcc->o_frame, NULL, NULL, NULL, &h);
|
|
|
|
evas_object_resize(b->inst->gcc->o_frame, MIN(mw, b->inst->gcc->gadcon->zone->w), MAX(h, mh));
|
2006-06-02 17:03:09 -07:00
|
|
|
}
|
2010-06-24 09:19:12 -07:00
|
|
|
return ECORE_CALLBACK_PASS_ON;
|
2005-05-14 07:08:16 -07:00
|
|
|
}
|
|
|
|
|
2010-06-24 09:19:12 -07:00
|
|
|
static Eina_Bool
|
2015-03-18 15:09:09 -07:00
|
|
|
_ibox_cb_event_client_uniconify(void *data EINA_UNUSED, int type EINA_UNUSED, void *event)
|
2005-05-14 07:08:16 -07:00
|
|
|
{
|
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
2014-01-14 17:19:12 -08:00
|
|
|
E_Event_Client *ev;
|
2006-05-17 23:30:33 -07:00
|
|
|
IBox *b;
|
2005-05-14 07:08:16 -07:00
|
|
|
IBox_Icon *ic;
|
2012-09-20 03:58:05 -07:00
|
|
|
Eina_List *ibox;
|
2007-01-02 12:55:12 -08:00
|
|
|
|
2005-05-14 07:08:16 -07:00
|
|
|
ev = event;
|
2006-05-17 23:30:33 -07:00
|
|
|
/* del icon for ibox for right zone */
|
|
|
|
/* do some sort of anim when uniconifying */
|
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
2014-01-14 17:19:12 -08:00
|
|
|
ibox = _ibox_zone_find(ev->ec->zone);
|
2012-09-20 03:58:05 -07:00
|
|
|
EINA_LIST_FREE(ibox, b)
|
2007-01-02 12:55:12 -08:00
|
|
|
{
|
2012-09-20 06:52:38 -07:00
|
|
|
int mw, mh, h;
|
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
2014-01-14 17:19:12 -08:00
|
|
|
ic = _ibox_icon_find(b, ev->ec);
|
2012-08-15 00:00:02 -07:00
|
|
|
if (!ic) continue;
|
|
|
|
b->icons = eina_list_remove(b->icons, ic);
|
2019-08-06 04:40:08 -07:00
|
|
|
_ibox_icon_free(ic);
|
2012-08-15 00:00:02 -07:00
|
|
|
_ibox_empty_handle(b);
|
|
|
|
_ibox_resize_handle(b);
|
|
|
|
_gc_orient(b->inst->gcc, -1);
|
2012-09-20 06:52:38 -07:00
|
|
|
if (!b->inst->ci->expand_on_desktop) continue;
|
|
|
|
if (!e_gadcon_site_is_desktop(b->inst->gcc->gadcon->location->site)) continue;
|
2015-01-01 14:29:25 -08:00
|
|
|
elm_box_recalculate(b->o_box);
|
|
|
|
evas_object_size_hint_min_get(b->o_box, &mw, &mh);
|
2015-12-11 13:17:57 -08:00
|
|
|
if ((!mw) && (!mh))
|
|
|
|
evas_object_geometry_get(b->o_box, NULL, NULL, &mw, &mh);
|
2012-09-20 06:52:38 -07:00
|
|
|
evas_object_geometry_get(b->inst->gcc->o_frame, NULL, NULL, NULL, &h);
|
|
|
|
evas_object_resize(b->inst->gcc->o_frame, MIN(mw, b->inst->gcc->gadcon->zone->w), MAX(h, mh));
|
2006-06-02 17:03:09 -07:00
|
|
|
}
|
|
|
|
|
2010-06-24 09:19:12 -07:00
|
|
|
return ECORE_CALLBACK_PASS_ON;
|
2005-05-14 07:08:16 -07:00
|
|
|
}
|
|
|
|
|
2010-06-24 09:19:12 -07:00
|
|
|
static Eina_Bool
|
2015-03-18 15:09:09 -07:00
|
|
|
_ibox_cb_event_client_property(void *data EINA_UNUSED, int type EINA_UNUSED, E_Event_Client_Property *ev)
|
2005-12-12 18:56:19 -08:00
|
|
|
{
|
2006-05-17 23:30:33 -07:00
|
|
|
IBox *b;
|
2005-12-12 18:56:19 -08:00
|
|
|
IBox_Icon *ic;
|
2012-09-20 03:58:05 -07:00
|
|
|
Eina_List *ibox;
|
2007-01-02 12:55:12 -08:00
|
|
|
|
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
2014-01-14 17:19:12 -08:00
|
|
|
if ((ev->property & ~E_CLIENT_PROPERTY_ICON) && (ev->property & ~E_CLIENT_PROPERTY_URGENCY)) return ECORE_CALLBACK_RENEW;
|
|
|
|
ibox = _ibox_zone_find(ev->ec->zone);
|
2012-09-20 03:58:05 -07:00
|
|
|
EINA_LIST_FREE(ibox, b)
|
2006-10-24 07:32:22 -07:00
|
|
|
{
|
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
2014-01-14 17:19:12 -08:00
|
|
|
ic = _ibox_icon_find(b, ev->ec);
|
2012-08-15 00:00:02 -07:00
|
|
|
if (!ic) continue;
|
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
2014-01-14 17:19:12 -08:00
|
|
|
if ((ev->property & E_CLIENT_PROPERTY_ICON))
|
|
|
|
{
|
|
|
|
_ibox_icon_empty(ic);
|
|
|
|
_ibox_icon_fill(ic);
|
|
|
|
continue;
|
|
|
|
}
|
2014-03-05 05:16:35 -08:00
|
|
|
if (ev->ec->urgent)
|
2012-08-15 00:00:02 -07:00
|
|
|
{
|
|
|
|
e_gadcon_urgent_show(b->inst->gcc->gadcon);
|
|
|
|
edje_object_signal_emit(ic->o_holder, "e,state,urgent", "e");
|
|
|
|
edje_object_signal_emit(ic->o_holder2, "e,state,urgent", "e");
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
edje_object_signal_emit(ic->o_holder, "e,state,not_urgent", "e");
|
|
|
|
edje_object_signal_emit(ic->o_holder2, "e,state,not_urgent", "e");
|
|
|
|
}
|
2006-10-24 07:32:22 -07:00
|
|
|
}
|
|
|
|
|
2010-06-24 09:19:12 -07:00
|
|
|
return ECORE_CALLBACK_PASS_ON;
|
2006-10-24 07:32:22 -07:00
|
|
|
}
|
|
|
|
|
2010-06-24 09:19:12 -07:00
|
|
|
static Eina_Bool
|
2015-03-18 15:09:09 -07:00
|
|
|
_ibox_cb_event_client_zone_set(void *data EINA_UNUSED, int type EINA_UNUSED, void *event)
|
2005-05-14 07:08:16 -07:00
|
|
|
{
|
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
2014-01-14 17:19:12 -08:00
|
|
|
E_Event_Client_Zone_Set *ev;
|
2006-08-05 19:21:07 -07:00
|
|
|
|
2006-05-17 23:30:33 -07:00
|
|
|
ev = event;
|
|
|
|
/* delete from current zone ibox, add to new one */
|
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
2014-01-14 17:19:12 -08:00
|
|
|
if (ev->ec->iconic)
|
2007-01-02 12:55:12 -08:00
|
|
|
{
|
2005-05-14 07:08:16 -07:00
|
|
|
}
|
2006-05-17 23:30:33 -07:00
|
|
|
return 1;
|
2005-05-14 07:08:16 -07:00
|
|
|
}
|
|
|
|
|
2010-06-24 09:19:12 -07:00
|
|
|
static Eina_Bool
|
2015-03-18 15:09:09 -07:00
|
|
|
_ibox_cb_event_desk_show(void *data EINA_UNUSED, int type EINA_UNUSED, void *event)
|
2006-06-02 17:03:09 -07:00
|
|
|
{
|
|
|
|
E_Event_Desk_Show *ev;
|
|
|
|
IBox *b;
|
2012-09-20 03:58:05 -07:00
|
|
|
Eina_List *ibox;
|
2006-06-02 17:03:09 -07:00
|
|
|
|
|
|
|
ev = event;
|
|
|
|
/* delete all wins from ibox and add only for current desk */
|
|
|
|
ibox = _ibox_zone_find(ev->desk->zone);
|
2012-09-20 03:58:05 -07:00
|
|
|
EINA_LIST_FREE(ibox, b)
|
2006-06-02 17:03:09 -07:00
|
|
|
{
|
2012-08-15 00:00:02 -07:00
|
|
|
if (b->inst->ci->show_desk)
|
|
|
|
{
|
|
|
|
_ibox_empty(b);
|
|
|
|
_ibox_fill(b);
|
|
|
|
_ibox_resize_handle(b);
|
|
|
|
_gc_orient(b->inst->gcc, -1);
|
|
|
|
}
|
2006-06-02 17:03:09 -07:00
|
|
|
}
|
|
|
|
|
2010-06-24 09:19:12 -07:00
|
|
|
return ECORE_CALLBACK_PASS_ON;
|
2006-06-02 17:03:09 -07:00
|
|
|
}
|
|
|
|
|
2006-05-25 06:25:37 -07:00
|
|
|
static Config_Item *
|
2007-01-02 12:55:12 -08:00
|
|
|
_ibox_config_item_get(const char *id)
|
2006-05-25 06:25:37 -07:00
|
|
|
{
|
|
|
|
Config_Item *ci;
|
2007-09-15 19:23:32 -07:00
|
|
|
|
2011-09-03 07:39:28 -07:00
|
|
|
GADCON_CLIENT_CONFIG_GET(Config_Item, ibox_config->items, _gadcon_class, id);
|
|
|
|
|
2007-09-15 19:23:32 -07:00
|
|
|
ci = E_NEW(Config_Item, 1);
|
2008-10-15 08:12:56 -07:00
|
|
|
ci->id = eina_stringshare_add(id);
|
2007-09-15 19:23:32 -07:00
|
|
|
ci->show_label = 0;
|
|
|
|
ci->show_zone = 1;
|
|
|
|
ci->show_desk = 0;
|
|
|
|
ci->icon_label = 0;
|
2008-10-22 04:49:33 -07:00
|
|
|
ibox_config->items = eina_list_append(ibox_config->items, ci);
|
2006-05-25 06:25:37 -07:00
|
|
|
return ci;
|
|
|
|
}
|
|
|
|
|
|
|
|
void
|
2007-09-15 17:02:53 -07:00
|
|
|
_ibox_config_update(Config_Item *ci)
|
2006-05-25 06:25:37 -07:00
|
|
|
{
|
2008-10-22 04:49:33 -07:00
|
|
|
Eina_List *l;
|
2012-09-20 03:49:19 -07:00
|
|
|
Instance *inst;
|
2007-01-02 12:55:12 -08:00
|
|
|
|
2012-09-20 03:49:19 -07:00
|
|
|
EINA_LIST_FOREACH(ibox_config->instances, l, inst)
|
|
|
|
{
|
2012-08-15 00:00:02 -07:00
|
|
|
if (inst->ci != ci) continue;
|
2007-09-15 17:02:53 -07:00
|
|
|
|
2012-08-15 00:00:02 -07:00
|
|
|
_ibox_empty(inst->ibox);
|
|
|
|
_ibox_fill(inst->ibox);
|
|
|
|
_ibox_resize_handle(inst->ibox);
|
|
|
|
_gc_orient(inst->gcc, -1);
|
2006-05-25 06:25:37 -07:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
static void
|
2015-03-18 15:09:09 -07:00
|
|
|
_ibox_cb_menu_configuration(void *data, E_Menu *m EINA_UNUSED, E_Menu_Item *mi EINA_UNUSED)
|
2006-05-25 06:25:37 -07:00
|
|
|
{
|
|
|
|
IBox *b;
|
2006-06-02 17:03:09 -07:00
|
|
|
int ok = 1;
|
2008-10-22 04:49:33 -07:00
|
|
|
Eina_List *l;
|
2012-09-20 03:49:19 -07:00
|
|
|
E_Config_Dialog *cfd;
|
2007-01-02 12:55:12 -08:00
|
|
|
|
2006-05-25 06:25:37 -07:00
|
|
|
b = data;
|
2012-09-20 03:49:19 -07:00
|
|
|
EINA_LIST_FOREACH(ibox_config->config_dialog, l, cfd)
|
2006-06-02 17:03:09 -07:00
|
|
|
{
|
2012-08-15 00:00:02 -07:00
|
|
|
if (cfd->data == b->inst->ci)
|
|
|
|
{
|
|
|
|
ok = 0;
|
|
|
|
break;
|
|
|
|
}
|
2006-06-02 17:03:09 -07:00
|
|
|
}
|
2007-10-11 23:45:31 -07:00
|
|
|
if (ok) _config_ibox_module(b->inst->ci);
|
2006-05-25 06:25:37 -07:00
|
|
|
}
|
|
|
|
|
2006-05-17 23:30:33 -07:00
|
|
|
/***************************************************************************/
|
|
|
|
/**/
|
|
|
|
/* module setup */
|
2015-05-07 12:13:10 -07:00
|
|
|
E_API E_Module_Api e_modapi =
|
2005-05-14 07:08:16 -07:00
|
|
|
{
|
2006-05-17 23:30:33 -07:00
|
|
|
E_MODULE_API_VERSION,
|
2012-08-15 00:00:02 -07:00
|
|
|
"IBox"
|
2006-05-17 23:30:33 -07:00
|
|
|
};
|
2005-05-14 07:08:16 -07:00
|
|
|
|
2015-05-07 12:13:10 -07:00
|
|
|
E_API void *
|
2006-05-17 23:30:33 -07:00
|
|
|
e_modapi_init(E_Module *m)
|
|
|
|
{
|
2006-05-25 06:25:37 -07:00
|
|
|
conf_item_edd = E_CONFIG_DD_NEW("IBox_Config_Item", Config_Item);
|
|
|
|
#undef T
|
|
|
|
#undef D
|
|
|
|
#define T Config_Item
|
|
|
|
#define D conf_item_edd
|
|
|
|
E_CONFIG_VAL(D, T, id, STR);
|
2012-09-20 06:52:38 -07:00
|
|
|
E_CONFIG_VAL(D, T, expand_on_desktop, INT);
|
2006-05-25 06:25:37 -07:00
|
|
|
E_CONFIG_VAL(D, T, show_label, INT);
|
2006-06-02 17:03:09 -07:00
|
|
|
E_CONFIG_VAL(D, T, show_zone, INT);
|
|
|
|
E_CONFIG_VAL(D, T, show_desk, INT);
|
2006-06-02 18:49:33 -07:00
|
|
|
E_CONFIG_VAL(D, T, icon_label, INT);
|
2020-07-07 07:59:28 -07:00
|
|
|
E_CONFIG_VAL(D, T, show_preview, INT);
|
2007-01-02 12:55:12 -08:00
|
|
|
|
2006-05-25 06:25:37 -07:00
|
|
|
conf_edd = E_CONFIG_DD_NEW("IBox_Config", Config);
|
|
|
|
#undef T
|
|
|
|
#undef D
|
|
|
|
#define T Config
|
|
|
|
#define D conf_edd
|
|
|
|
E_CONFIG_LIST(D, T, items, conf_item_edd);
|
2007-01-02 12:55:12 -08:00
|
|
|
|
2006-05-25 06:25:37 -07:00
|
|
|
ibox_config = e_config_domain_load("module.ibox", conf_edd);
|
2007-01-02 12:55:12 -08:00
|
|
|
if (!ibox_config)
|
2006-05-25 06:25:37 -07:00
|
|
|
{
|
2012-08-15 00:00:02 -07:00
|
|
|
Config_Item *ci;
|
|
|
|
|
|
|
|
ibox_config = E_NEW(Config, 1);
|
|
|
|
|
|
|
|
ci = E_NEW(Config_Item, 1);
|
|
|
|
ci->id = eina_stringshare_add("ibox.1");
|
|
|
|
ci->show_label = 0;
|
|
|
|
ci->show_zone = 1;
|
|
|
|
ci->show_desk = 0;
|
|
|
|
ci->icon_label = 0;
|
|
|
|
ibox_config->items = eina_list_append(ibox_config->items, ci);
|
2006-05-25 06:25:37 -07:00
|
|
|
}
|
2012-08-15 00:00:02 -07:00
|
|
|
|
2006-05-17 23:30:33 -07:00
|
|
|
ibox_config->module = m;
|
2012-08-15 00:00:02 -07:00
|
|
|
|
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
2014-01-14 17:19:12 -08:00
|
|
|
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);
|
2012-09-21 02:23:07 -07:00
|
|
|
E_LIST_HANDLER_APPEND(ibox_config->handlers, E_EVENT_DESK_SHOW, _ibox_cb_event_desk_show, NULL);
|
2007-01-02 12:55:12 -08:00
|
|
|
|
|
|
|
/* FIXME: add these later for things taskbar-like functionality
|
2008-10-22 04:49:33 -07:00
|
|
|
ibox_config->handlers = eina_list_append
|
2006-05-17 23:30:33 -07:00
|
|
|
(ibox_config->handlers, ecore_event_handler_add
|
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
2014-01-14 17:19:12 -08:00
|
|
|
(E_EVENT_CLIENT_DESK_SET, _ibox_cb_event_client_zone_set, NULL));
|
2008-10-22 04:49:33 -07:00
|
|
|
ibox_config->handlers = eina_list_append
|
2006-05-17 23:30:33 -07:00
|
|
|
(ibox_config->handlers, ecore_event_handler_add
|
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
2014-01-14 17:19:12 -08:00
|
|
|
(E_EVENT_CLIENT_SHOW, _ibox_cb_event_client_zone_set, NULL));
|
2008-10-22 04:49:33 -07:00
|
|
|
ibox_config->handlers = eina_list_append
|
2006-05-17 23:30:33 -07:00
|
|
|
(ibox_config->handlers, ecore_event_handler_add
|
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
2014-01-14 17:19:12 -08:00
|
|
|
(E_EVENT_CLIENT_HIDE, _ibox_cb_event_client_zone_set, NULL));
|
2008-10-22 04:49:33 -07:00
|
|
|
ibox_config->handlers = eina_list_append
|
2006-05-17 23:30:33 -07:00
|
|
|
(ibox_config->handlers, ecore_event_handler_add
|
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
2014-01-14 17:19:12 -08:00
|
|
|
(E_EVENT_CLIENT_STACK, _ibox_cb_event_client_zone_set, NULL));
|
2008-10-22 04:49:33 -07:00
|
|
|
ibox_config->handlers = eina_list_append
|
2006-05-17 23:30:33 -07:00
|
|
|
(ibox_config->handlers, ecore_event_handler_add
|
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
2014-01-14 17:19:12 -08:00
|
|
|
(E_EVENT_CLIENT_STICK, _ibox_cb_event_client_zone_set, NULL));
|
2006-05-17 23:30:33 -07:00
|
|
|
*/
|
|
|
|
e_gadcon_provider_register(&_gadcon_class);
|
2006-07-24 21:15:11 -07:00
|
|
|
return m;
|
2005-05-14 07:08:16 -07:00
|
|
|
}
|
|
|
|
|
2015-05-07 12:13:10 -07:00
|
|
|
E_API int
|
2015-03-18 15:09:09 -07:00
|
|
|
e_modapi_shutdown(E_Module *m EINA_UNUSED)
|
2005-05-14 07:08:16 -07:00
|
|
|
{
|
2012-09-20 03:53:31 -07:00
|
|
|
Config_Item *ci;
|
2006-05-17 23:30:33 -07:00
|
|
|
e_gadcon_provider_unregister(&_gadcon_class);
|
2006-05-25 06:25:37 -07:00
|
|
|
|
2012-09-20 03:53:31 -07:00
|
|
|
E_FREE_LIST(ibox_config->handlers, ecore_event_handler_del);
|
2006-06-02 17:03:09 -07:00
|
|
|
|
|
|
|
while (ibox_config->config_dialog)
|
|
|
|
/* there is no need to eves_list_remove_list. It is done implicitly in
|
|
|
|
* dialog _free_data function
|
|
|
|
*/
|
|
|
|
e_object_del(E_OBJECT(ibox_config->config_dialog->data));
|
|
|
|
|
2012-09-20 03:53:31 -07:00
|
|
|
EINA_LIST_FREE(ibox_config->items, ci)
|
2006-05-25 06:25:37 -07:00
|
|
|
{
|
2012-09-20 03:53:31 -07:00
|
|
|
eina_stringshare_del(ci->id);
|
2012-08-15 00:00:02 -07:00
|
|
|
free(ci);
|
2006-05-25 06:25:37 -07:00
|
|
|
}
|
2007-01-02 12:55:12 -08:00
|
|
|
|
2012-09-20 03:53:31 -07:00
|
|
|
E_FREE(ibox_config);
|
2006-05-25 06:25:37 -07:00
|
|
|
E_CONFIG_DD_FREE(conf_item_edd);
|
|
|
|
E_CONFIG_DD_FREE(conf_edd);
|
2006-05-17 23:30:33 -07:00
|
|
|
return 1;
|
2005-05-14 07:08:16 -07:00
|
|
|
}
|
|
|
|
|
2015-05-07 12:13:10 -07:00
|
|
|
E_API int
|
2015-03-18 15:09:09 -07:00
|
|
|
e_modapi_save(E_Module *m EINA_UNUSED)
|
2005-05-14 07:08:16 -07:00
|
|
|
{
|
2006-05-25 06:25:37 -07:00
|
|
|
e_config_domain_save("module.ibox", conf_edd, ibox_config);
|
2006-05-17 23:30:33 -07:00
|
|
|
return 1;
|
2005-05-14 07:08:16 -07:00
|
|
|
}
|
2012-08-15 00:00:02 -07:00
|
|
|
|