summaryrefslogtreecommitdiff
path: root/common/action.h
diff options
context:
space:
mode:
authortmk <nobody@nowhere>2014-07-30 14:37:05 +0900
committertmk <nobody@nowhere>2014-07-30 14:37:05 +0900
commitadbb86b1ec8b07e86ae7425374e95b82122e48a7 (patch)
tree0a02e89376f69ef975096af9490034725d8eb751 /common/action.h
parent79840c678e13f9a737f80048bc3b9c9c55e3fc77 (diff)
parenta9f5f201ad6b009675fdf16c4447033cc2ac0995 (diff)
Merge branch 'mbed' into dev
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 077711c231..8a4736d7bc 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/>.
#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 */