clay/examples
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-pdf-rendering [Core] Remove ID from element declaration struct and split clay macro into CLAY and CLAY_WITHID (#492) 2025-09-16 11:39:07 +10:00
clay-official-website [Core] Update Clay_OnHover to take void* instead of uintptr_t (#334) 2025-11-26 15:11:34 +11:00
cpp-project-example [Core] Remove ID from element declaration struct and split clay macro into CLAY and CLAY_WITHID (#492) 2025-09-16 11:39:07 +10:00
introducing-clay-video-demo [Renderers/Raylib] Pin raylib version to 5.5 2025-04-29 12:43:44 +12:00
ncurses-example feat(ncurses): overhaul renderer with UTF-8, 256-colors, and visual improvements 2025-12-28 15:19:37 +01:00
playdate-project-example [Core] Remove ID from element declaration struct and split clay macro into CLAY and CLAY_WITHID (#492) 2025-09-16 11:39:07 +10:00
raylib-multi-context [Renderers/Raylib] Pin raylib version to 5.5 2025-04-29 12:43:44 +12:00
raylib-sidebar-scrolling-container [Core] Remove ID from element declaration struct and split clay macro into CLAY and CLAY_WITHID (#492) 2025-09-16 11:39:07 +10:00
SDL2-video-demo [Renderers/SDL2] Indent SDL2's CMakeLists.txt consistently (#424) 2025-05-28 09:50:00 +10:00
SDL3-simple-demo [Core] Remove ID from element declaration struct and split clay macro into CLAY and CLAY_WITHID (#492) 2025-09-16 11:39:07 +10:00
shared-layouts [Core] Update Clay_OnHover to take void* instead of uintptr_t (#334) 2025-11-26 15:11:34 +11:00
sokol-corner-radius [Core] Remove ID from element declaration struct and split clay macro into CLAY and CLAY_WITHID (#492) 2025-09-16 11:39:07 +10:00
sokol-video-demo [Core] Fix a string hash bug with single characters (#384) 2025-04-16 20:16:05 +12:00
termbox2-demo Fixed termbox2 demo build, added scroll functionality (#523) 2025-10-23 12:57:11 +11:00
termbox2-image-demo [Renderers/termbox] Fixing termbox2-image-demo build error (#524) 2025-10-02 11:21:11 +10:00
terminal-example [Renderers/Terminal] Add initial implementation of terminal renderer (#91) 2025-05-22 12:45:52 +12:00
win32_gdi [Renderers/WinGDI] Working on Win32 GDI renderer and example (#344) 2025-04-09 11:31:33 +12:00