lots of work on compositor stuff. looking slick and nice internally too.

SVN revision: 45159
devs/princeamd/enlightenment-0.17-elive
Carsten Haitzler 13 years ago
parent d4c9dd55e6
commit 79dcd015f8
  1. 28
      src/bin/e_menu.c
  2. 2
      src/bin/e_menu.h
  3. 40
      src/bin/e_object.c
  4. 39
      src/bin/e_object.h
  5. 126
      src/bin/e_popup.c
  6. 1
      src/bin/e_popup.h
  7. 3
      src/modules/comp/Makefile.am
  8. 732
      src/modules/comp/e_mod_comp.c
  9. 18
      src/modules/comp/e_mod_comp.h
  10. 38
      src/modules/comp/e_mod_comp_update.c
  11. 30
      src/modules/comp/e_mod_comp_update.h
  12. 107
      src/modules/comp/e_mod_config.c
  13. 9
      src/modules/comp/e_mod_main.c
  14. 3
      src/modules/comp/e_mod_main.h
  15. BIN
      src/modules/comp/shadow.edj
  16. 3
      x-ui.sh

@ -90,6 +90,7 @@ static Eina_Bool _e_menu_categories_free_cb(const Eina_Hash *hash, const void *k
/* local subsystem globals */
static Ecore_X_Window _e_menu_win = 0;
static Eina_List *_e_active_menus = NULL;
static Eina_Hash *_e_menu_hash = NULL;
static E_Menu_Item *_e_active_menu_item = NULL;
/*static Eina_Hash *_e_menu_category_items = NULL;*/
static Eina_Hash *_e_menu_categories = NULL;
@ -160,6 +161,8 @@ e_menu_init(void)
ecore_event_handler_add(ECORE_X_EVENT_WINDOW_SHAPE,
_e_menu_cb_window_shape, NULL);
_e_menu_categories = eina_hash_string_superfast_new(NULL);
if (!_e_menu_hash) _e_menu_hash = eina_hash_string_superfast_new(NULL);
return 1;
}
@ -168,6 +171,12 @@ e_menu_shutdown(void)
{
E_Menu *m;
if (_e_menu_hash)
{
eina_hash_free(_e_menu_hash);
_e_menu_hash = NULL;
}
E_FN_DEL(ecore_event_handler_del, _e_menu_key_down_handler);
E_FN_DEL(ecore_event_handler_del, _e_menu_key_up_handler);
E_FN_DEL(ecore_event_handler_del, _e_menu_mouse_down_handler);
@ -1044,6 +1053,18 @@ e_menu_grab_window_get(void)
return _e_menu_win;
}
EAPI E_Menu *
e_menu_find_by_window(Ecore_X_Window win)
{
E_Menu *m;
m = eina_hash_find(_e_menu_hash, e_util_winid_str_get(win));
if ((m) && (m->evas_win != win))
return NULL;
return m;
}
/* local subsystem functions */
static void
_e_menu_free(E_Menu *m)
@ -1418,6 +1439,7 @@ _e_menu_realize(E_Menu *m)
m->cur.x, m->cur.y, m->cur.w, m->cur.h, 1, 1,
&(m->evas_win));
e_canvas_add(m->ecore_evas);
eina_hash_add(_e_menu_hash, e_util_winid_str_get(m->evas_win), m);
m->shape = e_container_shape_add(m->zone->container);
e_container_shape_move(m->shape, m->cur.x, m->cur.y);
e_container_shape_resize(m->shape, m->cur.w, m->cur.h);
@ -1464,7 +1486,10 @@ _e_menu_realize(E_Menu *m)
if (e_config->use_composite)
{
ecore_evas_alpha_set(m->ecore_evas, m->shaped);
m->evas_win = ecore_evas_software_x11_window_get(m->ecore_evas);
eina_hash_del(_e_menu_hash, e_util_winid_str_get(m->evas_win), m);
m->evas_win = ecore_evas_software_x11_window_get(m->ecore_evas);
eina_hash_add(_e_menu_hash, e_util_winid_str_get(m->evas_win), m);
}
else
ecore_evas_shaped_set(m->ecore_evas, m->shaped);
@ -1737,6 +1762,7 @@ _e_menu_unrealize(E_Menu *m)
ecore_evas_free(m->ecore_evas);
m->ecore_evas = NULL;
m->evas = NULL;
eina_hash_del(_e_menu_hash, e_util_winid_str_get(m->evas_win), m);
m->evas_win = 0;
}

