DVUI

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.end before 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.Texture from premultiplied alpha pixels in RGBA. The

textureUpdate

Update a dvui.Texture from premultiplied alpha pixels in RGBA. The

textureUpdateSubRect

Update a sub-rectangle of a dvui.Texture from premultiplied alpha

textureDestroy

Destroy texture made with textureCreate. After this call, this texture

textureCreateTarget

Create a dvui.Texture that can be rendered to with renderTarget. The

textureReadTarget

Read pixel data (RGBA) from texture into pixels_out.

textureClearTarget

Destroy texture made with Target.Create. After this call, this texture

textureDestroyTarget

Destroy texture made with Target.Create. After this call, this texture

textureFromTarget

Convert target made with textureCreateTarget into return texture

textureFromTargetTemp

Get a temporary drawable texture from this target, as if made by

renderTarget

Render future drawClippedTriangles to the passed texture (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.refresh when it is called from a background

accessKitInitInBegin

Initialize accessKit from Window.begin. Returns true if 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