gdk.display

Module for [Display] class

Types 3

gdk.display.Display objects are the GDK representation of a workstation.

Their purpose are two-fold:

  • To manage and provide information about input devices (pointers, keyboards, etc)
  • To manage and provide information about output devices (monitors, projectors, etc)

Most of the input device handling has been factored out into separate gdk.seat.Seat objects. Every display has a one or more seats, which can be accessed with gdk.display.Display.getDefaultSeat and gdk.display.Display.listSeats.

Output devices are represented by gdk.monitor.MonitorWrap objects, which can be accessed with gdk.display.Display.getMonitorAtSurface and similar APIs.

Methods
GType _getGType() static nothrow
GType _gType() @property nothrow
Display self() nothrowReturns `this`, for use in `with` statements.
DisplayGidBuilder builder() static nothrowGet builder for [gdk.display.Display] Returns: New builder object
bool composited() @property nothrowGet `composited` property. Returns: true if the display properly composites the alpha channel.
gdk.dmabuf_formats.DmabufFormats dmabufFormats() @property nothrowGet `dmabufFormats` property. Returns: The dma-buf formats that are supported on this display
bool inputShapes() @property nothrowGet `inputShapes` property. Returns: true if the display supports input shapes.
bool rgba() @property nothrowGet `rgba` property. Returns: true if the display supports an alpha channel.
bool shadowWidth() @property nothrowGet `shadowWidth` property. Returns: true if the display supports extensible frames.
gdk.display.Display getDefault() static nothrowGets the default [gdk.display.Display].
gdk.display.Display open(string displayName = null) static nothrowOpens a display.
void beep() nothrowEmits a short beep on display
void close() nothrowCloses the connection to the windowing system for the given display.
gdk.glcontext.GLContext createGlContext()Creates a new [gdk.glcontext.GLContext] for the [gdk.display.Display].
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.
gdk.app_launch_context.AppLaunchContext getAppLaunchContext() nothrowReturns a [gdk.app_launch_context.AppLaunchContext] suitable for launching applications on the given display. Returns: a new [gdk.app_launch_context.AppLaunchContext] for display
gdk.clipboard.Clipboard getClipboard() nothrowGets the clipboard used for copy/paste operations. Returns: the display's clipboard
gdk.seat.Seat getDefaultSeat() nothrowReturns the default [gdk.seat.Seat] for this display.
gdk.dmabuf_formats.DmabufFormats getDmabufFormats() nothrowReturns the dma-buf formats that are supported on this display.
gdk.monitor.MonitorWrap getMonitorAtSurface(gdk.surface.Surface surface) nothrowGets the monitor in which the largest area of surface resides.
gio.list_model.ListModel getMonitors() nothrowGets the list of monitors associated with this display.
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.
gdk.clipboard.Clipboard getPrimaryClipboard() nothrowGets the clipboard used for the primary selection.
bool getSetting(string name, gobject.value.Value value) nothrowRetrieves a desktop-wide setting such as double-click time for the display.
string getStartupNotificationId() nothrowGets the startup notification ID for a Wayland display, or null if no ID has been defined. Returns: the startup notification ID for display
bool isClosed() nothrowFinds out if the display has been closed. Returns: true if the display is closed.
bool isComposited() nothrowReturns whether surfaces can reasonably be expected to have their alpha channel drawn correctly on the screen.
bool isRgba() nothrowReturns whether surfaces on this display are created with an alpha channel.
gdk.seat.Seat[] listSeats() nothrowReturns the list of seats known to display. Returns: the list of seats known to the [gdk.display.Display]
bool mapKeycode(uint keycode, out gdk.types.KeymapKey[] keys, out uint[] keyvals) nothrowReturns the keyvals bound to keycode.
bool mapKeyval(uint keyval, out gdk.types.KeymapKey[] keys) nothrowObtains a list of keycode/group/level combinations that will generate keyval.
void notifyStartupComplete(string startupId) nothrowIndicates to the GUI environment that the application has finished loading, using a given identifier.
bool prepareGl()Checks that OpenGL is available for self and ensures that it is properly initialized. When this fails, an error will be set describing the error and this function returns false.
void putEvent(gdk.event.Event event) nothrowAdds the given event to the event queue for display.
bool supportsInputShapes() nothrowReturns true if the display supports input shapes.
bool supportsShadowWidth() nothrowReturns whether it's possible for a surface to draw outside of the window area.
void sync() nothrowFlushes any requests queued for the windowing system and waits until all requests have been handled.
bool translateKey(uint keycode, gdk.types.ModifierType state, int group, out uint keyval, out int effectiveGroup, out int level, out gdk.types.ModifierType consumed) nothrowTranslates the contents of a [gdk.event_key.EventKey] into a keyval, effective group, and level.
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 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.
gulong connectSettingChanged(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] == string))) && (Parameters!T.length < 2 || (ParameterStorageClassTuple!T[1] == ParameterStorageClass.none && is(Parameters!T[1] : gdk.display.Display))) && Parameters!T.length < 3) nothrowConnect to `SettingChanged` signal.
Constructors
this(void * ptr, Flag!"Take" take)

Fluent builder implementation template for gdk.display.Display

Fluent builder for gdk.display.Display

Methods
Display build() nothrowCreate object from builder. Returns: New object