static E_Fm2_Mime_Handler *bg_hdl = NULL;
typedef struct _E_Bg_Anim_Params E_Bg_Anim_Params;
-struct _E_Bg_Anim_Params
+struct _E_Bg_Anim_Params
{
E_Zone *zone;
double start_time;
int end_y;
struct {
- Eina_Bool x, y;
+ Eina_Bool x, y;
} freedom;
};
/* externally accessible functions */
-EAPI int
+EAPI int
e_bg_init(void)
{
Eina_List *l = NULL;
E_Config_Desktop_Background *cfbg = NULL;
/* Register mime handler */
- bg_hdl = e_fm2_mime_handler_new(_("Set As Background"),
- "preferences-desktop-wallpaper",
- e_bg_handler_set, NULL,
+ bg_hdl = e_fm2_mime_handler_new(_("Set As Background"),
+ "preferences-desktop-wallpaper",
+ e_bg_handler_set, NULL,
e_bg_handler_test, NULL);
if (bg_hdl) e_fm2_mime_handler_glob_add(bg_hdl, "*.edj");
/* Register files in use */
if (e_config->desktop_default_background)
- e_filereg_register(e_config->desktop_default_background);
+ e_filereg_register(e_config->desktop_default_background);
EINA_LIST_FOREACH(e_config->desktop_backgrounds, l, cfbg)
{
if (!cfbg) continue;
e_filereg_register(cfbg->file);
}
-
+
E_EVENT_BG_UPDATE = ecore_event_type_new();
return 1;
}
-EAPI int
+EAPI int
e_bg_shutdown(void)
{
Eina_List *l = NULL;
E_Config_Desktop_Background *cfbg = NULL;
/* Deregister mime handler */
- if (bg_hdl)
+ if (bg_hdl)
{
e_fm2_mime_handler_glob_del(bg_hdl, "*.edj");
e_fm2_mime_handler_free(bg_hdl);
/* Deregister files in use */
if (e_config->desktop_default_background)
- e_filereg_deregister(e_config->desktop_default_background);
+ e_filereg_deregister(e_config->desktop_default_background);
EINA_LIST_FOREACH(e_config->desktop_backgrounds, l, cfbg)
{
if (bgfile[0] != '/')
{
const char *bf;
-
+
bf = e_path_find(path_backgrounds, bgfile);
if (bf) bgfile = bf;
}
if (bgfile[0] != '/')
{
const char *bf;
-
+
bf = e_path_find(path_backgrounds, bgfile);
if (bf) bgfile = bf;
}
if (bgfile[0] != '/')
{
const char *bf;
-
+
bf = e_path_find(path_backgrounds, bgfile);
if (bf) bgfile = bf;
}
edje_file_collection_list_free(entries);
}
if (!ok)
- bgfile = e_theme_edje_file_get("base/theme/background",
+ bgfile = e_theme_edje_file_get("base/theme/background",
"e/desktop/background");
}
const char *bgfile = "";
const char *trans = "";
E_Desk *desk;
-
+
if (transition == E_BG_TRANSITION_START) trans = e_config->transition_start;
else if (transition == E_BG_TRANSITION_DESK) trans = e_config->transition_desk;
else if (transition == E_BG_TRANSITION_CHANGE) trans = e_config->transition_change;
if (zone->bg_object)
{
const char *pfile = "";
-
+
edje_object_file_get(zone->bg_object, &pfile, NULL);
if ((!e_util_strcmp(pfile, bgfile)) && !e_config->desk_flip_pan_bg) return;
}
-
+
if (transition == E_BG_TRANSITION_NONE)
{
if (zone->bg_object)
else
{
char buf[4096];
-
+
if (zone->bg_object)
{
if (zone->prev_bg_object)
e_bg_zone_slide(zone, x, y);
return;
}
-
+
if (transition != E_BG_TRANSITION_NONE)
{
edje_extern_object_max_size_set(zone->prev_bg_object, 65536, 65536);
Evas_Coord vw, vh, px, py;
int fx, fy;
const void *data;
-
+
desk = e_desk_current_get(zone);
edje_object_size_max_get(zone->bg_object, &w, &h);
maxw = zone->w * zone->desk_x_count;
{
E_Config_Desktop_Background *cfbg;
E_Event_Bg_Update *ev;
-
+
e_bg_del(container, zone, desk_x, desk_y);
cfbg = E_NEW(E_Config_Desktop_Background, 1);
cfbg->container = container;
cfbg->desk_y = desk_y;
cfbg->file = eina_stringshare_add(file);
e_config->desktop_backgrounds = eina_list_append(e_config->desktop_backgrounds, cfbg);
-
+
e_filereg_register(cfbg->file);
ev = E_NEW(E_Event_Bg_Update, 1);
Eina_List *l = NULL;
E_Config_Desktop_Background *cfbg = NULL;
E_Event_Bg_Update *ev;
-
- EINA_LIST_FOREACH(e_config->desktop_backgrounds, l, cfbg)
+
+ EINA_LIST_FOREACH(e_config->desktop_backgrounds, l, cfbg)
{
if (!cfbg) continue;
if ((cfbg->container == container) && (cfbg->zone == zone) &&
}
}
-EAPI void
-e_bg_handler_set(Evas_Object *obj, const char *path, void *data)
+EAPI void
+e_bg_handler_set(Evas_Object *obj, const char *path, void *data)
{
E_Container *con;
E_Zone *zone;
E_Desk *desk;
-
+
if (!path) return;
con = e_container_current_get(e_manager_current_get());
zone = e_zone_current_get(con);
e_config_save_queue();
}
-EAPI int
-e_bg_handler_test(Evas_Object *obj, const char *path, void *data)
+EAPI int
+e_bg_handler_test(Evas_Object *obj, const char *path, void *data)
{
if (!path) return 0;
if (edje_file_group_exists(path, "e/desktop/background")) return 1;
_e_bg_signal(void *data, Evas_Object *obj, const char *emission, const char *source)
{
E_Zone *zone;
-
+
zone = data;
if (zone->prev_bg_object)
{