SurfaceImpl

class SurfaceImpl(pointer: <Error class: unknown class><<Error class: unknown class>>) : Surface

The SurfaceImpl type represents a native instance of the abstract Surface class.

Constructors

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

Creates a new instance of Surface for the provided CPointer.

Properties

Link copied to clipboard
open var cursor: Cursor?

The mouse pointer for the GdkSurface.

Link copied to clipboard
open val display: Display

The GdkDisplay connection of the surface.

Link copied to clipboard

The GdkFrameClock of the surface.

Link copied to clipboard
val gdkSurfacePointer: <Error class: unknown class><<Error class: unknown class>>
Link copied to clipboard
open val height: <Error class: unknown class>

The height of the surface, in pixels.

Link copied to clipboard
open val mapped: Boolean

Whether the surface is mapped.

Link copied to clipboard
open val scale: <Error class: unknown class>

The scale of the surface.

Link copied to clipboard
open val scaleFactor: <Error class: unknown class>

The scale factor of the surface.

Link copied to clipboard
open val width: <Error class: unknown class>

The width of the surface in pixels.

Functions

Link copied to clipboard
open fun beep()

Emits a short beep associated to @surface.

Link copied to clipboard

Creates a new GdkCairoContext for rendering on @surface.

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

Creates a new GdkGLContext for the GdkSurface.

Link copied to clipboard
open fun createSimilarSurface(content: <Error class: unknown class>, width: <Error class: unknown class>, height: <Error class: unknown class>): <Error class: unknown class>

Create a new Cairo surface that is as compatible as possible with the given @surface.

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

Sets an error and returns null.

Link copied to clipboard
open fun destroy()

Destroys the window system resources associated with @surface and decrements @surface's reference count.

Link copied to clipboard

Emits the "enter-monitor" signal. See onEnterMonitor.

Link copied to clipboard
fun emitLayout(width: <Error class: unknown class>, height: <Error class: unknown class>)

Emits the "layout" signal. See onLayout.

Link copied to clipboard

Emits the "leave-monitor" signal. See onLeaveMonitor.

Link copied to clipboard
open fun getDeviceCursor(device: Device): Cursor?

Retrieves a GdkCursor pointer for the @device currently set on the specified GdkSurface.

Link copied to clipboard
open fun hide()

Hide the surface.

Link copied to clipboard
open fun isDestroyed(): Boolean

Check to see if a surface is destroyed.

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

Emitted when @surface starts being present on the monitor.

Link copied to clipboard
fun onEvent(connectFlags: <Error class: unknown class> = ConnectFlags(0u), handler: (event: Event) -> Boolean): <Error class: unknown class>

Emitted when GDK receives an input event for @surface.

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

Emitted when the size of @surface is changed, or when relayout should be performed.

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

Emitted when @surface stops being present on the monitor.

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

Emitted when part of the surface needs to be redrawn.

Link copied to clipboard
open fun queueRender()

Forces a signal@Gdk.Surface::render signal emission for @surface to be scheduled.

Link copied to clipboard
open fun requestLayout()

Request a layout phase from the surface's frame clock.

Link copied to clipboard
open fun setDeviceCursor(device: Device, cursor: Cursor)

Sets a specific GdkCursor for a given device when it gets inside @surface.

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

Apply the region to the surface for the purpose of event handling.

Link copied to clipboard
open fun setOpaqueRegion(region: <Error class: unknown class>? = null)

Marks a region of the GdkSurface as opaque.