luigi2

Search:
Group by:

Definitions.

Types

Button {.bycopy.} = object
  e*: Element
  label*: cstring
  invoke*: proc (cp: pointer) {.cdecl.}
Checkbox {.bycopy.} = object
  e*: Element
  check*: uint8
  label*: cstring
  invoke*: proc (cp: pointer) {.cdecl.}
Code {.bycopy.} = object
  e*: Element
  vScroll*: ptr ScrollBar
  lines*: ptr UncheckedArray[CodeLine]
  font*: ptr Font
  lineCount*: cint
  focused*: cint
  moveScrollToFocusNextLayout*: bool
  content*: cstring
  contentBytes*: csize_t
  tabSize*: cint
CodeDecorateLine {.bycopy.} = object
  bounds*: Rectangle
  index*: cint               ## Starting at 1!
  x*: cint
  y*: cint                   ## Position where additional text can be drawn.
  painter*: ptr Painter
CodeLine {.bycopy.} = object
  offset*: cint
  bytes*: cint
ColorPicker {.bycopy.} = object
  e*: Element
  hue*: cfloat
  saturation*: cfloat
  value*: cfloat
  opacity*: cfloat
Element {.bycopy.} = object
  flags*: uint32             ## First 16 bits are element specific.
  id*: uint32
  childCount*: uint32
  unused0*: uint32
  parent*: ptr Element
  children*: ptr UncheckedArray[ptr Element]
  window*: ptr Window
  bounds*: Rectangle
  clip*: Rectangle
  cp*: pointer               ## Context pointer (for user).
  messageClass*: proc (element: ptr Element; message: Message; di: cint; ## data pointer
  ## data integer
                       dp: pointer): cint {.cdecl.}
  messageUser*: proc (element: ptr Element; message: Message; di: cint;
                      dp: pointer): cint {.cdecl.}
  cClassName*: cstring
Font {.bycopy.} = object
  glyphWidth*: cint
  glyphHeight*: cint
  when defined(l2Debug):
      isFreeType*: bool
      font*: FT_Face
      glyphs*: array[128, FT_Bitmap]
      glyphsRendered*: array[128, bool]
      glyphOffsetsX*: array[128, cint]
      glyphOffsetsY*: array[128, cint]

  
Gauge {.bycopy.} = object
  e*: Element
  position*: cdouble
ImageDisplay {.bycopy.} = object
  e*: Element
  bits*: ptr UncheckedArray[uint32]
  width*: cint
  height*: cint
  panX*: cfloat
  panY*: cfloat
  zoom*: cfloat              ## Internals:
  previousWidth*: cint
  previousHeight*: cint
  previousPanPointX*: cint
  previousPanPointY*: cint
KeyTyped {.bycopy.} = object
  text*: cstring
  textBytes*: cint
  code*: cint
Label {.bycopy.} = object
  e*: Element
  label*: cstring
MDIChild {.bycopy.} = object
  e*: Element
  bounds*: Rectangle
  title*: cstring
  dragHitTest*: cint
  dragOffset*: Rectangle
MDIClient {.bycopy.} = object
  e*: Element
  active*: ptr MDIChild
  cascade*: cint
