summaryrefslogtreecommitdiff
path: root/examples
diff options
context:
space:
mode:
authorBastian Winkler <buz@netbuz.org>2012-05-29 14:44:44 +0200
committerBastian Winkler <buz@netbuz.org>2012-05-30 12:47:21 +0200
commit93627c876d836eb84079f4a71161571b7d5e5bca (patch)
treec77048c2a5b034b412907ca1794a55e1e82e669c /examples
parent4c3bb5e2de93697f2bb672d5c5829a1e5fc6a996 (diff)
downloadclutter-93627c876d836eb84079f4a71161571b7d5e5bca.tar.gz
examples: Allow optional animations in flow-layout
Allow animations to demonstrate the LayoutManager animation API https://bugzilla.gnome.org/show_bug.cgi?id=677085
Diffstat (limited to 'examples')
-rw-r--r--examples/flow-layout.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/examples/flow-layout.c b/examples/flow-layout.c
index 4f92e85dc..d7ac73838 100644
--- a/examples/flow-layout.c
+++ b/examples/flow-layout.c
@@ -9,6 +9,7 @@ static gboolean is_homogeneous = FALSE;
static gboolean vertical = FALSE;
static gboolean random_size = FALSE;
static gboolean fixed_size = FALSE;
+static gboolean use_animations = FALSE;
static gint n_rects = N_RECTS;
static gint x_spacing = 0;
@@ -64,6 +65,13 @@ static GOptionEntry entries[] = {
&fixed_size,
"Fix the layout size", NULL
},
+ {
+ "use-animations", 'a',
+ 0,
+ G_OPTION_ARG_NONE,
+ &use_animations,
+ "Use animations", NULL
+ },
{ NULL }
};
@@ -102,6 +110,7 @@ main (int argc, char *argv[])
x_spacing);
clutter_flow_layout_set_row_spacing (CLUTTER_FLOW_LAYOUT (layout),
y_spacing);
+ clutter_layout_manager_set_use_animations (layout, use_animations);
box = clutter_actor_new ();
clutter_actor_set_layout_manager (box, layout);