| 1 | module fontstash |
| 2 | |
| 3 | pub struct C.FONSparams { |
| 4 | width int |
| 5 | height int |
| 6 | flags char |
| 7 | userPtr voidptr |
| 8 | // int (*renderCreate)(void* uptr, int width, int height) |
| 9 | renderCreate fn (uptr voidptr, width int, height int) int = unsafe { nil } |
| 10 | // int (*renderResize)(void* uptr, int width, int height) |
| 11 | renderResize fn (uptr voidptr, width int, height int) int = unsafe { nil } |
| 12 | // void (*renderUpdate)(void* uptr, int* rect, const unsigned char* data) |
| 13 | renderUpdate fn (uptr voidptr, rect &int, data &u8) = unsafe { nil } |
| 14 | // void (*renderDraw)(void* uptr, const float* verts, const float* tcoords, const unsigned int* colors, int nverts) |
| 15 | renderDraw fn (uptr voidptr, verts &f32, tcoords &f32, colors &u32, nverts int) = unsafe { nil } |
| 16 | // void (*renderDelete)(void* uptr) |
| 17 | renderDelete fn (uptr voidptr) = unsafe { nil } |
| 18 | } |
| 19 | |
| 20 | pub struct C.FONSquad { |
| 21 | x0 f32 |
| 22 | y0 f32 |
| 23 | s0 f32 |
| 24 | t0 f32 |
| 25 | x1 f32 |
| 26 | y1 f32 |
| 27 | s1 f32 |
| 28 | t1 f32 |
| 29 | } |
| 30 | |
| 31 | pub struct C.FONStextIter { |
| 32 | x f32 |
| 33 | y f32 |
| 34 | nextx f32 |
| 35 | nexty f32 |
| 36 | scale f32 |
| 37 | spacing f32 |
| 38 | codepoint u32 |
| 39 | isize i16 |
| 40 | iblur i16 |
| 41 | font &C.FONSfont = unsafe { nil } |
| 42 | prevGlyphIndex int |
| 43 | str &u8 |
| 44 | next &u8 |
| 45 | end &u8 |
| 46 | utf8state u32 |
| 47 | } |
| 48 | |
| 49 | pub struct C.FONSfont {} |
| 50 | |
| 51 | pub struct C.FONScontext { |
| 52 | pub: |
| 53 | params C.FONSparams |
| 54 | itw f32 |
| 55 | ith f32 |
| 56 | texData &u8 = unsafe { nil } |
| 57 | } |
| 58 | |