Types
Button = enum ButtonUnknown, MouseLeft, MouseRight, MouseMiddle, MouseButton4, MouseButton5, DoubleClick, TripleClick, QuadrupleClick, Key0, Key1, Key2, Key3, Key4, Key5, Key6, Key7, Key8, Key9, KeyA, KeyB, KeyC, KeyD, KeyE, KeyF, KeyG, KeyH, KeyI, KeyJ, KeyK, KeyL, KeyM, KeyN, KeyO, KeyP, KeyQ, KeyR, KeyS, KeyT, KeyU, KeyV, KeyW, KeyX, KeyY, KeyZ, KeyBacktick, KeyMinus, KeyEqual, KeyBackspace, KeyTab, KeyLeftBracket, KeyRightBracket, KeyBackslash, KeyCapsLock, KeySemicolon, KeyApostrophe, KeyEnter, KeyLeftShift, KeyComma, KeyPeriod, KeySlash, KeyRightShift, KeyLeftControl, KeyLeftSuper, KeyLeftAlt, KeySpace, KeyRightAlt, KeyRightSuper, KeyMenu, KeyRightControl, KeyDelete, KeyHome, KeyEnd, KeyInsert, KeyPageUp, KeyPageDown, KeyEscape, KeyUp, KeyDown, KeyLeft, KeyRight, KeyPrintScreen, KeyScrollLock, KeyPause, KeyF1, KeyF2, KeyF3, KeyF4, KeyF5, KeyF6, KeyF7, KeyF8, KeyF9, KeyF10, KeyF11, KeyF12, KeyNumLock, Numpad0, Numpad1, Numpad2, Numpad3, Numpad4, Numpad5, Numpad6, Numpad7, Numpad8, Numpad9, NumpadDecimal, NumpadEnter, NumpadAdd, NumpadSubtract, NumpadMultiply, NumpadDivide, NumpadEqual
- Source Edit
ButtonCallback = proc (button: Button)
- Source Edit
ButtonView = distinct set[Button]
- Source Edit
ClipboardContentKind = enum TextContent, ImageContent
- Source Edit
ConfirmKind = enum ConfirmCancel, ConfirmNo, ConfirmYes
- Source Edit
Cursor = object case kind*: CursorKind of CustomCursor: image*: Image hotspot*: IVec2 else: nil
- Source Edit
CursorKind = enum ArrowCursor, PointerCursor, IBeamCursor, CrosshairCursor, ClosedHandCursor, OpenHandCursor, ResizeLeftCursor, ResizeRightCursor, ResizeLeftRightCursor, ResizeUpCursor, ResizeDownCursor, ResizeUpDownCursor, OperationNotAllowedCursor, WaitCursor, CustomCursor
- Source Edit
FileDialogFilter = object name*: string extensions*: string
- One named group of extensions for open/save dialogs. Use extensions like ".vox;.qb" or "vox,qb". Source Edit
FileDropCallback = proc (fileName: string; fileData: string)
- Source Edit
FileDropPathsCallback = proc (paths: seq[string])
- Receives native file paths without reading their contents. Takes priority over onFileDrop; browser drops use onFileDrop instead. Source Edit
HttpErrorCallback = proc (msg: string)
- Source Edit
HttpHeader = object key*, value*: string
- Source Edit
HttpProgressCallback = proc (completed, total: int)
- Source Edit
HttpRequestHandle = distinct int
- Source Edit
HttpResponse = ref object code*: int headers*: seq[HttpHeader] body*: string
- Source Edit
HttpResponseCallback = proc (response: HttpResponse)
- Source Edit
OpenGLVersion = enum OpenGL3Dot0, OpenGL3Dot1, OpenGL3Dot2, OpenGL3Dot3, OpenGL4Dot0, OpenGL4Dot1, OpenGL4Dot2, OpenGL4Dot3, OpenGL4Dot4, OpenGL4Dot5, OpenGL4Dot6
- Source Edit
PointerSource = enum MousePointer, TouchPointer, PenPointer
- Identifies the device driving the shared pointer and mouse buttons. Source Edit
RuneCallback = proc (rune: Rune)
- Source Edit
TextEditAction = enum CopyTextAction, CutTextAction, PasteTextAction, SelectAllTextAction
- Source Edit
TextEditActionCallback = proc (action: TextEditAction)
- Handles an explicitly requested action from a native editing menu. Source Edit
TextInputCallback = proc (text: string)
- Receives committed text as one edit, instead of individual onRune calls. Takes priority over onRune and requires runeInputEnabled. Native commits may contain multiple runes and line breaks. Source Edit
TextInputEdit = object kind*: TextInputEditKind text*: string start*, length*: int
- Requests an edit over a half-open range of rune offsets. Source Edit
TextInputEditCallback = proc (edit: TextInputEdit)
- Receives native selection or replacement requests. Apply the request to the editor, then publish its state again. Requires runeInputEnabled and an active TextInputState. Desktop accessibility services exclude secure fields. Source Edit
TextInputEditKind = enum ReplaceText, SelectText
- Source Edit
TextInputState = object id*: string ## A nonempty field identity activates the editor; an empty one clears it. text*: string selectionStart*, selectionEnd*: int visibleStart*, visibleEnd*: int bounds*: Rect ## Bounds use framebuffer pixels measured from the window's top-left. caret*: Rect ## Caret bounds use framebuffer pixels from the window's top-left. multiline*, password*: bool
- Describes the focused editor for native text services. Selection and visible ranges use half-open rune offsets. Source Edit
TouchCallback = proc (event: TouchEvent)
- Source Edit
TouchContact = object id*: int32 position*: Vec2
- Source Edit
TouchEvent = object contact*: TouchContact phase*: TouchPhase
- Source Edit
TouchPhase = enum TouchBegin, TouchMove, TouchEnd, TouchCancel
- Source Edit
TrayMenuEntry = object case kind*: TrayMenuEntryKind of TrayMenuOption: text*: string onClick*: Callback of TrayMenuSeparator: nil
- A tray menu option or separator. Option labels are literal UTF-8 text. Source Edit
TrayMenuEntryKind = enum TrayMenuOption, TrayMenuSeparator
- Source Edit
WebSocketHandle = distinct int
- Source Edit
WebSocketMessageCallback = proc (msg: string; kind: WebSocketMessageKind)
- Source Edit
WebSocketMessageKind = enum Utf8Message, BinaryMessage
- Source Edit
WindowStyle = enum DecoratedResizable, Decorated, Undecorated, Transparent
- Source Edit
WindyError = object of ValueError
- Source Edit
Consts
defaultHttpDeadline: float32 = -1.0
- Source Edit
Procs
proc `==`(a, b: HttpRequestHandle): bool {....raises: [], tags: [], forbids: [].}
- Source Edit
proc `==`(a, b: WebSocketHandle): bool {....raises: [], tags: [], forbids: [].}
- Source Edit
proc `[]`(buttonView: ButtonView; button: Button): bool {....raises: [], tags: [], forbids: [].}
- Source Edit
proc `[]`(headers: seq[HttpHeader]; key: string): string {....raises: [], tags: [], forbids: [].}
- Get a key out of headers. Not case sensitive. Use a for loop to get duplicate keys. Source Edit
proc `[]=`(headers: var seq[HttpHeader]; key, value: string) {....raises: [], tags: [], forbids: [].}
- Sets a key in the headers. Not case sensitive. Overwrites the existing header for key if it exists else adds a new header. Source Edit
proc len(buttonView: ButtonView): int {....raises: [], tags: [], forbids: [].}
- Source Edit