Package: gdk

Class gdk-display-manager

Superclasses

g-object, common-lisp:standard-object, common-lisp:t

Documented Subclasses

None

Direct Slots

default-display
The default-display property of type gdk-display (Read / Write)
The default display for GDK.

Details

The purpose of the gdk-display-manager singleton object is to offer notification when displays appear or disappear or the default display changes.

You can use the function gdk-display-manager-get to obtain the gdk-display-manager 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 object.

The GDK library can be built with support for multiple backends. The gdk-display-manager object determines which backend is used at runtime.

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:

Example

Backend specific code
   #ifdef GDK_WINDOWING_X11
     if (GDK_IS_X11_DISPLAY (display))
       {
         /* make X11-specific calls here */
       }
     else
   #endif
   #ifdef GDK_WINDOWING_QUARTZ
     if (GDK_IS_QUARTZ_DISPLAY (display))
       {
         /* make Quartz-specific calls here */
       }
     else
   #endif
     g_error ("Unsupported GDK backend");    

Signal Details

The "display-opened" signal
 lambda (manager display)    :run-last      
The signal is emitted when a display is opened.
manager
The gdk-display-manager object on which the signal is emitted.
display
The opened gdk-display object.
 

Slot Access Functions

Inherited Slot Access Functions

See also

2020-11-6