A descriptor for a canvas in the UI system. More...
A descriptor for a canvas in the UI system.
A descriptor for a generic display / led / output device that's used in the UI system.
#include <UI.h>
Public Types | |
using | ClearFuncPtr = void(*)(const UiCanvasDescriptor &canvasToClear) |
using | FlushFuncPtr = void(*)(const UiCanvasDescriptor &canvasToFlush) |
Public Attributes | |
uint8_t | id_ |
void * | handle_ |
uint32_t | updateRateMs_ |
uint32_t | screenSaverTimeOut = 0 |
bool | screenSaverOn = false |
ClearFuncPtr | clearFunction_ |
FlushFuncPtr | flushFunction_ |
A function to clear the display before the UiPages are drawn.
A function to call when all UIPages have finished the drawing procedure and the results can be flushed out to the device.
ClearFuncPtr daisy::UiCanvasDescriptor::clearFunction_ |
FlushFuncPtr daisy::UiCanvasDescriptor::flushFunction_ |
void* daisy::UiCanvasDescriptor::handle_ |
A pointer to some object that allows to draw to the canvas. In your UI pages, you will use the id_ to identify which canvas this is, and then cast this pointer to whatever object it represents, e.g. OledDisplay.
uint8_t daisy::UiCanvasDescriptor::id_ |
An id number to tell apart various types of canvases that are used concurrently in your system.
uint32_t daisy::UiCanvasDescriptor::screenSaverTimeOut = 0 |
The desired timeout in ms before a display will shut off. This defaults to 0, which will keep the display on all the time. Nonzero values are useful for displays that can suffer from burn-in, such as OLEDs.
uint32_t daisy::UiCanvasDescriptor::updateRateMs_ |
The desired update rate in ms