Checks the run-time name of the Clutter windowing system backend, using the symbolic macros like CLUTTER_WINDOWING_WIN32
or
CLUTTER_WINDOWING_X11
.
This function should be used in conjuction with the compile-time macros inside applications and libraries that are using the platform-specific windowing system API, to ensure that they are running on the correct windowing system; for instance:
#ifdef CLUTTER_WINDOWING_X11
if (clutter_check_windowing_backend (CLUTTER_WINDOWING_X11))
{
// it is safe to use the clutter_x11_* API
}
else
#endif
#ifdef CLUTTER_WINDOWING_WIN32
if (clutter_check_windowing_backend (CLUTTER_WINDOWING_WIN32))
{
// it is safe to use the clutter_win32_* API
}
else
#endif
g_error ("Unknown Clutter backend.");
backend_type |
the name of the backend to check |
|