libDaisy
Hardware Library for Daisy
Loading...
Searching...
No Matches
daisy::UiCanvasDescriptor Struct Reference

A descriptor for a canvas in the UI system. More...

Detailed Description

A descriptor for a canvas in the UI system.

Author
jelliesen

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_
 
voidhandle_
 
uint32_t updateRateMs_
 
uint32_t screenSaverTimeOut = 0
 
bool screenSaverOn = false
 
ClearFuncPtr clearFunction_
 
FlushFuncPtr flushFunction_
 

Member Typedef Documentation

◆ ClearFuncPtr

A function to clear the display before the UiPages are drawn.

◆ FlushFuncPtr

A function to call when all UIPages have finished the drawing procedure and the results can be flushed out to the device.

Member Data Documentation

◆ clearFunction_

ClearFuncPtr daisy::UiCanvasDescriptor::clearFunction_

◆ flushFunction_

FlushFuncPtr daisy::UiCanvasDescriptor::flushFunction_

◆ handle_

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.

◆ id_

uint8_t daisy::UiCanvasDescriptor::id_

An id number to tell apart various types of canvases that are used concurrently in your system.

◆ screenSaverOn

bool daisy::UiCanvasDescriptor::screenSaverOn = false

◆ screenSaverTimeOut

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.

◆ updateRateMs_

uint32_t daisy::UiCanvasDescriptor::updateRateMs_

The desired update rate in ms


The documentation for this struct was generated from the following file: