]> _ Git - clay.git/log
clay.git
8 weeks agoAdd image support
mivirl [Tue, 24 Jun 2025 17:46:43 +0000 (17:46 +0000)]
Add image support

Added initial image support. Renders using characters with several
options (ascii, foreground, background, unicode, etc).

Note that each image object should only be used once (or at least with
only one size), otherwise the cached results will conflict for each
size and rendering will take longer and reduce responsiveness.

8 weeks agoMerge branch 'main' into HEAD
mivirl [Tue, 24 Jun 2025 17:46:05 +0000 (17:46 +0000)]
Merge branch 'main' into HEAD

For image-related changes

8 weeks agoReplace malloc with tb_malloc
mivirl [Tue, 24 Jun 2025 01:56:35 +0000 (01:56 +0000)]
Replace malloc with tb_malloc

Use the same allocator as termbox.h, allows the user to change it

8 weeks agoClean up example code
mivirl [Thu, 29 May 2025 17:16:01 +0000 (17:16 +0000)]
Clean up example code

8 weeks ago[Bindings/Odin] Update Odin bindings
Nic Barker [Tue, 24 Jun 2025 03:57:15 +0000 (13:57 +1000)]
[Bindings/Odin] Update Odin bindings

8 weeks ago[Core] Fix an alignment bug for scrolling container contents
Nic Barker [Tue, 24 Jun 2025 03:55:20 +0000 (13:55 +1000)]
[Core] Fix an alignment bug for scrolling container contents

