A queue that holds user input events in the UI system. More...
A queue that holds user input events in the UI system.
A queue that holds user interface events such as button presses or encoder turns. The queue can be filled from hardware drivers and read from a UI object. Access to the queue is protected by a ScopedIrqBlocker - that means it's safe to add events from interrupt handlers.
#include <UiEventQueue.h>
Static Public Attributes | |
static constexpr uint16_t | invalidButtonId = UINT16_MAX |
static constexpr uint16_t | invalidEncoderId = UINT16_MAX |
static constexpr uint16_t | invalidPotId = UINT16_MAX |
|
inline |
|
inline |
An event in the queue
The type of event
An invalid event. Returned to indicate that no events are left in the queue.
A button was pressed.
A button was released.
An encoder was turned.
The user has started or stopped turning an encoder.
A potentiometer was moved.
The user has started or stopped moving a potentiometer.
Used to indicate if a control is currently being used.
The control is not in use at the moment.
The control is actively used at the moment.
The type of event that this Event object represents.
The unique ID of the button that was pressed.
The number of successive button presses (e.g. double click).
True if the event was generated because a button was retriggered automatically while being held down.
The unique ID of the button that was released.
The unique ID of the encoder that was turned.
The number of increments detected.
The total number of increments per revolution.
The unique ID of the encoder that is affected.
The new activity type.
The unique ID of the pot that was moved.
The new position of the pot.
The unique ID of the pot that is affected.
The new activity type.
|
inline |
Adds a Event::EventType::buttonPressed event to the queue.
Adds a Event::EventType::buttonReleased event to the queue.
Adds a Event::EventType::encoderActivityChanged event to the queue.
|
inline |
Adds a Event::EventType::encoderTurned event to the queue.
Adds a Event::EventType::potActivityChanged event to the queue.
Adds a Event::EventType::potMoved event to the queue.
|
inline |
Removes and returns an event from the queue.
|
inline |
Returns true, if the queue is empty.
|
staticconstexpr |
A button ID used to indicate an invalid or non existing button.
|
staticconstexpr |
An encoder ID used to indicate an invalid or non existing encoder.
|
staticconstexpr |
A potentiometer ID used to indicate an invalid or non existing potentiometer.