gdk.display
Module for [Display] class
Types 3
classDisplay : gobject.object.ObjectWrap
#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.Display.getDeviceManager.
Methods
DisplayGidBuilder builder() static nothrowGet builder for [gdk.display.Display] Returns: New builder objectgdk.display.Display getDefault() static nothrowGets the default #GdkDisplay. This is a convenience function for: `gdk_display_manager_get_default_display (gdk_display_manager_get ())`. Returns: a #GdkDisplay, or null if there is no default disp...gdk.display.Display openDefaultLibgtkOnly() static nothrowOpens the default display specified by command line arguments or environment variables, sets it as the default display, and returns it. [gdk.global.parseArgs] must have been called first. If the de...void close() nothrowCloses the connection to the windowing system for the given display, and cleans up associated resources.bool deviceIsGrabbed(gdk.device.Device device) nothrowReturns true if there is an ongoing grab on device for display.void flush() nothrowFlushes 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 th...gdk.app_launch_context.AppLaunchContext getAppLaunchContext() nothrowReturns a #GdkAppLaunchContext suitable for launching applications on the given display. Returns: a new #GdkAppLaunchContext for display. Free with [gobject.object.ObjectWrap.unref] when doneuint getDefaultCursorSize() nothrowReturns the default size to use for cursors on display. Returns: the default cursor size.gdk.window.Window getDefaultGroup() nothrowReturns the default group leader window for all toplevel windows on display. This window is implicitly created by GDK. See [gdk.window.Window.setGroup]. Returns: The default group leader window for...gdk.screen.Screen getDefaultScreen() nothrowGet the default #GdkScreen for display. Returns: the default #GdkScreen object for displaygdk.seat.Seat getDefaultSeat() nothrowReturns the default #GdkSeat for this display. Returns: the default seat.gdk.device_manager.DeviceManager getDeviceManager() nothrowReturns the #GdkDeviceManager associated to display. Returns: A #GdkDeviceManager, or null. This memory is owned by GDK and must not be freed or unreferenced.gdk.event.Event getEvent() nothrowGets the next #GdkEvent to be processed for display, fetching events from the windowing system if necessary. Returns: the next #GdkEvent to be processed, or null if no events are pending. The retur...void getMaximalCursorSize(out uint width, out uint height) nothrowGets the maximal size to use for cursors on display.gdk.monitor.MonitorWrap getMonitor(int monitorNum) nothrowGets a monitor associated with this display.gdk.monitor.MonitorWrap getMonitorAtPoint(int x, int y) nothrowGets the monitor in which the point (`x`, `y`) is located, or a nearby monitor if the point is not in any monitor.gdk.monitor.MonitorWrap getMonitorAtWindow(gdk.window.Window window) nothrowGets the monitor in which the largest area of window resides, or a monitor close to window if it is outside of all monitors.int getNScreens() nothrowGets the number of screen managed by the display. Returns: number of screens.string getName() nothrowGets the name of the display. Returns: a string representing the display name. This string is owned by GDK and should not be modified or freed.void getPointer(out gdk.screen.Screen screen, out int x, out int y, out gdk.types.ModifierType mask) nothrowGets the current location of the pointer and the current modifier mask for a given display.gdk.screen.Screen getScreen(int screenNum) nothrowReturns a screen object for one of the screens of the display.gdk.window.Window getWindowAtPointer(out int winX, out int winY) nothrowObtains 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 ...bool hasPending() nothrowReturns whether the display has events that are waiting to be processed. Returns: true if there are events ready to be processed.bool isClosed() nothrowFinds out if the display has been closed. Returns: true if the display is closed.gdk.device.Device[] listDevices() nothrowReturns the list of available input devices attached to display. The list is statically allocated and should not be freed. Returns: a list of #GdkDevicegdk.seat.Seat[] listSeats() nothrowReturns the list of seats known to display. Returns: the list of seats known to the #GdkDisplayvoid notifyStartupComplete(string startupId) nothrowIndicates to the GUI environment that the application has finished loading, using a given identifier.gdk.event.Event peekEvent() nothrowGets 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 ...bool pointerIsGrabbed() nothrowTest if the pointer is grabbed. Returns: true if an active X pointer grab is in effectvoid putEvent(gdk.event.Event event) nothrowAppends a copy of the given event onto the front of the event queue for display.bool requestSelectionNotification(gdk.atom.Atom selection) nothrowRequest #GdkEventOwnerChange events for ownership changes of the selection named by the given atom.void setDoubleClickDistance(uint distance) nothrowSets 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.Display.setDoubleClickTime]. Applications sh...void setDoubleClickTime(uint msec) nothrowSets 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 ...bool supportsClipboardPersistence() nothrowReturns 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 ...bool supportsComposite() nothrowReturns true if [gdk.window.Window.setComposited] can be used to redirect drawing on the window using compositing.bool supportsCursorAlpha() nothrowReturns true if cursors can use an 8bit alpha channel on display. Otherwise, cursors are restricted to bilevel alpha (i.e. a mask). Returns: whether cursors can have alpha channels.bool supportsCursorColor() nothrowReturns true if multicolored cursors are supported on display. Otherwise, cursors have only a forground and a background color. Returns: whether cursors can have multiple colors.bool supportsInputShapes() nothrowReturns true if gdk_window_input_shape_combine_mask() can be used to modify the input shape of windows on display. Returns: true if windows with modified input shape are supportedbool supportsSelectionNotification() nothrowReturns whether #GdkEventOwnerChange events will be sent when the owner of a selection changes. Returns: whether #GdkEventOwnerChange events will be sent.bool supportsShapes() nothrowReturns true if gdk_window_shape_combine_mask() can be used to create shaped windows on display. Returns: true if shaped windows are supportedvoid sync() nothrowFlushes 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 th...void warpPointer(gdk.screen.Screen screen, int x, int y) nothrowWarps 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 t...gulong connectClosed(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] == bool)))
&& (Parameters!T.length < 2 || (ParameterStorageClassTuple!T[1] == ParameterStorageClass.none && is(Parameters!T[1] : gdk.display.Display)))
&& Parameters!T.length < 3) nothrowConnect to `Closed` signal.gulong connectMonitorAdded(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.monitor.MonitorWrap)))
&& (Parameters!T.length < 2 || (ParameterStorageClassTuple!T[1] == ParameterStorageClass.none && is(Parameters!T[1] : gdk.display.Display)))
&& Parameters!T.length < 3) nothrowConnect to `MonitorAdded` signal.gulong connectMonitorRemoved(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.monitor.MonitorWrap)))
&& (Parameters!T.length < 2 || (ParameterStorageClassTuple!T[1] == ParameterStorageClass.none && is(Parameters!T[1] : gdk.display.Display)))
&& Parameters!T.length < 3) nothrowConnect to `MonitorRemoved` signal.gulong connectOpened(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) nothrowConnect to `Opened` signal.gulong connectSeatAdded(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.seat.Seat)))
&& (Parameters!T.length < 2 || (ParameterStorageClassTuple!T[1] == ParameterStorageClass.none && is(Parameters!T[1] : gdk.display.Display)))
&& Parameters!T.length < 3) nothrowConnect to `SeatAdded` signal.gulong connectSeatRemoved(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.seat.Seat)))
&& (Parameters!T.length < 2 || (ParameterStorageClassTuple!T[1] == ParameterStorageClass.none && is(Parameters!T[1] : gdk.display.Display)))
&& Parameters!T.length < 3) nothrowConnect to `SeatRemoved` signal.Fluent builder implementation template for gdk.display.Display
Fluent builder for gdk.display.Display