void
change_layer(Actor * actor, AWallpaperPlugin *desktop_plugin)
{
- gint y;
+ gint y, speed1 = 8, speed2 = 16;
Actor *a;
if (!desktop_plugin->priv->rich_animation) return;
a = g_ptr_array_index(actor->child, 0);
- y = a->y + 10;
+ y = a->y + speed1;
if (y > 480) y = -480;
set_actor_position(a, a->x, y, a->z, desktop_plugin);
a->y = y;
a = g_ptr_array_index(actor->child, 1);
- y = a->y + 10;
+ y = a->y + speed1;
if (y > 480) y = -480;
set_actor_position(a, a->x, y, a->z, desktop_plugin);
a->y = y;
a = g_ptr_array_index(actor->child, 2);
- y = a->y + 20;
+ y = a->y + speed2;
if (y > 480) y = -480;
set_actor_position(a, a->x, y, a->z, desktop_plugin);
a->y = y;
a = g_ptr_array_index(actor->child, 3);
- y = a->y + 20;
+ y = a->y + speed2;
if (y > 480) y = -480;
set_actor_position(a, a->x, y, a->z, desktop_plugin);
a->y = y;
gint xapplet;
gint yapplet;
Scene *scene;
+ GHashTable * hash_scene_func;
};
struct _AWallpaperPlugin
priv->short_timer = 0;
priv->xapplet = 0;
priv->yapplet = 0;
+//#if 0
+ priv->hash_scene_func = g_hash_table_new(g_str_hash, g_str_equal);
+
+ g_hash_table_insert(priv->hash_scene_func, g_strdup("Berlin"), (gpointer)&init_scene_Berlin);
+ g_hash_table_insert(priv->hash_scene_func, g_strdup("Modern"), (gpointer)&init_scene_Modern);
+ g_hash_table_insert(priv->hash_scene_func, g_strdup("Matrix"), (gpointer)&init_scene_Matrix);
+//#endif
//priv->theme = g_strdup("Modern");
desktop_plugin->priv->main_widget = gtk_fixed_new();
priv->scene = NULL;
#if 0
if (!strcmp(priv->theme,"Modern"))
- init_scene(desktop_plugin);
+ init_scene_Modern(desktop_plugin);
else if (!strcmp(priv->theme,"Berlin"))
- init_scene1(desktop_plugin);
+ init_scene_Berlin(desktop_plugin);
else if (!strcmp(priv->theme, "Matrix"))
- init_scene2(desktop_plugin);
+ init_scene_Matrix(desktop_plugin);
#endif
init_scene_theme(desktop_plugin);
destroy_scene(desktop_plugin);
#if 0
if (!strcmp(desktop_plugin->priv->theme,"Modern"))
- init_scene(desktop_plugin);
+ init_scene_Modern(desktop_plugin);
else if (!strcmp(desktop_plugin->priv->theme,"Berlin"))
- init_scene1(desktop_plugin);
+ init_scene_Berlin(desktop_plugin);
else if (!strcmp(desktop_plugin->priv->theme,"Matrix"))
- init_scene2(desktop_plugin);
+ init_scene_Matrix(desktop_plugin);
#endif
init_scene_theme(desktop_plugin);
}
void
-init_scene2(AWallpaperPlugin *desktop_plugin)
+init_scene_Matrix(AWallpaperPlugin *desktop_plugin)
{
Actor *actor;
Scene *scene;
/* Init Modern Scene */
void
-init_scene(AWallpaperPlugin *desktop_plugin)
+init_scene_Modern(AWallpaperPlugin *desktop_plugin)
{
Actor *actor;
Scene *scene;
/* Init Berlin Scene */
void
-init_scene1(AWallpaperPlugin *desktop_plugin)
+init_scene_Berlin(AWallpaperPlugin *desktop_plugin)
{
Actor *actor, *actor1, *actor2;
Scene *scene;
void
init_scene_theme(AWallpaperPlugin *desktop_plugin)
{
- GHashTable * hash;
void (*func)(gpointer);
- hash = g_hash_table_new(g_str_hash, g_str_equal);
-
- g_hash_table_insert(hash, g_strdup("Berlin"), (gpointer)&init_scene1);
- g_hash_table_insert(hash, g_strdup("Modern"), (gpointer)&init_scene);
- g_hash_table_insert(hash, g_strdup("Matrix"), (gpointer)&init_scene2);
-
- func = g_hash_table_lookup(hash, desktop_plugin->priv->theme);
+ func = g_hash_table_lookup(desktop_plugin->priv->hash_scene_func, desktop_plugin->priv->theme);
if (func){
(*func)(desktop_plugin);
}
void destroy_scene(AWallpaperPlugin *desktop_plugin);
void reload_scene(AWallpaperPlugin *desktop_plugin);
-void init_scene2(AWallpaperPlugin *desktop_plugin);
-void init_scene(AWallpaperPlugin *desktop_plugin);
-void init_scene1(AWallpaperPlugin *desktop_plugin);
void run_long_timeout(AWallpaperPlugin *desktop_plugin);
void reload_scene(AWallpaperPlugin *desktop_plugin);
+void init_scene_Modern(AWallpaperPlugin *desktop_plugin);
+void init_scene_Berlin(AWallpaperPlugin *desktop_plugin);
+void init_scene_Matrix(AWallpaperPlugin *desktop_plugin);
void init_scene_theme(AWallpaperPlugin *desktop_plugin);
#endif