Display

open class Display(pointer: <Error class: unknown class><<Error class: unknown class>>)

GdkDisplay 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 class@Gdk.Seat objects. Every display has a one or more seats, which can be accessed with method@Gdk.Display.get_default_seat and method@Gdk.Display.list_seats.

Output devices are represented by class@Gdk.Monitor objects, which can be accessed with method@Gdk.Display.get_monitor_at_surface and similar APIs.

Skipped during bindings generation

  • parameter keys: keys: Out parameter is not supported

  • parameter keys: keys: Out parameter is not supported

  • parameter keyval: keyval: Out parameter is not supported

  • method composited: Property has no getter nor setter

  • method input-shapes: Property has no getter nor setter

  • method rgba: Property has no getter nor setter

  • method shadow-width: Property has no getter nor setter

Constructors

Link copied to clipboard
constructor(pointer: <Error class: unknown class><<Error class: unknown class>>)

Types

Link copied to clipboard
object Companion

Properties

Link copied to clipboard

The dma-buf formats that are supported on this display

Link copied to clipboard
val gdkDisplayPointer: <Error class: unknown class><<Error class: unknown class>>

Functions

Link copied to clipboard
open fun beep()

Emits a short beep on @display

Link copied to clipboard
open fun close()

Closes the connection to the windowing system for the given display.

Link copied to clipboard
fun connectClosed(connectFlags: <Error class: unknown class> = ConnectFlags(0u), handler: (isError: Boolean) -> Unit): <Error class: unknown class>

Emitted when the connection to the windowing system for @display is closed.

Link copied to clipboard
fun connectOpened(connectFlags: <Error class: unknown class> = ConnectFlags(0u), handler: () -> Unit): <Error class: unknown class>

Emitted when the connection to the windowing system for @display is opened.

Link copied to clipboard
fun connectSeatAdded(connectFlags: <Error class: unknown class> = ConnectFlags(0u), handler: (seat: Seat) -> Unit): <Error class: unknown class>

Emitted whenever a new seat is made known to the windowing system.

Link copied to clipboard
fun connectSeatRemoved(connectFlags: <Error class: unknown class> = ConnectFlags(0u), handler: (seat: Seat) -> Unit): <Error class: unknown class>

Emitted whenever a seat is removed by the windowing system.

Link copied to clipboard
fun connectSettingChanged(connectFlags: <Error class: unknown class> = ConnectFlags(0u), handler: (setting: String) -> Unit): <Error class: unknown class>

Emitted whenever a setting changes its value.

Link copied to clipboard
open fun createGlContext(): <Error class: unknown class><GlContext>

Creates a new GdkGLContext for the GdkDisplay.

Link copied to clipboard
open fun deviceIsGrabbed(device: Device): Boolean

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

Link copied to clipboard
open fun flush()

Flushes any requests queued for the windowing system.

Link copied to clipboard

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

Link copied to clipboard

Gets the clipboard used for copy/paste operations.

Link copied to clipboard
open fun getDefaultSeat(): Seat?

Returns the default GdkSeat for this display.

Link copied to clipboard
open fun getMonitorAtSurface(surface: Surface): Monitor?

Gets the monitor in which the largest area of @surface resides.

Link copied to clipboard
open fun getMonitors(): <Error class: unknown class>

Gets the list of monitors associated with this display.

Link copied to clipboard
open fun getName(): String

Gets the name of the display.

Link copied to clipboard

Gets the clipboard used for the primary selection.

Link copied to clipboard
open fun getSetting(name: String, value: <Error class: unknown class>): Boolean

Retrieves a desktop-wide setting such as double-click time for the @display.

Link copied to clipboard

Gets the startup notification ID for a Wayland display, or null if no ID has been defined.

Link copied to clipboard
open fun isClosed(): Boolean

Finds out if the display has been closed.

Link copied to clipboard
open fun isComposited(): Boolean

Returns whether surfaces can reasonably be expected to have their alpha channel drawn correctly on the screen.

Link copied to clipboard
open fun isRgba(): Boolean

Returns whether surfaces on this @display are created with an alpha channel.

Link copied to clipboard
open fun listSeats(): <Error class: unknown class>

Returns the list of seats known to @display.

Link copied to clipboard
open fun notifyStartupComplete(startupId: String)

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

Link copied to clipboard
open fun prepareGl(): <Error class: unknown class><Boolean>

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.

Link copied to clipboard
open fun putEvent(event: Event)

Adds the given event to the event queue for @display.

Link copied to clipboard

Returns true if the display supports input shapes.

Link copied to clipboard

Returns whether it's possible for a surface to draw outside of the window area.

Link copied to clipboard
open fun sync()

Flushes any requests queued for the windowing system and waits until all requests have been handled.