gdk.display_manager
Module for [DisplayManager] class
Types 3
A singleton object that offers notification when displays appear or disappear.
You can use gdk.display_manager.DisplayManager.get to obtain the gdk.display_manager.DisplayManager singleton, but that should be rarely necessary. Typically, initializing GTK opens a display that you can work with without ever accessing the gdk.display_manager.DisplayManager.
The GDK library can be built with support for multiple backends. The gdk.display_manager.DisplayManager object determines which backend is used at runtime.
In the rare case that you need to influence which of the backends is being used, you can use func@Gdk.set_allowed_backends. Note that you need to call this function before initializing GTK.
Backend-specific code
When writing backend-specific code that is supposed to work with multiple GDK backends, you have to consider both compile time and runtime. At compile time, use the GDK_WINDOWING_X11, GDK_WINDOWING_WIN32 macros, etc. to find out which backends are present in the GDK library you are building your application against. At runtime, use type-check macros like GDK_IS_X11_DISPLAY() to find out which backend is in use:
#ifdef GDK_WINDOWING_X11
if (GDK_IS_X11_DISPLAY (display))
{
// make X11-specific calls here
}
else
#endif
#ifdef GDK_WINDOWING_MACOS
if (GDK_IS_MACOS_DISPLAY (display))
{
// make Quartz-specific calls here
}
else
#endif
g_error ("Unsupported GDK backend");DisplayManagerGidBuilder builder() static nothrowGet builder for [gdk.display_manager.DisplayManager] Returns: New builder objectgdk.display.Display defaultDisplay() @property nothrowGet `defaultDisplay` property. Returns: The default display.void defaultDisplay(gdk.display.Display propval) @property nothrowSet `defaultDisplay` property. Params: propval = The default display.gdk.display_manager.DisplayManager get() static nothrowGets the singleton [gdk.display_manager.DisplayManager] object.gdk.display.Display getDefaultDisplay() nothrowGets the default [gdk.display.Display]. Returns: a [gdk.display.Display]gdk.display.Display[] listDisplays() nothrowList all currently open displays. Returns: a newly allocated [glib.slist.SList] of [gdk.display.Display] objectsgulong connectDisplayOpened(T)(T callback, Flag!"After" after = No.After) if (isCallable!T
&& is(ReturnType!T == void)
&& (Parameters!T.length < 1 || (ParameterStorageClassTuple!T[0] == ParameterStorageClass.none && is(Parameters!T[0] : gdk.display.Display)))
&& (Parameters!T.length < 2 || (ParameterStorageClassTuple!T[1] == ParameterStorageClass.none && is(Parameters!T[1] : gdk.display_manager.DisplayManager)))
&& Parameters!T.length < 3) nothrowConnect to `DisplayOpened` signal.Fluent builder implementation template for gdk.display_manager.DisplayManager
T defaultDisplay(gdk.display.Display propval) nothrowSet `defaultDisplay` property. Params: propval = The default display. Returns: Builder instance for fluent chainingFluent builder for gdk.display_manager.DisplayManager