process_keycode: remove direct `quantum.h` includes (#21486)

master
Ryan 2 years ago committed by GitHub
parent 39a97d2ee4
commit eee0384167
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 1
      quantum/action_layer.h
  2. 4
      quantum/midi/qmk_midi.c
  3. 4
      quantum/process_keycode/process_audio.h
  4. 9
      quantum/process_keycode/process_auto_shift.c
  5. 6
      quantum/process_keycode/process_auto_shift.h
  6. 4
      quantum/process_keycode/process_autocorrect.c
  7. 4
      quantum/process_keycode/process_autocorrect.h
  8. 4
      quantum/process_keycode/process_backlight.h
  9. 8
      quantum/process_keycode/process_caps_word.c
  10. 5
      quantum/process_keycode/process_caps_word.h
  11. 4
      quantum/process_keycode/process_clicky.h
  12. 11
      quantum/process_keycode/process_combo.c
  13. 6
      quantum/process_keycode/process_combo.h
  14. 9
      quantum/process_keycode/process_dynamic_macro.c
  15. 4
      quantum/process_keycode/process_dynamic_macro.h
  16. 4
      quantum/process_keycode/process_dynamic_tapping_term.c
  17. 1
      quantum/process_keycode/process_dynamic_tapping_term.h
  18. 3
      quantum/process_keycode/process_grave_esc.c
  19. 4
      quantum/process_keycode/process_grave_esc.h
  20. 1
      quantum/process_keycode/process_haptic.h
  21. 3
      quantum/process_keycode/process_joystick.h
  22. 4
      quantum/process_keycode/process_key_lock.h
  23. 6
      quantum/process_keycode/process_key_override.c
  24. 3
      quantum/process_keycode/process_key_override.h
  25. 1
      quantum/process_keycode/process_leader.c
  26. 4
      quantum/process_keycode/process_leader.h
  27. 5
      quantum/process_keycode/process_magic.c
  28. 4
      quantum/process_keycode/process_magic.h
  29. 8
      quantum/process_keycode/process_midi.c
  30. 5
      quantum/process_keycode/process_midi.h
  31. 2
      quantum/process_keycode/process_music.c
  32. 4
      quantum/process_keycode/process_music.h
  33. 3
      quantum/process_keycode/process_programmable_button.h
  34. 4
      quantum/process_keycode/process_repeat_key.c
  35. 4
      quantum/process_keycode/process_repeat_key.h
  36. 8
      quantum/process_keycode/process_rgb.c
  37. 4
      quantum/process_keycode/process_rgb.h
  38. 1
      quantum/process_keycode/process_secure.h
  39. 4
      quantum/process_keycode/process_sequencer.h
  40. 2
      quantum/process_keycode/process_space_cadet.c
  41. 4
      quantum/process_keycode/process_space_cadet.h
  42. 1
      quantum/process_keycode/process_steno.c
  43. 4
      quantum/process_keycode/process_steno.h
  44. 7
      quantum/process_keycode/process_tap_dance.c
  45. 11
      quantum/process_keycode/process_tap_dance.h
  46. 2
      quantum/process_keycode/process_tri_layer.h

@ -20,6 +20,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#include <stdint.h>
#include "keyboard.h"
#include "action.h"
#include "bitwise.h"
#ifdef DYNAMIC_KEYMAP_ENABLE
# ifndef DYNAMIC_KEYMAP_LAYER_COUNT

@ -5,6 +5,10 @@
#include "usb_descriptor.h"
#include "process_midi.h"
#ifdef AUDIO_ENABLE
# include "audio.h"
#endif
/*******************************************************************************
* MIDI
******************************************************************************/

@ -1,5 +1,9 @@
#pragma once
#include <stdint.h>
#include <stdbool.h>
#include "action.h"
float compute_freq_for_midi_note(uint8_t note);
bool process_audio(uint16_t keycode, keyrecord_t *record);

@ -14,10 +14,11 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#ifdef AUTO_SHIFT_ENABLE
# include <stdbool.h>
#include "process_auto_shift.h"
#include "quantum.h"
#include "action_util.h"
#include "timer.h"
#include "keycodes.h"
#ifndef AUTO_SHIFT_DISABLED_AT_STARTUP
# define AUTO_SHIFT_STARTUP_STATE true /* enabled */
@ -494,5 +495,3 @@ void retroshift_swap_times(void) {
}
}
#endif
#endif

