diff --git a/bindings/odin/clay-odin/linux/clay.a b/bindings/odin/clay-odin/linux/clay.a index b52d85f..de15bdb 100644 Binary files a/bindings/odin/clay-odin/linux/clay.a and b/bindings/odin/clay-odin/linux/clay.a differ diff --git a/bindings/odin/clay-odin/macos-arm64/clay.a b/bindings/odin/clay-odin/macos-arm64/clay.a index f8d076f..9a816b0 100644 Binary files a/bindings/odin/clay-odin/macos-arm64/clay.a and b/bindings/odin/clay-odin/macos-arm64/clay.a differ diff --git a/bindings/odin/clay-odin/macos/clay.a b/bindings/odin/clay-odin/macos/clay.a index a948f82..1989cde 100644 Binary files a/bindings/odin/clay-odin/macos/clay.a and b/bindings/odin/clay-odin/macos/clay.a differ diff --git a/bindings/odin/clay-odin/windows/clay.lib b/bindings/odin/clay-odin/windows/clay.lib index 2bfd5f3..34cee6b 100644 Binary files a/bindings/odin/clay-odin/windows/clay.lib and b/bindings/odin/clay-odin/windows/clay.lib differ diff --git a/bindings/odin/clay-official-website b/bindings/odin/clay-official-website deleted file mode 100755 index 8f8f574..0000000 Binary files a/bindings/odin/clay-official-website and /dev/null differ diff --git a/clay.h b/clay.h index 825e122..ac8ed7c 100644 --- a/clay.h +++ b/clay.h @@ -22,6 +22,12 @@ #ifndef CLAY_HEADER #define CLAY_HEADER +#ifdef CLAY_WASM +#define CLAY_WASM_EXPORT(name) __attribute__((export_name(name))) +#else +#define CLAY_WASM_EXPORT(null) +#endif + // Public Macro API ------------------------ #define CLAY_LAYOUT(...) Clay__StoreLayoutConfig((Clay_LayoutConfig) {__VA_ARGS__ }) @@ -217,6 +223,8 @@ typedef struct { Clay_ChildAlignment childAlignment; } Clay_LayoutConfig; +extern Clay_LayoutConfig CLAY_LAYOUT_DEFAULT; + // Rectangle typedef struct { Clay_Color color; @@ -386,17 +394,17 @@ void Clay_SetMeasureTextFunction(Clay_Dimensions (*measureTextFunction)(Clay_Str Clay_RenderCommand * Clay_RenderCommandArray_Get(Clay_RenderCommandArray* array, int32_t index); void Clay_SetDebugModeEnabled(bool enabled); -void Clay_OpenContainerElement(Clay_ElementId id, Clay_LayoutConfig *layoutConfig); -void Clay_OpenRectangleElement(Clay_ElementId id, Clay_LayoutConfig *layoutConfig, Clay_RectangleElementConfig *rectangleConfig); -void Clay_OpenTextElement(Clay_ElementId id, Clay_String *text, Clay_TextElementConfig *textConfig); -void Clay_OpenImageElement(Clay_ElementId id, Clay_LayoutConfig *layoutConfig, Clay_ImageElementConfig *imageConfig); -void Clay_OpenScrollElement(Clay_ElementId id, Clay_LayoutConfig *layoutConfig, Clay_ScrollElementConfig *imageConfig); -void Clay_OpenFloatingElement(Clay_ElementId id, Clay_LayoutConfig *layoutConfig, Clay_FloatingElementConfig *imageConfig); -void Clay_OpenBorderElement(Clay_ElementId id, Clay_LayoutConfig *layoutConfig, Clay_BorderElementConfig *imageConfig); -void Clay_OpenCustomElement(Clay_ElementId id, Clay_LayoutConfig *layoutConfig, Clay_CustomElementConfig *imageConfig); -void Clay_CloseElementWithChildren(); -void Clay_CloseScrollElement(); -void Clay_CloseFloatingElement(); +void Clay__OpenContainerElement(Clay_ElementId id, Clay_LayoutConfig *layoutConfig); +void Clay__OpenRectangleElement(Clay_ElementId id, Clay_LayoutConfig *layoutConfig, Clay_RectangleElementConfig *rectangleConfig); +void Clay__OpenTextElement(Clay_ElementId id, Clay_String text, Clay_TextElementConfig *textConfig); +void Clay__OpenImageElement(Clay_ElementId id, Clay_LayoutConfig *layoutConfig, Clay_ImageElementConfig *imageConfig); +void Clay__OpenScrollElement(Clay_ElementId id, Clay_LayoutConfig *layoutConfig, Clay_ScrollElementConfig *imageConfig); +void Clay__OpenFloatingElement(Clay_ElementId id, Clay_LayoutConfig *layoutConfig, Clay_FloatingElementConfig *imageConfig); +void Clay__OpenBorderElement(Clay_ElementId id, Clay_LayoutConfig *layoutConfig, Clay_BorderElementConfig *imageConfig); +void Clay__OpenCustomElement(Clay_ElementId id, Clay_LayoutConfig *layoutConfig, Clay_CustomElementConfig *imageConfig); +void Clay__CloseElementWithChildren(); +void Clay__CloseScrollElement(); +void Clay__CloseFloatingElement(); // Internal API functions required by macros Clay_LayoutConfig * Clay__StoreLayoutConfig(Clay_LayoutConfig config); @@ -407,7 +415,10 @@ Clay_FloatingElementConfig * Clay__StoreFloatingElementConfig(Clay_FloatingEleme Clay_CustomElementConfig * Clay__StoreCustomElementConfig(Clay_CustomElementConfig config); Clay_ScrollElementConfig * Clay__StoreScrollElementConfig(Clay_ScrollElementConfig config); Clay_BorderElementConfig * Clay__StoreBorderElementConfig(Clay_BorderElementConfig config); -Clay_ElementId Clay_HashString(Clay_String toHash, uint32_t index); +Clay_ElementId Clay__HashString(Clay_String toHash, uint32_t index); + +extern Clay_Color Clay__debugViewHighlightColor; +extern uint32_t Clay__debugViewWidth; #ifdef __cplusplus } @@ -421,12 +432,6 @@ Clay_ElementId Clay_HashString(Clay_String toHash, uint32_t index); #ifdef CLAY_IMPLEMENTATION #undef CLAY_IMPLEMENTATION -#ifdef CLAY_WASM -#define CLAY_WASM_EXPORT(name) __attribute__((export_name(name))) -#else -#define CLAY_WASM_EXPORT(null) -#endif - #ifdef CLAY_OVERFLOW_TRAP #include "signal.h" #endif diff --git a/examples/clay-official-website/build.sh b/examples/clay-official-website/build.sh index e10fc68..103747e 100755 --- a/examples/clay-official-website/build.sh +++ b/examples/clay-official-website/build.sh @@ -1,5 +1,7 @@ mkdir -p build/clay \ && clang \ +-Wall \ +-WError \ -Os \ -DCLAY_WASM \ -mbulk-memory \