feature: comp config is no longer a module

given that compositing is always enabled and that it's crucial to be able to change these settings, potentially having them unavailable is not a great way to live
devs/discomfitor/eo
Mike Blumenkrantz 10 years ago
parent 8be0ce31d7
commit c2be19c093
  1. 6
      config/mobile/e.src
  2. 6
      config/standard/e.src
  3. 2
      configure.ac
  4. 5
      po/POTFILES.in
  5. 2
      src/bin/Makefile.mk
  6. 182
      src/bin/e_comp.c
  7. 16
      src/bin/e_comp.h
  8. 331
      src/bin/e_int_config_comp.c
  9. 37
      src/bin/e_int_config_comp_match.c
  10. 11
      src/bin/e_int_menus.c
  11. 8
      src/bin/e_module.c
  12. 4
      src/modules/Makefile.mk
  13. 19
      src/modules/Makefile_conf_comp.mk
  14. 290
      src/modules/conf_comp/e_mod_main.c
  15. 45
      src/modules/conf_comp/e_mod_main.h
  16. 18
      src/modules/conf_comp/module.desktop.in

@ -264,12 +264,6 @@ group "E_Config" struct {
}
}
group "modules" list {
group "E_Config_Module" struct {
value "name" string: "conf_comp";
value "enabled" uchar: 1;
value "delayed" uchar: 0;
value "priority" int: -1000;
}
group "E_Config_Module" struct {
value "name" string: "illume2";
value "enabled" uchar: 1;

@ -867,12 +867,6 @@ group "E_Config" struct {
}
}
group "modules" list {
group "E_Config_Module" struct {
value "name" string: "conf_comp";
value "enabled" uchar: 1;
value "delayed" uchar: 0;
value "priority" int: -1000;
}
group "E_Config_Module" struct {
value "name" string: "tasks";
value "enabled" uchar: 1;

@ -841,7 +841,6 @@ AC_E_OPTIONAL_MODULE([fileman], true)
AC_E_OPTIONAL_MODULE([fileman_opinfo], true)
AC_E_OPTIONAL_MODULE([wizard], true)
AC_E_OPTIONAL_MODULE([conf], true)
AC_E_OPTIONAL_MODULE([conf_comp], true)
AC_E_OPTIONAL_MODULE([conf_wallpaper2], true)
AC_E_OPTIONAL_MODULE([conf_theme], true, true)
AC_E_OPTIONAL_MODULE([conf_intl], true)
@ -984,7 +983,6 @@ src/modules/everything/module.desktop
src/modules/everything/everything.pc
src/modules/systray/module.desktop
src/modules/appmenu/module.desktop
src/modules/conf_comp/module.desktop
src/modules/quickaccess/module.desktop
src/modules/teamwork/module.desktop
src/modules/shot/module.desktop

@ -53,6 +53,8 @@ src/bin/e_int_client_remember.c
src/bin/e_int_config_modules.c
src/bin/e_int_gadcon_config.c
src/bin/e_int_menus.c
src/bin/e_int_config_comp.c
src/bin/e_int_config_comp_match.c
src/bin/e_int_shelf_config.c
src/bin/e_int_toolbar_config.c
src/bin/e_intl.c
@ -154,9 +156,6 @@ src/modules/conf_bindings/e_int_config_keybindings.c
src/modules/conf_bindings/e_int_config_mousebindings.c
src/modules/conf_bindings/e_int_config_signalbindings.c
src/modules/conf_bindings/e_mod_main.c
src/modules/conf_comp/e_mod_config.c
src/modules/conf_comp/e_mod_config_match.c
src/modules/conf_comp/e_mod_main.c
src/modules/conf_dialogs/e_int_config_dialogs.c
src/modules/conf_dialogs/e_int_config_profiles.c
src/modules/conf_dialogs/e_mod_main.c

@ -275,6 +275,8 @@ src/bin/e_int_client_menu.c \
src/bin/e_int_client_prop.c \
src/bin/e_int_client_remember.c \
src/bin/e_int_config_modules.c \
src/bin/e_int_config_comp.c \
src/bin/e_int_config_comp_match.c \
src/bin/e_int_gadcon_config.c \
src/bin/e_intl.c \
src/bin/e_intl_data.c \

@ -1102,6 +1102,188 @@ e_comp_init(void)
return EINA_TRUE;
}
static Eina_Bool
_style_demo(void *data)
{
Eina_List *style_shadows, *l;
int demo_state;
const E_Comp_Demo_Style_Item *it;
demo_state = (long)evas_object_data_get(data, "style_demo_state");
demo_state = (demo_state + 1) % 4;
evas_object_data_set(data, "style_demo_state", (void *)(long)demo_state);
style_shadows = evas_object_data_get(data, "style_shadows");
EINA_LIST_FOREACH(style_shadows, l, it)
{
Evas_Object *ob = it->preview;
Evas_Object *of = it->frame;
switch (demo_state)
{
case 0:
edje_object_signal_emit(ob, "e,state,visible,on", "e");
edje_object_signal_emit(ob, "e,state,focus,on", "e");
edje_object_part_text_set(of, "e.text.label", _("Visible"));
break;
case 1:
edje_object_signal_emit(ob, "e,state,focus,off", "e");
edje_object_part_text_set(of, "e.text.label", _("Focus-Out"));
break;
case 2:
edje_object_signal_emit(ob, "e,state,focus,on", "e");
edje_object_part_text_set(of, "e.text.label", _("Focus-In"));
break;
case 3:
edje_object_signal_emit(ob, "e,state,visible,off", "e");
edje_object_part_text_set(of, "e.text.label", _("Hidden"));
break;
default:
break;
}
}
return ECORE_CALLBACK_RENEW;
}
static void
_style_selector_del(void *data __UNUSED__,
Evas *e,
Evas_Object *o,
void *event_info __UNUSED__)
{
Eina_List *style_shadows, *style_list;
Ecore_Timer *timer;
Evas_Object *orec0;
orec0 = evas_object_name_find(e, "style_shadows");
style_list = evas_object_data_get(orec0, "list");
style_shadows = evas_object_data_get(o, "style_shadows");
if (style_shadows)
{
E_Comp_Demo_Style_Item *ds_it;
EINA_LIST_FREE(style_shadows, ds_it)
{
style_list = eina_list_remove(style_list, ds_it);
evas_object_del(ds_it->frame);
evas_object_del(ds_it->livethumb);
free(ds_it);
}
evas_object_data_set(o, "style_shadows", NULL);
}
timer = evas_object_data_get(o, "style_timer");
if (timer)
{
ecore_timer_del(timer);
evas_object_data_set(o, "style_timer", NULL);
}
evas_object_data_set(orec0, "list", style_list);
}
EINTERN Evas_Object *
e_comp_style_selector_create(Evas *evas, const char **source)
{
Evas_Object *oi, *ob, *oo, *obd, *orec, *oly, *orec0;
Eina_List *styles, *l, *style_shadows = NULL, *style_list;
char *style;
const char *str;
int n, sel;
Evas_Coord wmw, wmh;
Ecore_Timer *timer;
orec0 = evas_object_name_find(evas, "style_shadows");
style_list = evas_object_data_get(orec0, "list");
oi = e_widget_ilist_add(evas, 80, 80, source);
evas_object_event_callback_add(oi, EVAS_CALLBACK_DEL,
_style_selector_del, oi);
sel = 0;
styles = e_theme_comp_border_list();
n = 0;
EINA_LIST_FOREACH(styles, l, style)
{
E_Comp_Demo_Style_Item *ds_it;
char buf[4096];
ds_it = malloc(sizeof(E_Comp_Demo_Style_Item));
ob = e_livethumb_add(evas);
ds_it->livethumb = ob;
e_livethumb_vsize_set(ob, 240, 240);
oly = e_layout_add(e_livethumb_evas_get(ob));
ds_it->layout = ob;
e_layout_virtual_size_set(oly, 240, 240);
e_livethumb_thumb_set(ob, oly);
evas_object_show(oly);
oo = edje_object_add(e_livethumb_evas_get(ob));
ds_it->preview = oo;
snprintf(buf, sizeof(buf), "e/comp/frame/%s", style);
e_theme_edje_object_set(oo, "base/theme/borders", buf);
e_layout_pack(oly, oo);
e_layout_child_move(oo, 39, 39);
e_layout_child_resize(oo, 162, 162);
edje_object_signal_emit(oo, "e,state,shadow,on", "e");
edje_object_signal_emit(oo, "e,state,visible,on", "e");
evas_object_show(oo);
ds_it->frame = edje_object_add(evas);
e_theme_edje_object_set
(ds_it->frame, "base/theme/comp", "e/comp/preview");
edje_object_part_swallow(ds_it->frame, "e.swallow.preview", ob);
evas_object_show(ds_it->frame);
style_shadows = eina_list_append(style_shadows, ds_it);
obd = edje_object_add(e_livethumb_evas_get(ob));
ds_it->border = obd;
e_theme_edje_object_set(obd, "base/theme/borders",
"e/widgets/border/default/border");
edje_object_part_text_set(obd, "e.text.title", _("Title"));
edje_object_signal_emit(obd, "e,state,focused", "e");
edje_object_part_swallow(oo, "e.swallow.content", obd);
evas_object_show(obd);
orec = evas_object_rectangle_add(e_livethumb_evas_get(ob));
ds_it->client = orec;
evas_object_color_set(orec, 0, 0, 0, 128);
edje_object_part_swallow(obd, "e.swallow.client", orec);
evas_object_show(orec);
e_widget_ilist_append(oi, ds_it->frame, style, NULL, NULL, style);
evas_object_show(ob);
if (*source)
{
if (!strcmp(*source, style)) sel = n;
}
n++;
style_list = eina_list_append(style_list, ds_it);
}
evas_object_data_set(orec0, "list", style_list);
evas_object_data_set(oi, "style_shadows", style_shadows);
timer = ecore_timer_add(3.0, _style_demo, oi);
evas_object_data_set(oi, "style_timer", timer);
evas_object_data_set(oi, "style_demo_state", (void *)1);
e_widget_size_min_get(oi, &wmw, &wmh);
e_widget_size_min_set(oi, 160, 100);
e_widget_ilist_selected_set(oi, sel);
e_widget_ilist_go(oi);
EINA_LIST_FREE(styles, str)
eina_stringshare_del(str);
return oi;
}
EAPI E_Comp *
e_comp_new(void)
{

@ -2,6 +2,7 @@
typedef struct _E_Comp E_Comp;
typedef struct _E_Comp_Data E_Comp_Data;
typedef struct E_Comp_Client_Data E_Comp_Client_Data;
typedef struct _E_Comp_Demo_Style_Item E_Comp_Demo_Style_Item;
#define E_COMP_TYPE (int) 0xE0b01003
@ -111,6 +112,17 @@ struct _E_Comp
Eina_Bool saver : 1;
};
struct _E_Comp_Demo_Style_Item
{
Evas_Object *preview;
Evas_Object *frame;
Evas_Object *livethumb;
Evas_Object *layout;
Evas_Object *border;
Evas_Object *client;
};
typedef enum
{
E_COMP_ENGINE_NONE = 0,
@ -149,6 +161,10 @@ EAPI E_Comp *e_comp_evas_find(const Evas *e);
EAPI void e_comp_button_bindings_grab_all(void);
EAPI void e_comp_button_bindings_ungrab_all(void);
EINTERN Evas_Object *e_comp_style_selector_create(Evas *evas, const char **source);
EAPI E_Config_Dialog *e_int_config_comp(E_Comp *comp, const char *params);
EAPI E_Config_Dialog *e_int_config_comp_match(E_Comp *comp, const char *params);
static inline E_Comp *
e_comp_util_evas_object_comp_get(Evas_Object *obj)
{

@ -1,5 +1,4 @@
#include "e.h"
#include "e_mod_main.h"
struct _E_Config_Dialog_Data
{
@ -67,12 +66,11 @@ static Evas_Object *_advanced_create_widgets(E_Config_Dialog *cfd,
static int _advanced_apply_data(E_Config_Dialog *cfd,
E_Config_Dialog_Data *cfdata);
EINTERN E_Config_Dialog *
e_int_config_comp_module(E_Comp *comp, const char *params __UNUSED__)
EAPI E_Config_Dialog *
e_int_config_comp(E_Comp *comp, const char *params __UNUSED__)
{
E_Config_Dialog *cfd;
E_Config_Dialog_View *v;
Mod *mod = _comp_mod;
if (e_config_dialog_find("E", "appearance/comp")) return NULL;
v = E_NEW(E_Config_Dialog_View, 1);
@ -85,8 +83,7 @@ e_int_config_comp_module(E_Comp *comp, const char *params __UNUSED__)
v->advanced.create_widgets = _advanced_create_widgets;
cfd = e_config_dialog_new(comp, _("Composite Settings"),
"E", "appearance/comp", "preferences-composite", 0, v, mod);
mod->config_dialog = cfd;
"E", "appearance/comp", "preferences-composite", 0, v, NULL);
e_dialog_resizable_set(cfd->dia, 1);
return cfd;
}
@ -95,52 +92,53 @@ static void *
_create_data(E_Config_Dialog *cfd EINA_UNUSED)
{
E_Config_Dialog_Data *cfdata;
E_Comp_Config *conf = e_comp_config_get();
cfdata = E_NEW(E_Config_Dialog_Data, 1);
cfdata->engine = _comp_mod->conf->engine;
cfdata->engine = conf->engine;
if ((cfdata->engine != E_COMP_ENGINE_SW) &&
(cfdata->engine != E_COMP_ENGINE_GL))
cfdata->engine = E_COMP_ENGINE_SW;
cfdata->fast_popups = _comp_mod->conf->fast_popups;
cfdata->fast_borders = _comp_mod->conf->fast_borders;
cfdata->fast_overrides = _comp_mod->conf->fast_overrides;
cfdata->fast_menus = _comp_mod->conf->fast_menus;
cfdata->fast_objects = _comp_mod->conf->fast_objects;
cfdata->match.disable_popups = _comp_mod->conf->match.disable_popups;
cfdata->match.disable_borders = _comp_mod->conf->match.disable_borders;
cfdata->match.disable_overrides = _comp_mod->conf->match.disable_overrides;
cfdata->match.disable_menus = _comp_mod->conf->match.disable_menus;
cfdata->match.disable_objects = _comp_mod->conf->match.disable_objects;
cfdata->disable_screen_effects = _comp_mod->conf->disable_screen_effects;
cfdata->indirect = _comp_mod->conf->indirect;
cfdata->texture_from_pixmap = _comp_mod->conf->texture_from_pixmap;
cfdata->smooth_windows = _comp_mod->conf->smooth_windows;
cfdata->lock_fps = _comp_mod->conf->lock_fps;
cfdata->grab = _comp_mod->conf->grab;
cfdata->vsync = _comp_mod->conf->vsync;
cfdata->swap_mode = _comp_mod->conf->swap_mode;
if (_comp_mod->conf->shadow_style)
cfdata->shadow_style = eina_stringshare_add(_comp_mod->conf->shadow_style);
cfdata->keep_unmapped = _comp_mod->conf->keep_unmapped;
cfdata->max_unmapped_pixels = _comp_mod->conf->max_unmapped_pixels;
cfdata->max_unmapped_time = _comp_mod->conf->max_unmapped_time;
cfdata->min_unmapped_time = _comp_mod->conf->min_unmapped_time;
cfdata->send_flush = _comp_mod->conf->send_flush;
cfdata->send_dump = _comp_mod->conf->send_dump;
cfdata->nocomp_fs = _comp_mod->conf->nocomp_fs;
cfdata->nofade = _comp_mod->conf->nofade;
cfdata->fps_show = _comp_mod->conf->fps_show;
cfdata->fps_corner = _comp_mod->conf->fps_corner;
cfdata->fps_average_range = _comp_mod->conf->fps_average_range;
cfdata->fast_popups = conf->fast_popups;
cfdata->fast_borders = conf->fast_borders;
cfdata->fast_overrides = conf->fast_overrides;
cfdata->fast_menus = conf->fast_menus;
cfdata->fast_objects = conf->fast_objects;
cfdata->match.disable_popups = conf->match.disable_popups;
cfdata->match.disable_borders = conf->match.disable_borders;
cfdata->match.disable_overrides = conf->match.disable_overrides;
cfdata->match.disable_menus = conf->match.disable_menus;
cfdata->match.disable_objects = conf->match.disable_objects;
cfdata->disable_screen_effects = conf->disable_screen_effects;
cfdata->indirect = conf->indirect;
cfdata->texture_from_pixmap = conf->texture_from_pixmap;
cfdata->smooth_windows = conf->smooth_windows;
cfdata->lock_fps = conf->lock_fps;
cfdata->grab = conf->grab;
cfdata->vsync = conf->vsync;
cfdata->swap_mode = conf->swap_mode;
cfdata->shadow_style = eina_stringshare_add(conf->shadow_style);
cfdata->keep_unmapped = conf->keep_unmapped;
cfdata->max_unmapped_pixels = conf->max_unmapped_pixels;
cfdata->max_unmapped_time = conf->max_unmapped_time;
cfdata->min_unmapped_time = conf->min_unmapped_time;
cfdata->send_flush = conf->send_flush;
cfdata->send_dump = conf->send_dump;
cfdata->nocomp_fs = conf->nocomp_fs;
cfdata->nofade = conf->nofade;
cfdata->fps_show = conf->fps_show;
cfdata->fps_corner = conf->fps_corner;
cfdata->fps_average_range = conf->fps_average_range;
if (cfdata->fps_average_range < 1) cfdata->fps_average_range = 12;
else if (cfdata->fps_average_range > 120)
cfdata->fps_average_range = 120;
cfdata->first_draw_delay = _comp_mod->conf->first_draw_delay;
cfdata->first_draw_delay = conf->first_draw_delay;
return cfdata;
}
@ -149,7 +147,6 @@ static void
_free_data(E_Config_Dialog *cfd __UNUSED__,
E_Config_Dialog_Data *cfdata)
{
_comp_mod->config_dialog = NULL;
eina_stringshare_del(cfdata->shadow_style);
free(cfdata);
}
@ -188,7 +185,7 @@ _advanced_create_widgets(E_Config_Dialog *cfd, Evas *evas, E_Config_Dialog_Data
of = e_widget_frametable_add(evas, _("Select default style"), 0);
e_widget_frametable_content_align_set(of, 0.5, 0.5);
cfdata->styles_il = oi = _style_selector(evas, &(cfdata->shadow_style));
cfdata->styles_il = oi = e_comp_style_selector_create(evas, &(cfdata->shadow_style));
e_widget_frametable_object_append(of, oi, 0, 0, 1, 1, 1, 1, 1, 1);
e_widget_list_object_append(ol, of, 1, 1, 0.5);
@ -424,79 +421,81 @@ static int
_advanced_apply_data(E_Config_Dialog *cfd __UNUSED__,
E_Config_Dialog_Data *cfdata)
{
if ((cfdata->lock_fps != _comp_mod->conf->lock_fps) ||
(cfdata->smooth_windows != _comp_mod->conf->smooth_windows) ||
(cfdata->grab != _comp_mod->conf->grab) ||
(cfdata->keep_unmapped != _comp_mod->conf->keep_unmapped) ||
(cfdata->nocomp_fs != _comp_mod->conf->nocomp_fs) ||
(cfdata->nofade != _comp_mod->conf->nofade) ||
(cfdata->shadow_style != _comp_mod->conf->shadow_style) ||
(cfdata->max_unmapped_pixels != _comp_mod->conf->max_unmapped_pixels) ||
(cfdata->max_unmapped_time != _comp_mod->conf->max_unmapped_time) ||
(cfdata->min_unmapped_time != _comp_mod->conf->min_unmapped_time) ||
(cfdata->send_flush != _comp_mod->conf->send_flush) ||
(cfdata->send_dump != _comp_mod->conf->send_dump) ||
(cfdata->fps_show != _comp_mod->conf->fps_show) ||
(cfdata->fps_corner != _comp_mod->conf->fps_corner) ||
(cfdata->fps_average_range != _comp_mod->conf->fps_average_range) ||
(cfdata->first_draw_delay != _comp_mod->conf->first_draw_delay) ||
(_comp_mod->conf->match.disable_popups != cfdata->match.disable_popups) ||
(_comp_mod->conf->match.disable_borders != cfdata->match.disable_borders) ||
(_comp_mod->conf->match.disable_overrides != cfdata->match.disable_overrides) ||
(_comp_mod->conf->match.disable_menus != cfdata->match.disable_menus) ||
(_comp_mod->conf->match.disable_objects != cfdata->match.disable_objects) ||
(_comp_mod->conf->disable_screen_effects != cfdata->disable_screen_effects) ||
(_comp_mod->conf->fast_popups != cfdata->fast_popups) ||
(_comp_mod->conf->fast_borders != cfdata->fast_borders) ||
(_comp_mod->conf->fast_overrides != cfdata->fast_overrides) ||
(_comp_mod->conf->fast_menus != cfdata->fast_menus) ||
(_comp_mod->conf->fast_objects != cfdata->fast_objects)
E_Comp_Config *conf = e_comp_config_get();
if ((cfdata->lock_fps != conf->lock_fps) ||
(cfdata->smooth_windows != conf->smooth_windows) ||
(cfdata->grab != conf->grab) ||
(cfdata->keep_unmapped != conf->keep_unmapped) ||
(cfdata->nocomp_fs != conf->nocomp_fs) ||
(cfdata->nofade != conf->nofade) ||
(cfdata->shadow_style != conf->shadow_style) ||
(cfdata->max_unmapped_pixels != conf->max_unmapped_pixels) ||
(cfdata->max_unmapped_time != conf->max_unmapped_time) ||
(cfdata->min_unmapped_time != conf->min_unmapped_time) ||
(cfdata->send_flush != conf->send_flush) ||
(cfdata->send_dump != conf->send_dump) ||
(cfdata->fps_show != conf->fps_show) ||
(cfdata->fps_corner != conf->fps_corner) ||
(cfdata->fps_average_range != conf->fps_average_range) ||
(cfdata->first_draw_delay != conf->first_draw_delay) ||
(conf->match.disable_popups != cfdata->match.disable_popups) ||
(conf->match.disable_borders != cfdata->match.disable_borders) ||
(conf->match.disable_overrides != cfdata->match.disable_overrides) ||
(conf->match.disable_menus != cfdata->match.disable_menus) ||
(conf->match.disable_objects != cfdata->match.disable_objects) ||
(conf->disable_screen_effects != cfdata->disable_screen_effects) ||
(conf->fast_popups != cfdata->fast_popups) ||
(conf->fast_borders != cfdata->fast_borders) ||
(conf->fast_overrides != cfdata->fast_overrides) ||
(conf->fast_menus != cfdata->fast_menus) ||
(conf->fast_objects != cfdata->fast_objects)
)
{
_comp_mod->conf->fast_popups = cfdata->fast_popups;
_comp_mod->conf->fast_borders = cfdata->fast_borders;
_comp_mod->conf->fast_overrides = cfdata->fast_overrides;
_comp_mod->conf->fast_menus = cfdata->fast_menus;
_comp_mod->conf->fast_objects = cfdata->fast_objects;
_comp_mod->conf->match.disable_popups = cfdata->match.disable_popups;
_comp_mod->conf->match.disable_borders = cfdata->match.disable_borders;
_comp_mod->conf->match.disable_overrides = cfdata->match.disable_overrides;
_comp_mod->conf->match.disable_menus = cfdata->match.disable_menus;
_comp_mod->conf->match.disable_objects = cfdata->match.disable_objects;
_comp_mod->conf->disable_screen_effects = cfdata->disable_screen_effects;
_comp_mod->conf->lock_fps = cfdata->lock_fps;
_comp_mod->conf->smooth_windows = cfdata->smooth_windows;
_comp_mod->conf->grab = cfdata->grab;
_comp_mod->conf->keep_unmapped = cfdata->keep_unmapped;
_comp_mod->conf->nocomp_fs = cfdata->nocomp_fs;
_comp_mod->conf->nofade = cfdata->nofade;
_comp_mod->conf->max_unmapped_pixels = cfdata->max_unmapped_pixels;
_comp_mod->conf->max_unmapped_time = cfdata->max_unmapped_time;
_comp_mod->conf->min_unmapped_time = cfdata->min_unmapped_time;
_comp_mod->conf->send_flush = cfdata->send_flush;
_comp_mod->conf->send_dump = cfdata->send_dump;
_comp_mod->conf->fps_show = cfdata->fps_show;
_comp_mod->conf->fps_corner = cfdata->fps_corner;
_comp_mod->conf->fps_average_range = cfdata->fps_average_range;
_comp_mod->conf->first_draw_delay = cfdata->first_draw_delay;
if (_comp_mod->conf->shadow_style)
eina_stringshare_del(_comp_mod->conf->shadow_style);
_comp_mod->conf->shadow_style = eina_stringshare_ref(cfdata->shadow_style);
conf->fast_popups = cfdata->fast_popups;
conf->fast_borders = cfdata->fast_borders;
conf->fast_overrides = cfdata->fast_overrides;
conf->fast_menus = cfdata->fast_menus;
conf->fast_objects = cfdata->fast_objects;
conf->match.disable_popups = cfdata->match.disable_popups;
conf->match.disable_borders = cfdata->match.disable_borders;
conf->match.disable_overrides = cfdata->match.disable_overrides;
conf->match.disable_menus = cfdata->match.disable_menus;
conf->match.disable_objects = cfdata->match.disable_objects;
conf->disable_screen_effects = cfdata->disable_screen_effects;
conf->lock_fps = cfdata->lock_fps;
conf->smooth_windows = cfdata->smooth_windows;
conf->grab = cfdata->grab;
conf->keep_unmapped = cfdata->keep_unmapped;
conf->nocomp_fs = cfdata->nocomp_fs;
conf->nofade = cfdata->nofade;
conf->max_unmapped_pixels = cfdata->max_unmapped_pixels;
conf->max_unmapped_time = cfdata->max_unmapped_time;
conf->min_unmapped_time = cfdata->min_unmapped_time;
conf->send_flush = cfdata->send_flush;
conf->send_dump = cfdata->send_dump;
conf->fps_show = cfdata->fps_show;
conf->fps_corner = cfdata->fps_corner;
conf->fps_average_range = cfdata->fps_average_range;
conf->first_draw_delay = cfdata->first_draw_delay;
if (conf->shadow_style)
eina_stringshare_del(conf->shadow_style);
conf->shadow_style = eina_stringshare_ref(cfdata->shadow_style);
e_comp_shadows_reset();
}
if ((cfdata->engine != _comp_mod->conf->engine) ||
(cfdata->indirect != _comp_mod->conf->indirect) ||
(cfdata->texture_from_pixmap != _comp_mod->conf->texture_from_pixmap) ||
(cfdata->vsync != _comp_mod->conf->vsync) ||
(cfdata->swap_mode != _comp_mod->conf->swap_mode))
if ((cfdata->engine != conf->engine) ||
(cfdata->indirect != conf->indirect) ||
(cfdata->texture_from_pixmap != conf->texture_from_pixmap) ||
(cfdata->vsync != conf->vsync) ||
(cfdata->swap_mode != conf->swap_mode))
{
E_Action *a;
_comp_mod->conf->engine = cfdata->engine;
_comp_mod->conf->indirect = cfdata->indirect;
_comp_mod->conf->texture_from_pixmap = cfdata->texture_from_pixmap;
_comp_mod->conf->vsync = cfdata->vsync;
_comp_mod->conf->swap_mode = cfdata->swap_mode;
conf->engine = cfdata->engine;
conf->indirect = cfdata->indirect;
conf->texture_from_pixmap = cfdata->texture_from_pixmap;
conf->vsync = cfdata->vsync;
conf->swap_mode = cfdata->swap_mode;
a = e_action_find("restart");
if ((a) && (a->func.go)) a->func.go(NULL, NULL);
@ -559,7 +558,7 @@ _basic_create_widgets(E_Config_Dialog *cfd EINA_UNUSED,
of = e_widget_frametable_add(evas, _("Select default style"), 0);
e_widget_frametable_content_align_set(of, 0.5, 0.5);
cfdata->styles_il = oi = _style_selector(evas, &(cfdata->shadow_style));
cfdata->styles_il = oi = e_comp_style_selector_create(evas, &(cfdata->shadow_style));
e_widget_frametable_object_append(of, oi, 0, 0, 1, 1, 1, 1, 1, 1);
e_widget_list_object_append(ol, of, 1, 1, 0.5);
@ -615,75 +614,77 @@ static int
_basic_apply_data(E_Config_Dialog *cfd __UNUSED__,
E_Config_Dialog_Data *cfdata)
{
E_Comp_Config *conf = e_comp_config_get();
if (cfdata->match.toggle_changed || cfdata->fast_changed ||
(cfdata->lock_fps != _comp_mod->conf->lock_fps) ||
(cfdata->smooth_windows != _comp_mod->conf->smooth_windows) ||
(cfdata->grab != _comp_mod->conf->grab) ||
(cfdata->nofade != _comp_mod->conf->nofade) ||
(cfdata->keep_unmapped != _comp_mod->conf->keep_unmapped) ||
(cfdata->nocomp_fs != _comp_mod->conf->nocomp_fs) ||
(cfdata->shadow_style != _comp_mod->conf->shadow_style) ||
(cfdata->max_unmapped_pixels != _comp_mod->conf->max_unmapped_pixels) ||
(cfdata->max_unmapped_time != _comp_mod->conf->max_unmapped_time) ||
(cfdata->min_unmapped_time != _comp_mod->conf->min_unmapped_time) ||
(cfdata->send_flush != _comp_mod->conf->send_flush) ||
(cfdata->send_dump != _comp_mod->conf->send_dump) ||
(cfdata->fps_show != _comp_mod->conf->fps_show) ||
(cfdata->fps_corner != _comp_mod->conf->fps_corner) ||
(cfdata->fps_average_range != _comp_mod->conf->fps_average_range) ||
(cfdata->first_draw_delay != _comp_mod->conf->first_draw_delay)
(cfdata->lock_fps != conf->lock_fps) ||
(cfdata->smooth_windows != conf->smooth_windows) ||
(cfdata->grab != conf->grab) ||
(cfdata->nofade != conf->nofade) ||
(cfdata->keep_unmapped != conf->keep_unmapped) ||
(cfdata->nocomp_fs != conf->nocomp_fs) ||
(cfdata->shadow_style != conf->shadow_style) ||
(cfdata->max_unmapped_pixels != conf->max_unmapped_pixels) ||
(cfdata->max_unmapped_time != conf->max_unmapped_time) ||
(cfdata->min_unmapped_time != conf->min_unmapped_time) ||
(cfdata->send_flush != conf->send_flush) ||
(cfdata->send_dump != conf->send_dump) ||
(cfdata->fps_show != conf->fps_show) ||
(cfdata->fps_corner != conf->fps_corner) ||
(cfdata->fps_average_range != conf->fps_average_range) ||
(cfdata->first_draw_delay != conf->first_draw_delay)
)
{
if (cfdata->match.toggle_changed)
{
_comp_mod->conf->match.disable_popups = cfdata->match.disable_popups = cfdata->match.disable_all;
_comp_mod->conf->match.disable_borders = cfdata->match.disable_borders = cfdata->match.disable_all;
_comp_mod->conf->match.disable_overrides = cfdata->match.disable_overrides = cfdata->match.disable_all;
_comp_mod->conf->match.disable_menus = cfdata->match.disable_menus = cfdata->match.disable_all;
_comp_mod->conf->match.disable_objects = cfdata->match.disable_objects = cfdata->match.disable_all;
_comp_mod->conf->disable_screen_effects = cfdata->disable_screen_effects = cfdata->match.disable_all;
conf->match.disable_popups = cfdata->match.disable_popups = cfdata->match.disable_all;
conf->match.disable_borders = cfdata->match.disable_borders = cfdata->match.disable_all;
conf->match.disable_overrides = cfdata->match.disable_overrides = cfdata->match.disable_all;
conf->match.disable_menus = cfdata->match.disable_menus = cfdata->match.disable_all;
conf->match.disable_objects = cfdata->match.disable_objects = cfdata->match.disable_all;
conf->disable_screen_effects = cfdata->disable_screen_effects = cfdata->match.disable_all;
}
if (cfdata->fast_changed)
{
_comp_mod->conf->fast_borders = cfdata->fast_borders = cfdata->fast;
_comp_mod->conf->fast_popups = cfdata->fast_popups = cfdata->fast;
_comp_mod->conf->fast_menus = cfdata->fast_menus = cfdata->fast;
_comp_mod->conf->fast_objects = cfdata->fast_objects = cfdata->fast;
_comp_mod->conf->fast_overrides = cfdata->fast_overrides = cfdata->fast;
conf->fast_borders = cfdata->fast_borders = cfdata->fast;
conf->fast_popups = cfdata->fast_popups = cfdata->fast;
conf->fast_menus = cfdata->fast_menus = cfdata->fast;
conf->fast_objects = cfdata->fast_objects = cfdata->fast;
conf->fast_overrides = cfdata->fast_overrides = cfdata->fast;
}
_comp_mod->conf->lock_fps = cfdata->lock_fps;
_comp_mod->conf->smooth_windows = cfdata->smooth_windows;
_comp_mod->conf->grab = cfdata->grab;
_comp_mod->conf->nofade = cfdata->nofade;
_comp_mod->conf->keep_unmapped = cfdata->keep_unmapped;
_comp_mod->conf->nocomp_fs = cfdata->nocomp_fs;
_comp_mod->conf->max_unmapped_pixels = cfdata->max_unmapped_pixels;
_comp_mod->conf->max_unmapped_time = cfdata->max_unmapped_time;
_comp_mod->conf->min_unmapped_time = cfdata->min_unmapped_time;
_comp_mod->conf->send_flush = cfdata->send_flush;
_comp_mod->conf->send_dump = cfdata->send_dump;
_comp_mod->conf->fps_show = cfdata->fps_show;
_comp_mod->conf->fps_corner = cfdata->fps_corner;
_comp_mod->conf->fps_average_range = cfdata->fps_average_range;
_comp_mod->conf->first_draw_delay = cfdata->first_draw_delay;
if (_comp_mod->conf->shadow_style)
eina_stringshare_del(_comp_mod->conf->shadow_style);
_comp_mod->conf->shadow_style = NULL;
conf->lock_fps = cfdata->lock_fps;
conf->smooth_windows = cfdata->smooth_windows;
conf->grab = cfdata->grab;
conf->nofade = cfdata->nofade;
conf->keep_unmapped = cfdata->keep_unmapped;
conf->nocomp_fs = cfdata->nocomp_fs;
conf->max_unmapped_pixels = cfdata->max_unmapped_pixels;
conf->max_unmapped_time = cfdata->max_unmapped_time;
conf->min_unmapped_time = cfdata->min_unmapped_time;
conf->send_flush = cfdata->send_flush;
conf->send_dump = cfdata->send_dump;
conf->fps_show = cfdata->fps_show;
conf->fps_corner = cfdata->fps_corner;
conf->fps_average_range = cfdata->fps_average_range;
conf->first_draw_delay = cfdata->first_draw_delay;
if (conf->shadow_style)
eina_stringshare_del(conf->shadow_style);
conf->shadow_style = NULL;
if (cfdata->shadow_style)
_comp_mod->conf->shadow_style = eina_stringshare_add(cfdata->shadow_style);
conf->shadow_style = eina_stringshare_add(cfdata->shadow_style);
e_comp_shadows_reset();
}
if ((cfdata->engine != _comp_mod->conf->engine) ||
(cfdata->indirect != _comp_mod->conf->indirect) ||
(cfdata->texture_from_pixmap != _comp_mod->conf->texture_from_pixmap) ||
(cfdata->vsync != _comp_mod->conf->vsync))
if ((cfdata->engine != conf->engine) ||
(cfdata->indirect != conf->indirect) ||
(cfdata->texture_from_pixmap != conf->texture_from_pixmap) ||
(cfdata->vsync != conf->vsync))
{
E_Action *a;
_comp_mod->conf->engine = cfdata->engine;
_comp_mod->conf->indirect = cfdata->indirect;
_comp_mod->conf->texture_from_pixmap = cfdata->texture_from_pixmap;
_comp_mod->conf->vsync = cfdata->vsync;
conf->engine = cfdata->engine;
conf->indirect = cfdata->indirect;
conf->texture_from_pixmap = cfdata->texture_from_pixmap;
conf->vsync = cfdata->vsync;
a = e_action_find("restart");
if ((a) && (a->func.go)) a->func.go(NULL, NULL);

@ -1,5 +1,4 @@
#include "e.h"
#include "e_mod_main.h"
typedef struct _Match_Config
@ -529,7 +528,7 @@ _create_edit_frame(E_Config_Dialog *cfd, Evas *evas, E_Config_Dialog_Data *cfdat
e_widget_toolbook_page_append(tb, NULL, _("Flags"), tab2,
1, 1, 1, 1, 0.5, 0.0);
oi = _style_selector(evas, &(m->match.shadow_style));
oi = e_comp_style_selector_create(evas, &(m->match.shadow_style));
e_widget_toolbook_page_append(tb, NULL, _("Style"), oi,
1, 1, 1, 1, 0.5, 0.0);
@ -736,37 +735,38 @@ _basic_apply_data(E_Config_Dialog *cfd EINA_UNUSED, E_Config_Dialog_Data *cfdata
Eina_List *l;
E_Comp_Match *m;
Match_Config *m2;
E_Comp_Config *conf = e_comp_config_get();
if (!cfdata->changed) return 0;
E_FREE_LIST(_comp_mod->conf->match.popups, e_comp_cfdata_match_free);
E_FREE_LIST(_comp_mod->conf->match.borders, e_comp_cfdata_match_free);
E_FREE_LIST(_comp_mod->conf->match.overrides, e_comp_cfdata_match_free);
E_FREE_LIST(_comp_mod->conf->match.menus, e_comp_cfdata_match_free);
E_FREE_LIST(conf->match.popups, e_comp_cfdata_match_free);
E_FREE_LIST(conf->match.borders, e_comp_cfdata_match_free);
E_FREE_LIST(conf->match.overrides, e_comp_cfdata_match_free);
E_FREE_LIST(conf->match.menus, e_comp_cfdata_match_free);
EINA_LIST_FOREACH(cfdata->popups, l, m2)
{
m = E_NEW(E_Comp_Match, 1);
_match_dup2(m2, m);
_comp_mod->conf->match.popups = eina_list_append(_comp_mod->conf->match.popups, m);
conf->match.popups = eina_list_append(conf->match.popups, m);
}
EINA_LIST_FOREACH(cfdata->borders, l, m2)
{
m = E_NEW(E_Comp_Match, 1);
_match_dup2(m2, m);
_comp_mod->conf->match.borders = eina_list_append(_comp_mod->conf->match.borders, m);
conf->match.borders = eina_list_append(conf->match.borders, m);
}
EINA_LIST_FOREACH(cfdata->overrides, l, m2)
{
m = E_NEW(E_Comp_Match, 1);
_match_dup2(m2, m);
_comp_mod->conf->match.overrides = eina_list_append(_comp_mod->conf->match.overrides, m);
conf->match.overrides = eina_list_append(conf->match.overrides, m);
}
EINA_LIST_FOREACH(cfdata->menus, l, m2)
{
m = E_NEW(E_Comp_Match, 1);
_match_dup2(m2, m);
_comp_mod->conf->match.menus = eina_list_append(_comp_mod->conf->match.menus, m);
conf->match.menus = eina_list_append(conf->match.menus, m);
}
cfdata->changed = 0;
e_comp_shadows_reset();
@ -788,7 +788,6 @@ _basic_create_widgets(E_Config_Dialog *cfd, Evas *evas, E_Config_Dialog_Data *cf
static void
_free_data(E_Config_Dialog *cfd EINA_UNUSED, E_Config_Dialog_Data *cfdata)
{
_comp_mod->match_config_dialog = NULL;
E_FREE_LIST(cfdata->popups, _match_free);
E_FREE_LIST(cfdata->borders, _match_free);
E_FREE_LIST(cfdata->menus, _match_free);
@ -803,11 +802,11 @@ _create_data(E_Config_Dialog *cfd)
Eina_List *l;
E_Comp_Match *m;
Match_Config *m2;
E_Comp_Config *conf = e_comp_config_get();
_comp_mod->match_config_dialog = cfd;
cfdata = E_NEW(E_Config_Dialog_Data, 1);
EINA_LIST_FOREACH(_comp_mod->conf->match.popups, l, m)
EINA_LIST_FOREACH(conf->match.popups, l, m)
{
m2 = E_NEW(Match_Config, 1);
_match_dup(m, m2);
@ -815,7 +814,7 @@ _create_data(E_Config_Dialog *cfd)
cfdata->popups = eina_list_append(cfdata->popups, m2);
}
EINA_LIST_FOREACH(_comp_mod->conf->match.borders, l, m)
EINA_LIST_FOREACH(conf->match.borders, l, m)
{
m2 = E_NEW(Match_Config, 1);
_match_dup(m, m2);
@ -823,7 +822,7 @@ _create_data(E_Config_Dialog *cfd)
cfdata->borders = eina_list_append(cfdata->borders, m2);
}
EINA_LIST_FOREACH(_comp_mod->conf->match.overrides, l, m)
EINA_LIST_FOREACH(conf->match.overrides, l, m)
{
m2 = E_NEW(Match_Config, 1);
_match_dup(m, m2);
@ -831,7 +830,7 @@ _create_data(E_Config_Dialog *cfd)
cfdata->overrides = eina_list_append(cfdata->overrides, m2);
}
EINA_LIST_FOREACH(_comp_mod->conf->match.menus, l, m)
EINA_LIST_FOREACH(conf->match.menus, l, m)
{
m2 = E_NEW(Match_Config, 1);
_match_dup(m, m2);
@ -842,12 +841,11 @@ _create_data(E_Config_Dialog *cfd)
return cfdata;
}
EINTERN E_Config_Dialog *
EAPI E_Config_Dialog *
e_int_config_comp_match(E_Comp *comp, const char *params __UNUSED__)
{
E_Config_Dialog *cfd;
E_Config_Dialog_View *v;
Mod *mod = _comp_mod;
if (e_config_dialog_find("E", "internal/comp_matches")) return NULL;
v = E_NEW(E_Config_Dialog_View, 1);
@ -858,8 +856,7 @@ e_int_config_comp_match(E_Comp *comp, const char *params __UNUSED__)
v->basic.create_widgets = _basic_create_widgets;
cfd = e_config_dialog_new(comp, _("Composite Match Settings"),
"E", "_comp_matches", "preferences-composite", 0, v, mod);
mod->match_config_dialog = cfd;
"E", "_comp_matches", "preferences-composite", 0, v, NULL);
e_dialog_resizable_set(cfd->dia, 1);
return cfd;
}

@ -1097,6 +1097,12 @@ _e_int_menus_virtuals_icon_cb(void *data, E_Menu *m, E_Menu_Item *mi)
mi->icon_object = o;
}
static void
_e_e_int_menus_conf_comp_cb(void *data EINA_UNUSED, E_Menu *m, E_Menu_Item *mi EINA_UNUSED)
{
e_int_config_comp(e_comp_get(m), NULL);
}
static void
_e_int_menus_config_pre_cb(void *data __UNUSED__, E_Menu *m)
{
@ -1116,6 +1122,11 @@ _e_int_menus_config_pre_cb(void *data __UNUSED__, E_Menu *m)
}
}
mi = e_menu_item_new(m);
e_menu_item_label_set(mi, _("Composite"));
e_util_menu_item_theme_icon_set(mi, "preferences-composite");
e_menu_item_callback_set(mi, _e_e_int_menus_conf_comp_cb, NULL);
l = _e_int_menus_augmentation_find("config/1");
if (l) _e_int_menus_augmentation_add(m, l);

@ -238,10 +238,12 @@ e_module_all_load(void)
{
if (!em) continue;
if (!e_util_strcmp(em->name, "comp"))
if ((!e_util_strcmp(em->name, "comp")) || (!e_util_strcmp(em->name, "conf_comp")))
{
eina_stringshare_replace(&em->name, "conf_comp");
em->enabled = 1;
eina_stringshare_del(em->name);
e_config->modules = eina_list_remove_list(e_config->modules, l);
free(em);
continue;
}
if ((em->delayed) && (em->enabled) && (!e_config->no_module_delay))
{

@ -74,10 +74,6 @@ if USE_MODULE_CONF
include src/modules/Makefile_conf.mk
endif
if USE_MODULE_CONF_COMP
include src/modules/Makefile_conf_comp.mk
endif
if USE_MODULE_CONF_WALLPAPER2
include src/modules/Makefile_conf_wallpaper2.mk
endif

@ -1,19 +0,0 @@
conf_compdir = $(MDIR)/conf_comp
conf_comp_DATA = src/modules/conf_comp/module.desktop
EXTRA_DIST += $(comp_DATA)
conf_comppkgdir = $(MDIR)/conf_comp/$(MODULE_ARCH)
conf_comppkg_LTLIBRARIES = src/modules/conf_comp/module.la
src_modules_conf_comp_module_la_LIBADD = $(MOD_LIBS)
src_modules_conf_comp_module_la_CPPFLAGS = $(MOD_CPPFLAGS)
src_modules_conf_comp_module_la_LDFLAGS = $(MOD_LDFLAGS)
src_modules_conf_comp_module_la_SOURCES = src/modules/conf_comp/e_mod_main.h \
src/modules/conf_comp/e_mod_main.c \
src/modules/conf_comp/e_mod_config.c \
src/modules/conf_comp/e_mod_config_match.c
PHONIES += conf_comp install-conf_comp
conf_comp: $(conf_mppkg_LTLIBRARIES) $(conf_comp_DATA)
install-conf_comp: install-conf_compDATA install-conf_comppkgLTLIBRARIES

@ -1,290 +0,0 @@
#include "e.h"
#include "e_mod_main.h"
static E_Int_Menu_Augmentation *maug = NULL;
/* module private routines */
EINTERN Mod *_comp_mod = NULL;
/* public module routines. all modules must have these */
EAPI E_Module_Api e_modapi =
{
E_MODULE_API_VERSION,
"Composite Settings"
};
static void
_e_mod_comp_conf_cb(void *data __UNUSED__, E_Menu *m EINA_UNUSED, E_Menu_Item *mi __UNUSED__)
{
e_int_config_comp_module(NULL, NULL);
}
static void
_e_mod_config_menu_create(void *d EINA_UNUSED, E_Menu *m)
{
E_Menu_Item *mi;
mi = e_menu_item_new(m);
e_menu_item_label_set(mi, _("Composite"));
e_util_menu_item_theme_icon_set(mi, "preferences-composite");
e_menu_item_callback_set(mi, _e_mod_comp_conf_cb, NULL);
}
static Eina_Bool
_style_demo(void *data)
{
Eina_List *style_shadows, *l;
int demo_state;
const E_Demo_Style_Item *it;
demo_state = (long)evas_object_data_get(data, "style_demo_state");
demo_state = (demo_state + 1) % 4;
evas_object_data_set(data, "style_demo_state", (void *)(long)demo_state);
style_shadows = evas_object_data_get(data, "style_shadows");
EINA_LIST_FOREACH(style_shadows, l, it)
{
Evas_Object *ob = it->preview;
Evas_Object *of = it->frame;
switch (demo_state)
{
case 0:
edje_object_signal_emit(ob, "e,state,visible,on", "e");
edje_object_signal_emit(ob, "e,state,focus,on", "e");
edje_object_part_text_set(of, "e.text.label", _("Visible"));
break;
case 1:
edje_object_signal_emit(ob, "e,state,focus,off", "e");
edje_object_part_text_set(of, "e.text.label", _("Focus-Out"));
break;
case 2:
edje_object_signal_emit(ob, "e,state,focus,on", "e");
edje_object_part_text_set(of, "e.text.label", _("Focus-In"));
break;
case 3:
edje_object_signal_emit(ob, "e,state,visible,off", "e");
edje_object_part_text_set(of, "e.text.label", _("Hidden"));
break;
default:
break;
}
}
return ECORE_CALLBACK_RENEW;
}
static void
_style_selector_del(void *data __UNUSED__,
Evas *e,
Evas_Object *o,
void *event_info __UNUSED__)
{
Eina_List *style_shadows, *style_list;
Ecore_Timer *timer;
Evas_Object *orec0;
orec0 = evas_object_name_find(e, "style_shadows");
style_list = evas_object_data_get(orec0, "list");
style_shadows = evas_object_data_get(o, "style_shadows");
if (style_shadows)
{
E_Demo_Style_Item *ds_it;
EINA_LIST_FREE(style_shadows, ds_it)
{
style_list = eina_list_remove(style_list, ds_it);
evas_object_del(ds_it->frame);
evas_object_del(ds_it->livethumb);
free(ds_it);
}
evas_object_data_set(o, "style_shadows", NULL);
}
timer = evas_object_data_get(o, "style_timer");
if (timer)
{
ecore_timer_del(timer);
evas_object_data_set(o, "style_timer", NULL);
}
evas_object_data_set(orec0, "list", style_list);
}
EINTERN Evas_Object *
_style_selector(Evas *evas, const char **source)
{
Evas_Object *oi, *ob, *oo, *obd, *orec, *oly, *orec0;
Eina_List *styles, *l, *style_shadows = NULL, *style_list;
char *style;
const char *str;
int n, sel;
Evas_Coord wmw, wmh;
Ecore_Timer *timer;
orec0 = evas_object_name_find(evas, "style_shadows");
style_list = evas_object_data_get(orec0, "list");
oi = e_widget_ilist_add(evas, 80, 80, source);
evas_object_event_callback_add(oi, EVAS_CALLBACK_DEL,
_style_selector_del, oi);
sel = 0;
styles = e_theme_comp_border_list();
n = 0;
EINA_LIST_FOREACH(styles, l, style)
{
E_Demo_Style_Item *ds_it;
char buf[4096];
ds_it = malloc(sizeof(E_Demo_Style_Item));
ob = e_livethumb_add(evas);
ds_it->livethumb = ob;
e_livethumb_vsize_set(ob, 240, 240);
oly = e_layout_add(e_livethumb_evas_get(ob));
ds_it->layout = ob;
e_layout_virtual_size_set(oly, 240, 240);
e_livethumb_thumb_set(ob, oly);
evas_object_show(oly);
oo = edje_object_add(e_livethumb_evas_get(ob));
ds_it->preview = oo;
snprintf(buf, sizeof(buf), "e/comp/frame/%s", style);
e_theme_edje_object_set(oo, "base/theme/borders", buf);
e_layout_pack(oly, oo);
e_layout_child_move(oo, 39, 39);
e_layout_child_resize(oo, 162, 162);
edje_object_signal_emit(oo, "e,state,shadow,on", "e");
edje_object_signal_emit(oo, "e,state,visible,on", "e");
evas_object_show(oo);
ds_it->frame = edje_object_add(evas);
e_theme_edje_object_set
(ds_it->frame, "base/theme/comp", "e/comp/preview");
edje_object_part_swallow(ds_it->frame, "e.swallow.preview", ob);
evas_object_show(ds_it->frame);
style_shadows = eina_list_append(style_shadows, ds_it);
obd = edje_object_add(e_livethumb_evas_get(ob));
ds_it->border = obd;
e_theme_edje_object_set(obd, "base/theme/borders",
"e/widgets/border/default/border");
edje_object_part_text_set(obd, "e.text.title", _("Title"));
edje_object_signal_emit(obd, "e,state,focused", "e");
edje_object_part_swallow(oo, "e.swallow.content", obd);
evas_object_show(obd);
orec = evas_object_rectangle_add(e_livethumb_evas_get(ob));
ds_it->client = orec;
evas_object_color_set(orec, 0, 0, 0, 128);
edje_object_part_swallow(obd, "e.swallow.client", orec);
evas_object_show(orec);
e_widget_ilist_append(oi, ds_it->frame, style, NULL, NULL, style);
evas_object_show(ob);
if (*source)
{
if (!strcmp(*source, style)) sel = n;
}
n++;
style_list = eina_list_append(style_list, ds_it);
}
evas_object_data_set(orec0, "list", style_list);
evas_object_data_set(oi, "style_shadows", style_shadows);
timer = ecore_timer_add(3.0, _style_demo, oi);
evas_object_data_set(oi, "style_timer", timer);
evas_object_data_set(oi, "style_demo_state", (void *)1);
e_widget_size_min_get(oi, &wmw, &wmh);
e_widget_size_min_set(oi, 160, 100);
e_widget_ilist_selected_set(oi, sel);
e_widget_ilist_go(oi);
EINA_LIST_FREE(styles, str)
eina_stringshare_del(str);
return oi;
}
EAPI void *
e_modapi_init(E_Module *m)
{
Mod *mod;
E_Comp_Config *conf;
conf = e_comp_config_get();
if (!conf)
{
EINA_LOG_CRIT("COMP CONFIG MISSING!!!! ARGH!");
return NULL;
}
mod = calloc(1, sizeof(Mod));
m->data = mod;
mod->module = m;