theme Matrix with 2 layers
authorTanya <tanya@bookdmitri.oblgaz>
Sun, 18 Apr 2010 21:31:26 +0000 (00:31 +0300)
committerTanya <tanya@bookdmitri.oblgaz>
Sun, 18 Apr 2010 21:31:26 +0000 (00:31 +0300)
12 files changed:
applet/data/theme/Matrix/11.png [deleted file]
applet/data/theme/Matrix/111.png [deleted file]
applet/data/theme/Matrix/22.png [deleted file]
applet/data/theme/Matrix/33.png [deleted file]
applet/data/theme/Matrix/bg.png [new file with mode: 0644]
applet/data/theme/Matrix/layer1_0.png [new file with mode: 0644]
applet/data/theme/Matrix/layer1_1.png [new file with mode: 0644]
applet/data/theme/Matrix/layer2_0.png [new file with mode: 0644]
applet/data/theme/Matrix/layer2_1.png [new file with mode: 0644]
applet/data/theme/Matrix/symbols.png [new file with mode: 0644]
applet/src/livewp-home-widget.c
applet/src/livewp-home-widget.h

diff --git a/applet/data/theme/Matrix/11.png b/applet/data/theme/Matrix/11.png
deleted file mode 100644 (file)
index 1967d0e..0000000
Binary files a/applet/data/theme/Matrix/11.png and /dev/null differ
diff --git a/applet/data/theme/Matrix/111.png b/applet/data/theme/Matrix/111.png
deleted file mode 100644 (file)
index 1967d0e..0000000
Binary files a/applet/data/theme/Matrix/111.png and /dev/null differ
diff --git a/applet/data/theme/Matrix/22.png b/applet/data/theme/Matrix/22.png
deleted file mode 100644 (file)
index 0fdb880..0000000
Binary files a/applet/data/theme/Matrix/22.png and /dev/null differ
diff --git a/applet/data/theme/Matrix/33.png b/applet/data/theme/Matrix/33.png
deleted file mode 100644 (file)
index f305da9..0000000
Binary files a/applet/data/theme/Matrix/33.png and /dev/null differ
diff --git a/applet/data/theme/Matrix/bg.png b/applet/data/theme/Matrix/bg.png
new file mode 100644 (file)
index 0000000..4eab16c
Binary files /dev/null and b/applet/data/theme/Matrix/bg.png differ
diff --git a/applet/data/theme/Matrix/layer1_0.png b/applet/data/theme/Matrix/layer1_0.png
new file mode 100644 (file)
index 0000000..1967d0e
Binary files /dev/null and b/applet/data/theme/Matrix/layer1_0.png differ
diff --git a/applet/data/theme/Matrix/layer1_1.png b/applet/data/theme/Matrix/layer1_1.png
new file mode 100644 (file)
index 0000000..1967d0e
Binary files /dev/null and b/applet/data/theme/Matrix/layer1_1.png differ
diff --git a/applet/data/theme/Matrix/layer2_0.png b/applet/data/theme/Matrix/layer2_0.png
new file mode 100644 (file)
index 0000000..9bc3315
Binary files /dev/null and b/applet/data/theme/Matrix/layer2_0.png differ
diff --git a/applet/data/theme/Matrix/layer2_1.png b/applet/data/theme/Matrix/layer2_1.png
new file mode 100644 (file)
index 0000000..9bc3315
Binary files /dev/null and b/applet/data/theme/Matrix/layer2_1.png differ
diff --git a/applet/data/theme/Matrix/symbols.png b/applet/data/theme/Matrix/symbols.png
new file mode 100644 (file)
index 0000000..0fdb880
Binary files /dev/null and b/applet/data/theme/Matrix/symbols.png differ
index 3cde353..9073a68 100644 (file)
@@ -704,6 +704,17 @@ change_layer1(Actor * actor, AWallpaperPlugin *desktop_plugin)
     actor->y = y;
 }
 
