Compare commits

...

4 Commits

Author SHA1 Message Date
Leo Zurbriggen
556c0fde9f
Merge 1c1be9ac97 into 4f8957d5d2 2025-03-07 12:34:01 -06:00
Ethan McCue
4f8957d5d2
[Documentation] Fix typo (#315)
Some checks are pending
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
2025-03-07 21:45:27 +13:00
Leo Zurbriggen
1c1be9ac97 fix identation 2025-03-04 14:01:48 +01:00
Leo Zurbriggen
829cb3fca7 expose OpenElement and CloseElement 2025-03-04 14:00:24 +01:00
2 changed files with 3 additions and 3 deletions

View File

@ -366,6 +366,8 @@ Context :: struct {} // opaque structure, only use as a pointer
@(link_prefix = "Clay_", default_calling_convention = "c") @(link_prefix = "Clay_", default_calling_convention = "c")
foreign Clay { foreign Clay {
_OpenElement :: proc() ---
_CloseElement :: proc() ---
MinMemorySize :: proc() -> u32 --- MinMemorySize :: proc() -> u32 ---
CreateArenaWithCapacityAndMemory :: proc(capacity: c.size_t, offset: [^]u8) -> Arena --- CreateArenaWithCapacityAndMemory :: proc(capacity: c.size_t, offset: [^]u8) -> Arena ---
SetPointerState :: proc(position: Vector2, pointerDown: bool) --- SetPointerState :: proc(position: Vector2, pointerDown: bool) ---
@ -398,9 +400,7 @@ foreign Clay {
@(link_prefix = "Clay_", default_calling_convention = "c", private) @(link_prefix = "Clay_", default_calling_convention = "c", private)
foreign Clay { foreign Clay {
_OpenElement :: proc() ---
_ConfigureOpenElement :: proc(config: ElementDeclaration) --- _ConfigureOpenElement :: proc(config: ElementDeclaration) ---
_CloseElement :: proc() ---
_HashString :: proc(key: String, offset: u32, seed: u32) -> ElementId --- _HashString :: proc(key: String, offset: u32, seed: u32) -> ElementId ---
_OpenTextElement :: proc(text: String, textConfig: ^TextElementConfig) --- _OpenTextElement :: proc(text: String, textConfig: ^TextElementConfig) ---
_StoreTextElementConfig :: proc(config: TextElementConfig) -> ^TextElementConfig --- _StoreTextElementConfig :: proc(config: TextElementConfig) -> ^TextElementConfig ---

2
clay.h
View File

@ -266,7 +266,7 @@ typedef CLAY_PACKED_ENUM {
CLAY_ALIGN_Y_TOP, CLAY_ALIGN_Y_TOP,
// Aligns child elements to the bottom of this element, offset by padding.width.bottom // Aligns child elements to the bottom of this element, offset by padding.width.bottom
CLAY_ALIGN_Y_BOTTOM, CLAY_ALIGN_Y_BOTTOM,
// Aligns child elements vertiically to the center of this element // Aligns child elements vertically to the center of this element
CLAY_ALIGN_Y_CENTER, CLAY_ALIGN_Y_CENTER,
} Clay_LayoutAlignmentY; } Clay_LayoutAlignmentY;