31 #define PIX_DISPLAY_CTX_SIZE 64 Display context structure.
Common pixel types and structures.
uint64_t time_ms
Timestamp of last frame update in milliseconds.
uint64_t interval_ms
Target frame interval in milliseconds.
uint8_t ctx[PIX_DISPLAY_CTX_SIZE]
Internal context buffer for display-specific state.
void(* pix_display_callback_t)(const struct pix_display_t *display)
Display callback function type for frame updates.
pix_display_callback_t callback
Optional callback function for frame updates.
struct pix_display_t pix_display_t
Display context structure.
bool pix_display_runloop(pix_display_t *display)
Perform operations in the runloop for the display.
pix_frame_t frame
Framebuffer containing pixel data for the display.
Frame structure containing pixel data and drawing operations.
pix_display_t pix_sdl_display_init(const char *title, pix_size_t size, pix_format_t format, uint32_t interval_ms, pix_display_callback_t callback)
Initialize a new SDL display with the specified format, size, and interval.
void * userdata
User-defined data pointer passed to callbacks.
pix_format_t
Pixel format enumeration defining color depth and layout.
bool pix_display_sdl_finalize(pix_display_t *display)
Finalize and free resources associated with an SDL display.
Size structure representing width and height dimensions.
bool(* lock)(struct pix_display_t *display)
Function pointer to lock display for drawing.
bool(* unlock)(struct pix_display_t *display)
Function pointer to unlock display after drawing.
#define PIX_DISPLAY_CTX_SIZE
Size of the display context buffer.