parent
3e85ebbb42
commit
1bfdf90aab
File diff suppressed because it is too large
Load Diff
|
@ -6,10 +6,10 @@
|
|||
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);
|
||||
Eina_Bool e_mod_comp_init(void);
|
||||
void e_mod_comp_shutdown(void);
|
||||
|
||||
void e_mod_comp_shadow_set (void);
|
||||
void e_mod_comp_shadow_set(void);
|
||||
|
||||
#endif
|
||||
#endif
|
||||
|
|
|
@ -4,7 +4,6 @@
|
|||
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
|
||||
|
||||
static void
|
||||
_e_mod_comp_tiles_alloc(E_Update *up)
|
||||
{
|
||||
|
@ -34,13 +33,16 @@ e_mod_comp_update_free(E_Update *up)
|
|||
}
|
||||
|
||||
void
|
||||
e_mod_comp_update_policy_set(E_Update *up, E_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(E_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;
|
||||
|
@ -49,7 +51,9 @@ 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)
|
||||
e_mod_comp_update_resize(E_Update *up,
|
||||
int w,
|
||||
int h)
|
||||
{
|
||||
unsigned char *ptiles, *p, *pp;
|
||||
int ptw, pth, x, y;
|
||||
|
@ -93,7 +97,11 @@ 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_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;
|
||||
|
@ -108,16 +116,18 @@ e_mod_comp_update_add(E_Update *up, int x, int y, int w, int h)
|
|||
|
||||
switch (up->pol)
|
||||
{
|
||||
case E_UPDATE_POLICY_RAW:
|
||||
case E_UPDATE_POLICY_RAW:
|
||||
break;
|
||||
case E_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;
|
||||
w = up->w;
|
||||
}
|
||||
break;
|
||||
default:
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
|
@ -164,7 +174,8 @@ e_mod_comp_update_rects_get(E_Update *up)
|
|||
{
|
||||
xx++;
|
||||
if ((x + xx) >= up->tw) can_expand_x = 0;
|
||||
else if (!*t2) can_expand_x = 0;
|
||||
else if (!*t2)
|
||||
can_expand_x = 0;
|
||||
if (can_expand_x) *t2 = 0;
|
||||
t2++;
|
||||
}
|
||||
|
|
|
@ -18,21 +18,30 @@ struct _E_Update_Rect
|
|||
|
||||
struct _E_Update
|
||||
{
|
||||
int w, h;
|
||||
int tw, th;
|
||||
int tsw, tsh;
|
||||
unsigned char *tiles;
|
||||
int w, h;
|
||||
int tw, th;
|
||||
int tsw, tsh;
|
||||
unsigned char *tiles;
|
||||
E_Update_Policy pol;
|
||||
};
|
||||
|
||||
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);
|
||||
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
|
||||
|
|
|
@ -15,36 +15,36 @@ typedef struct _E_Demo_Style_Item
|
|||
|
||||
typedef struct _Match_Config
|
||||
{
|
||||
Match match;
|
||||
Match match;
|
||||
E_Config_Dialog *cfd;
|
||||
char *title, *name, *clas, *role;
|
||||
int borderless, dialog, accepts_focus, vkbd;
|
||||
int quickpanel, argb, fullscreen, modal;
|
||||
char *title, *name, *clas, *role;
|
||||
int borderless, dialog, accepts_focus, vkbd;
|
||||
int quickpanel, argb, fullscreen, modal;
|
||||
} Match_Config;
|
||||
|
||||
struct _E_Config_Dialog_Data
|
||||
{
|
||||
int use_shadow;
|
||||
int engine;
|
||||
int indirect;
|
||||
int texture_from_pixmap;
|
||||
int smooth_windows;
|
||||
int lock_fps;
|
||||
int efl_sync;
|
||||
int loose_sync;
|
||||
int grab;
|
||||
int vsync;
|
||||
int use_shadow;
|
||||
int engine;
|
||||
int indirect;
|
||||
int texture_from_pixmap;
|
||||
int smooth_windows;
|
||||
int lock_fps;
|
||||
int efl_sync;
|
||||
int loose_sync;
|
||||
int grab;
|
||||
int vsync;
|
||||
|
||||
const char *shadow_style;
|
||||
|
||||
struct
|
||||
{
|
||||
Eina_List *popups;
|
||||
Eina_List *borders;
|
||||
Eina_List *overrides;
|
||||
Eina_List *menus;
|
||||
int changed;
|
||||
} match;
|
||||
{
|
||||
Eina_List *popups;
|
||||
Eina_List *borders;
|
||||
Eina_List *overrides;
|
||||
Eina_List *menus;
|
||||
int changed;
|
||||
} match;
|
||||
|
||||
Evas_Object *popups_il;
|
||||
Evas_Object *borders_il;
|
||||
|
@ -53,29 +53,33 @@ struct _E_Config_Dialog_Data
|
|||
|
||||
Evas_Object *edit_il;
|
||||
|
||||
int keep_unmapped;
|
||||
int max_unmapped_pixels;
|
||||
int max_unmapped_time;
|
||||
int min_unmapped_time;
|
||||
int send_flush;
|
||||
int send_dump;
|
||||
int nocomp_fs;
|
||||
int keep_unmapped;
|
||||
int max_unmapped_pixels;
|
||||
int max_unmapped_time;
|
||||
int min_unmapped_time;
|
||||
int send_flush;
|
||||
int send_dump;
|
||||
int nocomp_fs;
|
||||
|
||||
int fps_show;
|
||||
int fps_corner;
|
||||
int fps_average_range;
|
||||
double first_draw_delay;
|
||||
int fps_show;
|
||||
int fps_corner;
|
||||
int fps_average_range;
|
||||
double first_draw_delay;
|
||||
};
|
||||
|
||||
|
||||
/* Protos */
|
||||
static void *_create_data(E_Config_Dialog *cfd);
|
||||
static void _free_data(E_Config_Dialog *cfd, E_Config_Dialog_Data *cfdata);
|
||||
static Evas_Object *_basic_create_widgets (E_Config_Dialog *cfd, Evas *evas, E_Config_Dialog_Data *cfdata);
|
||||
static int _basic_apply_data(E_Config_Dialog *cfd, E_Config_Dialog_Data *cfdata);
|
||||
static void *_create_data(E_Config_Dialog *cfd);
|
||||
static void _free_data(E_Config_Dialog *cfd,
|
||||
E_Config_Dialog_Data *cfdata);
|
||||
static Evas_Object *_basic_create_widgets(E_Config_Dialog *cfd,
|
||||
Evas *evas,
|
||||
E_Config_Dialog_Data *cfdata);
|
||||
static int _basic_apply_data(E_Config_Dialog *cfd,
|
||||
E_Config_Dialog_Data *cfdata);
|
||||
|
||||
E_Config_Dialog *
|
||||
e_int_config_comp_module(E_Container *con, const char *params __UNUSED__)
|
||||
e_int_config_comp_module(E_Container *con,
|
||||
const char *params __UNUSED__)
|
||||
{
|
||||
E_Config_Dialog *cfd;
|
||||
E_Config_Dialog_View *v;
|
||||
|
@ -93,13 +97,14 @@ e_int_config_comp_module(E_Container *con, const char *params __UNUSED__)
|
|||
snprintf(buf, sizeof(buf), "%s/e-module-comp.edj",
|
||||
e_module_dir_get(mod->module));
|
||||
cfd = e_config_dialog_new(con, _("Composite Settings"),
|
||||
"E", "appearance/comp", buf, 0, v, mod);
|
||||
"E", "appearance/comp", buf, 0, v, mod);
|
||||
mod->config_dialog = cfd;
|
||||
return cfd;
|
||||
}
|
||||
|
||||
static void
|
||||
_match_dup(Match *m, Match_Config *m2)
|
||||
_match_dup(Match *m,
|
||||
Match_Config *m2)
|
||||
{
|
||||
m2->match = *m;
|
||||
if (m2->match.title) m2->match.title = eina_stringshare_add(m2->match.title);
|
||||
|
@ -147,7 +152,8 @@ _create_data(E_Config_Dialog *cfd)
|
|||
cfdata->fps_corner = _comp_mod->conf->fps_corner;
|
||||
cfdata->fps_average_range = _comp_mod->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;
|
||||
else if (cfdata->fps_average_range > 120)
|
||||
cfdata->fps_average_range = 120;
|
||||
cfdata->first_draw_delay = _comp_mod->conf->first_draw_delay;
|
||||
|
||||
EINA_LIST_FOREACH(_comp_mod->conf->match.popups, l, m)
|
||||
|
@ -170,7 +176,7 @@ _create_data(E_Config_Dialog *cfd)
|
|||
{
|
||||
m2 = E_NEW(Match_Config, 1);
|
||||
_match_dup(m, m2);
|
||||
m2->cfd = cfd;
|
||||
m2->cfd = cfd;
|
||||
cfdata->match.overrides = eina_list_append(cfdata->match.overrides, m2);
|
||||
}
|
||||
|
||||
|
@ -201,7 +207,8 @@ _match_free(Match_Config *m)
|
|||
}
|
||||
|
||||
static void
|
||||
_free_data(E_Config_Dialog *cfd __UNUSED__, E_Config_Dialog_Data *cfdata)
|
||||
_free_data(E_Config_Dialog *cfd __UNUSED__,
|
||||
E_Config_Dialog_Data *cfdata)
|
||||
{
|
||||
Match_Config *m;
|
||||
|
||||
|
@ -227,7 +234,9 @@ _free_data(E_Config_Dialog *cfd __UNUSED__, E_Config_Dialog_Data *cfdata)
|
|||
}
|
||||
|
||||
static void
|
||||
_shadow_changed(void *data, Evas_Object *obj, void *event_info __UNUSED__)
|
||||
_shadow_changed(void *data,
|
||||
Evas_Object *obj,
|
||||
void *event_info __UNUSED__)
|
||||
{
|
||||
E_Config_Dialog_Data *cfdata = data;
|
||||
Evas_Object *orec0;
|
||||
|
@ -239,10 +248,10 @@ _shadow_changed(void *data, Evas_Object *obj, void *event_info __UNUSED__)
|
|||
style_list = evas_object_data_get(orec0, "list");
|
||||
EINA_LIST_FOREACH(style_list, l, it)
|
||||
{
|
||||
if (cfdata->use_shadow)
|
||||
edje_object_signal_emit(it->preview, "e,state,shadow,on", "e");
|
||||
else
|
||||
edje_object_signal_emit(it->preview, "e,state,shadow,off", "e");
|
||||
if (cfdata->use_shadow)
|
||||
edje_object_signal_emit(it->preview, "e,state,shadow,on", "e");
|
||||
else
|
||||
edje_object_signal_emit(it->preview, "e,state,shadow,off", "e");
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -260,37 +269,44 @@ _style_demo(void *data)
|
|||
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;
|
||||
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;
|
||||
}
|
||||
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__)
|
||||
_style_selector_del(void *data __UNUSED__,
|
||||
Evas *e,
|
||||
Evas_Object *o,
|
||||
void *event_info __UNUSED__)
|
||||
{
|
||||
Eina_List *style_shadows, *style_list;
|
||||
Ecore_Timer *timer;
|
||||
|
@ -330,7 +346,9 @@ _style_selector_del(void *data __UNUSED__, Evas *e, Evas_Object *o, void *event_
|
|||
}
|
||||
|
||||
static Evas_Object *
|
||||
_style_selector(Evas *evas, int use_shadow, const char **source)
|
||||
_style_selector(Evas *evas,
|
||||
int use_shadow,
|
||||
const char **source)
|
||||
{
|
||||
Evas_Object *oi, *ob, *oo, *obd, *orec, *oly, *orec0;
|
||||
Eina_List *styles, *l, *style_shadows = NULL, *style_list;
|
||||
|
@ -349,10 +367,10 @@ _style_selector(Evas *evas, int use_shadow, const char **source)
|
|||
n = 0;
|
||||
EINA_LIST_FOREACH(styles, l, style)
|
||||
{
|
||||
E_Demo_Style_Item *ds_it;
|
||||
E_Demo_Style_Item *ds_it;
|
||||
char buf[PATH_MAX];
|
||||
|
||||
ds_it = malloc(sizeof(E_Demo_Style_Item));
|
||||
ds_it = malloc(sizeof(E_Demo_Style_Item));
|
||||
|
||||
ob = e_livethumb_add(evas);
|
||||
ds_it->livethumb = ob;
|
||||
|
@ -365,7 +383,7 @@ _style_selector(Evas *evas, int use_shadow, const char **source)
|
|||
evas_object_show(oly);
|
||||
|
||||
oo = edje_object_add(e_livethumb_evas_get(ob));
|
||||
ds_it->preview = oo;
|
||||
ds_it->preview = oo;
|
||||
snprintf(buf, sizeof(buf), "e/comp/%s", style);
|
||||
e_theme_edje_object_set(oo, "base/theme/borders", buf);
|
||||
e_layout_pack(oly, oo);
|
||||
|
@ -375,11 +393,11 @@ _style_selector(Evas *evas, int use_shadow, const char **source)
|
|||
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/modules/comp", "e/modules/comp/preview");
|
||||
edje_object_part_swallow(ds_it->frame, "e.swallow.preview", ob);
|
||||
evas_object_show(ds_it->frame);
|
||||
ds_it->frame = edje_object_add(evas);
|
||||
e_theme_edje_object_set
|
||||
(ds_it->frame, "base/theme/modules/comp", "e/modules/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));
|
||||
|
@ -472,38 +490,38 @@ _match_label_get(Match_Config *m)
|
|||
|
||||
if (m->match.title)
|
||||
{
|
||||
eina_strbuf_append(buf, _("Title:"));
|
||||
eina_strbuf_append(buf, m->match.title);
|
||||
eina_strbuf_append(buf, _(" / "));
|
||||
eina_strbuf_append(buf, _("Title:"));
|
||||
eina_strbuf_append(buf, m->match.title);
|
||||
eina_strbuf_append(buf, _(" / "));
|
||||
}
|
||||
if (m->match.primary_type)
|
||||
{
|
||||
eina_strbuf_append(buf, _("Type:"));
|
||||
eina_strbuf_append(buf, _match_type_label_get(m->match.primary_type));
|
||||
eina_strbuf_append(buf, _(" / "));
|
||||
eina_strbuf_append(buf, _("Type:"));
|
||||
eina_strbuf_append(buf, _match_type_label_get(m->match.primary_type));
|
||||
eina_strbuf_append(buf, _(" / "));
|
||||
}
|
||||
if (m->match.name)
|
||||
{
|
||||
eina_strbuf_append(buf, _("Name:"));
|
||||
eina_strbuf_append(buf, m->match.name);
|
||||
eina_strbuf_append(buf, _(" / "));
|
||||
eina_strbuf_append(buf, _("Name:"));
|
||||
eina_strbuf_append(buf, m->match.name);
|
||||
eina_strbuf_append(buf, _(" / "));
|
||||
}
|
||||
if (m->match.clas)
|
||||
{
|
||||
eina_strbuf_append(buf, _("Class:"));
|
||||
eina_strbuf_append(buf, m->match.clas);
|
||||
eina_strbuf_append(buf, _(" / "));
|
||||
eina_strbuf_append(buf, _("Class:"));
|
||||
eina_strbuf_append(buf, m->match.clas);
|
||||
eina_strbuf_append(buf, _(" / "));
|
||||
}
|
||||
if (m->match.role)
|
||||
{
|
||||
eina_strbuf_append(buf, _("Role:"));
|
||||
eina_strbuf_append(buf, m->match.role);
|
||||
eina_strbuf_append(buf, _(" / "));
|
||||
eina_strbuf_append(buf, _("Role:"));
|
||||
eina_strbuf_append(buf, m->match.role);
|
||||
eina_strbuf_append(buf, _(" / "));
|
||||
}
|
||||
if (m->match.shadow_style)
|
||||
{
|
||||
eina_strbuf_append(buf, _("Style:"));
|
||||
eina_strbuf_append(buf, m->match.shadow_style);
|
||||
eina_strbuf_append(buf, _("Style:"));
|
||||
eina_strbuf_append(buf, m->match.shadow_style);
|
||||
}
|
||||
|
||||
if (!eina_strbuf_length_get(buf))
|
||||
|
@ -516,7 +534,10 @@ _match_label_get(Match_Config *m)
|
|||
}
|
||||
|
||||
static void
|
||||
_match_ilist_append(Evas_Object *il, Match_Config *m, int pos, int pre)
|
||||
_match_ilist_append(Evas_Object *il,
|
||||
Match_Config *m,
|
||||
int pos,
|
||||
int pre)
|
||||
{
|
||||
char *name = _match_label_get(m);
|
||||
|
||||
|
@ -533,7 +554,8 @@ _match_ilist_append(Evas_Object *il, Match_Config *m, int pos, int pre)
|
|||
}
|
||||
|
||||
static void
|
||||
_match_list_up(Eina_List **list, Match_Config *m)
|
||||
_match_list_up(Eina_List **list,
|
||||
Match_Config *m)
|
||||
{
|
||||
Eina_List *l, *lp;
|
||||
|
||||
|
@ -546,7 +568,8 @@ _match_list_up(Eina_List **list, Match_Config *m)
|
|||
}
|
||||
|
||||
static void
|
||||
_match_list_down(Eina_List **list, Match_Config *m)
|
||||
_match_list_down(Eina_List **list,
|
||||
Match_Config *m)
|
||||
{
|
||||
Eina_List *l, *lp;
|
||||
|
||||
|
@ -559,7 +582,8 @@ _match_list_down(Eina_List **list, Match_Config *m)
|
|||
}
|
||||
|
||||
static void
|
||||
_match_list_del(Eina_List **list, Match_Config *m)
|
||||
_match_list_del(Eina_List **list,
|
||||
Match_Config *m)
|
||||
{
|
||||
Eina_List *l, *lp;
|
||||
|
||||
|
@ -571,7 +595,10 @@ _match_list_del(Eina_List **list, Match_Config *m)
|
|||
}
|
||||
|
||||
static void
|
||||
_cb_dialog_resize(void *data, Evas *e __UNUSED__, Evas_Object *obj, void *event_info __UNUSED__)
|
||||
_cb_dialog_resize(void *data,
|
||||
Evas *e __UNUSED__,
|
||||
Evas_Object *obj,
|
||||
void *event_info __UNUSED__)
|
||||
{
|
||||
Evas_Object *bg, *of;
|
||||
int x, y, w, h;
|
||||
|
@ -587,7 +614,8 @@ _cb_dialog_resize(void *data, Evas *e __UNUSED__, Evas_Object *obj, void *event_
|
|||
}
|
||||
|
||||
static void
|
||||
_edit_ok(void *d1, void *d2)
|
||||
_edit_ok(void *d1,
|
||||
void *d2)
|
||||
{
|
||||
Match_Config *m = d1;
|
||||
Evas_Object *dia, *bg, *of = d2;
|
||||
|
@ -650,7 +678,10 @@ _edit_ok(void *d1, void *d2)
|
|||
}
|
||||
|
||||
static void
|
||||
_create_edit_frame(E_Config_Dialog *cfd, Evas *evas, E_Config_Dialog_Data *cfdata, Match_Config *m)
|
||||
_create_edit_frame(E_Config_Dialog *cfd,
|
||||
Evas *evas,
|
||||
E_Config_Dialog_Data *cfdata,
|
||||
Match_Config *m)
|
||||
{
|
||||
Evas_Object *of, *oi, *lb, *en, *bt, *tb, *tab2, *o, *sf, *li;
|
||||
E_Radio_Group *rg;
|
||||
|
@ -902,7 +933,8 @@ _create_edit_frame(E_Config_Dialog *cfd, Evas *evas, E_Config_Dialog_Data *cfdat
|
|||
}
|
||||
|
||||
static void
|
||||
_but_up(void *d1, void *d2)
|
||||
_but_up(void *d1,
|
||||
void *d2)
|
||||
{
|
||||
E_Config_Dialog *cfd = d1;
|
||||
Evas_Object *il = d2;
|
||||
|
@ -915,8 +947,8 @@ _but_up(void *d1, void *d2)
|
|||
m = e_widget_ilist_nth_data_get(il, n);
|
||||
if (!m)
|
||||
{
|
||||
e_widget_ilist_thaw(il);
|
||||
return;
|
||||
e_widget_ilist_thaw(il);
|
||||
return;
|
||||
}
|
||||
e_widget_ilist_remove_num(il, n);
|
||||
n--;
|
||||
|
@ -933,7 +965,8 @@ _but_up(void *d1, void *d2)
|
|||
}
|
||||
|
||||
static void
|
||||
_but_down(void *d1, void *d2)
|
||||
_but_down(void *d1,
|
||||
void *d2)
|
||||
{
|
||||
E_Config_Dialog *cfd = d1;
|
||||
Evas_Object *il = d2;
|
||||
|
@ -946,8 +979,8 @@ _but_down(void *d1, void *d2)
|
|||
m = e_widget_ilist_nth_data_get(il, n);
|
||||
if (!m)
|
||||
{
|
||||
e_widget_ilist_thaw(il);
|
||||
return;
|
||||
e_widget_ilist_thaw(il);
|
||||
return;
|
||||
}
|
||||
e_widget_ilist_remove_num(il, n);
|
||||
_match_ilist_append(il, m, n, 0);
|
||||
|
@ -963,7 +996,8 @@ _but_down(void *d1, void *d2)
|
|||
}
|
||||
|
||||
static void
|
||||
_but_add(void *d1, void *d2)
|
||||
_but_add(void *d1,
|
||||
void *d2)
|
||||
{
|
||||
E_Config_Dialog *cfd = d1;
|
||||
Evas_Object *il = d2;
|
||||
|
@ -991,8 +1025,8 @@ _but_add(void *d1, void *d2)
|
|||
e_widget_ilist_thaw(il);
|
||||
e_widget_ilist_go(il);
|
||||
n = e_widget_ilist_count(il);
|
||||
e_widget_ilist_nth_show(il, n-1, 0);
|
||||
e_widget_ilist_selected_set(il, n-1);
|
||||
e_widget_ilist_nth_show(il, n - 1, 0);
|
||||
e_widget_ilist_selected_set(il, n - 1);
|
||||
|
||||
cfd->cfdata->edit_il = il;
|
||||
_create_edit_frame(cfd, evas_object_evas_get(il), cfd->cfdata, m);
|
||||
|
@ -1000,7 +1034,8 @@ _but_add(void *d1, void *d2)
|
|||
}
|
||||
|
||||
static void
|
||||
_but_del(void *d1, void *d2)
|
||||
_but_del(void *d1,
|
||||
void *d2)
|
||||
{
|
||||
E_Config_Dialog *cfd = d1;
|
||||
Evas_Object *il = d2;
|
||||
|
@ -1012,8 +1047,8 @@ _but_del(void *d1, void *d2)
|
|||
m = e_widget_ilist_nth_data_get(il, n);
|
||||
if (!m)
|
||||
{
|
||||
e_widget_ilist_thaw(il);
|
||||
return;
|
||||
e_widget_ilist_thaw(il);
|
||||
return;
|
||||
}
|
||||
e_widget_ilist_remove_num(il, n);
|
||||
e_widget_ilist_thaw(il);
|
||||
|
@ -1026,7 +1061,8 @@ _but_del(void *d1, void *d2)
|
|||
}
|
||||
|
||||
static void
|
||||
_but_edit(void *d1, void *d2)
|
||||
_but_edit(void *d1,
|
||||
void *d2)
|
||||
{
|
||||
E_Config_Dialog *cfd = d1;
|
||||
Evas_Object *il = d2;
|
||||
|
@ -1043,7 +1079,11 @@ _but_edit(void *d1, void *d2)
|
|||
}
|
||||
|
||||
static Evas_Object *
|
||||
_create_match_editor(E_Config_Dialog *cfd, Evas *evas, E_Config_Dialog_Data *cfdata __UNUSED__, Eina_List **matches, Evas_Object **il_ret)
|
||||
_create_match_editor(E_Config_Dialog *cfd,
|
||||
Evas *evas,
|
||||
E_Config_Dialog_Data *cfdata __UNUSED__,
|
||||
Eina_List **matches,
|
||||
Evas_Object **il_ret)
|
||||
{
|
||||
Evas_Object *tab, *il, *bt;
|
||||
Match_Config *m;
|
||||
|
@ -1079,7 +1119,9 @@ _create_match_editor(E_Config_Dialog *cfd, Evas *evas, E_Config_Dialog_Data *cfd
|
|||
}
|
||||
|
||||
static Evas_Object *
|
||||
_create_styles_toolbook(E_Config_Dialog *cfd, Evas *evas, E_Config_Dialog_Data *cfdata)
|
||||
_create_styles_toolbook(E_Config_Dialog *cfd,
|
||||
Evas *evas,
|
||||
E_Config_Dialog_Data *cfdata)
|
||||
{
|
||||
Evas_Object *tb, *oi, *il;
|
||||
|
||||
|
@ -1110,7 +1152,9 @@ _create_styles_toolbook(E_Config_Dialog *cfd, Evas *evas, E_Config_Dialog_Data *
|
|||
}
|
||||
|
||||
static Evas_Object *
|
||||
_basic_create_widgets(E_Config_Dialog *cfd, Evas *evas, E_Config_Dialog_Data *cfdata)
|
||||
_basic_create_widgets(E_Config_Dialog *cfd,
|
||||
Evas *evas,
|
||||
E_Config_Dialog_Data *cfdata)
|
||||
{
|
||||
Evas_Object *ob, *ol, *ol2, *of, *otb, *oi, *orec0, *tab;
|
||||
E_Radio_Group *rg;
|
||||
|
@ -1307,7 +1351,8 @@ _match_list_free(Eina_List *list)
|
|||
}
|
||||
|
||||
static void
|
||||
_match_dup2(Match_Config *m2, Match *m)
|
||||
_match_dup2(Match_Config *m2,
|
||||
Match *m)
|
||||
{
|
||||
*m = m2->match;
|
||||
if (m->title) m->title = eina_stringshare_add(m->title);
|
||||
|
@ -1318,7 +1363,8 @@ _match_dup2(Match_Config *m2, Match *m)
|
|||
}
|
||||
|
||||
static int
|
||||
_basic_apply_data(E_Config_Dialog *cfd __UNUSED__, E_Config_Dialog_Data *cfdata)
|
||||
_basic_apply_data(E_Config_Dialog *cfd __UNUSED__,
|
||||
E_Config_Dialog_Data *cfdata)
|
||||
{
|
||||
if ((cfdata->use_shadow != _comp_mod->conf->use_shadow) ||
|
||||
(cfdata->lock_fps != _comp_mod->conf->lock_fps) ||
|
||||
|
@ -1391,7 +1437,7 @@ _basic_apply_data(E_Config_Dialog *cfd __UNUSED__, E_Config_Dialog_Data *cfdata)
|
|||
_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->max_unmapped_pixels = cfdata->max_unmapped_pixels;
|
||||
_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;
|
||||
|
@ -1399,7 +1445,7 @@ _basic_apply_data(E_Config_Dialog *cfd __UNUSED__, E_Config_Dialog_Data *cfdata)
|
|||
_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;
|
||||
_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;
|
||||
|
@ -1431,3 +1477,4 @@ _basic_apply_data(E_Config_Dialog *cfd __UNUSED__, E_Config_Dialog_Data *cfdata)
|
|||
e_config_save_queue();
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
|
|
@ -2,6 +2,7 @@
|
|||
#else
|
||||
#ifndef E_MOD_CONFIG_H
|
||||
#define E_MOD_CONFIG_H
|
||||
E_Config_Dialog *e_int_config_comp_module(E_Container *con, const char *params __UNUSED__);
|
||||
E_Config_Dialog *e_int_config_comp_module(E_Container *con,
|
||||
const char *params __UNUSED__);
|
||||
#endif
|
||||
#endif
|
||||
|
|
|
@ -91,10 +91,10 @@ e_modapi_init(E_Module *m)
|
|||
E_CONFIG_VAL(D, T, nocomp_fs, UCHAR);
|
||||
E_CONFIG_VAL(D, T, smooth_windows, UCHAR);
|
||||
E_CONFIG_VAL(D, T, first_draw_delay, DOUBLE);
|
||||
E_CONFIG_LIST(D, T, match.popups, mod->conf_match_edd);
|
||||
E_CONFIG_LIST(D, T, match.borders, mod->conf_match_edd);
|
||||
E_CONFIG_LIST(D, T, match.popups, mod->conf_match_edd);
|
||||
E_CONFIG_LIST(D, T, match.borders, mod->conf_match_edd);
|
||||
E_CONFIG_LIST(D, T, match.overrides, mod->conf_match_edd);
|
||||
E_CONFIG_LIST(D, T, match.menus, mod->conf_match_edd);
|
||||
E_CONFIG_LIST(D, T, match.menus, mod->conf_match_edd);
|
||||
|
||||
mod->conf = e_config_domain_load("module.comp", mod->conf_edd);
|
||||
if (!mod->conf) _e_mod_config_new(m);
|
||||
|
@ -130,7 +130,7 @@ _e_mod_config_new(E_Module *m)
|
|||
mod->conf->shadow_file = NULL;
|
||||
mod->conf->shadow_style = eina_stringshare_add("default");
|
||||
mod->conf->engine = E_EVAS_ENGINE_SOFTWARE_X11;
|
||||
mod->conf->max_unmapped_pixels = 32 * 1024; // implement
|
||||
mod->conf->max_unmapped_pixels = 32 * 1024; // implement
|
||||
mod->conf->max_unmapped_time = 10 * 3600; // implement
|
||||
mod->conf->min_unmapped_time = 5 * 60; // implement
|
||||
mod->conf->fps_average_range = 30;
|
||||
|
@ -265,3 +265,4 @@ e_modapi_save(E_Module *m)
|
|||
e_config_domain_save("module.comp", mod->conf_edd, mod->conf);
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
|
|
@ -1,42 +1,43 @@
|
|||
#ifndef E_MOD_MAIN_H
|
||||
#define E_MOD_MAIN_H
|
||||
|
||||
typedef struct _Config Config;
|
||||
typedef struct _Mod Mod;
|
||||
typedef struct _Config Config;
|
||||
typedef struct _Mod Mod;
|
||||
|
||||
typedef struct _Match Match;
|
||||
typedef struct _Match Match;
|
||||
|
||||
struct _Config
|
||||
{
|
||||
const char *shadow_file;
|
||||
const char *shadow_style;
|
||||
int engine;
|
||||
int max_unmapped_pixels;
|
||||
int max_unmapped_time;
|
||||
int min_unmapped_time;
|
||||
int fps_average_range;
|
||||
unsigned char fps_corner;
|
||||
unsigned char fps_show;
|
||||
unsigned char use_shadow;
|
||||
unsigned char indirect;
|
||||
unsigned char texture_from_pixmap;
|
||||
unsigned char lock_fps;
|
||||
unsigned char loose_sync;
|
||||
unsigned char efl_sync;
|
||||
unsigned char grab;
|
||||
unsigned char vsync;
|
||||
unsigned char keep_unmapped;
|
||||
unsigned char send_flush;
|
||||
unsigned char send_dump;
|
||||
unsigned char nocomp_fs;
|
||||
unsigned char smooth_windows;
|
||||
double first_draw_delay;
|
||||
const char *shadow_file;
|
||||
const char *shadow_style;
|
||||
int engine;
|
||||
int max_unmapped_pixels;
|
||||
int max_unmapped_time;
|
||||
int min_unmapped_time;
|
||||
int fps_average_range;
|
||||
unsigned char fps_corner;
|
||||
unsigned char fps_show;
|
||||
unsigned char use_shadow;
|
||||
unsigned char indirect;
|
||||
unsigned char texture_from_pixmap;
|
||||
unsigned char lock_fps;
|
||||
unsigned char loose_sync;
|
||||
unsigned char efl_sync;
|
||||
unsigned char grab;
|
||||
unsigned char vsync;
|
||||
unsigned char keep_unmapped;
|
||||
unsigned char send_flush;
|
||||
unsigned char send_dump;
|
||||
unsigned char nocomp_fs;
|
||||
unsigned char smooth_windows;
|
||||
double first_draw_delay;
|
||||
|
||||
struct {
|
||||
Eina_List *popups; // used for e popups
|
||||
Eina_List *borders; // used for borders
|
||||
Eina_List *overrides; // used for client menus, tooltips etc.
|
||||
Eina_List *menus; // used for e menus
|
||||
struct
|
||||
{
|
||||
Eina_List *popups; // used for e popups
|
||||
Eina_List *borders; // used for borders
|
||||
Eina_List *overrides; // used for client menus, tooltips etc.
|
||||
Eina_List *menus; // used for e menus
|
||||
} match;
|
||||
};
|
||||
|
||||
|
@ -69,19 +70,18 @@ struct _Match
|
|||
char argb; // used for borders, overrides, popups, menus, 0 == don't use, 1 == is argb, -1 == not argb
|
||||
char fullscreen; // used for borders, 0 == don't use, 1 == is fullscreen, -1 == not fullscreen
|
||||
char modal; // used for borders, 0 == don't use, 1 == is modal, -1 == not modal
|
||||
|
||||
};
|
||||
|
||||
extern Mod *_comp_mod;
|
||||
|
||||
EAPI extern E_Module_Api e_modapi;
|
||||
|
||||
EAPI void *e_modapi_init (E_Module *m);
|
||||
EAPI int e_modapi_shutdown (E_Module *m);
|
||||
EAPI int e_modapi_save (E_Module *m);
|
||||
EAPI int e_modapi_info (E_Module *m);
|
||||
EAPI void *e_modapi_init(E_Module *m);
|
||||
EAPI int e_modapi_shutdown(E_Module *m);
|
||||
EAPI int e_modapi_save(E_Module *m);
|
||||
EAPI int e_modapi_info(E_Module *m);
|
||||
|
||||
void _e_mod_config_new(E_Module *m);
|
||||
void _e_mod_config_free(E_Module *m);
|
||||
void _e_mod_config_new(E_Module *m);
|
||||
void _e_mod_config_free(E_Module *m);
|
||||
|
||||
#endif
|
||||
|
|
Loading…
Reference in New Issue