Message = enum
  msgPaint,                 ## dp = pointer to UIPainter
  msgPaintForeground,       ## after children have painted
  msgLayout, msgDestroy, msgDeallocate, msgUpdate, ## di = UI_UPDATE_... constant
  msgAnimate, msgScrolled, msgGetWidth, ## di = height (if known); return width
  msgGetHeight,             ## di = width (if known); return height
  msgGetChildStability,     ## dp = child element; return stable axes, 1 (width) | 2 (height)
  msgInputEventsStart,      ## not sent to disabled elements
  msgLeftDown, msgLeftUp, msgMiddleDown, msgMiddleUp, msgRightDown, msgRightUp, msgKeyTyped, ## dp = pointer to UIKeyTyped; return 1 if handled
  msgKeyReleased,           ## dp = pointer to UIKeyTyped; return 1 if handled
  msgMouseMove, msgMouseDrag, msgMouseWheel, ## di = delta; return 1 if handled
  msgClicked, msgGetCursor, ## return cursor code
  msgPressedDescendent,     ## dp = pointer to child that is/contains pressed element
  msgInputEventsEnd,        ## Specific elements.
  msgValueChanged,          ## sent to notify that the element's value has changed
  msgTableGetItem,          ## dp = pointer to UITableGetItem; return string length
  msgCodeGetMarginColor,    ## di = line index (starts at 1); return color
  msgCodeDecorateLine,      ## dp = pointer to UICodeDecorateLine
  msgTabSelected,           ## sent to the tab that was selected (not the tab pane itself)
  msgWindowDropFiles,       ## di = count, dp = char ** of paths
  msgWindowActivate, msgWindowClose, ## return 1 to prevent default (process exit for UIWindow; close for UIMDIChild)
  msgWindowUpdateStart, msgWindowUpdateBeforeDestroy,
  msgWindowUpdateBeforeLayout, msgWindowUpdateBeforePaint, msgWindowUpdateEnd, ## User-defined messages.
  msgUser
General messages.
Painter {.bycopy.} = object
  clip*: Rectangle
  bits*: ptr UncheckedArray[uint32]
  width*: cint
  height*: cint
  when defined(l2Debug):
      fillCount*: cint

  
Panel {.bycopy.} = object
  e*: Element
  scrollBar*: ptr ScrollBar
  border*: Rectangle
  gap*: cint
Rectangle {.bycopy.} = object
  l*: cint
  r*: cint
  t*: cint
  b*: cint
ScrollBar {.bycopy.} = object
  e*: Element
  maximum*: int64
  page*: int64
  dragOffset*: int64
  position*: cdouble
  lastAnimateTime*: uint64
  inDrag*: bool
  horizontal*: bool
Shortcut {.bycopy.} = object
  code*: cint
  ctrl*: bool
  shift*: bool
  alt*: bool
  invoke*: proc (cp: pointer) {.cdecl.}
  cp*: pointer
Slider {.bycopy.} = object
  e*: Element
  position*: cdouble
  steps*: cint
Spacer {.bycopy.} = object
  e*: Element
  width*: cint
  height*: cint
SplitPane {.bycopy.} = object
  e*: Element
  weight*: cfloat
StringSelection {.bycopy.} = object
  carets*: array[2, cint]
  colorText*: uint32
  colorBackground*: uint32
Switcher {.bycopy.} = object
  e*: Element
  active*: ptr Element
Table {.bycopy.} = object
  e*: Element
  vScroll*: ptr ScrollBar
  itemCount*: cint
  columns*: cstring
  columnWidths*: ptr UncheckedArray[cint]
  columnCount*: cint
  columnHighlight*: cint
TableGetItem {.bycopy.} = object
  buffer*: cstring
  bufferBytes*: csize_t
  index*: cint
  column*: cint
  isSelected*: bool
TabPane {.bycopy.} = object
  e*: Element
  tabs*: cstring
  active*: uint32
Textbox {.bycopy.} = object
  e*: Element
  carets*: array[2, cint]
  scroll*: cint
  rejectNextKey*: bool
Theme {.bycopy.} = object
  panel1*: uint32
  panel2*: uint32
  selected*: uint32
  border*: uint32
  text*: uint32
  textDisabled*: uint32
  textSelected*: uint32
  buttonNormal*: uint32
  buttonHovered*: uint32
  buttonPressed*: uint32
  buttonDisabled*: uint32
  textboxNormal*: uint32
  textboxFocused*: uint32
  codeFocused*: uint32
  codeBackground*: uint32
  codeDefault*: uint32
  codeComment*: uint32
  codeString*: uint32
  codeNumber*: uint32
  codeOperator*: uint32
  codePreprocessor*: uint32
