## Documentation

Table of Contents
Class Inheritance Tree
Widget Screenshots
Package groups

## Index

Package: Display

- Goto spec source

# Description

    package Gdk.Display is

Gdk_Display objects purpose are two fold: - To grab/ungrab keyboard focus and mouse pointer - To manage and provide information about the Gdk_Screen(s) available for this Gdk_Display Gdk_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 Gdk_Screen objects currently instanciated by the application. It is also used to grab and release the keyboard and the mouse pointer.

Binding from C File version 2.8.17

<see>Gdk_Screen</see>

# Classes

### Gdk_Display_Record

- Goto declaration in source

    type Gdk_Display_Record is new Glib.Object.GObject_Record with null record;

#### Ancestors:

Glib.Object.GObject_Record

#### Primitive operations:

Beep

- To API doc
- To spec

Close

- To API doc
- To spec

Flush

- To API doc
- To spec

Get_Default_Cursor_Size

- To API doc
- To spec

Get_Default_Group

- To API doc
- To spec

Get_Event

- To API doc
- To spec

Get_Maximal_Cursor_Size

- To API doc
- To spec

Get_N_Screens

- To API doc
- To spec

Get_Name

- To API doc
- To spec

Get_Window_At_Pointer

- To API doc
- To spec

Glib.Object.Deallocate

- To API doc
- To spec

(Inherited)
Glib.Object.Get_Type

- To API doc
- To spec

(Inherited)
Glib.Object.Notify

- To API doc
- To spec

(Inherited)
Glib.Object.Ref

- To API doc
- To spec

(Inherited)
Glib.Object.Ref_Sink

- To API doc
- To spec

(Inherited)
Glib.Object.Unref

- To API doc
- To spec

(Inherited)
Keyboard_Ungrab

- To API doc
- To spec

Peek_Event

- To API doc
- To spec

Pointer_Is_Grabbed

- To API doc
- To spec

Pointer_Ungrab

- To API doc
- To spec

Put_Event

- To API doc
- To spec

Request_Selection_Notification

- To API doc
- To spec

Set_Double_Click_Distance

- To API doc
- To spec

Set_Double_Click_Time

- To API doc
- To spec

Store_Clipboard

- To API doc
- To spec

Supports_Clipboard_Persistence

- To API doc
- To spec

Supports_Cursor_Alpha

- To API doc
- To spec

Supports_Cursor_Color

- To API doc
- To spec

Supports_Selection_Notification

- To API doc
- To spec

Sync

- To API doc
- To spec

# Types

### Gdk_Display

- Goto declaration in source

    type Gdk_Display is access all Gdk_Display_Record'Class;

# Constants & Global variables

### Signal_Closed

- Goto declaration in source

(Glib.Signal_Name)

    Signal_Closed : constant Glib.Signal_Name := "closed";

# Subprograms & Entries

### Get_Type

- Goto spec in source
- Goto body in source

    function Get_Type return Glib.GType;

Return the internal type associated with a Gdk_Display

### Open

- Goto spec in source

    function Open (Display_Name: String) return Gdk_Display;

Open a new display. Display_Name follows the unix convention, and should have the format host:screen, for instance "foo.com:0".

### Get_Default

- Goto spec in source

    function Get_Default return Gdk_Display;

Gets the default Gdk_Display

### Get_Name

- Goto spec in source

    function Get_Name (Display: access Gdk_Display_Record) return String;

Return the name of the screen

### Get_N_Screens

- Goto spec in source

    function Get_N_Screens (Display: access Gdk_Display_Record) return Glib.Gint;

Return the number of screens managed by the display. See the function Gdk.Screen.Get_Screen or Gdk.Screen.Get_Default_Screen

### Pointer_Ungrab

- Goto spec in source

    procedure Pointer_Ungrab (Display: access Gdk_Display_Record;Time: Glib.Guint32 := Gdk.Types.Current_Time);

Release any pointer grab.

### Keyboard_Ungrab

- Goto spec in source

    procedure Keyboard_Ungrab (Display: access Gdk_Display_Record;Time: Glib.Guint32 := Gdk.Types.Current_Time);

Release any keyboard grab

### Pointer_Is_Grabbed

- Goto spec in source

    function Pointer_Is_Grabbed (Display: access Gdk_Display_Record) return Boolean;

Test if the pointer is grabbed.

### Beep

- Goto spec in source

    procedure Beep (Display: access Gdk_Display_Record);

Emits a short beep on display

### Sync

- Goto spec in source

    procedure Sync (Display: access Gdk_Display_Record);

Flushes any requests queued for the windowing system and waits until all requests have been handled. This is often used for making sure that the display is synchronized with the current state of the program. Calling Sync before Gdk.Error.Trap_Pop makes sure that any errors generated from earlier requests are handled before the error trap is removed. This is most useful for X11. On windowing systems where requests are handled synchronously, this function will do nothing.

### Flush

- Goto spec in source

    procedure Flush (Display: access Gdk_Display_Record);

Flushes any requests queued for the windowing system; this happens automatically when the main loop blocks waiting for new events, but if your application is drawing without returning control to the main loop, you may need to call this function explicitely. A common case where this function needs to be called is when an application is executing drawing commands from a thread other than the thread where the main loop is running. This is most useful for X11. On windowing systems where requests are handled synchronously, this function will do nothing.

### Close

- Goto spec in source

    procedure Close (Display: access Gdk_Display_Record);

Closes the connection to the windowing system for the given display, and cleans up associated resources.

### Get_Event

- Goto spec in source

    function Get_Event (Display: access Gdk_Display_Record) return Gdk.Event.Gdk_Event;

Gets the next Gdk_Event to be processed for Display, fetching events from the windowing system if necessary. null is returned if no events are pending. The returned Gdk_Event must be freed with Gdk.Event.Free

### Peek_Event

- Goto spec in source

    function Peek_Event (Display: access Gdk_Display_Record) return Gdk.Event.Gdk_Event;

Gets a copy of the first Gdk_Event in the Display's event queue, without removing the event from the queue. (Note that this function will not get more events from the windowing system. It only checks the events that have already been moved to the GDK event queue.) null is returned if there are no events in the queue. The returned event should be freed with Gdk.Event.Free.

### Put_Event

- Goto spec in source

    procedure Put_Event (Display: access Gdk_Display_Record;Event: Gdk.Event.Gdk_Event);

Appends a copy of the given event onto the front of the event queue for Display.

### Set_Double_Click_Time

- Goto spec in source

    procedure Set_Double_Click_Time (Display: access Gdk_Display_Record;Msec: Glib.Guint);

Sets the double click time (two clicks within this time interval count as a double click and result in a GDK_2BUTTON_PRESS event). Applications should not set this, it is a global user-configured setting.

### Set_Double_Click_Distance

- Goto spec in source

    procedure Set_Double_Click_Distance (Display: access Gdk_Display_Record;Distance: Glib.Guint);

Sets the double click distance (two clicks within this distance count as a double click and result in a GDK_2BUTTON_PRESS event). See also Set_Double_Click_Time. Applications should not set this, it is a global user-configured setting.

### Get_Window_At_Pointer

- Goto spec in source

    procedure Get_Window_At_Pointer (Display: access Gdk_Display_Record;Win_X: out Glib.Gint;Win_Y: out Glib.Gint;Win: out Gdk.Gdk_Window);

Obtains the window underneath the mouse pointer, returning the location of that window in Win_X, Win_Y. Returns nullif the window under the mouse pointer is not known to GDK (for example, belongs to another application). (Win_X, Win_Y) are relative to the origin of the window under the pointer.

### Supports_Cursor_Color

- Goto spec in source

    function Supports_Cursor_Color (Display: access Gdk_Display_Record) return Boolean;

Returns TRUE if multicolored cursors are supported on display. Otherwise, cursors have only a forground and a background color.

### Supports_Cursor_Alpha

- Goto spec in source

    function Supports_Cursor_Alpha (Display: access Gdk_Display_Record) return Boolean;

Returns TRUE if cursors can use an 8bit alpha channel on display. Otherwise, cursors are restricted to bilevel alpha (i.e. a mask).

### Get_Default_Cursor_Size

- Goto spec in source

    function Get_Default_Cursor_Size (Display: access Gdk_Display_Record) return Glib.Guint;

Returns the default size to use for cursors on display.

### Get_Maximal_Cursor_Size

- Goto spec in source

    procedure Get_Maximal_Cursor_Size (Display: access Gdk_Display_Record;Width: out Glib.Guint;Height: out Glib.Guint);

Gets the maximal size to use for cursors on display

### Get_Default_Group

- Goto spec in source

    function Get_Default_Group (Display: access Gdk_Display_Record) return Gdk.Gdk_Window;

Returns the default group leader window for all toplevel windows on display. This window is implicitly created by GDK. See Gdk.Window.Set_Group.

### Supports_Selection_Notification

- Goto spec in source

    function Supports_Selection_Notification (Display: access Gdk_Display_Record) return Boolean;

Returns whether Gdk.Event.Owner_Change events will be sent when the owner of a selection changes.

### Request_Selection_Notification

- Goto spec in source

    function Request_Selection_Notification (Display: access Gdk_Display_Record;Selection: Gdk.Types.Gdk_Atom) return Boolean;

Request Gdk.Event.Owner_Change events for ownership changes of the selection named by the given atom.

### Supports_Clipboard_Persistence

- Goto spec in source

    function Supports_Clipboard_Persistence (Display: access Gdk_Display_Record) return Boolean;

Returns whether the specifed display supports clipboard persistance; i.e. if it's possible to store the clipboard data after an application has quit. On X11 this checks if a clipboard daemon is running.

### Store_Clipboard

- Goto spec in source

    procedure Store_Clipboard (Display: access Gdk_Display_Record;Clipboard_Window: Gdk.Gdk_Window;Time: Glib.Guint32;Targets: Gdk.Types.Gdk_Atom_Array);

Issues a request to the clipboard manager to store the clipboard data. On X11, this is a special program that works according to the freedesktop clipboard specification, available at http://www.freedesktop.org/Standards/clipboard-manager-spec. See also Gtk.Clipboard.Store.