Papageno
An Advanced Pattern Matching Library
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros
ppg_leader_sequences.h
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_LEADER_SEQUENCES_H
18 #define PPG_LEADER_SEQUENCES_H
19 
20 #include "ppg_action.h"
21 #include "ppg_input.h"
22 #include "ppg_token.h"
23 
24 #include <stdint.h>
25 
26 #define PPG_MAX_SEQUENCE_LENGTH 16
27 
31 typedef void (*PPG_Leader_String_Retreival_Callback)(
32  uint8_t sequence_id,
33  char *buffer,
34  uint8_t max_chars);
35 
39 typedef PPG_Action (*PPG_Leader_Action_Retreival_Callback)(
40  uint8_t sequence_id);
41 
44 typedef PPG_Input_Id (*PPG_Leader_Character_To_Input_Callback)(char c);
45 
49 typedef struct {
50  PPG_Leader_String_Retreival_Callback retreive_string;
52 
53  PPG_Leader_Action_Retreival_Callback retreive_action;
55 
56  PPG_Leader_Character_To_Input_Callback input_from_char;
58 
60 
72 void ppg_alphabetic_leader_sequences(
73  PPG_Layer layer,
74  PPG_Token leader_token,
75  uint8_t n_sequences,
76  PPG_Leader_Functions functions,
77  bool allow_fallback);
78 
79 #endif
Action information.
Definition: ppg_action.h:55
PPG_Leader_Character_To_Input_Callback input_from_char
Character to input id mapping.
Definition: ppg_leader_sequences.h:56
PPG_Leader_Action_Retreival_Callback retreive_action
Leader sequence action retreival function.
Definition: ppg_leader_sequences.h:53
uint8_t PPG_Input_Id
The type used as input identifier.
Definition: ppg_input.h:29
PPG_Leader_String_Retreival_Callback retreive_string
Leader sequence character string retreival function.
Definition: ppg_leader_sequences.h:50
A collection of auxiliary functions that aid leader sequence generation.
Definition: ppg_leader_sequences.h:49
void * PPG_Token
The token type.
Definition: ppg_token.h:38