OpenTuiBindings class

Guarded Dart wrapper around Noir's selected OpenTUI v0.5.1 exports.

Constructors

OpenTuiBindings()
Opens the configured native library.

Properties

hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

addToHitGrid(RendererHandle renderer, int x, int y, int width, int height, int id) → void
Adds a native debug hit-grid region.
attributesGetLinkId(int attributes) int
Extracts the native hyperlink ID from attributes.
Packs linkId into a native text attribute word.
bufferClear(OptimizedBufferHandle buffer, Color background) → void
Clears buffer to background.
bufferClearOpacity(OptimizedBufferHandle buffer) → void
Clears every value from buffer's opacity stack.
bufferClearScissorRects(OptimizedBufferHandle buffer) → void
Clears every clip rectangle from buffer's scissor stack.
bufferDrawBox(OptimizedBufferHandle buffer, int x, int y, int width, int height, BoxOptions options, Color borderColor, Color backgroundColor) → void
Draws a box with optional title.
bufferDrawImage(OptimizedBufferHandle buffer, TerminalImageHandle image, {required int x, required int y, required int width, required int height, required int pixelWidth, required int pixelHeight, required int sourceX, required int sourceY, required int sourceWidth, required int sourceHeight, required int protocol}) bool
Records a native image placement in buffer.
bufferDrawText(OptimizedBufferHandle buffer, String text, int x, int y, Color foreground, Color? background, int attributes) → void
Draws one styled UTF-8 run.
bufferFillRect(OptimizedBufferHandle buffer, int x, int y, int width, int height, Color background) → void
Fills a rectangular region.
bufferGetAttributesPtr(OptimizedBufferHandle buffer) Pointer<Uint32>
Returns canonical u32 attribute storage.
bufferGetBgPtr(OptimizedBufferHandle buffer) Pointer<Uint16>
Returns canonical packed u16 background storage.
bufferGetCharPtr(OptimizedBufferHandle buffer) Pointer<Uint32>
Returns the native encoded-character array.
bufferGetFgPtr(OptimizedBufferHandle buffer) Pointer<Uint16>
Returns canonical packed u16 foreground storage.
bufferPopOpacity(OptimizedBufferHandle buffer) → void
Pops the innermost value from buffer's opacity stack.
bufferPopScissorRect(OptimizedBufferHandle buffer) → void
Pops the innermost clip rectangle from buffer's scissor stack.
bufferPushOpacity(OptimizedBufferHandle buffer, double opacity) → void
Pushes opacity onto buffer's native opacity stack.
bufferPushScissorRect(OptimizedBufferHandle buffer, int x, int y, int width, int height) → void
Pushes a clip rectangle onto buffer's native scissor stack.
bufferResize(OptimizedBufferHandle buffer, int width, int height) → void
Resizes buffer.
bufferSetCellWithAlphaBlending(OptimizedBufferHandle buffer, int x, int y, int character, Color foreground, Color background, int attributes) → void
Writes one encoded cell through OpenTUI's alpha-blending path.
checkHit(RendererHandle renderer, int x, int y) int
Checks a native debug hit-grid coordinate.
clearClipboardOSC52(RendererHandle renderer, int target) bool
Clears one OSC 52 clipboard target.
clearTerminal(RendererHandle renderer) → void
Clears the terminal.
copyToClipboardOSC52(RendererHandle renderer, int target, String text) bool
Copies UTF-8 text through OpenTUI's OSC 52 terminal writer.
createRenderer(int width, int height, {bool testing = false}) RendererHandle
Creates a renderer. Testing renderers use OpenTUI's memory output.
destroyRenderer(RendererHandle renderer) → void
Destroys renderer.
disableKittyKeyboard(RendererHandle renderer) → void
Disables Kitty keyboard input.
disableMouse(RendererHandle renderer) → void
Disables mouse input.
drawFrameBuffer(OptimizedBufferHandle target, int destX, int destY, OptimizedBufferHandle frameBuffer, int sourceX, int sourceY, int sourceWidth, int sourceHeight) → void
Composites frameBuffer into target.
enableKittyKeyboard(RendererHandle renderer, int flags) → void
Enables Kitty keyboard input.
enableMouse(RendererHandle renderer, bool enableMovement) → void
Enables mouse input.
getBufferHeight(OptimizedBufferHandle buffer) int
Returns buffer's height in cells.
getBufferWidth(OptimizedBufferHandle buffer) int
Returns buffer's width in cells.
getCurrentBuffer(RendererHandle renderer) OptimizedBufferHandle
Returns the borrowed current-frame buffer handle.
getNextBuffer(RendererHandle renderer) OptimizedBufferHandle
Returns the borrowed next-frame buffer handle.
imageCreateFromRgba(Uint8List pixels, {required int width, required int height, required int stride}) → ({TerminalImageHandle? handle, int status})
Creates a native image by copying an RGBA pixel buffer.
imageDecode(Uint8List data) → ({TerminalImageHandle? handle, int status})
Decodes encoded image bytes into a native image handle.
imageDestroy(TerminalImageHandle image) → void
Destroys image.
imageGetInfo(TerminalImageHandle image) → ({List<int> fields, int status})
Returns the eight canonical NativeImageInfo fields and native status.
linkAlloc(Uri uri) int
Allocates a native hyperlink ID for a UTF-8 URL of at most 512 bytes.
linkGetUrl(int id) String?
Resolves a native hyperlink ID to its semantic URL.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
processCapabilityResponse(RendererHandle renderer, String response) → void
Processes a terminal capability response.
queryPixelResolution(RendererHandle renderer) → void
Asks the terminal to report pixel resolution.
render(RendererHandle renderer, bool force) OpenTuiRenderStatus
Renders a frame, accepting both rendered and intentionally skipped frames.
resizeRenderer(RendererHandle renderer, int width, int height) → void
Resizes the renderer and its owned buffers.
setBackgroundColor(RendererHandle renderer, Color color) → void
Sets the terminal background color.
setCursorColor(RendererHandle renderer, Color color) → void
Sets cursor color through setCursorStyleOptions.
setCursorPosition(RendererHandle renderer, int x, int y, bool visible) → void
Sets cursor position and visibility.
setCursorStyle(RendererHandle renderer, int style, bool blinking) → void
Sets cursor style and blinking through setCursorStyleOptions.
setupTerminal(RendererHandle renderer, bool useAlternateScreen) → void
Sets up terminal modes.
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited