feat: Add ncurses renderer and example

- **Renderer**: Implemented `clay_renderer_ncurses.c` supporting rectangles, text, borders, and clipping using standard ncurses plotting.
- **Example**: Added `examples/ncurses-example` demonstrating a scrollable "Social Feed" UI with keyboard navigation.
- **Build**: Added `CLAY_INCLUDE_NCURSES_EXAMPLES` option to root `CMakeLists.txt` and integrated the new example.
- **CompConfig**: Updated `.gitignore` to strictly exclude `build/`, `_deps/`, and other standard CMake artifacts.
This commit is contained in:
Seintian 2025-12-28 14:01:41 +01:00
parent 7d099ad870
commit 840606d0c1
5 changed files with 638 additions and 3 deletions

View file

@ -0,0 +1,14 @@
cmake_minimum_required(VERSION 3.27)
project(clay-ncurses-example C)
find_package(Curses REQUIRED)
add_executable(clay-ncurses-example main.c)
target_link_libraries(clay-ncurses-example PRIVATE ${CURSES_LIBRARIES})
if (CMAKE_SYSTEM_NAME STREQUAL Linux)
target_link_libraries(clay-ncurses-example PRIVATE m)
endif()
target_include_directories(clay-ncurses-example PRIVATE ${CURSES_INCLUDE_DIRS} ../../)