gigawidgets 0.3.55
A wxWidgets-style UI library for the Arduino Giga Display Shield.
 
Loading...
Searching...
No Matches
event.hpp
Go to the documentation of this file.
1
2#pragma once
3
4#include <ctime>
5
6#include "coords.hpp"
7#include "position.hpp"
8
9namespace ui {
10
17enum event_t {
18 EVENT_PRESS,
19 EVENT_RELEASE,
20 EVENT_HOLD,
21};
22
26struct Event {
28 bool triggered = false;
29
32
34 uint8_t contacts;
35
38
40 time_t timeHeld;
41
44};
45
46} // namespace ui
event_t
The various touchscreen event types.
Definition event.hpp:17
A struct for storing the pixel coordinates of various UI elements.
Definition coords.hpp:17
A touchscreen event.
Definition event.hpp:26
Position coords[5]
A list of relative positions on the parent widget that are being touched.
Definition event.hpp:43
bool triggered
True if this event should be handled, false otherwise.
Definition event.hpp:28
event_t type
The touchscreen event type.
Definition event.hpp:31
Coords points[5]
A list of coordinates corresponding to each touch point, accounting for screen rotation.
Definition event.hpp:37
time_t timeHeld
The number of milliseconds that the screen has been pressed continuously.
Definition event.hpp:40
uint8_t contacts
The number of distinct points on the screen that were touched.
Definition event.hpp:34
A struct that holds the normalized position of a widget.
Definition position.hpp:15