work notification close
[livewp] / applet / src / livewp-scene.c
1 /*vim: set sw=4 ts=4 et: */
2 /*
3  * This file is part of Live Wallpaper (livewp)
4  * 
5  * Copyright (C) 2010 Vlad Vasiliev
6  * Copyright (C) 2010 Tanya Makova
7  *       for the code
8  * 
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.
13  * 
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.
18  * 
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
22  * 02110-1301 USA
23 */
24 /*******************************************************************************/
25 #include "livewp-scene.h" 
26
27 void 
28 destroy_scene(AWallpaperPlugin *desktop_plugin)
29 {
30     GSList * tmp = desktop_plugin->priv->scene->actors;
31     while (tmp != NULL){
32         destroy_actor(tmp->data);
33         tmp = g_slist_next(tmp);
34     }
35     g_slist_free(tmp);
36     desktop_plugin->priv->scene->actors = NULL;
37     if (desktop_plugin->priv->scene){
38         g_free(desktop_plugin->priv->scene);
39         desktop_plugin->priv->scene = NULL;
40     }
41 }
42
43 void
44 reload_scene(AWallpaperPlugin *desktop_plugin)
45 {
46     fprintf(stderr,"Reload scene %s\n", desktop_plugin->priv->theme);  
47     destroy_scene(desktop_plugin);
48 #if 0
49     if (!strcmp(desktop_plugin->priv->theme,"Modern"))
50         init_scene_Modern(desktop_plugin);
51     else if (!strcmp(desktop_plugin->priv->theme,"Berlin")) 
52         init_scene_Berlin(desktop_plugin);
53     else if (!strcmp(desktop_plugin->priv->theme,"Matrix")) 
54         init_scene_Matrix(desktop_plugin);
55 #endif
56     init_scene_theme(desktop_plugin);
57 }
58
59 void
60 init_scene_Matrix(AWallpaperPlugin *desktop_plugin)
61 {
62   Actor *actor;
63   Scene *scene;
64   GPtrArray *child;
65   gint now = time(NULL);
66   gint y1, y2;
67
68   if (desktop_plugin->priv->rich_animation){
69       y1 = -480;
70       y2 = -480-480;
71   }else {
72       y1 = 0;
73       y2 = -480;
74   }
75
76   fprintf(stderr, "init scene2 \n");
77   scene = g_new0(Scene, 1);
78   //scene.daytime = get_daytime();
79   scene->actors = NULL;
80   desktop_plugin->priv->scene = scene;
81   
82   actor = init_object(desktop_plugin, "background", "bg.png", 
83                       0, 0, 5, 800, 480, 
84                       TRUE, TRUE, 100, 255, 
85                       NULL, NULL, NULL);
86   scene->actors = g_slist_append(scene->actors, actor);
87
88   actor = init_object(desktop_plugin, "symbols", "symbols.png", 
89                       0, 0, 10, 800, 480, 
90                       TRUE, TRUE, 100, 255, 
91                       NULL, NULL, NULL);
92   scene->actors = g_slist_append(scene->actors, actor);
93
94   child = g_ptr_array_sized_new(4);
95   actor = init_object(desktop_plugin, "layer1", "layer1_2.png", 
96                       0, y1, 6, 800, 960, 
97                       TRUE, TRUE, 100, 255, 
98                       NULL, NULL, NULL);
99   //actor->time_start_animation = now;
100   //actor->duration_animation = G_MAXINT;
101   scene->actors = g_slist_append(scene->actors, actor);
102   g_ptr_array_add(child, actor);
103
104   actor = init_object(desktop_plugin, "layer1", "layer1_1.png", 
105                       0, y2, 7, 800, 960, 
106                       TRUE, TRUE, 100, 255, 
107                       NULL, NULL, NULL);
108   //actor->time_start_animation = now;
109   //actor->duration_animation = G_MAXINT;
110   scene->actors = g_slist_append(scene->actors, actor);
111   g_ptr_array_add(child, actor);
112
113   actor = init_object(desktop_plugin, "layer2", "layer2_2.png", 
114                       0, y1, 8, 800, 960, 
115                       TRUE, TRUE, 100, 255, 
116                       NULL, NULL, NULL);
117   //actor->time_start_animation = now;
118   //actor->duration_animation = G_MAXINT;
119   scene->actors = g_slist_append(scene->actors, actor);
120   g_ptr_array_add(child, actor);
121
122   actor = init_object(desktop_plugin, "layer2", "layer2_1.png", 
123                       0, y2, 9, 800, 960, 
124                       TRUE, TRUE, 100, 255, 
125                       NULL, NULL, NULL);
126   //actor->time_start_animation = now;
127   //actor->duration_animation = G_MAXINT;
128   scene->actors = g_slist_append(scene->actors, actor);
129   g_ptr_array_add(child, actor);
130
131   actor = init_object(desktop_plugin, "layers", "", 
132                       0, y2, 9, 800, 960, 
133                       FALSE, FALSE, 100, 255, 
134                       (gpointer)&change_layer, NULL, child);
135   actor->time_start_animation = now;
136   actor->duration_animation = G_MAXINT;
137   scene->actors = g_slist_append(scene->actors, actor);
138
139   run_long_timeout(desktop_plugin);
140
141 }
142
143 /* Init Modern Scene */
144 void
145 init_scene_Modern(AWallpaperPlugin *desktop_plugin)
146 {
147   Actor *actor;
148   Scene *scene;
149   gint now = time(NULL);
150   gint i;
151   gint winds[13][2];
152
153   //fprintf(stderr, "init scene \n");
154   scene = g_new0(Scene, 1);
155   scene->daytime = get_daytime();
156   scene->actors = NULL;
157   scene->wind_orientation = -1;
158   scene->wind_angle = 0.3;
159   /* init value for random */
160   scene->seed = time(NULL);
161   scene->notification = TRUE;
162   desktop_plugin->priv->scene = scene;
163   
164
165   actor = init_object(desktop_plugin, "sky", "sky0.png", 
166                       0, 0, 5, 800, 480, 
167                       TRUE , TRUE, 100, 255, 
168                       (gpointer)&change_static_actor, NULL, NULL);
169   change_static_actor(actor, desktop_plugin);
170   scene->actors = g_slist_append(scene->actors, actor);
171   
172   actor = init_object(desktop_plugin, "sun", "sun.png", 
173                       0, 0, 6, 88, 88, 
174                       FALSE, FALSE, 100, 255, 
175                       (gpointer)&change_sun, NULL, NULL);
176   actor->time_start_animation = now;
177   actor->duration_animation = G_MAXINT;
178   change_sun(actor, desktop_plugin);
179   scene->actors = g_slist_append(scene->actors, actor);
180
181   //actor = init_object(desktop_plugin, "dot", "dot1.png", 0, 0, 11, 50, 50, 
182     //                  TRUE, 100, 255, NULL, NULL);
183   //scene.actors = g_slist_append(scene.actors, actor);
184   
185   actor = init_object(desktop_plugin, "cloud1", "cloud1.png", 
186                       0, fast_rnd(300)-97, 7, 150, 97, 
187                       FALSE, FALSE, 100, 255, 
188                       (gpointer)&change_cloud, NULL, NULL);
189   actor->time_start_animation = now + fast_rnd(20);
190   actor->duration_animation = 3*60;
191   scene->actors = g_slist_append(scene->actors, actor);
192   
193   actor = init_object(desktop_plugin, "cloud2", "cloud2.png", 
194                       0, fast_rnd(300)-75, 7, 188, 75, 
195                       FALSE, FALSE, 100, 255, 
196                       (gpointer)&change_cloud, NULL, NULL);
197   actor->time_start_animation = now + fast_rnd(40)+10;
198   actor->duration_animation = 3*60;
199   scene->actors = g_slist_append(scene->actors, actor);
200
201   actor = init_object(desktop_plugin, "cloud4", "cloud4.png", 
202                       0, fast_rnd(300)-75, 7, 150, 75, 
203                       FALSE, FALSE, 100, 255, 
204                       (gpointer)&change_cloud, NULL, NULL);
205   actor->time_start_animation = now + fast_rnd(60) + 20;
206   actor->duration_animation = 5*60;
207   scene->actors = g_slist_append(scene->actors, actor);
208
209
210   actor = init_object(desktop_plugin, "town", "town0.png", 
211                       0, 0, 8, 800, 480, 
212                       TRUE, TRUE, 100, 255, 
213                       (gpointer)&change_static_actor, NULL, NULL);
214   change_static_actor(actor, desktop_plugin);
215   scene->actors = g_slist_append(scene->actors, actor);
216
217   actor = init_object(desktop_plugin, "stend", "stend0.png", 
218                       452, 166, 9, 300, 305, 
219                       TRUE, TRUE, 100, 255, 
220                       (gpointer)&change_static_actor, NULL, NULL);
221   change_static_actor(actor, desktop_plugin);
222   scene->actors = g_slist_append(scene->actors, actor);
223
224   actor = init_object(desktop_plugin, "billboard_text", "",
225                       470, 174, 9, 300, 108,
226                       TRUE, FALSE, 100, 255,
227                       (gpointer)&change_billboard, NULL, NULL);
228   create_hildon_actor_text(actor, desktop_plugin);
229   //actor->time_start_animation = time(NULL) + 20;
230   change_billboard(actor, desktop_plugin);
231   scene->actors = g_slist_append(scene->actors, actor);
232
233   actor = init_object(desktop_plugin, "tram", "tram.png", 
234                       -300, 225, 10, 350, 210, 
235                       FALSE, FALSE, 100, 255, 
236                       (gpointer)&change_tram, NULL, NULL);
237   actor->time_start_animation = time(NULL) + fast_rnd(10); 
238   actor->duration_animation = 60;
239   scene->actors = g_slist_append(scene->actors, actor);
240
241   actor = init_object(desktop_plugin, "border", "border0.png", 
242                       0, 480-79, 11, 800, 79,
243                       TRUE, TRUE, 100, 255, 
244                       (gpointer)&change_static_actor_with_corner, NULL, NULL);
245   change_static_actor_with_corner(actor, desktop_plugin);
246   scene->actors = g_slist_append(scene->actors, actor);
247   
248   actor = init_object(desktop_plugin, "moon", "moon1.png", 
249                       400, 20, 6, 60, 60, 
250                       FALSE, FALSE, 100, 255, 
251                       (gpointer)&change_moon, NULL, NULL);
252   change_moon(actor, desktop_plugin);
253   scene->actors = g_slist_append(scene->actors, actor);
254
255   actor = init_object(desktop_plugin, "wind", "", 
256                       0, 0, 5, 0, 0, 
257                       FALSE, FALSE, 100, 255, 
258                       (gpointer)&change_wind, NULL, NULL);
259   change_wind(actor, desktop_plugin);
260   scene->actors = g_slist_append(scene->actors, actor);
261
262     /* windows in 4-th house  */
263
264     winds[0][0] = 482;
265     winds[0][1] = 180;
266
267     winds[1][0] = 495;
268     winds[1][1] = 179;
269
270     winds[2][0] = 482;
271     winds[2][1] = 191;
272
273     winds[3][0] = 495;
274     winds[3][1] = 190;
275     
276     winds[4][0] = 482;
277     winds[4][1] = 201;
278     
279     winds[5][0] = 495;
280     winds[5][1] = 210;
281     
282     winds[6][0] = 482;
283     winds[6][1] = 222;
284     
285     winds[7][0] = 495;
286     winds[7][1] = 221;
287     
288     winds[8][0] = 459;
289     winds[8][1] = 203;
290     
291     winds[9][0] = 495;
292     winds[9][1] = 241;
293     
294     winds[10][0] = 495;
295     winds[10][1] = 252;
296     
297     winds[11][0] = 482;
298     winds[11][1] = 273;
299     
300     winds[12][0] = 495;
301     winds[12][1] = 303;
302     for (i=0; i<13; i++){
303         actor = init_object(desktop_plugin, "window1", "window1.png", 
304                             winds[i][0], winds[i][1], 8, 8, 10, 
305                             FALSE, FALSE, 100, 255, 
306                             (gpointer)&change_window1, NULL, NULL);
307         //change_window1(actor, desktop_plugin);
308         actor->time_start_animation = now + fast_rnd(30);
309         scene->actors = g_slist_append(scene->actors, actor);
310
311     }
312     
313     /* windows in 1-th house  */
314     
315     winds[0][0] = 86;
316     winds[0][1] = 321;
317
318     winds[1][0] = 86;
319     winds[1][1] = 363;
320
321     winds[2][0] = 86;
322     winds[2][1] = 385;
323
324     winds[3][0] = 86;
325     winds[3][1] = 286;
326     
327     winds[4][0] = 94;
328     winds[4][1] = 232;
329     
330     winds[5][0] = 94;
331     winds[5][1] = 243;
332     
333     winds[6][0] = 94;
334     winds[6][1] = 265;
335     
336     winds[7][0] = 94;
337     winds[7][1] = 331;
338     for (i=0; i<8; i++){
339         actor = init_object(desktop_plugin, "window2", "window2.png", 
340                             winds[i][0], winds[i][1], 8, 8, 10, 
341                             FALSE, FALSE, 100, 255, 
342                             (gpointer)&change_window1, NULL, NULL);
343         //change_window1(actor, desktop_plugin);
344         actor->time_start_animation = now + fast_rnd(30);
345         scene->actors = g_slist_append(scene->actors, actor);
346
347     }
348     
349     /* windows in 3-th house  */
350     
351     winds[0][0] = 251;
352     winds[0][1] = 162;
353
354     winds[1][0] = 251;
355     winds[1][1] = 196;
356
357     winds[2][0] = 251;
358     winds[2][1] = 278;
359
360     winds[3][0] = 251;
361     winds[3][1] = 289;
362     
363     winds[4][0] = 313;
364     winds[4][1] = 173;
365     
366     winds[5][0] = 322;
367     winds[5][1] = 160;
368     
369     winds[6][0] = 303;
370     winds[6][1] = 217;
371     
372     winds[7][0] = 322;
373     winds[7][1] = 224;
374     
375     winds[8][0] = 323;
376     winds[8][1] = 217;
377     
378     winds[9][0] = 322;
379     winds[9][1] = 288;
380     
381     for (i=0; i<10; i++){
382         actor = init_object(desktop_plugin, "window3", "window3.png", 
383                             winds[i][0], winds[i][1], 8, 8, 10, 
384                             FALSE, FALSE, 100, 255, 
385                             (gpointer)&change_window1, NULL, NULL);
386         //change_window1(actor, desktop_plugin);
387         actor->time_start_animation = now + fast_rnd(30);
388         scene->actors = g_slist_append(scene->actors, actor);
389
390     }
391
392     /* windows in 5-th house  */
393     
394     winds[0][0] = 610;
395     winds[0][1] = 224;
396
397     winds[1][0] = 602;
398     winds[1][1] = 245;
399
400     winds[2][0] = 602;
401     winds[2][1] = 264;
402
403     winds[3][0] = 610;
404     winds[3][1] = 301;
405     
406     winds[4][0] = 610;
407     winds[4][1] = 320;
408     
409     winds[5][0] = 593;
410     winds[5][1] = 352;
411     
412     winds[6][0] = 610;
413     winds[6][1] = 368;
414     
415     for (i=0; i<7; i++){
416         actor = init_object(desktop_plugin, "window4", "window4.png", 
417                             winds[i][0], winds[i][1], 8, 8, 10, 
418                             FALSE, FALSE, 100, 255, 
419                             (gpointer)&change_window1, NULL, NULL);
420         //change_window1(actor, desktop_plugin);
421         actor->time_start_animation = now + fast_rnd(30);
422         scene->actors = g_slist_append(scene->actors, actor);
423
424     }
425
426     /* windows in 6-th house  */
427     
428     winds[0][0] = 717;
429     winds[0][1] = 283;
430
431     winds[1][0] = 698;
432     winds[1][1] = 293;
433
434     winds[2][0] = 717;
435     winds[2][1] = 315;
436
437     winds[3][0] = 717;
438     winds[3][1] = 323;
439     
440     winds[4][0] = 698;
441     winds[4][1] = 362;
442     
443     winds[5][0] = 698;
444     winds[5][1] = 400;
445     
446     for (i=0; i<6; i++){
447         actor = init_object(desktop_plugin, "window5", "window5.png", 
448                             winds[i][0], winds[i][1], 8, 8, 10, 
449                             FALSE, FALSE, 100, 255, 
450                             (gpointer)&change_window1, NULL, NULL);
451         //change_window1(actor, desktop_plugin);
452         actor->time_start_animation = now + fast_rnd(30);
453         scene->actors = g_slist_append(scene->actors, actor);
454
455     }
456     run_long_timeout(desktop_plugin);
457
458 #if 0    
459   anim = g_new0(Animation, 1);
460   anim->count = 1;
461   anim->actor = actor;
462   anim->func_change = &change_tram;
463   anim->func_time = NULL;
464   anim->timestart = time(NULL); 
465   anim->timeall = 10;
466   
467   scene.dynamic_actors = g_slist_append(scene.dynamic_actors, anim);
468 #endif  
469 }
470
471 /* Init Berlin Scene */
472 void
473 init_scene_Berlin(AWallpaperPlugin *desktop_plugin)
474 {
475   Actor *actor, *actor1, *actor2;
476   Scene *scene;
477   gint now = time(NULL);
478   gint i; 
479   gint winds[13][2];
480   GPtrArray *child = NULL;
481
482   scene = g_new0(Scene, 1);
483   scene->daytime = get_daytime();
484   scene->actors = NULL;
485   scene->wind_orientation = -1;
486   scene->wind_angle = 0.3;
487   /* init value for random */
488   scene->seed = time(NULL);
489   desktop_plugin->priv->scene = scene;
490   
491   actor = init_object(desktop_plugin, "sky", "sky.png", 0, 0, 5, 800, 480, 
492                       TRUE, TRUE, 100, 255, 
493                       (gpointer)&change_static_actor, NULL, NULL);
494   change_static_actor(actor, desktop_plugin);
495   scene->actors = g_slist_append(scene->actors, actor);
496
497   
498   actor = init_object(desktop_plugin, "sun", "sun.png", 0, 0, 6, 88, 88, 
499                       FALSE, FALSE, 100, 255, 
500                       (gpointer)&change_sun, NULL, NULL);
501   actor->time_start_animation = time(NULL);
502   actor->duration_animation = G_MAXINT;
503   change_sun(actor, desktop_plugin);
504   scene->actors = g_slist_append(scene->actors, actor);
505
506 #if 0
507   actor = init_object(desktop_plugin, "dot", "dot1.png", 0, 0, 11, 50, 50, 
508                       TRUE, 100, 255, NULL, NULL);
509   scene.actors = g_slist_append(scene.actors, actor);
510 #endif
511
512   actor = init_object(desktop_plugin, "moon", "moon1.png", 400, 15, 6, 60, 60, 
513                       FALSE, FALSE, 100, 255, 
514                       (gpointer)&change_moon, NULL, NULL);
515   change_moon(actor, desktop_plugin);
516   scene->actors = g_slist_append(scene->actors, actor);
517   
518   actor = init_object(desktop_plugin, "cloud1", "cloud1.png", 0, fast_rnd(300)-97, 7, 150, 97, 
519                       FALSE, FALSE, 100, 255, 
520                       (gpointer)&change_cloud, NULL, NULL);
521   actor->time_start_animation = now + fast_rnd(30) + 10;
522   actor->duration_animation = 3*60;
523   scene->actors = g_slist_append(scene->actors, actor);
524   
525   actor = init_object(desktop_plugin, "cloud2", "cloud2.png", 0, fast_rnd(300)-75, 7, 188, 75, 
526                       FALSE, FALSE, 100, 255, 
527                       (gpointer)&change_cloud, NULL, NULL);
528   actor->time_start_animation = now + fast_rnd(10);
529   actor->duration_animation = 3*60;
530   scene->actors = g_slist_append(scene->actors, actor);
531
532   actor = init_object(desktop_plugin, "cloud4", "cloud4.png", 0, fast_rnd(300)-75, 7, 150, 75, 
533                       FALSE, FALSE, 100, 255, 
534                       (gpointer)&change_cloud, NULL, NULL);
535   actor->time_start_animation = now + fast_rnd(60) + 20;
536   actor->duration_animation = 5*60;
537   scene->actors = g_slist_append(scene->actors, actor);
538
539  
540   actor = init_object(desktop_plugin, "plane2", "plane3.png", 0, 45, 8, 160, 50, 
541                       FALSE, FALSE, 100, 255, 
542                       (gpointer)&change_plane2, NULL, NULL);
543   actor->time_start_animation = now + fast_rnd(40) + 20;
544   actor->duration_animation = 60;
545   scene->actors = g_slist_append(scene->actors, actor);
546   
547   actor = init_object(desktop_plugin, "plane1", "tu154.png", 620, 233, 9, 300, 116, 
548                       FALSE, FALSE, 100, 255, 
549                       (gpointer)&change_plane1, NULL, NULL);
550   actor->time_start_animation = now + fast_rnd(20);
551   actor->duration_animation = 30;
552   scene->actors = g_slist_append(scene->actors, actor);
553
554   actor = init_object(desktop_plugin, "town", "town.png", 0, 0, 10, 800, 480, 
555                       TRUE, TRUE, 100, 255, 
556                       (gpointer)&change_static_actor_with_corner, NULL, NULL);
557   change_static_actor_with_corner(actor, desktop_plugin);
558   scene->actors = g_slist_append(scene->actors, actor);
559
560   actor = init_object(desktop_plugin, "wind", "", 0, 0, 5, 0, 0, 
561                       FALSE, FALSE, 100, 255, 
562                       (gpointer)&change_wind, NULL, NULL);
563   change_wind(actor, desktop_plugin);
564   scene->actors = g_slist_append(scene->actors, actor);
565
566   actor1 = init_object(desktop_plugin, "signal_red", "red.png", 
567                       486, 425, 10, 18, 38, 
568                       FALSE, TRUE, 100, 255, NULL, NULL, NULL);
569   //actor->time_start_animation = now + fast_rnd(30) + 10;  
570   scene->actors = g_slist_append(scene->actors, actor1);
571    
572   actor2 = init_object(desktop_plugin, "signal_green", "green.png", 
573                       486, 425, 10, 18, 38, 
574                       TRUE, TRUE, 100, 255, NULL, NULL, NULL);
575   //actor->time_start_animation = now + fast_rnd(30) + 10;  
576   scene->actors = g_slist_append(scene->actors, actor2);
577   child = g_ptr_array_sized_new(2);
578   g_ptr_array_add(child, actor1);
579   g_ptr_array_add(child, actor2);
580   actor = init_object(desktop_plugin, "signal", "",
581                       486, 425, 10, 18, 38,
582                       FALSE, FALSE, 100, 255, 
583                       (gpointer)&change_signal, NULL, child);
584   actor->time_start_animation = now + fast_rnd(30) + 10;
585   scene->actors = g_slist_append(scene->actors, actor);
586     
587     winds[0][0] = 389;
588     winds[0][1] = 305;
589
590     winds[1][0] = 373;
591     winds[1][1] = 306;
592
593     winds[2][0] = 355;
594     winds[2][1] = 306;
595
596     winds[3][0] = 356;
597     winds[3][1] = 288;
598     
599     winds[4][0] = 337;
600     winds[4][1] = 269;
601     
602     winds[5][0] = 372;
603     winds[5][1] = 268;
604   
605     winds[6][0] = 372;
606     winds[6][1] = 249;
607     
608     winds[7][0] = 388;
609     winds[7][1] = 249;
610     
611     winds[8][0] = 387;
612     winds[8][1] = 230;
613     
614     winds[9][0] = 372;
615     winds[9][1] = 211;
616     
617     winds[10][0] = 355;
618     winds[10][1] = 159;
619     
620     winds[11][0] = 335;
621     winds[11][1] = 158;
622     
623     winds[12][0] = 386;
624     winds[12][1] = 119;
625   
626     for (i=0; i<13; i++){
627         actor = init_object(desktop_plugin, "window", "window.png", 
628                             winds[i][0], winds[i][1], 10, 8, 9, 
629                             FALSE, TRUE, 100, 255, 
630                             (gpointer)&change_window1, NULL, NULL);
631         //change_window1(actor, desktop_plugin);
632         actor->time_start_animation = now + fast_rnd(30);
633         scene->actors = g_slist_append(scene->actors, actor);
634
635     }
636     
637     run_long_timeout(desktop_plugin);
638
639 }
640
641 void 
642 init_scene_theme(AWallpaperPlugin *desktop_plugin)
643 {
644     void (*func)(gpointer);
645     func = g_hash_table_lookup(desktop_plugin->priv->hash_scene_func, desktop_plugin->priv->theme);
646     if (func){
647         (*func)(desktop_plugin);
648     }
649 }