check_windowing_backend


Description:


[ Version ( since = "1.10" ) ]
public bool check_windowing_backend (string backend_type)

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.");

Parameters:

backend_type

the name of the backend to check

Returns:

true if the current Clutter windowing system backend is the one checked, and false otherwise


Namespace: Clutter
Package: clutter-1.0



2022 vala-language.org