|
|
|
#include "e.h"
|
|
|
|
|
|
|
|
static void _e_shelf_new_dialog_ok(void *data, char *text);
|
|
|
|
static void _e_shelf_del_cb(void *d);
|
|
|
|
static void _e_shelf_free(E_Shelf *es);
|
|
|
|
static void _e_shelf_gadcon_min_size_request(void *data, E_Gadcon *gc, Evas_Coord w, Evas_Coord h);
|
|
|
|
static void _e_shelf_gadcon_size_request(void *data, E_Gadcon *gc, Evas_Coord w, Evas_Coord h);
|
|
|
|
static Evas_Object *_e_shelf_gadcon_frame_request(void *data, E_Gadcon_Client *gcc, const char *style);
|
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
9 years ago
|
|
|
static void _e_shelf_toggle_client_fix(E_Shelf *es);
|
|
|
|
static void _e_shelf_cb_menu_config(void *data, E_Menu *m, E_Menu_Item *mi);
|
|
|
|
static void _e_shelf_cb_menu_edit(void *data, E_Menu *m, E_Menu_Item *mi);
|
|
|
|
static void _e_shelf_cb_menu_contents(void *data, E_Menu *m, E_Menu_Item *mi);
|
|
|
|
static void _e_shelf_cb_confirm_dialog_yes(void *data);
|
|
|
|
static void _e_shelf_cb_menu_delete(void *data, E_Menu *m, E_Menu_Item *mi);
|
|
|
|
static void _e_shelf_menu_append(E_Shelf *es, E_Menu *mn);
|
|
|
|
static void _e_shelf_cb_menu_items_append(void *data, E_Gadcon_Client *gcc, E_Menu *mn);
|
|
|
|
static void _e_shelf_cb_locked_set(void *data, int lock);
|
|
|
|
static void _e_shelf_cb_urgent_show(void *data);
|
|
|
|
static void _e_shelf_cb_mouse_down(void *data, Evas *evas, Evas_Object *obj, void *event_info);
|
|
|
|
static Eina_Bool _e_shelf_cb_mouse_in(void *data, int type, void *event);
|
|
|
|
//static Eina_Bool _e_shelf_cb_mouse_out(void *data, int type, void *event);
|
|
|
|
//static void _e_shelf_cb_mouse_out2(E_Shelf *es, Evas *e, Evas_Object *obj, Evas_Event_Mouse_Out *ev);
|
|
|
|
static int _e_shelf_cb_id_sort(const void *data1, const void *data2);
|
|
|
|
static void _e_shelf_cb_menu_rename(void *data, E_Menu *m EINA_UNUSED, E_Menu_Item *mi EINA_UNUSED);
|
|
|
|
static Eina_Bool _e_shelf_cb_hide_animator(void *data);
|
|
|
|
static Eina_Bool _e_shelf_cb_hide_animator_timer(void *data);
|
|
|
|
static Eina_Bool _e_shelf_cb_hide_urgent_timer(void *data);
|
|
|
|
static Eina_Bool _e_shelf_cb_instant_hide_timer(void *data);
|
|
|
|
static void _e_shelf_menu_pre_cb(void *data, E_Menu *m);
|
|
|
|
static void _e_shelf_gadcon_client_remove(void *data, E_Gadcon_Client *gcc);
|
|
|
|
static int _e_shelf_gadcon_client_add(void *data, E_Gadcon_Client *gcc, const E_Gadcon_Client_Class *cc);
|
|
|
|
static const char *_e_shelf_orient_icon_name_get(E_Shelf *s);
|
|
|
|
static void _e_shelf_bindings_add(E_Shelf *es);
|
|
|
|
static void _e_shelf_bindings_del(E_Shelf *es);
|
|
|
|
static Eina_Bool _e_shelf_on_current_desk(E_Shelf *es, E_Event_Zone_Edge *ev);
|
|
|
|
static void _e_shelf_cb_dummy_del(E_Shelf *, Evas *e, Evas_Object *obj, void *event_info);
|
|
|
|
static void _e_shelf_cb_dummy_moveresize(E_Shelf *, Evas *e, Evas_Object *obj, void *event_info);
|
|
|
|
static Eina_Bool _e_shelf_gadcon_populate_handler_cb(void *, int, void *);
|
|
|
|
static void _e_shelf_event_rename_end_cb(void *data, E_Event_Shelf *ev);
|
|
|
|
|
|
|
|
static Eina_List *shelves = NULL;
|
|
|
|
static Eina_List *dummies = NULL;
|
|
|
|
|
|
|
|
static int orientations[] =
|
|
|
|
{
|
|
|
|
[E_GADCON_ORIENT_FLOAT] = 2,
|
|
|
|
[E_GADCON_ORIENT_HORIZ] = 2,
|
|
|
|
[E_GADCON_ORIENT_VERT] = 2,
|
|
|
|
[E_GADCON_ORIENT_LEFT] = 37,
|
|
|
|
[E_GADCON_ORIENT_RIGHT] = 31,
|
|
|
|
[E_GADCON_ORIENT_TOP] = 29,
|
|
|
|
[E_GADCON_ORIENT_BOTTOM] = 23,
|
|
|
|
[E_GADCON_ORIENT_CORNER_TL] = 19,
|
|
|
|
[E_GADCON_ORIENT_CORNER_TR] = 17,
|
|
|
|
[E_GADCON_ORIENT_CORNER_BL] = 13,
|
|
|
|
[E_GADCON_ORIENT_CORNER_BR] = 11,
|
|
|
|
[E_GADCON_ORIENT_CORNER_LT] = 7,
|
|
|
|
[E_GADCON_ORIENT_CORNER_RT] = 5,
|
|
|
|
[E_GADCON_ORIENT_CORNER_LB] = 3,
|
|
|
|
[E_GADCON_ORIENT_CORNER_RB] = 2
|
|
|
|
};
|
|
|
|
|
|
|
|
static const char *orient_names[] =
|
|
|
|
{
|
|
|
|
[E_GADCON_ORIENT_FLOAT] = N_("Float"),
|
|
|
|
[E_GADCON_ORIENT_HORIZ] = N_("Horizontal"),
|
|
|
|
[E_GADCON_ORIENT_VERT] = N_("Vertical"),
|
|
|
|
[E_GADCON_ORIENT_LEFT] = N_("Left"),
|
|
|
|
[E_GADCON_ORIENT_RIGHT] = N_("Right"),
|
|
|
|
[E_GADCON_ORIENT_TOP] = N_("Top"),
|
|
|
|
[E_GADCON_ORIENT_BOTTOM] = N_("Bottom"),
|
|
|
|
[E_GADCON_ORIENT_CORNER_TL] = N_("Top-left Corner"),
|
|
|
|
[E_GADCON_ORIENT_CORNER_TR] = N_("Top-right Corner"),
|
|
|
|
[E_GADCON_ORIENT_CORNER_BL] = N_("Bottom-left Corner"),
|
|
|
|
[E_GADCON_ORIENT_CORNER_BR] = N_("Bottom-right Corner"),
|
|
|
|
[E_GADCON_ORIENT_CORNER_LT] = N_("Left-top Corner"),
|
|
|
|
[E_GADCON_ORIENT_CORNER_RT] = N_("Right-top Corner"),
|
|
|
|
[E_GADCON_ORIENT_CORNER_LB] = N_("Left-bottom Corner"),
|
|
|
|
[E_GADCON_ORIENT_CORNER_RB] = N_("Right-bottom Corner")
|
|
|
|
};
|
|
|
|
|
|
|
|
E_API int E_EVENT_SHELF_RENAME = -1;
|
|
|
|
E_API int E_EVENT_SHELF_ADD = -1;
|
|
|
|
E_API int E_EVENT_SHELF_DEL = -1;
|
|
|
|
static Eina_List *handlers;
|
|
|
|
|
|
|
|
static inline Eina_Bool
|
|
|
|
_e_shelf_is_horizontal(const E_Shelf *es)
|
|
|
|
{
|
|
|
|
Eina_Bool horiz = EINA_FALSE;
|
|
|
|
switch (es->gadcon->orient)
|
|
|
|
{
|
|
|
|
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:
|
|
|
|
horiz = 1;
|
|
|
|
break;
|
|
|
|
|
|
|
|
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:
|
|
|
|
horiz = 0;
|
|
|
|
break;
|
|
|
|
|
|
|
|
default:
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
return horiz;
|
|
|
|
}
|
|
|
|
|
|
|
|
static void
|
|
|
|
_e_shelf_remaximize(E_Shelf *es)
|
|
|
|
{
|
|
|
|
E_Client *ec;
|
|
|
|
|
|
|
|
if ((!e_config->border_fix_on_shelf_toggle) || es->cfg->overlap) return;
|
|
|
|
E_CLIENT_FOREACH(ec)
|
|
|
|
{
|
|
|
|
E_Maximize max = ec->maximized;
|
|
|
|
|
|
|
|
if (!ec->maximized) continue;
|
|
|
|
if ((!ec->sticky) && (!e_shelf_desk_visible(es, ec->desk ?: e_desk_current_get(es->zone))))
|
|
|
|
continue;
|
|
|
|
e_client_unmaximize(ec, ec->maximized);
|
|
|
|
e_client_maximize(ec, max);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
static void
|
|
|
|
_e_shelf_obstacles_update(E_Shelf *es)
|
|
|
|
{
|
|
|
|
Eina_List *l;
|
|
|
|
E_Zone_Obstacle *obs;
|
|
|
|
|
|
|
|
EINA_LIST_FOREACH(es->zone_obstacles, l, obs)
|
|
|
|
e_zone_obstacle_modify(obs,
|
|
|
|
&(Eina_Rectangle){es->x + es->zone->x, es->y + es->zone->y, es->w, es->h},
|
|
|
|
!_e_shelf_is_horizontal(es));
|
|
|
|
}
|
|
|
|
|
|
|
|
static Eina_Bool
|
|
|
|
_e_shelf_desk_count_handler(void *d EINA_UNUSED, int t EINA_UNUSED, E_Event_Zone_Desk_Count_Set *ev)
|
|
|
|
{
|
|
|
|
Eina_List *l;
|
|
|
|
E_Shelf *es;
|
|
|
|
|
|
|
|
EINA_LIST_FOREACH(shelves, l, es)
|
|
|
|
if (es->cfg->desk_show_mode && (ev->zone == es->zone))
|
|
|
|
e_shelf_obstacles_update(es);
|
|
|
|
return ECORE_CALLBACK_RENEW;
|
|
|
|
}
|
|
|
|
|
|
|
|
static Eina_Bool
|
|
|
|
_e_shelf_autohide_timer_extend(E_Shelf *es)
|
|
|
|
{
|
|
|
|
if (es->autohide_timer && es->hide_timer)
|
|
|
|
{
|
|
|
|
ecore_timer_loop_reset(es->autohide_timer);
|
|
|
|
ecore_timer_loop_reset(es->hide_timer);
|
|
|
|
return EINA_TRUE;
|
|
|
|
}
|
|
|
|
ecore_timer_del(es->autohide_timer);
|
|
|
|
es->autohide_timer = NULL;
|
|
|
|
return EINA_FALSE;
|
|
|
|
}
|
|
|
|
|
|
|
|
/* externally accessible functions */
|
|
|
|
EINTERN int
|
|
|
|
e_shelf_init(void)
|
|
|
|
{
|
|
|
|
E_EVENT_SHELF_RENAME = ecore_event_type_new();
|
|
|
|
E_EVENT_SHELF_ADD = ecore_event_type_new();
|
|
|
|
E_EVENT_SHELF_DEL = ecore_event_type_new();
|
|
|
|
E_LIST_HANDLER_APPEND(handlers, E_EVENT_GADCON_POPULATE, _e_shelf_gadcon_populate_handler_cb, NULL);
|
|
|
|
E_LIST_HANDLER_APPEND(handlers, E_EVENT_ZONE_DESK_COUNT_SET, _e_shelf_desk_count_handler, NULL);
|
|
|
|
return 1;
|
|
|
|
}
|
|
|
|
|
|
|
|
EINTERN int
|
|
|
|
e_shelf_shutdown(void)
|
|
|
|
{
|
|
|
|
if (x_fatal) return 1;
|
|
|
|
while (shelves)
|
|
|
|
{
|
|
|
|
E_Shelf *es;
|
|
|
|
|
|
|
|
es = eina_list_data_get(shelves);
|
|
|
|
e_object_del(E_OBJECT(es));
|
|
|
|
}
|
|
|
|
E_FREE_LIST(handlers, ecore_event_handler_del);
|
|
|
|
|
|
|
|
return 1;
|
|
|
|
}
|
|
|
|
|
|
|
|
E_API void
|
|
|
|
e_shelf_config_update(void)
|
|
|
|
{
|
|
|
|
Eina_List *l;
|
|
|
|
E_Config_Shelf *cf_es;
|
|
|
|
int id = 0;
|
|
|
|
|
|
|
|
while (shelves)
|
|
|
|
{
|
|
|
|
E_Shelf *es;
|
|
|
|
|
|
|
|
es = eina_list_data_get(shelves);
|
|
|
|
e_object_del(E_OBJECT(es));
|
|
|
|
}
|
|
|
|
|
|
|
|
EINA_LIST_FOREACH(e_config->shelves, l, cf_es)
|
|
|
|
{
|
|
|
|
E_Zone *zone;
|
|
|
|
|
|
|
|
if (cf_es->id <= 0) cf_es->id = id + 1;
|
|
|
|
zone = e_comp_zone_number_get(cf_es->zone);
|
|
|
|
if (zone)
|
|
|
|
e_shelf_config_new(zone, cf_es);
|
|
|
|
id = cf_es->id;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
E_API Eina_List *
|
|
|
|
e_shelf_list_all(void)
|
|
|
|
{
|
|
|
|
Eina_List *d = NULL, *s = NULL, *ret = NULL;
|
|
|
|
|
|
|
|
if (shelves)
|
|
|
|
s = eina_list_clone(shelves);
|
|
|
|
if (dummies)
|
|
|
|
d = eina_list_clone(dummies);
|
|
|
|
if (s && d)
|
|
|
|
ret = eina_list_merge(s, d);
|
|
|
|
else
|
|
|
|
ret = d ? : s;
|
|
|
|
return ret;
|
|
|
|
}
|
|
|
|
|
|
|
|
E_API Eina_List *
|
|
|
|
e_shelf_list(void)
|
|
|
|
{
|
|
|
|
shelves = eina_list_sort(shelves, -1, _e_shelf_cb_id_sort);
|
|
|
|
return shelves;
|
|
|
|
}
|
|
|
|
|
|
|
|
E_API E_Shelf *
|
|
|
|
e_shelf_zone_dummy_new(E_Zone *zone, Evas_Object *obj, int id)
|
|
|
|
{
|
|
|
|
E_Shelf *es;
|
|
|
|
|
|
|
|
es = E_OBJECT_ALLOC(E_Shelf, E_SHELF_DUMMY_TYPE, _e_shelf_free);
|
|
|
|
if (!es) return NULL;
|
|
|
|
es->id = id;
|
|
|
|
evas_object_geometry_get(obj, &es->x, &es->y, &es->w, &es->h);
|
|
|
|
evas_object_event_callback_add(obj, EVAS_CALLBACK_DEL,
|
|
|
|
(Evas_Object_Event_Cb)_e_shelf_cb_dummy_del, es);
|
|
|
|
evas_object_event_callback_add(obj, EVAS_CALLBACK_MOVE,
|
|
|
|
(Evas_Object_Event_Cb)_e_shelf_cb_dummy_moveresize, es);
|
|
|
|
evas_object_event_callback_add(obj, EVAS_CALLBACK_RESIZE,
|
|
|
|
(Evas_Object_Event_Cb)_e_shelf_cb_dummy_moveresize, es);
|
|
|
|
es->zone = zone;
|
|
|
|
es->dummy = 1;
|
|
|
|
es->o_base = obj;
|
|
|
|
es->cfg = E_NEW(E_Config_Shelf, 1);
|
|
|
|
|
|
|
|
e_object_del_attach_func_set(E_OBJECT(es), _e_shelf_del_cb);
|
|
|
|
dummies = eina_list_append(dummies, es);
|
|
|
|
|
|
|
|
return es;
|
|
|
|
}
|
|
|
|
|
|
|
|
static void
|
|
|
|
_e_shelf_hidden(void *data, Evas *e EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *event_info EINA_UNUSED)
|
|
|
|
{
|
|
|
|
E_Shelf *es = data;
|
|
|
|
es->hiding = 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
static Eina_Bool
|
|
|
|
_shelf_content_fix(void *data)
|
|
|
|
{
|
|
|
|
// I really don't know how it gets here but objects and their geometry are
|
|
|
|
// wrong - something to do woith zoomap as well as geometry changing
|
|
|
|
// at the same time so things going weird with child size and thus
|
|
|
|
// position etc.
|
|
|
|
E_Shelf *es = data;
|
|
|
|
int w, h;
|
|
|
|
|
|
|
|
es->fix_timer = NULL;
|
|
|
|
w = es->w;
|
|
|
|
h = es->h;
|
|
|
|
e_shelf_resize(es, w + 1, h + 1);
|
|
|
|
e_shelf_resize(es, w, h);
|
|
|
|
return EINA_FALSE;
|
|
|
|
}
|
|
|
|
|
|
|
|
E_API E_Shelf *
|
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
9 years ago
|
|
|
e_shelf_zone_new(E_Zone *zone, const char *name, const char *style, E_Layer layer, int id)
|
|
|
|
{
|
|
|
|
E_Shelf *es;
|
|
|
|
char buf[1024];
|
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
9 years ago
|
|
|
E_Comp_Object_Type type = E_COMP_OBJECT_TYPE_POPUP;
|
|
|
|
|
|
|
|
es = E_OBJECT_ALLOC(E_Shelf, E_SHELF_TYPE, _e_shelf_free);
|
|
|
|
if (!es) return NULL;
|
|
|
|
es->id = id;
|
|
|
|
es->x = 0;
|
|
|
|
es->y = 0;
|
|
|
|
es->w = 32;
|
|
|
|
es->h = 32;
|
|
|
|
es->zone = zone;
|
|
|
|
e_object_del_attach_func_set(E_OBJECT(es), _e_shelf_del_cb);
|
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
9 years ago
|
|
|
|
|
|
|
es->ee = e_comp->ee;
|
|
|
|
es->evas = e_comp->evas;
|
|
|
|
es->fit_along = 1;
|
|
|
|
es->layer = layer;
|
|
|
|
|
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
9 years ago
|
|
|
E_LIST_HANDLER_APPEND(es->handlers, E_EVENT_ZONE_EDGE_MOVE, _e_shelf_cb_mouse_in, es);
|
|
|
|
es->o_base = edje_object_add(es->evas);
|
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
9 years ago
|
|
|
evas_object_name_set(es->o_base, "shelf");
|
|
|
|
evas_object_event_callback_add(es->o_base, EVAS_CALLBACK_MOUSE_DOWN,
|
|
|
|
_e_shelf_cb_mouse_down, es);
|
|
|
|
es->name = eina_stringshare_add(name);
|
|
|
|
evas_object_resize(es->o_base, es->w, es->h);
|
|
|
|
|
|
|
|
e_shelf_style_set(es, style);
|
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
9 years ago
|
|
|
evas_object_move(es->o_base, es->zone->x + es->x, es->zone->y + es->y);
|
|
|
|
if ((layer == E_LAYER_DESKTOP) || edje_object_data_get(es->o_base, "noshadow"))
|
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
9 years ago
|
|
|
type = E_COMP_OBJECT_TYPE_NONE;
|
|
|
|
es->comp_object = e_comp_object_util_add(es->o_base, type);
|
|
|
|
evas_object_event_callback_add(es->comp_object, EVAS_CALLBACK_HIDE, _e_shelf_hidden, es);
|
|
|
|
evas_object_data_set(es->comp_object, "E_Shelf", es);
|
|
|
|
evas_object_data_set(es->comp_object, "comp_skip", (void*)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
9 years ago
|
|
|
evas_object_name_set(es->comp_object, es->name);
|
|
|
|
evas_object_layer_set(es->comp_object, layer);
|
|
|
|
evas_object_lower(es->comp_object);
|
|
|
|
|
|
|
|
es->gadcon =
|
|
|
|
e_gadcon_swallowed_new(es->name, es->id, es->o_base, "e.swallow.content");
|
|
|
|
if (es->name)
|
|
|
|
snprintf(buf, sizeof(buf), "%s", es->name);
|
|
|
|
else
|
|
|
|
snprintf(buf, sizeof(buf), _("Shelf #%d"), es->id);
|
|
|
|
es->gadcon->location =
|
|
|
|
e_gadcon_location_new(buf, E_GADCON_SITE_SHELF,
|
|
|
|
_e_shelf_gadcon_client_add, es,
|
|
|
|
_e_shelf_gadcon_client_remove, es);
|
|
|
|
e_gadcon_location_register(es->gadcon->location);
|
|
|
|
// hmm dnd in ibar and ibox kill this. ok. need to look into this more
|
|
|
|
// es->gadcon->instant_edit = 1;
|
|
|
|
e_gadcon_min_size_request_callback_set(es->gadcon,
|
|
|
|
_e_shelf_gadcon_min_size_request, es);
|
|
|
|
|
|
|
|
e_gadcon_size_request_callback_set(es->gadcon,
|
|
|
|
_e_shelf_gadcon_size_request, es);
|
|
|
|
e_gadcon_frame_request_callback_set(es->gadcon,
|
|
|
|
_e_shelf_gadcon_frame_request, es);
|
|
|
|
e_gadcon_orient(es->gadcon, E_GADCON_ORIENT_TOP);
|
|
|
|
snprintf(buf, sizeof(buf), "e,state,orientation,%s",
|
|
|
|
e_shelf_orient_string_get(es));
|
|
|
|
edje_object_signal_emit(es->o_base, buf, "e");
|
|
|
|
edje_object_message_signal_process(es->o_base);
|
|
|
|
e_gadcon_zone_set(es->gadcon, zone);
|
|
|
|
e_gadcon_ecore_evas_set(es->gadcon, es->ee);
|
|
|
|
e_gadcon_shelf_set(es->gadcon, es);
|
|
|
|
e_gadcon_xdnd_window_set(es->gadcon, e_comp->ee_win);
|
|
|
|
e_gadcon_dnd_window_set(es->gadcon, e_comp->ee_win);
|
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
9 years ago
|
|
|
evas_object_clip_set(es->comp_object, es->zone->bg_clip_object);
|
|
|
|
e_gadcon_util_menu_attach_func_set(es->gadcon,
|
|
|
|
_e_shelf_cb_menu_items_append, es);
|
|
|
|
|
|
|
|
e_gadcon_util_lock_func_set(es->gadcon,
|
|
|
|
_e_shelf_cb_locked_set, es);
|
|
|
|
e_gadcon_util_urgent_show_func_set(es->gadcon,
|
|
|
|
_e_shelf_cb_urgent_show, es);
|
|
|
|
|
|
|
|
shelves = eina_list_append(shelves, es);
|
|
|
|
|
|
|
|
es->hidden = 0;
|
|
|
|
es->locked = 0;
|
|
|
|
|
|
|
|
es->hide_origin = -1;
|
|
|
|
|
|
|
|
{
|
|
|
|
E_Event_Shelf *ev;
|
|
|
|
|
|
|
|
ev = E_NEW(E_Event_Shelf, 1);
|
|
|
|
ev->shelf = es;
|
|
|
|
ecore_event_add(E_EVENT_SHELF_ADD, ev, NULL, NULL);
|
|
|
|
}
|
|
|
|
|
|
|
|
es->fix_timer = ecore_timer_add(0.1, _shelf_content_fix, es);
|
|
|
|
return es;
|
|
|
|
}
|
|
|
|
|
|
|
|
E_API void
|
|
|
|
e_shelf_rename_dialog(E_Shelf *es)
|
|
|
|
{
|
|
|
|
if (!es) return;
|
|
|
|
if (es->rename_dialog) return;
|
|
|
|
_e_shelf_cb_menu_rename(es, NULL, NULL);
|
|
|
|
}
|
|
|
|
|
|
|
|
E_API void
|
|
|
|
e_shelf_zone_move_resize_handle(E_Zone *zone)
|
|
|
|
{
|
|
|
|
Eina_List *l;
|
|
|
|
E_Shelf *es;
|
|
|
|
Evas_Coord w, h;
|
|
|
|
|
|
|
|
EINA_LIST_FOREACH(shelves, l, es)
|
|
|
|
{
|
|
|
|
if (es->zone == zone)
|
|
|
|
{
|
|
|
|
E_Gadcon *gc;
|
|
|
|
|
|
|
|
gc = es->gadcon;
|
|
|
|
if (gc->min_size_request.func)
|
|
|
|
{
|
|
|
|
/* let gadcon container decrease to any size */
|
|
|
|
evas_object_size_hint_min_set(gc->o_container, 0, 0);
|
|
|
|
}
|
|
|
|
evas_object_smart_callback_call(gc->o_container, "min_size_request", NULL);
|
|
|
|
e_shelf_position_calc(es);
|
|
|
|
if (gc->min_size_request.func)
|
|
|
|
{
|
|
|
|
evas_object_geometry_get(gc->o_container, NULL, NULL, &w, &h);
|
|
|
|
/* fix gadcon container min size to current geometry */
|
|
|
|
evas_object_size_hint_min_set(gc->o_container, w, h);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
E_API void
|
|
|
|
e_shelf_populate(E_Shelf *es)
|
|
|
|
{
|
|
|
|
E_OBJECT_CHECK(es);
|
|
|
|
E_OBJECT_TYPE_CHECK(es, E_SHELF_TYPE);
|
|
|
|
e_gadcon_populate(es->gadcon);
|
|
|
|
}
|
|
|
|
|
|
|
|
E_API void
|
|
|
|
e_shelf_show(E_Shelf *es)
|
|
|
|
{
|
|
|
|
E_OBJECT_CHECK(es);
|
|
|
|
E_OBJECT_TYPE_CHECK(es, E_SHELF_TYPE);
|
|
|
|
if (es->hiding) evas_object_hide(es->comp_object);
|
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
9 years ago
|
|
|
evas_object_show(es->comp_object);
|
|
|
|
}
|
|
|
|
|
|
|
|
E_API void
|
|
|
|
e_shelf_hide(E_Shelf *es)
|
|
|
|
{
|
|
|
|
E_OBJECT_CHECK(es);
|
|
|
|
E_OBJECT_TYPE_CHECK(es, E_SHELF_TYPE);
|
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
9 years ago
|
|
|
evas_object_hide(es->comp_object);
|
|
|
|
es->hiding = evas_object_visible_get(es->comp_object);
|
|
|
|
}
|
|
|
|
|
|
|
|
E_API void
|
|
|
|
e_shelf_locked_set(E_Shelf *es, int lock)
|
|
|
|
{
|
|
|
|
if (lock)
|
|
|
|
{
|
|
|
|
e_shelf_toggle(es, 1);
|
|
|
|
es->locked++;
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
if (es->locked > 0)
|
|
|
|
es->locked--;
|
|
|
|
if (!es->locked)
|
|
|
|
e_shelf_toggle(es, es->toggle);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
E_API void
|
|
|
|
e_shelf_name_set(E_Shelf *es, const char *name)
|
|
|
|
{
|
|
|
|
E_Event_Shelf *ev;
|
|
|
|
|
|
|
|
if (!es) return;
|
|
|
|
if (!name) return;
|
|
|
|
if (es->name == name) return;
|
|
|
|
eina_stringshare_replace(&es->name, name);
|
|
|
|
eina_stringshare_replace(&es->cfg->name, name);
|
|
|
|
ev = E_NEW(E_Event_Shelf, 1);
|
|
|
|
ev->shelf = es;
|
|
|
|
e_object_ref(E_OBJECT(es));
|
|
|
|
ecore_event_add(E_EVENT_SHELF_RENAME, ev, (Ecore_End_Cb)_e_shelf_event_rename_end_cb, NULL);
|
|
|
|
if (es->dummy) return;
|
|
|
|
e_gadcon_name_set(es->gadcon, name);
|
|
|
|
}
|
|
|
|
|
|
|
|
E_API void
|
|
|
|
e_shelf_toggle(E_Shelf *es, int show)
|
|
|
|
{
|
|
|
|
E_OBJECT_CHECK(es);
|
|
|
|
E_OBJECT_TYPE_CHECK(es, E_SHELF_TYPE);
|
|
|
|
|
|
|
|
es->toggle = show;
|
|
|
|
if (!es->hidden && _e_shelf_autohide_timer_extend(es)) return;
|
|
|
|
if (es->locked) return;
|
|
|
|
es->interrupted = -1;
|
|
|
|
es->urgent_show = 0;
|
|
|
|
if ((show) && (es->hidden))
|
|
|
|
{
|
|
|
|
es->hidden = 0;
|
|
|
|
edje_object_signal_emit(es->o_base, "e,state,visible", "e");
|
|
|
|
if (es->instant_delay >= 0.0)
|
|
|
|
{
|
|
|
|
_e_shelf_cb_instant_hide_timer(es);
|
|
|
|
es->hide_timer =
|
|
|
|
ecore_timer_loop_add(es->cfg->hide_timeout,
|
|
|
|
_e_shelf_cb_hide_urgent_timer, es);
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
if (es->hide_timer)
|
|
|
|
{
|
|
|
|
ecore_timer_del(es->hide_timer);
|
|
|
|
es->hide_timer = NULL;
|
|
|
|
return; //we should not add a animator here, the shelf cannot have moved yet.
|
|
|
|
}
|
|
|
|
|
|
|
|
if (!es->hide_animator)
|
|
|
|
{
|
|
|
|
es->hide_begin = ecore_loop_time_get();
|
|
|
|
es->hide_animator =
|
|
|
|
ecore_animator_add(_e_shelf_cb_hide_animator, es);
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
double time_elapsed = ecore_loop_time_get() - es->hide_begin;
|
|
|
|
es->hide_begin = ecore_loop_time_get() - (es->cfg->hide_duration - time_elapsed);
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
else if ((!show) && (!es->hidden) && ((!es->gadcon) || (!es->gadcon->editing)) &&
|
|
|
|
(es->cfg->autohide))
|
|
|
|
{
|
|
|
|
if (es->instant_delay >= 0.0)
|
|
|
|
{
|
|
|
|
if (es->hide_timer)
|
|
|
|
{
|
|
|
|
ecore_timer_del(es->hide_timer);
|
|
|
|
es->hide_timer = NULL;
|
|
|
|
}
|
|
|
|
es->hidden = 1;
|
|
|
|
if (!es->instant_timer)
|
|
|
|
es->instant_timer =
|
|
|
|
ecore_timer_loop_add(es->instant_delay,
|
|
|
|
_e_shelf_cb_instant_hide_timer, es);
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
if (es->hide_animator)
|
|
|
|
{
|
|
|
|
es->interrupted = show;
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
es->hidden = 1;
|
|
|
|
if (es->hide_timer) ecore_timer_del(es->hide_timer);
|
|
|
|
es->hide_timer =
|
|
|
|
|