Backend
Provides a consistent API for interacting with the backend
Fields
- impl:*Implementation
- *Implementation
- render_impl:if (dvui.render_backend.kind == .default) void else *dvui.render_backend
- if (dvui.render_backend.kind == .default) void else *dvui.render_backend
Functions
- nanoTime
Get monotonic nanosecond timestamp. Doesn't have to be system time.
- sleep
Sleep for nanoseconds.
- begin
Called by dvui during
dvui.Window.begin, so prior to any dvui- end
Called during
dvui.Window.endbefore freeing any memory for the current frame.- pixelSize
Return size of the window in physical pixels. For a 300x200 retina
- windowSize
Return size of the window in logical pixels. For a 300x200 retina
- contentScale
Return current system content scaling. This is separate from pixel scaling
- drawClippedTriangles
Render a triangle list using the idx indexes into the vtx vertexes
- textureCreate
Create a
dvui.Texturefrom premultiplied alphapixelsin RGBA. The- textureUpdate
Update a
dvui.Texturefrom premultiplied alphapixelsin RGBA. The- textureUpdateSubRect
Update a sub-rectangle of a
dvui.Texturefrom premultiplied alpha- textureDestroy
Destroy
texturemade withtextureCreate. After this call, this texture- textureCreateTarget
Create a
dvui.Texturethat can be rendered to withrenderTarget. The- textureReadTarget
Read pixel data (RGBA) from
textureintopixels_out.- textureClearTarget
Destroy
texturemade withTarget.Create. After this call, this texture- textureDestroyTarget
Destroy
texturemade withTarget.Create. After this call, this texture- textureFromTarget
Convert
targetmade withtextureCreateTargetinto return texture- textureFromTargetTemp
Get a temporary drawable texture from this target, as if made by
- renderTarget
Render future
drawClippedTrianglesto the passedtexture(or screen- setCursor
Set the cursor based on dvui's request.
- textInputRect
Manage text input.
- renderPresent
Render the Window to the OS now.
- clipboardText
Get clipboard content (text only)
- clipboardTextSet
Set clipboard content (text only)
- openURL
Open URL in system browser. If using the web backend, new_window controls
- preferredColorScheme
Get the preferredColorScheme if available
- prefersReducedMotion
Get the prefersReducedMotion if available
- refresh
Called by
dvui.refreshwhen it is called from a background- accessKitInitInBegin
Initialize accessKit from
Window.begin. Returnstrueif access kit was initialized- native
Get native OS window handle.
- title
Set OS window title.
- windowStateSet
Set the OS window state (fullscreen, maximize, normal).
Constants
- kind
The current implementation used
Error Sets
Aliases
- Common
This is a file with common implementiations that are used by