8 weeks ago[Renderers/SDL3] Fix border position calculated incorrectly (#446)
wolfee [Mon, 23 Jun 2025 00:43:08 +0000 (02:43 +0200)]
[Renderers/SDL3] Fix border position calculated incorrectly (#446)

8 weeks ago[Core] Avoid calling measure text function with length zero
Nic Barker [Mon, 23 Jun 2025 00:10:02 +0000 (10:10 +1000)]
[Core] Avoid calling measure text function with length zero

8 weeks ago[Renderers/SDL] Font sizing is ignored (#444)
wolfee [Sun, 22 Jun 2025 23:30:14 +0000 (01:30 +0200)]
[Renderers/SDL] Font sizing is ignored (#444)

8 weeks ago[Renderers/Cairo] Fix outdated image API usage in cairo example
Nic Barker [Sun, 22 Jun 2025 23:16:41 +0000 (09:16 +1000)]
[Renderers/Cairo] Fix outdated image API usage in cairo example

2 months ago[Renderers/HTML] Fix a mouse overlap bug with external scroll handling
Nic Barker [Fri, 20 Jun 2025 00:59:44 +0000 (10:59 +1000)]
[Renderers/HTML] Fix a mouse overlap bug with external scroll handling

2 months ago[Bindings/Odin] Update Odin Bindings
Nic Barker [Tue, 17 Jun 2025 23:55:32 +0000 (09:55 +1000)]
[Bindings/Odin] Update Odin Bindings

2 months ago[Renderers/SDL3] Fix up outdated API usage in SDL3 example
Nic Barker [Tue, 17 Jun 2025 23:54:27 +0000 (09:54 +1000)]
[Renderers/SDL3] Fix up outdated API usage in SDL3 example

2 months ago[Core] Fix case where there could be 64 extra bytes of padding between arrays in...
Nic Barker [Tue, 17 Jun 2025 03:07:56 +0000 (13:07 +1000)]
[Core] Fix case where there could be 64 extra bytes of padding between arrays in clays internal arena

2 months ago[Core] Align base arena memory to 64 byte cache line
Nic Barker [Tue, 17 Jun 2025 00:32:30 +0000 (10:32 +1000)]
[Core] Align base arena memory to 64 byte cache line

2 months ago[Core] Remove erroneous break statement when using external scroll handling
Nic Barker [Fri, 13 Jun 2025 00:35:31 +0000 (10:35 +1000)]
[Core] Remove erroneous break statement when using external scroll handling

2 months ago[Examples/clay-official-website] Fix links on official website example
Nic Barker [Thu, 12 Jun 2025 23:59:07 +0000 (09:59 +1000)]
[Examples/clay-official-website] Fix links on official website example

2 months ago[Core] Add objective-c support
Nic Barker [Thu, 12 Jun 2025 02:16:29 +0000 (12:16 +1000)]
[Core] Add objective-c support

2 months ago[Core] Fix a bug where extra child gap was added to the dimensions of clipped containers
Nic Barker [Wed, 11 Jun 2025 00:40:58 +0000 (10:40 +1000)]
[Core] Fix a bug where extra child gap was added to the dimensions of clipped containers

2 months agoFix some typos in the readme
Nic Barker [Wed, 11 Jun 2025 00:15:51 +0000 (10:15 +1000)]
Fix some typos in the readme

2 months ago[Core] Fix an out of bounds access for single newline characters
Nic Barker [Tue, 10 Jun 2025 01:38:56 +0000 (11:38 +1000)]
[Core] Fix an out of bounds access for single newline characters

2 months ago[Bindings/Odin] Update Odin Bindings to latest
Nic Barker [Fri, 6 Jun 2025 01:01:42 +0000 (11:01 +1000)]
[Bindings/Odin] Update Odin Bindings to latest

2 months ago[Documentation] Fix README typo, bump version number to 0.14
Nic Barker [Fri, 6 Jun 2025 00:20:37 +0000 (10:20 +1000)]
[Documentation] Fix README typo, bump version number to 0.14

2 months ago[Renderers/Raylib] Fix element float distortion (#430)
Alan [Thu, 5 Jun 2025 00:49:26 +0000 (05:49 +0500)]
[Renderers/Raylib] Fix element float distortion (#430)

2 months ago[Core] Fix handling of letter spacing
Nic Barker [Thu, 5 Jun 2025 00:38:53 +0000 (10:38 +1000)]
[Core] Fix handling of letter spacing

2 months ago[Renderers/Web] Fix clay official website example struct definitions for web renderers
Nic Barker [Wed, 4 Jun 2025 00:50:07 +0000 (10:50 +1000)]
[Renderers/Web] Fix clay official website example struct definitions for web renderers

2 months ago[Bindings/Odin] Update README to better match official website example. (#422)
Rats [Mon, 2 Jun 2025 10:26:04 +0000 (05:26 -0500)]
[Bindings/Odin] Update README to better match official website example. (#422)

2 months agoSet CMake FetchContent GIT_TAG for SDL_ttf (#423)
Wes Lord [Mon, 2 Jun 2025 03:00:45 +0000 (20:00 -0700)]
Set CMake FetchContent GIT_TAG for SDL_ttf (#423)

2 months ago[Core] Fix dimension calculation that would always result in 0 (#428)
Michael Tanner [Mon, 2 Jun 2025 02:27:28 +0000 (21:27 -0500)]
[Core] Fix dimension calculation that would always result in 0 (#428)

2 months ago[Core] Improve handling of aspect ratio scaling
Nic Barker [Mon, 2 Jun 2025 02:08:44 +0000 (12:08 +1000)]
[Core] Improve handling of aspect ratio scaling

2 months ago[Core] Split aspect ratio scaling into its own config (#426)
Nic Barker [Mon, 2 Jun 2025 00:36:58 +0000 (10:36 +1000)]
[Core] Split aspect ratio scaling into its own config (#426)

2 months ago[Core] Fix sign comparison warning (#427)
Boreal [Thu, 29 May 2025 03:10:05 +0000 (20:10 -0700)]
[Core] Fix sign comparison warning (#427)

2 months ago[Renderers/SDL2] Indent SDL2's CMakeLists.txt consistently (#424)
Wes Lord [Tue, 27 May 2025 23:50:00 +0000 (16:50 -0700)]
[Renderers/SDL2] Indent SDL2's CMakeLists.txt consistently (#424)

2 months agoAdd blank setting for border characters
mivirl [Mon, 26 May 2025 23:42:53 +0000 (23:42 +0000)]
Add blank setting for border characters

2 months agoRemove termbox color buffer
mivirl [Mon, 26 May 2025 23:38:26 +0000 (23:38 +0000)]
Remove termbox color buffer

Removed the internal termbox background color buffer (which was only
used for the text background color when transparency was disabled) to
instead only use the clay color buffer.

Previously used two internal color buffers so that there wouldn't be
a need to convert from the clay to termbox representations for every
cell of text, but the performance difference will be negligible for
most TUI applications (which usually update on user input, or only a
few frames per second at most), so just using one buffer is cleaner

2 months ago[Compilers] Add missing struct name for image element config
Nic Barker [Mon, 26 May 2025 00:10:24 +0000 (10:10 +1000)]
[Compilers] Add missing struct name for image element config

2 months ago[Compilers] Add struct names to public structs (#336)
Johann Muszynski [Mon, 26 May 2025 00:03:07 +0000 (03:03 +0300)]
[Compilers] Add struct names to public structs (#336)

2 months agoAdd example for termbox2 renderer
mivirl [Sun, 25 May 2025 15:33:11 +0000 (15:33 +0000)]
Add example for termbox2 renderer

2 months agoAdd termbox2 renderer
mivirl [Fri, 23 May 2025 16:05:37 +0000 (16:05 +0000)]
Add termbox2 renderer

3 months ago[Renderers/Terminal] Add initial implementation of terminal renderer (#91) main
Emmanuel [Thu, 22 May 2025 00:45:52 +0000 (21:45 -0300)]
[Renderers/Terminal] Add initial implementation of terminal renderer (#91)

3 months ago[Bindings/Odin] Update odin bindings to include floating element clipTo
Nic Barker [Mon, 19 May 2025 23:40:25 +0000 (11:40 +1200)]
[Bindings/Odin] Update odin bindings to include floating element clipTo

3 months ago[Renderers/Playdate] Playdate console example (#404)
Matt Jennings [Sun, 18 May 2025 23:46:39 +0000 (02:46 +0300)]
[Renderers/Playdate] Playdate console example (#404)

3 months ago[Renderers/Cairo] Fix cairo renderer and example (#416)
Zordan [Sun, 18 May 2025 23:36:08 +0000 (02:36 +0300)]
[Renderers/Cairo] Fix cairo renderer and example (#416)

3 months ago[Documentation] Add Go rewrites of clay to README (#411)
Patricio Whittingslow [Sun, 18 May 2025 23:33:38 +0000 (20:33 -0300)]
[Documentation] Add Go rewrites of clay to README (#411)

3 months ago[Core] restore compatibility with C99 (#412)
Simon Oelerich [Wed, 14 May 2025 01:29:12 +0000 (03:29 +0200)]
[Core] restore compatibility with C99 (#412)

3 months ago[Core] Add Clay_FloatingClipToElement (#413)
Patrick Doane [Wed, 14 May 2025 01:24:42 +0000 (18:24 -0700)]
[Core] Add Clay_FloatingClipToElement (#413)

3 months ago[Core] Add `Clay_GetPointerOverIds` function to the public API. (#389)
João Matos [Wed, 14 May 2025 00:39:56 +0000 (01:39 +0100)]
[Core] Add `Clay_GetPointerOverIds` function to the public API. (#389)

3 months ago[Bindings/Odin] Add missing border macros to Odin bindings
Jeroen van Rijn [Fri, 9 May 2025 01:25:34 +0000 (03:25 +0200)]
[Bindings/Odin] Add missing border macros to Odin bindings

3 months ago[Documentation] Fix anchor to Clay_CustomElementConfig (#403)
Sam El-Borai [Tue, 6 May 2025 00:41:33 +0000 (02:41 +0200)]
[Documentation] Fix anchor to Clay_CustomElementConfig (#403)

3 months ago[Documentation] Update README
Nic Barker [Tue, 6 May 2025 00:08:07 +0000 (12:08 +1200)]
[Documentation] Update README

3 months ago[Debug] Update `Clay__RenderDebugLayoutSizing` to handle more sizing types. (#392)
João Matos [Mon, 5 May 2025 00:27:55 +0000 (01:27 +0100)]
[Debug] Update `Clay__RenderDebugLayoutSizing` to handle more sizing types. (#392)

3 months ago[Renderers/SDL3] Use `SDL_Texture` instead of `SDL_Surface` for images (#402)
David Delassus [Mon, 5 May 2025 00:27:41 +0000 (02:27 +0200)]
[Renderers/SDL3] Use `SDL_Texture` instead of `SDL_Surface` for images (#402)

3 months ago[Bindings/Odin] Updated odin bindings with new clip config (#397)
Hayden Gray [Fri, 2 May 2025 04:02:40 +0000 (00:02 -0400)]
[Bindings/Odin] Updated odin bindings with new clip config (#397)

Great work, thanks for moving on this so quickly! 😁

3 months ago[Core] Fix a bug with the implementation of clip .childOffset
Nic Barker [Thu, 1 May 2025 05:21:09 +0000 (17:21 +1200)]
[Core] Fix a bug with the implementation of clip .childOffset

3 months ago[Bindings/Odin] Odin Raylib renderer rewrite (#395)
Rats [Thu, 1 May 2025 02:31:05 +0000 (21:31 -0500)]
[Bindings/Odin] Odin Raylib renderer rewrite (#395)

3 months ago[Core] Replace .scroll config with .clip (#376)
Nic Barker [Thu, 1 May 2025 02:11:31 +0000 (14:11 +1200)]
[Core] Replace .scroll config with .clip (#376)

3 months ago[Renderers/Raylib] Pin raylib version to 5.5
Nic Barker [Tue, 29 Apr 2025 00:42:33 +0000 (12:42 +1200)]
[Renderers/Raylib] Pin raylib version to 5.5

3 months ago[Core] Correctly throw an error when using attach to element id with an invalid id
Nic Barker [Tue, 29 Apr 2025 00:31:54 +0000 (12:31 +1200)]
[Core] Correctly throw an error when using attach to element id with an invalid id

4 months ago[Core] Fix a string hash bug with single characters (#384)
Nic Barker [Wed, 16 Apr 2025 08:16:05 +0000 (20:16 +1200)]
[Core] Fix a string hash bug with single characters (#384)

4 months ago[Documentation] Fix Clay_String definition in README.md file. (#374)
Jackson Novak [Wed, 16 Apr 2025 08:07:16 +0000 (03:07 -0500)]
[Documentation] Fix Clay_String definition in README.md file. (#374)

4 months ago[Renderers/Raylib] Fix raylib renderer border bottom left corner radius (#378)
Tim Lügger [Mon, 14 Apr 2025 02:26:12 +0000 (04:26 +0200)]
[Renderers/Raylib] Fix raylib renderer border bottom left corner radius (#378)

4 months ago[Renderers/Raylib] Add explicit type cast for malloc (#379)
Lily Nikitin [Mon, 14 Apr 2025 02:23:13 +0000 (19:23 -0700)]
[Renderers/Raylib] Add explicit type cast for malloc (#379)

4 months ago[Core] Fix a potential null pointer deref in scroll GetScrollContainerData
Nic Barker [Fri, 11 Apr 2025 23:27:10 +0000 (11:27 +1200)]
[Core] Fix a potential null pointer deref in scroll GetScrollContainerData

4 months ago[Renderers/Sokol] Sokol renderer & examples (#373)
Nathan Korth [Wed, 9 Apr 2025 01:40:22 +0000 (21:40 -0400)]
[Renderers/Sokol] Sokol renderer & examples (#373)

4 months ago[Renderers/WinGDI] Working on Win32 GDI renderer and example (#344)
Philosoph228 [Tue, 8 Apr 2025 23:31:33 +0000 (04:31 +0500)]
[Renderers/WinGDI] Working on Win32 GDI renderer and example (#344)

4 months ago[Core] Fix onHover reference not being reset for identical IDs between frames
Nic Barker [Fri, 4 Apr 2025 00:05:31 +0000 (13:05 +1300)]
[Core] Fix onHover reference not being reset for identical IDs between frames

4 months ago[CMake] Revert change to CMakeLists because of OSX problems
Nic Barker [Thu, 3 Apr 2025 23:59:57 +0000 (12:59 +1300)]
[CMake] Revert change to CMakeLists because of OSX problems

4 months ago[Cmake] basic CMake support for easier import into CMake projects (#345)
Vitalii Rohozhyn [Mon, 31 Mar 2025 21:48:50 +0000 (23:48 +0200)]
[Cmake] basic CMake support for easier import into CMake projects (#345)

4 months ago[Core] Remove unused variable in arm simd and inline rotate function'
Nic Barker [Mon, 31 Mar 2025 21:43:11 +0000 (10:43 +1300)]
[Core] Remove unused variable in arm simd and inline rotate function'

4 months ago[Core] Fix a bug with how element string ids were stored when using Clay_Hovered
Nic Barker [Mon, 31 Mar 2025 21:40:04 +0000 (10:40 +1300)]
[Core] Fix a bug with how element string ids were stored when using Clay_Hovered

4 months ago[Renderers/Raylib] Fix FLAG_HIGHDPI causing window resize to break
Nic Barker [Mon, 31 Mar 2025 21:31:40 +0000 (10:31 +1300)]
[Renderers/Raylib] Fix FLAG_HIGHDPI causing window resize to break

4 months ago[Compilers] Fix implicit typecast in simd hash function
Nic Barker [Thu, 27 Mar 2025 22:52:20 +0000 (11:52 +1300)]
[Compilers] Fix implicit typecast in simd hash function

4 months ago[Core] Fix implicit simd typecast on arm architectures
Nic Barker [Thu, 27 Mar 2025 22:47:31 +0000 (11:47 +1300)]
[Core] Fix implicit simd typecast on arm architectures

4 months ago[Core] Fix CLAY__ELEMENT_DEFINITION_LATCH overflow in CLAY macro if 256 loops end...
Piggybank Studios [Wed, 26 Mar 2025 21:14:17 +0000 (14:14 -0700)]
[Core] Fix CLAY__ELEMENT_DEFINITION_LATCH overflow in CLAY macro if 256 loops end at the same time

4 months ago[Core] Fix a bug where ID aliases werent copied on hash collision
Nic Barker [Tue, 25 Mar 2025 20:34:51 +0000 (09:34 +1300)]
[Core] Fix a bug where ID aliases werent copied on hash collision

4 months ago[Bindings/Odin] Remove field hashStringContents in odin bindings (#350)
ellie-but-backwards [Tue, 25 Mar 2025 20:21:35 +0000 (21:21 +0100)]
[Bindings/Odin] Remove field hashStringContents in odin bindings (#350)

4 months ago[Core] Guard against hashmap item null dereference (#338)
Igor Karatayev [Tue, 25 Mar 2025 20:19:50 +0000 (23:19 +0300)]
[Core] Guard against hashmap item null dereference (#338)

4 months ago[Core] Switch text content hashing to default behaviour (#335)
Nic Barker [Mon, 24 Mar 2025 21:13:04 +0000 (10:13 +1300)]
[Core] Switch text content hashing to default behaviour (#335)

5 months ago[Core] Apply minimum width for single words and fix some minimum sizing bugs
Nic Barker [Thu, 20 Mar 2025 21:49:42 +0000 (10:49 +1300)]
[Core] Apply minimum width for single words and fix some minimum sizing bugs

5 months ago[Bindings/Odin] expose _OpenElement and _CloseElement (#301)
Leo Zurbriggen [Thu, 20 Mar 2025 20:25:50 +0000 (21:25 +0100)]
[Bindings/Odin] expose _OpenElement and _CloseElement (#301)

5 months ago[Compilers] Add a dummy function to suppress unused variable warning in GCC
Nic Barker [Mon, 17 Mar 2025 22:20:51 +0000 (11:20 +1300)]
[Compilers] Add a dummy function to suppress unused variable warning in GCC

5 months ago[Renderers/SDL2] Added explicit include of math.h in SDL2 renderer
Nic Barker [Mon, 17 Mar 2025 22:13:46 +0000 (11:13 +1300)]
[Renderers/SDL2] Added explicit include of math.h in SDL2 renderer

5 months ago[Housekeeping] Revert previous commit to allow proper PR attribution
Nic Barker [Mon, 17 Mar 2025 22:12:21 +0000 (11:12 +1300)]
[Housekeeping] Revert previous commit to allow proper PR attribution

5 months ago[Renderers/SDL2] Added explicit include of math.h in SDL2 renderer
Nic Barker [Mon, 17 Mar 2025 22:10:53 +0000 (11:10 +1300)]
[Renderers/SDL2] Added explicit include of math.h in SDL2 renderer

5 months ago[Core] Fix a bug where floating elements could be clipped incorrectly
Nic Barker [Mon, 17 Mar 2025 22:05:06 +0000 (11:05 +1300)]
[Core] Fix a bug where floating elements could be clipped incorrectly

5 months agomath.h include missing cause lots of warning logs
Emerald-Ruby [Sat, 15 Mar 2025 21:51:36 +0000 (21:51 +0000)]
math.h include missing cause lots of warning logs

5 months ago[Renderers/SDL2] Fix rounded corner border index
Nic Barker [Wed, 12 Mar 2025 20:52:16 +0000 (09:52 +1300)]
[Renderers/SDL2] Fix rounded corner border index

5 months ago[Renderers/Raylib] Reuse memory in raylib renderer for temporary string allocations
Nic Barker [Wed, 12 Mar 2025 20:51:44 +0000 (09:51 +1300)]
[Renderers/Raylib] Reuse memory in raylib renderer for temporary string allocations

5 months ago[Compilers] Fix integer truncation warnings with explicit casts
Nic Barker [Wed, 12 Mar 2025 20:40:31 +0000 (09:40 +1300)]
[Compilers] Fix integer truncation warnings with explicit casts

5 months ago[Renderers/win32_gdi] Create initial WinGDI renderer
Nic Barker [Wed, 12 Mar 2025 20:27:44 +0000 (09:27 +1300)]
[Renderers/win32_gdi] Create initial WinGDI renderer

5 months agoUpdate README
Nic Barker [Wed, 12 Mar 2025 20:21:09 +0000 (09:21 +1300)]
Update README

5 months ago[Bindings/Odin] Add support for local ids to odin bindings
Nic Barker [Wed, 12 Mar 2025 20:08:20 +0000 (09:08 +1300)]
[Bindings/Odin] Add support for local ids to odin bindings

5 months ago[Bindings/Odin] Fix bad data type in odin bindings for floating config
Nic Barker [Wed, 12 Mar 2025 20:02:17 +0000 (09:02 +1300)]
[Bindings/Odin] Fix bad data type in odin bindings for floating config

5 months agoMerge pull request #320 from shakkar23/patch-1
Nic Barker [Mon, 10 Mar 2025 21:29:34 +0000 (10:29 +1300)]
Merge pull request #320 from shakkar23/patch-1

[Renderers/SDL2] Enable live resizing of layout during window resize in SDL2

5 months agoMerge pull request #300 from joshuahhh/patch-1
Nic Barker [Mon, 10 Mar 2025 20:50:28 +0000 (09:50 +1300)]
Merge pull request #300 from joshuahhh/patch-1

[Documentation] Update README.md: it's gotten bigger

5 months agoMerge pull request #319 from emoon/pass-declaration-by-pointer
Nic Barker [Mon, 10 Mar 2025 20:39:40 +0000 (09:39 +1300)]
Merge pull request #319 from emoon/pass-declaration-by-pointer

Support passing declaration by pointer as well

5 months agoUpdated rectangle border rendering
hailey [Mon, 10 Mar 2025 15:29:55 +0000 (10:29 -0500)]
Updated rectangle border rendering

5 months ago[Renderers/Win32_GDI] first pass, fixed build errors and added build script
hailey [Mon, 10 Mar 2025 14:33:12 +0000 (09:33 -0500)]
[Renderers/Win32_GDI] first pass, fixed build errors and added build script

5 months agoAdded win32 samples (first pass)
__hexmaster111 [Mon, 10 Mar 2025 14:23:36 +0000 (09:23 -0500)]
Added win32 samples (first pass)

5 months agoMerge branch 'nicbarker:main' into main
__hexmaster111 [Mon, 10 Mar 2025 14:12:52 +0000 (09:12 -0500)]
Merge branch 'nicbarker:main' into main