Papageno
An Advanced Pattern Matching Library
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros
ppg_event.h
Go to the documentation of this file.
1 /* Copyright 2017 noseglasses <shinynoseglasses@gmail.com>
2  *
3  * This program is free software: you can redistribute it and/or modify
4  * it under the terms of the GNU Lesser General Public License as published by
5  * the Free Software Foundation, either version 3 of the License, or
6  * (at your option) any later version.
7  *
8  * This program is distributed in the hope that it will be useful,
9  * but WITHOUT ANY WARRANTY; without even the implied warranty of
10  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11  * GNU Lesser General Public License for more details.
12  *
13  * You should have received a copy of the GNU Lesser General Public License
14  * along with this program. If not, see <http://www.gnu.org/licenses/>.
15  */
16 
17 #ifndef PPG_EVENT_H
18 #define PPG_EVENT_H
19 
22 #include "ppg_input.h"
23 #include "ppg_signals.h"
24 #include "ppg_time.h"
25 #include "ppg_layer.h"
26 
35 {
37 
38  PPG_Event_Active = (1 << 0),
40 };
41 
44 typedef struct {
46  PPG_Time time;
47  PPG_Count flags;
48 } PPG_Event;
49 
58 typedef void (*PPG_Event_Processor_Fun)(PPG_Event *event,
59  void *user_data);
60 
66 void ppg_event_process(PPG_Event *event);
67 
68 #endif
PPG_Time time
The time at which the input event occured.
Definition: ppg_event.h:46
void ppg_event_process(PPG_Event *event)
This is the main entry function for input event processing.
void(* PPG_Event_Processor_Fun)(PPG_Event *event, void *user_data)
A callback function that is used during processing of stored input events.
Definition: ppg_event.h:58
Specification of an input event.
Definition: ppg_event.h:44
PPG_Count flags
Whether the input is active.
Definition: ppg_event.h:47
This flag bit tells if an event has been considered as part of a pattern or as control event (e...
Definition: ppg_event.h:39
uint8_t PPG_Input_Id
The type used as input identifier.
Definition: ppg_input.h:29
Initial value of the flags variable.
Definition: ppg_event.h:36
PPG_Input_Id input
The input identifier associated with the input that is pressed or released.
Definition: ppg_event.h:45
Set to mark the activation of an input through an event.
Definition: ppg_event.h:38
PPG_Event_Flags
Flags that are used to tag events.
Definition: ppg_event.h:34