picofuse

display.h
Go to the documentation of this file.
1 
15 #pragma once
16 #include "bitmap.h"
17 #include <stdbool.h>
18 
24 
32 #ifndef PIX_DISPLAY_POOL_CAPACITY
33 #define PIX_DISPLAY_POOL_CAPACITY 1u
34 #endif
35 
44 #ifndef PIX_DISPLAY_CONTEXT_SIZE
45 #define PIX_DISPLAY_CONTEXT_SIZE 64u
46 #endif
47 
60 typedef void (*pix_display_draw_t)(pix_display_t *display, pix_bitmap_t *bitmap,
61  void *userdata);
62 
64 // METHODS
65 
78  pix_display_draw_t callback, void *userdata);
79 
85 void pix_display_deinit(pix_display_t *display);
86 
89 // SCHEDULING
91 
106 bool pix_poll(void);
107 
void(* pix_display_draw_t)(pix_display_t *display, pix_bitmap_t *bitmap, void *userdata)
Draw callback signature.
Definition: display.h:60
bool pix_poll(void)
Service whichever allocated display needs updating.
void pix_display_set_callback(pix_display_t *display, pix_display_draw_t callback, void *userdata)
Register the function that draws this display&#39;s contents.
Plain in-memory pixel bitmap descriptor.
Definition: bitmap.h:26
void pix_display_deinit(pix_display_t *display)
Deinitialize a display and release it back to the pool.
Plain in-memory pixel bitmap descriptor.
struct pix_display_t pix_display_t
Opaque display descriptor.
Definition: display.h:23