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));
50 /*******************************************************************************/
52 reload_scene(AWallpaperPlugin *desktop_plugin)
54 fprintf(stderr,"Reload scene %s\n", desktop_plugin->priv->theme);
55 destroy_scene(desktop_plugin);
56 init_scene_theme(desktop_plugin);
58 /*******************************************************************************/
60 init_scene_Accel(AWallpaperPlugin *desktop_plugin)
65 gint now = time(NULL);
67 gint sizes[4] = {170, 229, 130, 150},
68 sizes1[4] = {57, 76, 43, 50},
69 heights[4] = {0, 100, 200, 300},
72 fprintf(stderr, "init scene accel\n");
73 scene = g_new0(Scene, 1);
75 desktop_plugin->priv->scene = scene;
77 actor = init_object(desktop_plugin, "background", "bg.png",
81 scene->actors = g_slist_append(scene->actors, actor);
83 child = g_ptr_array_sized_new(16);
87 //for (i=0; i<3; i++){
88 str = g_strdup_printf("tape%i.png", n+1);
89 actor = init_object(desktop_plugin, "tape", str,
90 fast_rnd(800), fast_rnd(480), 2+fast_rnd(6), 800, sizes1[n],
93 scene->actors = g_slist_append(scene->actors, actor);
94 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;
169 /*******************************************************************************/
171 init_scene_Xsnow(AWallpaperPlugin *desktop_plugin){
172 fprintf(stderr,"init_scene_Xsnow\n");
173 char* child_argv[128];
174 char *run_string = NULL;
176 // fprintf(stderr, "PARAMETR %s\n", desktop_plugin->priv->theme_string_parametr1);
177 // run_string = g_strdup_printf("/usr/bin/mplayer -vo x11 -wid %d %s\n", \
178 GDK_WINDOW_XID(desktop_plugin->priv->window->window), desktop_plugin->priv->theme_string_parametr1);
179 run_string= g_strdup_printf("/usr/bin/xsnow");
180 parsestring(run_string, child_argv);
182 desktop_plugin->priv->podpid = fork();
183 if (desktop_plugin->priv->podpid == 0){
184 execvp("/usr/bin/xsnow", child_argv);
185 fprintf(stderr,"Problem with new podprocess");
190 init_scene_Video(AWallpaperPlugin *desktop_plugin)
193 GstElement *videosink;
195 gchar *file_plus_uri;
198 desktop_plugin->priv->pipeline = gst_pipeline_new("gst-player");
199 bin = gst_element_factory_make ("playbin2", "bin");
200 videosink = gst_element_factory_make ("ximagesink", "videosink");
201 g_object_set (G_OBJECT (bin), "video-sink", videosink, NULL);
202 gst_bin_add (GST_BIN (desktop_plugin->priv->pipeline), bin);
206 bus = gst_pipeline_get_bus (GST_PIPELINE (desktop_plugin->priv->pipeline));
207 gst_bus_add_watch(bus, bus_call, desktop_plugin);
208 gst_object_unref (bus);
210 file_plus_uri = g_strdup_printf("file://%s",desktop_plugin->priv->theme_string_parametr1);
211 g_object_set (G_OBJECT (bin), "uri", file_plus_uri, NULL );
212 g_object_set (G_OBJECT (videosink), "force-aspect-ratio", TRUE, NULL );
213 if (GST_IS_X_OVERLAY (videosink))
214 gst_x_overlay_set_xwindow_id (GST_X_OVERLAY (videosink), GDK_DRAWABLE_XID(desktop_plugin->priv->window->window));
215 if (desktop_plugin->priv->visible)
216 gst_element_set_state (desktop_plugin->priv->pipeline, GST_STATE_PLAYING);
218 /*******************************************************************************/
220 init_scene_Matrix(AWallpaperPlugin *desktop_plugin)
225 gint now = time(NULL);
228 if (desktop_plugin->priv->rich_animation){
236 /* fprintf(stderr, "init scene2 \n"); */
237 scene = g_new0(Scene, 1);
238 //scene.daytime = get_daytime();
239 scene->actors = NULL;
240 desktop_plugin->priv->scene = scene;
242 actor = init_object(desktop_plugin, "background", "bg.png",
244 TRUE, TRUE, 100, 255,
246 scene->actors = g_slist_append(scene->actors, actor);
248 actor = init_object(desktop_plugin, "symbols", "symbols.png",
250 TRUE, TRUE, 100, 255,
252 scene->actors = g_slist_append(scene->actors, actor);
254 child = g_ptr_array_sized_new(4);
255 actor = init_object(desktop_plugin, "layer1", "layer1_2.png",
257 TRUE, TRUE, 100, 255,
259 //actor->time_start_animation = now;
260 //actor->duration_animation = G_MAXINT;
261 scene->actors = g_slist_append(scene->actors, actor);
262 g_ptr_array_add(child, actor);
264 actor = init_object(desktop_plugin, "layer1", "layer1_1.png",
266 TRUE, TRUE, 100, 255,
268 //actor->time_start_animation = now;
269 //actor->duration_animation = G_MAXINT;
270 scene->actors = g_slist_append(scene->actors, actor);
271 g_ptr_array_add(child, actor);
273 actor = init_object(desktop_plugin, "layer2", "layer2_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, "layer2", "layer2_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, "layers", "",
293 FALSE, FALSE, 100, 255,
294 (gpointer)&change_layer, NULL, child);
295 actor->time_start_animation = now;
296 actor->duration_animation = G_MAXINT;
297 scene->actors = g_slist_append(scene->actors, actor);
299 run_long_timeout(desktop_plugin);
302 /*******************************************************************************/
303 /* Init Modern Scene */
305 init_scene_Modern(AWallpaperPlugin *desktop_plugin)
309 gint now = time(NULL);
314 /* fprintf(stderr, "init scene \n"); */
315 scene = g_new0(Scene, 1);
316 scene->daytime = get_daytime();
317 scene->actors = NULL;
318 scene->wind_orientation = -1;
319 scene->wind_angle = 0.3;
320 /* init value for random */
321 scene->seed = time(NULL);
322 scene->notification = TRUE;
323 desktop_plugin->priv->scene = scene;
324 actor = init_object(desktop_plugin, "sky", "sky0.png",
326 TRUE , TRUE, 100, 255,
327 (gpointer)&change_static_actor, NULL, NULL);
328 scene->actors = g_slist_append(scene->actors, actor);
329 change_static_actor(actor, desktop_plugin);
331 actor = init_object(desktop_plugin, "sun", "sun.png",
333 FALSE, FALSE, 100, 255,
334 (gpointer)&change_sun, NULL, NULL);
335 actor->time_start_animation = now;
336 actor->duration_animation = G_MAXINT;
337 change_sun(actor, desktop_plugin);
338 scene->actors = g_slist_append(scene->actors, actor);
340 //actor = init_object(desktop_plugin, "dot", "dot1.png", 0, 0, 11, 50, 50,
341 // TRUE, 100, 255, NULL, NULL);
342 //scene.actors = g_slist_append(scene.actors, actor);
344 actor = init_object(desktop_plugin, "cloud1", "cloud1.png",
345 0, fast_rnd(300)-97, 7, 150, 97,
346 FALSE, FALSE, 100, 255,
347 (gpointer)&change_cloud, NULL, NULL);
348 actor->time_start_animation = now + fast_rnd(20);
349 actor->duration_animation = 3*60;
350 scene->actors = g_slist_append(scene->actors, actor);
352 actor = init_object(desktop_plugin, "cloud2", "cloud2.png",
353 0, fast_rnd(300)-75, 7, 188, 75,
354 FALSE, FALSE, 100, 255,
355 (gpointer)&change_cloud, NULL, NULL);
356 actor->time_start_animation = now + fast_rnd(40)+10;
357 actor->duration_animation = 3*60;
358 scene->actors = g_slist_append(scene->actors, actor);
360 actor = init_object(desktop_plugin, "cloud4", "cloud4.png",
361 0, fast_rnd(300)-75, 7, 150, 75,
362 FALSE, FALSE, 100, 255,
363 (gpointer)&change_cloud, NULL, NULL);
364 actor->time_start_animation = now + fast_rnd(60) + 20;
365 actor->duration_animation = 5*60;
366 scene->actors = g_slist_append(scene->actors, actor);
369 actor = init_object(desktop_plugin, "town", "town0.png",
371 TRUE, TRUE, 100, 255,
372 (gpointer)&change_static_actor, NULL, NULL);
373 change_static_actor(actor, desktop_plugin);
374 scene->actors = g_slist_append(scene->actors, actor);
376 actor = init_object(desktop_plugin, "stend", "stend0.png",
377 452, 166, 9, 300, 305,
378 TRUE, TRUE, 100, 255,
379 (gpointer)&change_static_actor, NULL, NULL);
380 change_static_actor(actor, desktop_plugin);
381 scene->actors = g_slist_append(scene->actors, actor);
384 child = g_ptr_array_sized_new(4);
385 actor = init_object(desktop_plugin, "call", "call.png",
387 FALSE, TRUE, 100, 255,
389 scene->actors = g_slist_append(scene->actors, actor);
390 g_ptr_array_add(child, actor);
392 actor = init_object(desktop_plugin, "chat", "chat.png",
394 FALSE, TRUE, 100, 255,
396 scene->actors = g_slist_append(scene->actors, actor);
397 g_ptr_array_add(child, actor);
399 actor = init_object(desktop_plugin, "mail", "mail.png",
401 FALSE, TRUE, 100, 255,
403 scene->actors = g_slist_append(scene->actors, actor);
404 g_ptr_array_add(child, actor);
406 actor = init_object(desktop_plugin, "sms", "sms.png",
408 FALSE, TRUE, 100, 255,
410 scene->actors = g_slist_append(scene->actors, actor);
411 g_ptr_array_add(child, actor);
413 actor = init_object(desktop_plugin, "billboard_text", "",
414 470, 174, 9, 300, 108,
415 FALSE, FALSE, 100, 255,
416 (gpointer)&change_billboard, NULL, child);
417 create_hildon_actor_text(actor, desktop_plugin);
418 //actor->time_start_animation = time(NULL) + 20;
419 change_billboard(actor, desktop_plugin);
420 scene->actors = g_slist_append(scene->actors, actor);
422 actor = init_object(desktop_plugin, "tram", "tram.png",
423 -300, 225, 10, 350, 210,
424 FALSE, FALSE, 100, 255,
425 (gpointer)&change_tram, NULL, NULL);
426 actor->time_start_animation = time(NULL) + fast_rnd(10);
427 actor->duration_animation = 60;
428 scene->actors = g_slist_append(scene->actors, actor);
430 actor = init_object(desktop_plugin, "border", "border0.png",
431 0, 480-79, 11, 800, 79,
432 TRUE, TRUE, 100, 255,
433 (gpointer)&change_static_actor_with_corner, NULL, NULL);
434 change_static_actor_with_corner(actor, desktop_plugin);
435 scene->actors = g_slist_append(scene->actors, actor);
437 actor = init_object(desktop_plugin, "moon", "moon1.png",
439 FALSE, FALSE, 100, 255,
440 (gpointer)&change_moon, NULL, NULL);
441 change_moon(actor, desktop_plugin);
442 scene->actors = g_slist_append(scene->actors, actor);
444 actor = init_object(desktop_plugin, "wind", "",
446 FALSE, FALSE, 100, 255,
447 (gpointer)&change_wind, NULL, NULL);
448 change_wind(actor, desktop_plugin);
449 scene->actors = g_slist_append(scene->actors, actor);
451 /* windows in 4-th house */
491 for (i=0; i<13; i++){
492 actor = init_object(desktop_plugin, "window1", "window1.png",
493 winds[i][0], winds[i][1], 8, 8, 10,
494 FALSE, FALSE, 100, 255,
495 (gpointer)&change_window1, NULL, NULL);
496 //change_window1(actor, desktop_plugin);
497 actor->time_start_animation = now + fast_rnd(30);
498 scene->actors = g_slist_append(scene->actors, actor);
502 /* windows in 1-th house */
528 actor = init_object(desktop_plugin, "window2", "window2.png",
529 winds[i][0], winds[i][1], 8, 8, 10,
530 FALSE, FALSE, 100, 255,
531 (gpointer)&change_window1, NULL, NULL);
532 //change_window1(actor, desktop_plugin);
533 actor->time_start_animation = now + fast_rnd(30);
534 scene->actors = g_slist_append(scene->actors, actor);
538 /* windows in 3-th house */
570 for (i=0; i<10; i++){
571 actor = init_object(desktop_plugin, "window3", "window3.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 5-th house */
605 actor = init_object(desktop_plugin, "window4", "window4.png",
606 winds[i][0], winds[i][1], 8, 8, 10,
607 FALSE, FALSE, 100, 255,
608 (gpointer)&change_window1, NULL, NULL);
609 //change_window1(actor, desktop_plugin);
610 actor->time_start_animation = now + fast_rnd(30);
611 scene->actors = g_slist_append(scene->actors, actor);
615 /* windows in 6-th house */
636 actor = init_object(desktop_plugin, "window5", "window5.png",
637 winds[i][0], winds[i][1], 8, 8, 10,
638 FALSE, FALSE, 100, 255,
639 (gpointer)&change_window1, NULL, NULL);
640 //change_window1(actor, desktop_plugin);
641 actor->time_start_animation = now + fast_rnd(30);
642 scene->actors = g_slist_append(scene->actors, actor);
645 run_long_timeout(desktop_plugin);
648 anim = g_new0(Animation, 1);
651 anim->func_change = &change_tram;
652 anim->func_time = NULL;
653 anim->timestart = time(NULL);
656 scene.dynamic_actors = g_slist_append(scene.dynamic_actors, anim);
659 /*******************************************************************************/
660 /* Init Berlin Scene */
662 init_scene_Berlin(AWallpaperPlugin *desktop_plugin)
664 Actor *actor, *actor1, *actor2;
666 gint now = time(NULL);
669 GPtrArray *child = NULL;
671 scene = g_new0(Scene, 1);
672 scene->daytime = get_daytime();
673 scene->actors = NULL;
674 scene->wind_orientation = -1;
675 scene->wind_angle = 0.3;
676 /* init value for random */
677 scene->seed = time(NULL);
678 desktop_plugin->priv->scene = scene;
680 actor = init_object(desktop_plugin, "sky", "sky.png", 0, 0, 5, 800, 480,
681 TRUE, TRUE, 100, 255,
682 (gpointer)&change_static_actor, NULL, NULL);
683 change_static_actor(actor, desktop_plugin);
684 scene->actors = g_slist_append(scene->actors, actor);
687 actor = init_object(desktop_plugin, "sun", "sun.png", 0, 0, 6, 88, 88,
688 FALSE, FALSE, 100, 255,
689 (gpointer)&change_sun, NULL, NULL);
690 actor->time_start_animation = time(NULL);
691 actor->duration_animation = G_MAXINT;
692 change_sun(actor, desktop_plugin);
693 scene->actors = g_slist_append(scene->actors, actor);
696 actor = init_object(desktop_plugin, "dot", "dot1.png", 0, 0, 11, 50, 50,
697 TRUE, 100, 255, NULL, NULL);
698 scene.actors = g_slist_append(scene.actors, actor);
701 actor = init_object(desktop_plugin, "moon", "moon1.png", 400, 15, 6, 60, 60,
702 FALSE, FALSE, 100, 255,
703 (gpointer)&change_moon, NULL, NULL);
704 change_moon(actor, desktop_plugin);
705 scene->actors = g_slist_append(scene->actors, actor);
707 actor = init_object(desktop_plugin, "cloud1", "cloud1.png", 0, fast_rnd(300)-97, 7, 150, 97,
708 FALSE, FALSE, 100, 255,
709 (gpointer)&change_cloud, NULL, NULL);
710 actor->time_start_animation = now + fast_rnd(30) + 10;
711 actor->duration_animation = 3*60;
712 scene->actors = g_slist_append(scene->actors, actor);
714 actor = init_object(desktop_plugin, "cloud2", "cloud2.png", 0, fast_rnd(300)-75, 7, 188, 75,
715 FALSE, FALSE, 100, 255,
716 (gpointer)&change_cloud, NULL, NULL);
717 actor->time_start_animation = now + fast_rnd(10);
718 actor->duration_animation = 3*60;
719 scene->actors = g_slist_append(scene->actors, actor);
721 actor = init_object(desktop_plugin, "cloud4", "cloud4.png", 0, fast_rnd(300)-75, 7, 150, 75,
722 FALSE, FALSE, 100, 255,
723 (gpointer)&change_cloud, NULL, NULL);
724 actor->time_start_animation = now + fast_rnd(60) + 20;
725 actor->duration_animation = 5*60;
726 scene->actors = g_slist_append(scene->actors, actor);
729 actor = init_object(desktop_plugin, "plane2", "plane3.png", 0, 45, 8, 160, 50,
730 FALSE, FALSE, 100, 255,
731 (gpointer)&change_plane2, NULL, NULL);
732 actor->time_start_animation = now + fast_rnd(40) + 20;
733 actor->duration_animation = 60;
734 scene->actors = g_slist_append(scene->actors, actor);
736 actor = init_object(desktop_plugin, "plane1", "tu154.png", 620, 233, 9, 300, 116,
737 FALSE, FALSE, 100, 255,
738 (gpointer)&change_plane1, NULL, NULL);
739 actor->time_start_animation = now + fast_rnd(20);
740 actor->duration_animation = 30;
741 scene->actors = g_slist_append(scene->actors, actor);
743 actor = init_object(desktop_plugin, "town", "town.png", 0, 0, 10, 800, 480,
744 TRUE, TRUE, 100, 255,
745 (gpointer)&change_static_actor_with_corner, NULL, NULL);
746 change_static_actor_with_corner(actor, desktop_plugin);
747 scene->actors = g_slist_append(scene->actors, actor);
749 actor = init_object(desktop_plugin, "wind", "", 0, 0, 5, 0, 0,
750 FALSE, FALSE, 100, 255,
751 (gpointer)&change_wind, NULL, NULL);
752 change_wind(actor, desktop_plugin);
753 scene->actors = g_slist_append(scene->actors, actor);
755 actor1 = init_object(desktop_plugin, "signal_red", "red.png",
756 486, 425, 10, 18, 38,
757 FALSE, TRUE, 100, 255, NULL, NULL, NULL);
758 //actor->time_start_animation = now + fast_rnd(30) + 10;
759 scene->actors = g_slist_append(scene->actors, actor1);
761 actor2 = init_object(desktop_plugin, "signal_green", "green.png",
762 486, 425, 10, 18, 38,
763 TRUE, TRUE, 100, 255, NULL, NULL, NULL);
764 //actor->time_start_animation = now + fast_rnd(30) + 10;
765 scene->actors = g_slist_append(scene->actors, actor2);
766 child = g_ptr_array_sized_new(2);
767 g_ptr_array_add(child, actor1);
768 g_ptr_array_add(child, actor2);
769 actor = init_object(desktop_plugin, "signal", "",
770 486, 425, 10, 18, 38,
771 FALSE, FALSE, 100, 255,
772 (gpointer)&change_signal, NULL, child);
773 actor->time_start_animation = now + fast_rnd(30) + 10;
774 scene->actors = g_slist_append(scene->actors, actor);
815 for (i=0; i<13; i++){
816 actor = init_object(desktop_plugin, "window", "window.png",
817 winds[i][0], winds[i][1], 10, 8, 9,
818 FALSE, TRUE, 100, 255,
819 (gpointer)&change_window1, NULL, NULL);
820 //change_window1(actor, desktop_plugin);
821 actor->time_start_animation = now + fast_rnd(30);
822 scene->actors = g_slist_append(scene->actors, actor);
826 run_long_timeout(desktop_plugin);
829 /*******************************************************************************/
831 init_scene_theme(AWallpaperPlugin *desktop_plugin)
833 void (*func)(gpointer);
834 func = g_hash_table_lookup(desktop_plugin->priv->hash_scene_func, desktop_plugin->priv->theme);
836 (*func)(desktop_plugin);