adde images for notifications
[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   GPtrArray *child; 
153
154   //fprintf(stderr, "init scene \n");
155   scene = g_new0(Scene, 1);
156   scene->daytime = get_daytime();
157   scene->actors = NULL;
158   scene->wind_orientation = -1;
159   scene->wind_angle = 0.3;
160   /* init value for random */
161   scene->seed = time(NULL);
162   scene->notification = TRUE;
163   desktop_plugin->priv->scene = scene;
164   
165
166   actor = init_object(desktop_plugin, "sky", "sky0.png", 
167                       0, 0, 5, 800, 480, 
168                       TRUE , TRUE, 100, 255, 
169                       (gpointer)&change_static_actor, NULL, NULL);
170   change_static_actor(actor, desktop_plugin);
171   scene->actors = g_slist_append(scene->actors, actor);
172   
173   actor = init_object(desktop_plugin, "sun", "sun.png", 
174                       0, 0, 6, 88, 88, 
175                       FALSE, FALSE, 100, 255, 
176                       (gpointer)&change_sun, NULL, NULL);
177   actor->time_start_animation = now;
178   actor->duration_animation = G_MAXINT;
179   change_sun(actor, desktop_plugin);
180   scene->actors = g_slist_append(scene->actors, actor);
181
182   //actor = init_object(desktop_plugin, "dot", "dot1.png", 0, 0, 11, 50, 50, 
183     //                  TRUE, 100, 255, NULL, NULL);
184   //scene.actors = g_slist_append(scene.actors, actor);
185   
186   actor = init_object(desktop_plugin, "cloud1", "cloud1.png", 
187                       0, fast_rnd(300)-97, 7, 150, 97, 
188                       FALSE, FALSE, 100, 255, 
189                       (gpointer)&change_cloud, NULL, NULL);
190   actor->time_start_animation = now + fast_rnd(20);
191   actor->duration_animation = 3*60;
192   scene->actors = g_slist_append(scene->actors, actor);
193   
194   actor = init_object(desktop_plugin, "cloud2", "cloud2.png", 
195                       0, fast_rnd(300)-75, 7, 188, 75, 
196                       FALSE, FALSE, 100, 255, 
197                       (gpointer)&change_cloud, NULL, NULL);
198   actor->time_start_animation = now + fast_rnd(40)+10;
199   actor->duration_animation = 3*60;
200   scene->actors = g_slist_append(scene->actors, actor);
201
202   actor = init_object(desktop_plugin, "cloud4", "cloud4.png", 
203                       0, fast_rnd(300)-75, 7, 150, 75, 
204                       FALSE, FALSE, 100, 255, 
205                       (gpointer)&change_cloud, NULL, NULL);
206   actor->time_start_animation = now + fast_rnd(60) + 20;
207   actor->duration_animation = 5*60;
208   scene->actors = g_slist_append(scene->actors, actor);
209
210
211   actor = init_object(desktop_plugin, "town", "town0.png", 
212                       0, 0, 8, 800, 480, 
213                       TRUE, TRUE, 100, 255, 
214                       (gpointer)&change_static_actor, NULL, NULL);
215   change_static_actor(actor, desktop_plugin);
216   scene->actors = g_slist_append(scene->actors, actor);
217
218   actor = init_object(desktop_plugin, "stend", "stend0.png", 
219                       452, 166, 9, 300, 305, 
220                       TRUE, TRUE, 100, 255, 
221                       (gpointer)&change_static_actor, NULL, NULL);
222   change_static_actor(actor, desktop_plugin);
223   scene->actors = g_slist_append(scene->actors, actor);
224
225
226   child = g_ptr_array_sized_new(4);
227   actor = init_object(desktop_plugin, "call", "call.png", 
228                       480, 190, 9, 50, 58, 
229                       FALSE, TRUE, 100, 255, 
230                       NULL, NULL, NULL);
231   scene->actors = g_slist_append(scene->actors, actor);
232   g_ptr_array_add(child, actor);
233
234   actor = init_object(desktop_plugin, "chat", "chat.png", 
235                       540, 190, 9, 50, 58, 
236                       FALSE, TRUE, 100, 255, 
237                       NULL, NULL, NULL);
238   scene->actors = g_slist_append(scene->actors, actor);
239   g_ptr_array_add(child, actor);
240
241   actor = init_object(desktop_plugin, "mail", "mail.png", 
242                       600, 190, 9, 50, 58, 
243                       FALSE, TRUE, 100, 255, 
244                       NULL, NULL, NULL);
245   scene->actors = g_slist_append(scene->actors, actor);
246   g_ptr_array_add(child, actor);
247   
248   actor = init_object(desktop_plugin, "sms", "sms.png", 
249                       660, 190, 9, 50, 58, 
250                       FALSE, TRUE, 100, 255, 
251                       NULL, NULL, NULL);
252   scene->actors = g_slist_append(scene->actors, actor);
253   g_ptr_array_add(child, actor);
254
255   actor = init_object(desktop_plugin, "billboard_text", "",
256                       470, 174, 9, 300, 108,
257                       FALSE, FALSE, 100, 255,
258                       (gpointer)&change_billboard, NULL, child);
259   create_hildon_actor_text(actor, desktop_plugin);
260   //actor->time_start_animation = time(NULL) + 20;
261   change_billboard(actor, desktop_plugin);
262   scene->actors = g_slist_append(scene->actors, actor);
263
264   actor = init_object(desktop_plugin, "tram", "tram.png", 
265                       -300, 225, 10, 350, 210, 
266                       FALSE, FALSE, 100, 255, 
267                       (gpointer)&change_tram, NULL, NULL);
268   actor->time_start_animation = time(NULL) + fast_rnd(10); 
269   actor->duration_animation = 60;
270   scene->actors = g_slist_append(scene->actors, actor);
271
272   actor = init_object(desktop_plugin, "border", "border0.png", 
273                       0, 480-79, 11, 800, 79,
274                       TRUE, TRUE, 100, 255, 
275                       (gpointer)&change_static_actor_with_corner, NULL, NULL);
276   change_static_actor_with_corner(actor, desktop_plugin);
277   scene->actors = g_slist_append(scene->actors, actor);
278   
279   actor = init_object(desktop_plugin, "moon", "moon1.png", 
280                       400, 20, 6, 60, 60, 
281                       FALSE, FALSE, 100, 255, 
282                       (gpointer)&change_moon, NULL, NULL);
283   change_moon(actor, desktop_plugin);
284   scene->actors = g_slist_append(scene->actors, actor);
285
286   actor = init_object(desktop_plugin, "wind", "", 
287                       0, 0, 5, 0, 0, 
288                       FALSE, FALSE, 100, 255, 
289                       (gpointer)&change_wind, NULL, NULL);
290   change_wind(actor, desktop_plugin);
291   scene->actors = g_slist_append(scene->actors, actor);
292
293     /* windows in 4-th house  */
294
295     winds[0][0] = 482;
296     winds[0][1] = 180;
297
298     winds[1][0] = 495;
299     winds[1][1] = 179;
300
301     winds[2][0] = 482;
302     winds[2][1] = 191;
303
304     winds[3][0] = 495;
305     winds[3][1] = 190;
306     
307     winds[4][0] = 482;
308     winds[4][1] = 201;
309     
310     winds[5][0] = 495;
311     winds[5][1] = 210;
312     
313     winds[6][0] = 482;
314     winds[6][1] = 222;
315     
316     winds[7][0] = 495;
317     winds[7][1] = 221;
318     
319     winds[8][0] = 459;
320     winds[8][1] = 203;
321     
322     winds[9][0] = 495;
323     winds[9][1] = 241;
324     
325     winds[10][0] = 495;
326     winds[10][1] = 252;
327     
328     winds[11][0] = 482;
329     winds[11][1] = 273;
330     
331     winds[12][0] = 495;
332     winds[12][1] = 303;
333     for (i=0; i<13; i++){
334         actor = init_object(desktop_plugin, "window1", "window1.png", 
335                             winds[i][0], winds[i][1], 8, 8, 10, 
336                             FALSE, FALSE, 100, 255, 
337                             (gpointer)&change_window1, NULL, NULL);
338         //change_window1(actor, desktop_plugin);
339         actor->time_start_animation = now + fast_rnd(30);
340         scene->actors = g_slist_append(scene->actors, actor);
341
342     }
343     
344     /* windows in 1-th house  */
345     
346     winds[0][0] = 86;
347     winds[0][1] = 321;
348
349     winds[1][0] = 86;
350     winds[1][1] = 363;
351
352     winds[2][0] = 86;
353     winds[2][1] = 385;
354
355     winds[3][0] = 86;
356     winds[3][1] = 286;
357     
358     winds[4][0] = 94;
359     winds[4][1] = 232;
360     
361     winds[5][0] = 94;
362     winds[5][1] = 243;
363     
364     winds[6][0] = 94;
365     winds[6][1] = 265;
366     
367     winds[7][0] = 94;
368     winds[7][1] = 331;
369     for (i=0; i<8; i++){
370         actor = init_object(desktop_plugin, "window2", "window2.png", 
371                             winds[i][0], winds[i][1], 8, 8, 10, 
372                             FALSE, FALSE, 100, 255, 
373                             (gpointer)&change_window1, NULL, NULL);
374         //change_window1(actor, desktop_plugin);
375         actor->time_start_animation = now + fast_rnd(30);
376         scene->actors = g_slist_append(scene->actors, actor);
377
378     }
379     
380     /* windows in 3-th house  */
381     
382     winds[0][0] = 251;
383     winds[0][1] = 162;
384
385     winds[1][0] = 251;
386     winds[1][1] = 196;
387
388     winds[2][0] = 251;
389     winds[2][1] = 278;
390
391     winds[3][0] = 251;
392     winds[3][1] = 289;
393     
394     winds[4][0] = 313;
395     winds[4][1] = 173;
396     
397     winds[5][0] = 322;
398     winds[5][1] = 160;
399     
400     winds[6][0] = 303;
401     winds[6][1] = 217;
402     
403     winds[7][0] = 322;
404     winds[7][1] = 224;
405     
406     winds[8][0] = 323;
407     winds[8][1] = 217;
408     
409     winds[9][0] = 322;
410     winds[9][1] = 288;
411     
412     for (i=0; i<10; i++){
413         actor = init_object(desktop_plugin, "window3", "window3.png", 
414                             winds[i][0], winds[i][1], 8, 8, 10, 
415                             FALSE, FALSE, 100, 255, 
416                             (gpointer)&change_window1, NULL, NULL);
417         //change_window1(actor, desktop_plugin);
418         actor->time_start_animation = now + fast_rnd(30);
419         scene->actors = g_slist_append(scene->actors, actor);
420
421     }
422
423     /* windows in 5-th house  */
424     
425     winds[0][0] = 610;
426     winds[0][1] = 224;
427
428     winds[1][0] = 602;
429     winds[1][1] = 245;
430
431     winds[2][0] = 602;
432     winds[2][1] = 264;
433
434     winds[3][0] = 610;
435     winds[3][1] = 301;
436     
437     winds[4][0] = 610;
438     winds[4][1] = 320;
439     
440     winds[5][0] = 593;
441     winds[5][1] = 352;
442     
443     winds[6][0] = 610;
444     winds[6][1] = 368;
445     
446     for (i=0; i<7; i++){
447         actor = init_object(desktop_plugin, "window4", "window4.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
457     /* windows in 6-th house  */
458     
459     winds[0][0] = 717;
460     winds[0][1] = 283;
461
462     winds[1][0] = 698;
463     winds[1][1] = 293;
464
465     winds[2][0] = 717;
466     winds[2][1] = 315;
467
468     winds[3][0] = 717;
469     winds[3][1] = 323;
470     
471     winds[4][0] = 698;
472     winds[4][1] = 362;
473     
474     winds[5][0] = 698;
475     winds[5][1] = 400;
476     
477     for (i=0; i<6; i++){
478         actor = init_object(desktop_plugin, "window5", "window5.png", 
479                             winds[i][0], winds[i][1], 8, 8, 10, 
480                             FALSE, FALSE, 100, 255, 
481                             (gpointer)&change_window1, NULL, NULL);
482         //change_window1(actor, desktop_plugin);
483         actor->time_start_animation = now + fast_rnd(30);
484         scene->actors = g_slist_append(scene->actors, actor);
485
486     }
487     run_long_timeout(desktop_plugin);
488
489 #if 0    
490   anim = g_new0(Animation, 1);
491   anim->count = 1;
492   anim->actor = actor;
493   anim->func_change = &change_tram;
494   anim->func_time = NULL;
495   anim->timestart = time(NULL); 
496   anim->timeall = 10;
497   
498   scene.dynamic_actors = g_slist_append(scene.dynamic_actors, anim);
499 #endif  
500 }
501
502 /* Init Berlin Scene */
503 void
504 init_scene_Berlin(AWallpaperPlugin *desktop_plugin)
505 {
506   Actor *actor, *actor1, *actor2;
507   Scene *scene;
508   gint now = time(NULL);
509   gint i; 
510   gint winds[13][2];
511   GPtrArray *child = NULL;
512
513   scene = g_new0(Scene, 1);
514   scene->daytime = get_daytime();
515   scene->actors = NULL;
516   scene->wind_orientation = -1;
517   scene->wind_angle = 0.3;
518   /* init value for random */
519   scene->seed = time(NULL);
520   desktop_plugin->priv->scene = scene;
521   
522   actor = init_object(desktop_plugin, "sky", "sky.png", 0, 0, 5, 800, 480, 
523                       TRUE, TRUE, 100, 255, 
524                       (gpointer)&change_static_actor, NULL, NULL);
525   change_static_actor(actor, desktop_plugin);
526   scene->actors = g_slist_append(scene->actors, actor);
527
528   
529   actor = init_object(desktop_plugin, "sun", "sun.png", 0, 0, 6, 88, 88, 
530                       FALSE, FALSE, 100, 255, 
531                       (gpointer)&change_sun, NULL, NULL);
532   actor->time_start_animation = time(NULL);
533   actor->duration_animation = G_MAXINT;
534   change_sun(actor, desktop_plugin);
535   scene->actors = g_slist_append(scene->actors, actor);
536
537 #if 0
538   actor = init_object(desktop_plugin, "dot", "dot1.png", 0, 0, 11, 50, 50, 
539                       TRUE, 100, 255, NULL, NULL);
540   scene.actors = g_slist_append(scene.actors, actor);
541 #endif
542
543   actor = init_object(desktop_plugin, "moon", "moon1.png", 400, 15, 6, 60, 60, 
544                       FALSE, FALSE, 100, 255, 
545                       (gpointer)&change_moon, NULL, NULL);
546   change_moon(actor, desktop_plugin);
547   scene->actors = g_slist_append(scene->actors, actor);
548   
549   actor = init_object(desktop_plugin, "cloud1", "cloud1.png", 0, fast_rnd(300)-97, 7, 150, 97, 
550                       FALSE, FALSE, 100, 255, 
551                       (gpointer)&change_cloud, NULL, NULL);
552   actor->time_start_animation = now + fast_rnd(30) + 10;
553   actor->duration_animation = 3*60;
554   scene->actors = g_slist_append(scene->actors, actor);
555   
556   actor = init_object(desktop_plugin, "cloud2", "cloud2.png", 0, fast_rnd(300)-75, 7, 188, 75, 
557                       FALSE, FALSE, 100, 255, 
558                       (gpointer)&change_cloud, NULL, NULL);
559   actor->time_start_animation = now + fast_rnd(10);
560   actor->duration_animation = 3*60;
561   scene->actors = g_slist_append(scene->actors, actor);
562
563   actor = init_object(desktop_plugin, "cloud4", "cloud4.png", 0, fast_rnd(300)-75, 7, 150, 75, 
564                       FALSE, FALSE, 100, 255, 
565                       (gpointer)&change_cloud, NULL, NULL);
566   actor->time_start_animation = now + fast_rnd(60) + 20;
567   actor->duration_animation = 5*60;
568   scene->actors = g_slist_append(scene->actors, actor);
569
570  
571   actor = init_object(desktop_plugin, "plane2", "plane3.png", 0, 45, 8, 160, 50, 
572                       FALSE, FALSE, 100, 255, 
573                       (gpointer)&change_plane2, NULL, NULL);
574   actor->time_start_animation = now + fast_rnd(40) + 20;
575   actor->duration_animation = 60;
576   scene->actors = g_slist_append(scene->actors, actor);
577   
578   actor = init_object(desktop_plugin, "plane1", "tu154.png", 620, 233, 9, 300, 116, 
579                       FALSE, FALSE, 100, 255, 
580                       (gpointer)&change_plane1, NULL, NULL);
581   actor->time_start_animation = now + fast_rnd(20);
582   actor->duration_animation = 30;
583   scene->actors = g_slist_append(scene->actors, actor);
584
585   actor = init_object(desktop_plugin, "town", "town.png", 0, 0, 10, 800, 480, 
586                       TRUE, TRUE, 100, 255, 
587                       (gpointer)&change_static_actor_with_corner, NULL, NULL);
588   change_static_actor_with_corner(actor, desktop_plugin);
589   scene->actors = g_slist_append(scene->actors, actor);
590
591   actor = init_object(desktop_plugin, "wind", "", 0, 0, 5, 0, 0, 
592                       FALSE, FALSE, 100, 255, 
593                       (gpointer)&change_wind, NULL, NULL);
594   change_wind(actor, desktop_plugin);
595   scene->actors = g_slist_append(scene->actors, actor);
596
597   actor1 = init_object(desktop_plugin, "signal_red", "red.png", 
598                       486, 425, 10, 18, 38, 
599                       FALSE, TRUE, 100, 255, NULL, NULL, NULL);
600   //actor->time_start_animation = now + fast_rnd(30) + 10;  
601   scene->actors = g_slist_append(scene->actors, actor1);
602    
603   actor2 = init_object(desktop_plugin, "signal_green", "green.png", 
604                       486, 425, 10, 18, 38, 
605                       TRUE, TRUE, 100, 255, NULL, NULL, NULL);
606   //actor->time_start_animation = now + fast_rnd(30) + 10;  
607   scene->actors = g_slist_append(scene->actors, actor2);
608   child = g_ptr_array_sized_new(2);
609   g_ptr_array_add(child, actor1);
610   g_ptr_array_add(child, actor2);
611   actor = init_object(desktop_plugin, "signal", "",
612                       486, 425, 10, 18, 38,
613                       FALSE, FALSE, 100, 255, 
614                       (gpointer)&change_signal, NULL, child);
615   actor->time_start_animation = now + fast_rnd(30) + 10;
616   scene->actors = g_slist_append(scene->actors, actor);
617     
618     winds[0][0] = 389;
619     winds[0][1] = 305;
620
621     winds[1][0] = 373;
622     winds[1][1] = 306;
623
624     winds[2][0] = 355;
625     winds[2][1] = 306;
626
627     winds[3][0] = 356;
628     winds[3][1] = 288;
629     
630     winds[4][0] = 337;
631     winds[4][1] = 269;
632     
633     winds[5][0] = 372;
634     winds[5][1] = 268;
635   
636     winds[6][0] = 372;
637     winds[6][1] = 249;
638     
639     winds[7][0] = 388;
640     winds[7][1] = 249;
641     
642     winds[8][0] = 387;
643     winds[8][1] = 230;
644     
645     winds[9][0] = 372;
646     winds[9][1] = 211;
647     
648     winds[10][0] = 355;
649     winds[10][1] = 159;
650     
651     winds[11][0] = 335;
652     winds[11][1] = 158;
653     
654     winds[12][0] = 386;
655     winds[12][1] = 119;
656   
657     for (i=0; i<13; i++){
658         actor = init_object(desktop_plugin, "window", "window.png", 
659                             winds[i][0], winds[i][1], 10, 8, 9, 
660                             FALSE, TRUE, 100, 255, 
661                             (gpointer)&change_window1, NULL, NULL);
662         //change_window1(actor, desktop_plugin);
663         actor->time_start_animation = now + fast_rnd(30);
664         scene->actors = g_slist_append(scene->actors, actor);
665
666     }
667     
668     run_long_timeout(desktop_plugin);
669
670 }
671
672 void 
673 init_scene_theme(AWallpaperPlugin *desktop_plugin)
674 {
675     void (*func)(gpointer);
676     func = g_hash_table_lookup(desktop_plugin->priv->hash_scene_func, desktop_plugin->priv->theme);
677     if (func){
678         (*func)(desktop_plugin);
679     }
680 }