@ -16,7 +16,11 @@
#pragma once
#include "quantum.h"
#include <stdint.h>
#include <stdbool.h>
#include "action.h"
#include "keyboard.h"
#include "keycodes.h"
#ifndef AUTO_SHIFT_TIMEOUT
# define AUTO_SHIFT_TIMEOUT 175

@ -6,7 +6,11 @@
#include "process_autocorrect.h"
#include <string.h>
#include "keycodes.h"
#include "quantum_keycodes.h"
#include "keycode_config.h"
#include "send_string.h"
#include "action_util.h"
#if __has_include("autocorrect_data.h")
# include "autocorrect_data.h"

@ -6,7 +6,9 @@
#pragma once
#include "quantum.h"
#include <stdint.h>
#include <stdbool.h>
#include "action.h"
bool process_autocorrect(uint16_t keycode, keyrecord_t *record);
bool process_autocorrect_user(uint16_t *keycode, keyrecord_t *record, uint8_t *typo_buffer_size, uint8_t *mods);

@ -16,6 +16,8 @@
#pragma once
#include "quantum.h"
#include <stdint.h>
#include <stdbool.h>
#include "action.h"
bool process_backlight(uint16_t keycode, keyrecord_t *record);

@ -13,6 +13,14 @@
// limitations under the License.
#include "process_caps_word.h"
#include "process_auto_shift.h"
#include "caps_word.h"
#include "keycodes.h"
#include "quantum_keycodes.h"
#include "modifiers.h"
#include "timer.h"
#include "action_tapping.h"
#include "action_util.h"
#ifdef CAPS_WORD_INVERT_ON_SHIFT
static uint8_t held_mods = 0;