UI {.bycopy.} = object
  windows*: ptr UncheckedArray[Window]
  theme*: Theme
  animating*: ptr UncheckedArray[ptr Element]
  animatingCount*: uint32
  parentStack*: array[16, ptr Element]
  parentStackCount*: cint
  quit*: bool
  dialogResult*: cstring
  dialogOldFocus*: ptr Element
  dialogCanExit*: bool
  activeFont*: ptr Font
  when defined(lDebug):
      inspector*: ptr Window
      inspectorTable*: ptr Table
      inspectorTarget*: ptr Window
      inspectorLog*: ptr Code

  when defined(lFreetype):
      ft*: FT_Library

  
Window {.bycopy.} = object
  e*: Element
  dialog*: ptr Element
  shortcuts*: ptr UncheckedArray[Shortcut]
  shortcutCount*: csize_t
  shortcutAllocated*: csize_t
  scale*: cfloat
  bits*: ptr UncheckedArray[uint32]
  width*: cint
  height*: cint
  next*: ptr Window
  hovered*: ptr Element
  pressed*: ptr Element
  focused*: ptr Element
  dialogOldFocus*: ptr Element
  pressedButton*: cint
  cursorX*: cint
  cursorY*: cint
  cursorStyle*: cint         ## Set when a textbox is modified.
                             ## Useful for tracking whether changes to the loaded document have been saved.
  textboxModifiedFlag*: bool
  ctrl*: bool
  shift*: bool
  alt*: bool
  updateRegion*: Rectangle
  when defined(l2Debug):
      lastFullFillCount*: cfloat

  when defined(linux):
      ctrlCode*: cuint
      shiftCode*: cuint
      altCode*: cuint

  when defined(windows):
      hwnd*: pointer
      trackingLeave*: bool

  
WrapPanel {.bycopy.} = object
  e*: Element

Vars

ui {.importc: "ui".}: UI

Consts

BUTTON_CHECKED = 32768
castInt = -1
DRAW_CONTROL_TYPE_MASK = 0x000000FF
ELEMENT_BORDER = 8388608
ELEMENT_DESTROY = 1073741824
ELEMENT_DISABLED = 4194304
Don't receive input events.
ELEMENT_FILL = 196608
ELEMENT_H_FILL = 131072
ELEMENT_HIDE = 134217728
ELEMENT_NON_CLIENT = 2097152
Don't destroy in UIElementDestroyDescendents, like scroll bars.
ELEMENT_RELAYOUT = 268435456
ELEMENT_TAB_STOP = 1048576
ELEMENT_V_FILL = 65536
ELEMENT_WINDOW = 262144
KEYCODE_0 = 48
KEYCODE_A = 97
KEYCODE_DELETE = 65535
KEYCODE_DOWN = 65364
KEYCODE_END = 65367
KEYCODE_ENTER = 65293
KEYCODE_ESCAPE = 65307
KEYCODE_F1 = 65470
KEYCODE_HOME = 65360
KEYCODE_INSERT = 65379
KEYCODE_LEFT = 65361
KEYCODE_RIGHT = 65363
KEYCODE_TAB = 65289
KEYCODE_UP = 65362
PANEL_EXPAND = 512
PANEL_SCROLL = 256

Procs

proc animateClock(): uint64 {.cdecl, importc: "UIAnimateClock", ...raises: [],
                              tags: [], forbids: [].}
In ms.
proc buttonCreate(parent: ptr Element; flags: uint32 = 0; label: cstring;
                  labelBytes: pointer = castInt): ptr Button {.cdecl,
    importc: "UIButtonCreate", ...raises: [], tags: [], forbids: [].}
proc buttonSetLabel(button: ptr Button; string: cstring;
                    stringBytes: pointer = castInt) {.cdecl,
    importc: "UIButtonSetLabel", ...raises: [], tags: [], forbids: [].}
