1
0
mirror of https://github.com/vlang/v.git synced 2023-08-10 21:13:21 +03:00
v/vlib/sokol/sfons/sfons_funcs.c.v
2023-08-03 21:06:36 +03:00

27 lines
710 B
V

module sfons
import fontstash
import sokol.memory
[typedef]
pub struct C.sfons_allocator_t {
pub:
alloc memory.FnAllocatorAlloc = unsafe { nil }
free memory.FnAllocatorFree = unsafe { nil }
user_data voidptr
}
[typedef]
pub struct C.sfons_desc_t {
pub:
width int // initial width of font atlas texture (default: 512, must be power of 2)
height int // initial height of font atlas texture (default: 512, must be power of 2)
allocator C.sfons_allocator_t // optional memory allocation overrides
}
fn C.sfons_create(desc &C.sfons_desc_t) &fontstash.Context
fn C.sfons_destroy(ctx &fontstash.Context)
fn C.sfons_flush(ctx &fontstash.Context)
fn C.sfons_rgba(r u8, g u8, b u8, a u8) u32