Merge branch 'master' into accel
[livewp] / applet / src / livewp-scene.c
index 7cf01f6..887e47c 100644 (file)
@@ -59,6 +59,89 @@ reload_scene(AWallpaperPlugin *desktop_plugin)
     init_scene_theme(desktop_plugin);
 }
 
+
+void 
+init_scene_Accel(AWallpaperPlugin *desktop_plugin)
+{
+    Actor *actor;
+    Scene *scene;
+    GPtrArray *child;
+    gint now = time(NULL);
+    gchar *str;
+    gint sizes[4] = {170, 229, 130, 150}, 
+        heights[4] = {0, 100, 200, 300}, 
+        n, i;
+    
+    scene = g_new0(Scene, 1);
+    scene->actors = NULL;
+    desktop_plugin->priv->scene = scene;
+    
+    actor = init_object(desktop_plugin, "background", "bg.png", 
+                      0, 0, 5, 800, 480, 
+                      TRUE, TRUE, 100, 255, 
+                      NULL, NULL, NULL);
+    scene->actors = g_slist_append(scene->actors, actor);
+
+    child = g_ptr_array_sized_new(12);
+    for (n=0; n<4; n++){
+        for (i=0; i<3; i++){
+            str = g_strdup_printf("tape%i_%i.png", n+1, i);
+            actor = init_object(desktop_plugin, "tape", str,
+                                700*i, heights[n], 5, 700, sizes[n],
+                                TRUE, TRUE, 100, 255,
+                                NULL, NULL, NULL);
+            scene->actors = g_slist_append(scene->actors, actor);
+            g_ptr_array_add(child, actor);
+            g_free(str);
+        }
+    }
+#if 0
+    actor = init_object(desktop_plugin, "tape1_1", "tape1_1.png",
+                        700, 0, 5, 700, 170,
+                        TRUE, TRUE, 100, 255,
+                        NULL, NULL, NULL);
+    scene->actors = g_slist_append(scene->actors, actor);
+    g_ptr_array_add(child, actor);
+    
+    actor = init_object(desktop_plugin, "tape1_2", "tape1_2.png",
+                        1400, 0, 5, 700, 170,
+                        TRUE, TRUE, 100, 255,
+                        NULL, NULL, NULL);
+    scene->actors = g_slist_append(scene->actors, actor);
+    g_ptr_array_add(child, actor);
+
+    actor = init_object(desktop_plugin, "tape2_0", "tape2_0.png",
+                        0, 220, 5, 700, 229,
+                        TRUE, TRUE, 100, 255,
+                        NULL, NULL, NULL);
+    scene->actors = g_slist_append(scene->actors, actor);
+    g_ptr_array_add(child, actor);
+
+    actor = init_object(desktop_plugin, "tape2_1", "tape2_1.png",
+                        700, 220, 5, 700, 229,
+                        TRUE, TRUE, 100, 255,
+                        NULL, NULL, NULL);
+    scene->actors = g_slist_append(scene->actors, actor);
+    g_ptr_array_add(child, actor);
+    
+    actor = init_object(desktop_plugin, "tape2_2", "tape2_2.png",
+                        1400, 220, 5, 700, 229,
+                        TRUE, TRUE, 100, 255,
+                        NULL, NULL, NULL);
+    scene->actors = g_slist_append(scene->actors, actor);
+    g_ptr_array_add(child, actor);
+#endif
+    actor = init_object(desktop_plugin, "tape", "", 
+                      0, 800, 5, 800, 170, 
+                      FALSE, FALSE, 100, 255, 
+                      (gpointer)&change_tape, NULL, child);
+    actor->time_start_animation = now;
+    actor->duration_animation = G_MAXINT;
+    scene->actors = g_slist_append(scene->actors, actor);
+
+    run_long_timeout(desktop_plugin);
+}
+
 void
 init_scene_Matrix(AWallpaperPlugin *desktop_plugin)
 {