X-Git-Url: http://vcs.maemo.org/git/?a=blobdiff_plain;f=examples%2Fgtk-clutter-events.c;h=0396f863878f84d2daef5a0d454993ace484cb33;hb=HEAD;hp=3143bc9acf6ce09360ef22d30aca247418c17056;hpb=8d35a251859de3b9052665d7149430d8c4cb75c4;p=clutter-gtk diff --git a/examples/gtk-clutter-events.c b/examples/gtk-clutter-events.c index 3143bc9..0396f86 100644 --- a/examples/gtk-clutter-events.c +++ b/examples/gtk-clutter-events.c @@ -1,8 +1,7 @@ #include #include -#include -#include +#include typedef struct { @@ -21,7 +20,7 @@ on_gtk_entry_changed (GtkEditable *editable, EventApp *app) { const gchar *text = gtk_entry_get_text (GTK_ENTRY (editable)); - clutter_entry_set_text (CLUTTER_ENTRY (app->clutter_entry), text); + clutter_text_set_text (CLUTTER_TEXT (app->clutter_entry), text); } static void @@ -75,11 +74,11 @@ on_stage_capture (ClutterActor *actor, { if (event->type == CLUTTER_BUTTON_RELEASE) { - gint x, y; + gfloat x, y; clutter_event_get_coords (event, &x, &y); - g_print ("Event captured at (%d, %d)\n", x, y); + g_print ("Event captured at (%.2f, %.2f)\n", x, y); } return FALSE; @@ -103,7 +102,7 @@ main (gint argc, gchar **argv) GtkWidget *widget, *vbox, *hbox, *button, *label, *box; ClutterActor *actor; GdkPixbuf *pixbuf = NULL; - guint width, height; + gfloat width, height; ClutterColor stage_color = {255, 255, 255, 255}; ClutterColor text_color = {0, 0, 0, 255}; @@ -161,7 +160,7 @@ main (gint argc, gchar **argv) NULL); /* Setup the clutter entry */ - actor = clutter_entry_new_full ("Sans 10", "", &text_color); + actor = clutter_text_new_full ("Sans 10", "", &text_color); app->clutter_entry = actor; clutter_group_add (CLUTTER_GROUP (app->stage), actor); clutter_actor_set_position (actor, 0, 0);