Skip to content

Commit

Permalink
[Bindings/Odin] Add get/set current context method to Odin bindings (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
nadako authored Feb 8, 2025
1 parent 5b0e5ea commit b410240
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions bindings/odin/clay-odin/clay.odin
Original file line number Diff line number Diff line change
Expand Up @@ -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 ---
Expand All @@ -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)
Expand Down

0 comments on commit b410240

Please sign in to comment.