LEFT = 3
};
-const gint width = 200;
-const gint height = 120;
+const gint width = 110;
+const gint height = 110;
typedef struct _Scene1 Scene1;
struct _Scene1
set_actor_position(actor, actor->x, actor->y, actor->z, desktop_plugin);
//set_actor_position(actor, (i%4)*width, (i/4)*height, 2, desktop_plugin);
}
- fprintf(stderr,"end reinit\n");
}
void moving_actor(gint num, gint max, AWallpaperPlugin *desktop_plugin)
if (bone < 0) return TRUE;
}
} else return TRUE;
- fprintf(stderr, "move %d\n", bone);
+ //fprintf(stderr, "move %d\n", bone);
scene->bone = bone;
scene->timer_num = 10;
void init_actors(AWallpaperPlugin *desktop_plugin)
{
gint i;
- //Actor *actors[15];
+ Actor *actor;
+ actor = init_object(desktop_plugin, "background", g_strdup("background.jpg"),
+ -180, -15, 2, 800, 480,
+ TRUE, TRUE, 100, 255,
+ NULL, NULL, NULL);
for (i=0; i<15; i++){
actors[i] = init_object(desktop_plugin, "bone", g_strdup_printf("%d.png", i+1),
0, 0, 2, width, height,
void
view_state_changed (Animation_WallpaperPrivate *priv)
{
- if (priv->visible){
+ if (priv->visible && priv->long_timer == 0){
priv->long_timer = g_timeout_add(50, main_timer, priv->desktop_plugin);
+ //fprintf(stderr, "visible = 1 timeout_add %d\n", priv->long_timer);
}else {
+ //fprintf(stderr, "visible = 0 timer remove %d\n", priv->long_timer);
g_source_remove(priv->long_timer);
+ priv->long_timer = 0;
}
}
}
}
- fprintf(stderr, "view=%d window_id=%d\n", view, window_id);
+ //fprintf(stderr, "view=%d window_id=%d\n", view, window_id);
hildon_gtk_init (&argc, &argv);
- g_set_application_name ("Simplest example");
+ g_set_application_name ("Fifteen");
window = hildon_window_new ();
- fprintf(stderr,"lllllllllllllllll\n");
+ //gtk_window_fullscreen (GTK_WINDOW(window));
+ gtk_window_set_title(window,"Fifteen");
+ gtk_window_set_wmclass(window,"Fifteen_exec","Fifteen_exec");
//window->window = window_id;
g_signal_connect (G_OBJECT (window), "delete_event",
G_CALLBACK (gtk_main_quit), NULL);
priv->window = window;
priv->theme = g_strdup("Fifteen");
- priv->xapplet = 0;
- priv->yapplet = 0;
+ priv->xapplet = -180;
+ priv->yapplet = -15;
priv->desktop_plugin = desktop_plugin;
priv->view = view;
+ priv->long_timer = 0;
desktop_plugin->priv = priv;
priv->osso = osso_initialize("org.maemo.livewp", VERSION, TRUE, NULL);
reinit(desktop_plugin);
gtk_widget_show (window);
priv->long_timer = g_timeout_add(50, main_timer, desktop_plugin);
+ //fprintf(stderr, "create timer %d\n", priv->long_timer);
gtk_main ();
return 0;
}