X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=common%2Faction.h;h=8a4736d7bc19cbb833481649b467cc4da109e1ac;hb=c67ae2a6b546c822759352586c14cd9dccbbe0ff;hp=077711c231a3fffb0640fa35784323724a555cf2;hpb=04fe78ee0a7fe9baed39f021799a3dbb24ebeb36;p=tmk_firmware.git diff --git a/common/action.h b/common/action.h index 077711c..8a4736d 100644 --- a/common/action.h +++ b/common/action.h @@ -25,6 +25,10 @@ along with this program. If not, see . #include "action_macro.h" +#ifdef __cplusplus +extern "C" { +#endif + /* tapping count and state */ typedef struct { bool interrupted :1; @@ -42,12 +46,11 @@ typedef struct { #endif } keyrecord_t; - /* Execute action per keyevent */ void action_exec(keyevent_t event); /* action for key */ -action_t action_for_key(uint8_t layer, key_t key); +action_t action_for_key(uint8_t layer, keypos_t key); /* macro */ 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); void clear_keyboard(void); void clear_keyboard_but_mods(void); void layer_switch(uint8_t new_layer); -bool is_tap_key(key_t key); +bool is_tap_key(keypos_t key); /* debug */ void debug_event(keyevent_t event); void debug_record(keyrecord_t record); void debug_action(action_t action); +#ifdef __cplusplus +} +#endif + #endif /* ACTION_H */