proc checkboxCreate(parent: ptr Element; flags: uint32 = 0; label: cstring;
                    labelBytes: pointer = castInt): ptr Checkbox {.cdecl,
    importc: "UICheckboxCreate", ...raises: [], tags: [], forbids: [].}
proc codeCreate(parent: ptr Element; flags: uint32 = 0): ptr Code {.cdecl,
    importc: "UICodeCreate", ...raises: [], tags: [], forbids: [].}
proc codeFocusLine(code: ptr Code; index: cint) {.cdecl,
    importc: "UICodeFocusLine", ...raises: [], tags: [], forbids: [].}
Line numbers are 1-indexed!!
proc codeHitTest(code: ptr Code; x: cint; y: cint): cint {.cdecl,
    importc: "UICodeHitTest", ...raises: [], tags: [], forbids: [].}
Returns line number; negates if in margin. Returns 0 if not on a line.
proc codeInsertContent(code: ptr Code; content: cstring;
                       byteCount: pointer = castInt; replace: bool) {.cdecl,
    importc: "UICodeInsertContent", ...raises: [], tags: [], forbids: [].}
proc colorPickerCreate(parent: ptr Element; flags: uint32 = 0): ptr ColorPicker {.
    cdecl, importc: "UIColorPickerCreate", ...raises: [], tags: [], forbids: [].}
proc colorToHSV(rgb: uint32; hue: ptr cfloat; saturation: ptr cfloat;
                value: ptr cfloat): bool {.cdecl, importc: "UIColorToHSV",
    discardable, ...raises: [], tags: [], forbids: [].}
proc colorToRGB(hue: cfloat; saturation: cfloat; value: cfloat; rgb: ptr uint32) {.
    cdecl, importc: "UIColorToRGB", ...raises: [], tags: [], forbids: [].}
proc dialogShow(window: ptr Window; flags: uint32 = 0; format: cstring): cstring {.
    varargs, cdecl, importc: "UIDialogShow", ...raises: [], tags: [], forbids: [].}
proc drawBlock(painter: ptr Painter; rectangle: Rectangle; color: uint32) {.
    cdecl, importc: "UIDrawBlock", ...raises: [], tags: [], forbids: [].}
proc drawBorder(painter: ptr Painter; r: Rectangle; borderColor: uint32;
                borderSize: Rectangle) {.cdecl, importc: "UIDrawBorder",
    ...raises: [], tags: [], forbids: [].}
proc drawCircle(painter: ptr Painter; centerX: cint; centerY: cint;
                radius: cint; fillColor: uint32; outlineColor: uint32;
                hollow: bool) {.cdecl, importc: "UIDrawCircle", ...raises: [],
                                tags: [], forbids: [].}
proc drawControl(painter: ptr Painter; bounds: Rectangle; mode: uint32; ## UI_DRAW_CONTROL_*
                 label: cstring; labelBytes: pointer = castInt;
                 position: cdouble; scale: cfloat) {.cdecl,
    importc: "UIDrawControl", ...raises: [], tags: [], forbids: [].}
proc drawControlDefault(painter: ptr Painter; bounds: Rectangle; mode: uint32;
                        label: cstring; labelBytes: pointer = castInt;
                        position: cdouble; scale: cfloat) {.cdecl,
    importc: "UIDrawControlDefault", ...raises: [], tags: [], forbids: [].}
proc drawGlyph(painter: ptr Painter; x: cint; y: cint; c: cint; color: uint32) {.
    cdecl, importc: "UIDrawGlyph", ...raises: [], tags: [], forbids: [].}
proc drawInvert(painter: ptr Painter; rectangle: Rectangle) {.cdecl,
    importc: "UIDrawInvert", ...raises: [], tags: [], forbids: [].}
