diff options
Diffstat (limited to 'common/action.h')
| -rw-r--r-- | common/action.h | 13 |
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 | ||
| 29 | extern "C" { | ||
| 30 | #endif | ||
| 31 | |||
| 28 | /* tapping count and state */ | 32 | /* tapping count and state */ |
| 29 | typedef struct { | 33 | typedef 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 */ |
| 47 | void action_exec(keyevent_t event); | 50 | void action_exec(keyevent_t event); |
| 48 | 51 | ||
| 49 | /* action for key */ | 52 | /* action for key */ |
| 50 | action_t action_for_key(uint8_t layer, key_t key); | 53 | action_t action_for_key(uint8_t layer, keypos_t key); |
| 51 | 54 | ||
| 52 | /* macro */ | 55 | /* macro */ |
| 53 | const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt); | 56 | const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt); |
| @@ -65,11 +68,15 @@ void unregister_mods(uint8_t mods); | |||
| 65 | void clear_keyboard(void); | 68 | void clear_keyboard(void); |
| 66 | void clear_keyboard_but_mods(void); | 69 | void clear_keyboard_but_mods(void); |
| 67 | void layer_switch(uint8_t new_layer); | 70 | void layer_switch(uint8_t new_layer); |
| 68 | bool is_tap_key(key_t key); | 71 | bool is_tap_key(keypos_t key); |
| 69 | 72 | ||
| 70 | /* debug */ | 73 | /* debug */ |
| 71 | void debug_event(keyevent_t event); | 74 | void debug_event(keyevent_t event); |
| 72 | void debug_record(keyrecord_t record); | 75 | void debug_record(keyrecord_t record); |
| 73 | void debug_action(action_t action); | 76 | void debug_action(action_t action); |
| 74 | 77 | ||
| 78 | #ifdef __cplusplus | ||
| 79 | } | ||
| 80 | #endif | ||
| 81 | |||
| 75 | #endif /* ACTION_H */ | 82 | #endif /* ACTION_H */ |
