mirror of
https://github.com/nicbarker/clay.git
synced 2025-04-19 04:38:01 +00:00
Updated to latest clay and moved files to be like in the odin bindings
This commit is contained in:
parent
9bc743fd12
commit
f8b13b5978
7
bindings/jai/.gitignore
vendored
7
bindings/jai/.gitignore
vendored
@ -1,5 +1,4 @@
|
|||||||
.build/
|
.build/
|
||||||
examples/introducing_clay_video_demo/main.exe
|
main.exe
|
||||||
examples/introducing_clay_video_demo/main.pdb
|
main.pdb
|
||||||
examples/introducing_clay_video_demo/main.rdi
|
main.rdi
|
||||||
source/clay.h
|
|
||||||
|
1
bindings/jai/clay-jai/.gitignore
vendored
Normal file
1
bindings/jai/clay-jai/.gitignore
vendored
Normal file
@ -0,0 +1 @@
|
|||||||
|
source/clay.h
|
@ -49,7 +49,7 @@ BorderElementConfig :: struct {
|
|||||||
}
|
}
|
||||||
|
|
||||||
make_string :: (str: string) -> String {
|
make_string :: (str: string) -> String {
|
||||||
clay_string := String.{cast(u64, str.count), str.data};
|
clay_string := String.{cast(s32, str.count), str.data};
|
||||||
return clay_string;
|
return clay_string;
|
||||||
}
|
}
|
||||||
|
|
@ -1,7 +1,7 @@
|
|||||||
//
|
//
|
||||||
// This file was auto-generated using the following command:
|
// This file was auto-generated using the following command:
|
||||||
//
|
//
|
||||||
// jai ./generate.jai - -compile
|
// jai generate.jai - -compile
|
||||||
//
|
//
|
||||||
|
|
||||||
|
|
||||||
@ -28,7 +28,7 @@ _Alignint32_t :: struct {
|
|||||||
// Note: Clay_String is not guaranteed to be null terminated. It may be if created from a literal C string,
|
// Note: Clay_String is not guaranteed to be null terminated. It may be if created from a literal C string,
|
||||||
// but it is also used to represent slices.
|
// but it is also used to represent slices.
|
||||||
String :: struct {
|
String :: struct {
|
||||||
length: u64;
|
length: s32;
|
||||||
chars: *u8;
|
chars: *u8;
|
||||||
}
|
}
|
||||||
_AlignClay_String :: struct {
|
_AlignClay_String :: struct {
|
||||||
@ -40,8 +40,8 @@ _AlignClay_String :: struct {
|
|||||||
}
|
}
|
||||||
|
|
||||||
_StringArray :: struct {
|
_StringArray :: struct {
|
||||||
capacity: u32;
|
capacity: s32;
|
||||||
length: u32;
|
length: s32;
|
||||||
internalArray: *String;
|
internalArray: *String;
|
||||||
}
|
}
|
||||||
_AlignClay__StringArray :: struct {
|
_AlignClay__StringArray :: struct {
|
||||||
@ -442,8 +442,8 @@ _AlignClay_RenderCommand :: struct {
|
|||||||
}
|
}
|
||||||
|
|
||||||
RenderCommandArray :: struct {
|
RenderCommandArray :: struct {
|
||||||
capacity: u32;
|
capacity: s32;
|
||||||
length: u32;
|
length: s32;
|
||||||
internalArray: *RenderCommand;
|
internalArray: *RenderCommand;
|
||||||
}
|
}
|
||||||
_AlignClay_RenderCommandArray :: struct {
|
_AlignClay_RenderCommandArray :: struct {
|
||||||
@ -536,8 +536,8 @@ RenderCommandArray_Get :: (array: *RenderCommandArray, index: s32) -> *RenderCom
|
|||||||
SetDebugModeEnabled :: (enabled: bool) -> void #foreign clay "Clay_SetDebugModeEnabled";
|
SetDebugModeEnabled :: (enabled: bool) -> void #foreign clay "Clay_SetDebugModeEnabled";
|
||||||
IsDebugModeEnabled :: () -> bool #foreign clay "Clay_IsDebugModeEnabled";
|
IsDebugModeEnabled :: () -> bool #foreign clay "Clay_IsDebugModeEnabled";
|
||||||
SetCullingEnabled :: (enabled: bool) -> void #foreign clay "Clay_SetCullingEnabled";
|
SetCullingEnabled :: (enabled: bool) -> void #foreign clay "Clay_SetCullingEnabled";
|
||||||
SetMaxElementCount :: (maxElementCount: u32) -> void #foreign clay "Clay_SetMaxElementCount";
|
SetMaxElementCount :: (maxElementCount: s32) -> void #foreign clay "Clay_SetMaxElementCount";
|
||||||
SetMaxMeasureTextCacheWordCount :: (maxMeasureTextCacheWordCount: u32) -> void #foreign clay "Clay_SetMaxMeasureTextCacheWordCount";
|
SetMaxMeasureTextCacheWordCount :: (maxMeasureTextCacheWordCount: s32) -> void #foreign clay "Clay_SetMaxMeasureTextCacheWordCount";
|
||||||
|
|
||||||
// Internal API functions required by macros
|
// Internal API functions required by macros
|
||||||
_OpenElement :: () -> void #foreign clay "Clay__OpenElement";
|
_OpenElement :: () -> void #foreign clay "Clay__OpenElement";
|
||||||
@ -555,7 +555,6 @@ _StoreCustomElementConfig :: (config: CustomElementConfig) -> *CustomElementConf
|
|||||||
_StoreScrollElementConfig :: (config: ScrollElementConfig) -> *ScrollElementConfig #foreign clay "Clay__StoreScrollElementConfig";
|
_StoreScrollElementConfig :: (config: ScrollElementConfig) -> *ScrollElementConfig #foreign clay "Clay__StoreScrollElementConfig";
|
||||||
_StoreBorderElementConfig :: (config: BorderElementConfig) -> *BorderElementConfig #foreign clay "Clay__StoreBorderElementConfig";
|
_StoreBorderElementConfig :: (config: BorderElementConfig) -> *BorderElementConfig #foreign clay "Clay__StoreBorderElementConfig";
|
||||||
_HashString :: (key: String, offset: u32, seed: u32) -> ElementId #foreign clay "Clay__HashString";
|
_HashString :: (key: String, offset: u32, seed: u32) -> ElementId #foreign clay "Clay__HashString";
|
||||||
_Noop :: () -> void #foreign clay "Clay__Noop";
|
|
||||||
_OpenTextElement :: (text: String, textConfig: *TextElementConfig) -> void #foreign clay "Clay__OpenTextElement";
|
_OpenTextElement :: (text: String, textConfig: *TextElementConfig) -> void #foreign clay "Clay__OpenTextElement";
|
||||||
|
|
||||||
_debugViewHighlightColor: Color #elsewhere clay "Clay__debugViewHighlightColor";
|
_debugViewHighlightColor: Color #elsewhere clay "Clay__debugViewHighlightColor";
|
||||||
@ -607,7 +606,7 @@ clay :: #library,no_dll "clay-jai/windows/clay";
|
|||||||
{
|
{
|
||||||
instance: String;
|
instance: String;
|
||||||
assert(((cast(*void)(*instance.length)) - cast(*void)(*instance)) == 0, "String.length has unexpected offset % instead of 0", ((cast(*void)(*instance.length)) - cast(*void)(*instance)));
|
assert(((cast(*void)(*instance.length)) - cast(*void)(*instance)) == 0, "String.length has unexpected offset % instead of 0", ((cast(*void)(*instance.length)) - cast(*void)(*instance)));
|
||||||
assert(size_of(type_of(String.length)) == 8, "String.length has unexpected size % instead of 8", size_of(type_of(String.length)));
|
assert(size_of(type_of(String.length)) == 4, "String.length has unexpected size % instead of 4", size_of(type_of(String.length)));
|
||||||
assert(((cast(*void)(*instance.chars)) - cast(*void)(*instance)) == 8, "String.chars has unexpected offset % instead of 8", ((cast(*void)(*instance.chars)) - cast(*void)(*instance)));
|
assert(((cast(*void)(*instance.chars)) - cast(*void)(*instance)) == 8, "String.chars has unexpected offset % instead of 8", ((cast(*void)(*instance.chars)) - cast(*void)(*instance)));
|
||||||
assert(size_of(type_of(String.chars)) == 8, "String.chars has unexpected size % instead of 8", size_of(type_of(String.chars)));
|
assert(size_of(type_of(String.chars)) == 8, "String.chars has unexpected size % instead of 8", size_of(type_of(String.chars)));
|
||||||
assert(size_of(String) == 16, "String has size % instead of 16", size_of(String));
|
assert(size_of(String) == 16, "String has size % instead of 16", size_of(String));
|
Binary file not shown.
@ -1,6 +1,6 @@
|
|||||||
using Basic :: #import "Basic";
|
using Basic :: #import "Basic";
|
||||||
|
|
||||||
Clay :: #import,file "../../module.jai";
|
Clay :: #import,file "../../clay-jai/module.jai";
|
||||||
Raylib :: #import "raylib-jai";
|
Raylib :: #import "raylib-jai";
|
||||||
|
|
||||||
for_expansion :: Clay.for_expansion;;
|
for_expansion :: Clay.for_expansion;;
|
||||||
|
Loading…
Reference in New Issue
Block a user