aboutsummaryrefslogtreecommitdiff
path: root/common/action.h
diff options
context:
space:
mode:
Diffstat (limited to 'common/action.h')
-rw-r--r--common/action.h13
1 files changed, 10 insertions, 3 deletions
diff --git a/common/action.h b/common/action.h
index 077711c23..8a4736d7b 100644
--- a/common/action.h
+++ b/common/action.h
@@ -25,6 +25,10 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
25#include "action_macro.h" 25#include "action_macro.h"
26 26
27 27
28#ifdef __cplusplus
29extern "C" {
30#endif
31
28/* tapping count and state */ 32/* tapping count and state */
29typedef struct { 33typedef struct {
30 bool interrupted :1; 34 bool interrupted :1;
@@ -42,12 +46,11 @@ typedef struct {
42#endif 46#endif
43} keyrecord_t; 47} keyrecord_t;
44 48
45
46/* Execute action per keyevent */ 49/* Execute action per keyevent */
47void action_exec(keyevent_t event); 50void action_exec(keyevent_t event);
48 51
49/* action for key */ 52/* action for key */
50action_t action_for_key(uint8_t layer, key_t key); 53action_t action_for_key(uint8_t layer, keypos_t key);
51 54
52/* macro */ 55/* macro */
53const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt); 56const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt);
@@ -65,11 +68,15 @@ void unregister_mods(uint8_t mods);
65void clear_keyboard(void); 68void clear_keyboard(void);
66void clear_keyboard_but_mods(void); 69void clear_keyboard_but_mods(void);
67void layer_switch(uint8_t new_layer); 70void layer_switch(uint8_t new_layer);
68bool is_tap_key(key_t key); 71bool is_tap_key(keypos_t key);
69 72
70/* debug */ 73/* debug */
71void debug_event(keyevent_t event); 74void debug_event(keyevent_t event);
72void debug_record(keyrecord_t record); 75void debug_record(keyrecord_t record);
73void debug_action(action_t action); 76void debug_action(action_t action);
74 77
78#ifdef __cplusplus
79}
80#endif
81
75#endif /* ACTION_H */ 82#endif /* ACTION_H */