# libdvx -- DVX Core Library

The core windowing GUI: VESA video backend, drawing primitives, dirty-rect
compositor, window manager, and the public application API.  Every DVX
application links against this library.

## Documentation

Full reference is authored in the `.dhs` help sources in this directory
and compiles into the DVX System Reference:

- `sysdoc.dhs` -- documentation index (start here)
- `arch.dhs`   -- five-layer architecture, display pipeline, module system
- `apiref.dhs` -- every public function, struct, enum, and constant

After `make`, the compiled form is `bin/apps/kpunch/progman/dvxhelp.hlp`
(viewable via the Help Viewer app) and `docs/dvx_system_reference.html`.

## Source Files

Public headers live alongside implementation:

- `dvxTypes.h`  -- shared types (DisplayT, RectT, BlitOpsT, ColorSchemeT, etc.)
- `dvxVideo.h`  / `.c`  -- layer 1: VESA init, LFB mapping, backbuffer
- `dvxDraw.h`   / `.c`  -- layer 2: rect fill, bevel, text, bitmap blits
- `dvxComp.h`   / `.c`  -- layer 3: dirty rect list, merge, LFB flush
- `dvxWm.h`     / `.c`  -- layer 4: window manager, chrome, drag, resize
- `dvxApp.h`    / `.c`  -- layer 5: event loop, public API, aggregator
- `dvxWgt.h`            -- widget base (WidgetT, WidgetClassT, WgtIfaceT)
- `dvxWgtP.h`           -- widget-internal helpers
- `dvxDlg.h`    / `dvxDialog.c` -- message/input/choice/file dialogs
- `dvxRes.h`    / `dvxResource.c` -- .res resource system
- `dvxMem.h`            -- memory allocation wrappers
- `dvxPrefs.h`  / `.c`  -- INI-format preferences
- `dvxFont.h`           -- bundled 8x16 bitmap font
- `dvxCur.h`            -- mouse cursor bitmaps
- `dvxPal.h`            -- 16-color CGA palette
- `widgetCore.c` / `widgetLayout.c` / `widgetEvent.c` / `widgetClass.c`
  -- widget runtime helpers shared across all widget plugins
- `dvxImage.c` / `dvxImageWrite.c` -- image loader/writer (BMP, PNG via stb)
- `platform/dvxPlat.h`  -- platform-layer interface (implemented per target)

## Build

`make -C src/libs/kpunch/libdvx` (invoked by the top-level `make`).