@ -208,5 +208,7 @@ EAPI void e_menu_idler_before(void);
EAPI Ecore_X_Window e_menu_grab_window_get(void);
EAPI E_Menu *e_menu_find_by_window(Ecore_X_Window win);
#endif
#endif

@ -66,6 +66,16 @@ e_object_free(E_Object *obj)
{
E_OBJECT_CHECK(obj);
if (obj->free_att_func) obj->free_att_func(obj);
obj->walking_list++;
while (obj->del_fn_list)
{
E_Object_Delfn *dfn = (E_Object_Delfn *)obj->del_fn_list;
if (!dfn->delete_me) dfn->func(dfn->data, obj);
obj->del_fn_list = eina_inlist_remove(obj->del_fn_list,
EINA_INLIST_GET(dfn));
free(dfn);
}
obj->walking_list--;
/*
* FIXME:
* although this is good - if during cleanup the cleanup func calls
@ -262,19 +272,45 @@ e_object_data_get(E_Object *obj)
}
EAPI void
e_object_free_attach_func_set(E_Object *obj, void (*func) (void *obj))
e_object_free_attach_func_set(E_Object *obj, E_Object_Cleanup_Func func)
{
E_OBJECT_CHECK(obj);
obj->free_att_func = func;
}
EAPI void
e_object_del_attach_func_set(E_Object *obj, void (*func) (void *obj))
e_object_del_attach_func_set(E_Object *obj, E_Object_Cleanup_Func func)
{
E_OBJECT_CHECK(obj);
obj->del_att_func = func;
}
EAPI E_Object_Delfn *
e_object_delfn_add(E_Object *obj, void (*func) (void *data, void *obj), void *data)
{
E_Object_Delfn *dfn;
E_OBJECT_CHECK_RETURN(obj, NULL);
dfn = calloc(1, sizeof(E_Object_Delfn));
if (!dfn) return NULL;
dfn->func = func;
dfn->data = data;
obj->del_fn_list = eina_inlist_append(obj->del_fn_list, EINA_INLIST_GET(dfn));
return dfn;
}
EAPI void
e_object_delfn_del(E_Object *obj, E_Object_Delfn *dfn)
{
E_OBJECT_CHECK(obj);
if (obj->walking_list)
{
dfn->delete_me = 1;
return;
}
obj->del_fn_list = eina_inlist_remove(obj->del_fn_list, EINA_INLIST_GET(dfn));
free(dfn);
}
/*
void
e_object_breadcrumb_add(E_Object *obj, char *crumb)

@ -50,7 +50,8 @@
typedef void (*E_Object_Cleanup_Func) (void *obj);
typedef struct _E_Object E_Object;
typedef struct _E_Object E_Object;
typedef struct _E_Object_Delfn E_Object_Delfn;
#else
#ifndef E_OBJECT_H
@ -58,15 +59,26 @@ typedef struct _E_Object E_Object;
struct _E_Object
{
int magic;
int type;
int references;
E_Object_Cleanup_Func del_func;
E_Object_Cleanup_Func cleanup_func;
void (*free_att_func) (void *obj);
void (*del_att_func) (void *obj);
void *data;
unsigned char deleted : 1;
int magic;
int type;
int references;
E_Object_Cleanup_Func del_func;
E_Object_Cleanup_Func cleanup_func;
E_Object_Cleanup_Func free_att_func;
E_Object_Cleanup_Func del_att_func;
Eina_Inlist *del_fn_list;
void *data;
int walking_list;
Eina_Bool deleted : 1;
};
struct _E_Object_Delfn
{
EINA_INLIST;
void (*func) (void *data, void *obj);
void *data;
Eina_Bool delete_me : 1;
};
EAPI void *e_object_alloc (int size, int type, E_Object_Cleanup_Func cleanup_func);
@ -81,8 +93,11 @@ EAPI int e_object_ref_get (E_Object *obj);
EAPI int e_object_error (E_Object *obj);
EAPI void e_object_data_set (E_Object *obj, void *data);
EAPI void *e_object_data_get (E_Object *obj);
EAPI void e_object_free_attach_func_set(E_Object *obj, void (*func) (void *obj));
EAPI void e_object_del_attach_func_set (E_Object *obj, void (*func) (void *obj));
EAPI void e_object_free_attach_func_set(E_Object *obj, E_Object_Cleanup_Func func);
EAPI void e_object_del_attach_func_set (E_Object *obj, E_Object_Cleanup_Func func);
EAPI E_Object_Delfn *e_object_delfn_add (E_Object *obj, void (*func) (void *data, void *obj), void *data);
EAPI void e_object_delfn_del (E_Object *obj, E_Object_Delfn *dfn);
/*
EAPI void e_object_breadcrumb_add (E_Object *obj, char *crumb);

@ -7,20 +7,11 @@
static void _e_popup_free(E_Popup *pop);
static int _e_popup_idle_enterer(void *data);
static int _e_popup_cb_window_shape(void *data, int ev_type, void *ev);
/*static E_Popup *_e_popup_find_by_window(Ecore_X_Window win);
static int _e_popup_cb_mouse_down(void *data, int type, void *event);
static int _e_popup_cb_mouse_up(void *data, int type, void *event);
static int _e_popup_cb_mouse_wheel(void *data, int type, void *event);
*/
/* local subsystem globals */
static Ecore_Event_Handler *_e_popup_window_shape_handler = NULL;
/*
static Ecore_Event_Handler *_e_popup_mouse_down_handler = NULL;
static Ecore_Event_Handler *_e_popup_mouse_up_handler = NULL;
static Ecore_Event_Handler *_e_popup_mouse_wheel_handler = NULL;
*/
static Eina_List *_e_popup_list = NULL;
static Eina_Hash *_e_popup_hash = NULL;
/* externally accessible functions */
@ -29,26 +20,19 @@ e_popup_init(void)
{
_e_popup_window_shape_handler = ecore_event_handler_add(ECORE_X_EVENT_WINDOW_SHAPE,
_e_popup_cb_window_shape, NULL);
/*
_e_popup_mouse_down_handler = ecore_event_handler_add(ECORE_EVENT_MOUSE_BUTTON_DOWN,
_e_popup_cb_mouse_down, NULL);
_e_popup_mouse_up_handler = ecore_event_handler_add(ECORE_EVENT_MOUSE_BUTTON_UP,
_e_popup_cb_mouse_up, NULL);
_e_popup_mouse_wheel_handler = ecore_event_handler_add(ECORE_EVENT_MOUSE_WHEEL,
_e_popup_cb_mouse_wheel, NULL);
*/
if (!_e_popup_hash) _e_popup_hash = eina_hash_string_superfast_new(NULL);
return 1;
}
EAPI int
e_popup_shutdown(void)
{
if (_e_popup_hash)
{
eina_hash_free(_e_popup_hash);
_e_popup_hash = NULL;
}
E_FN_DEL(ecore_event_handler_del, _e_popup_window_shape_handler);
/*
E_FN_DEL(ecore_event_handler_del, _e_popup_mouse_down_handler);
E_FN_DEL(ecore_event_handler_del, _e_popup_mouse_up_handler);
E_FN_DEL(ecore_event_handler_del, _e_popup_mouse_wheel_handler);
*/
return 1;
}
@ -83,6 +67,7 @@ e_popup_new(E_Zone *zone, int x, int y, int w, int h)
e_object_ref(E_OBJECT(pop->zone));
pop->zone->popups = eina_list_append(pop->zone->popups, pop);
_e_popup_list = eina_list_append(_e_popup_list, pop);
eina_hash_add(_e_popup_hash, e_util_winid_str_get(pop->evas_win), pop);
return pop;
}
@ -194,7 +179,9 @@ e_popup_edje_bg_object_set(E_Popup *pop, Evas_Object *o)
if (e_config->use_composite)
{
ecore_evas_alpha_set(pop->ecore_evas, pop->shaped);
eina_hash_del(_e_popup_hash, e_util_winid_str_get(pop->evas_win), pop);
pop->evas_win = ecore_evas_software_x11_window_get(pop->ecore_evas);
eina_hash_add(_e_popup_hash, e_util_winid_str_get(pop->evas_win), pop);
e_container_window_raise(pop->zone->container, pop->evas_win, pop->layer);
}
else
@ -288,6 +275,17 @@ e_popup_idler_before(void)
}
}
EAPI E_Popup *
e_popup_find_by_window(Ecore_X_Window win)
{
E_Popup *pop;
pop = eina_hash_find(_e_popup_hash, e_util_winid_str_get(win));
if ((pop) && (pop->evas_win != win))
return NULL;
return pop;
}
/* local subsystem functions */
static void
@ -304,6 +302,7 @@ _e_popup_free(E_Popup *pop)
e_object_unref(E_OBJECT(pop->zone));
pop->zone->popups = eina_list_remove(pop->zone->popups, pop);
_e_popup_list = eina_list_remove(_e_popup_list, pop);
eina_hash_del(_e_popup_hash, e_util_winid_str_get(pop->evas_win), pop);
free(pop);
}
@ -327,88 +326,11 @@ _e_popup_idle_enterer(void *data)
static int
_e_popup_cb_window_shape(void *data, int ev_type, void *ev)
{
Eina_List *l;
E_Popup *pop;
Ecore_X_Event_Window_Shape *e;
e = ev;
EINA_LIST_FOREACH(_e_popup_list, l, pop)
{
if (pop->evas_win == e->win)
pop->need_shape_export = 1;
}
return 1;
}
/*static E_Popup *
_e_popup_find_by_window(Ecore_X_Window win)
{
E_Popup *pop;
Eina_List *l;
EINA_LIST_FOREACH(_e_popup_list, l, pop)
{
if (pop->evas_win == win) return pop;
}
return NULL;
}
*/
/*
static int
_e_popup_cb_mouse_down(void *data, int type, void *event)
{
Ecore_Event_Mouse_Button *ev;
E_Popup *pop;
ev = event;
pop = _e_popup_find_by_window(ev->event_window);
if (pop)
{
Evas_Button_Flags flags = EVAS_BUTTON_NONE;
e_bindings_mouse_down_event_handle(E_BINDING_CONTEXT_POPUP,
E_OBJECT(pop), ev);
if (ev->double_click) flags |= EVAS_BUTTON_DOUBLE_CLICK;
if (ev->triple_click) flags |= EVAS_BUTTON_TRIPLE_CLICK;
evas_event_feed_mouse_down(pop->evas, ev->buttons, flags, ev->timestamp, NULL);
return 0;
}
return 1;
}
static int
_e_popup_cb_mouse_up(void *data, int type, void *event)
{
Ecore_Event_Mouse_Button *ev;
E_Popup *pop;
ev = event;
pop = _e_popup_find_by_window(ev->event_window);
if (pop)
{
evas_event_feed_mouse_up(pop->evas, ev->buttons, EVAS_BUTTON_NONE, ev->timestamp, NULL);
e_bindings_mouse_up_event_handle(E_BINDING_CONTEXT_POPUP,
E_OBJECT(pop), ev);
return 0;
}
return 1;
}
static int
_e_popup_cb_mouse_wheel(void *data, int type, void *event)
{
Ecore_Event_Mouse_Wheel *ev;
E_Popup *pop;
ev = event;
pop = _e_popup_find_by_window(ev->event_window);
if (pop)
{
e_bindings_wheel_event_handle(E_BINDING_CONTEXT_POPUP,
E_OBJECT(pop), ev);
evas_event_feed_mouse_wheel(pop->evas, ev->direction, ev->z, ev->timestamp, NULL);
return 0;
}
pop = e_popup_find_by_window(e->win);
if (pop) pop->need_shape_export = 1;
return 1;
}
*/

