summaryrefslogtreecommitdiff
path: root/examples
diff options
context:
space:
mode:
authorEmmanuele Bassi <ebassi@gnome.org>2009-05-20 16:45:49 +0100
committerEmmanuele Bassi <ebassi@gnome.org>2009-05-20 16:45:49 +0100
commitf948d66c3ccb993250da8aa860e6be4626f6d014 (patch)
tree380dea42f42f5d534fc8d10e82a69b73efc962b0 /examples
parent345c3c7a166957f00e191288537206e1e52135fe (diff)
downloadclutter-gtk-f948d66c3ccb993250da8aa860e6be4626f6d014.tar.gz
Update for Clutter 1.0 API changes
* Move everything to float * Rework the map/unmap handling
Diffstat (limited to 'examples')
-rw-r--r--examples/gtk-clutter-events.c6
-rw-r--r--examples/gtk-clutter-test.c4
-rw-r--r--examples/gtk-clutter-viewport.c2
3 files changed, 6 insertions, 6 deletions
diff --git a/examples/gtk-clutter-events.c b/examples/gtk-clutter-events.c
index 9673aeb..0396f86 100644
--- a/examples/gtk-clutter-events.c
+++ b/examples/gtk-clutter-events.c
@@ -74,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;
@@ -102,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};
diff --git a/examples/gtk-clutter-test.c b/examples/gtk-clutter-test.c
index 5b7f025..9667c78 100644
--- a/examples/gtk-clutter-test.c
+++ b/examples/gtk-clutter-test.c
@@ -30,11 +30,11 @@ input_cb (ClutterStage *stage,
if (event->type == CLUTTER_BUTTON_PRESS)
{
ClutterActor *a;
- gint x, y;
+ gfloat x, y;
clutter_event_get_coords (event, &x, &y);
- a = clutter_stage_get_actor_at_pos (stage, x, y);
+ a = clutter_stage_get_actor_at_pos (stage, CLUTTER_PICK_ALL, x, y);
if (a && (CLUTTER_IS_TEXTURE (a) || CLUTTER_IS_CLONE (a)))
clutter_actor_hide (a);
}
diff --git a/examples/gtk-clutter-viewport.c b/examples/gtk-clutter-viewport.c
index 0125b41..f653424 100644
--- a/examples/gtk-clutter-viewport.c
+++ b/examples/gtk-clutter-viewport.c
@@ -83,7 +83,7 @@ main (int argc, char *argv[])
G_STRLOC,
g_timer_elapsed (timer, NULL));
- g_print ("%s: tex.size = %d, %d\n",
+ g_print ("%s: tex.size = %.2f, %.2f\n",
G_STRLOC,
clutter_actor_get_width (tex),
clutter_actor_get_height (tex));