proc drawLine(painter: ptr Painter; x0: cint; y0: cint; x1: cint; y1: cint;
              color: uint32): bool {.cdecl, importc: "UIDrawLine", ...raises: [],
                                     tags: [], forbids: [].}
Returns false if the line was not visible.
proc drawRectangle(painter: ptr Painter; r: Rectangle; mainColor: uint32;
                   borderColor: uint32; borderSize: Rectangle) {.cdecl,
    importc: "UIDrawRectangle", ...raises: [], tags: [], forbids: [].}
proc drawString(painter: ptr Painter; r: Rectangle; string: cstring;
                bytes: pointer = castInt; color: uint32; align: cint;
                selection: ptr StringSelection) {.cdecl,
    importc: "UIDrawString", ...raises: [], tags: [], forbids: [].}
proc drawStringHighlighted(painter: ptr Painter; r: Rectangle; string: cstring;
                           bytes: pointer = castInt; tabSize: cint): cint {.
    cdecl, importc: "UIDrawStringHighlighted", ...raises: [], tags: [], forbids: [].}
Returns final x position.
proc drawTriangle(painter: ptr Painter; x0: cint; y0: cint; x1: cint; y1: cint;
                  x2: cint; y2: cint; color: uint32) {.cdecl,
    importc: "UIDrawTriangle", ...raises: [], tags: [], forbids: [].}
proc drawTriangleOutline(painter: ptr Painter; x0: cint; y0: cint; x1: cint;
                         y1: cint; x2: cint; y2: cint; color: uint32) {.cdecl,
    importc: "UIDrawTriangleOutline", ...raises: [], tags: [], forbids: [].}
proc elementAnimate(element: ptr Element; stop: bool): bool {.cdecl,
    importc: "UIElementAnimate", ...raises: [], tags: [], forbids: [].}
proc elementChangeParent(element: ptr Element; newParent: ptr Element;
                         insertBefore: ptr Element): ptr Element {.cdecl,
    importc: "UIElementChangeParent", ...raises: [], tags: [], forbids: [].}
Set insertBefore to null to insert at the end. Returns the element it was before in its previous parent, or NULL.
proc elementCreate(bytes: csize_t; parent: ptr Element; flags: uint32 = 0;
    messageClass: proc (a1: ptr Element; a2: Message; a3: cint; a4: pointer): cint {.
    cdecl.}; cClassName: cstring): ptr Element {.cdecl,
    importc: "UIElementCreate", ...raises: [], tags: [], forbids: [].}
proc elementDestroy(element: ptr Element) {.cdecl, importc: "UIElementDestroy",
    ...raises: [], tags: [], forbids: [].}
proc elementDestroyDescendents(element: ptr Element) {.cdecl,
    importc: "UIElementDestroyDescendents", ...raises: [], tags: [], forbids: [].}
proc elementFindByPoint(element: ptr Element; x: cint; y: cint): ptr Element {.
    cdecl, importc: "UIElementFindByPoint", ...raises: [], tags: [], forbids: [].}
proc elementFocus(element: ptr Element) {.cdecl, importc: "UIElementFocus",
    ...raises: [], tags: [], forbids: [].}
proc elementMeasurementsChanged(element: ptr Element; which: cint) {.cdecl,
    importc: "UIElementMeasurementsChanged", ...raises: [], tags: [], forbids: [].}
proc elementMessage(element: ptr Element; message: Message; di: cint;
                    dp: pointer): cint {.cdecl, importc: "UIElementMessage",
    ...raises: [], tags: [], forbids: [].}
proc elementMove(element: ptr Element; bounds: Rectangle; alwaysLayout: bool) {.
    cdecl, importc: "UIElementMove", ...raises: [], tags: [], forbids: [].}
proc elementRefresh(element: ptr Element) {.cdecl, importc: "UIElementRefresh",
    ...raises: [], tags: [], forbids: [].}
proc elementRelayout(element: ptr Element) {.cdecl,
    importc: "UIElementRelayout", ...raises: [], tags: [], forbids: [].}
