X-Git-Url: https://git.friedersdorff.com/?a=blobdiff_plain;f=common%2Faction.h;h=8a4736d7bc19cbb833481649b467cc4da109e1ac;hb=d5e5dbd0aa28477884940ce045da09a9168859d8;hp=077711c231a3fffb0640fa35784323724a555cf2;hpb=fd9ee507a557e17b5af9fcd8892868ddf07bbb7a;p=max%2Ftmk_keyboard.git diff --git a/common/action.h b/common/action.h index 077711c2..8a4736d7 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 */