mirror of
https://github.com/nicbarker/clay.git
synced 2025-05-16 15:28:03 +00:00
Compare commits
3 Commits
f34a046d6a
...
97338a8c92
Author | SHA1 | Date | |
---|---|---|---|
|
97338a8c92 | ||
|
5571c00a21 | ||
|
e1209c9ff5 |
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
16
clay.h
16
clay.h
@ -73,11 +73,19 @@
|
||||
|
||||
#define CLAY_ID(label) CLAY_IDI(label, 0)
|
||||
|
||||
#define CLAY_IDI(label, index) Clay__HashString(CLAY_STRING(label), index, 0)
|
||||
#define CLAY_SID(label) CLAY_SIDI(label, 0)
|
||||
|
||||
#define CLAY_IDI(label, index) CLAY_SIDI(CLAY_STRING(label), index)
|
||||
|
||||
#define CLAY_SIDI(label, index) Clay__HashString(label, index, 0)
|
||||
|
||||
#define CLAY_ID_LOCAL(label) CLAY_IDI_LOCAL(label, 0)
|
||||
|
||||
#define CLAY_IDI_LOCAL(label, index) Clay__HashString(CLAY_STRING(label), index, Clay__GetParentElementId())
|
||||
#define CLAY_SID_LOCAL(label) CLAY_SIDI_LOCAL(label, 0)
|
||||
|
||||
#define CLAY_IDI_LOCAL(label, index) CLAY_SIDI_LOCAL(CLAY_STRING(label), index)
|
||||
|
||||
#define CLAY_SIDI_LOCAL(label, index) Clay__HashString(label, index, Clay__GetParentElementId())
|
||||
|
||||
#define CLAY__STRING_LENGTH(s) ((sizeof(s) / sizeof((s)[0])) - sizeof((s)[0]))
|
||||
|
||||
@ -780,7 +788,7 @@ CLAY_DLL_EXPORT uint32_t Clay_MinMemorySize(void);
|
||||
// Intended to be used with Clay_MinMemorySize in the following way:
|
||||
// uint32_t minMemoryRequired = Clay_MinMemorySize();
|
||||
// Clay_Arena clayMemory = Clay_CreateArenaWithCapacityAndMemory(minMemoryRequired, malloc(minMemoryRequired));
|
||||
CLAY_DLL_EXPORT Clay_Arena Clay_CreateArenaWithCapacityAndMemory(uint32_t capacity, void *memory);
|
||||
CLAY_DLL_EXPORT Clay_Arena Clay_CreateArenaWithCapacityAndMemory(size_t capacity, void *memory);
|
||||
// Sets the state of the "pointer" (i.e. the mouse or touch) in Clay's internal data. Used for detecting and responding to mouse events in the debug view,
|
||||
// as well as for Clay_Hovered() and scroll element handling.
|
||||
CLAY_DLL_EXPORT void Clay_SetPointerState(Clay_Vector2 position, bool pointerDown);
|
||||
@ -3605,7 +3613,7 @@ uint32_t Clay_MinMemorySize(void) {
|
||||
}
|
||||
|
||||
CLAY_WASM_EXPORT("Clay_CreateArenaWithCapacityAndMemory")
|
||||
Clay_Arena Clay_CreateArenaWithCapacityAndMemory(uint32_t capacity, void *memory) {
|
||||
Clay_Arena Clay_CreateArenaWithCapacityAndMemory(size_t capacity, void *memory) {
|
||||
Clay_Arena arena = {
|
||||
.capacity = capacity,
|
||||
.memory = (char *)memory
|
||||
|
Binary file not shown.
Loading…
Reference in New Issue
Block a user