proc elementRepaint(element: ptr Element; region: ptr Rectangle = nil) {.cdecl,
    importc: "UIElementRepaint", ...raises: [], tags: [], forbids: [].}
proc elementScreenBounds(element: ptr Element): Rectangle {.cdecl,
    importc: "UIElementScreenBounds", ...raises: [], tags: [], forbids: [].}
Returns bounds of element in same coordinate system as used by UIWindowCreate.
proc fontActivate(font: ptr Font): ptr Font {.cdecl, importc: "UIFontActivate",
    discardable, ...raises: [], tags: [], forbids: [].}
Returns the previously active font.
proc fontCreate(cPath: cstring; size: uint32): ptr Font {.cdecl,
    importc: "UIFontCreate", ...raises: [], tags: [], forbids: [].}
proc gaugeCreate(parent: ptr Element; flags: uint32 = 0): ptr Gauge {.cdecl,
    importc: "UIGaugeCreate", ...raises: [], tags: [], forbids: [].}
proc gaugeSetPosition(gauge: ptr Gauge; value: cdouble) {.cdecl,
    importc: "UIGaugeSetPosition", ...raises: [], tags: [], forbids: [].}
proc imageDisplayCreate(parent: ptr Element; flags: uint32 = 0;
                        bits: ptr uint32; width: csize_t; height: csize_t;
                        stride: csize_t): ptr ImageDisplay {.cdecl,
    importc: "UIImageDisplayCreate", ...raises: [], tags: [], forbids: [].}
proc imageDisplaySetContent(display: ptr ImageDisplay; bits: ptr uint32;
                            width: csize_t; height: csize_t; stride: csize_t) {.
    cdecl, importc: "UIImageDisplaySetContent", ...raises: [], tags: [],
    forbids: [].}
proc initialise() {.cdecl, importc: "UIInitialise", ...raises: [], tags: [],
                    forbids: [].}
proc labelCreate(parent: ptr Element; flags: uint32 = 0; label: cstring;
                 labelBytes: pointer = castInt): ptr Label {.cdecl,
    importc: "UILabelCreate", ...raises: [], tags: [], forbids: [].}
proc labelSetContent(code: ptr Label; content: cstring;
                     byteCount: pointer = castInt) {.cdecl,
    importc: "UILabelSetContent", ...raises: [], tags: [], forbids: [].}
proc mDIChildCreate(parent: ptr Element; flags: uint32 = 0;
                    initialBounds: Rectangle; title: cstring;
                    titleBytes: pointer = castInt): ptr MDIChild {.cdecl,
    importc: "UIMDIChildCreate", ...raises: [], tags: [], forbids: [].}
proc mDIClientCreate(parent: ptr Element; flags: uint32 = 0): ptr MDIClient {.
    cdecl, importc: "UIMDIClientCreate", ...raises: [], tags: [], forbids: [].}
proc measureStringHeight(): cint {.cdecl, importc: "UIMeasureStringHeight",
                                   ...raises: [], tags: [], forbids: [].}
proc measureStringWidth(string: cstring; bytes: pointer = castInt): cint {.
    cdecl, importc: "UIMeasureStringWidth", ...raises: [], tags: [], forbids: [].}
proc messageLoop(): cint {.cdecl, importc: "UIMessageLoop", ...raises: [],
                           tags: [], forbids: [].}
proc panelCreate(parent: ptr Element; flags: uint32 = 0): ptr Panel {.cdecl,
    importc: "UIPanelCreate", ...raises: [], tags: [], forbids: [].}
proc parentPop(): ptr Element {.cdecl, importc: "UIParentPop", ...raises: [],
                                tags: [], forbids: [].}
proc parentPush(element: ptr Element): ptr Element {.cdecl,
    importc: "UIParentPush", ...raises: [], tags: [], forbids: [].}