@ -44,6 +44,7 @@ EAPI void e_popup_ignore_events_set(E_Popup *pop, int ignore);
EAPI void e_popup_edje_bg_object_set(E_Popup *pop, Evas_Object *o);
EAPI void e_popup_layer_set(E_Popup *pop, int layer);
EAPI void e_popup_idler_before(void);
EAPI E_Popup *e_popup_find_by_window(Ecore_X_Window win);
#endif
#endif

@ -4,7 +4,8 @@ MODULE = comp
# data files for the module
filesdir = $(libdir)/enlightenment/modules/$(MODULE)
files_DATA = \
e-module-$(MODULE).edj module.desktop
e-module-$(MODULE).edj module.desktop \
shadow.edj
EXTRA_DIST = $(files_DATA)

File diff suppressed because it is too large Load Diff

@ -2,7 +2,21 @@
#else
#ifndef E_MOD_COMP_H
#define E_MOD_COMP_H
Eina_Bool e_mod_comp_init(void);
void e_mod_comp_shutdown(void);
typedef struct _E_Comp E_Comp;
typedef struct _E_Comp_Win E_Comp_Win;
Eina_Bool e_mod_comp_init (void);
void e_mod_comp_shutdown (void);
void e_mod_comp_shadow_set (void);
E_Comp *e_mod_comp_manager_get (E_Manager *man);
E_Comp_Win *e_mod_comp_win_find_by_window (E_Comp *c, Ecore_X_Window win);
E_Comp_Win *e_mod_comp_win_find_by_border (E_Comp *c, E_Border *bd);
E_Comp_Win *e_mod_comp_win_find_by_popup (E_Comp *c, E_Popup *pop);
E_Comp_Win *e_mod_comp_win_find_by_menu (E_Comp *c, E_Menu *menu);
Evas_Object *e_mod_comp_win_evas_object_get (E_Comp_Win *cw);
#endif
#endif

