2010-06-01 07:26:09 -07:00
|
|
|
#include "e.h"
|
|
|
|
#include "e_mod_main.h"
|
|
|
|
|
2011-04-08 15:16:59 -07:00
|
|
|
typedef struct _Instance Instance;
|
|
|
|
|
|
|
|
struct _Instance
|
|
|
|
{
|
2011-11-29 19:32:54 -08:00
|
|
|
EINA_INLIST;
|
2011-09-02 16:02:26 -07:00
|
|
|
|
2011-11-29 19:32:54 -08:00
|
|
|
E_Gadcon_Client *gcc;
|
|
|
|
Evas_Object *o_button;
|
2011-04-08 15:16:59 -07:00
|
|
|
|
2011-11-29 19:32:54 -08:00
|
|
|
Evry_Window *win;
|
|
|
|
Gadget_Config *cfg;
|
|
|
|
E_Config_Dialog *cfd;
|
2011-08-30 17:08:52 -07:00
|
|
|
|
2019-03-31 16:06:37 -07:00
|
|
|
Eina_Bool mouse_down E_BITFIELD;
|
|
|
|
Evas_Coord mouse_down_x, mouse_down_y;
|
2011-09-02 16:02:26 -07:00
|
|
|
|
2011-11-29 19:32:54 -08:00
|
|
|
double hide_start;
|
|
|
|
int hide_x, hide_y;
|
2011-09-02 16:02:26 -07:00
|
|
|
|
2011-11-29 19:32:54 -08:00
|
|
|
Eina_List *handlers;
|
2011-09-02 16:02:26 -07:00
|
|
|
|
2011-11-29 19:32:54 -08:00
|
|
|
Eina_Bool hidden;
|
giant comp rejiggering commit #6:
* border->fx REMOVED, related border api REMOVED
* comp edc has new class of groups: e/comp/effects[/auto]
** these are effects which can be applied to any compositor object through the e_comp_win_effect* api and are written in embryo
*** two types - base and auto - base = manual, for use with animators; auto are "trigger and forget", for use as actual effects
* desk flip transition animations moved to comp effects and FIXED(ish)
* "zoom" effect renamed to "diagonal" for slightly less misleading name since it never did any zooming
* actual "zoom" effect added
* border hierarchy now as follows: cw->effect_obj swallows cw->shobj, cw->shobj swallows cw->bd->bg_object ?: cw->obj, if (cw->bd->bg_object) cw->bd->bg_object swallows cw->obj
** cw->effect_obj now used for all positioning and comp logic
** cw->effect_obj ONLY used for object transformation effects (moving, zooming, fading, etc)
** cw->shobj ONLY for comp visual/non-movement effects (focus effect, unfocus opacity, legacy shadows); this is a candidate for removal/rewrite in E19
* even more comp shape rewrites
* desk flip animation time now controlled by theme since edje doesn't support setting transition time in C; related config value removed
* desk flip transitions (in e_desk.c) rewritten
* various modules (evry/illume2) updated to use comp effects instead of fx offset
* desk flip configuration BROKEN(ish)
2013-02-28 07:20:32 -08:00
|
|
|
Eina_Bool animating;
|
2011-11-29 19:32:54 -08:00
|
|
|
Eina_Bool illume_mode;
|
2011-04-08 15:16:59 -07:00
|
|
|
};
|
|
|
|
|
2011-11-29 19:32:54 -08:00
|
|
|
static void _button_cb_mouse_down(void *data, Evas *e, Evas_Object *obj, void *event_info);
|
2019-03-31 16:06:37 -07:00
|
|
|
static void _button_cb_mouse_up(void *data, Evas *e, Evas_Object *obj, void *event_info);
|
2015-03-18 15:09:09 -07:00
|
|
|
static Eina_Bool _cb_focus_out(void *data, int type EINA_UNUSED, void *event);
|
2014-11-02 18:35:13 -08:00
|
|
|
static void _del_func(void *data, Evas *e EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *event_info EINA_UNUSED);
|
2011-04-08 15:16:59 -07:00
|
|
|
|
2010-06-01 07:26:09 -07:00
|
|
|
/* gadcon requirements */
|
|
|
|
static E_Gadcon_Client *_gc_init(E_Gadcon *gc, const char *name, const char *id, const char *style);
|
2011-11-29 19:32:54 -08:00
|
|
|
static void _gc_shutdown(E_Gadcon_Client *gcc);
|
|
|
|
static void _gc_orient(E_Gadcon_Client *gcc, E_Gadcon_Orient orient);
|
2012-07-27 01:25:22 -07:00
|
|
|
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);
|
2011-11-29 19:32:54 -08:00
|
|
|
static Gadget_Config *_conf_item_get(const char *id);
|
|
|
|
|
|
|
|
static void _conf_dialog(Instance *inst);
|
2011-09-02 16:02:26 -07:00
|
|
|
static Eina_Inlist *instances = NULL;
|
2011-04-08 15:16:59 -07:00
|
|
|
|
2010-06-01 07:26:09 -07:00
|
|
|
static const E_Gadcon_Client_Class _gadcon_class =
|
|
|
|
{
|
2011-11-29 19:32:54 -08:00
|
|
|
GADCON_CLIENT_CLASS_VERSION,
|
|
|
|
"evry-starter",
|
|
|
|
{
|
2011-09-02 16:02:26 -07:00
|
|
|
_gc_init, _gc_shutdown, _gc_orient, _gc_label, _gc_icon, _gc_id_new, NULL,
|
|
|
|
e_gadcon_site_is_not_toolbar
|
2011-11-29 19:32:54 -08:00
|
|
|
},
|
|
|
|
E_GADCON_CLIENT_STYLE_PLAIN
|
2010-06-01 07:26:09 -07:00
|
|
|
};
|
|
|
|
|
2011-09-16 16:41:17 -07:00
|
|
|
static Eina_Bool
|
2011-11-12 16:07:35 -08:00
|
|
|
_illume_running(void)
|
2011-09-16 16:41:17 -07:00
|
|
|
{
|
|
|
|
/* hack to find out out if illume is running, dont grab if
|
|
|
|
this is the case... */
|
|
|
|
|
|
|
|
Eina_List *l;
|
|
|
|
E_Module *m;
|
|
|
|
|
2011-11-29 19:32:54 -08:00
|
|
|
EINA_LIST_FOREACH (e_module_list(), l, m)
|
2011-09-16 16:41:17 -07:00
|
|
|
if (!strcmp(m->name, "illume2") && m->enabled)
|
|
|
|
return EINA_TRUE;
|
|
|
|
|
|
|
|
return EINA_FALSE;
|
|
|
|
}
|
|
|
|
|
2010-06-01 07:26:09 -07:00
|
|
|
static E_Gadcon_Client *
|
|
|
|
_gc_init(E_Gadcon *gc, const char *name, const char *id, const char *style)
|
|
|
|
{
|
|
|
|
Evas_Object *o;
|
|
|
|
E_Gadcon_Client *gcc;
|
|
|
|
Instance *inst;
|
2011-09-16 16:41:17 -07:00
|
|
|
Evry_Plugin *p;
|
2011-08-25 05:58:35 -07:00
|
|
|
|
2010-06-01 07:26:09 -07:00
|
|
|
inst = E_NEW(Instance, 1);
|
2011-08-21 08:41:37 -07:00
|
|
|
inst->cfg = _conf_item_get(id);
|
2011-08-25 05:58:35 -07:00
|
|
|
|
2010-06-01 07:26:09 -07:00
|
|
|
o = edje_object_add(gc->evas);
|
2011-08-30 17:08:52 -07:00
|
|
|
e_theme_edje_object_set(o, "base/theme/modules/everything", "e/modules/everything/gadget");
|
2011-11-12 16:22:53 -08:00
|
|
|
|
2011-11-16 09:20:32 -08:00
|
|
|
if (((inst->cfg->plugin) && (strcmp(inst->cfg->plugin, "Start") != 0)) &&
|
2011-11-12 16:22:53 -08:00
|
|
|
(p = evry_plugin_find(inst->cfg->plugin)))
|
2011-09-16 16:41:17 -07:00
|
|
|
{
|
2011-11-29 19:32:54 -08:00
|
|
|
Evas_Object *oo = evry_util_icon_get(EVRY_ITEM(p), gc->evas);
|
|
|
|
if (oo)
|
2011-10-08 11:17:38 -07:00
|
|
|
{
|
|
|
|
edje_object_part_swallow(o, "e.swallow.icon", oo);
|
2011-11-29 19:32:54 -08:00
|
|
|
edje_object_signal_emit(o, "e,state,icon,plugin", "e");
|
2011-10-08 11:17:38 -07:00
|
|
|
}
|
2011-09-16 16:41:17 -07:00
|
|
|
}
|
|
|
|
|
2010-06-01 07:26:09 -07:00
|
|
|
edje_object_signal_emit(o, "e,state,unfocused", "e");
|
|
|
|
|
|
|
|
gcc = e_gadcon_client_new(gc, name, id, style, o);
|
|
|
|
gcc->data = inst;
|
|
|
|
|
|
|
|
inst->gcc = gcc;
|
|
|
|
inst->o_button = o;
|
|
|
|
|
|
|
|
evas_object_event_callback_add(o, EVAS_CALLBACK_MOUSE_DOWN,
|
2011-11-29 19:32:54 -08:00
|
|
|
_button_cb_mouse_down, inst);
|
2019-03-31 16:06:37 -07:00
|
|
|
evas_object_event_callback_add(o, EVAS_CALLBACK_MOUSE_UP,
|
|
|
|
_button_cb_mouse_up, inst);
|
2011-09-16 16:41:17 -07:00
|
|
|
|
|
|
|
if (_illume_running())
|
|
|
|
{
|
2011-11-29 19:32:54 -08:00
|
|
|
inst->illume_mode = EINA_TRUE;
|
2011-09-16 16:41:17 -07:00
|
|
|
|
2011-11-29 19:32:54 -08:00
|
|
|
inst->handlers = eina_list_append(inst->handlers,
|
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
|
|
|
ecore_event_handler_add(E_EVENT_CLIENT_FOCUS_OUT,
|
2011-11-29 19:32:54 -08:00
|
|
|
_cb_focus_out, inst));
|
2011-09-16 16:41:17 -07:00
|
|
|
}
|
2011-11-29 19:32:54 -08:00
|
|
|
|
2011-09-02 16:02:26 -07:00
|
|
|
instances = eina_inlist_append(instances, EINA_INLIST_GET(inst));
|
|
|
|
|
2010-06-01 07:26:09 -07:00
|
|
|
return gcc;
|
|
|
|
}
|
|
|
|
|
|
|
|
static void
|
|
|
|
_gc_shutdown(E_Gadcon_Client *gcc)
|
|
|
|
{
|
|
|
|
Instance *inst;
|
2011-09-16 16:41:17 -07:00
|
|
|
Ecore_Event_Handler *h;
|
2011-11-29 19:32:54 -08:00
|
|
|
|
2010-06-01 07:26:09 -07:00
|
|
|
inst = gcc->data;
|
2011-09-02 16:02:26 -07:00
|
|
|
|
|
|
|
instances = eina_inlist_remove(instances, EINA_INLIST_GET(inst));
|
|
|
|
|
2011-11-29 19:32:54 -08:00
|
|
|
EINA_LIST_FREE (inst->handlers, h)
|
2011-09-16 16:41:17 -07:00
|
|
|
ecore_event_handler_del(h);
|
2010-06-01 07:26:09 -07:00
|
|
|
|
2014-11-02 18:35:13 -08:00
|
|
|
if (inst->win)
|
2011-09-16 16:41:17 -07:00
|
|
|
{
|
2014-11-02 18:35:13 -08:00
|
|
|
evas_object_event_callback_del(inst->win->ewin, EVAS_CALLBACK_DEL, _del_func);
|
2011-11-29 19:32:54 -08:00
|
|
|
evry_hide(inst->win, 0);
|
2011-09-16 16:41:17 -07:00
|
|
|
}
|
2011-11-29 19:32:54 -08:00
|
|
|
|
2010-06-01 07:26:09 -07:00
|
|
|
evas_object_del(inst->o_button);
|
|
|
|
free(inst);
|
|
|
|
}
|
|
|
|
|
|
|
|
static void
|
2015-03-18 15:09:09 -07:00
|
|
|
_gc_orient(E_Gadcon_Client *gcc, E_Gadcon_Orient orient EINA_UNUSED)
|
2010-06-01 07:26:09 -07:00
|
|
|
{
|
|
|
|
Instance *inst;
|
|
|
|
Evas_Coord mw, mh;
|
|
|
|
|
|
|
|
inst = gcc->data;
|
|
|
|
mw = 0, mh = 0;
|
|
|
|
edje_object_size_min_get(inst->o_button, &mw, &mh);
|
|
|
|
if ((mw < 1) || (mh < 1))
|
|
|
|
edje_object_size_min_calc(inst->o_button, &mw, &mh);
|
|
|
|
if (mw < 4) mw = 4;
|
|
|
|
if (mh < 4) mh = 4;
|
|
|
|
e_gadcon_client_aspect_set(gcc, mw, mh);
|
|
|
|
e_gadcon_client_min_size_set(gcc, mw, mh);
|
|
|
|
}
|
|
|
|
|
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)
|
2010-06-01 07:26:09 -07:00
|
|
|
{
|
|
|
|
return _("Everything Starter");
|
|
|
|
}
|
|
|
|
|
|
|
|
static Evas_Object *
|
2015-03-18 15:09:09 -07:00
|
|
|
_gc_icon(const E_Gadcon_Client_Class *client_class EINA_UNUSED, Evas *evas EINA_UNUSED)
|
2010-06-01 07:26:09 -07:00
|
|
|
{
|
2011-11-12 16:07:35 -08:00
|
|
|
Evas_Object *o;
|
|
|
|
char buf[PATH_MAX];
|
|
|
|
|
|
|
|
o = edje_object_add(evas);
|
|
|
|
snprintf(buf, sizeof(buf), "%s/e-module-everything-start.edj",
|
2011-11-29 19:32:54 -08:00
|
|
|
e_module_dir_get(_mod_evry));
|
2011-11-12 16:07:35 -08:00
|
|
|
edje_object_file_set(o, buf, "icon");
|
|
|
|
return o;
|
2010-06-01 07:26:09 -07:00
|
|
|
}
|
|
|
|
|
2011-08-21 08:41:37 -07:00
|
|
|
static Gadget_Config *
|
|
|
|
_conf_item_get(const char *id)
|
|
|
|
{
|
2011-09-03 07:28:47 -07:00
|
|
|
Gadget_Config *ci;
|
|
|
|
|
|
|
|
GADCON_CLIENT_CONFIG_GET(Gadget_Config, evry_conf->gadgets, _gadcon_class, id);
|
|
|
|
|
2011-08-21 08:41:37 -07:00
|
|
|
ci = E_NEW(Gadget_Config, 1);
|
|
|
|
ci->id = eina_stringshare_add(id);
|
|
|
|
|
|
|
|
evry_conf->gadgets = eina_list_append(evry_conf->gadgets, ci);
|
|
|
|
|
|
|
|
e_config_save_queue();
|
|
|
|
|
|
|
|
return ci;
|
|
|
|
}
|
|
|
|
|
2010-06-01 07:26:09 -07:00
|
|
|
static const char *
|
2015-03-18 15:09:09 -07:00
|
|
|
_gc_id_new(const E_Gadcon_Client_Class *client_class EINA_UNUSED)
|
2010-06-01 07:26:09 -07:00
|
|
|
{
|
2012-06-22 00:21:51 -07:00
|
|
|
Gadget_Config *ci = NULL;
|
2012-06-21 04:03:50 -07:00
|
|
|
|
2012-06-22 00:21:51 -07:00
|
|
|
ci = _conf_item_get(NULL);
|
|
|
|
return ci->id;
|
2010-06-01 07:26:09 -07:00
|
|
|
}
|
|
|
|
|
|
|
|
/***************************************************************************/
|
|
|
|
|
2011-11-29 19:32:54 -08:00
|
|
|
static void
|
2014-11-02 18:35:13 -08:00
|
|
|
_del_func(void *data, Evas *e EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *event_info EINA_UNUSED)
|
2010-06-01 07:26:09 -07:00
|
|
|
{
|
|
|
|
Instance *inst = data;
|
|
|
|
|
|
|
|
e_gadcon_locked_set(inst->gcc->gadcon, 0);
|
2011-09-02 16:02:26 -07:00
|
|
|
|
2010-06-01 07:26:09 -07:00
|
|
|
inst->win = NULL;
|
2010-06-01 08:45:01 -07:00
|
|
|
edje_object_signal_emit(inst->o_button, "e,state,unfocused", "e");
|
2010-06-01 07:26:09 -07:00
|
|
|
}
|
|
|
|
|
2011-04-08 15:16:59 -07:00
|
|
|
static void
|
2015-03-18 15:09:09 -07:00
|
|
|
_cb_menu_configure(void *data, E_Menu *m EINA_UNUSED, E_Menu_Item *mi EINA_UNUSED)
|
2011-04-08 15:16:59 -07:00
|
|
|
{
|
2011-08-25 05:58:35 -07:00
|
|
|
_conf_dialog(data);
|
2011-04-08 15:16:59 -07:00
|
|
|
}
|
|
|
|
|
giant comp rejiggering commit #6:
* border->fx REMOVED, related border api REMOVED
* comp edc has new class of groups: e/comp/effects[/auto]
** these are effects which can be applied to any compositor object through the e_comp_win_effect* api and are written in embryo
*** two types - base and auto - base = manual, for use with animators; auto are "trigger and forget", for use as actual effects
* desk flip transition animations moved to comp effects and FIXED(ish)
* "zoom" effect renamed to "diagonal" for slightly less misleading name since it never did any zooming
* actual "zoom" effect added
* border hierarchy now as follows: cw->effect_obj swallows cw->shobj, cw->shobj swallows cw->bd->bg_object ?: cw->obj, if (cw->bd->bg_object) cw->bd->bg_object swallows cw->obj
** cw->effect_obj now used for all positioning and comp logic
** cw->effect_obj ONLY used for object transformation effects (moving, zooming, fading, etc)
** cw->shobj ONLY for comp visual/non-movement effects (focus effect, unfocus opacity, legacy shadows); this is a candidate for removal/rewrite in E19
* even more comp shape rewrites
* desk flip animation time now controlled by theme since edje doesn't support setting transition time in C; related config value removed
* desk flip transitions (in e_desk.c) rewritten
* various modules (evry/illume2) updated to use comp effects instead of fx offset
* desk flip configuration BROKEN(ish)
2013-02-28 07:20:32 -08:00
|
|
|
static void
|
|
|
|
_hide_done(void *data, Evas_Object *obj EINA_UNUSED, const char *s EINA_UNUSED, const char *ss EINA_UNUSED)
|
2011-09-02 16:02:26 -07:00
|
|
|
{
|
|
|
|
Instance *inst = data;
|
2014-11-02 18:35:13 -08:00
|
|
|
E_Client *ec;
|
2011-09-02 16:02:26 -07:00
|
|
|
|
giant comp rejiggering commit #6:
* border->fx REMOVED, related border api REMOVED
* comp edc has new class of groups: e/comp/effects[/auto]
** these are effects which can be applied to any compositor object through the e_comp_win_effect* api and are written in embryo
*** two types - base and auto - base = manual, for use with animators; auto are "trigger and forget", for use as actual effects
* desk flip transition animations moved to comp effects and FIXED(ish)
* "zoom" effect renamed to "diagonal" for slightly less misleading name since it never did any zooming
* actual "zoom" effect added
* border hierarchy now as follows: cw->effect_obj swallows cw->shobj, cw->shobj swallows cw->bd->bg_object ?: cw->obj, if (cw->bd->bg_object) cw->bd->bg_object swallows cw->obj
** cw->effect_obj now used for all positioning and comp logic
** cw->effect_obj ONLY used for object transformation effects (moving, zooming, fading, etc)
** cw->shobj ONLY for comp visual/non-movement effects (focus effect, unfocus opacity, legacy shadows); this is a candidate for removal/rewrite in E19
* even more comp shape rewrites
* desk flip animation time now controlled by theme since edje doesn't support setting transition time in C; related config value removed
* desk flip transitions (in e_desk.c) rewritten
* various modules (evry/illume2) updated to use comp effects instead of fx offset
* desk flip configuration BROKEN(ish)
2013-02-28 07:20:32 -08:00
|
|
|
/* go bac to subject selector */
|
|
|
|
evry_selectors_switch(inst->win, -1, 0);
|
|
|
|
evry_selectors_switch(inst->win, -1, 0);
|
2011-09-02 16:02:26 -07:00
|
|
|
|
2014-11-02 18:35:13 -08:00
|
|
|
ec = e_win_client_get(inst->win->ewin);
|
|
|
|
e_client_iconify(ec);
|
|
|
|
e_comp_object_effect_set(ec->frame, "none");
|
giant comp rejiggering commit #6:
* border->fx REMOVED, related border api REMOVED
* comp edc has new class of groups: e/comp/effects[/auto]
** these are effects which can be applied to any compositor object through the e_comp_win_effect* api and are written in embryo
*** two types - base and auto - base = manual, for use with animators; auto are "trigger and forget", for use as actual effects
* desk flip transition animations moved to comp effects and FIXED(ish)
* "zoom" effect renamed to "diagonal" for slightly less misleading name since it never did any zooming
* actual "zoom" effect added
* border hierarchy now as follows: cw->effect_obj swallows cw->shobj, cw->shobj swallows cw->bd->bg_object ?: cw->obj, if (cw->bd->bg_object) cw->bd->bg_object swallows cw->obj
** cw->effect_obj now used for all positioning and comp logic
** cw->effect_obj ONLY used for object transformation effects (moving, zooming, fading, etc)
** cw->shobj ONLY for comp visual/non-movement effects (focus effect, unfocus opacity, legacy shadows); this is a candidate for removal/rewrite in E19
* even more comp shape rewrites
* desk flip animation time now controlled by theme since edje doesn't support setting transition time in C; related config value removed
* desk flip transitions (in e_desk.c) rewritten
* various modules (evry/illume2) updated to use comp effects instead of fx offset
* desk flip configuration BROKEN(ish)
2013-02-28 07:20:32 -08:00
|
|
|
inst->animating = 0;
|
2011-09-02 16:02:26 -07:00
|
|
|
}
|
|
|
|
|
|
|
|
static void
|
2015-03-18 15:09:09 -07:00
|
|
|
_evry_hide_func(Evry_Window *win, int finished EINA_UNUSED)
|
2011-09-02 16:02:26 -07:00
|
|
|
{
|
|
|
|
Instance *inst = win->data;
|
2014-11-02 18:35:13 -08:00
|
|
|
E_Client *ec;
|
|
|
|
int x, y, w, h;
|
2011-09-02 16:02:26 -07:00
|
|
|
|
2014-11-02 18:35:13 -08:00
|
|
|
ec = e_win_client_get(inst->win->ewin);;
|
|
|
|
e_comp_object_effect_set(ec->frame, "pane");
|
giant comp rejiggering commit #6:
* border->fx REMOVED, related border api REMOVED
* comp edc has new class of groups: e/comp/effects[/auto]
** these are effects which can be applied to any compositor object through the e_comp_win_effect* api and are written in embryo
*** two types - base and auto - base = manual, for use with animators; auto are "trigger and forget", for use as actual effects
* desk flip transition animations moved to comp effects and FIXED(ish)
* "zoom" effect renamed to "diagonal" for slightly less misleading name since it never did any zooming
* actual "zoom" effect added
* border hierarchy now as follows: cw->effect_obj swallows cw->shobj, cw->shobj swallows cw->bd->bg_object ?: cw->obj, if (cw->bd->bg_object) cw->bd->bg_object swallows cw->obj
** cw->effect_obj now used for all positioning and comp logic
** cw->effect_obj ONLY used for object transformation effects (moving, zooming, fading, etc)
** cw->shobj ONLY for comp visual/non-movement effects (focus effect, unfocus opacity, legacy shadows); this is a candidate for removal/rewrite in E19
* even more comp shape rewrites
* desk flip animation time now controlled by theme since edje doesn't support setting transition time in C; related config value removed
* desk flip transitions (in e_desk.c) rewritten
* various modules (evry/illume2) updated to use comp effects instead of fx offset
* desk flip configuration BROKEN(ish)
2013-02-28 07:20:32 -08:00
|
|
|
/* set geoms */
|
2014-11-02 18:35:13 -08:00
|
|
|
evas_object_geometry_get(inst->win->ewin, &x, &y, &w, &h);
|
|
|
|
e_comp_object_effect_params_set(ec->frame, 1,
|
|
|
|
(int[]){x, y, w, h,
|
|
|
|
ec->zone->w, ec->zone->h,
|
giant comp rejiggering commit #6:
* border->fx REMOVED, related border api REMOVED
* comp edc has new class of groups: e/comp/effects[/auto]
** these are effects which can be applied to any compositor object through the e_comp_win_effect* api and are written in embryo
*** two types - base and auto - base = manual, for use with animators; auto are "trigger and forget", for use as actual effects
* desk flip transition animations moved to comp effects and FIXED(ish)
* "zoom" effect renamed to "diagonal" for slightly less misleading name since it never did any zooming
* actual "zoom" effect added
* border hierarchy now as follows: cw->effect_obj swallows cw->shobj, cw->shobj swallows cw->bd->bg_object ?: cw->obj, if (cw->bd->bg_object) cw->bd->bg_object swallows cw->obj
** cw->effect_obj now used for all positioning and comp logic
** cw->effect_obj ONLY used for object transformation effects (moving, zooming, fading, etc)
** cw->shobj ONLY for comp visual/non-movement effects (focus effect, unfocus opacity, legacy shadows); this is a candidate for removal/rewrite in E19
* even more comp shape rewrites
* desk flip animation time now controlled by theme since edje doesn't support setting transition time in C; related config value removed
* desk flip transitions (in e_desk.c) rewritten
* various modules (evry/illume2) updated to use comp effects instead of fx offset
* desk flip configuration BROKEN(ish)
2013-02-28 07:20:32 -08:00
|
|
|
inst->hide_x, inst->hide_y}, 8);
|
2014-11-02 18:35:13 -08:00
|
|
|
e_comp_object_effect_params_set(ec->frame, 0, (int[]){0}, 1);
|
|
|
|
e_comp_object_effect_start(ec->frame, _hide_done, inst);
|
giant comp rejiggering commit #6:
* border->fx REMOVED, related border api REMOVED
* comp edc has new class of groups: e/comp/effects[/auto]
** these are effects which can be applied to any compositor object through the e_comp_win_effect* api and are written in embryo
*** two types - base and auto - base = manual, for use with animators; auto are "trigger and forget", for use as actual effects
* desk flip transition animations moved to comp effects and FIXED(ish)
* "zoom" effect renamed to "diagonal" for slightly less misleading name since it never did any zooming
* actual "zoom" effect added
* border hierarchy now as follows: cw->effect_obj swallows cw->shobj, cw->shobj swallows cw->bd->bg_object ?: cw->obj, if (cw->bd->bg_object) cw->bd->bg_object swallows cw->obj
** cw->effect_obj now used for all positioning and comp logic
** cw->effect_obj ONLY used for object transformation effects (moving, zooming, fading, etc)
** cw->shobj ONLY for comp visual/non-movement effects (focus effect, unfocus opacity, legacy shadows); this is a candidate for removal/rewrite in E19
* even more comp shape rewrites
* desk flip animation time now controlled by theme since edje doesn't support setting transition time in C; related config value removed
* desk flip transitions (in e_desk.c) rewritten
* various modules (evry/illume2) updated to use comp effects instead of fx offset
* desk flip configuration BROKEN(ish)
2013-02-28 07:20:32 -08:00
|
|
|
inst->hidden = inst->animating = EINA_TRUE;
|
2011-09-02 16:02:26 -07:00
|
|
|
}
|
|
|
|
|
|
|
|
static Eina_Bool
|
2015-03-18 15:09:09 -07:00
|
|
|
_cb_focus_out(void *data, int type EINA_UNUSED, void *event)
|
2011-09-02 16:02:26 -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;
|
2011-09-02 16:02:26 -07:00
|
|
|
Instance *inst;
|
|
|
|
|
|
|
|
ev = event;
|
|
|
|
|
2011-11-29 19:32:54 -08:00
|
|
|
EINA_INLIST_FOREACH (instances, inst)
|
2011-09-02 16:02:26 -07:00
|
|
|
if (inst == data) break;
|
|
|
|
|
|
|
|
if ((!inst) || (!inst->win))
|
|
|
|
return ECORE_CALLBACK_PASS_ON;
|
|
|
|
|
2014-11-02 18:35:13 -08:00
|
|
|
if (e_win_client_get(inst->win->ewin) != ev->ec)
|
2011-09-02 16:02:26 -07:00
|
|
|
return ECORE_CALLBACK_PASS_ON;
|
|
|
|
|
|
|
|
_evry_hide_func(inst->win, 0);
|
|
|
|
|
|
|
|
return ECORE_CALLBACK_PASS_ON;
|
|
|
|
}
|
2011-11-29 19:32:54 -08:00
|
|
|
|
2011-09-02 16:02:26 -07:00
|
|
|
static void
|
|
|
|
_gadget_popup_show(Instance *inst)
|
|
|
|
{
|
|
|
|
Evas_Coord x, y, w, h;
|
2014-11-02 18:35:13 -08:00
|
|
|
int cx, cy, px, py, pw, ph;
|
|
|
|
Evas_Object *ewin = inst->win->ewin;
|
2011-09-02 16:02:26 -07:00
|
|
|
|
2014-11-02 18:35:13 -08:00
|
|
|
evas_object_geometry_get(ewin, &px, &py, &pw, &ph);
|
2011-09-02 16:02:26 -07:00
|
|
|
|
|
|
|
evas_object_geometry_get(inst->o_button, &x, &y, &w, &h);
|
|
|
|
e_gadcon_canvas_zone_geometry_get(inst->gcc->gadcon, &cx, &cy, NULL, NULL);
|
|
|
|
x += cx;
|
|
|
|
y += cy;
|
|
|
|
|
|
|
|
switch (inst->gcc->gadcon->orient)
|
|
|
|
{
|
|
|
|
case E_GADCON_ORIENT_TOP:
|
|
|
|
case E_GADCON_ORIENT_CORNER_TL:
|
|
|
|
case E_GADCON_ORIENT_CORNER_TR:
|
2013-02-25 06:04:12 -08:00
|
|
|
y += h;
|
2011-11-29 19:32:54 -08:00
|
|
|
inst->hide_y = -1;
|
|
|
|
break;
|
|
|
|
|
2011-09-02 16:02:26 -07:00
|
|
|
case E_GADCON_ORIENT_BOTTOM:
|
|
|
|
case E_GADCON_ORIENT_CORNER_BR:
|
|
|
|
case E_GADCON_ORIENT_CORNER_BL:
|
2013-02-25 06:04:12 -08:00
|
|
|
y -= ph;
|
2011-11-29 19:32:54 -08:00
|
|
|
inst->hide_y = 1;
|
|
|
|
break;
|
|
|
|
|
2011-09-02 16:02:26 -07:00
|
|
|
case E_GADCON_ORIENT_LEFT:
|
|
|
|
case E_GADCON_ORIENT_CORNER_LT:
|
|
|
|
case E_GADCON_ORIENT_CORNER_LB:
|
2013-02-25 06:04:12 -08:00
|
|
|
x += w;
|
2011-11-29 19:32:54 -08:00
|
|
|
inst->hide_x = -1;
|
|
|
|
break;
|
|
|
|
|
2011-09-02 16:02:26 -07:00
|
|
|
case E_GADCON_ORIENT_RIGHT:
|
|
|
|
case E_GADCON_ORIENT_CORNER_RT:
|
|
|
|
case E_GADCON_ORIENT_CORNER_RB:
|
2013-02-25 06:04:12 -08:00
|
|
|
x -= pw;
|
2011-11-29 19:32:54 -08:00
|
|
|
inst->hide_x = 1;
|
|
|
|
break;
|
|
|
|
|
2011-09-02 16:02:26 -07:00
|
|
|
case E_GADCON_ORIENT_FLOAT:
|
|
|
|
case E_GADCON_ORIENT_HORIZ:
|
|
|
|
case E_GADCON_ORIENT_VERT:
|
|
|
|
default:
|
2011-11-29 19:32:54 -08:00
|
|
|
break;
|
2011-09-02 16:02:26 -07:00
|
|
|
}
|
|
|
|
|
2016-04-25 10:10:44 -07:00
|
|
|
if (x + pw > inst->win->zone->x + inst->win->zone->w)
|
|
|
|
x = inst->win->zone->x + inst->win->zone->w - pw;
|
2011-09-02 16:02:26 -07:00
|
|
|
|
2016-04-25 10:10:44 -07:00
|
|
|
if (y + ph > inst->win->zone->y + inst->win->zone->h)
|
|
|
|
y = inst->win->zone->y + inst->win->zone->h - ph;
|
2013-02-25 06:04:12 -08:00
|
|
|
|
2014-11-02 18:35:13 -08:00
|
|
|
evas_object_move(ewin, x, y);
|
2011-09-02 16:02:26 -07:00
|
|
|
}
|
|
|
|
|
|
|
|
static void
|
|
|
|
_gadget_window_show(Instance *inst)
|
|
|
|
{
|
|
|
|
int zx, zy, zw, zh;
|
|
|
|
int gx, gy, gw, gh;
|
|
|
|
int cx, cy;
|
|
|
|
int pw, ph;
|
|
|
|
|
2014-11-02 18:35:13 -08:00
|
|
|
Evas_Object *ewin = inst->win->ewin;
|
2011-09-02 16:02:26 -07:00
|
|
|
|
2011-09-29 15:53:09 -07:00
|
|
|
inst->win->func.hide = &_evry_hide_func;
|
2011-11-29 19:32:54 -08:00
|
|
|
|
2011-09-02 16:02:26 -07:00
|
|
|
e_zone_useful_geometry_get(inst->win->zone, &zx, &zy, &zw, &zh);
|
|
|
|
|
|
|
|
evas_object_geometry_get(inst->o_button, &gx, &gy, &gw, &gh);
|
|
|
|
e_gadcon_canvas_zone_geometry_get(inst->gcc->gadcon, &cx, &cy, NULL, NULL);
|
|
|
|
gx += cx;
|
|
|
|
gy += cy;
|
|
|
|
|
|
|
|
switch (inst->gcc->gadcon->orient)
|
|
|
|
{
|
|
|
|
case E_GADCON_ORIENT_TOP:
|
|
|
|
case E_GADCON_ORIENT_CORNER_TL:
|
|
|
|
case E_GADCON_ORIENT_CORNER_TR:
|
2011-11-29 19:32:54 -08:00
|
|
|
pw = zw / 2;
|
|
|
|
ph = zh / 2;
|
|
|
|
inst->hide_y = -1;
|
2014-11-02 18:35:13 -08:00
|
|
|
evas_object_move(ewin, zx, gy + gh);
|
2011-11-29 19:32:54 -08:00
|
|
|
break;
|
|
|
|
|
2011-09-02 16:02:26 -07:00
|
|
|
case E_GADCON_ORIENT_BOTTOM:
|
|
|
|
case E_GADCON_ORIENT_CORNER_BR:
|
|
|
|
case E_GADCON_ORIENT_CORNER_BL:
|
2011-11-29 19:32:54 -08:00
|
|
|
pw = zw / 2;
|
|
|
|
ph = zh / 2;
|
|
|
|
inst->hide_y = 1;
|
2014-11-02 18:35:13 -08:00
|
|
|
evas_object_move(ewin, zx, gy - ph);
|
2011-11-29 19:32:54 -08:00
|
|
|
break;
|
|
|
|
|
2011-09-02 16:02:26 -07:00
|
|
|
case E_GADCON_ORIENT_LEFT:
|
|
|
|
case E_GADCON_ORIENT_CORNER_LT:
|
|
|
|
case E_GADCON_ORIENT_CORNER_LB:
|
2011-11-29 19:32:54 -08:00
|
|
|
pw = zw / 2.5;
|
|
|
|
ph = zh;
|
|
|
|
inst->hide_x = -1;
|
2014-11-02 18:35:13 -08:00
|
|
|
evas_object_move(ewin, gx + gw, zy);
|
2011-11-29 19:32:54 -08:00
|
|
|
break;
|
|
|
|
|
2011-09-02 16:02:26 -07:00
|
|
|
case E_GADCON_ORIENT_RIGHT:
|
|
|
|
case E_GADCON_ORIENT_CORNER_RT:
|
|
|
|
case E_GADCON_ORIENT_CORNER_RB:
|
2011-11-29 19:32:54 -08:00
|
|
|
pw = zw / 2.5;
|
|
|
|
ph = zh;
|
|
|
|
inst->hide_x = 1;
|
2014-11-02 18:35:13 -08:00
|
|
|
evas_object_move(ewin, gx - pw, zy);
|
2011-11-29 19:32:54 -08:00
|
|
|
break;
|
|
|
|
|
2011-09-02 16:02:26 -07:00
|
|
|
case E_GADCON_ORIENT_FLOAT:
|
|
|
|
case E_GADCON_ORIENT_HORIZ:
|
|
|
|
case E_GADCON_ORIENT_VERT:
|
|
|
|
default:
|
2011-11-29 19:32:54 -08:00
|
|
|
pw = ph = 1;
|
|
|
|
break;
|
2011-09-02 16:02:26 -07:00
|
|
|
}
|
|
|
|
|
2014-11-02 18:35:13 -08:00
|
|
|
evas_object_resize(ewin, pw, ph);
|
|
|
|
evas_object_show(ewin);
|
2011-09-02 16:02:26 -07:00
|
|
|
|
2014-11-02 18:35:13 -08:00
|
|
|
{
|
|
|
|
E_Client *ec = e_win_client_get(ewin);
|
|
|
|
|
|
|
|
evas_object_focus_set(ec->frame, 1);
|
|
|
|
ec->netwm.state.skip_pager = 1;
|
|
|
|
ec->netwm.state.skip_taskbar = 1;
|
|
|
|
ec->sticky = 1;
|
|
|
|
}
|
2011-09-02 16:02:26 -07:00
|
|
|
|
|
|
|
inst->hidden = EINA_FALSE;
|
|
|
|
}
|
|
|
|
|
2011-08-30 17:08:52 -07:00
|
|
|
static void
|
2015-03-18 15:09:09 -07:00
|
|
|
_button_cb_mouse_down(void *data, Evas *e EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *event_info)
|
2011-08-30 17:08:52 -07:00
|
|
|
{
|
|
|
|
Instance *inst;
|
2019-03-31 16:06:37 -07:00
|
|
|
Evas_Event_Mouse_Down *ev = event_info;
|
2011-08-30 17:08:52 -07:00
|
|
|
|
|
|
|
inst = data;
|
2019-03-31 16:06:37 -07:00
|
|
|
inst->mouse_down = EINA_TRUE;
|
|
|
|
inst->mouse_down_x = ev->canvas.x;
|
|
|
|
inst->mouse_down_y = ev->canvas.y;
|
|
|
|
}
|
2011-09-02 16:02:26 -07:00
|
|
|
|
2019-03-31 16:06:37 -07:00
|
|
|
static void
|
|
|
|
_button_cb_mouse_up(void *data, Evas *e EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *event_info)
|
|
|
|
{
|
|
|
|
Instance *inst;
|
|
|
|
Evas_Event_Mouse_Up *ev = event_info;
|
|
|
|
Evas_Coord dx, dy;
|
|
|
|
|
|
|
|
inst = data;
|
|
|
|
if (!inst->mouse_down) return;
|
|
|
|
|
|
|
|
inst->mouse_down = EINA_FALSE;
|
|
|
|
dx = ev->canvas.x - inst->mouse_down_x;
|
|
|
|
dy = ev->canvas.y - inst->mouse_down_y;
|
|
|
|
if (((dx * dx) + (dy * dy)) > (5 * 5)) return;
|
2011-09-02 16:02:26 -07:00
|
|
|
|
2010-06-01 07:26:09 -07:00
|
|
|
ev = event_info;
|
|
|
|
if (ev->button == 1)
|
|
|
|
{
|
2011-11-29 19:32:54 -08:00
|
|
|
Evry_Window *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
2014-01-14 17:19:12 -08:00
|
|
|
E_Client *ec;
|
2011-11-29 19:32:54 -08:00
|
|
|
|
|
|
|
if (inst->win)
|
|
|
|
{
|
|
|
|
win = inst->win;
|
2014-11-02 18:35:13 -08:00
|
|
|
ec = e_win_client_get(win->ewin);
|
2011-11-29 19:32:54 -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 (inst->hidden || !ec->focused)
|
2011-11-29 19:32:54 -08:00
|
|
|
{
|
giant comp rejiggering commit #6:
* border->fx REMOVED, related border api REMOVED
* comp edc has new class of groups: e/comp/effects[/auto]
** these are effects which can be applied to any compositor object through the e_comp_win_effect* api and are written in embryo
*** two types - base and auto - base = manual, for use with animators; auto are "trigger and forget", for use as actual effects
* desk flip transition animations moved to comp effects and FIXED(ish)
* "zoom" effect renamed to "diagonal" for slightly less misleading name since it never did any zooming
* actual "zoom" effect added
* border hierarchy now as follows: cw->effect_obj swallows cw->shobj, cw->shobj swallows cw->bd->bg_object ?: cw->obj, if (cw->bd->bg_object) cw->bd->bg_object swallows cw->obj
** cw->effect_obj now used for all positioning and comp logic
** cw->effect_obj ONLY used for object transformation effects (moving, zooming, fading, etc)
** cw->shobj ONLY for comp visual/non-movement effects (focus effect, unfocus opacity, legacy shadows); this is a candidate for removal/rewrite in E19
* even more comp shape rewrites
* desk flip animation time now controlled by theme since edje doesn't support setting transition time in C; related config value removed
* desk flip transitions (in e_desk.c) rewritten
* various modules (evry/illume2) updated to use comp effects instead of fx offset
* desk flip configuration BROKEN(ish)
2013-02-28 07:20:32 -08:00
|
|
|
if (inst->animating)
|
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_comp_object_effect_stop(ec->frame, NULL);
|
|
|
|
e_comp_object_effect_set(ec->frame, "none");
|
|
|
|
e_client_uniconify(ec);
|
|
|
|
evas_object_raise(ec->frame);
|
|
|
|
evas_object_focus_set(ec->frame, 1);
|
2011-11-29 19:32:54 -08:00
|
|
|
inst->hidden = EINA_FALSE;
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
evry_hide(win, 1);
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2015-07-29 14:21:00 -07:00
|
|
|
win = evry_show(e_gadcon_zone_get(inst->gcc->gadcon),
|
2011-11-29 19:32:54 -08:00
|
|
|
0, inst->cfg->plugin, !inst->illume_mode);
|
|
|
|
if (!win) return;
|
|
|
|
|
|
|
|
inst->win = win;
|
|
|
|
win->data = inst;
|
|
|
|
|
|
|
|
|
|
|
|
if (inst->illume_mode)
|
|
|
|
_gadget_window_show(inst);
|
|
|
|
else
|
|
|
|
_gadget_popup_show(inst);
|
|
|
|
|
|
|
|
e_gadcon_locked_set(inst->gcc->gadcon, 1);
|
|
|
|
|
2014-11-02 18:35:13 -08:00
|
|
|
evas_object_event_callback_add(win->ewin, EVAS_CALLBACK_DEL, _del_func, inst);
|
2011-11-29 19:32:54 -08:00
|
|
|
|
|
|
|
edje_object_signal_emit(inst->o_button, "e,state,focused", "e");
|
2010-06-01 07:26:09 -07:00
|
|
|
}
|
2012-08-15 00:22:04 -07:00
|
|
|
else if (ev->button == 3)
|
2011-04-08 15:16:59 -07:00
|
|
|
{
|
2011-11-29 19:32:54 -08:00
|
|
|
E_Menu *m;
|
|
|
|
E_Menu_Item *mi;
|
|
|
|
int cx, cy;
|
2011-04-08 15:16:59 -07:00
|
|
|
|
2011-11-29 19:32:54 -08:00
|
|
|
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, _cb_menu_configure, inst);
|
2011-04-08 15:16:59 -07:00
|
|
|
|
2011-11-29 19:32:54 -08:00
|
|
|
m = e_gadcon_client_util_menu_items_append(inst->gcc, m, 0);
|
2011-04-08 15:16:59 -07:00
|
|
|
|
2011-11-29 19:32:54 -08:00
|
|
|
e_gadcon_canvas_zone_geometry_get(inst->gcc->gadcon, &cx, &cy,
|
2011-04-08 15:16:59 -07:00
|
|
|
NULL, NULL);
|
2011-11-29 19:32:54 -08:00
|
|
|
e_menu_activate_mouse(m,
|
2015-03-13 14:47:36 -07:00
|
|
|
e_zone_current_get(),
|
2011-11-29 19:32:54 -08:00
|
|
|
cx + ev->output.x, cy + ev->output.y, 1, 1,
|
|
|
|
E_MENU_POP_DIRECTION_DOWN, ev->timestamp);
|
2012-08-15 00:22:04 -07:00
|
|
|
evas_event_feed_mouse_up(inst->gcc->gadcon->evas, ev->button,
|
|
|
|
EVAS_BUTTON_NONE, ev->timestamp, NULL);
|
2011-04-08 15:16:59 -07:00
|
|
|
}
|
2010-06-01 07:26:09 -07:00
|
|
|
}
|
|
|
|
|
|
|
|
int
|
|
|
|
evry_gadget_init(void)
|
|
|
|
{
|
|
|
|
e_gadcon_provider_register(&_gadcon_class);
|
|
|
|
return 1;
|
|
|
|
}
|
|
|
|
|
|
|
|
void
|
|
|
|
evry_gadget_shutdown(void)
|
|
|
|
{
|
|
|
|
e_gadcon_provider_unregister(&_gadcon_class);
|
|
|
|
}
|
2011-08-21 08:41:37 -07:00
|
|
|
|
|
|
|
/***************************************************************************/
|
|
|
|
|
|
|
|
struct _E_Config_Dialog_Data
|
|
|
|
{
|
2011-11-29 19:32:54 -08:00
|
|
|
const char *plugin;
|
|
|
|
int hide_after_action;
|
|
|
|
int popup;
|
|
|
|
Evas_Object *list;
|
2011-08-21 08:41:37 -07:00
|
|
|
};
|
|
|
|
|
2011-11-29 19:32:54 -08:00
|
|
|
static void *_create_data(E_Config_Dialog *cfd);
|
|
|
|
static void _free_data(E_Config_Dialog *cfd, E_Config_Dialog_Data *cfdata);
|
2011-08-21 08:41:37 -07:00
|
|
|
static Evas_Object *_basic_create(E_Config_Dialog *cfd, Evas *evas, E_Config_Dialog_Data *cfdata);
|
2011-11-29 19:32:54 -08:00
|
|
|
static int _basic_apply(E_Config_Dialog *cfd, E_Config_Dialog_Data *cfdata);
|
2011-08-21 08:41:37 -07:00
|
|
|
|
|
|
|
static void
|
|
|
|
_conf_dialog(Instance *inst)
|
|
|
|
{
|
|
|
|
E_Config_Dialog_View *v = NULL;
|
2011-08-25 05:58:35 -07:00
|
|
|
|
2011-08-21 08:41:37 -07:00
|
|
|
if (inst->cfd)
|
|
|
|
return;
|
|
|
|
|
|
|
|
/* if (e_config_dialog_find("everything-gadgets", "launcher/everything-gadgets"))
|
|
|
|
* return; */
|
|
|
|
|
|
|
|
v = E_NEW(E_Config_Dialog_View, 1);
|
|
|
|
if (!v) return;
|
|
|
|
|
|
|
|
v->create_cfdata = _create_data;
|
|
|
|
v->free_cfdata = _free_data;
|
|
|
|
v->basic.create_widgets = _basic_create;
|
|
|
|
v->basic.apply_cfdata = _basic_apply;
|
|
|
|
|
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
|
|
|
inst->cfd = e_config_dialog_new(NULL, _("Everything Gadgets"), "everything-gadgets",
|
2011-11-29 19:32:54 -08:00
|
|
|
"launcher/everything-gadgets", NULL, 0, v, inst);
|
2011-08-21 08:41:37 -07:00
|
|
|
|
|
|
|
/* _conf->cfd = cfd; */
|
|
|
|
}
|
|
|
|
|
|
|
|
static void *
|
|
|
|
_create_data(E_Config_Dialog *cfd)
|
|
|
|
{
|
|
|
|
E_Config_Dialog_Data *cfdata = NULL;
|
|
|
|
Instance *inst = cfd->data;
|
|
|
|
Gadget_Config *gc = inst->cfg;
|
2011-08-25 05:58:35 -07:00
|
|
|
|
2011-08-21 08:41:37 -07:00
|
|
|
cfdata = E_NEW(E_Config_Dialog_Data, 1);
|
|
|
|
|
2011-08-25 05:58:35 -07:00
|
|
|
#define CP(_name) cfdata->_name = (gc->_name ? strdup(gc->_name) : NULL);
|
2011-11-29 19:32:54 -08:00
|
|
|
#define C(_name) cfdata->_name = gc->_name;
|
2011-10-10 02:33:37 -07:00
|
|
|
/* CP(plugin); */
|
2011-09-02 16:02:26 -07:00
|
|
|
C(hide_after_action);
|
|
|
|
C(popup);
|
2011-08-21 08:41:37 -07:00
|
|
|
#undef CP
|
|
|
|
#undef C
|
|
|
|
|
|
|
|
return cfdata;
|
|
|
|
}
|
|
|
|
|
|
|
|
static void
|
|
|
|
_free_data(E_Config_Dialog *cfd, E_Config_Dialog_Data *cfdata)
|
|
|
|
{
|
|
|
|
Instance *inst = cfd->data;
|
2011-08-25 05:58:35 -07:00
|
|
|
|
2011-08-21 08:41:37 -07:00
|
|
|
inst->cfd = NULL;
|
2011-10-10 02:33:37 -07:00
|
|
|
/* if (cfdata->plugin) free(cfdata->plugin); */
|
2011-08-21 08:41:37 -07:00
|
|
|
E_FREE(cfdata);
|
|
|
|
}
|
|
|
|
|
|
|
|
static void
|
2015-03-18 15:09:09 -07:00
|
|
|
_cb_button_settings(void *data EINA_UNUSED, void *data2 EINA_UNUSED)
|
2011-08-21 08:41:37 -07:00
|
|
|
{
|
2014-11-02 18:35:13 -08:00
|
|
|
/* evry_collection_conf_dialog(NULL, "Start"); */
|
2011-08-21 08:41:37 -07:00
|
|
|
}
|
|
|
|
|
2011-10-10 02:33:37 -07:00
|
|
|
static void
|
|
|
|
_fill_list(Eina_List *plugins, Evas_Object *obj, E_Config_Dialog_Data *cfdata)
|
|
|
|
{
|
|
|
|
Evas *evas;
|
|
|
|
Evas_Coord w;
|
|
|
|
Eina_List *l;
|
|
|
|
Plugin_Config *pc;
|
|
|
|
int sel = 0, cnt = 1;
|
2011-11-29 19:32:54 -08:00
|
|
|
|
2011-10-10 02:33:37 -07:00
|
|
|
evas = evas_object_evas_get(obj);
|
|
|
|
evas_event_freeze(evas);
|
|
|
|
edje_freeze();
|
|
|
|
e_widget_ilist_freeze(obj);
|
|
|
|
e_widget_ilist_clear(obj);
|
|
|
|
|
|
|
|
e_widget_ilist_append(obj, NULL, _("All"), NULL, NULL, NULL);
|
|
|
|
|
2011-11-29 19:32:54 -08:00
|
|
|
EINA_LIST_FOREACH (plugins, l, pc)
|
2011-10-10 02:33:37 -07:00
|
|
|
{
|
2011-11-29 19:32:54 -08:00
|
|
|
if (!pc->plugin) continue;
|
2011-10-10 02:33:37 -07:00
|
|
|
e_widget_ilist_append(obj, NULL, pc->plugin->base.label, NULL, NULL, pc->name);
|
|
|
|
if (cfdata->plugin && !strcmp(pc->name, cfdata->plugin))
|
|
|
|
sel = cnt;
|
|
|
|
|
|
|
|
cnt++;
|
|
|
|
}
|
|
|
|
|
2011-11-29 19:32:54 -08:00
|
|
|
e_widget_ilist_selected_set(obj, sel);
|
|
|
|
|
2011-10-10 02:33:37 -07:00
|
|
|
e_widget_ilist_go(obj);
|
|
|
|
e_widget_size_min_get(obj, &w, NULL);
|
|
|
|
e_widget_size_min_set(obj, w > 180 ? w : 180, 140);
|
|
|
|
e_widget_ilist_thaw(obj);
|
|
|
|
edje_thaw();
|
|
|
|
evas_event_thaw(evas);
|
|
|
|
}
|
2011-10-16 08:20:52 -07:00
|
|
|
|
2011-11-14 13:07:29 -08:00
|
|
|
#if 0
|
2011-10-10 02:33:37 -07:00
|
|
|
static void
|
2015-03-18 15:09:09 -07:00
|
|
|
_list_select_cb(void *data EINA_UNUSED, Evas_Object *obj)
|
2011-10-10 02:33:37 -07:00
|
|
|
{
|
|
|
|
int sel = e_widget_ilist_selected_get(obj);
|
|
|
|
|
|
|
|
e_widget_ilist_nth_data_get(obj, sel);
|
|
|
|
}
|
2011-11-29 19:32:54 -08:00
|
|
|
|
2011-11-14 13:07:29 -08:00
|
|
|
#endif
|
2011-10-10 02:33:37 -07:00
|
|
|
|
2011-08-21 08:41:37 -07:00
|
|
|
static Evas_Object *
|
|
|
|
_basic_create(E_Config_Dialog *cfd, Evas *e, E_Config_Dialog_Data *cfdata)
|
|
|
|
{
|
|
|
|
Evas_Object *o = NULL, *of = NULL, *ow = NULL;
|
|
|
|
Instance *inst = cfd->data;
|
2011-08-25 05:58:35 -07:00
|
|
|
|
2011-08-21 08:41:37 -07:00
|
|
|
o = e_widget_list_add(e, 0, 0);
|
|
|
|
|
|
|
|
of = e_widget_framelist_add(e, _("Plugin"), 0);
|
2015-01-11 09:20:38 -08:00
|
|
|
/* ow = e_widget_entry_add(cfd->dia->win, &(cfdata->plugin), NULL, NULL, NULL);
|
2011-10-10 02:33:37 -07:00
|
|
|
* e_widget_framelist_object_append(of, ow); */
|
2011-08-21 08:41:37 -07:00
|
|
|
|
2011-10-10 02:33:37 -07:00
|
|
|
ow = e_widget_ilist_add(e, 24, 24, &cfdata->plugin);
|
|
|
|
/* e_widget_on_change_hook_set(ow, _list_select_cb, cfdata); */
|
|
|
|
_fill_list(evry_conf->conf_subjects, ow, cfdata);
|
|
|
|
e_widget_framelist_object_append(of, ow);
|
|
|
|
cfdata->list = ow;
|
2011-11-29 19:32:54 -08:00
|
|
|
|
2011-08-25 05:58:35 -07:00
|
|
|
ow = e_widget_button_add(e, _("Settings"), NULL, _cb_button_settings, inst, NULL);
|
2011-08-21 08:41:37 -07:00
|
|
|
e_widget_framelist_object_append(of, ow);
|
2011-08-25 05:58:35 -07:00
|
|
|
|
2011-08-21 08:41:37 -07:00
|
|
|
e_widget_list_object_append(o, of, 1, 1, 0.5);
|
2011-08-25 05:58:35 -07:00
|
|
|
|
2011-08-21 08:41:37 -07:00
|
|
|
return o;
|
|
|
|
}
|
|
|
|
|
|
|
|
static int
|
|
|
|
_basic_apply(E_Config_Dialog *cfd, E_Config_Dialog_Data *cfdata)
|
|
|
|
{
|
|
|
|
Instance *inst = cfd->data;
|
|
|
|
Gadget_Config *gc = inst->cfg;
|
2011-10-08 11:17:38 -07:00
|
|
|
Evry_Plugin *p;
|
|
|
|
Evas_Object *oo;
|
2011-10-10 02:33:37 -07:00
|
|
|
const char *plugin;
|
2011-11-29 19:32:54 -08:00
|
|
|
|
|
|
|
#define CP(_name) \
|
|
|
|
if (gc->_name) \
|
|
|
|
eina_stringshare_del(gc->_name); \
|
|
|
|
gc->_name = eina_stringshare_add(cfdata->_name);
|
2011-08-21 08:41:37 -07:00
|
|
|
#define C(_name) gc->_name = cfdata->_name;
|
2011-11-29 19:32:54 -08:00
|
|
|
eina_stringshare_del(gc->plugin); \
|
2011-10-10 02:33:37 -07:00
|
|
|
plugin = e_widget_ilist_selected_label_get(cfdata->list);
|
|
|
|
if (plugin && plugin[0])
|
2011-08-21 08:41:37 -07:00
|
|
|
gc->plugin = eina_stringshare_add(cfdata->plugin);
|
|
|
|
else
|
|
|
|
gc->plugin = NULL;
|
|
|
|
C(hide_after_action);
|
|
|
|
C(popup);
|
|
|
|
#undef CP
|
|
|
|
#undef C
|
|
|
|
|
|
|
|
e_config_save_queue();
|
|
|
|
|
2011-10-08 11:17:38 -07:00
|
|
|
oo = edje_object_part_swallow_get(inst->o_button, "e.swallow.icon");
|
|
|
|
if (oo) evas_object_del(oo);
|
|
|
|
|
|
|
|
edje_object_signal_emit(inst->o_button, "e,state,icon,default", "e");
|
2011-11-29 19:32:54 -08:00
|
|
|
|
2011-10-08 11:17:38 -07:00
|
|
|
if ((p = evry_plugin_find(inst->cfg->plugin)))
|
|
|
|
{
|
|
|
|
oo = evry_util_icon_get(EVRY_ITEM(p), evas_object_evas_get(inst->o_button));
|
2011-11-29 19:32:54 -08:00
|
|
|
if (oo)
|
2011-10-08 11:17:38 -07:00
|
|
|
{
|
|
|
|
edje_object_part_swallow(inst->o_button, "e.swallow.icon", oo);
|
2011-11-29 19:32:54 -08:00
|
|
|
edje_object_signal_emit(inst->o_button, "e,state,icon,plugin", "e");
|
2011-10-08 11:17:38 -07:00
|
|
|
}
|
|
|
|
}
|
2011-11-29 19:32:54 -08:00
|
|
|
|
2011-08-21 08:41:37 -07:00
|
|
|
return 1;
|
|
|
|
}
|
2011-11-29 19:32:54 -08:00
|
|
|
|