| 1 |
from libc.stdint cimport int8_t, int16_t, int32_t, int64_t, intptr_t |
| 2 |
from libc.stdint cimport uint8_t, uint16_t, uint32_t, uint64_t, uintptr_t |
| 3 |
cdef extern from *: |
| 4 |
ctypedef bint bool |
| 5 |
ctypedef struct va_list |
| 6 |
|
| 7 |
cdef extern from *: |
| 8 |
|
| 9 |
ctypedef struct Rect: |
| 10 |
float x; |
| 11 |
float y; |
| 12 |
float w; |
| 13 |
float h; |
| 14 |
|
| 15 |
ctypedef struct Color: |
| 16 |
uint8_t r; |
| 17 |
uint8_t g; |
| 18 |
uint8_t b; |
| 19 |
uint8_t a; |
| 20 |
|
| 21 |
cdef enum: |
| 22 |
Fill, |
| 23 |
Image, |
| 24 |
ClearScreen, |
| 25 |
ctypedef uint8_t DisplayItem_Tag; |
| 26 |
|
| 27 |
ctypedef struct Fill_Body: |
| 28 |
DisplayItem_Tag tag; |
| 29 |
Rect _0; |
| 30 |
Color _1; |
| 31 |
|
| 32 |
ctypedef struct Image_Body: |
| 33 |
DisplayItem_Tag tag; |
| 34 |
uint32_t id; |
| 35 |
Rect bounds; |
| 36 |
|
| 37 |
ctypedef union DisplayItem: |
| 38 |
DisplayItem_Tag tag; |
| 39 |
Fill_Body fill; |
| 40 |
Image_Body image; |
| 41 |
|
| 42 |
bool push_item(DisplayItem item); |