@ -14,8 +14,9 @@
#pragma once
#include "quantum.h"
#include "caps_word.h"
#include <stdint.h>
#include <stdbool.h>
#include "action.h"
/**
* @brief Process handler for Caps Word feature.

@ -1,5 +1,9 @@
#pragma once
#include <stdint.h>
#include <stdbool.h>
#include "action.h"
void clicky_play(void);
bool process_clicky(uint16_t keycode, keyrecord_t *record);

@ -14,11 +14,16 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include "keymap_common.h"
#include "print.h"
#include "process_combo.h"
#include <stddef.h>
#include "process_auto_shift.h"
#include "caps_word.h"
#include "timer.h"
#include "keyboard.h"
#include "keymap_common.h"
#include "action_layer.h"
#include "action_tapping.h"
#include "action.h"
#include "action_util.h"
#include "keymap_introspection.h"
__attribute__((weak)) void process_combo_event(uint16_t combo_index, bool pressed) {}

@ -16,9 +16,11 @@
#pragma once
#include "progmem.h"
#include "quantum.h"
#include <stdint.h>
#include <stdbool.h>
#include "action.h"
#include "keycodes.h"
#include "quantum_keycodes.h"
#ifdef EXTRA_SHORT_COMBOS
# define MAX_COMBO_LENGTH 6

@ -17,6 +17,15 @@
/* Author: Wojciech Siewierski < wojciech dot siewierski at onet dot pl > */
#include "process_dynamic_macro.h"
#include <stddef.h>
#include "action_layer.h"
#include "keycodes.h"
#include "debug.h"
#include "wait.h"
#ifdef BACKLIGHT_ENABLE
# include "backlight.h"
#endif
// default feedback method
void dynamic_macro_led_blink(void) {

@ -18,7 +18,9 @@
/* Author: Wojciech Siewierski < wojciech dot siewierski at onet dot pl > */
#pragma once
#include "quantum.h"
#include <stdint.h>
#include <stdbool.h>
#include "action.h"
/* May be overridden with a custom value. Be aware that the effective
* macro length is half of this value: each keypress is recorded twice

@ -14,8 +14,10 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include "quantum.h"
#include "process_dynamic_tapping_term.h"
#include "quantum.h"
#include "keycodes.h"
#include "send_string.h"
#ifndef DYNAMIC_TAPPING_TERM_INCREMENT
# define DYNAMIC_TAPPING_TERM_INCREMENT 5

@ -16,6 +16,7 @@
#pragma once
#include <stdint.h>
#include <stdbool.h>
#include "action.h"

@ -14,6 +14,9 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include "process_grave_esc.h"
#include "keycodes.h"
#include "modifiers.h"
#include "action_util.h"
/* true if the last press of QK_GRAVE_ESCAPE was shifted (i.e. GUI or SHIFT were pressed), false otherwise.
* Used to ensure that the correct keycode is released if the key is released.

@ -15,6 +15,8 @@
*/
#pragma once
#include "quantum.h"
#include <stdint.h>
#include <stdbool.h>
#include "action.h"
bool process_grave_esc(uint16_t keycode, keyrecord_t *record);

@ -15,6 +15,7 @@
*/
#pragma once
#include <stdint.h>
#include <stdbool.h>
#include "action.h"

@ -17,6 +17,7 @@
#pragma once
#include <stdint.h>
#include "quantum.h"
#include <stdbool.h>
#include "action.h"
bool process_joystick(uint16_t keycode, keyrecord_t *record);

@ -16,7 +16,9 @@
#pragma once
#include "quantum.h"
#include <stdint.h>
#include <stdbool.h>
#include "action.h"
void cancel_key_lock(void);
bool process_key_lock(uint16_t *keycode, keyrecord_t *record);

@ -15,12 +15,10 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include "quantum.h"
#include "process_key_override.h"
#include "report.h"
#include "timer.h"
#include "process_key_override.h"
#include <debug.h>
#include "debug.h"
#ifndef KEY_OVERRIDE_REPEAT_DELAY
# define KEY_OVERRIDE_REPEAT_DELAY 500

@ -18,9 +18,8 @@
#pragma once
#include <stdbool.h>
#include <stddef.h>
#include <stdint.h>
#include "action.h"
#include "action_layer.h"
/**

@ -16,6 +16,7 @@
#include "process_leader.h"
#include "leader.h"
#include "quantum_keycodes.h"
bool process_leader(uint16_t keycode, keyrecord_t *record) {
if (record->event.pressed) {

@ -16,6 +16,8 @@
#pragma once
#include "quantum.h"
#include <stdint.h>
#include <stdbool.h>
#include "action.h"
bool process_leader(uint16_t keycode, keyrecord_t *record);

@ -14,8 +14,13 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include "process_magic.h"
#include "keycode_config.h"
#include "keycodes.h"
#include "eeconfig.h"
#ifdef AUDIO_ENABLE
# include "audio.h"
# ifndef AG_NORM_SONG
# define AG_NORM_SONG SONG(AG_NORM_SOUND)
# endif

@ -15,6 +15,8 @@
*/
#pragma once
#include "quantum.h"
#include <stdint.h>
#include <stdbool.h>
#include "action.h"
bool process_magic(uint16_t keycode, keyrecord_t *record);

@ -15,10 +15,11 @@
*/
#include "process_midi.h"
#ifdef MIDI_ENABLE
#include <LUFA/Drivers/USB/USB.h>
#include "midi.h"
#include "qmk_midi.h"
#include "timer.h"
#include "debug.h"
#ifdef MIDI_BASIC
@ -37,9 +38,6 @@ void process_midi_all_notes_off(void) {
#endif // MIDI_BASIC
#ifdef MIDI_ADVANCED
# include "timer.h"
static uint8_t tone_status[2][MIDI_TONE_COUNT];
static uint8_t midi_modulation;
@ -272,5 +270,3 @@ void midi_task(void) {
}
#endif
}
#endif // MIDI_ENABLE

@ -16,7 +16,10 @@
#pragma once
#include "quantum.h"
#include <stdint.h>
#include <stdbool.h>
#include "action.h"
#include "quantum_keycodes.h"
#ifdef MIDI_ENABLE

@ -14,8 +14,10 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include "process_music.h"
#include "timer.h"
#ifdef AUDIO_ENABLE
# include "audio.h"
# include "process_audio.h"
#endif
#if defined(MIDI_ENABLE) && defined(MIDI_BASIC)

@ -16,7 +16,9 @@
#pragma once
#include "quantum.h"
#include <stdint.h>
#include <stdbool.h>
#include "action.h"
#if defined(AUDIO_ENABLE) || (defined(MIDI_ENABLE) && defined(MIDI_BASIC))

@ -18,6 +18,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#pragma once
#include <stdint.h>
#include "quantum.h"
#include <stdbool.h>
#include "action.h"
bool process_programmable_button(uint16_t keycode, keyrecord_t *record);

@ -13,6 +13,10 @@
// limitations under the License.
#include "process_repeat_key.h"
#include "repeat_key.h"
#include "keycodes.h"
#include "quantum_keycodes.h"
#include "action_util.h"
// Default implementation of remember_last_key_user().
__attribute__((weak)) bool remember_last_key_user(uint16_t keycode, keyrecord_t* record, uint8_t* remembered_mods) {

@ -14,7 +14,9 @@
#pragma once
#include "quantum.h"
#include <stdint.h>
#include <stdbool.h>
#include "action.h"
/**
* @brief Process handler for remembering the last key.

@ -14,6 +14,14 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include "process_rgb.h"
#include "action_util.h"
#ifdef RGB_MATRIX_ENABLE
# include "rgb_matrix.h"
#endif
#ifdef RGBLIGHT_ENABLE
# include "rgblight.h"
#endif
typedef void (*rgb_func_pointer)(void);

@ -15,6 +15,8 @@
*/
#pragma once
#include "quantum.h"
#include <stdint.h>
#include <stdbool.h>
#include "action.h"
bool process_rgb(const uint16_t keycode, const keyrecord_t *record);

@ -3,6 +3,7 @@
#pragma once
#include <stdint.h>
#include <stdbool.h>
#include "action.h"

@ -16,6 +16,8 @@
#pragma once
#include "quantum.h"
#include <stdint.h>
#include <stdbool.h>
#include "action.h"
bool process_sequencer(uint16_t keycode, keyrecord_t *record);

@ -14,6 +14,8 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include "process_space_cadet.h"
#include "keycodes.h"
#include "timer.h"
#include "action_tapping.h"
// ********** OBSOLETE DEFINES, STOP USING! (pls?) **********

@ -15,7 +15,9 @@
*/
#pragma once
#include "quantum.h"
#include <stdint.h>
#include <stdbool.h>
#include "action.h"
void perform_space_cadet(keyrecord_t *record, uint16_t sc_keycode, uint8_t holdMod, uint8_t tapMod, uint8_t keycode);
bool process_space_cadet(uint16_t keycode, keyrecord_t *record);

@ -15,6 +15,7 @@
*/
#include "process_steno.h"
#include "quantum_keycodes.h"
#include "eeconfig.h"
#include "keymap_steno.h"
#include <string.h>
#ifdef VIRTSER_ENABLE

@ -16,7 +16,9 @@
#pragma once
#include "quantum.h"
#include <stdint.h>
#include <stdbool.h>
#include "action.h"
#define BOLT_STROKE_SIZE 4
#define GEMINI_STROKE_SIZE 6

@ -13,7 +13,14 @@
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include "process_tap_dance.h"
#include "quantum.h"
#include "action_layer.h"
#include "action_tapping.h"
#include "action_util.h"
#include "timer.h"
#include "wait.h"
static uint16_t active_td;
static uint16_t last_tap_time;

@ -16,10 +16,9 @@
#pragma once
#ifdef TAP_DANCE_ENABLE
#include <stdint.h>
#include <stdbool.h>
# include <inttypes.h>
#include "action.h"
typedef struct {
uint16_t interrupting_keycode;
@ -92,9 +91,3 @@ void tap_dance_pair_reset(tap_dance_state_t *state, void *user_data);
void tap_dance_dual_role_on_each_tap(tap_dance_state_t *state, void *user_data);
void tap_dance_dual_role_finished(tap_dance_state_t *state, void *user_data);
void tap_dance_dual_role_reset(tap_dance_state_t *state, void *user_data);
#else
# define TD(n) KC_NO
#endif

@ -3,6 +3,8 @@
#pragma once
#include <stdint.h>
#include <stdbool.h>
#include "action.h"
/**

Loading…
Cancel
Save