mirror of
				https://github.com/nicbarker/clay.git
				synced 2025-11-04 00:26:17 +00:00 
			
		
		
		
	add get/set current context method to Odin bindings
This commit is contained in:
		
							parent
							
								
									5b0e5ea456
								
							
						
					
					
						commit
						1bed563883
					
				| 
						 | 
				
			
			@ -339,6 +339,8 @@ ErrorHandler :: struct {
 | 
			
		|||
    userData: rawptr
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
Context :: struct {} // opaque structure, only use as a pointer
 | 
			
		||||
 | 
			
		||||
@(link_prefix = "Clay_", default_calling_convention = "c")
 | 
			
		||||
foreign Clay {
 | 
			
		||||
    MinMemorySize :: proc() -> u32 ---
 | 
			
		||||
| 
						 | 
				
			
			@ -355,6 +357,8 @@ foreign Clay {
 | 
			
		|||
    SetMeasureTextFunction :: proc(measureTextFunction: proc "c" (text: StringSlice, config: ^TextElementConfig, userData: uintptr) -> Dimensions, userData: uintptr) ---
 | 
			
		||||
    RenderCommandArray_Get :: proc(array: ^ClayArray(RenderCommand), index: i32) -> ^RenderCommand ---
 | 
			
		||||
    SetDebugModeEnabled :: proc(enabled: bool) ---
 | 
			
		||||
    GetCurrentContext :: proc() -> ^Context ---
 | 
			
		||||
    SetCurrentContext :: proc(ctx: ^Context) ---
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
@(link_prefix = "Clay_", default_calling_convention = "c", private)
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
		Reference in a new issue