mirror of
https://github.com/brl/mutter.git
synced 2024-12-23 19:42:05 +00:00
[test-cogl-primitives] Remove trailing whitespace
This commit is contained in:
parent
4d7caa4bd5
commit
343b0ed67e
@ -9,7 +9,7 @@
|
||||
*--------------------------------------------------*/
|
||||
|
||||
G_BEGIN_DECLS
|
||||
|
||||
|
||||
#define TEST_TYPE_COGLBOX test_coglbox_get_type()
|
||||
|
||||
#define TEST_COGLBOX(obj) \
|
||||
@ -44,7 +44,7 @@ struct _TestCoglbox
|
||||
TestCoglboxPrivate *priv;
|
||||
};
|
||||
|
||||
struct _TestCoglboxClass
|
||||
struct _TestCoglboxClass
|
||||
{
|
||||
ClutterActorClass parent_class;
|
||||
|
||||
@ -119,7 +119,7 @@ test_paint_polyl ()
|
||||
CLUTTER_INT_TO_FIXED (-30),
|
||||
CLUTTER_INT_TO_FIXED (+40)
|
||||
};
|
||||
|
||||
|
||||
cogl_path_polyline (poly_coords, 4);
|
||||
}
|
||||
|
||||
@ -136,7 +136,7 @@ test_paint_polyg ()
|
||||
CLUTTER_INT_TO_FIXED (-30),
|
||||
CLUTTER_INT_TO_FIXED (+40)
|
||||
};
|
||||
|
||||
|
||||
cogl_path_polygon (poly_coords, 4);
|
||||
}
|
||||
|
||||
@ -153,7 +153,7 @@ test_paint_curve ()
|
||||
{
|
||||
cogl_path_move_to (CLUTTER_INT_TO_FIXED (-50),
|
||||
CLUTTER_INT_TO_FIXED (+50));
|
||||
|
||||
|
||||
cogl_path_curve_to (CLUTTER_INT_TO_FIXED (+100),
|
||||
CLUTTER_INT_TO_FIXED (-50),
|
||||
CLUTTER_INT_TO_FIXED (-100),
|
||||
@ -177,32 +177,32 @@ static void
|
||||
test_coglbox_paint(ClutterActor *self)
|
||||
{
|
||||
TestCoglboxPrivate *priv;
|
||||
|
||||
|
||||
static GTimer *timer = NULL;
|
||||
static gint paint_index = 0;
|
||||
|
||||
|
||||
gint NUM_PAINT_FUNCS;
|
||||
|
||||
|
||||
NUM_PAINT_FUNCS = G_N_ELEMENTS (paint_func);
|
||||
|
||||
|
||||
priv = TEST_COGLBOX_GET_PRIVATE (self);
|
||||
|
||||
|
||||
|
||||
|
||||
if (!timer)
|
||||
{
|
||||
timer = g_timer_new ();
|
||||
g_timer_start (timer);
|
||||
}
|
||||
|
||||
|
||||
if (g_timer_elapsed (timer, NULL) >= 1)
|
||||
{
|
||||
paint_index += 1;
|
||||
paint_index = paint_index % NUM_PAINT_FUNCS;
|
||||
g_timer_start (timer);
|
||||
}
|
||||
|
||||
|
||||
cogl_push_matrix ();
|
||||
|
||||
|
||||
paint_func[paint_index] ();
|
||||
|
||||
cogl_translate (100, 100, 0);
|
||||
@ -212,7 +212,7 @@ test_coglbox_paint(ClutterActor *self)
|
||||
cogl_translate (150, 0, 0);
|
||||
cogl_set_source_color4ub (200, 0, 0, 255);
|
||||
cogl_path_fill ();
|
||||
|
||||
|
||||
cogl_pop_matrix();
|
||||
|
||||
}
|
||||
@ -227,9 +227,9 @@ static void
|
||||
test_coglbox_dispose (GObject *object)
|
||||
{
|
||||
TestCoglboxPrivate *priv;
|
||||
|
||||
|
||||
priv = TEST_COGLBOX_GET_PRIVATE (object);
|
||||
|
||||
|
||||
G_OBJECT_CLASS (test_coglbox_parent_class)->dispose (object);
|
||||
}
|
||||
|
||||
@ -247,9 +247,9 @@ test_coglbox_class_init (TestCoglboxClass *klass)
|
||||
ClutterActorClass *actor_class = CLUTTER_ACTOR_CLASS (klass);
|
||||
|
||||
gobject_class->finalize = test_coglbox_finalize;
|
||||
gobject_class->dispose = test_coglbox_dispose;
|
||||
gobject_class->dispose = test_coglbox_dispose;
|
||||
actor_class->paint = test_coglbox_paint;
|
||||
|
||||
|
||||
g_type_class_add_private (gobject_class, sizeof (TestCoglboxPrivate));
|
||||
}
|
||||
|
||||
@ -267,27 +267,27 @@ test_cogl_primitives_main (int argc, char *argv[])
|
||||
{
|
||||
ClutterActor *stage;
|
||||
ClutterActor *coglbox;
|
||||
|
||||
|
||||
clutter_init(&argc, &argv);
|
||||
|
||||
|
||||
stage = clutter_stage_get_default ();
|
||||
clutter_actor_set_size (stage, 400, 400);
|
||||
clutter_stage_set_title (CLUTTER_STAGE (stage), "Cogl Test");
|
||||
|
||||
|
||||
coglbox = test_coglbox_new ();
|
||||
clutter_container_add_actor (CLUTTER_CONTAINER (stage), coglbox);
|
||||
|
||||
clutter_actor_set_rotation (coglbox, CLUTTER_Y_AXIS, -30, 200, 0, 0);
|
||||
clutter_actor_set_position (coglbox, 0, 100);
|
||||
|
||||
|
||||
clutter_actor_show_all (stage);
|
||||
|
||||
|
||||
while (1)
|
||||
{
|
||||
clutter_actor_hide (coglbox);
|
||||
clutter_actor_show (coglbox);
|
||||
SPIN();
|
||||
}
|
||||
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user