Nic Barker
d1a0a8dc91
fix up clay_sizingaxis typedef
2024-12-30 12:44:16 +13:00
Nic Barker
13be8d6294
Update generator to include new CLAY__TYPEDEF macro
2024-12-30 12:35:22 +13:00
FintasticMan
1a08598a5c
[Core] Remove type definition in offsetof call
...
To do this, we create a new struct for every new type Clay creates,
which contains the char and the type, to get the offset.
2024-12-29 00:08:43 +00:00
FintasticMan
e79d8ee9ba
[Core] Add way to pack enums under MSVC
2024-12-29 00:08:43 +00:00
FintasticMan
d761935ce1
[Core] Fix more C99 compliance issues
...
This fixes almost all the C99 compliance issues in the implementation of
Clay.
Now the only issues remaining are:
- ##__VA_ARGS__, which isn't easy to solve without switching to C23.
- Defining a struct within offsetof to get the alignment of a type,
which also isn't easy to solve without switching to C11.
- A number of times that signed integers are compared with unsigned
integers, which will need some rethinking of all the types for lengths
and indices etc.
- Some strangeness with the CLAY_SIZING_FIT and CLAY_SIZING_GROW macros,
which don't compile without specifying -std=gnu99 rather than -std=c99
for some reason.
2024-12-29 00:08:37 +00:00
Nic Barker
37af99b221
Add missing Clay_PointerOver to header definition
CMake on multiple platforms / build (Release, cl, cl, windows-latest) (push) Waiting to run
CMake on multiple platforms / build (Release, clang, clang++, ubuntu-latest) (push) Waiting to run
CMake on multiple platforms / build (Release, gcc, g++, ubuntu-latest) (push) Waiting to run
2024-12-28 22:33:41 +13:00
Nic Barker
ac473d6fe7
[Renderers/SDL2] Create initial SDL2 renderer ( #115 )
...
Co-authored-by: Junior Rantila <junior.rantila@gmail.com>
2024-12-28 19:15:22 +13:00
FintasticMan
bec56e68a4
Fix a couple of standards-compliance issues with C99 ( #81 )
CMake on multiple platforms / build (Release, cl, cl, windows-latest) (push) Has been cancelled
CMake on multiple platforms / build (Release, clang, clang++, ubuntu-latest) (push) Has been cancelled
CMake on multiple platforms / build (Release, gcc, g++, ubuntu-latest) (push) Has been cancelled
2024-12-27 11:12:59 +13:00
Nic Barker
04694b0da2
[Core] Implement Error Handler / Callback ( #105 )
2024-12-26 19:58:59 +13:00
Nic Barker
6a9b723dcc
Fix an issue where debug tools weren't scrollable
2024-12-24 22:28:01 +13:00
Hayden Kowalchuk
9904ca533a
fix: move internal types to stdint specific. Match Clay_RenderCommandArray_Get protoypes ( #78 )
2024-12-22 19:22:10 +13:00
Nic Barker
a48d40635a
remove inline functions for better windows lib compatibility
2024-12-22 09:13:28 +13:00
Nic Barker
712a79c473
Allow floating configuration to capture pointer ( #66 )
2024-12-21 06:36:34 +13:00
Nic Barker
18f06e5faf
Implement native scroll containers in HTML renderer ( #54 )
2024-12-19 11:35:18 +13:00
Oleksii Bulba
b9d02330ff
Fix: moved CLAY__MIN and CLAY__MAX to public macros ( #55 )
2024-12-19 09:29:12 +13:00
Nic Barker
ff3b69d94f
Fix a bug with borders that could cause duplicate IDs
2024-12-12 10:31:41 +13:00
Nic Barker
d2e6be64a9
defer rendering of borders until after children
2024-12-05 13:54:54 +13:00
Nic Barker
0ef877eef7
fix an edge case where text could be measured incorrectly
2024-12-05 13:23:20 +13:00
Nic Barker
efec6ab1de
Fix a bug that could cause double newlines in text blocks
2024-12-04 16:02:53 +13:00
Nic Barker
9f0cf751da
Fix incorrect handling of naked newline characters in text blocks
2024-12-04 15:46:02 +13:00
Nic Barker
41f6616993
Fix text measurement default bucket count
2024-12-02 12:04:01 +13:00
Nic Barker
b8725bfb65
Improve overflow handling / CLAY_MAX_ELEMENT_COUNT exceeded ( #52 )
2024-12-01 21:05:56 +13:00
Nic Barker
51c5355686
Fix text cache overflow ( #51 )
2024-11-27 12:13:11 +13:00
Bach Le
c5a1c1a4ed
Forward declare Clay__OpenTextElement ( #49 )
2024-11-18 15:01:55 +11:00
Nic Barker
8b84561f0d
Add Clay_GetElementWithIndex function
2024-10-24 21:38:02 +13:00
Nic Barker
2f67b61256
README updates
2024-10-23 09:44:39 +13:00
Nic Barker
2d6e9afe87
Fix GCC type cast
2024-10-22 21:12:47 +13:00
Nic Barker
83551449c2
Fix a bug when a single word couldn't fit in its container
2024-10-22 21:07:24 +13:00
Nic Barker
29133bc783
Multi-type elements ( #34 )
2024-10-22 20:41:35 +13:00
Nic Barker
3dffbea2a3
Fix an overflow bug in the text measurement cache ( #44 )
2024-10-16 12:11:01 +13:00
johan0A
05eb12bed7
Made casting more explicit for better compatibility with different compilers ( #41 )
2024-10-12 13:25:22 +13:00
Nic Barker
f579690f5d
Improve space allocation for GROW containers
2024-10-07 18:56:13 +13:00
Nic Barker
90b4b0de26
float cast to appease C++
2024-10-06 13:32:55 +13:00
Nic Barker
843b5bfe89
Add numeric rounding to final bounding box output
2024-10-06 13:29:06 +13:00
Nic Barker
51082d2f1e
Change lineSpacing text config attribute to lineHeight ( #37 )
2024-10-05 20:57:52 +13:00
Nic Barker
26013e657f
Fix a bug that causes incorrect allocation of total width to multiple SIZING_GROW children
2024-10-05 18:55:22 +13:00
Nic Barker
c3f2baf40a
Fix a bug with scroll offset in scroll containers with GROW where contents were smaller than container
2024-10-05 11:59:29 +13:00
Patrik Smělý
c02db35554
[Bug] Fix NEWLINES wrap mode not being respected correctly ( #36 )
2024-10-04 14:30:49 +13:00
Patrik Smělý
987e7fde5d
Fix bug in Clay_SetPointerState that causes null pointer deref ( #33 )
2024-10-02 15:05:52 +13:00
Nic Barker
948b7ce70b
C++20 Support ( #31 )
2024-09-29 12:53:46 +13:00
Nic Barker
5e7c4c41eb
[C] Convert element macros to use for() internally ( #30 )
2024-09-28 15:43:29 +12:00
Nic Barker
3b4c177e58
Fix const inits for gcc 9.4 and add docker tests for old gcc compiler ( #29 )
2024-09-28 07:42:08 +12:00
Bach Le
10cc866477
Add CLAY_LOCAL_ID[I] ( #27 )
2024-09-25 14:04:28 +12:00
Nic Barker
3775927e40
Replace const structs with macros to appease GCC
2024-09-25 13:43:23 +12:00
Bach Le
c60fb1300f
Initialize text measurement hashmap ( #25 )
2024-09-25 13:30:36 +12:00
Michael Savage
3e0791bdc5
Don't use __VA_ARGS__ in a non-variadic macro ( #21 )
2024-09-21 08:14:54 +12:00
Nic Barker
6430bbbdc3
Fix warnings caused by misname
2024-09-21 08:13:22 +12:00
Nic Barker
5bb725d005
Fix forward declarations
2024-09-21 08:04:31 +12:00
Nic Barker
0903440a34
Add notice for defining implementation macro at the top of the file
2024-09-20 20:56:33 +12:00
Nic Barker
332837befd
Fix issues with multiple translation units ( #20 )
2024-09-20 20:46:48 +12:00