Skip to content

nimterm/platform_posix

This page is generated from the module’s exported API and ## documentation comments.

POSIX terminal backend.

PosixBackend = ref object of TerminalBackend
capabilities*: TerminalCapabilities
fullscreen*: bool

View source

proc detectTerminalCapabilities(): TerminalCapabilities {.raises: [],
tags: [ReadEnvEffect], forbids: [].}

Returns: TerminalCapabilities.

View source

proc newPosixBackend(capabilities = detectTerminalCapabilities();
fullscreen = true): TerminalBackend {.raises: [], tags: [],
forbids: [].}

Returns: TerminalBackend.

Name Type Default
capabilities inferred detectTerminalCapabilities()
fullscreen inferred true

View source

proc newPlatformBackend(capabilities = detectTerminalCapabilities();
fullscreen = true): TerminalBackend {.raises: [],
tags: [], forbids: [].}

Returns: TerminalBackend.

Name Type Default
capabilities inferred detectTerminalCapabilities()
fullscreen inferred true

View source

proc frameOutput(frame, previous: Canvas; force = false): string {.raises: [],
tags: [], forbids: [].}

Returns: string.

Name Type Default
frame Canvas
previous Canvas
force inferred false

View source

method init(backend: PosixBackend) {.raises: [OSError, Exception], tags: [
ReadEnvEffect, WriteIOEffect, RootEffect], forbids: [].}
Name Type Default
backend PosixBackend

View source

method shutdown(backend: PosixBackend) {.raises: [IOError],
tags: [WriteIOEffect, ReadEnvEffect], forbids: [].}
Name Type Default
backend PosixBackend

View source

method wake(backend: PosixBackend) {.raises: [], tags: [], forbids: [].}
Name Type Default
backend PosixBackend

View source

method size(backend: PosixBackend): Size {.raises: [], tags: [ReadEnvEffect],
forbids: [].}

Returns: Size.

Name Type Default
backend PosixBackend

View source

method readEvent(backend: PosixBackend; timeoutMs: int): UiEvent {.
raises: [IOError, OSError, TermError, Exception, CatchableError],
tags: [WriteIOEffect, ReadEnvEffect, RootEffect, TimeEffect], forbids: [].}

Returns: UiEvent.

Name Type Default
backend PosixBackend
timeoutMs int

View source

method present(backend: PosixBackend; frame: Canvas) {.raises: [IOError],
tags: [WriteIOEffect], forbids: [].}
Name Type Default
backend PosixBackend
frame Canvas

View source

method resetPresentation(backend: PosixBackend) {.raises: [], tags: [],
forbids: [].}
Name Type Default
backend PosixBackend

View source