Class

GdkDisplay

Description [src]

final class Gdk.Display : GObject.Object
{
  /* No available fields */
}

GdkDisplay objects purpose are two fold:

  • To manage and provide information about input devices (pointers and keyboards)

  • To manage and provide information about the available GdkScreens

GdkDisplay objects are the GDK representation of an 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 instantiated by the application. It is also used to access the keyboard(s) and mouse pointer(s) of the display.

Most of the input device handling has been factored out into the separate GdkDeviceManager object. Every display has a device manager, which you can obtain using gdk_display_get_device_manager().

Hierarchy

hierarchy this GdkDisplay ancestor_0 GObject ancestor_0--this

Ancestors

Functions

gdk_display_get_default

Gets the default GdkDisplay. This is a convenience function for: gdk_display_manager_get_default_display (gdk_display_manager_get ()).

since: 2.2

gdk_display_open

Opens a display.

since: 2.2

gdk_display_open_default_libgtk_only

Opens the default display specified by command line arguments or environment variables, sets it as the default display, and returns it. gdk_parse_args() must have been called first. If the default display has previously been set, simply returns that. An internal function that should not be used by applications.

deprecated: 3.16 

Instance methods

gdk_display_beep

Emits a short beep on display.

since: 2.2

gdk_display_close

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

since: 2.2

gdk_display_device_is_grabbed

Returns TRUE if there is an ongoing grab on device for display.

gdk_display_flush

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 explicitly. 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.

since: 2.4

gdk_display_get_app_launch_context

Returns a GdkAppLaunchContext suitable for launching applications on the given display.

since: 3.0

gdk_display_get_default_cursor_size

Returns the default size to use for cursors on display.

since: 2.4

gdk_display_get_default_group

Returns the default group leader window for all toplevel windows on display. This window is implicitly created by GDK. See gdk_window_set_group().

since: 2.4

gdk_display_get_default_screen

Get the default GdkScreen for display.

since: 2.2

gdk_display_get_default_seat

Returns the default GdkSeat for this display.

since: 3.20

gdk_display_get_device_manager

Returns the GdkDeviceManager associated to display.

deprecated: 3.20. since: 3.0

gdk_display_get_event

Gets the next GdkEvent to be processed for display, fetching events from the windowing system if necessary.

since: 2.2

gdk_display_get_maximal_cursor_size

Gets the maximal size to use for cursors on display.

since: 2.4

gdk_display_get_monitor

Gets a monitor associated with this display.

since: 3.22

gdk_display_get_monitor_at_point

Gets the monitor in which the point (x, y) is located, or a nearby monitor if the point is not in any monitor.

since: 3.22

gdk_display_get_monitor_at_window

Gets the monitor in which the largest area of window resides, or a monitor close to window if it is outside of all monitors.

since: 3.22

gdk_display_get_n_monitors

Gets the number of monitors that belong to display.

since: 3.22

gdk_display_get_n_screens

Gets the number of screen managed by the display.

deprecated: 3.10 since: 2.2

gdk_display_get_name

Gets the name of the display.

since: 2.2

gdk_display_get_pointer

Gets the current location of the pointer and the current modifier mask for a given display.

deprecated: 3.0 since: 2.2

gdk_display_get_primary_monitor

Gets the primary monitor for the display.

since: 3.22

gdk_display_get_screen

Returns a screen object for one of the screens of the display.

deprecated: 3.20 since: 2.2

gdk_display_get_window_at_pointer

Obtains the window underneath the mouse pointer, returning the location of the pointer in that window in win_x, win_y for screen. Returns NULL if the window under the mouse pointer is not known to GDK (for example, belongs to another application).

deprecated: 3.0 since: 2.2

gdk_display_has_pending

Returns whether the display has events that are waiting to be processed.

since: 3.0

gdk_display_is_closed

Finds out if the display has been closed.

since: 2.22

gdk_display_keyboard_ungrab

Release any keyboard grab.

deprecated: 3.0 since: 2.2

gdk_display_list_devices

Returns the list of available input devices attached to display. The list is statically allocated and should not be freed.

deprecated: 3.0 since: 2.2

gdk_display_list_seats

Returns the list of seats known to display.

since: 3.20

gdk_display_notify_startup_complete

Indicates to the GUI environment that the application has finished loading, using a given identifier.

since: 3.0

gdk_display_peek_event

Gets a copy of the first GdkEvent 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.)

since: 2.2

gdk_display_pointer_is_grabbed

Test if the pointer is grabbed.

deprecated: 3.0 since: 2.2

gdk_display_pointer_ungrab

Release any pointer grab.

deprecated: 3.0 since: 2.2

gdk_display_put_event

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

since: 2.2

gdk_display_request_selection_notification

Request GdkEventOwnerChange events for ownership changes of the selection named by the given atom.

since: 2.6

gdk_display_set_double_click_distance

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 gdk_display_set_double_click_time(). Applications should not set this, it is a global user-configured setting.

since: 2.4

gdk_display_set_double_click_time

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.

since: 2.2

gdk_display_store_clipboard

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.

since: 2.6

gdk_display_supports_clipboard_persistence

Returns whether the speicifed 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.

since: 2.6

gdk_display_supports_composite

Returns TRUE if gdk_window_set_composited() can be used to redirect drawing on the window using compositing.

deprecated: 3.16 since: 2.12

gdk_display_supports_cursor_alpha

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

since: 2.4

gdk_display_supports_cursor_color

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

since: 2.4

gdk_display_supports_input_shapes

Returns TRUE if gdk_window_input_shape_combine_mask() can be used to modify the input shape of windows on display.

since: 2.10

gdk_display_supports_selection_notification

Returns whether GdkEventOwnerChange events will be sent when the owner of a selection changes.

since: 2.6

gdk_display_supports_shapes

Returns TRUE if gdk_window_shape_combine_mask() can be used to create shaped windows on display.

since: 2.10

gdk_display_sync

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 gdk_display_sync() before gdk_error_trap_pop() makes sure that any errors generated from earlier requests are handled before the error trap is removed.

since: 2.2

gdk_display_warp_pointer

Warps the pointer of display to the point x,y on the screen screen, unless the pointer is confined to a window by a grab, in which case it will be moved as far as allowed by the grab. Warping the pointer creates events as if the user had moved the mouse instantaneously to the destination.

deprecated: 3.0 since: 2.8

Methods inherited from GObject (43)

Please see GObject for a full list of methods.

Signals

Gdk.Display::closed

The ::closed signal is emitted when the connection to the windowing system for display is closed.

since: 2.2

Gdk.Display::monitor-added

The ::monitor-added signal is emitted whenever a monitor is added.

since: 3.22

Gdk.Display::monitor-removed

The ::monitor-removed signal is emitted whenever a monitor is removed.

since: 3.22

Gdk.Display::opened

The ::opened signal is emitted when the connection to the windowing system for display is opened.

Gdk.Display::seat-added

The ::seat-added signal is emitted whenever a new seat is made known to the windowing system.

since: 3.20

Gdk.Display::seat-removed

The ::seat-removed signal is emitted whenever a seat is removed by the windowing system.

since: 3.20

Signals inherited from GObject (1)
GObject::notify

The notify signal is emitted on an object when one of its properties has its value set through g_object_set_property(), g_object_set(), et al.