gdk.surface
Module for [Surface] class
Types 3
classSurface : gobject.object.ObjectWrap
A gdk.surface.Surface is a rectangular region on the screen.
It’s a low-level object, used to implement high-level objects such as GtkWindow.
The surfaces you see in practice are either gdk.toplevel.Toplevel or gdk.popup.Popup, and those interfaces provide much of the required API to interact with these surfaces. Other, more specialized surface types exist, but you will rarely interact with them directly.
Methods
SurfaceGidBuilder builder() static nothrowGet builder for [gdk.surface.Surface] Returns: New builder objectgdk.cursor.Cursor cursor() @property nothrowGet `cursor` property. Returns: The mouse pointer for the [gdk.surface.Surface].void cursor(gdk.cursor.Cursor propval) @property nothrowSet `cursor` property. Params: propval = The mouse pointer for the [gdk.surface.Surface].gdk.display.Display display() @property nothrowGet `display` property. Returns: The [gdk.display.Display] connection of the surface.gdk.frame_clock.FrameClock frameClock() @property nothrowGet `frameClock` property. Returns: The [gdk.frame_clock.FrameClock] of the surface.int scaleFactor() @property nothrowGet `scaleFactor` property. Returns: The scale factor of the surface.gdk.surface.Surface newPopup(gdk.surface.Surface parent, bool autohide) static nothrowCreate a new popup surface.gdk.surface.Surface newToplevel(gdk.display.Display display) static nothrowCreates a new toplevel surface.gdk.cairo_context.CairoContext createCairoContext() nothrowCreates a new [gdk.cairo_context.CairoContext] for rendering on surface. Returns: the newly created [gdk.cairo_context.CairoContext]gdk.glcontext.GLContext createGlContext()Creates a new [gdk.glcontext.GLContext] for the [gdk.surface.Surface].cairo.surface.Surface createSimilarSurface(cairo.types.Content content, int width, int height) nothrowCreate a new Cairo surface that is as compatible as possible with the given surface.gdk.vulkan_context.VulkanContext createVulkanContext()Sets an error and returns null. Returns: null Throws: [ErrorWrap]void destroy() nothrowDestroys the window system resources associated with surface and decrements surface's reference count.gdk.cursor.Cursor getCursor() nothrowRetrieves a [gdk.cursor.Cursor] pointer for the cursor currently set on the [gdk.surface.Surface].gdk.cursor.Cursor getDeviceCursor(gdk.device.Device device) nothrowRetrieves a [gdk.cursor.Cursor] pointer for the device currently set on the specified [gdk.surface.Surface].bool getDevicePosition(gdk.device.Device device, out double x, out double y, out gdk.types.ModifierType mask) nothrowObtains the current device position and modifier state.gdk.display.Display getDisplay() nothrowGets the [gdk.display.Display] associated with a [gdk.surface.Surface]. Returns: the [gdk.display.Display] associated with surfacedouble getScale() nothrowReturns the internal scale that maps from surface coordinates to the actual device pixels.int getScaleFactor() nothrowReturns the internal scale factor that maps from surface coordinates to the actual device pixels.bool isDestroyed() nothrowCheck to see if a surface is destroyed. Returns: true if the surface is destroyedvoid queueRender() nothrowForces a [gdk.surface.Surface.render] signal emission for surface to be scheduled.void setCursor(gdk.cursor.Cursor cursor = null) nothrowSets the default mouse pointer for a [gdk.surface.Surface].void setDeviceCursor(gdk.device.Device device, gdk.cursor.Cursor cursor) nothrowSets a specific [gdk.cursor.Cursor] for a given device when it gets inside surface.void setInputRegion(cairo.region.Region region) nothrowApply the region to the surface for the purpose of event handling.void setOpaqueRegion(cairo.region.Region region = null) nothrowMarks a region of the [gdk.surface.Surface] as opaque.bool translateCoordinates(gdk.surface.Surface to, ref double x, ref double y) nothrowTranslates coordinates between two surfaces.gulong connectEnterMonitor(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.surface.Surface)))
&& Parameters!T.length < 3) nothrowConnect to `EnterMonitor` signal.gulong connectEvent(T)(T callback, Flag!"After" after = No.After) if (isCallable!T
&& is(ReturnType!T == bool)
&& (Parameters!T.length < 1 || (ParameterStorageClassTuple!T[0] == ParameterStorageClass.none && is(Parameters!T[0] == gdk.event.Event)))
&& (Parameters!T.length < 2 || (ParameterStorageClassTuple!T[1] == ParameterStorageClass.none && is(Parameters!T[1] : gdk.surface.Surface)))
&& Parameters!T.length < 3) nothrowConnect to `Event` signal.gulong connectLayout(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] == int)))
&& (Parameters!T.length < 2 || (ParameterStorageClassTuple!T[1] == ParameterStorageClass.none && is(Parameters!T[1] == int)))
&& (Parameters!T.length < 3 || (ParameterStorageClassTuple!T[2] == ParameterStorageClass.none && is(Parameters!T[2] : gdk.surface.Surface)))
&& Parameters!T.length < 4) nothrowConnect to `Layout` signal.gulong connectLeaveMonitor(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.surface.Surface)))
&& Parameters!T.length < 3) nothrowConnect to `LeaveMonitor` signal.gulong connectRender(T)(T callback, Flag!"After" after = No.After) if (isCallable!T
&& is(ReturnType!T == bool)
&& (Parameters!T.length < 1 || (ParameterStorageClassTuple!T[0] == ParameterStorageClass.none && is(Parameters!T[0] == cairo.region.Region)))
&& (Parameters!T.length < 2 || (ParameterStorageClassTuple!T[1] == ParameterStorageClass.none && is(Parameters!T[1] : gdk.surface.Surface)))
&& Parameters!T.length < 3) nothrowConnect to `Render` signal.Fluent builder implementation template for gdk.surface.Surface
Methods
T cursor(gdk.cursor.Cursor propval) nothrowSet `cursor` property. Params: propval = The mouse pointer for the [gdk.surface.Surface]. Returns: Builder instance for fluent chainingT display(gdk.display.Display propval) nothrowSet `display` property. Params: propval = The [gdk.display.Display] connection of the surface. Returns: Builder instance for fluent chainingT frameClock(gdk.frame_clock.FrameClock propval) nothrowSet `frameClock` property. Params: propval = The [gdk.frame_clock.FrameClock] of the surface. Returns: Builder instance for fluent chainingFluent builder for gdk.surface.Surface
Methods