Screens and displays
====================

Multihead support is based around two main object types:

  * display

  * screen

display objects are the GDK representation of the X Display which can be described as a workstation consisting of a keyboard a pointing device (such as a mouse) and one or more screens. It is used to open and keep track of various GdkScreen objects currently instanciated by the application. It is also used to grab and release the keyboard and the mouse pointer.

screen objects are the GDK representation of a physical screen. It is used throughout GDK and GTK+ to specify which screen the top level windows are to be displayed on. It is also used to query the screen specification and default settings such as the default colormap (screen-default-colormap), the screen width (screen-width), etc.

The following code samples demonstrate common usage of the objects described above.

Testing the number of screen on the current display:

     (use-package :gdk)

     (defvar *display* (default-display))

     (display-name *display*) => ":0.0"

     (display-n-screens *display*) => 1

Opening a second display: (TODO)

     /* screen2_name needs to be initialized before calling
     /* gdk_display_new() */
     second_display = gdk_display_new (&argc, &argv, second_screen_name);
     if (second_display)
         second_screen = gdk_display_get_default_screen (second_display);
     else
       {
     	g_print ("Can't open display :\n\t%s\n\n",
     		  second_screen_name);
         exit (1);
       }
     /* now GdkScreen can be assigned to GtkWindows */

     window = gtk_window_new (GTK_WINDOW_TOPLEVEL);
     gtk_window_set_screen (window, second_screen);

display
-------

display
g-object

display controls the keyboard/mouse pointer grabs and a set of screens.

display objects purpose are two fold:

  * To grab/ungrab keyboard focus and mouse pointer

  * To manage and provide information about the screen(s) available for this display

display objects are the GDK representation of the X Display which can be described as a workstation consisting of a keyboard a pointing device (such as a mouse) and one or more screens. It is used to open and keep track of various screen objects currently instanciated by the application. It is also used to grab and release the keyboard and the mouse pointer.

display-name
............

display-name, display, string
The name of a DISPLAY (e.g. ":0.0")

display-n-screens
.................

display-n-screens, display, integer
The number of screen managed by the DISPLAY.

display-default-screens
.......................

display-default-screen, display, screen
The default screen of the DISPLAY.

screen
------

screen
Superclass: g-object

Slots:

  * active-window. Type: gdk-window. Accessor: screen-active-window. Read-only.

  * composited-p. Type: boolean. Accessor: screen-composited-p. Read-only.

  * default-colormap. Type: gdk-colormap. Accessor: screen-default-colormap.

  * display. Type: display. Accessor: screen-display. Read-only.

  * display-name. Type: string. Accessor: screen-display-name. Read-only.

  * font-options. Type: gpointer. Accessor: screen-font-options.

  * height. Type: integer. Accessor: screen-height. Read-only.

  * height-mm. Type: integer. Accessor: screen-height-mm. Read-only.

  * n-monitors. Type: integer. Accessor: screen-n-monitors. Read-only.

  * number. Type: integer. Accessor: screen-number. Read-only.

  * resolution. Type: double-float. Accessor: screen-resolution.

  * rgb-colormap. Type: gdk-colormap. Accessor: screen-rgb-colormap. Read-only.

  * rgb-visual. Type: visual. Accessor: screen-rgb-visual. Read-only.

  * rgba-colormap. Type: gdk-colormap. Accessor: screen-rgba-colormap. Read-only.

  * rgba-visual. Type: visual. Accessor: screen-rgba-visual. Read-only.

  * root-window. Type: gdk-window. Accessor: screen-root-window. Read-only.

  * system-colormap. Type: gdk-colormap. Accessor: screen-system-colormap. Read-only.

  * system-visual. Type: visual. Accessor: screen-system-visual. Read-only.

  * toplevel-windows. Type: list of gdk-window. Accessor: screen-toplevel-windows. Read-only.

  * visuals. Type: list of visual. Accessor: screen-visuals. Read-only.

  * width. Type: integer. Accessor: screen-width. Read-only.

  * width-mm. Type: integer. Accessor: screen-width-mm. Read-only.

  * window-stack. Type: list of gdk-window. Accessor: screen-window-stack. Read-only.

Signals:

  * \"composited-changed\". Signature: (instance screen) => void. Options: run-last.

  * \"monitors-changed\". Signature: (instance screen) => void. Options: run-last.

  * \"size-changed\". Signature: (instance screen) => void. Options: run-last.

Gdk Objects
===========

     [file gdk.objects.texi not included]

Gdk Structs
===========

     [file gdk.structs.texi not included]

Gdk Enums
=========

     [file gdk.enums.texi not included]

Gdk Flags
=========

     [file gdk.flags.texi not included]