Editing Documentation/Maemo 5 Developer Guide/Porting Software/Scaling Fixed Size Windows
Warning: You are not logged in.
Your IP address will be recorded in this page's edit history.
The edit can be undone.
Please check the comparison below to verify that this is what you want to do, and then save the changes below to finish undoing the edit.
Latest revision | Your text | ||
Line 61: | Line 61: | ||
static gint Y_POS = 56; | static gint Y_POS = 56; | ||
- | + | static gint X_FULL = 800; | |
- | static gdouble X_SCALE = 2.5; /* | + | static gint Y_FULL = 424; |
- | static gdouble Y_SCALE = 1.77; /* | + | |
+ | static gdouble X_SCALE = 2.5; /* X_FULL / X_SIZE */ | ||
+ | static gdouble Y_SCALE = 1.77; /* Y_FULL / Y_SIZE */ | ||
Line 101: | Line 103: | ||
{ | { | ||
GtkWidget *drawing = gtk_drawing_area_new (); | GtkWidget *drawing = gtk_drawing_area_new (); | ||
+ | GtkRequisition *req; | ||
g_signal_connect (drawing, "realize", | g_signal_connect (drawing, "realize", | ||
G_CALLBACK (drawing_realize), NULL); | G_CALLBACK (drawing_realize), NULL); | ||
Line 119: | Line 122: | ||
gdk_event_put ((GdkEvent *) newev); | gdk_event_put ((GdkEvent *) newev); | ||
} | } | ||
+ | |||
+ | static void | ||
+ | button_clicked (GtkWidget *widget, HildonAnimationActor *actor) | ||
+ | { | ||
+ | static gboolean fullscreen = FALSE; | ||
+ | |||
+ | if (fullscreen) { | ||
+ | hildon_animation_actor_set_scale (actor, 1.0, 1.0); | ||
+ | fullscreen = FALSE; | ||
+ | } | ||
+ | else { | ||
+ | hildon_animation_actor_set_scale (actor, X_SCALE, Y_SCALE); | ||
+ | fullscreen = TRUE; | ||
+ | } | ||
+ | } | ||
+ | |||
int | int | ||
Line 126: | Line 145: | ||
HildonAnimationActor *actor; | HildonAnimationActor *actor; | ||
GtkWidget *window, *drawing; | GtkWidget *window, *drawing; | ||
+ | HildonProgram *program; | ||
GdkColor pink = { .red = 0xffff, .green = 0x9999, .blue = 0x9999 }; | GdkColor pink = { .red = 0xffff, .green = 0x9999, .blue = 0x9999 }; | ||
Learn more about Contributing to the wiki.