clay/renderers
Seintian d4a48a07fc feat(ncurses): overhaul renderer with UTF-8, 256-colors, and visual improvements
Significantly enhances the Ncurses renderer capabilities and updates the example application.

Renderer Changes:
- Unicode Support:
  - Implemented automatic UTF-8 locale detection and initialization.
  - Switched to wide-character handling (`wchar_t`, `mvaddnwstr`) for correct rendering of multi-byte characters (e.g., Emojis).
  - Used `wcwidth` for accurate string width measurement.
- Color Support:
  - Upgraded from 3-bit (8 colors) to 256-color support (xterm-256color).
  - Added `Clay_Ncurses_MatchColor` to map arbitrary RGB values to the nearest color in the standard 6x6x6 color cube.
  - Added capability detection to fallback gracefully on simpler terminals.
- Visual Fidelity:
  - Implemented background color inheritance (`Clay_Ncurses_GetBackgroundAt`) to simulate transparency.
  - Text and borders now render on top of existing background colors instead of resetting to the terminal default.
- Build & POSIX:
  - Added `_XOPEN_SOURCE_EXTENDED` and `_XOPEN_SOURCE=700` definitions for standard compliance.

Example Application (clay-ncurses-example):
- Theme:
  - Updated to a modern dark theme (Uniform `{20, 20, 20}` background).
  - Switched to saturated/bright foreground colors for better contrast.
- Fixes:
  - Replaced obsolete `usleep` with POSIX-compliant `nanosleep`.
- Build:
  - Updated CMakeLists.txt to enforce linking against `ncursesw` (wide version).

Verified with `clay-ncurses-example` on Linux (xterm-256color).
2025-12-28 15:19:37 +01:00
..
cairo [Renderers/Cairo] Fix cairo renderer and example (#416) 2025-05-19 11:36:08 +12:00
ncurses feat(ncurses): overhaul renderer with UTF-8, 256-colors, and visual improvements 2025-12-28 15:19:37 +01:00
playdate [Renderers/Playdate] Playdate console example (#404) 2025-05-19 11:46:39 +12:00
raylib [Renderers/Raylib] Fix element float distortion (#430) 2025-06-05 10:49:26 +10:00
SDL2 [Renderers/SDL] Font sizing is ignored (#444) 2025-06-23 09:30:14 +10:00
SDL3 [Renderers/SDL3] Fix border position calculated incorrectly (#446) 2025-06-23 10:43:08 +10:00
sokol [Renderers/Sokol] allow usage of images with sokol renderer (#489) 2025-09-08 11:35:18 +10:00
termbox2 [Renderers/termbox] fixed horizontal text culling bug (#525) 2025-10-23 12:58:39 +11:00
terminal [Renderers/Terminal] Add initial implementation of terminal renderer (#91) 2025-05-22 12:45:52 +12:00
web [Renderers/Web] treat RenderCommand.commandType as uint8_t instead of uint32_t (#162) 2025-01-05 14:34:16 +13:00
win32_gdi [Renderers/WinGDI] Working on Win32 GDI renderer and example (#344) 2025-04-09 11:31:33 +12:00