+void
+change_layer2(Actor * actor, AWallpaperPlugin *desktop_plugin)
+{
+    gint y;
+    y = actor->y + 30;
+    if (y >= 480) y = -480;
+    //fprintf(stderr, "!! %s - %d\n", actor->name, y);
+    actor_set_position_full(actor->widget, actor->x, y, actor->z);
+    actor->y = y;
+}
+
 /*
 static gint 
 get_time(gint t){
@@ -741,8 +752,8 @@ reload_scene(AWallpaperPlugin *desktop_plugin)
         init_scene(desktop_plugin);
     else if (!strcmp(desktop_plugin->priv->theme,"Berlin")) 
         init_scene1(desktop_plugin);
-    else if (!strcmp(desktop_plugin->priv->theme,"Modern")) 
-        init_scene1(desktop_plugin);
+    else if (!strcmp(desktop_plugin->priv->theme,"Matrix")) 
+        init_scene2(desktop_plugin);
 
 }
 
@@ -761,28 +772,47 @@ init_scene2(AWallpaperPlugin *desktop_plugin)
   scene.seed = time(NULL);
 
   
-
-  actor = init_object(desktop_plugin, "background", "33.png", 0, 0, 5, 800, 480, 
+  actor = init_object(desktop_plugin, "background", "bg.png", 
+                      0, 0, 5, 800, 480, 
                       TRUE, 100, 255, NULL, NULL);
   scene.actors = g_slist_append(scene.actors, actor);
 
-  actor = init_object(desktop_plugin, "layer1", "11.png", 0, -480, 6, 800, 1920, 
+  actor = init_object(desktop_plugin, "layer1", "layer1_0.png", 
+                      0, -480, 6, 800, 1920, 
                       TRUE, 100, 255, (gpointer)&change_layer1, NULL);
   actor->time_start_animation = now;
   actor->duration_animation = G_MAXINT;
   scene.actors = g_slist_append(scene.actors, actor);
 
-  actor = init_object(desktop_plugin, "layer2", "111.png", 0, -480 - 480, 6, 800, 1920, 
+  actor = init_object(desktop_plugin, "layer1", "layer1_1.png", 
+                      0, (-480 - 480), 6, 800, 1920, 
                       TRUE, 100, 255, (gpointer)&change_layer1, NULL);
   actor->time_start_animation = now;
   actor->duration_animation = G_MAXINT;
   scene.actors = g_slist_append(scene.actors, actor);
 
-  actor = init_object(desktop_plugin, "symbols", "22.png", 0, 0, 7, 800, 480, 
+  actor = init_object(desktop_plugin, "layer2", "layer2_0.png", 
+                      0, -480, 7, 800, 2640, 
+                      TRUE, 100, 255, (gpointer)&change_layer2, NULL);
+  actor->time_start_animation = now;
+  actor->duration_animation = G_MAXINT;
+  scene.actors = g_slist_append(scene.actors, actor);
+
+  actor = init_object(desktop_plugin, "layer2", "layer2_1.png", 
+                      0, -480 - 480, 7, 800, 2640, 
+                      TRUE, 100, 255, (gpointer)&change_layer2, NULL);
+  actor->time_start_animation = now;
+  actor->duration_animation = G_MAXINT;
+  scene.actors = g_slist_append(scene.actors, actor);
+
+
+  actor = init_object(desktop_plugin, "symbols", "symbols.png", 
+                      0, 0, 8, 800, 480, 
                       TRUE, 100, 255, NULL, NULL);
   scene.actors = g_slist_append(scene.actors, actor);
   
 
+
     run_long_timeout(desktop_plugin);
 }
 /* Init Modern Scene */
index fd3b159..cbe14a5 100644 (file)
@@ -76,6 +76,7 @@ gint read_config(Animation_WallpaperPrivate *priv);
 void save_config(Animation_WallpaperPrivate *priv);
 static void init_scene(AWallpaperPlugin *desktop_plugin);
 static void init_scene1(AWallpaperPlugin *desktop_plugin);
+static void init_scene2(AWallpaperPlugin *desktop_plugin);
 void create_hildon_actor(Actor *actor, AWallpaperPlugin *desktop_plugin);
 void get_sun_screen_pos(double alt, double azm, gint * x, gint * y);