@ -5,17 +5,17 @@
//////////////////////////////////////////////////////////////////////////
struct _Update
struct _E_Update
{
int w, h;
int tw, th;
int tsw, tsh;
unsigned char *tiles;
Update_Policy pol;
E_Update_Policy pol;
};
static void
_e_mod_comp_tiles_alloc(Update *up)
_e_mod_comp_tiles_alloc(E_Update *up)
{
if (up->tiles) return;
up->tiles = calloc(up->tw * up->th, sizeof(unsigned char));
@ -23,33 +23,33 @@ _e_mod_comp_tiles_alloc(Update *up)
//////////////////////////////////////////////////////////////////////////
Update *
E_Update *
e_mod_comp_update_new(void)
{
Update *up;
E_Update *up;
up = calloc(1, sizeof(Update));
up = calloc(1, sizeof(E_Update));
up->tsw = 32;
up->tsh = 32;
up->pol = UPDATE_POLICY_RAW;
up->pol = E_UPDATE_POLICY_RAW;
return up;
}
void
e_mod_comp_update_free(Update *up)
e_mod_comp_update_free(E_Update *up)
{
if (up->tiles) free(up->tiles);
free(up);
}
void
e_mod_comp_update_policy_set(Update *up, Update_Policy pol)
e_mod_comp_update_policy_set(E_Update *up, E_Update_Policy pol)
{
up->pol = pol;
}
void
e_mod_comp_update_tile_size_set(Update *up, int tsw, int tsh)
e_mod_comp_update_tile_size_set(E_Update *up, int tsw, int tsh)
{
if ((up->tsw == tsw) && (up->tsh == tsh)) return;
up->tsw = tsw;
@ -58,7 +58,7 @@ e_mod_comp_update_tile_size_set(Update *up, int tsw, int tsh)
}
void
e_mod_comp_update_resize(Update *up, int w, int h)
e_mod_comp_update_resize(E_Update *up, int w, int h)
{
if ((up->w == w) && (up->h == h)) return;
up->w = w;
@ -73,7 +73,7 @@ e_mod_comp_update_resize(Update *up, int w, int h)
}
void
e_mod_comp_update_add(Update *up, int x, int y, int w, int h)
e_mod_comp_update_add(E_Update *up, int x, int y, int w, int h)
{
int tx, ty, txx, tyy, xx, yy;
unsigned char *t, *t2;
@ -88,9 +88,9 @@ e_mod_comp_update_add(Update *up, int x, int y, int w, int h)
switch (up->pol)
{
case UPDATE_POLICY_RAW:
case E_UPDATE_POLICY_RAW:
break;
case UPDATE_POLICY_HALF_WIDTH_OR_MORE_ROUND_UP_TO_FULL_WIDTH:
case E_UPDATE_POLICY_HALF_WIDTH_OR_MORE_ROUND_UP_TO_FULL_WIDTH:
if (w > (up->w / 2))
{
x = 0;
@ -118,16 +118,16 @@ e_mod_comp_update_add(Update *up, int x, int y, int w, int h)
}
}
Update_Rect *
e_mod_comp_update_rects_get(Update *up)
E_Update_Rect *
e_mod_comp_update_rects_get(E_Update *up)
{
Update_Rect *r;
E_Update_Rect *r;
int ri = 0;
int x, y;
unsigned char *t, *t2, *t3;
if (!up->tiles) return NULL;
r = calloc((up->tw * up->th) + 1, sizeof(Update_Rect));
r = calloc((up->tw * up->th) + 1, sizeof(E_Update_Rect));
if (!r) return NULL;
t = up->tiles;
for (y = 0; y < up->th; y++)
@ -198,7 +198,7 @@ e_mod_comp_update_rects_get(Update *up)
}
void
e_mod_comp_update_clear(Update *up)
e_mod_comp_update_clear(E_Update *up)
{
if (up->tiles)
{

@ -3,27 +3,27 @@
#ifndef E_MOD_COMP_UPDATE_H
#define E_MOD_COMP_UPDATE_H
typedef struct _Update Update;
typedef struct _Update_Rect Update_Rect;
typedef enum _Update_Policy
typedef struct _E_Update E_Update;
typedef struct _E_Update_Rect E_Update_Rect;
typedef enum _E_Update_Policy
{
UPDATE_POLICY_RAW,
UPDATE_POLICY_HALF_WIDTH_OR_MORE_ROUND_UP_TO_FULL_WIDTH,
} Update_Policy;
E_UPDATE_POLICY_RAW,
E_UPDATE_POLICY_HALF_WIDTH_OR_MORE_ROUND_UP_TO_FULL_WIDTH,
} E_Update_Policy;
struct _Update_Rect
struct _E_Update_Rect
{
int x, y, w, h;
};
Update *e_mod_comp_update_new (void);
void e_mod_comp_update_free (Update *up);
void e_mod_comp_update_policy_set (Update *up, Update_Policy pol);
void e_mod_comp_update_tile_size_set (Update *up, int tsw, int tsh);
void e_mod_comp_update_resize (Update *up, int w, int h);
void e_mod_comp_update_add (Update *up, int x, int y, int w, int h);
Update_Rect *e_mod_comp_update_rects_get (Update *up);
void e_mod_comp_update_clear (Update *up);
E_Update *e_mod_comp_update_new (void);
void e_mod_comp_update_free (E_Update *up);
void e_mod_comp_update_policy_set (E_Update *up, E_Update_Policy pol);
void e_mod_comp_update_tile_size_set (E_Update *up, int tsw, int tsh);
void e_mod_comp_update_resize (E_Update *up, int w, int h);
void e_mod_comp_update_add (E_Update *up, int x, int y, int w, int h);
E_Update_Rect *e_mod_comp_update_rects_get (E_Update *up);
void e_mod_comp_update_clear (E_Update *up);
#endif
#endif

@ -1,11 +1,12 @@
#include "e.h"
#include "e_mod_main.h"
#include "e_mod_config.h"
#include "e_mod_comp.h"
#include "config.h"
struct _E_Config_Dialog_Data
{
int x;
int use_shadow;
};
/* Protos */
@ -43,28 +44,20 @@ e_int_config_comp_module(E_Container *con, const char *params __UNUSED__)
static void *
_create_data(E_Config_Dialog *cfd)
{
/*
E_Config_Dialog_Data *cfdata;
Dropshadow *ds;
ds = cfd->data;
cfdata = E_NEW(E_Config_Dialog_Data, 1);
_fill_data(ds, cfdata);
cfdata->use_shadow = _comp_mod->conf->use_shadow;
return cfdata;
*/
return NULL;
}
static void
_free_data(E_Config_Dialog *cfd, E_Config_Dialog_Data *cfdata)
{
/*
Dropshadow *ds;
ds = cfd->data;
ds->config_dialog = NULL;
_comp_mod->config_dialog = NULL;
free(cfdata);
*/
}
static Evas_Object *
@ -76,100 +69,26 @@ _basic_create_widgets(E_Config_Dialog *cfd, Evas *evas, E_Config_Dialog_Data *cf
o = e_widget_list_add(evas, 0, 0);
ot = e_widget_table_add(evas, 1);
of = e_widget_framelist_add(evas, _("Quality"), 0);
of = e_widget_framelist_add(evas, _("Shadow"), 0);
e_widget_framelist_content_align_set(of, 0.5, 0.0);
rg = e_widget_radio_group_new(&(cfdata->x));
ob = e_widget_radio_add(evas, _("X"), 1, rg);
e_widget_framelist_object_append(of, ob);
ob = e_widget_radio_add(evas, _("Y"), 2, rg);
e_widget_framelist_object_append(of, ob);
ob = e_widget_radio_add(evas, _("Z"), 4, rg);
ob = e_widget_check_add(evas, _("Enabled"), &(cfdata->use_shadow));
e_widget_framelist_object_append(of, ob);
e_widget_table_object_append(ot, of, 0, 0, 1, 1, 1, 1, 1, 1);
/*
of = e_widget_framelist_add(evas, _("Blur Type"), 0);
e_widget_framelist_content_align_set(of, 0.5, 0.0);
rg = e_widget_radio_group_new(&(cfdata->blur_size));
ob = e_widget_radio_add(evas, _("Very Fuzzy"), 80, rg);
e_widget_framelist_object_append(of, ob);
ob = e_widget_radio_add(evas, _("Fuzzy"), 40, rg);
e_widget_framelist_object_append(of, ob);
ob = e_widget_radio_add(evas, _("Medium"), 20, rg);
e_widget_framelist_object_append(of, ob);
ob = e_widget_radio_add(evas, _("Sharp"), 10, rg);
e_widget_framelist_object_append(of, ob);
ob = e_widget_radio_add(evas, _("Very Sharp"), 5, rg);
e_widget_framelist_object_append(of, ob);
e_widget_table_object_append(ot, of, 0, 1, 1, 1, 1, 1, 1, 1);
of = e_widget_framelist_add(evas, _("Shadow Distance"), 0);
e_widget_framelist_content_align_set(of, 0.5, 0.0);
rg = e_widget_radio_group_new(&(cfdata->shadow_x));
ob = e_widget_radio_add(evas, _("Very Far"), 32, rg);
e_widget_framelist_object_append(of, ob);
ob = e_widget_radio_add(evas, _("Far"), 16, rg);
e_widget_framelist_object_append(of, ob);
ob = e_widget_radio_add(evas, _("Near"), 8, rg);
e_widget_framelist_object_append(of, ob);
ob = e_widget_radio_add(evas, _("Very Near"), 4, rg);
e_widget_framelist_object_append(of, ob);
ob = e_widget_radio_add(evas, _("Extremely Near"), 2, rg);
e_widget_framelist_object_append(of, ob);
ob = e_widget_radio_add(evas, _("Underneath"), 0, rg);
e_widget_framelist_object_append(of, ob);
e_widget_table_object_append(ot, of, 1, 0, 1, 1, 1, 1, 1, 1);
of = e_widget_framelist_add(evas, _("Shadow Darkness"), 0);
e_widget_framelist_content_align_set(of, 0.5, 0.0);
rg = e_widget_radio_group_new(&(cfdata->darkness));
ob = e_widget_radio_add(evas, _("Very Dark"), 0, rg);
e_widget_framelist_object_append(of, ob);
ob = e_widget_radio_add(evas, _("Dark"), 1, rg);
e_widget_framelist_object_append(of, ob);
ob = e_widget_radio_add(evas, _("Light"), 2, rg);
e_widget_framelist_object_append(of, ob);
ob = e_widget_radio_add(evas, _("Very Light"), 3, rg);
e_widget_framelist_object_append(of, ob);
e_widget_table_object_append(ot, of, 1, 1, 1, 1, 1, 1, 1, 1);
e_widget_list_object_append(o, ot, 1, 1, 0.5);
*/
return o;
}
static int
_basic_apply_data(E_Config_Dialog *cfd, E_Config_Dialog_Data *cfdata)
{
/*
Dropshadow *ds;
ds = cfd->data;
e_border_button_bindings_ungrab_all();
ds->conf->quality = cfdata->quality;
ds->conf->blur_size = cfdata->blur_size;
ds->conf->shadow_x = cfdata->shadow_x;
ds->conf->shadow_y = cfdata->shadow_x;
switch (cfdata->darkness)
if (_comp_mod->conf->use_shadow != cfdata->use_shadow)
{
case 0:
ds->conf->shadow_darkness = 1.0;
break;
case 1:
ds->conf->shadow_darkness = 0.75;
break;
case 2:
ds->conf->shadow_darkness = 0.5;
break;
case 3:
ds->conf->shadow_darkness = 0.25;
break;
_comp_mod->conf->use_shadow = cfdata->use_shadow;
e_mod_comp_shadow_set();
}
e_config_save_queue();
e_border_button_bindings_grab_all();
_dropshadow_cb_config_updated(ds);
*/
return 1;
}

@ -30,15 +30,16 @@ e_modapi_init(E_Module *m)
#undef D
#define T Config
#define D mod->conf_edd
E_CONFIG_VAL(D, T, x, INT);
E_CONFIG_VAL(D, T, use_shadow, UCHAR);
E_CONFIG_VAL(D, T, shadow_file, STR);
mod->conf = e_config_domain_load("module.comp", mod->conf_edd);
if (!mod->conf)
{
mod->conf = E_NEW(Config, 1);
mod->conf->x = 1;
mod->conf->use_shadow = 1;
mod->conf->shadow_file = NULL;
}
E_CONFIG_LIMIT(mod->conf->x, -2, 2);
_comp_mod = mod;
@ -65,7 +66,7 @@ e_modapi_shutdown(E_Module *m)
e_object_del(E_OBJECT(mod->config_dialog));
mod->config_dialog = NULL;
}
if (mod->conf->shadow_file) eina_stringshare_del(mod->conf->shadow_file);
free(mod->conf);
E_CONFIG_DD_FREE(mod->conf_edd);
free(mod);

@ -7,7 +7,8 @@ typedef struct _Mod Mod;
struct _Config
{
int x;
unsigned char use_shadow;
const char *shadow_file;
};
struct _Mod

Binary file not shown.

@ -23,6 +23,9 @@ Xephyr :1 -noreset -ac -br -dpi 183 -screen 960x400x16 -host-cursor &
sleep 1
export DISPLAY=:1
#export E_CONF_PROFILE=illume-home
#valgrind --db-attach=yes --leak-check=full --leak-resolution=high --num-callers=32 \
#enlightenment \
unset E_RESTART E_START E_IPC_SOCKET E_START_TIME E_CONF_PROFILE
enlightenment_start \
-no-precache \

Loading…
Cancel
Save