Files
libsst/libsst-wm/README.md
James Russell 71230f918f Add module READMEs, .gitignore, and remove Bin/ from tracking
Add README.md for each library module documenting API, platform
backends, and usage. Add .gitignore for build artifacts. Remove
pre-built binaries from version control.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-03 00:27:55 -05:00

41 lines
1.5 KiB
Markdown

# libsst-wm
Cross-platform window management, input events, and OpenGL context creation.
## API
### Window management
- `SST_WM_Init()` / `SST_WM_Shutdown()`
- `SST_WM_CreateWindowOnScreen()` / `SST_WM_DestroyWindow()`
- `SST_WM_SetWindowText()`, `SST_WM_GetWindowRect()`, `SST_WM_MoveWindowOnScreen()`, `SST_WM_ResizeWindow()`, `SST_WM_SetWindowState()`
- `SST_WM_ShowDialogBox()` -- native message dialog
### Display and video modes
- `SST_WM_CreateDisplayTarget()` / `SST_WM_DestroyDisplayTarget()`
- `SST_WM_CreateGraphicsEnumerator()` -- enumerate adapters, screens, video modes
- `SST_WM_SetVideoModeOnScreen()` / `SST_WM_GetVideoModeOnScreen()`
### Events
- `SST_WM_GetEvent()` -- dequeue next input/window event
- `SST_WM_SendUserEvent()` -- post custom event
### OpenGL
- `SST_WM_CreateOpenGLContext()` / `SST_WM_CreateSlaveOpenGLContext()` -- shared contexts for multi-threaded rendering
- `SST_WM_BindOpenGLContext()`, `SST_WM_SwapOpenGLBuffers()`, `SST_WM_DestroyOpenGLContext()`
### Software rendering
- `SST_WM_EnableSoftwareRendering()` / `SST_WM_DisableSoftwareRendering()`
- `SST_WM_LockBackbuffer()` / `SST_WM_UnlockBackbuffer()`
## Platform backends
| Backend | Windowing | GL context | Input |
|---|---|---|---|
| Win32 | Win32 API | WGL | Win32 messages |
| Xlib | X11 | GLX | Xlib / XInput2 |
| RaspPi | DispmanX | EGL (partial) | -- |
| macOS | -- | -- | -- (stub) |
Internally uses a driver function-table architecture; each backend registers
its implementation at init time.