1
0
Fork 0
forked from forks/qmk_firmware

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

This commit is contained in:
Ryan 2023-07-11 17:07:24 +10:00 committed by GitHub
parent 39a97d2ee4
commit eee0384167
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
46 changed files with 257 additions and 155 deletions

View file

@ -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

View file

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

View file

@ -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);

View file

@ -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

View file

@ -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

View file

@ -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"

View file

@ -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);

View file

@ -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);

View file

@ -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;

View file

@ -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.

View file

@ -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);

View file

@ -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) {}

View file

@ -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

View file

@ -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) {

View file

@ -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

View file

@ -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

View file

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

View file

@ -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.

View file

@ -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);

View file

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

View file

@ -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);

View file

@ -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);

View file

@ -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

View file

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

View file

@ -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) {

View file

@ -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);

View file

@ -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

View file

@ -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);

View file

@ -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

View file

@ -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

View file

@ -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)

View file

@ -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))

View file

@ -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);

View file

@ -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) {

View file

@ -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.

View file

@ -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);

View file

@ -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);

View file

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

View file

@ -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);

View file

@ -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?) **********

View file

@ -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);

View file

@ -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

View file

@ -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

View file

@ -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;

View file

@ -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

View file

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