![]() |
![]() |
![]() |
Clutter 0.3 Reference Manual | ![]() |
---|---|---|---|---|
#define CLUTTER_INIT_ERROR enum ClutterInitError; ClutterInitError clutter_init (int *argc, char ***argv); ClutterInitError clutter_init_with_args (int *argc, char ***argv, char *parameter_string, GOptionEntry *entries, char *translation_domain, GError **error); GOptionGroup* clutter_get_option_group (void); gboolean clutter_get_debug_enabled (void); gboolean clutter_get_show_fps (void); void clutter_main (void); void clutter_main_quit (void); gint clutter_main_level (void); void clutter_redraw (void); void clutter_threads_enter (void); void clutter_threads_leave (void); void clutter_base_init (void); gulong clutter_get_timestamp (void);
Functions to retrieve various global Clutter resources and other utility functions for mainloops, events and threads
typedef enum { CLUTTER_INIT_SUCCESS = 1, CLUTTER_INIT_ERROR_UNKOWN = 0, CLUTTER_INIT_ERROR_THREADS = -1, CLUTTER_INIT_ERROR_BACKEND = -2, CLUTTER_INIT_ERROR_INTERNAL = -3 } ClutterInitError;
ClutterInitError clutter_init (int *argc, char ***argv);
It will initialise everything needed to operate with Clutter and
parses some standard command line options. argc
and argv
are
adjusted accordingly so your own code will never see those standard
arguments.
argc : |
The number of arguments in argv
|
argv : |
A pointer to an array of arguments. |
Returns : | 1 on success, < 0 on failure. |
ClutterInitError clutter_init_with_args (int *argc, char ***argv, char *parameter_string, GOptionEntry *entries, char *translation_domain, GError **error);
This function does the same work as clutter_init()
. Additionally,
it allows you to add your own command line options, and it
automatically generates nicely formatted --help
output. Note that your program will be terminated after writing
out the help output. Also note that, in case of error, the
error message will be placed inside error
instead of being
printed on the display.
argc : |
a pointer to the number of command line arguments |
argv : |
a pointer to the array of comman line arguments |
parameter_string : |
a string which is displayed in the
first line of --help output, after
|
entries : |
a NULL terminated array of GOptionEntrys
describing the options of your program
|
translation_domain : |
a translation domain to use for translating
the --help output for the options in entries
with gettext() , or NULL
|
error : |
a return location for a GError |
Returns : | CLUTTER_INIT_SUCCESS if Clutter has been successfully
initialised, or other values or ClutterInitError in case of
error.
|
Since 0.2
GOptionGroup* clutter_get_option_group (void);
Returns a GOptionGroup for the command line arguments recognized
by Clutter. You should add this group to your GOptionContext with
g_option_context_add_group()
, if you are using g_option_context_parse()
to parse your commandline arguments.
Returns : | a GOptionGroup for the commandline arguments recognized by Clutter |
Since 0.2
gboolean clutter_get_debug_enabled (void);
Check if clutter has debugging turned on.
Returns : | TRUE if debugging is turned on, FALSE otherwise. |
gint clutter_main_level (void);
Retrieves the depth of the Clutter mainloop.
Returns : | The level of the mainloop. |
gulong clutter_get_timestamp (void);
Returns the approximate number of microseconds passed since clutter was intialised.
Returns : | Number of microseconds since clutter_init() was called.
|