Merge pull request #193 from keyboardio/f/deprecation/hook-functions

Make the already deprecated hook registration functions emit a warning
pull/198/head
Jesse Vincent 7 years ago committed by GitHub
commit ac840e2dd0

@ -134,3 +134,13 @@ Kaleidoscope_::focusHook(const char *command) {
} }
Kaleidoscope_ Kaleidoscope; Kaleidoscope_ Kaleidoscope;
/* Deprecated functions */
void event_handler_hook_use(Kaleidoscope_::eventHandlerHook hook) {
Kaleidoscope.useEventHandlerHook(hook);
}
void loop_hook_use(Kaleidoscope_::loopHook hook) {
Kaleidoscope.useLoopHook(hook);
}

@ -121,10 +121,5 @@ extern Kaleidoscope_ Kaleidoscope;
/* -- DEPRECATED aliases; remove them when there are no more users. -- */ /* -- DEPRECATED aliases; remove them when there are no more users. -- */
#define event_handler_hook_use(hook) Kaleidoscope.useEventHandlerHook(hook); void event_handler_hook_use(Kaleidoscope_::eventHandlerHook hook) __attribute__((deprecated));
#define event_handler_hook_append(hook) Kaleidoscope.appendEventHandlerHook(hook) void loop_hook_use(Kaleidoscope_::loopHook hook) __attribute__((deprecated));
#define event_handler_hook_replace(oldHook, newHook) Kaleidoscope.replaceEventHandlerHook(oldHook, newHook)
#define loop_hook_use(hook) Kaleidoscope.useLoopHook(hook)
#define loop_hook_append(hook) Kaleidoscope.appendLoopHook(hook)
#define loop_hook_replace(oldHook, newHook) Kaleidoscope.replaceLoopHook(oldHook, newHook)

Loading…
Cancel
Save