}
-void
-get_sun_screen_pos(double alt, double azm, gint * x, gint * y)
-{
- gint y0 = 365;// - уровень горизонта
- *x = (int)(azm * 800) - 64;
- *y = (int)((1 - alt) * y0) - 64;
- //fprintf(stderr, "sun pos alt=%f azm=%f x=%d y=%d\n", alt, azm, *x, *y);
-}
-#if 0
-static void
-change_actor(GtkWidget * actor)
-{
- char * name;
- gint x, y, daytime, scale;
- gdouble sc;
- double alt, azm;
-
- GtkWidget *image;
- GdkPixbuf *pixbuf;
-
- void (*pfunc)(gpointer, gpointer);
-
- name = g_object_get_data(G_OBJECT(actor), "name");
- fprintf(stderr, "change actor %s\n", name);
- if (name == "sun"){
- pfunc = g_object_get_data(G_OBJECT(actor), "func");
- if (pfunc)
- (*pfunc)(actor, g_strdup(name));
- daytime = get_daytime();
- if (daytime != TIME_NIGHT){
- hildon_animation_actor_set_show(actor, 1);
- get_sun_pos(&alt, &azm);
- get_sun_screen_pos(alt, azm, &x, &y);
- actor_set_position_full(actor, x, y, g_object_get_data(G_OBJECT(actor), "z"));
- }
- }
-
- if (name == "cloud1"){
- x = g_object_get_data(G_OBJECT(actor), "x");
- y = g_object_get_data(G_OBJECT(actor), "y");
- scale = g_object_get_data(G_OBJECT(actor), "scale");
-
- /* Start */
- image = g_object_get_data(G_OBJECT(actor), "image");
-
- gtk_container_remove(actor, image);
- pixbuf = gdk_pixbuf_new_from_file_at_size ("/usr/share/livewp/theme/Modern/sun.png",
- 200,
- 200,
- NULL);
- if (pixbuf){
- image = gtk_image_new_from_pixbuf (pixbuf);
- g_object_unref(G_OBJECT(pixbuf));
- }
- g_signal_connect(G_OBJECT(image), "expose_event",
- G_CALLBACK(expose_event), pixbuf);
- gtk_container_add (GTK_CONTAINER (actor), image);
- realize(actor);
- gtk_widget_show_all(actor);
- /* End*/
-
-
- x += 40;
- y -= 20;
- scale -= 10;
- if (x > 500){
- x = 400;
- y = 150;
- sc = 1;
- }
- sc = (double)scale / 100;
- hildon_animation_actor_set_scale(actor, sc, sc);
- fprintf(stderr, "cloud x=%d y=%d scale=%f", x, y, sc);
- actor_set_position_full(actor, x, y, g_object_get_data(G_OBJECT(actor), "z"));
- g_object_set_data(G_OBJECT(actor), "x", x);
- g_object_set_data(G_OBJECT(actor), "y", y);
- g_object_set_data(G_OBJECT(actor), "scale", scale);
- }
-
-}
-#endif
static gboolean
short_timeout (AWallpaperPlugin *desktop_plugin)
{
fprintf(stderr,"gggggggggggggggggggg2222\n");
return FALSE;
}
+
static void
animation_wallpaper_plugin_init (AWallpaperPlugin *desktop_plugin)
{