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 sizes[4] = {170, 229, 130, 150},
72 sizes1[4] = {57, 76, 43, 50},
73 heights[4] = {0, 100, 200, 300},
76 fprintf(stderr, "init scene accel\n");
77 scene = g_new0(Scene, 1);
79 desktop_plugin->priv->scene = scene;
81 actor = init_object(desktop_plugin, "background", "bg.png",
85 scene->actors = g_slist_append(scene->actors, actor);
87 child = g_ptr_array_sized_new(16);
91 //for (i=0; i<3; i++){
92 str = g_strdup_printf("tape%i.png", n+1);
93 actor = init_object(desktop_plugin, "tape", str,
94 fast_rnd(800), fast_rnd(480), 2+fast_rnd(6), 800, sizes1[n],
97 scene->actors = g_slist_append(scene->actors, actor);
98 g_ptr_array_add(child, actor);
103 actor = init_object(desktop_plugin, "tape", "",
105 FALSE, FALSE, 100, 255,
106 (gpointer)&change_tape, NULL, child);
107 actor->time_start_animation = now;
108 actor->duration_animation = G_MAXINT;
109 scene->actors = g_slist_append(scene->actors, actor);
111 run_long_timeout(desktop_plugin);
113 /*******************************************************************************/
115 parsestring(char *line, char **argv)
117 while (*line != '\0') {
118 while (*line == ' ' || *line == '\n')
119 *line++ = '\0'; /* replace white spaces with 0 */
120 *argv++ = line; /* save the argument position */
121 while (*line != '\0' && *line != ' ' &&
123 line++; /* skip the argument until ... */
125 *argv = '\0'; /* mark the end of argument list */
130 sync_handler(GstBus *bus, GstMessage *message, AWallpaperPlugin *desktop_plugin){
132 if (!desktop_plugin->priv->visible)
133 gst_element_set_state (desktop_plugin->priv->pipeline, GST_STATE_PAUSED);
134 if (GST_MESSAGE_TYPE(message) != GST_MESSAGE_ELEMENT){
135 return (GST_BUS_PASS);
137 if (!gst_structure_has_name(message->structure, "prepare-xwindow-id")){
138 return (GST_BUS_PASS);
140 return (GST_BUS_DROP);
144 /*******************************************************************************/
146 bus_call (GstBus *bus, GstMessage *msg, AWallpaperPlugin *desktop_plugin)
148 switch (GST_MESSAGE_TYPE (msg))
150 case GST_MESSAGE_EOS:
151 if (desktop_plugin->priv->rich_animation){
153 GstClockTime nach = (GstClockTime)(0 * GST_MSECOND);
154 if (!gst_element_seek(desktop_plugin->priv->pipeline, 1.0, GST_FORMAT_TIME,
155 (GstSeekFlags) (GST_SEEK_FLAG_FLUSH | GST_SEEK_FLAG_KEY_UNIT), GST_SEEK_TYPE_SET,
156 nach, GST_SEEK_TYPE_NONE, GST_CLOCK_TIME_NONE))
157 fprintf(stderr,"ERROR in seek\n");
159 gst_element_set_state (desktop_plugin->priv->pipeline, GST_STATE_PLAYING);
162 if (desktop_plugin->priv->pipeline){
163 gst_element_set_state (desktop_plugin->priv->pipeline, GST_STATE_NULL);
164 gst_object_unref (GST_OBJECT (desktop_plugin->priv->pipeline));
168 case GST_MESSAGE_ERROR: break;
173 /*******************************************************************************/
175 init_scene_Xsnow(AWallpaperPlugin *desktop_plugin){
176 fprintf(stderr,"init_scene_Xsnow\n");
177 char* child_argv[128];
178 char *run_string = NULL;
180 // fprintf(stderr, "PARAMETR %s\n", desktop_plugin->priv->theme_string_parametr1);
181 // run_string = g_strdup_printf("/usr/bin/mplayer -vo x11 -wid %d %s\n", \
182 GDK_WINDOW_XID(desktop_plugin->priv->window->window), desktop_plugin->priv->theme_string_parametr1);
183 if (!desktop_plugin->priv->visible)
185 run_string= g_strdup_printf("/usr/bin/xsnow");
186 parsestring(run_string, child_argv);
188 desktop_plugin->priv->running = TRUE;
189 desktop_plugin->priv->podpid = fork();
190 if (desktop_plugin->priv->podpid == 0){
191 execvp("/usr/bin/xsnow", child_argv);
192 fprintf(stderr,"Problem with new podprocess");
197 init_scene_Video(AWallpaperPlugin *desktop_plugin)
200 GstElement *videosink;
202 gchar *file_plus_uri;
205 fprintf(stderr, "init scene Video \n");
206 desktop_plugin->priv->pipeline = gst_pipeline_new("gst-player");
207 bin = gst_element_factory_make ("playbin2", "bin");
208 videosink = gst_element_factory_make ("ximagesink", "videosink");
209 g_object_set (G_OBJECT (bin), "video-sink", videosink, NULL);
210 gst_bin_add (GST_BIN (desktop_plugin->priv->pipeline), bin);
214 bus = gst_pipeline_get_bus (GST_PIPELINE (desktop_plugin->priv->pipeline));
215 gst_bus_add_watch(bus, bus_call, desktop_plugin);
216 gst_object_unref (bus);
218 file_plus_uri = g_strdup_printf("file://%s",desktop_plugin->priv->theme_string_parametr1);
219 g_object_set (G_OBJECT (bin), "uri", file_plus_uri, NULL );
220 g_object_set (G_OBJECT (videosink), "force-aspect-ratio", TRUE, NULL );
222 if (GST_IS_X_OVERLAY (videosink))
223 gst_x_overlay_set_xwindow_id (GST_X_OVERLAY (videosink), GDK_DRAWABLE_XID(desktop_plugin->priv->window->window));
224 if (desktop_plugin->priv->visible)
225 gst_element_set_state (desktop_plugin->priv->pipeline, GST_STATE_PLAYING);
227 fprintf(stderr," desktop_plugin->priv->theme_int_parametr1 %i\n", desktop_plugin->priv->theme_int_parametr1);
228 GstClockTime nach = (GstClockTime)(desktop_plugin->priv->theme_int_parametr1 * GST_MSECOND);
229 if (!gst_element_seek(desktop_plugin->priv->pipeline, 1.0, GST_FORMAT_TIME,
230 (GstSeekFlags) (GST_SEEK_FLAG_FLUSH | GST_SEEK_FLAG_KEY_UNIT), GST_SEEK_TYPE_SET,
231 nach, GST_SEEK_TYPE_NONE, GST_CLOCK_TIME_NONE))
232 fprintf(stderr,"Error in seek\n");
236 /*******************************************************************************/
238 init_scene_Matrix(AWallpaperPlugin *desktop_plugin)
243 gint now = time(NULL);
246 if (desktop_plugin->priv->rich_animation){
254 /* fprintf(stderr, "init scene2 \n"); */
255 scene = g_new0(Scene, 1);
256 //scene.daytime = get_daytime();
257 scene->actors = NULL;
258 desktop_plugin->priv->scene = scene;
260 actor = init_object(desktop_plugin, "background", "bg.png",
262 TRUE, TRUE, 100, 255,
264 scene->actors = g_slist_append(scene->actors, actor);
266 actor = init_object(desktop_plugin, "symbols", "symbols.png",
268 TRUE, TRUE, 100, 255,
270 scene->actors = g_slist_append(scene->actors, actor);
272 child = g_ptr_array_sized_new(4);
273 actor = init_object(desktop_plugin, "layer1", "layer1_2.png",
275 TRUE, TRUE, 100, 255,
277 //actor->time_start_animation = now;
278 //actor->duration_animation = G_MAXINT;
279 scene->actors = g_slist_append(scene->actors, actor);
280 g_ptr_array_add(child, actor);
282 actor = init_object(desktop_plugin, "layer1", "layer1_1.png",
284 TRUE, TRUE, 100, 255,
286 //actor->time_start_animation = now;
287 //actor->duration_animation = G_MAXINT;
288 scene->actors = g_slist_append(scene->actors, actor);
289 g_ptr_array_add(child, actor);
291 actor = init_object(desktop_plugin, "layer2", "layer2_2.png",
293 TRUE, TRUE, 100, 255,
295 //actor->time_start_animation = now;
296 //actor->duration_animation = G_MAXINT;
297 scene->actors = g_slist_append(scene->actors, actor);
298 g_ptr_array_add(child, actor);
300 actor = init_object(desktop_plugin, "layer2", "layer2_1.png",
302 TRUE, TRUE, 100, 255,
304 //actor->time_start_animation = now;
305 //actor->duration_animation = G_MAXINT;
306 scene->actors = g_slist_append(scene->actors, actor);
307 g_ptr_array_add(child, actor);
309 actor = init_object(desktop_plugin, "layers", "",
311 FALSE, FALSE, 100, 255,
312 (gpointer)&change_layer, NULL, child);
313 actor->time_start_animation = now;
314 actor->duration_animation = G_MAXINT;
315 scene->actors = g_slist_append(scene->actors, actor);
317 run_long_timeout(desktop_plugin);
320 /*******************************************************************************/
321 /* Init Modern Scene */
323 init_scene_Modern(AWallpaperPlugin *desktop_plugin)
327 gint now = time(NULL);
332 /* fprintf(stderr, "init scene \n"); */
333 scene = g_new0(Scene, 1);
334 scene->daytime = get_daytime();
335 scene->actors = NULL;
336 scene->wind_orientation = -1;
337 scene->wind_angle = 0.3;
338 /* init value for random */
339 scene->seed = time(NULL);
340 scene->notification = TRUE;
341 desktop_plugin->priv->scene = scene;
342 actor = init_object(desktop_plugin, "sky", "sky0.png",
344 TRUE , TRUE, 100, 255,
345 (gpointer)&change_static_actor, NULL, NULL);
346 scene->actors = g_slist_append(scene->actors, actor);
347 change_static_actor(actor, desktop_plugin);
349 actor = init_object(desktop_plugin, "sun", "sun.png",
351 FALSE, FALSE, 100, 255,
352 (gpointer)&change_sun, NULL, NULL);
353 actor->time_start_animation = now;
354 actor->duration_animation = G_MAXINT;
355 change_sun(actor, desktop_plugin);
356 scene->actors = g_slist_append(scene->actors, actor);
358 //actor = init_object(desktop_plugin, "dot", "dot1.png", 0, 0, 11, 50, 50,
359 // TRUE, 100, 255, NULL, NULL);
360 //scene.actors = g_slist_append(scene.actors, actor);
362 actor = init_object(desktop_plugin, "cloud1", "cloud1.png",
363 0, fast_rnd(300)-97, 7, 150, 97,
364 FALSE, FALSE, 100, 255,
365 (gpointer)&change_cloud, NULL, NULL);
366 actor->time_start_animation = now + fast_rnd(20);
367 actor->duration_animation = 3*60;
368 scene->actors = g_slist_append(scene->actors, actor);
370 actor = init_object(desktop_plugin, "cloud2", "cloud2.png",
371 0, fast_rnd(300)-75, 7, 188, 75,
372 FALSE, FALSE, 100, 255,
373 (gpointer)&change_cloud, NULL, NULL);
374 actor->time_start_animation = now + fast_rnd(40)+10;
375 actor->duration_animation = 3*60;
376 scene->actors = g_slist_append(scene->actors, actor);
378 actor = init_object(desktop_plugin, "cloud4", "cloud4.png",
379 0, fast_rnd(300)-75, 7, 150, 75,
380 FALSE, FALSE, 100, 255,
381 (gpointer)&change_cloud, NULL, NULL);
382 actor->time_start_animation = now + fast_rnd(60) + 20;
383 actor->duration_animation = 5*60;
384 scene->actors = g_slist_append(scene->actors, actor);
387 actor = init_object(desktop_plugin, "town", "town0.png",
389 TRUE, TRUE, 100, 255,
390 (gpointer)&change_static_actor, NULL, NULL);
391 change_static_actor(actor, desktop_plugin);
392 scene->actors = g_slist_append(scene->actors, actor);
394 actor = init_object(desktop_plugin, "stend", "stend0.png",
395 452, 166, 9, 300, 305,
396 TRUE, TRUE, 100, 255,
397 (gpointer)&change_static_actor, NULL, NULL);
398 change_static_actor(actor, desktop_plugin);
399 scene->actors = g_slist_append(scene->actors, actor);
402 child = g_ptr_array_sized_new(4);
403 actor = init_object(desktop_plugin, "call", "call.png",
405 FALSE, TRUE, 100, 255,
407 scene->actors = g_slist_append(scene->actors, actor);
408 g_ptr_array_add(child, actor);
410 actor = init_object(desktop_plugin, "chat", "chat.png",
412 FALSE, TRUE, 100, 255,
414 scene->actors = g_slist_append(scene->actors, actor);
415 g_ptr_array_add(child, actor);
417 actor = init_object(desktop_plugin, "mail", "mail.png",
419 FALSE, TRUE, 100, 255,
421 scene->actors = g_slist_append(scene->actors, actor);
422 g_ptr_array_add(child, actor);
424 actor = init_object(desktop_plugin, "sms", "sms.png",
426 FALSE, TRUE, 100, 255,
428 scene->actors = g_slist_append(scene->actors, actor);
429 g_ptr_array_add(child, actor);
431 actor = init_object(desktop_plugin, "billboard_text", "",
432 470, 174, 9, 300, 108,
433 FALSE, FALSE, 100, 255,
434 (gpointer)&change_billboard, NULL, child);
435 create_hildon_actor_text(actor, desktop_plugin);
436 //actor->time_start_animation = time(NULL) + 20;
437 change_billboard(actor, desktop_plugin);
438 scene->actors = g_slist_append(scene->actors, actor);
440 actor = init_object(desktop_plugin, "tram", "tram.png",
441 -300, 225, 10, 350, 210,
442 FALSE, FALSE, 100, 255,
443 (gpointer)&change_tram, NULL, NULL);
444 actor->time_start_animation = time(NULL) + fast_rnd(10);
445 actor->duration_animation = 60;
446 scene->actors = g_slist_append(scene->actors, actor);
448 actor = init_object(desktop_plugin, "border", "border0.png",
449 0, 480-79, 11, 800, 79,
450 TRUE, TRUE, 100, 255,
451 (gpointer)&change_static_actor_with_corner, NULL, NULL);
452 change_static_actor_with_corner(actor, desktop_plugin);
453 scene->actors = g_slist_append(scene->actors, actor);
455 actor = init_object(desktop_plugin, "moon", "moon1.png",
457 FALSE, FALSE, 100, 255,
458 (gpointer)&change_moon, NULL, NULL);
459 change_moon(actor, desktop_plugin);
460 scene->actors = g_slist_append(scene->actors, actor);
462 actor = init_object(desktop_plugin, "wind", "",
464 FALSE, FALSE, 100, 255,
465 (gpointer)&change_wind, NULL, NULL);
466 change_wind(actor, desktop_plugin);
467 scene->actors = g_slist_append(scene->actors, actor);
469 /* windows in 4-th house */
509 for (i=0; i<13; i++){
510 actor = init_object(desktop_plugin, "window1", "window1.png",
511 winds[i][0], winds[i][1], 8, 8, 10,
512 FALSE, FALSE, 100, 255,
513 (gpointer)&change_window1, NULL, NULL);
514 //change_window1(actor, desktop_plugin);
515 actor->time_start_animation = now + fast_rnd(30);
516 scene->actors = g_slist_append(scene->actors, actor);
520 /* windows in 1-th house */
546 actor = init_object(desktop_plugin, "window2", "window2.png",
547 winds[i][0], winds[i][1], 8, 8, 10,
548 FALSE, FALSE, 100, 255,
549 (gpointer)&change_window1, NULL, NULL);
550 //change_window1(actor, desktop_plugin);
551 actor->time_start_animation = now + fast_rnd(30);
552 scene->actors = g_slist_append(scene->actors, actor);
556 /* windows in 3-th house */
588 for (i=0; i<10; i++){
589 actor = init_object(desktop_plugin, "window3", "window3.png",
590 winds[i][0], winds[i][1], 8, 8, 10,
591 FALSE, FALSE, 100, 255,
592 (gpointer)&change_window1, NULL, NULL);
593 //change_window1(actor, desktop_plugin);
594 actor->time_start_animation = now + fast_rnd(30);
595 scene->actors = g_slist_append(scene->actors, actor);
599 /* windows in 5-th house */
623 actor = init_object(desktop_plugin, "window4", "window4.png",
624 winds[i][0], winds[i][1], 8, 8, 10,
625 FALSE, FALSE, 100, 255,
626 (gpointer)&change_window1, NULL, NULL);
627 //change_window1(actor, desktop_plugin);
628 actor->time_start_animation = now + fast_rnd(30);
629 scene->actors = g_slist_append(scene->actors, actor);
633 /* windows in 6-th house */
654 actor = init_object(desktop_plugin, "window5", "window5.png",
655 winds[i][0], winds[i][1], 8, 8, 10,
656 FALSE, FALSE, 100, 255,
657 (gpointer)&change_window1, NULL, NULL);
658 //change_window1(actor, desktop_plugin);
659 actor->time_start_animation = now + fast_rnd(30);
660 scene->actors = g_slist_append(scene->actors, actor);
663 run_long_timeout(desktop_plugin);
666 anim = g_new0(Animation, 1);
669 anim->func_change = &change_tram;
670 anim->func_time = NULL;
671 anim->timestart = time(NULL);
674 scene.dynamic_actors = g_slist_append(scene.dynamic_actors, anim);
677 /*******************************************************************************/
678 /* Init Berlin Scene */
680 init_scene_Berlin(AWallpaperPlugin *desktop_plugin)
682 Actor *actor, *actor1, *actor2;
684 gint now = time(NULL);
687 GPtrArray *child = NULL;
689 scene = g_new0(Scene, 1);
690 scene->daytime = get_daytime();
691 scene->actors = NULL;
692 scene->wind_orientation = -1;
693 scene->wind_angle = 0.3;
694 /* init value for random */
695 scene->seed = time(NULL);
696 desktop_plugin->priv->scene = scene;
698 actor = init_object(desktop_plugin, "sky", "sky.png", 0, 0, 5, 800, 480,
699 TRUE, TRUE, 100, 255,
700 (gpointer)&change_static_actor, NULL, NULL);
701 change_static_actor(actor, desktop_plugin);
702 scene->actors = g_slist_append(scene->actors, actor);
705 actor = init_object(desktop_plugin, "sun", "sun.png", 0, 0, 6, 88, 88,
706 FALSE, FALSE, 100, 255,
707 (gpointer)&change_sun, NULL, NULL);
708 actor->time_start_animation = time(NULL);
709 actor->duration_animation = G_MAXINT;
710 change_sun(actor, desktop_plugin);
711 scene->actors = g_slist_append(scene->actors, actor);
714 actor = init_object(desktop_plugin, "dot", "dot1.png", 0, 0, 11, 50, 50,
715 TRUE, 100, 255, NULL, NULL);
716 scene.actors = g_slist_append(scene.actors, actor);
719 actor = init_object(desktop_plugin, "moon", "moon1.png", 400, 15, 6, 60, 60,
720 FALSE, FALSE, 100, 255,
721 (gpointer)&change_moon, NULL, NULL);
722 change_moon(actor, desktop_plugin);
723 scene->actors = g_slist_append(scene->actors, actor);
725 actor = init_object(desktop_plugin, "cloud1", "cloud1.png", 0, fast_rnd(300)-97, 7, 150, 97,
726 FALSE, FALSE, 100, 255,
727 (gpointer)&change_cloud, NULL, NULL);
728 actor->time_start_animation = now + fast_rnd(30) + 10;
729 actor->duration_animation = 3*60;
730 scene->actors = g_slist_append(scene->actors, actor);
732 actor = init_object(desktop_plugin, "cloud2", "cloud2.png", 0, fast_rnd(300)-75, 7, 188, 75,
733 FALSE, FALSE, 100, 255,
734 (gpointer)&change_cloud, NULL, NULL);
735 actor->time_start_animation = now + fast_rnd(10);
736 actor->duration_animation = 3*60;
737 scene->actors = g_slist_append(scene->actors, actor);
739 actor = init_object(desktop_plugin, "cloud4", "cloud4.png", 0, fast_rnd(300)-75, 7, 150, 75,
740 FALSE, FALSE, 100, 255,
741 (gpointer)&change_cloud, NULL, NULL);
742 actor->time_start_animation = now + fast_rnd(60) + 20;
743 actor->duration_animation = 5*60;
744 scene->actors = g_slist_append(scene->actors, actor);
747 actor = init_object(desktop_plugin, "plane2", "plane3.png", 0, 45, 8, 160, 50,
748 FALSE, FALSE, 100, 255,
749 (gpointer)&change_plane2, NULL, NULL);
750 actor->time_start_animation = now + fast_rnd(40) + 20;
751 actor->duration_animation = 60;
752 scene->actors = g_slist_append(scene->actors, actor);
754 actor = init_object(desktop_plugin, "plane1", "tu154.png", 620, 233, 9, 300, 116,
755 FALSE, FALSE, 100, 255,
756 (gpointer)&change_plane1, NULL, NULL);
757 actor->time_start_animation = now + fast_rnd(20);
758 actor->duration_animation = 30;
759 scene->actors = g_slist_append(scene->actors, actor);
761 actor = init_object(desktop_plugin, "town", "town.png", 0, 0, 10, 800, 480,
762 TRUE, TRUE, 100, 255,
763 (gpointer)&change_static_actor_with_corner, NULL, NULL);
764 change_static_actor_with_corner(actor, desktop_plugin);
765 scene->actors = g_slist_append(scene->actors, actor);
767 actor = init_object(desktop_plugin, "wind", "", 0, 0, 5, 0, 0,
768 FALSE, FALSE, 100, 255,
769 (gpointer)&change_wind, NULL, NULL);
770 change_wind(actor, desktop_plugin);
771 scene->actors = g_slist_append(scene->actors, actor);
773 actor1 = init_object(desktop_plugin, "signal_red", "red.png",
774 486, 425, 10, 18, 38,
775 FALSE, TRUE, 100, 255, NULL, NULL, NULL);
776 //actor->time_start_animation = now + fast_rnd(30) + 10;
777 scene->actors = g_slist_append(scene->actors, actor1);
779 actor2 = init_object(desktop_plugin, "signal_green", "green.png",
780 486, 425, 10, 18, 38,
781 TRUE, TRUE, 100, 255, NULL, NULL, NULL);
782 //actor->time_start_animation = now + fast_rnd(30) + 10;
783 scene->actors = g_slist_append(scene->actors, actor2);
784 child = g_ptr_array_sized_new(2);
785 g_ptr_array_add(child, actor1);
786 g_ptr_array_add(child, actor2);
787 actor = init_object(desktop_plugin, "signal", "",
788 486, 425, 10, 18, 38,
789 FALSE, FALSE, 100, 255,
790 (gpointer)&change_signal, NULL, child);
791 actor->time_start_animation = now + fast_rnd(30) + 10;
792 scene->actors = g_slist_append(scene->actors, actor);
833 for (i=0; i<13; i++){
834 actor = init_object(desktop_plugin, "window", "window.png",
835 winds[i][0], winds[i][1], 10, 8, 9,
836 FALSE, TRUE, 100, 255,
837 (gpointer)&change_window1, NULL, NULL);
838 //change_window1(actor, desktop_plugin);
839 actor->time_start_animation = now + fast_rnd(30);
840 scene->actors = g_slist_append(scene->actors, actor);
844 run_long_timeout(desktop_plugin);
847 /*******************************************************************************/
849 init_scene_theme(AWallpaperPlugin *desktop_plugin)
851 void (*func)(gpointer);
852 func = g_hash_table_lookup(desktop_plugin->priv->hash_scene_func, desktop_plugin->priv->theme);
854 (*func)(desktop_plugin);