clutter/tests: Fix missing declaration warnings

This commit is contained in:
Jonas Ådahl 2019-01-20 09:03:50 +01:00
parent c242558398
commit 576e7a43df
49 changed files with 280 additions and 9 deletions

View File

@ -27,6 +27,9 @@ typedef struct SuperOH
static gint n_hands = NHANDS; static gint n_hands = NHANDS;
int
test_actors_main (int argc, char *argv[]);
static GOptionEntry super_oh_entries[] = { static GOptionEntry super_oh_entries[] = {
{ {
"num-hands", 'n', "num-hands", 'n',

View File

@ -4,6 +4,12 @@
static gboolean is_expanded = FALSE; static gboolean is_expanded = FALSE;
int
test_animation_main (int argc, char *argv[]);
const char *
test_animation_describe (void);
static void static void
on_rect_transitions_completed (ClutterActor *actor) on_rect_transitions_completed (ClutterActor *actor)
{ {

View File

@ -5,6 +5,10 @@
static ClutterAnimator *animator; static ClutterAnimator *animator;
gint
test_animator_main (gint argc,
gchar **argv);
static ClutterActor *new_rect (gint r, static ClutterActor *new_rect (gint r,
gint g, gint g,
gint b, gint b,

View File

@ -47,6 +47,12 @@ static const gchar *desaturare_glsl_shader =
static gboolean is_expanded = FALSE; static gboolean is_expanded = FALSE;
const char *
test_bind_constraint_describe (void);
int
test_bind_constraint_main (int argc, char *argv[]);
static gboolean static gboolean
on_button_release (ClutterActor *actor, on_button_release (ClutterActor *actor,
ClutterEvent *event, ClutterEvent *event,

View File

@ -31,6 +31,14 @@ struct _KeyGroupClass
ClutterActor *child); ClutterActor *child);
}; };
GType key_group_get_type (void);
int
test_binding_pool_main (int argc, char *argv[]);
const char *
test_binding_pool_describe (void);
G_DEFINE_TYPE (KeyGroup, key_group, CLUTTER_TYPE_ACTOR) G_DEFINE_TYPE (KeyGroup, key_group, CLUTTER_TYPE_ACTOR)
enum enum

View File

@ -3,6 +3,12 @@
#include <cairo.h> #include <cairo.h>
#include <clutter/clutter.h> #include <clutter/clutter.h>
int
test_cairo_clock_main (int argc, char *argv[]);
const char *
test_cairo_clock_describe (void);
static gboolean static gboolean
draw_clock (ClutterCanvas *canvas, draw_clock (ClutterCanvas *canvas,
cairo_t *cr, cairo_t *cr,

View File

@ -25,6 +25,12 @@ Flower;
static ClutterActor *stage = NULL; static ClutterActor *stage = NULL;
int
test_cairo_flowers_main (int argc, char **argv);
const char *
test_cairo_flowers_describe (void);
static gboolean static gboolean
draw_flower (ClutterCanvas *canvas, draw_flower (ClutterCanvas *canvas,
cairo_t *cr, cairo_t *cr,

View File

@ -30,6 +30,11 @@ typedef struct _TestMultiLayerMaterialState
} TestMultiLayerMaterialState; } TestMultiLayerMaterialState;
int
test_cogl_multitexture_main (int argc, char *argv[]);
const char *
test_cogl_multitexture_describe (void);
static void static void
frame_cb (ClutterTimeline *timeline, frame_cb (ClutterTimeline *timeline,

View File

@ -56,6 +56,12 @@ struct _TestCoglboxClass
static GType test_coglbox_get_type (void) G_GNUC_CONST; static GType test_coglbox_get_type (void) G_GNUC_CONST;
int
test_cogl_offscreen_main (int argc, char *argv[]);
const char *
test_cogl_offscreen_describe (void);
G_END_DECLS G_END_DECLS
/* Coglbox private declaration /* Coglbox private declaration
@ -153,7 +159,7 @@ test_coglbox_dispose (GObject *object)
* This sets up a Clutter like coordinate system for a Cogl * This sets up a Clutter like coordinate system for a Cogl
* framebuffer * framebuffer
*/ */
void static void
setup_viewport (unsigned int width, setup_viewport (unsigned int width,
unsigned int height, unsigned int height,
float fovy, float fovy,

View File

@ -51,6 +51,12 @@ struct _Data
CoglMaterial *material; CoglMaterial *material;
}; };
int
test_cogl_point_sprites_main (int argc, char *argv[]);
const char *
test_cogl_point_sprites_describe (void);
static CoglHandle static CoglHandle
generate_round_texture (void) generate_round_texture (void)
{ {

View File

@ -11,6 +11,9 @@ typedef struct
char *source; char *source;
} ShaderSource; } ShaderSource;
int
test_cogl_shader_glsl_main (int argc, char *argv[]);
/* a couple of boilerplate defines that are common amongst all the /* a couple of boilerplate defines that are common amongst all the
* sample shaders * sample shaders
*/ */

View File

@ -56,6 +56,12 @@ struct _TestCoglboxClass
static GType test_coglbox_get_type (void) G_GNUC_CONST; static GType test_coglbox_get_type (void) G_GNUC_CONST;
int
test_cogl_tex_convert_main (int argc, char *argv[]);
const char *
test_cogl_tex_convert_describe (void);
G_END_DECLS G_END_DECLS
/* Coglbox private declaration /* Coglbox private declaration

View File

@ -60,6 +60,9 @@ typedef struct _TestCoglbox TestCoglbox;
typedef struct _TestCoglboxClass TestCoglboxClass; typedef struct _TestCoglboxClass TestCoglboxClass;
typedef struct _TestCoglboxPrivate TestCoglboxPrivate; typedef struct _TestCoglboxPrivate TestCoglboxPrivate;
const char *
test_cogl_tex_foreign_describe (void);
struct _TestCoglbox struct _TestCoglbox
{ {
ClutterActor parent; ClutterActor parent;
@ -116,6 +119,9 @@ G_DEFINE_TYPE_WITH_PRIVATE (TestCoglbox, test_coglbox, CLUTTER_TYPE_ACTOR);
#define TEST_COGLBOX_GET_PRIVATE(obj) \ #define TEST_COGLBOX_GET_PRIVATE(obj) \
(G_TYPE_INSTANCE_GET_PRIVATE ((obj), TEST_TYPE_COGLBOX, TestCoglboxPrivate)) (G_TYPE_INSTANCE_GET_PRIVATE ((obj), TEST_TYPE_COGLBOX, TestCoglboxPrivate))
int
test_cogl_tex_foreign_main (int argc, char *argv[]);
/* Coglbox implementation /* Coglbox implementation
*--------------------------------------------------*/ *--------------------------------------------------*/

View File

@ -56,6 +56,12 @@ struct _TestCoglboxClass
static GType test_coglbox_get_type (void) G_GNUC_CONST; static GType test_coglbox_get_type (void) G_GNUC_CONST;
int
test_cogl_tex_polygon_main (int argc, char *argv[]);
const char *
test_cogl_tex_polygon_describe (void);
G_END_DECLS G_END_DECLS
/* Coglbox private declaration /* Coglbox private declaration

View File

@ -57,6 +57,12 @@ struct _TestCoglboxClass
static GType test_coglbox_get_type (void) G_GNUC_CONST; static GType test_coglbox_get_type (void) G_GNUC_CONST;
int
test_cogl_tex_tile_main (int argc, char *argv[]);
const char *
test_cogl_tex_tile_describe (void);
G_END_DECLS G_END_DECLS
/* Coglbox private declaration /* Coglbox private declaration

View File

@ -53,6 +53,12 @@ typedef struct _TestState
guint frame_id; guint frame_id;
} TestState; } TestState;
int
test_cogl_vertex_buffer_main (int argc, char *argv[]);
const char *
test_cogl_vertex_buffer_describe (void);
static void static void
frame_cb (ClutterTimeline *timeline, frame_cb (ClutterTimeline *timeline,
gint elapsed_msecs, gint elapsed_msecs,

View File

@ -19,6 +19,14 @@ typedef struct _ColorContentClass {
static void clutter_content_iface_init (ClutterContentIface *iface); static void clutter_content_iface_init (ClutterContentIface *iface);
GType color_content_get_type (void);
int
test_content_main (int argc, char *argv[]);
const char *
test_content_describe (void);
G_DEFINE_TYPE_WITH_CODE (ColorContent, color_content, G_TYPE_OBJECT, G_DEFINE_TYPE_WITH_CODE (ColorContent, color_content, G_TYPE_OBJECT,
G_IMPLEMENT_INTERFACE (CLUTTER_TYPE_CONTENT, G_IMPLEMENT_INTERFACE (CLUTTER_TYPE_CONTENT,
clutter_content_iface_init)) clutter_content_iface_init))

View File

@ -12,6 +12,9 @@ typedef struct {
GHashTable *devices; GHashTable *devices;
} TestDevicesApp; } TestDevicesApp;
int
test_devices_main (int argc, char **argv);
static const gchar * static const gchar *
device_type_name (ClutterInputDevice *device) device_type_name (ClutterInputDevice *device)
{ {

View File

@ -55,6 +55,12 @@ static ClutterActor *easing_mode_label = NULL;
static ClutterAnimation *last_animation = NULL; static ClutterAnimation *last_animation = NULL;
int
test_easing_main (int argc, char *argv[]);
const char *
test_easing_describe (void);
/* recenter_bouncer: /* recenter_bouncer:
* *
* repositions (through an animation) the bouncer at the center of the stage * repositions (through an animation) the bouncer at the center of the stage

View File

@ -4,6 +4,12 @@
gboolean IsFullScreen = FALSE, IsMotion = TRUE; gboolean IsFullScreen = FALSE, IsMotion = TRUE;
int
test_events_main (int argc, char *argv[]);
const char *
test_events_describe (void);
static const gchar * static const gchar *
get_event_type_name (const ClutterEvent *event) get_event_type_name (const ClutterEvent *event)
{ {

View File

@ -8,7 +8,13 @@
#define STAGE_WIDTH 800 #define STAGE_WIDTH 800
#define STAGE_HEIGHT 600 #define STAGE_HEIGHT 600
ClutterActor * int
test_fbo_main (int argc, char *argv[]);
const char *
test_fbo_describe (void);
static ClutterActor *
make_source (void) make_source (void)
{ {
ClutterActor *source, *actor; ClutterActor *source, *actor;

View File

@ -1,6 +1,12 @@
#include <gmodule.h> #include <gmodule.h>
#include <clutter/clutter.h> #include <clutter/clutter.h>
int
test_grab_main (int argc, char *argv[]);
const char *
test_grab_describe (void);
static void static void
stage_state_cb (ClutterStage *stage, stage_state_cb (ClutterStage *stage,
gpointer data) gpointer data)

View File

@ -20,6 +20,14 @@ typedef struct _SolidContentClass {
static void clutter_content_iface_init (ClutterContentIface *iface); static void clutter_content_iface_init (ClutterContentIface *iface);
GType solid_content_get_type (void);
const char *
test_image_describe (void);
int
test_image_main (int argc, char *argv[]);
G_DEFINE_TYPE_WITH_CODE (SolidContent, solid_content, G_TYPE_OBJECT, G_DEFINE_TYPE_WITH_CODE (SolidContent, solid_content, G_TYPE_OBJECT,
G_IMPLEMENT_INTERFACE (CLUTTER_TYPE_CONTENT, G_IMPLEMENT_INTERFACE (CLUTTER_TYPE_CONTENT,
clutter_content_iface_init)) clutter_content_iface_init))

View File

@ -11,6 +11,12 @@ static const ClutterColor colors[] = {
#define PADDING (64.0f) #define PADDING (64.0f)
#define SIZE (64.0f) #define SIZE (64.0f)
const char *
test_keyframe_transition_describe (void);
int
test_keyframe_transition_main (int argc, char *argv[]);
static void static void
on_transition_stopped (ClutterActor *actor, on_transition_stopped (ClutterActor *actor,
const gchar *transition_name, const gchar *transition_name,

View File

@ -48,6 +48,14 @@ struct _MyThingPrivate
guint use_transformed_box : 1; guint use_transformed_box : 1;
}; };
GType my_thing_get_type (void);
int
test_layout_main (int argc, char *argv[]);
const char *
test_layout_describe (void);
G_DEFINE_TYPE_WITH_PRIVATE (MyThing, my_thing, CLUTTER_TYPE_ACTOR) G_DEFINE_TYPE_WITH_PRIVATE (MyThing, my_thing, CLUTTER_TYPE_ACTOR)
#define MY_THING_GET_PRIVATE(obj) \ #define MY_THING_GET_PRIVATE(obj) \
@ -417,7 +425,7 @@ my_thing_init (MyThing *thing)
thing->priv = MY_THING_GET_PRIVATE (thing); thing->priv = MY_THING_GET_PRIVATE (thing);
} }
ClutterActor * static ClutterActor *
my_thing_new (gfloat padding, my_thing_new (gfloat padding,
gfloat spacing) gfloat spacing)
{ {

View File

@ -4,6 +4,9 @@
static GList *stages = NULL; static GList *stages = NULL;
static gint n_stages = 1; static gint n_stages = 1;
int
test_multistage_main (int argc, char *argv[]);
static gboolean static gboolean
tex_button_cb (ClutterActor *actor, tex_button_cb (ClutterActor *actor,
ClutterEvent *event, ClutterEvent *event,

View File

@ -56,6 +56,12 @@ static GOptionEntry super_oh_entries[] = {
{ NULL } { NULL }
}; };
int
test_paint_wrapper_main (int argc, char *argv[]);
const char *
test_paint_wrapper_describe (void);
static gboolean static gboolean
on_button_press_event (ClutterActor *actor, on_button_press_event (ClutterActor *actor,
ClutterEvent *event, ClutterEvent *event,

View File

@ -11,6 +11,10 @@
static gboolean toggled = FALSE; static gboolean toggled = FALSE;
int
test_path_constraint_main (int argc,
char *argv[]);
static gboolean static gboolean
on_button_press (ClutterActor *actor, on_button_press (ClutterActor *actor,
const ClutterEvent *event, const ClutterEvent *event,

View File

@ -23,6 +23,12 @@
static gboolean disable_x11 = FALSE; static gboolean disable_x11 = FALSE;
static gboolean disable_animation = FALSE; static gboolean disable_animation = FALSE;
int
test_pixmap_main (int argc, char **argv);
const char *
test_pixmap_describe (void);
static GOptionEntry g_options[] = static GOptionEntry g_options[] =
{ {
{ "disable-x11", { "disable-x11",
@ -131,7 +137,7 @@ stage_button_press_cb (ClutterActor *actor,
return CLUTTER_EVENT_STOP; return CLUTTER_EVENT_STOP;
} }
Pixmap static Pixmap
create_pixmap (guint *width, guint *height, guint *depth) create_pixmap (guint *width, guint *height, guint *depth)
{ {
Display *dpy = clutter_x11_get_default_display (); Display *dpy = clutter_x11_get_default_display ();

View File

@ -26,6 +26,12 @@
#define STAGE_WIDTH 800 #define STAGE_WIDTH 800
#define STAGE_HEIGHT 550 #define STAGE_HEIGHT 550
int
test_rotate_zoom_main (int argc, char *argv[]);
const char *
test_rotate_zoom_describe (void);
static ClutterActor * static ClutterActor *
create_hand (void) create_hand (void)
{ {

View File

@ -18,6 +18,12 @@ static const ClutterGravity gravities[] = {
static gint gindex = 0; static gint gindex = 0;
static ClutterActor *label; static ClutterActor *label;
int
test_scale_main (int argc, char *argv[]);
const char *
test_scale_describe (void);
static void static void
set_next_gravity (ClutterActor *actor) set_next_gravity (ClutterActor *actor)
{ {

View File

@ -10,6 +10,9 @@
static ClutterScript *script = NULL; static ClutterScript *script = NULL;
static guint merge_id = 0; static guint merge_id = 0;
int
test_script_main (int argc, char *argv[]);
static const gchar *test_unmerge = static const gchar *test_unmerge =
"[" "["
" {" " {"

View File

@ -20,6 +20,9 @@ static const gchar *rect_color[N_RECTS] = {
static ClutterActor *rectangle[N_RECTS]; static ClutterActor *rectangle[N_RECTS];
static ClutterActor *viewport = NULL; static ClutterActor *viewport = NULL;
int
test_scrolling_main (int argc, char *argv[]);
static void static void
on_drag_end (ClutterDragAction *action, on_drag_end (ClutterDragAction *action,
ClutterActor *actor, ClutterActor *actor,

View File

@ -7,6 +7,9 @@
#include <clutter/clutter.h> #include <clutter/clutter.h>
int
test_shader_effects_main (int argc, char *argv[]);
G_MODULE_EXPORT int G_MODULE_EXPORT int
test_shader_effects_main (int argc, char *argv[]) test_shader_effects_main (int argc, char *argv[])
{ {

View File

@ -16,6 +16,12 @@ struct _CallbackData
guint idle_source; guint idle_source;
}; };
int
test_stage_read_pixels_main (int argc, char **argv);
const char *
test_stage_read_pixels_describe (void);
static ClutterActor * static ClutterActor *
make_label (void) make_label (void)
{ {

View File

@ -2,6 +2,12 @@
#include <gmodule.h> #include <gmodule.h>
#include <clutter/clutter.h> #include <clutter/clutter.h>
int
test_stage_sizing_main (int argc, char *argv[]);
const char *
test_stage_sizing_describe (void);
static gboolean static gboolean
fullscreen_clicked_cb (ClutterStage *stage) fullscreen_clicked_cb (ClutterStage *stage)
{ {

View File

@ -6,6 +6,13 @@
static ClutterState *state; static ClutterState *state;
static ClutterAnimator *animator; static ClutterAnimator *animator;
gint
test_state_animator_main (gint argc,
gchar **argv);
const char *
test_state_animator_describe (void);
static gboolean press_event (ClutterActor *actor, static gboolean press_event (ClutterActor *actor,
ClutterEvent *event, ClutterEvent *event,
gpointer user_data) gpointer user_data)

View File

@ -6,6 +6,9 @@
#define TEST_STATE_SCRIPT_FILE "test-script-signals.json" #define TEST_STATE_SCRIPT_FILE "test-script-signals.json"
int
test_state_script_main (int argc, char *argv[]);
gboolean gboolean
on_button_press (ClutterActor *actor, on_button_press (ClutterActor *actor,
ClutterEvent *event, ClutterEvent *event,

View File

@ -13,6 +13,12 @@
#define ROWS (STAGE_HEIGHT/ACTOR_HEIGHT) #define ROWS (STAGE_HEIGHT/ACTOR_HEIGHT)
#define TOTAL (ROWS*COLS) #define TOTAL (ROWS*COLS)
gint
test_state_main (gint argc,
gchar **argv);
const char *
test_state_describe (void);
static gboolean press_event (ClutterActor *actor, static gboolean press_event (ClutterActor *actor,
ClutterEvent *event, ClutterEvent *event,

View File

@ -7,6 +7,12 @@ enum {
BOTH = 2 BOTH = 2
}; };
int
test_swipe_action_main (int argc, char *argv[]);
const char *
test_swipe_action_describe (void);
static void static void
swept_cb (ClutterSwipeAction *action, swept_cb (ClutterSwipeAction *action,
ClutterActor *actor, ClutterActor *actor,

View File

@ -9,6 +9,12 @@
#define FONT "Sans 12" #define FONT "Sans 12"
int
test_table_layout_main (int argc, char *argv[]);
const char *
test_table_layout_describe (void);
static void static void
set_text (ClutterActor *actor, const gchar *text) set_text (ClutterActor *actor, const gchar *text)
{ {

View File

@ -2,6 +2,13 @@
#include <gmodule.h> #include <gmodule.h>
#include <clutter/clutter.h> #include <clutter/clutter.h>
gint
test_text_field_main (gint argc,
gchar **argv);
const char *
test_text_field_describe (void);
static void static void
on_entry_activate (ClutterText *text, on_entry_activate (ClutterText *text,
gpointer data) gpointer data)

View File

@ -10,6 +10,13 @@ static const gchar *runes =
"ᛋᚳᛖᚪᛚ᛫ᚦᛖᚪᚻ᛫ᛗᚪᚾᚾᚪ᛫ᚷᛖᚻᚹᛦᛚᚳ᛫ᛗᛁᚳᛚᚢᚾ᛫ᚻᛦᛏ᛫ᛞᚫᛚᚪᚾ\n" "ᛋᚳᛖᚪᛚ᛫ᚦᛖᚪᚻ᛫ᛗᚪᚾᚾᚪ᛫ᚷᛖᚻᚹᛦᛚᚳ᛫ᛗᛁᚳᛚᚢᚾ᛫ᚻᛦᛏ᛫ᛞᚫᛚᚪᚾ\n"
"ᚷᛁᚠ᛫ᚻᛖ᛫ᚹᛁᛚᛖ᛫ᚠᚩᚱ᛫ᛞᚱᛁᚻᛏᚾᛖ᛫ᛞᚩᛗᛖᛋ᛫ᚻᛚᛇᛏᚪᚾ᛬\n"; "ᚷᛁᚠ᛫ᚻᛖ᛫ᚹᛁᛚᛖ᛫ᚠᚩᚱ᛫ᛞᚱᛁᚻᛏᚾᛖ᛫ᛞᚩᛗᛖᛋ᛫ᚻᛚᛇᛏᚪᚾ᛬\n";
gint
test_text_main (gint argc,
gchar **argv);
const char *
test_text_describe (void);
G_MODULE_EXPORT gint G_MODULE_EXPORT gint
test_text_main (gint argc, test_text_main (gint argc,
gchar **argv) gchar **argv)

View File

@ -11,6 +11,12 @@ enum
static ClutterActor *stage = NULL; static ClutterActor *stage = NULL;
const char *
test_texture_async_describe (void);
gint
test_texture_async_main (int argc, char *argv[]);
static void static void
on_load_finished (ClutterTexture *texture, on_load_finished (ClutterTexture *texture,
const GError *error, const GError *error,

View File

@ -3,6 +3,9 @@
#include <gmodule.h> #include <gmodule.h>
#include <clutter/clutter.h> #include <clutter/clutter.h>
int
test_texture_material_main (int argc, char *argv[]);
G_MODULE_EXPORT int G_MODULE_EXPORT int
test_texture_material_main (int argc, char *argv[]) test_texture_material_main (int argc, char *argv[])
{ {

View File

@ -2,6 +2,12 @@
#include <gmodule.h> #include <gmodule.h>
#include <clutter/clutter.h> #include <clutter/clutter.h>
gint
test_texture_quality_main (int argc, char *argv[]);
const char *
test_texture_quality_describe (void);
/* each time the timeline animating the label completes, swap the direction */ /* each time the timeline animating the label completes, swap the direction */
static void static void
timeline_completed (ClutterTimeline *timeline, timeline_completed (ClutterTimeline *timeline,

View File

@ -3,7 +3,13 @@
#include <clutter/clutter.h> #include <clutter/clutter.h>
guchar* int
test_textures_main (int argc, char *argv[]);
const char *
test_texture_slicing_describe (void);
static guchar *
make_rgba_data (int width, int height, int bpp, int has_alpha, int *rowstride_p) make_rgba_data (int width, int height, int bpp, int has_alpha, int *rowstride_p)
{ {
#define CHECK_SIZE 20 #define CHECK_SIZE 20

View File

@ -45,6 +45,12 @@ static const ClutterColor static_colors[] = {
}; };
static GHashTable *sequence_to_color = NULL; static GHashTable *sequence_to_color = NULL;
int
test_touch_events_main (int argc, char *argv[]);
const char *
test_touch_events_describe (void);
static void static void
canvas_paint (ClutterCairoTexture *canvas) canvas_paint (ClutterCairoTexture *canvas)
{ {

View File

@ -7,7 +7,8 @@ static gint testframes = 0;
static float testmaxtime = 1.0; static float testmaxtime = 1.0;
/* initialize environment to be suitable for fps testing */ /* initialize environment to be suitable for fps testing */
void clutter_perf_fps_init (void) static inline void
clutter_perf_fps_init (void)
{ {
/* Force not syncing to vblank, we want free-running maximum FPS */ /* Force not syncing to vblank, we want free-running maximum FPS */
g_setenv ("vblank_mode", "0", FALSE); g_setenv ("vblank_mode", "0", FALSE);
@ -27,17 +28,20 @@ void clutter_perf_fps_init (void)
static void perf_stage_paint_cb (ClutterStage *stage, gpointer *data); static void perf_stage_paint_cb (ClutterStage *stage, gpointer *data);
static gboolean perf_fake_mouse_cb (gpointer stage); static gboolean perf_fake_mouse_cb (gpointer stage);
void clutter_perf_fps_start (ClutterStage *stage) static inline void
clutter_perf_fps_start (ClutterStage *stage)
{ {
g_signal_connect (stage, "paint", G_CALLBACK (perf_stage_paint_cb), NULL); g_signal_connect (stage, "paint", G_CALLBACK (perf_stage_paint_cb), NULL);
} }
void clutter_perf_fake_mouse (ClutterStage *stage) static inline void
clutter_perf_fake_mouse (ClutterStage *stage)
{ {
clutter_threads_add_timeout (1000/60, perf_fake_mouse_cb, stage); clutter_threads_add_timeout (1000/60, perf_fake_mouse_cb, stage);
} }
void clutter_perf_fps_report (const gchar *id) static inline void
clutter_perf_fps_report (const gchar *id)
{ {
g_print ("\n@ %s: %.2f fps \n", g_print ("\n@ %s: %.2f fps \n",
id, testframes / g_timer_elapsed (testtimer, NULL)); id, testframes / g_timer_elapsed (testtimer, NULL));