gint xapplet = 0, yapplet = 0;
GSList * objects_list = NULL;
-MultiActor * ma1;
Scene scene;
static void
*y = (int)((1 - alt) * y0) - 64;
//fprintf(stderr, "sun pos x=%d y=%d\n", *x, *y);
}
-
-void change_multiactor()
-{
- gboolean fl;
- double scale;
- gint x, y, z;
- if (ma1->visible) fl = FALSE;
- else fl = TRUE;
- //multiactor_set_visible(ma1, fl);
-
- scale = ma1->scale;
- scale -= 0.1;
- if (scale == 0) scale = 1;
- //multiactor_set_scale(ma1, scale);
-
- x = ma1->x + 10;
- y = ma1->y + 10;
- //multiactor_set_position(ma1, x, y, 0);
-
-}
-
+#if 0
static void
change_actor(GtkWidget * actor)
{
}
}
+#endif
static gboolean
plugin_on_timeout (AWallpaperPlugin *desktop_plugin)
{
tmp = g_slist_next(tmp);
}
-#if 0
- while (tmp != NULL)
- {
- anim = tmp->data;
- if (anim == NULL) fprintf(stderr, "get anim\n");
- t = now - anim->timestart;
- if (t > anim->timeall){
- anim->timestart = now;
- if (anim->count != -1) anim->count--;
-
- }
- if (anim->count == 0){
- g_free(anim);
- scene.dynamic_actors = g_slist_remove(scene.dynamic_actors, anim);
- //tmp->data = NULL;
- tmp = scene.dynamic_actors;
- fprintf(stderr, "delete anim %d\n", g_slist_length(tmp));
-
- }else {
- if (anim->func_time ) t = (*anim->func_time)(t);
- if (anim->func_change) (*anim->func_change)(anim->actor, (double)t/anim->timeall);
- tmp = g_slist_next(tmp);
- }
- }
- #endif
- scene.daytime = daytime;
+ scene.daytime = daytime;
- //double azm, alt;
- //get_sun_pos(&alt, &azm);
-/*
- GSList * tmp = objects_list;
- while (tmp != NULL){
- //processing(tmp->data);
-
- str = g_object_get_data(G_OBJECT(tmp->data), "name");
- fprintf(stderr, "object: %s\n", str);
-
- if (str == "sun"){
- //get_sun_screen_pos(alt, azm, &x, &y);
- //x = tmp->data
- //actor_set_position_full(tmp->data, x, y, 20);
- //g_object_set_data(G_OBJECT(tmp->data), "posX", x);
- //g_object_set_data(G_OBJECT(tmp->data), "posY", y);
- //fprintf(stderr, "x = %d y = %d\n", x, y);
- child = gtk_container_get_children(GTK_CONTAINER (tmp->data));
- while (child != NULL) {
- gtk_container_remove(GTK_CONTAINER (tmp->data), child->data);
- child = child->next;
- }
-
- //snprintf(str, 255, "/usr/share/anwall/%s.png", name);
- //fprintf(stderr, "!!!init object !!!!\nname = %s file = %s\n", name, str);
-
- }
-
- if (str == "town"){
- //hildon_animation_actor_set_show(tmp->data, 0);
- }
- //a = tmp->data;
- //fprintf(stderr, "--timeout %s\n", a->name);
- tmp = g_slist_next(tmp);
- }
- */
- return TRUE; /* keep running this event */
+ return TRUE; /* keep running this event */
}
static void
g_signal_connect (desktop_plugin, "notify::is-on-current-desktop",
G_CALLBACK (desktop_plugin_visible_notify), desktop_plugin);
- gtk_container_add (GTK_CONTAINER (desktop_plugin), label);
- init_applet_position();
- fprintf(stderr, "!!!theme = %s\n", priv->theme);
- if (!strcmp(priv->theme,"Modern"))
- init_scene(desktop_plugin);
- else if (!strcmp(priv->theme,"Berlin"))
- init_scene(desktop_plugin);
- priv->timer = g_timeout_add(1000*3, plugin_on_timeout, desktop_plugin);
+ gtk_container_add (GTK_CONTAINER (desktop_plugin), label);
+ init_applet_position();
+ fprintf(stderr, "!!!theme = %s\n", priv->theme);
+ if (!strcmp(priv->theme,"Modern"))
+ init_scene(desktop_plugin);
+ else if (!strcmp(priv->theme,"Berlin"))
+ init_scene(desktop_plugin);
+ priv->timer = g_timeout_add(LONG_TIMER, plugin_on_timeout, desktop_plugin);
+ /* TODO Move scene to priv */
+ scene.timer_type = LONG_TIMER_TYPE;
}
static void