DOS Visual eXecutive -- Complete public API documentation generated from source headers
Central type definitions shared across all five layers of the DVX GUI stack. Every header includes this file. Contains no function definitions -- only structs, enums, typedefs, and compile-time constants.
Callbacks:
| Macro | Description |
|---|---|
| BEVEL_RAISED(cs, bw) | Raised bevel style from a ColorSchemeT pointer and border width |
| BEVEL_SUNKEN(cs, face, bw) | Sunken bevel style with explicit face color |
| BEVEL_TROUGH(cs) | 1px sunken trough (for scrollbar tracks) |
| BEVEL_SB_BUTTON(cs) | 1px raised scrollbar button |
| Define | Value | Description |
|---|---|---|
| CHROME_BORDER_WIDTH | 4 | Outer frame border width |
| CHROME_TITLE_HEIGHT | 20 | Title bar height |
| CHROME_TITLE_PAD | 4 | Title text padding |
| CHROME_INNER_BORDER | 2 | Inner chrome border |
| CHROME_MENU_HEIGHT | 20 | Menu bar height |
| CHROME_TOTAL_TOP | 26 | Total inset from top of frame to content |
| CHROME_TOTAL_SIDE | 6 | Total inset from side of frame to content |
| CHROME_TOTAL_BOTTOM | 6 | Total inset from bottom of frame to content |
| CHROME_CLOSE_BTN_SIZE | 16 | Close button gadget size |
| Define | Value | Description |
|---|---|---|
| HIT_CONTENT | 0 | Content area |
| HIT_TITLE | 1 | Title bar |
| HIT_CLOSE | 2 | Close gadget |
| HIT_RESIZE | 3 | Resize border |
| HIT_MENU | 4 | Menu bar |
| HIT_VSCROLL | 5 | Vertical scrollbar |
| HIT_HSCROLL | 6 | Horizontal scrollbar |
| HIT_MINIMIZE | 7 | Minimize gadget |
| HIT_MAXIMIZE | 8 | Maximize gadget |
| HIT_NONE | -1 | No window hit (desktop) |
| Define | Value | Description |
|---|---|---|
| MOUSE_LEFT | 1 | Left mouse button |
| MOUSE_RIGHT | 2 | Right mouse button |
| MOUSE_MIDDLE | 4 | Middle mouse button |
| Define | Value | Description |
|---|---|---|
| ACCEL_SHIFT | 0x03 | Shift key (matches BIOS shift state bits) |
| ACCEL_CTRL | 0x04 | Ctrl key |
| ACCEL_ALT | 0x08 | Alt key |
| Define | Description |
|---|---|
| KEY_F1 .. KEY_F12 | Function keys (scancode | 0x100) |
| KEY_INSERT | Insert key |
| KEY_DELETE | Delete key |
| KEY_HOME | Home key |
| KEY_END | End key |
| KEY_PGUP | Page Up key |
| KEY_PGDN | Page Down key |
| Define | Value | Description |
|---|---|---|
| RESIZE_NONE | 0 | No resize edge |
| RESIZE_LEFT | 1 | Left edge |
| RESIZE_RIGHT | 2 | Right edge |
| RESIZE_TOP | 4 | Top edge |
| RESIZE_BOTTOM | 8 | Bottom edge (combinable via OR for corners) |
| Macro | Description |
|---|---|
| DVX_MIN(a, b) | Return the smaller of two values |
| DVX_MAX(a, b) | Return the larger of two values |
Embedded 16x16 mouse cursor bitmaps compiled as static const data. No external cursor files. Uses the standard AND/XOR mask encoding from the IBM VGA hardware cursor spec.
| Define | Value | Description |
|---|---|---|
| CURSOR_ARROW | 0 | Standard arrow (hot spot at tip) |
| CURSOR_RESIZE_H | 1 | Horizontal resize (left/right arrows) |
| CURSOR_RESIZE_V | 2 | Vertical resize (up/down arrows) |
| CURSOR_RESIZE_DIAG_NWSE | 3 | NW-SE diagonal resize |
| CURSOR_RESIZE_DIAG_NESW | 4 | NE-SW diagonal resize |
| CURSOR_BUSY | 5 | Hourglass (wait) |
| CURSOR_CROSSHAIR | 6 | Crosshair for placement |
| CURSOR_COUNT | 7 | Total number of cursor shapes |
The lowest layer. Responsible for VESA VBE mode negotiation, LFB mapping via DPMI, system RAM backbuffer allocation, pixel format discovery, and color packing. LFB-only design: bank switching is deliberately unsupported.
Probe VBE for a mode matching the requested resolution and depth, enable it, map the LFB into DPMI linear address space, and allocate a system RAM backbuffer. preferredBpp is a hint; the closest available depth is used if an exact match is not found.
Returns: 0 on success, negative on failure
Restore VGA text mode (mode 3), unmap the LFB, and free the backbuffer. Safe to call even if videoInit() failed.
Pack an RGB triplet into the display's native pixel format. For direct-color modes (15/16/32 bpp), returns a packed pixel value using shift/mask fields. For 8-bit mode, returns the nearest palette index via Euclidean distance in RGB space.
Returns: Native pixel value suitable for direct framebuffer write
Set the clip rectangle on the display. All subsequent draw operations clip to this rectangle. The caller must save and restore the clip rect around scoped operations.
Reset the clip rectangle to the full display dimensions.
All 2D drawing operations: rectangle fills, bitmap blits, text rendering, bevels, lines, and cursor rendering. Every function draws into the display's backbuffer and clips to the current clip rectangle. This layer is stateless beyond the clip rect on DisplayT.
Populate a BlitOpsT with the correct span functions for the display's pixel depth. Must be called once after videoInit().
Fill a rectangle with a solid color. Clips to the display clip rect. Workhorse for backgrounds, window fills, and clear operations.
Copy a rectangle from an arbitrary source buffer into the backbuffer. Used to blit per-window content buffers during compositing.
Copy a rectangle with grayscale conversion. Each pixel's RGB is converted to luminance (0.299R + 0.587G + 0.114B) for a disabled/grayed appearance.
Draw a beveled frame. Top/left edges in highlight color, bottom/right in shadow. Interior filled with face color if non-zero.
Draw a single character glyph. When opaque is true, the background fills the entire cell; when false, only foreground pixels are drawn (transparent background).
Returns: Advance width (always charWidth)
Draw a null-terminated string. Calls drawChar per character.
Optimized batch text rendering for a known character count. Computes clip bounds once, fills background in a single rectFill, then overlays glyph foreground pixels. Significantly faster than per-character drawChar for long runs (terminal rows, list items).
Return the pixel width of a null-terminated string (strlen(text) * charWidth).
Returns: Width in pixels
Scan text for an & prefix and return the following character as a lowercase accelerator key. "&File" returns 'f', "E&xit" returns 'x'.
Returns: Lowercase accelerator character, or 0 if none
Draw text with & accelerator markers. The character after & is drawn underlined to indicate the keyboard shortcut. && produces a literal &. Used for menu items and button labels.
Measure text width excluding & markers (so "&File" measures as 4 chars).
Returns: Width in pixels
Draw a 1-bit AND/XOR masked bitmap. Used for software-rendered mouse cursors.
Render an entire row of terminal character cells (ch/attr byte pairs) in a single pass. Colors looked up from a 16-color palette. Attribute bit 7 controls blink.
Draw a 1px dotted rectangle (alternating pixels). Used for keyboard focus indicators, matching the Windows 3.x focus rectangle convention.
Draw a horizontal line (1px tall).
Draw a vertical line (1px wide).
Tracks changed screen regions and ensures only dirty regions are redrawn and flushed to video memory. The compositing pipeline: mark dirty, merge overlapping rects, redraw desktop + windows (back-to-front, painter's algorithm), flush to LFB.
Zero the dirty rect count. Called at the start of each frame.
Enqueue a dirty rectangle. Grows dynamically; triggers merge at a soft capacity limit.
Consolidate the dirty list by merging overlapping and adjacent rects. Uses iterative pairwise merge: if combining two rects does not increase total area beyond a threshold, they are merged. Reduces compositor passes and LFB flush operations.
Reset the dirty list to empty (sets count to 0).
Copy a rectangle from the system RAM backbuffer to the LFB (video memory). This is the only place the real framebuffer is written. Uses platform-specific fast copy (rep movsd on DOS) for each scanline.
Compute the intersection of two rectangles.
Returns: true if the rectangles overlap, false if disjoint
Test whether a rectangle has zero or negative area.
Returns: true if w <= 0 or h <= 0
Manages the window lifecycle, Z-order stack, chrome drawing, hit testing, and interactive operations (drag, resize, scroll). The WM owns window geometry and chrome; content is owned by the application via callbacks or the widget system.
Zero the window stack. Must be called before any other WM function.
Allocate a new window, initialize its geometry and content buffer, and push it to the top of the Z-order stack. Returns with all callbacks NULL; the caller should set onPaint/onKey/etc. before the next event loop iteration.
Returns: Pointer to new WindowT, or NULL on failure
Free the window's content buffer and all attached resources (menu bar, scrollbars, widget tree), remove it from the stack, and dirty the vacated region.
Move window at stack index idx to the top of the Z-order. Dirties both old and new top positions so overlapping windows get repainted.
Transfer keyboard focus to the window at stack index idx. Unfocuses the previously focused window and dirties both title bars.
Recompute contentX/Y/W/H from the window's outer frame dimensions, accounting for chrome borders, title bar, menu bar, and scrollbars. Must be called after any change to frame size or chrome configuration.
Reallocate the per-window content backbuffer to match current contentW/H. Old buffer contents are lost; caller should trigger a full repaint via onPaint afterward.
Returns: 0 on success, -1 on allocation failure
Get the minimum window size. Accounts for chrome, gadgets, and menu bar.
Allocate and attach a menu bar to a window. Adjusts content area to make room (CHROME_MENU_HEIGHT pixels). One menu bar per window.
Returns: Pointer to the new MenuBarT
Free the menu bar and reclaim the content area.
Append a dropdown menu to the menu bar. The label supports & accelerator markers (e.g. "&File").
Returns: Pointer to the new MenuT to populate with items
Append a clickable item to a menu. The id is passed to the window's onMenu callback when selected.
Add a checkbox-style menu item. Check state toggles on click; rendered with a checkmark glyph.
Add a radio-style menu item. Radio groups are defined implicitly by consecutive radio items; selecting one unchecks the others in the group.
Insert a horizontal separator line. Separators are not interactive.
Query the checked state of a menu item by command ID. Searches all menus in the bar.
Returns: true if checked
Set the checked state of a menu item by command ID. For radio items, setting checked=true also unchecks other radio items in the same group.
Enable or disable a menu item by command ID.
Create a cascading submenu attached to a parent menu. The child MenuT is heap-allocated and freed when the parent window is destroyed.
Returns: Pointer to the child MenuT, or NULL on allocation failure
Allocate a heap-resident MenuT for use as a context menu (right-click). Unlike menu bar menus, context menus are standalone allocations. Free with wmFreeMenu().
Returns: Pointer to the new MenuT
Free a standalone menu allocated with wmCreateMenu(). Also frees any heap-allocated submenu children recursively.
Attach a vertical scrollbar to the right edge of the window's content area. Shrinks contentW by SCROLLBAR_WIDTH pixels.
Returns: Pointer to the new ScrollbarT
Attach a horizontal scrollbar to the bottom edge. Shrinks contentH by SCROLLBAR_WIDTH pixels.
Returns: Pointer to the new ScrollbarT
Draw the window frame: outer bevel, title bar with text, close/minimize/maximize gadgets, and menu bar if present. Drawing is clipped to the intersection with clipTo.
Blit the window's content backbuffer into the display backbuffer, clipped to the dirty rect. Pure copy operation (no drawing).
Draw scrollbars (track, arrows, proportional thumb) for a window. Drawn after content so scrollbars overlay the content area edge.
Draw icons for all minimized windows along the bottom of the screen. Each icon shows a scaled preview of the window's content with a beveled border.
Determine which window and chrome region is under the given screen coordinates. Iterates front-to-back (highest Z first) so the topmost window wins.
Returns: Stack index of hit window, or -1 for desktop
Determine which edge(s) of a window's border zone are targeted for resize.
Returns: Bitmask of RESIZE_LEFT / RESIZE_RIGHT / RESIZE_TOP / RESIZE_BOTTOM
Hit-test minimized icons at the bottom of the screen.
Returns: Stack index of the minimized window, or -1
Begin a window drag operation. Records the mouse offset from the window origin.
Update window position during an active drag. Dirties both old and new positions.
End the current drag operation. Clears dragWindow state.
Begin a window resize operation. Records which edge(s) are being dragged.
Update window dimensions during an active resize. Enforces MIN_WINDOW_W/H and maxW/maxH constraints. Reallocates content buffer and calls onResize if size changed. mouseX/mouseY are in/out: clamped on return for cursor warping.
End the current resize operation. Clears resizeWindow state.
Handle an initial click on a scrollbar. Determines what was hit (arrows, trough, or thumb) and either adjusts the value immediately or begins a thumb drag.
Update the scroll value during an active thumb drag. Maps mouse position along the track to a proportional scroll value.
End an active scrollbar thumb drag.
Maximize a window. Saves current geometry, then expands to screen or maxW/maxH bounds.
Minimize a window. Hides the window and shows an icon at the bottom of the screen.
Restore a maximized window to its pre-maximize geometry.
Restore a minimized window (show it again and remove the icon).
Compute the screen position of a minimized icon by ordinal index. Icons wrap into rows from bottom to top when the screen fills up.
Compute the screen rect covering all minimized icon rows. Used to dirty the icon area when windows are minimized or restored.
Set the window title and dirty the title bar for repaint.
Load an icon image for a window from a file. Converts to display pixel format.
Returns: 0 on success, -1 on failure
The topmost layer and the public-facing API. Aggregates all lower layers into a single AppContextT. Applications interact exclusively through dvx*() functions and window callbacks. The event loop follows a cooperative model: poll, dispatch, composite, yield.
Initialize the entire GUI stack: video mode, input devices, font, color scheme, cursor shapes, and internal state. Single entry point for starting a DVX application.
Returns: 0 on success, negative on failure
Tear down the GUI stack in reverse order: destroy all windows, restore text mode, release input devices. Safe to call after a failed dvxInit().
Switch to a new video mode live. Reallocates the backbuffer, all window content buffers, repacks colors, rescales wallpaper, and repositions off-screen windows.
Returns: 0 on success, -1 on failure (old mode restored)
Enter the main event loop. Polls input, dispatches events, composites dirty regions, and yields on each iteration. Returns when ctx->running becomes false.
Process exactly one frame of the event loop. For applications that integrate the GUI into their own main loop (e.g. polling serial ports between frames).
Returns: false when the GUI wants to exit
Request exit from the main event loop (sets ctx->running = false).
Create a window at an explicit screen position. The window is raised to the top, focused, and its entire region is dirtied.
Returns: Pointer to new WindowT
Convenience wrapper that centers the window on screen.
Returns: Pointer to new WindowT
Destroy a window, free all its resources, and dirty its former region.
Raise a window to the top of the Z-order and give it focus.
Resize a window to exactly fit its widget tree's computed minimum size (plus chrome). Used for dialog boxes and fixed-layout windows.
Resize window width only to fit widget tree's minimum width (plus chrome).
Resize window height only to fit widget tree's minimum height (plus chrome).
Programmatically resize a window to the specified outer dimensions.
Minimize a window (show as icon at bottom of screen).
Maximize a window (expand to fill screen or maxW/maxH).
Hide a window without destroying it. Marks the exposed region dirty.
Show a previously hidden window. Marks its region dirty for repaint.
Mark a sub-region of a window's content area as needing repaint. Coordinates are relative to the content area, not the screen. Triggers onPaint during the next composite pass.
Mark the entire window content area as dirty.
Set a window's title text and dirty the title bar.
Load an icon for a window from an image file.
Returns: 0 on success, -1 on failure
Set or clear busy state. While busy, the hourglass cursor is shown and input is blocked.
Get a pointer to the default font.
Returns: Pointer to the active BitmapFontT
Get a pointer to the current color scheme.
Returns: Pointer to the active ColorSchemeT
Get a pointer to the display context.
Returns: Pointer to the DisplayT
Get a pointer to the blit operations vtable.
Returns: Pointer to the active BlitOpsT
Return the list of available video modes enumerated at init time.
Returns: Pointer to the VideoModeInfoT array
Set a single color by ID. Repacks to native pixel format and invalidates the entire screen.
Get a color's RGB values by ID.
Apply all colors from ctx->colorRgb[] at once (repack + full repaint).
Reset all colors to the built-in defaults and repaint.
Load a theme file (INI format with [colors] section) and apply it.
Returns: true on success
Save the current color scheme to a theme file.
Returns: true on success
Return the INI key name for a color ID (e.g. "desktop", "windowFace").
Returns: Static string
Return a human-readable display label (e.g. "Desktop", "Cursor Color").
Returns: Static string
Load and apply a wallpaper image using the current wallpaperMode (stretch/tile/center). Pass NULL to clear the wallpaper.
Returns: true on success
Change the wallpaper display mode and re-render. No effect if no wallpaper is loaded.
Configure mouse behavior.
Allocate a new accelerator table. Attach to a window via win->accelTable.
Returns: Pointer to new AccelTableT
Free an accelerator table and its entries.
Register a keyboard shortcut. On match, fires the window's onMenu callback with cmdId.
Cascade all visible, non-minimized windows. Each is offset diagonally by the title bar height.
Arrange visible windows in an NxM grid filling the screen.
Tile windows horizontally (side by side, equal width, full height).
Tile windows vertically (stacked, full width, equal height).
Load an image file (BMP, PNG, JPEG, GIF) and convert to the display's native pixel format. Caller must free with dvxFreeImage().
Returns: Pixel buffer, or NULL on failure
Load an image from a memory buffer. Same output format as dvxLoadImage(). Caller must free with dvxFreeImage().
Returns: Pixel buffer, or NULL on failure
Free a pixel buffer returned by dvxLoadImage() or dvxLoadImageFromMemory().
Query image dimensions without decoding the full file.
Returns: true on success
Save native-format pixel data to a PNG file.
Returns: 0 on success, -1 on failure
Save the entire screen (backbuffer contents) to a PNG file. Converts from native pixel format to RGB.
Returns: 0 on success, -1 on failure
Save a window's content to a PNG file.
Returns: 0 on success, -1 on failure
Copy text to the process-wide clipboard buffer. Simple static buffer (not inter-process).
Retrieve the current clipboard contents. Returns a pointer to the internal buffer (valid until the next dvxClipboardCopy), or NULL if empty.
Returns: Clipboard text, or NULL
Load an icon/image resource from a DXE file and decode to native pixel format. Caller must free with dvxFreeImage().
Returns: Pixel buffer, or NULL if not found
Load a text resource from a DXE file into a caller-provided buffer. Null-terminated and truncated to fit bufSize.
Returns: true on success
Load a raw binary resource from a DXE file. Returns a malloc'd buffer that the caller must free.
Returns: Data buffer, or NULL if not found
Compute a djb2-xor hash for cheap dirty detection. Compare at save time with the current hash to detect changes without a shadow copy. Not cryptographic.
Returns: 32-bit hash value
Retained-mode widget toolkit layered on the DVX window manager. Widgets form a tree (parent-child) rooted at a per-window VBox container. Layout is automatic: measure minimum sizes bottom-up, then allocate space top-down with flexbox-like weighted distribution. Widget types are registered dynamically at runtime via DXE plugins.
Universal Callbacks:
| Macro | Description |
|---|---|
| wgtPixels(v) | Size in pixels |
| wgtChars(v) | Size in character widths (multiplied by charWidth at layout time) |
| wgtPercent(v) | Size as percentage of parent dimension |
| Flag | Description |
|---|---|
| WCLASS_FOCUSABLE | Can receive keyboard focus (Tab navigation) |
| WCLASS_HORIZ_CONTAINER | Lays out children horizontally (vs. vertical) |
| WCLASS_PAINTS_CHILDREN | Widget handles child rendering itself |
| WCLASS_NO_HIT_RECURSE | Hit testing stops here, no child recursion |
| WCLASS_FOCUS_FORWARD | Accel hit forwards focus to next focusable sibling |
| WCLASS_HAS_POPUP | Has dropdown popup overlay |
| WCLASS_SCROLLABLE | Accepts mouse wheel events |
| WCLASS_SCROLL_CONTAINER | Scroll container (ScrollPane) |
| WCLASS_NEEDS_POLL | Needs periodic polling |
| WCLASS_SWALLOWS_TAB | Tab key goes to widget, not focus navigation |
| WCLASS_RELAYOUT_ON_SCROLL | Full relayout on scrollbar drag |
| WCLASS_PRESS_RELEASE | Click = press + release (Button, ImageButton) |
| WCLASS_ACCEL_WHEN_HIDDEN | Accelerator matching works even when invisible |
Initialize the widget system for a window. Creates a root VBox container that fills the content area, and installs callback handlers (onPaint, onMouse, onKey, onResize) for widget-based event dispatch. The window's userData is set to the AppContextT pointer.
Returns: Root VBox widget (add children to this)
Walk from any widget up the tree to the root, then retrieve the AppContextT stored in the window's userData. Lets any widget access the full application context.
Returns: Pointer to the AppContextT
Mark a widget as needing both re-layout (measure + position) and repaint. Propagates upward to ancestors. Use after structural changes (adding/removing children, text changes that affect size).
Mark a widget as needing repaint only, without re-layout. Use for visual-only changes (checkbox toggle, selection highlight, cursor blink).
Set widget text content (dispatches to the widget class's SET_TEXT handler).
Get the widget's current text content.
Returns: Text string (empty string if no handler)
Enable or disable a widget. Disabled widgets are grayed out and do not receive input.
Set read-only mode. Allows scrolling and selection but blocks editing.
Set keyboard focus to a widget.
Get the currently focused widget.
Returns: Focused widget, or NULL
Show or hide a widget.
Set a widget's name for lookup via wgtFind().
Find a widget by name. Searches the subtree rooted at root.
Returns: Matching widget, or NULL
Destroy a widget and all its children. Removes from parent's child list.
Set tooltip text for a widget. Pass NULL to remove. Caller owns the string and it must outlive the widget.
Default window resize handler installed by wgtInitWindow(). Re-evaluates scrollbars and relayouts the widget tree. Call from custom onResize handlers to chain to the widget system.
Decode a tagged size value (WGT_SIZE_PIXELS/CHARS/PERCENT) into a concrete pixel count. Returns 0 for a raw 0 input (meaning "auto").
Returns: Size in pixels
Execute the full two-pass layout algorithm. Pass 1 (bottom-up): compute minimum sizes. Pass 2 (top-down): allocate space with weighted distribution. Normally called automatically; exposed for cases where layout must be forced before the next paint.
Paint the entire widget tree by depth-first traversal. Each widget's clip rect is set to its bounds. Overlays (popups, tooltips) are painted in a second pass on top.
Draw colored borders around layout containers for debugging.
Register a new widget class at runtime. Appends to widgetClassTable. The WidgetClassT must remain valid for the lifetime of the process (typically static const in a DXE).
Returns: Assigned type ID
Register a widget API struct under a name. Each widget DXE registers its API during initialization. Callers retrieve it via wgtGetApi() and cast to the widget-specific type.
Retrieve a registered widget API struct by name.
Returns: Pointer to the API struct, or NULL if not found
Register an interface descriptor for a widget type. Used by the BASIC form runtime and IDE for generic property/method dispatch.
Retrieve an interface descriptor by widget type name.
Returns: Interface descriptor, or NULL
Find a widget type name by its VB-style name (e.g. "CommandButton" -> "button"). Case-insensitive search.
Returns: Internal type name, or NULL
Return the number of registered widget interfaces.
Returns: Count of registered interfaces
Get a registered widget interface by index.
Returns: Interface descriptor
Get the .wgt DXE file path for a registered widget.
Returns: File path string
Set the .wgt DXE file path for a registered widget (called by the loader).
Get the 1-based index of this widget within its .wgt file. Used to construct suffixed resource names (e.g. "name-2", "icon16-2").
Returns: 1-based index within the DXE file
The following inline functions provide type-safe dispatch through the WidgetClassT handler table. Each checks for a non-NULL handler before calling.
| Function | Method ID | Description |
|---|---|---|
| wclsHas(w, methodId) | -- | Check if a handler exists for the given method ID |
| wclsPaint(w, d, ops, font, colors) | WGT_METHOD_PAINT | Paint the widget |
| wclsPaintOverlay(w, d, ops, font, colors) | WGT_METHOD_PAINT_OVERLAY | Paint overlay (popups, dropdowns) |
| wclsCalcMinSize(w, font) | WGT_METHOD_CALC_MIN_SIZE | Compute minimum size |
| wclsLayout(w, font) | WGT_METHOD_LAYOUT | Layout children |
| wclsGetLayoutMetrics(w, font, ...) | WGT_METHOD_GET_LAYOUT_METRICS | Get pad, gap, extraTop, borderW |
| wclsOnMouse(w, root, vx, vy) | WGT_METHOD_ON_MOUSE | Handle mouse event |
| wclsOnKey(w, key, mod) | WGT_METHOD_ON_KEY | Handle key event |
| wclsOnAccelActivate(w, root) | WGT_METHOD_ON_ACCEL_ACTIVATE | Handle accelerator activation |
| wclsDestroy(w) | WGT_METHOD_DESTROY | Destroy widget-private data |
| wclsOnChildChanged(parent, child) | WGT_METHOD_ON_CHILD_CHANGED | Notify parent of child change |
| wclsGetText(w) | WGT_METHOD_GET_TEXT | Get widget text |
| wclsSetText(w, text) | WGT_METHOD_SET_TEXT | Set widget text |
| wclsClearSelection(w) | WGT_METHOD_CLEAR_SELECTION | Clear text selection |
| wclsClosePopup(w) | WGT_METHOD_CLOSE_POPUP | Close dropdown popup |
| wclsGetPopupRect(w, font, ...) | WGT_METHOD_GET_POPUP_RECT | Get popup screen rect |
| wclsOnDragUpdate(w, root, x, y) | WGT_METHOD_ON_DRAG_UPDATE | Update during drag |
| wclsOnDragEnd(w, root, x, y) | WGT_METHOD_ON_DRAG_END | End drag operation |
| wclsGetCursorShape(w, vx, vy) | WGT_METHOD_GET_CURSOR_SHAPE | Get cursor shape for position |
| wclsPoll(w, win) | WGT_METHOD_POLL | Periodic polling (comms, etc.) |
| wclsQuickRepaint(w, outY, outH) | WGT_METHOD_QUICK_REPAINT | Fast partial repaint |
| wclsScrollChildIntoView(parent, child) | WGT_METHOD_SCROLL_CHILD_INTO_VIEW | Scroll to make child visible |