mirror of
				https://github.com/nicbarker/clay.git
				synced 2025-11-04 00:26:17 +00:00 
			
		
		
		
	Update odin bindings
This commit is contained in:
		
							parent
							
								
									452c8f57f6
								
							
						
					
					
						commit
						a0210bdd15
					
				| 
						 | 
				
			
			@ -378,6 +378,7 @@ Context :: struct {} // opaque structure, only use as a pointer
 | 
			
		|||
@(link_prefix = "Clay_", default_calling_convention = "c")
 | 
			
		||||
foreign Clay {
 | 
			
		||||
	_OpenElement :: proc() ---
 | 
			
		||||
	_OpenElementWithId :: proc(id: ElementId) ---
 | 
			
		||||
	_CloseElement :: proc() ---
 | 
			
		||||
	MinMemorySize :: proc() -> u32 ---
 | 
			
		||||
	CreateArenaWithCapacityAndMemory :: proc(capacity: c.size_t, offset: [^]u8) -> Arena ---
 | 
			
		||||
| 
						 | 
				
			
			@ -426,11 +427,19 @@ ConfigureOpenElement :: proc(config: ElementDeclaration) -> bool {
 | 
			
		|||
}
 | 
			
		||||
 | 
			
		||||
@(deferred_none = _CloseElement)
 | 
			
		||||
UI :: proc(id: ElementId = {}) -> proc (config: ElementDeclaration) -> bool {
 | 
			
		||||
UI_WithId :: proc(id: ElementId) -> proc (config: ElementDeclaration) -> bool {
 | 
			
		||||
	_OpenElementWithId(id)
 | 
			
		||||
	return ConfigureOpenElement
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
@(deferred_none = _CloseElement)
 | 
			
		||||
UI_AutoId :: proc() -> proc (config: ElementDeclaration) -> bool {
 | 
			
		||||
	_OpenElement()
 | 
			
		||||
	return ConfigureOpenElement
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
UI :: proc{UI_WithId, UI_AutoId};
 | 
			
		||||
 | 
			
		||||
Text :: proc($text: string, config: ^TextElementConfig) {
 | 
			
		||||
	wrapped := MakeString(text)
 | 
			
		||||
	wrapped.isStaticallyAllocated = true
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
		Reference in a new issue