mirror of
https://github.com/brl/mutter.git
synced 2025-06-13 16:59:30 +00:00
Add base initialisation function
Add a semi-private function, called clutter_base_init(), which initialises the basic Clutter functionalities (at the moment, just the GLib type system) without calling in the backend-specific code. This function is only useful for gtk-doc, to introspect the library when generating documentation for signals, properties and class hierarchy. Also, change the documentation build system to use clutter_base_init() when launching the scanner program.
This commit is contained in:
@ -93,7 +93,10 @@ _clutter_feature_init (void)
|
||||
gboolean
|
||||
clutter_feature_available (ClutterFeatureFlags feature)
|
||||
{
|
||||
return (__features->flags & feature);
|
||||
if (G_UNLIKELY (!__features))
|
||||
return FALSE;
|
||||
|
||||
return (__features->flags & feature);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -642,3 +642,18 @@ _clutter_boolean_accumulator (GSignalInvocationHint *ihint,
|
||||
|
||||
return continue_emission;
|
||||
}
|
||||
|
||||
void
|
||||
clutter_base_init (void)
|
||||
{
|
||||
static gboolean initialised = FALSE;
|
||||
|
||||
if (!initialised)
|
||||
{
|
||||
initialised = TRUE;
|
||||
|
||||
/* initialise GLib type system */
|
||||
g_type_init ();
|
||||
clutter_actor_get_type ();
|
||||
}
|
||||
}
|
||||
|
@ -60,12 +60,14 @@ gint clutter_main_level (void);
|
||||
|
||||
void clutter_redraw (void);
|
||||
|
||||
gboolean clutter_get_debug_enabled (void);
|
||||
gboolean clutter_get_show_fps (void);
|
||||
gboolean clutter_get_debug_enabled (void);
|
||||
gboolean clutter_get_show_fps (void);
|
||||
|
||||
void clutter_threads_enter (void);
|
||||
void clutter_threads_leave (void);
|
||||
|
||||
void clutter_base_init (void);
|
||||
|
||||
G_END_DECLS
|
||||
|
||||
#endif
|
||||
|
Reference in New Issue
Block a user