proc rectangleAdd(a: Rectangle; b: Rectangle): Rectangle {.cdecl,
    importc: "UIRectangleAdd", ...raises: [], tags: [], forbids: [].}
proc rectangleBounding(a: Rectangle; b: Rectangle): Rectangle {.cdecl,
    importc: "UIRectangleBounding", ...raises: [], tags: [], forbids: [].}
proc rectangleCenter(parent: Rectangle; child: Rectangle): Rectangle {.cdecl,
    importc: "UIRectangleCenter", ...raises: [], tags: [], forbids: [].}
proc rectangleContains(a: Rectangle; x: cint; y: cint): bool {.cdecl,
    importc: "UIRectangleContains", ...raises: [], tags: [], forbids: [].}
proc rectangleEquals(a: Rectangle; b: Rectangle): bool {.cdecl,
    importc: "UIRectangleEquals", ...raises: [], tags: [], forbids: [].}
proc rectangleFit(parent: Rectangle; child: Rectangle; allowScalingUp: bool): Rectangle {.
    cdecl, importc: "UIRectangleFit", ...raises: [], tags: [], forbids: [].}
proc rectangleIntersection(a: Rectangle; b: Rectangle): Rectangle {.cdecl,
    importc: "UIRectangleIntersection", ...raises: [], tags: [], forbids: [].}
proc rectangleTranslate(a: Rectangle; b: Rectangle): Rectangle {.cdecl,
    importc: "UIRectangleTranslate", ...raises: [], tags: [], forbids: [].}
proc scrollBarCreate(parent: ptr Element; flags: uint32 = 0): ptr ScrollBar {.
    cdecl, importc: "UIScrollBarCreate", ...raises: [], tags: [], forbids: [].}
proc sliderCreate(parent: ptr Element; flags: uint32 = 0): ptr Slider {.cdecl,
    importc: "UISliderCreate", ...raises: [], tags: [], forbids: [].}
proc sliderSetPosition(slider: ptr Slider; value: cdouble;
                       sendChangedMessage: bool) {.cdecl,
    importc: "UISliderSetPosition", ...raises: [], tags: [], forbids: [].}
proc spacerCreate(parent: ptr Element; flags: uint32 = 0; width: cint;
                  height: cint): ptr Spacer {.cdecl, importc: "UISpacerCreate",
    ...raises: [], tags: [], forbids: [].}
proc splitPaneCreate(parent: ptr Element; flags: uint32 = 0; weight: cfloat): ptr SplitPane {.
    cdecl, importc: "UISplitPaneCreate", ...raises: [], tags: [], forbids: [].}
proc stringCopy(in: cstring; inBytes: pointer = castInt): cstring {.cdecl,
    importc: "UIStringCopy", ...raises: [], tags: [], forbids: [].}
proc switcherCreate(parent: ptr Element; flags: uint32 = 0): ptr Switcher {.
    cdecl, importc: "UISwitcherCreate", ...raises: [], tags: [], forbids: [].}
proc switcherSwitchTo(switcher: ptr Switcher; child: ptr Element) {.cdecl,
    importc: "UISwitcherSwitchTo", ...raises: [], tags: [], forbids: [].}
proc tableCreate(parent: ptr Element; flags: uint32 = 0; columns: cstring): ptr Table {.
    cdecl, importc: "UITableCreate", ...raises: [], tags: [], forbids: [].}
separate with t, terminate with 0
proc tableEnsureVisible(table: ptr Table; index: cint): bool {.cdecl,
    importc: "UITableEnsureVisible", ...raises: [], tags: [], forbids: [].}
Returns false if the item was already visible.
proc tableHeaderHitTest(table: ptr Table; x: cint; y: cint): cint {.cdecl,
    importc: "UITableHeaderHitTest", ...raises: [], tags: [], forbids: [].}
