1 /* vim: set sw=4 ts=4 et: */
3 * This file is part of Live Wallpaper (livewp)
5 * Copyright (C) 2010 Vlad Vasiliev
6 * Copyright (C) 2010 Tanya Makova
9 * This software is free software; you can redistribute it and/or
10 * modify it under the terms of the GNU Lesser General Public License
11 * as published by the Free Software Foundation; either version 2.1 of
12 * the License, or (at your option) any later version.
14 * This software is distributed in the hope that it will be useful, but
15 * WITHOUT ANY WARRANTY; without even the implied warranty of
16 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
17 * Lesser General Public License for more details.
19 * You should have received a copy of the GNU Lesser General Public
20 * License along with this software; if not, write to the Free Software
21 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
24 /*******************************************************************************/
25 #include "livewp-scene.h"
28 destroy_scene(AWallpaperPlugin *desktop_plugin)
30 if (desktop_plugin->priv->scene){
31 GSList * tmp = desktop_plugin->priv->scene->actors;
33 destroy_actor(tmp->data);
34 tmp = g_slist_next(tmp);
38 desktop_plugin->priv->scene->actors = NULL;
39 if (desktop_plugin->priv->scene){
40 g_free(desktop_plugin->priv->scene);
41 desktop_plugin->priv->scene = NULL;
44 if (desktop_plugin->priv->pipeline){
45 gst_element_set_state (desktop_plugin->priv->pipeline, GST_STATE_NULL);
46 gst_object_unref (GST_OBJECT (desktop_plugin->priv->pipeline));
47 desktop_plugin->priv->pipeline = NULL;
49 if (desktop_plugin->priv->podpid > 1){
50 kill (desktop_plugin->priv->podpid, SIGTERM);
51 desktop_plugin->priv->podpid = -1;
54 /*******************************************************************************/
56 reload_scene(AWallpaperPlugin *desktop_plugin)
58 fprintf(stderr,"Reload scene %s\n", desktop_plugin->priv->theme);
59 destroy_scene(desktop_plugin);
60 init_scene_theme(desktop_plugin);
62 /*******************************************************************************/
64 init_scene_Accel(AWallpaperPlugin *desktop_plugin)
69 gint now = time(NULL);
71 gint sizes1[4] = {57, 76, 43, 50},
74 fprintf(stderr, "init scene accel\n");
75 scene = g_new0(Scene, 1);
77 desktop_plugin->priv->scene = scene;
79 actor = init_object(desktop_plugin, "background", "bg.png",
83 scene->actors = g_slist_append(scene->actors, actor);
85 child = g_ptr_array_sized_new(16);
89 str = g_strdup_printf("tape%i.png", n+1);
90 actor = init_object(desktop_plugin, "tape", str,
91 fast_rnd(800), fast_rnd(480), 2+fast_rnd(6), 800, sizes1[n],
94 scene->actors = g_slist_append(scene->actors, actor);
95 g_ptr_array_add(child, actor);
99 actor = init_object(desktop_plugin, "tape", "",
101 FALSE, FALSE, 100, 255,
102 (gpointer)&change_tape, NULL, child);
103 actor->time_start_animation = now;
104 actor->duration_animation = G_MAXINT;
105 scene->actors = g_slist_append(scene->actors, actor);
107 run_long_timeout(desktop_plugin);
109 /*******************************************************************************/
111 parsestring(char *line, char **argv)
113 while (*line != '\0') {
114 while (*line == ' ' || *line == '\n')
115 *line++ = '\0'; /* replace white spaces with 0 */
116 *argv++ = line; /* save the argument position */
117 while (*line != '\0' && *line != ' ' &&
119 line++; /* skip the argument until ... */
121 *argv = '\0'; /* mark the end of argument list */
126 sync_handler(GstBus *bus, GstMessage *message, AWallpaperPlugin *desktop_plugin){
128 if (!desktop_plugin->priv->visible)
129 gst_element_set_state (desktop_plugin->priv->pipeline, GST_STATE_PAUSED);
130 if (GST_MESSAGE_TYPE(message) != GST_MESSAGE_ELEMENT){
131 return (GST_BUS_PASS);
133 if (!gst_structure_has_name(message->structure, "prepare-xwindow-id")){
134 return (GST_BUS_PASS);
136 return (GST_BUS_DROP);
140 /*******************************************************************************/
142 bus_call (GstBus *bus, GstMessage *msg, AWallpaperPlugin *desktop_plugin)
144 switch (GST_MESSAGE_TYPE (msg))
146 case GST_MESSAGE_EOS:
147 if (desktop_plugin->priv->rich_animation){
149 GstClockTime nach = (GstClockTime)(0 * GST_MSECOND);
150 if (!gst_element_seek(desktop_plugin->priv->pipeline, 1.0, GST_FORMAT_TIME,
151 (GstSeekFlags) (GST_SEEK_FLAG_FLUSH | GST_SEEK_FLAG_KEY_UNIT), GST_SEEK_TYPE_SET,
152 nach, GST_SEEK_TYPE_NONE, GST_CLOCK_TIME_NONE))
153 fprintf(stderr,"ERROR in seek\n");
155 gst_element_set_state (desktop_plugin->priv->pipeline, GST_STATE_PLAYING);
158 if (desktop_plugin->priv->pipeline){
159 gst_element_set_state (desktop_plugin->priv->pipeline, GST_STATE_NULL);
160 gst_object_unref (GST_OBJECT (desktop_plugin->priv->pipeline));
164 case GST_MESSAGE_ERROR: break;
170 /*******************************************************************************/
172 init_scene_Xsnow(AWallpaperPlugin *desktop_plugin){
173 fprintf(stderr,"init_scene_Xsnow\n");
174 char* child_argv[128];
175 char *run_string = NULL;
177 fprintf(stderr, "PARAMETR %s\n", desktop_plugin->priv->theme_string_parametr1);
178 run_string = g_strdup_printf("/usr/bin/mplayer -vo x11 -wid %d %s\n", \
179 GDK_WINDOW_XID(desktop_plugin->priv->window->window), desktop_plugin->priv->theme_string_parametr1);
181 if (!desktop_plugin->priv->visible)
183 run_string= g_strdup_printf("/usr/bin/xsnow");
184 parsestring(run_string, child_argv);
186 desktop_plugin->priv->running = TRUE;
187 desktop_plugin->priv->podpid = fork();
188 if (desktop_plugin->priv->podpid == 0){
189 execvp("/usr/bin/xsnow", child_argv);
190 fprintf(stderr,"Problem with new podprocess");
194 /*******************************************************************************/
195 gboolean cb_timeout0(AWallpaperPlugin *desktop_plugin) {
196 GstFormat fmt = GST_FORMAT_TIME;
199 gint len_seconds = 0;
201 if (!desktop_plugin || !desktop_plugin->priv->pipeline)
203 if (desktop_plugin->priv->theme_int_parametr1 == 0){
204 if (!gst_element_seek(GST_PIPELINE (desktop_plugin->priv->pipeline), 1.0, GST_FORMAT_TIME,
205 GST_SEEK_FLAG_FLUSH, GST_SEEK_TYPE_SET,
206 desktop_plugin->priv->theme_int_parametr1 * GST_SECOND,
207 GST_SEEK_TYPE_NONE, GST_CLOCK_TIME_NONE))
208 fprintf(stderr,"Error in seek:\n");
212 if (gst_element_get_state (desktop_plugin->priv->pipeline, NULL, NULL, -1) == GST_STATE_CHANGE_FAILURE)
215 if (!gst_element_seek(GST_PIPELINE (desktop_plugin->priv->pipeline), 1.0, GST_FORMAT_TIME,
216 GST_SEEK_FLAG_FLUSH, GST_SEEK_TYPE_SET,
217 desktop_plugin->priv->theme_int_parametr1 * GST_SECOND,
218 GST_SEEK_TYPE_NONE, GST_CLOCK_TIME_NONE))
219 fprintf(stderr,"Error in seek:\n");
223 /*******************************************************************************/
225 init_scene_Video(AWallpaperPlugin *desktop_plugin)
228 GstElement *videosink;
230 gchar *file_plus_uri;
233 /* fprintf(stderr, "init scene Video \n"); */
234 desktop_plugin->priv->pipeline = gst_pipeline_new("gst-player");
235 bin = gst_element_factory_make ("playbin2", "bin");
236 videosink = gst_element_factory_make ("ximagesink", "videosink");
237 g_object_set (G_OBJECT (bin), "video-sink", videosink, NULL);
238 gst_bin_add (GST_BIN (desktop_plugin->priv->pipeline), bin);
242 bus = gst_pipeline_get_bus (GST_PIPELINE (desktop_plugin->priv->pipeline));
243 gst_bus_add_watch(bus, bus_call, desktop_plugin);
244 gst_object_unref (bus);
246 file_plus_uri = g_strdup_printf("file://%s",desktop_plugin->priv->theme_string_parametr1);
247 g_object_set (G_OBJECT (bin), "uri", file_plus_uri, NULL );
248 g_object_set (G_OBJECT (videosink), "force-aspect-ratio", TRUE, NULL );
250 if (GST_IS_X_OVERLAY (videosink))
251 gst_x_overlay_set_xwindow_id (GST_X_OVERLAY (videosink), GDK_DRAWABLE_XID(desktop_plugin->priv->window->window));
253 if (desktop_plugin->priv->visible){
254 gst_element_set_state (desktop_plugin->priv->pipeline, GST_STATE_PLAYING);
255 g_timeout_add(100, cb_timeout0, desktop_plugin);
258 //gst_element_get_state(deskddtop_plugin->priv->pipeline, NULL, NULL, 100 * GST_MSECOND);
261 /*******************************************************************************/
263 init_scene_Matrix(AWallpaperPlugin *desktop_plugin)
268 gint now = time(NULL);
271 if (desktop_plugin->priv->rich_animation){
279 /* fprintf(stderr, "init scene2 \n"); */
280 scene = g_new0(Scene, 1);
281 //scene.daytime = get_daytime();
282 scene->actors = NULL;
283 desktop_plugin->priv->scene = scene;
285 actor = init_object(desktop_plugin, "background", "bg.png",
287 TRUE, TRUE, 100, 255,
289 scene->actors = g_slist_append(scene->actors, actor);
291 actor = init_object(desktop_plugin, "symbols", "symbols.png",
293 TRUE, TRUE, 100, 255,
295 scene->actors = g_slist_append(scene->actors, actor);
297 child = g_ptr_array_sized_new(4);
298 actor = init_object(desktop_plugin, "layer1", "layer1_2.png",
300 TRUE, TRUE, 100, 255,
302 //actor->time_start_animation = now;
303 //actor->duration_animation = G_MAXINT;
304 scene->actors = g_slist_append(scene->actors, actor);
305 g_ptr_array_add(child, actor);
307 actor = init_object(desktop_plugin, "layer1", "layer1_1.png",
309 TRUE, TRUE, 100, 255,
311 //actor->time_start_animation = now;
312 //actor->duration_animation = G_MAXINT;
313 scene->actors = g_slist_append(scene->actors, actor);
314 g_ptr_array_add(child, actor);
316 actor = init_object(desktop_plugin, "layer2", "layer2_2.png",
318 TRUE, TRUE, 100, 255,
320 //actor->time_start_animation = now;
321 //actor->duration_animation = G_MAXINT;
322 scene->actors = g_slist_append(scene->actors, actor);
323 g_ptr_array_add(child, actor);
325 actor = init_object(desktop_plugin, "layer2", "layer2_1.png",
327 TRUE, TRUE, 100, 255,
329 //actor->time_start_animation = now;
330 //actor->duration_animation = G_MAXINT;
331 scene->actors = g_slist_append(scene->actors, actor);
332 g_ptr_array_add(child, actor);
334 actor = init_object(desktop_plugin, "layers", "",
336 FALSE, FALSE, 100, 255,
337 (gpointer)&change_layer, NULL, child);
338 actor->time_start_animation = now;
339 actor->duration_animation = G_MAXINT;
340 scene->actors = g_slist_append(scene->actors, actor);
342 run_long_timeout(desktop_plugin);
345 /*******************************************************************************/
346 /* Init Modern Scene */
348 init_scene_Modern(AWallpaperPlugin *desktop_plugin)
352 gint now = time(NULL);
357 /* fprintf(stderr, "init scene \n"); */
358 scene = g_new0(Scene, 1);
359 scene->daytime = get_daytime();
360 scene->actors = NULL;
361 scene->wind_orientation = -1;
362 scene->wind_angle = 0.3;
363 /* init value for random */
364 scene->seed = time(NULL);
365 scene->notification = TRUE;
366 desktop_plugin->priv->scene = scene;
367 actor = init_object(desktop_plugin, "sky", "sky0.png",
369 TRUE , TRUE, 100, 255,
370 (gpointer)&change_static_actor, NULL, NULL);
371 scene->actors = g_slist_append(scene->actors, actor);
372 change_static_actor(actor, desktop_plugin);
374 actor = init_object(desktop_plugin, "sun", "sun.png",
376 FALSE, FALSE, 100, 255,
377 (gpointer)&change_sun, NULL, NULL);
378 actor->time_start_animation = now;
379 actor->duration_animation = G_MAXINT;
380 change_sun(actor, desktop_plugin);
381 scene->actors = g_slist_append(scene->actors, actor);
383 //actor = init_object(desktop_plugin, "dot", "dot1.png", 0, 0, 11, 50, 50,
384 // TRUE, 100, 255, NULL, NULL);
385 //scene.actors = g_slist_append(scene.actors, actor);
387 actor = init_object(desktop_plugin, "cloud1", "cloud1.png",
388 0, fast_rnd(300)-97, 7, 150, 97,
389 FALSE, FALSE, 100, 255,
390 (gpointer)&change_cloud, NULL, NULL);
391 actor->time_start_animation = now + fast_rnd(20);
392 actor->duration_animation = 3*60;
393 scene->actors = g_slist_append(scene->actors, actor);
395 actor = init_object(desktop_plugin, "cloud2", "cloud2.png",
396 0, fast_rnd(300)-75, 7, 188, 75,
397 FALSE, FALSE, 100, 255,
398 (gpointer)&change_cloud, NULL, NULL);
399 actor->time_start_animation = now + fast_rnd(40)+10;
400 actor->duration_animation = 3*60;
401 scene->actors = g_slist_append(scene->actors, actor);
403 actor = init_object(desktop_plugin, "cloud4", "cloud4.png",
404 0, fast_rnd(300)-75, 7, 150, 75,
405 FALSE, FALSE, 100, 255,
406 (gpointer)&change_cloud, NULL, NULL);
407 actor->time_start_animation = now + fast_rnd(60) + 20;
408 actor->duration_animation = 5*60;
409 scene->actors = g_slist_append(scene->actors, actor);
412 actor = init_object(desktop_plugin, "town", "town0.png",
414 TRUE, TRUE, 100, 255,
415 (gpointer)&change_static_actor, NULL, NULL);
416 change_static_actor(actor, desktop_plugin);
417 scene->actors = g_slist_append(scene->actors, actor);
419 actor = init_object(desktop_plugin, "stend", "stend0.png",
420 452, 166, 9, 300, 305,
421 TRUE, TRUE, 100, 255,
422 (gpointer)&change_static_actor, NULL, NULL);
423 change_static_actor(actor, desktop_plugin);
424 scene->actors = g_slist_append(scene->actors, actor);
427 child = g_ptr_array_sized_new(4);
428 actor = init_object(desktop_plugin, "call", "call.png",
430 FALSE, TRUE, 100, 255,
432 scene->actors = g_slist_append(scene->actors, actor);
433 g_ptr_array_add(child, actor);
435 actor = init_object(desktop_plugin, "chat", "chat.png",
437 FALSE, TRUE, 100, 255,
439 scene->actors = g_slist_append(scene->actors, actor);
440 g_ptr_array_add(child, actor);
442 actor = init_object(desktop_plugin, "mail", "mail.png",
444 FALSE, TRUE, 100, 255,
446 scene->actors = g_slist_append(scene->actors, actor);
447 g_ptr_array_add(child, actor);
449 actor = init_object(desktop_plugin, "sms", "sms.png",
451 FALSE, TRUE, 100, 255,
453 scene->actors = g_slist_append(scene->actors, actor);
454 g_ptr_array_add(child, actor);
456 actor = init_object(desktop_plugin, "billboard_text", "",
457 470, 174, 9, 300, 108,
458 FALSE, FALSE, 100, 255,
459 (gpointer)&change_billboard, NULL, child);
460 create_hildon_actor_text(actor, desktop_plugin);
461 //actor->time_start_animation = time(NULL) + 20;
462 change_billboard(actor, desktop_plugin);
463 scene->actors = g_slist_append(scene->actors, actor);
465 actor = init_object(desktop_plugin, "tram", "tram.png",
466 -300, 225, 10, 350, 210,
467 FALSE, FALSE, 100, 255,
468 (gpointer)&change_tram, NULL, NULL);
469 actor->time_start_animation = time(NULL) + fast_rnd(10);
470 actor->duration_animation = 60;
471 scene->actors = g_slist_append(scene->actors, actor);
473 actor = init_object(desktop_plugin, "border", "border0.png",
474 0, 480-79, 11, 800, 79,
475 TRUE, TRUE, 100, 255,
476 (gpointer)&change_static_actor_with_corner, NULL, NULL);
477 change_static_actor_with_corner(actor, desktop_plugin);
478 scene->actors = g_slist_append(scene->actors, actor);
480 actor = init_object(desktop_plugin, "moon", "moon1.png",
482 FALSE, FALSE, 100, 255,
483 (gpointer)&change_moon, NULL, NULL);
484 change_moon(actor, desktop_plugin);
485 scene->actors = g_slist_append(scene->actors, actor);
487 actor = init_object(desktop_plugin, "wind", "",
489 FALSE, FALSE, 100, 255,
490 (gpointer)&change_wind, NULL, NULL);
491 change_wind(actor, desktop_plugin);
492 scene->actors = g_slist_append(scene->actors, actor);
494 /* windows in 4-th house */
534 for (i=0; i<13; i++){
535 actor = init_object(desktop_plugin, "window1", "window1.png",
536 winds[i][0], winds[i][1], 8, 8, 10,
537 FALSE, FALSE, 100, 255,
538 (gpointer)&change_window1, NULL, NULL);
539 //change_window1(actor, desktop_plugin);
540 actor->time_start_animation = now + fast_rnd(30);
541 scene->actors = g_slist_append(scene->actors, actor);
545 /* windows in 1-th house */
571 actor = init_object(desktop_plugin, "window2", "window2.png",
572 winds[i][0], winds[i][1], 8, 8, 10,
573 FALSE, FALSE, 100, 255,
574 (gpointer)&change_window1, NULL, NULL);
575 //change_window1(actor, desktop_plugin);
576 actor->time_start_animation = now + fast_rnd(30);
577 scene->actors = g_slist_append(scene->actors, actor);
581 /* windows in 3-th house */
613 for (i=0; i<10; i++){
614 actor = init_object(desktop_plugin, "window3", "window3.png",
615 winds[i][0], winds[i][1], 8, 8, 10,
616 FALSE, FALSE, 100, 255,
617 (gpointer)&change_window1, NULL, NULL);
618 //change_window1(actor, desktop_plugin);
619 actor->time_start_animation = now + fast_rnd(30);
620 scene->actors = g_slist_append(scene->actors, actor);
624 /* windows in 5-th house */
648 actor = init_object(desktop_plugin, "window4", "window4.png",
649 winds[i][0], winds[i][1], 8, 8, 10,
650 FALSE, FALSE, 100, 255,
651 (gpointer)&change_window1, NULL, NULL);
652 //change_window1(actor, desktop_plugin);
653 actor->time_start_animation = now + fast_rnd(30);
654 scene->actors = g_slist_append(scene->actors, actor);
658 /* windows in 6-th house */
679 actor = init_object(desktop_plugin, "window5", "window5.png",
680 winds[i][0], winds[i][1], 8, 8, 10,
681 FALSE, FALSE, 100, 255,
682 (gpointer)&change_window1, NULL, NULL);
683 //change_window1(actor, desktop_plugin);
684 actor->time_start_animation = now + fast_rnd(30);
685 scene->actors = g_slist_append(scene->actors, actor);
688 run_long_timeout(desktop_plugin);
691 anim = g_new0(Animation, 1);
694 anim->func_change = &change_tram;
695 anim->func_time = NULL;
696 anim->timestart = time(NULL);
699 scene.dynamic_actors = g_slist_append(scene.dynamic_actors, anim);
702 /*******************************************************************************/
703 /* Init Berlin Scene */
705 init_scene_Berlin(AWallpaperPlugin *desktop_plugin)
707 Actor *actor, *actor1, *actor2;
709 gint now = time(NULL);
712 GPtrArray *child = NULL;
714 scene = g_new0(Scene, 1);
715 scene->daytime = get_daytime();
716 scene->actors = NULL;
717 scene->wind_orientation = -1;
718 scene->wind_angle = 0.3;
719 /* init value for random */
720 scene->seed = time(NULL);
721 desktop_plugin->priv->scene = scene;
723 actor = init_object(desktop_plugin, "sky", "sky.png", 0, 0, 5, 800, 480,
724 TRUE, TRUE, 100, 255,
725 (gpointer)&change_static_actor, NULL, NULL);
726 change_static_actor(actor, desktop_plugin);
727 scene->actors = g_slist_append(scene->actors, actor);
730 actor = init_object(desktop_plugin, "sun", "sun.png", 0, 0, 6, 88, 88,
731 FALSE, FALSE, 100, 255,
732 (gpointer)&change_sun, NULL, NULL);
733 actor->time_start_animation = time(NULL);
734 actor->duration_animation = G_MAXINT;
735 change_sun(actor, desktop_plugin);
736 scene->actors = g_slist_append(scene->actors, actor);
739 actor = init_object(desktop_plugin, "dot", "dot1.png", 0, 0, 11, 50, 50,
740 TRUE, 100, 255, NULL, NULL);
741 scene.actors = g_slist_append(scene.actors, actor);
744 actor = init_object(desktop_plugin, "moon", "moon1.png", 400, 15, 6, 60, 60,
745 FALSE, FALSE, 100, 255,
746 (gpointer)&change_moon, NULL, NULL);
747 change_moon(actor, desktop_plugin);
748 scene->actors = g_slist_append(scene->actors, actor);
750 actor = init_object(desktop_plugin, "cloud1", "cloud1.png", 0, fast_rnd(300)-97, 7, 150, 97,
751 FALSE, FALSE, 100, 255,
752 (gpointer)&change_cloud, NULL, NULL);
753 actor->time_start_animation = now + fast_rnd(30) + 10;
754 actor->duration_animation = 3*60;
755 scene->actors = g_slist_append(scene->actors, actor);
757 actor = init_object(desktop_plugin, "cloud2", "cloud2.png", 0, fast_rnd(300)-75, 7, 188, 75,
758 FALSE, FALSE, 100, 255,
759 (gpointer)&change_cloud, NULL, NULL);
760 actor->time_start_animation = now + fast_rnd(10);
761 actor->duration_animation = 3*60;
762 scene->actors = g_slist_append(scene->actors, actor);
764 actor = init_object(desktop_plugin, "cloud4", "cloud4.png", 0, fast_rnd(300)-75, 7, 150, 75,
765 FALSE, FALSE, 100, 255,
766 (gpointer)&change_cloud, NULL, NULL);
767 actor->time_start_animation = now + fast_rnd(60) + 20;
768 actor->duration_animation = 5*60;
769 scene->actors = g_slist_append(scene->actors, actor);
772 actor = init_object(desktop_plugin, "plane2", "plane3.png", 0, 45, 8, 160, 50,
773 FALSE, FALSE, 100, 255,
774 (gpointer)&change_plane2, NULL, NULL);
775 actor->time_start_animation = now + fast_rnd(40) + 20;
776 actor->duration_animation = 60;
777 scene->actors = g_slist_append(scene->actors, actor);
779 actor = init_object(desktop_plugin, "plane1", "tu154.png", 620, 233, 9, 300, 116,
780 FALSE, FALSE, 100, 255,
781 (gpointer)&change_plane1, NULL, NULL);
782 actor->time_start_animation = now + fast_rnd(20);
783 actor->duration_animation = 30;
784 scene->actors = g_slist_append(scene->actors, actor);
786 actor = init_object(desktop_plugin, "town", "town.png", 0, 0, 10, 800, 480,
787 TRUE, TRUE, 100, 255,
788 (gpointer)&change_static_actor_with_corner, NULL, NULL);
789 change_static_actor_with_corner(actor, desktop_plugin);
790 scene->actors = g_slist_append(scene->actors, actor);
792 actor = init_object(desktop_plugin, "wind", "", 0, 0, 5, 0, 0,
793 FALSE, FALSE, 100, 255,
794 (gpointer)&change_wind, NULL, NULL);
795 change_wind(actor, desktop_plugin);
796 scene->actors = g_slist_append(scene->actors, actor);
798 actor1 = init_object(desktop_plugin, "signal_red", "red.png",
799 486, 425, 10, 18, 38,
800 FALSE, TRUE, 100, 255, NULL, NULL, NULL);
801 //actor->time_start_animation = now + fast_rnd(30) + 10;
802 scene->actors = g_slist_append(scene->actors, actor1);
804 actor2 = init_object(desktop_plugin, "signal_green", "green.png",
805 486, 425, 10, 18, 38,
806 TRUE, TRUE, 100, 255, NULL, NULL, NULL);
807 //actor->time_start_animation = now + fast_rnd(30) + 10;
808 scene->actors = g_slist_append(scene->actors, actor2);
809 child = g_ptr_array_sized_new(2);
810 g_ptr_array_add(child, actor1);
811 g_ptr_array_add(child, actor2);
812 actor = init_object(desktop_plugin, "signal", "",
813 486, 425, 10, 18, 38,
814 FALSE, FALSE, 100, 255,
815 (gpointer)&change_signal, NULL, child);
816 actor->time_start_animation = now + fast_rnd(30) + 10;
817 scene->actors = g_slist_append(scene->actors, actor);
858 for (i=0; i<13; i++){
859 actor = init_object(desktop_plugin, "window", "window.png",
860 winds[i][0], winds[i][1], 10, 8, 9,
861 FALSE, TRUE, 100, 255,
862 (gpointer)&change_window1, NULL, NULL);
863 //change_window1(actor, desktop_plugin);
864 actor->time_start_animation = now + fast_rnd(30);
865 scene->actors = g_slist_append(scene->actors, actor);
869 run_long_timeout(desktop_plugin);
872 /*******************************************************************************/
874 init_scene_theme(AWallpaperPlugin *desktop_plugin)
876 void (*func)(gpointer);
877 func = g_hash_table_lookup(desktop_plugin->priv->hash_scene_func, desktop_plugin->priv->theme);
879 (*func)(desktop_plugin);