objc

Data Structures | Macros | Typedefs | Functions
Pixel Displays

Functions for opening and closing pixel displays. More...

Collaboration diagram for Pixel Displays:

Data Structures

struct  pix_display_t
 Display context structure. More...
 

Macros

#define PIX_DISPLAY_CTX_SIZE   64
 Size of the display context buffer. More...
 

Typedefs

typedef void(* pix_display_callback_t) (const struct pix_display_t *display)
 Display callback function type for frame updates. More...
 
typedef struct pix_display_t pix_display_t
 Display context structure. More...
 

Functions

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. More...
 
bool pix_display_sdl_finalize (pix_display_t *display)
 Finalize and free resources associated with an SDL display.
 
bool pix_display_runloop (pix_display_t *display)
 Perform operations in the runloop for the display.
 

Detailed Description

Functions for opening and closing pixel displays.

Macro Definition Documentation

◆ PIX_DISPLAY_CTX_SIZE

#define PIX_DISPLAY_CTX_SIZE   64

Size of the display context buffer.

This defines the size in bytes of the internal context buffer used for display operations. The buffer must be large enough to hold any display-specific state data required by different display implementations.

Definition at line 31 of file display.h.

Typedef Documentation

◆ pix_display_callback_t

typedef void(* pix_display_callback_t) (const struct pix_display_t *display)

Display callback function type for frame updates.

Parameters
displayPointer to the display that needs updating
Returns
true if the callback was successful, false on error

Definition at line 42 of file display.h.

◆ pix_display_t

typedef struct pix_display_t pix_display_t

Display context structure.

Contains the state for display operations.

Function Documentation

◆ pix_sdl_display_init()

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.

Parameters
titleWindow title
sizeDisplay dimensions
formatPixel format
interval_msFrame interval in milliseconds (0 = no limit)
callbackOptional callback function called at the target interval
userdataUser context pointer for the callback
Returns
Initialized display structure, or empty if initialization failed