Returns column index or -1.
proc tableHitTest(table: ptr Table; x: cint; y: cint): cint {.cdecl,
    importc: "UITableHitTest", ...raises: [], tags: [], forbids: [].}
Returns item index. Returns -1 if not on an item.
proc tableResizeColumns(table: ptr Table) {.cdecl,
    importc: "UITableResizeColumns", ...raises: [], tags: [], forbids: [].}
proc tabPaneCreate(parent: ptr Element; flags: uint32 = 0; tabs: cstring): ptr TabPane {.
    cdecl, importc: "UITabPaneCreate", ...raises: [], tags: [], forbids: [].}
separate with t
proc textboxClear(textbox: ptr Textbox; sendChangedMessage: bool) {.cdecl,
    importc: "UITextboxClear", ...raises: [], tags: [], forbids: [].}
proc textboxCreate(parent: ptr Element; flags: uint32 = 0): ptr Textbox {.cdecl,
    importc: "UITextboxCreate", ...raises: [], tags: [], forbids: [].}
proc textboxMoveCaret(textbox: ptr Textbox; backward: bool; word: bool) {.cdecl,
    importc: "UITextboxMoveCaret", ...raises: [], tags: [], forbids: [].}
proc textboxReplace(textbox: ptr Textbox; text: cstring;
                    bytes: pointer = castInt; sendChangedMessage: bool) {.cdecl,
    importc: "UITextboxReplace", ...raises: [], tags: [], forbids: [].}
proc textboxToCString(textbox: ptr Textbox): cstring {.cdecl,
    importc: "UITextboxToCString", ...raises: [], tags: [], forbids: [].}
proc windowCreate(owner: ptr Window; flags: uint32 = 0; cTitle: cstring;
                  width: cint = 0; height: cint = 0): ptr Window {.cdecl,
    importc: "UIWindowCreate", ...raises: [], tags: [], forbids: [].}
proc windowPack(window: ptr Window; width: cint) {.cdecl,
    importc: "UIWindowPack", ...raises: [], tags: [], forbids: [].}
Change the size of the window to best match its contents.
proc windowPostMessage(window: ptr Window; message: Message; dp: pointer) {.
    cdecl, importc: "UIWindowPostMessage", ...raises: [], tags: [], forbids: [].}
Thread-safe.
proc windowRegisterShortcut(window: ptr Window; shortcut: Shortcut) {.cdecl,
    importc: "UIWindowRegisterShortcut", ...raises: [], tags: [], forbids: [].}
proc wrapPanelCreate(parent: ptr Element; flags: uint32 = 0): ptr WrapPanel {.
    cdecl, importc: "UIWrapPanelCreate", ...raises: [], tags: [], forbids: [].}

Templates

template KEYCODE_DIGIT(x: untyped): cint
template KEYCODE_FKEY(x: untyped): cint
template KEYCODE_LETTER(x: untyped): cint
template RECT_1(x: cint): Rectangle
template RECT_1I(x): Rectangle
template RECT_2(x, y: cint): Rectangle
template RECT_2I(x, y: cint): Rectangle
template RECT_2S(x, y: cint): Rectangle
template RECT_4(x, y, w, h: cint): Rectangle
template RECT_4(x, y, z, w: cint): Rectangle
template RECT_ALL(r: Rectangle): tuple[l, r, t, b: int]
template RECT_BOTTOM_LEFT(r: Rectangle): tuple[l, b: int]
template RECT_BOTTOM_RIGHT(r: Rectangle): tuple[r, b: int]
template RECT_HEIGHT(r: Rectangle): cint
template RECT_SIZE(r: Rectangle): tuple[w, h: int]
template RECT_TOP_LEFT(r: Rectangle): tuple[l, t: int]
template RECT_TOTAL_H(r: Rectangle): cint
template RECT_TOTAL_V(r: Rectangle): cint
template RECT_VALID(r: Rectangle): bool
template RECT_WIDTH(r: Rectangle): cint