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-common.h"
26 #include "livewp-home-widget.h"
27 #include <gconf/gconf-client.h>
28 #include "livewp-rules.h"
30 #define PLUGIN_NAME "livewp-home-widget.desktop-0"
31 #define GCONF_KEY_POSITION "/apps/osso/hildon-desktop/applets/%s/position"
32 #define GCONF_KEY_MODIFIED "/apps/osso/hildon-desktop/applets/%s/modified"
33 #define GCONF_KEY_VIEW "/apps/osso/hildon-desktop/applets/%s/view"
35 HD_DEFINE_PLUGIN_MODULE (AWallpaperPlugin, animation_wallpaper_plugin, HD_TYPE_HOME_PLUGIN_ITEM)
36 #define Animation_Wallpaper_HOME_PLUGIN_GET_PRIVATE(obj) (G_TYPE_INSTANCE_GET_PRIVATE (obj,\
37 Animation_Wallpaper_TYPE_HOME_PLUGIN,\
38 Animation_WallpaperPrivate))
40 /* Position of plugin on desktop */
41 #define Xstartposition 700
42 #define Ystartposition 425
44 gint xapplet = 0, yapplet = 0;
45 GSList * objects_list = NULL;
49 lw_applet_realize (GtkWidget *widget)
53 screen = gtk_widget_get_screen (widget);
54 gtk_widget_set_colormap (widget,
55 gdk_screen_get_rgba_colormap (screen));
56 gtk_widget_set_app_paintable (widget,
58 GTK_WIDGET_CLASS (animation_wallpaper_plugin_parent_class)->realize (widget);
63 lw_applet_expose_event(GtkWidget *widget,
64 GdkEventExpose *event)
68 /* Create cairo context */
69 cr = gdk_cairo_create (GDK_DRAWABLE (widget->window));
70 gdk_cairo_region (cr, event->region);
73 /* Draw alpha background */
74 cairo_set_operator (cr, CAIRO_OPERATOR_SOURCE);
75 cairo_set_source_rgba (cr, 0.0, 0.0, 0.0, 0.0);
81 return GTK_WIDGET_CLASS (animation_wallpaper_plugin_parent_class)->expose_event (widget,
86 expose_event (GtkWidget *widget,GdkEventExpose *event,
90 GdkPixbuf *pixbuf = (GdkPixbuf *) data;
92 cr = gdk_cairo_create(widget->window);
94 gdk_cairo_region(cr, event->region);
95 cairo_set_operator(cr, CAIRO_OPERATOR_SOURCE);
96 gdk_cairo_set_source_pixbuf(cr, pixbuf, 0.0, 0.0);
104 realize (GtkWidget *widget)
107 screen = gtk_widget_get_screen (widget);
108 gtk_widget_set_colormap (widget, gdk_screen_get_rgba_colormap (screen));
111 /* Set position of widget on desktop */
113 init_applet_position(void)
115 GSList *position = NULL;
119 GError *error = NULL;
120 GConfClient *gconf_client = gconf_client_get_default ();
121 position_key = g_strdup_printf (GCONF_KEY_POSITION, PLUGIN_NAME);
122 position = gconf_client_get_list (gconf_client,
126 if (position && position->data && position->next->data){
127 xapplet = GPOINTER_TO_INT (position->data);
128 yapplet = GPOINTER_TO_INT (position->next->data);
130 position = g_slist_prepend (g_slist_prepend (NULL,
131 GINT_TO_POINTER (Ystartposition)),
132 GINT_TO_POINTER (Xstartposition));
133 gconf_client_set_list (gconf_client,
138 xapplet = Xstartposition;
139 yapplet = Ystartposition;
141 g_free (position_key);
142 modified = g_strdup_printf ("%ld", 0);
143 modified_key = g_strdup_printf (GCONF_KEY_MODIFIED, PLUGIN_NAME);
144 gconf_client_set_string (gconf_client,
149 g_free(modified_key);
150 gconf_client_clear_cache(gconf_client);
151 g_object_unref(gconf_client);
155 actor_set_position_full(GtkWidget *actor, gint x, gint y, gint z)
157 // fprintf(stderr, "actor_set_position_full\n");
158 hildon_animation_actor_set_position_full (HILDON_ANIMATION_ACTOR (actor),x-xapplet, y-yapplet, z);
162 path_line(gint x0, gint x1, double t)
165 return ((x1 - x0) * t + x0);
170 destroy_hildon_actor(Actor *actor)
172 fprintf(stderr, "estroy_hildon_actor %p\n",actor->widget);
173 gtk_widget_destroy(actor->widget);
174 actor->widget = NULL;
178 init_object(AWallpaperPlugin *desktop_plugin,
189 void (*pfunc_change)(Actor*),
190 void (*pfunc_probability)(Actor*)
194 actor = g_new0(Actor, 1);
198 actor->width = width;
199 actor->height = height;
200 actor->visible = visible;
201 actor->scale = scale;
202 actor->opacity = opacity;
203 actor->filename = g_strdup(filename);
204 actor->name = g_strdup(name);
205 actor->func_change = pfunc_change;
206 actor->func_probability = pfunc_probability;
208 create_hildon_actor(actor, desktop_plugin);
210 actor->widget = NULL;
211 actor->time_start_animation = 0;
212 actor->duration_animation = 0;
220 //objects_list = g_slist_append(objects_list, G_OBJECT(actor));
221 //objects_list = g_slist_append(objects_list, G_OBJECT(a));
226 change_moon(Actor * actor, AWallpaperPlugin *desktop_plugin)
228 gint x, y, z, daytime, phase;
232 daytime = get_daytime();
233 if (daytime == TIME_NIGHT){
234 if (!actor->visible){
235 actor->visible = TRUE;
236 phase = get_moon_phase();
237 newfile = g_strdup_printf( "%s%d.png", actor->name, phase);
239 actor->filename = newfile;
240 create_hildon_actor(actor, desktop_plugin);
245 // actor_set_position_full(actor->widget, x, y, actor->z);
246 //probability_sun(actor);
247 //fprintf(stderr, "after change sun %d\n", actor->time_start_animation);
248 }else if (actor->visible){
249 actor->visible = FALSE;
250 fprintf(stderr, "destroy moon \n");
251 destroy_hildon_actor(actor);
252 /* TO DO make moonrise*/
253 actor->time_start_animation = get_next_sunset();
260 change_sun(Actor * actor, AWallpaperPlugin *desktop_plugin)
263 gint x, y, z, daytime;
266 daytime = get_daytime();
267 if (daytime != TIME_NIGHT){
268 if (!actor->visible){
269 actor->visible = TRUE;
271 create_hildon_actor(actor, desktop_plugin);
273 get_sun_pos(&alt, &azm);
274 get_sun_screen_pos(alt, azm, &x, &y);
277 actor_set_position_full(actor->widget, x, y, actor->z);
278 probability_sun(actor);
279 }else if (actor->visible){
280 actor->visible = FALSE;
281 destroy_hildon_actor(actor);
282 actor->time_start_animation = get_next_sunrise();
288 change_tram(Actor * actor, AWallpaperPlugin *desktop_plugin)
290 gint x0 = -300, y0 = 225, scale0 = 100,
291 x1 = 800, y1 = 162, scale1 = 130,
293 gint daytime = get_daytime();
294 time_t now = time(NULL);
297 if (!actor->visible){
298 actor->visible = TRUE;
299 if (daytime == TIME_NIGHT)
300 actor->filename = g_strdup("tram_dark.png");
302 actor->filename = g_strdup("tram.png");
303 create_hildon_actor(actor, desktop_plugin);
305 t = (double)(now - actor->time_start_animation) / actor->duration_animation;
306 x = path_line(x0, x1, t);
307 y = path_line(y0, y1, t);
308 scale = path_line(scale0, scale1, t);
309 fprintf(stderr, "change tram t=%f x=%d y=%d scale=%d\n", t, x, y, scale);
310 actor_set_position_full(actor->widget, x, y, actor->z);
311 hildon_animation_actor_set_scale(actor->widget, (double)scale/100, (double)scale/100);
314 actor->visible = FALSE;
315 destroy_hildon_actor(actor);
316 actor->time_start_animation = now + 20;
320 create_hildon_actor(Actor *actor, AWallpaperPlugin *desktop_plugin)
322 GtkWidget *ha = NULL;
323 GdkPixbuf *pixbuf = NULL;
324 GtkWidget *image = NULL;
327 fprintf(stderr, "create_hildon_actor %s\n", actor->name);
328 ha = hildon_animation_actor_new();
329 str = g_strdup_printf( "%s/%s/%s", THEME_PATH,
330 desktop_plugin->priv->theme, actor->filename);
331 pixbuf = gdk_pixbuf_new_from_file_at_size (str,
336 image = gtk_image_new_from_pixbuf (pixbuf);
337 g_object_unref(G_OBJECT(pixbuf));
340 g_signal_connect(G_OBJECT(image), "expose_event",
341 G_CALLBACK(expose_event), pixbuf);
342 gtk_container_add (GTK_CONTAINER (ha), image);
344 actor_set_position_full(ha, actor->x, actor->y, actor->z);
345 hildon_animation_actor_set_show (ha, actor->visible);
346 hildon_animation_actor_set_scale(ha, (double)actor->scale/100, (double)actor->scale/100);
348 gtk_widget_show_all(ha);
350 //g_object_set_data(G_OBJECT(ha), "name", name);
351 //g_object_set_data(G_OBJECT(ha), "filename", filename);
352 g_object_set_data(G_OBJECT(ha), "image", image);
354 g_object_set_data(G_OBJECT(ha), "x", x);
355 g_object_set_data(G_OBJECT(ha), "y", y);
356 g_object_set_data(G_OBJECT(ha), "z", z);
357 g_object_set_data(G_OBJECT(ha), "width", width);
358 g_object_set_data(G_OBJECT(ha), "height", height);
359 g_object_set_data(G_OBJECT(ha), "scale", scale);
360 g_object_set_data(G_OBJECT(ha), "visible", visible);
361 g_object_set_data(G_OBJECT(ha), "opacity", opacity);
362 g_object_set_data(G_OBJECT(ha), "func", pfunc);
364 hildon_animation_actor_set_parent (HILDON_ANIMATION_ACTOR (ha), desktop_plugin);
365 fprintf(stderr, "ha %p\n", ha);
371 change_hildon_actor(Actor *actor, AWallpaperPlugin *desktop_plugin)
373 GtkWidget *image = NULL;
374 GdkPixbuf *pixbuf = NULL;
377 str = g_strdup_printf( "%s/%s/%s", THEME_PATH,
378 desktop_plugin->priv->theme, actor->filename);
380 pixbuf = gdk_pixbuf_new_from_file_at_size (str,
385 image = gtk_image_new_from_pixbuf (pixbuf);
386 g_object_unref(G_OBJECT(pixbuf));
389 g_signal_connect(G_OBJECT(image), "expose_event",
390 G_CALLBACK(expose_event), pixbuf);
391 if (g_object_get_data(G_OBJECT(actor->widget), "image")){
392 gtk_container_remove(actor->widget, g_object_get_data(G_OBJECT(actor->widget), "image"));
394 g_object_set_data(G_OBJECT(actor->widget), "image", image);
395 gtk_container_add (GTK_CONTAINER (actor->widget), image);
396 realize(actor->widget);
397 gtk_widget_show_all(actor->widget);
404 change_static_actor(Actor * actor, AWallpaperPlugin *desktop_plugin)
409 daytime = get_daytime();
410 newfile = g_strdup_printf("%s%d.png", actor->name, daytime);
411 actor->filename = newfile;
412 change_hildon_actor(actor, desktop_plugin);
417 void change_sky(GtkWidget * actor, gpointer data)
419 gint daytime, opacity;
420 //fprintf(stderr, "change sky \n");
422 daytime = get_daytime();
423 opacity = g_object_get_data(G_OBJECT(actor), "opacity") - 10;
424 if (opacity < 0) opacity = 255;
425 hildon_animation_actor_set_show_full(actor, 1, opacity);
426 g_object_set_data(G_OBJECT(actor), "opacity", opacity);
429 //fprintf(stderr, "change sky night\n");
432 //fprintf(stderr, "change sky day\n");
439 change_background(GtkWidget * actor, gpointer data)
443 opacity = g_object_get_data(G_OBJECT(actor), "opacity") - 1;
444 if (opacity < 0) opacity = 255;
445 hildon_animation_actor_set_show_full(actor, 1, opacity);
446 g_object_set_data(G_OBJECT(actor), "opacity", opacity);
454 // уравнение изменения времени
461 GSList * tmp = scene.actors;
464 gtk_widget_destroy(tmp->data);
467 tmp = g_slist_next(tmp);
474 reload_scene(AWallpaperPlugin *desktop_plugin)
476 fprintf(stderr,"Reload scene %s\n", desktop_plugin->priv->theme);
478 if (!strcmp(desktop_plugin->priv->theme,"Modern"))
479 init_scene(desktop_plugin);
480 else if (!strcmp(desktop_plugin->priv->theme,"Berlin"))
481 init_scene(desktop_plugin);
485 probability_sun(Actor *actor)
487 actor->time_start_animation += 20 * 1;
488 actor->duration_animation = G_MAXINT;
492 init_scene(AWallpaperPlugin *desktop_plugin)
495 GSList * list = NULL;
498 fprintf(stderr, "init scene \n");
499 scene.daytime = get_daytime();
501 //get_sun_pos(&alt, &azm);
502 //get_sun_screen_pos(alt, azm, &x, &y);
504 actor = init_object(desktop_plugin, "sun", "sun.png", 0, 0, 11, 88, 88,
505 TRUE, 100, 255, &change_sun, &probability_sun);
506 actor->time_start_animation = time(NULL);
507 actor->duration_animation = G_MAXINT;
508 change_sun(actor, desktop_plugin);
509 scene.actors = g_slist_append(scene.actors, actor);
510 //scene.dynamic_actors = g_slist_append(scene.dynamic_actors, G_OBJECT(actor));
512 actor = init_object(desktop_plugin, "sky", "sky0.png", 0, 0, 5, 800, 480,
513 TRUE, 100, 255, &change_static_actor, NULL);
514 change_static_actor(actor, desktop_plugin);
515 scene.actors = g_slist_append(scene.actors, actor);
518 actor = init_object(desktop_plugin, "town", "town0.png", 0, 480-374, 10, 800, 374,
519 TRUE, 100, 255, &change_static_actor, NULL);
520 change_static_actor(actor, desktop_plugin);
521 scene.actors = g_slist_append(scene.actors, actor);
523 actor = init_object(desktop_plugin, "border", "border0.png", 0, 480-79, 30, 800, 79,
524 TRUE, 100, 255, &change_static_actor, NULL);
525 change_static_actor(actor, desktop_plugin);
526 scene.actors = g_slist_append(scene.actors, actor);
528 actor = init_object(desktop_plugin, "moon", "moon1.png", 400, 20, 7, 70, 70,
529 FALSE, 100, 255, &change_moon, NULL);
530 change_moon(actor, desktop_plugin);
531 scene.actors = g_slist_append(scene.actors, actor);
534 //if (scene.daytime == TIME_DAY) snprintf(str, 255, "tram.png");
535 //else snprintf(str, 255, "tram_dark.png");
536 //actor = init_object("tram", "tram.png", -300, 191, 25, 350, 210, 1, 100, 255, NULL);
538 actor = init_object(desktop_plugin, "tram", "tram_dark.png", -300, 225, 25, 350, 210,
539 FALSE, 100, 255, &change_tram, NULL);
540 actor->time_start_animation = time(NULL) + 10;
541 actor->duration_animation = 20;
542 scene.actors = g_slist_append(scene.actors, actor);
544 anim = g_new0(Animation, 1);
547 anim->func_change = &change_tram;
548 anim->func_time = NULL;
549 anim->timestart = time(NULL);
552 scene.dynamic_actors = g_slist_append(scene.dynamic_actors, anim);
557 init_scene1(AWallpaperPlugin *desktop_plugin)
564 GSList * list = NULL;
566 scene.daytime = get_daytime();
567 scene.dynamic_actors = NULL;
568 scene.static_actors = NULL;
570 actor = init_object(desktop_plugin, "sun", "sun.png", 0, 0, 20, 88, 88, 1, 100, 255, &change_sun);
571 change_sun(actor, NULL);
572 //scene.static_actors = g_slist_append(scene.static_actors, G_OBJECT(actor));
573 scene.dynamic_actors = g_slist_append(scene.dynamic_actors, G_OBJECT(actor));
575 actor = init_object(desktop_plugin, "background", "sky_dark.png", 0, 0, 4, 800, 480, 1, 100, 255, NULL);
576 scene.dynamic_actors = g_slist_append(scene.dynamic_actors, G_OBJECT(actor));
578 actor = init_object(desktop_plugin, "sky", "sky.png", 0, 0, 5, 800, 480, 1, 100, 255, &change_static_actor);
579 change_static_actor(actor, NULL);
580 scene.static_actors = g_slist_append(scene.static_actors, G_OBJECT(actor));
582 actor = init_object(desktop_plugin, "town", "town.png", 0, 0, 10, 800, 480, 1, 100, 255, &change_static_actor);
583 change_static_actor(actor, NULL);
584 scene.static_actors = g_slist_append(scene.static_actors, G_OBJECT(actor));
587 actor = init_object("cloud1", 400, 150, 2, 200, 150, NULL);
588 scene.dynamic_actors = g_slist_append(scene.dynamic_actors, G_OBJECT(actor));
590 actor = init_object("sun", 10, 10, 50, 88, 88, NULL);
591 list = g_slist_append(list, G_OBJECT(actor));
592 actor = init_object("cloud1", 50, 50, 49, 150, 100, NULL);
593 list = g_slist_append(list, G_OBJECT(actor));
595 ma1 = multiactor_init("multi", list, 0, 0, 50, 1.0, TRUE);
596 //objects_list = g_slist_append(objects_list, G_OBJECT(ma));
603 get_sun_screen_pos(double alt, double azm, gint * x, gint * y)
605 gint y0 = 365;// - уровень горизонта
608 *x = (int)(azm * 800) - 64;
609 *y = (int)((1 - alt) * y0) - 64;
610 //fprintf(stderr, "sun pos x=%d y=%d\n", *x, *y);
614 change_actor(GtkWidget * actor)
617 gint x, y, daytime, scale;
624 void (*pfunc)(gpointer, gpointer);
626 name = g_object_get_data(G_OBJECT(actor), "name");
627 fprintf(stderr, "change actor %s\n", name);
629 pfunc = g_object_get_data(G_OBJECT(actor), "func");
631 (*pfunc)(actor, g_strdup(name));
632 daytime = get_daytime();
633 if (daytime != TIME_NIGHT){
634 hildon_animation_actor_set_show(actor, 1);
635 get_sun_pos(&alt, &azm);
636 get_sun_screen_pos(alt, azm, &x, &y);
637 actor_set_position_full(actor, x, y, g_object_get_data(G_OBJECT(actor), "z"));
641 if (name == "cloud1"){
642 x = g_object_get_data(G_OBJECT(actor), "x");
643 y = g_object_get_data(G_OBJECT(actor), "y");
644 scale = g_object_get_data(G_OBJECT(actor), "scale");
647 image = g_object_get_data(G_OBJECT(actor), "image");
649 gtk_container_remove(actor, image);
650 pixbuf = gdk_pixbuf_new_from_file_at_size ("/usr/share/livewp/theme/Modern/sun.png",
655 image = gtk_image_new_from_pixbuf (pixbuf);
656 g_object_unref(G_OBJECT(pixbuf));
658 g_signal_connect(G_OBJECT(image), "expose_event",
659 G_CALLBACK(expose_event), pixbuf);
660 gtk_container_add (GTK_CONTAINER (actor), image);
662 gtk_widget_show_all(actor);
674 sc = (double)scale / 100;
675 hildon_animation_actor_set_scale(actor, sc, sc);
676 fprintf(stderr, "cloud x=%d y=%d scale=%f", x, y, sc);
677 actor_set_position_full(actor, x, y, g_object_get_data(G_OBJECT(actor), "z"));
678 g_object_set_data(G_OBJECT(actor), "x", x);
679 g_object_set_data(G_OBJECT(actor), "y", y);
680 g_object_set_data(G_OBJECT(actor), "scale", scale);
686 plugin_on_timeout (AWallpaperPlugin *desktop_plugin)
688 gint daytime = get_daytime();
691 void (*pfunc)(gpointer, gpointer);
696 /* TODO remove timeout */
697 if (!desktop_plugin->priv->visible)
699 fprintf(stderr, "timer daytime=%d\n", daytime);
700 if (scene.daytime != daytime){
703 //change_actor(tmp->data);
704 pfunc =((Actor*)tmp->data)->func_change;
706 (*pfunc)(tmp->data, desktop_plugin);
708 tmp = g_slist_next(tmp);
713 //fprintf(stderr, "Now %d\n", now);
717 if (now >= actor->time_start_animation
718 && actor->time_start_animation > 0
719 /* && now - actor->time_start_animation <= actor->duration_animation*/){
720 pfunc = actor->func_change;
722 (*pfunc)(actor, desktop_plugin);
724 tmp = g_slist_next(tmp);
727 scene.daytime = daytime;
729 return TRUE; /* keep running this event */
733 desktop_plugin_visible_notify (GObject *object,
735 AWallpaperPlugin *desktop_plugin)
738 g_object_get (object, "is-on-current-desktop", &visible, NULL);
740 desktop_plugin->priv->visible = TRUE;
742 desktop_plugin->priv->visible = FALSE;
743 /* fprintf (stderr, "is-on-current-desktop changed. visible: %u", visible); */
747 animation_wallpaper_plugin_init (AWallpaperPlugin *desktop_plugin)
751 fprintf(stderr, "!!!!!!!plugin init \n");
752 Animation_WallpaperPrivate *priv = Animation_Wallpaper_HOME_PLUGIN_GET_PRIVATE (desktop_plugin);
753 desktop_plugin->priv = Animation_Wallpaper_HOME_PLUGIN_GET_PRIVATE (desktop_plugin);
756 priv->desktop_plugin = desktop_plugin;
757 label = gtk_label_new ("");
758 gtk_widget_set_size_request(label, 95, 30);
759 gtk_widget_show (label);
760 hd_home_plugin_item_set_settings (HD_HOME_PLUGIN_ITEM (desktop_plugin), TRUE);
761 g_signal_connect (desktop_plugin, "show-settings",
762 G_CALLBACK (lw_settings), priv);
763 g_signal_connect (desktop_plugin, "notify::is-on-current-desktop",
764 G_CALLBACK (desktop_plugin_visible_notify), desktop_plugin);
766 gtk_container_add (GTK_CONTAINER (desktop_plugin), label);
767 init_applet_position();
768 fprintf(stderr, "!!!theme = %s\n", priv->theme);
769 if (!strcmp(priv->theme,"Modern"))
770 init_scene(desktop_plugin);
771 else if (!strcmp(priv->theme,"Berlin"))
772 init_scene(desktop_plugin);
773 priv->timer = g_timeout_add(LONG_TIMER, plugin_on_timeout, desktop_plugin);
774 /* TODO Move scene to priv */
775 scene.timer_type = LONG_TIMER_TYPE;
779 lw_applet_finalize (GObject *object)
781 AWallpaperPlugin *desktop_plugin = Animation_Wallpaper_HOME_PLUGIN (object);
782 Animation_WallpaperPrivate *priv = desktop_plugin->priv;
785 g_source_remove(priv->timer);
792 animation_wallpaper_plugin_class_init (AWallpaperPluginClass *klass) {
794 GtkWidgetClass *widget_class = GTK_WIDGET_CLASS (klass);
795 GtkObjectClass *gobject_class = GTK_OBJECT_CLASS (klass);
798 gobject_class->destroy = lw_applet_finalize;
799 widget_class->realize = lw_applet_realize;
800 widget_class->expose_event = lw_applet_expose_event;
802 g_type_class_add_private (klass, sizeof (Animation_WallpaperPrivate));
807 animation_wallpaper_plugin_class_finalize (AWallpaperPluginClass *class) {}