diff --git a/.iwyu_ignore b/.iwyu_ignore new file mode 100644 index 00000000..576b8eb9 --- /dev/null +++ b/.iwyu_ignore @@ -0,0 +1,12 @@ +src/Kaleidoscope.h +src/Kaleidoscope-LEDControl.h +src/kaleidoscope/HIDTables.h +src/kaleidoscope/driver/bootloader/gd32/Base.h +src/kaleidoscope/driver/led/Base.h +src/kaleidoscope/driver/led/WS2812.h +src/kaleidoscope/driver/led/ws2812/config.h +src/kaleidoscope/driver/mcu/GD32.h +src/kaleidoscope/driver/storage/GD32Flash.h +plugins/Kaleidoscope-FirmwareDump/** +plugins/Kaleidoscope-HostOS/src/kaleidoscope/plugin/HostOS.h +plugins/Kaleidoscope-Hardware-EZ-ErgoDox/src/kaleidoscope/device/ez/ErgoDox/i2cmaster.h \ No newline at end of file diff --git a/bin/fix-header-includes b/bin/fix-header-includes new file mode 100755 index 00000000..c25d2706 --- /dev/null +++ b/bin/fix-header-includes @@ -0,0 +1,6 @@ +#!/usr/bin/env bash + +: "${KALEIDOSCOPE_DIR:=$(pwd)}" +cd "${KALEIDOSCOPE_DIR}" || exit 1 + +git ls-files -m | grep -E '\.(h|cpp)$' | xargs "${KALEIDOSCOPE_DIR}"/bin/iwyu.py diff --git a/bin/iwyu.py b/bin/iwyu.py index db1fea07..10928b60 100755 --- a/bin/iwyu.py +++ b/bin/iwyu.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python3 # -*- coding: utf-8 -*- # ------------------------------------------------------------------------------ # Copyright (c) 2022 Michael Richters @@ -28,7 +28,6 @@ # For more information, please refer to # ------------------------------------------------------------------------------ - """This is a script for maintenance of the headers included in Kaleidoscope source files. It is not currently possible to run this automatically on all Kaleidoscope source files, because of the peculiarities therein. It uses @@ -46,49 +45,172 @@ made). # Example invocation: # $ git ls-files -m | grep '\.\(h\|cpp\)' | bin/iwyu.py +import argparse +import glob +import logging import os +import re +import shlex import shutil import subprocess import sys + +# ============================================================================== +def parse_args(args): + parser = argparse.ArgumentParser( + description= + """Run `include-what-you-use` on source files given as command-line arguments and/or read + from standard input. When reading target filenames from standard input, they should be + either absolute or relative to the current directory, and each line of input (minus the + line-ending character(s) is treated as a filename.""") + parser.add_argument( + '-q', + '--quiet', + dest='loglevel', + help="Suppress output except warnings and errors.", + action='store_const', + const=logging.ERROR, + default=logging.WARNING, + ) + parser.add_argument( + '-v', + '--verbose', + dest='loglevel', + help="Output verbose debugging information.", + action='store_const', + const=logging.INFO, + ) + parser.add_argument( + '-d', + '--debug', + dest='loglevel', + help="""Save output from `include-what-you-use` for processed files beside the + originals, with a '.iwyu' suffix, for debugging purposes.""", + action='store_const', + const=logging.DEBUG, + ) + parser.add_argument( + '-r', + '--regex', + dest='regex', + help="""A regular expression for matching filenames Only the basename of the file is + matched, and the regex is only used when searching a directory for files to process, + not on target filenames specified in arguments or read from standard input.""", + action='store', + default=r'\.(h|cpp)$', + ) + parser.add_argument( + '-i', + '--ignores_file', + dest='ignores_file', + metavar='', + help= + """The name of a file (relative to KALEIDOSCOPE_DIR) that contains a list of glob + patterns that will be ignored when a target directory is searched for filenames that + match .""", + action='store', + default='.iwyu_ignore', + ) + parser.add_argument( + 'targets', + metavar="", + nargs='+', + help= + """A list of target files and/or directories to search for source files to format. Any + target file will be processed, regardless of the filename. Any target directory will + be recursively searched for files matching the regular expression given by --regex. + Filenames and directories beginning with a '.' will always be excluded from the search, + but can still be processed if specified as a command-line target.""", + ) + return parser.parse_args(args) + + +# ============================================================================== +def setup_logging(loglevel): + """Set up basic logging + + Args: + :int:loglevel: minimum loglevel for emitting messages + """ + logformat = "%(message)s" + logging.basicConfig( + level=loglevel, + stream=sys.stdout, + format=logformat, + datefmt="", + ) + + +# ============================================================================== def main(): - """Organize includes in Kaleidoscpe source files.""" + """Main entry point function.""" + # Parse command-line arguments: + opts = parse_args(sys.argv[1:]) + # Set up logging system: + setup_logging(opts.loglevel) + # ---------------------------------------------------------------------- + # Find include-what-you-use: iwyu = shutil.which('include-what-you-use') - print(f'IWYU: {iwyu}') - iwyu_flags = [ - '-Xiwyu', '--no_fwd_decls', # No forward declarations - '-x', 'c++', + logging.info("Found `include-what-you-use` executable: %s", iwyu) + iwyu_opts = [ + '--no_fwd_decls', # No forward declarations + '--max_line_length=100', + '--update_comments', ] + # Prepend '-Xiwyu' to each `include-what-you-use` option: + iwyu_opts = [_ for opt in iwyu_opts for _ in ('-Xiwyu', opt)] + # ---------------------------------------------------------------------- + # Find fix_includes: fix_includes = shutil.which('fix_includes.py') - print(f'fix_includes: {fix_includes}') + logging.debug("Found `fix_includes` executable: %s", fix_includes) + # ---------------------------------------------------------------------- + # Find clang (first checking environment variable): clang = os.getenv('CLANG_COMPILER') if clang is None: clang = shutil.which('clang') - print(f'clang: {clang}') + logging.debug("Found `clang` executable: %s", clang) - result = subprocess.run([clang, '-print-resource-dir'], - capture_output=True, check=True) + # Get system include dir from `clang`: + clang_cmd = [clang, '-print-resource-dir'] + logging.debug("Running command: `%s`", shlex.join(clang_cmd)) + result = subprocess.run(clang_cmd, capture_output=True, check=True) clang_resource_dir = result.stdout.decode('utf-8').rstrip() system_include_dir = os.path.join(clang_resource_dir, 'include') + logging.debug("Using system include dir: %s", system_include_dir) + # ---------------------------------------------------------------------- + # Get $KALEIDOSCOPE_DIR from enironment, falling back on `pwd`: kaleidoscope_dir = os.getenv('KALEIDOSCOPE_DIR') if kaleidoscope_dir is None: kaleidoscope_dir = os.getcwd() + logging.debug("Using Kaleidoscope dir: %s", kaleidoscope_dir) kaleidoscope_src_dir = os.path.join(kaleidoscope_dir, 'src') - print(f'KALEIDOSCOPE_DIR: {kaleidoscope_dir}') + # Define locations of other dirs to find Arduino libraries: virtual_hardware_dir = os.path.join( - kaleidoscope_dir, '.arduino', 'user', 'hardware', 'keyboardio', 'virtual' - ) + kaleidoscope_dir, '.arduino', 'user', 'hardware', 'keyboardio', 'virtual') + logging.debug("Using virtual hardware dir: %s", virtual_hardware_dir) + virtual_arduino_core_dir = os.path.join(virtual_hardware_dir, 'cores', 'arduino') + logging.debug("Using virtual arduino core: %s", virtual_arduino_core_dir) + virtual_model01_dir = os.path.join(virtual_hardware_dir, 'variants', 'model01') - virtual_keyboardiohid_dir = os.path.join(virtual_hardware_dir, - 'libraries', 'KeyboardioHID', 'src') + logging.debug("Using virtual Model01 dir: %s", virtual_model01_dir) + + virtual_keyboardiohid_dir = os.path.join( + virtual_hardware_dir, 'libraries', 'KeyboardioHID', 'src') + logging.debug("Using virtual KeyboardioHID dir: %s", virtual_keyboardiohid_dir) - clang_flags = [ + # ---------------------------------------------------------------------- + # Create the long list of options passed to `clang` via `include-what-you-use`. + # First, we tell it we're using C++: + clang_opts = ['-x', 'c++'] + # General compiler options: + clang_opts += [ '-c', '-g', '-Wall', @@ -103,76 +225,197 @@ def main(): '-Wno-unused-variable', '-Wno-ignored-qualifiers', '-Wno-type-limits', - '-D' + 'KALEIDOSCOPE_VIRTUAL_BUILD=1', - '-D' + 'KEYBOARDIOHID_BUILD_WITHOUT_HID=1', - '-D' + 'USBCON=dummy', - '-D' + 'ARDUINO_ARCH_AVR=1', - '-D' + 'ARDUINO=10607', - '-D' + 'ARDUINO_AVR_MODEL01', - '-D' + 'ARDUINO_ARCH_VIRTUAL', - '-D' + 'USB_VID=0x1209', - '-D' + 'USB_PID=0x2301', - '-D' + 'USB_MANUFACTURER="Keyboardio"', - '-D' + 'USB_PRODUCT="Model 01"', - '-D' + 'KALEIDOSCOPE_HARDWARE_H="Kaleidoscope-Hardware-Keyboardio-Model01.h"', - '-D' + 'TWI_BUFFER_LENGTH=32', - '-I' + system_include_dir, - '-I' + kaleidoscope_src_dir, - '-I' + virtual_arduino_core_dir, - '-I' + virtual_model01_dir, - '-I' + virtual_keyboardiohid_dir, + '-Wno-pragma-once-outside-header', + ] + + # Variables we define to do a Kaleidoscope build: + defines = [ + 'KALEIDOSCOPE_VIRTUAL_BUILD=1', + 'KEYBOARDIOHID_BUILD_WITHOUT_HID=1', + 'USBCON=dummy', + 'ARDUINO_ARCH_AVR=1', + 'ARDUINO=10607', + 'ARDUINO_AVR_MODEL01', + 'ARDUINO_ARCH_VIRTUAL', + 'USB_VID=0x1209', + 'USB_PID=0x2301', + 'USB_MANUFACTURER="Keyboardio"', + 'USB_PRODUCT="Model 01"', + 'KALEIDOSCOPE_HARDWARE_H="Kaleidoscope-Hardware-Keyboardio-Model01.h"', + 'TWI_BUFFER_LENGTH=32', + ] + clang_opts += ['-D' + _ for _ in defines] + + # Directories to search for libraries to include: + includes = [ + system_include_dir, + kaleidoscope_src_dir, + virtual_arduino_core_dir, + virtual_model01_dir, + virtual_keyboardiohid_dir, + ] + # Include plugin source dirs for plugins that depend on other plugins: + includes += glob.glob(os.path.join(kaleidoscope_dir, 'plugins', '*', 'src')) + clang_opts += ['-I' + _ for _ in includes] + + # ---------------------------------------------------------------------- + # Define the `include-what-you-use` command (sans target files) + iwyu_cmd = [iwyu] + iwyu_opts + clang_opts + logging.debug("Using IWYU command: %s", ' \\\n\t'.join(iwyu_cmd)) + + fix_includes_cmd = [ + fix_includes, + '--update_comments', + '--nosafe_headers', + '--reorder', + '--separate_project_includes=' + kaleidoscope_src_dir, # Does this help? ] + logging.debug("Using `fix_includes` command: %s", ' \\\n\t'.join(fix_includes_cmd)) - plugins_dir = os.path.join(kaleidoscope_dir, 'plugins') - for basename in os.listdir(plugins_dir): - plugin_dir = os.path.join(plugins_dir, basename) - if not os.path.isdir(plugin_dir): + # ---------------------------------------------------------------------- + targets = opts.targets + # If stdin is a pipe, read pathname targets, one per line. This allows us to + # connect the output of `find` to our input conveniently: + if not sys.stdin.isatty(): + targets += sys.stdin.read().splitlines() + + # ---------------------------------------------------------------------- + iwyu_ignores_file = os.path.join(kaleidoscope_dir, opts.ignores_file) + ignores = build_ignores_list(iwyu_ignores_file) + + # ---------------------------------------------------------------------- + regex = re.compile(opts.regex) + exit_code = 0 + for src in (_ for t in targets for _ in build_target_list(t, regex)): + if src in ignores: + logging.info("Skipping ignored file: %s", os.path.relpath(src)) continue - clang_flags.append('-I' + os.path.join(plugin_dir, 'src')) - - for arg in [iwyu] + iwyu_flags: - print(arg) - for arg in clang_flags: - print(arg) - - for source_file in sys.argv[1:]: - iwyu_cmd = [iwyu] + iwyu_flags + clang_flags + [source_file] - print('------------------------------------------------------------') - print(f'File: {source_file}') - - # Sometimes, it's useful to force IWYU to make changes, or to have a - # more definitive marker of whether or not it failed due to compilation - # errors (which may differ between IWYU and normal compilation, - # unfortunately). If so, the follwing code can be uncommented. It adds - # a harmless `#include` at the end of the file, which will be removed if - # this script runs successfully. - - # with open(source_file, "rb+") as fd: - # fd.seek(-1, 2) - # char = fd.read(1) - # if char != b'\n': - # print('missing newline at end of file') - # fd.write(b'\n') - # if source_file != 'src/kaleidoscope/HIDTables.h': - # fd.write(b'#include "kaleidoscope/HIDTables.h"') - - iwyu_proc = subprocess.run(iwyu_cmd, capture_output=True, check=False) - - fix_includes_cmd = [ - fix_includes, - '--update_comments', - '--nosafe_headers', - # Don't change the order of headers in existing files, because some - # of them have been changed from what IWYU will do. For new files, - # use `--reorder` instead. - '--noreorder', - ] - subprocess.run(fix_includes_cmd, input=iwyu_proc.stderr, check=False) - - # Optionally, we can write the output of `include-what-you-use` to a - # file for debugging purposes: - # with open(source_file + '.iwyu', 'wb') as fd: - # fd.write(iwyu_proc.stderr) + if not run_iwyu(os.path.relpath(src), iwyu_cmd, fix_includes_cmd): + exit_code = 1 + return exit_code + + +# ============================================================================== +def build_target_list(path, src_regex): + """Docstring""" + logging.debug("Searching target: %s", path) + + # If the specified path is a filename, return it (as a list), regardless of + # whether or not it matches the regex. + if os.path.isfile(path): + return [path] + + # If the specified path is not valid, just return an empty list. + if not os.path.isdir(path): + logging.error("Error: File not found: %s", path) + return [] + + # The specified path is a directory, so we search recursively for files + # contained therein that match the specified regular expression. + targets = [] + for root, dirs, files in os.walk(os.path.abspath(path)): + logging.debug("Searching dir: %s", root) + # First, ignore all dotfiles (and directories). + dotfiles = set(glob.glob('.*')) + dirs = set(dirs) - dotfiles + files = set(files) - dotfiles + + logging.debug("Files found: %s", ', '.join(files)) + # Add all matching files to the list of source files to be formatted. + for f in filter(src_regex.search, files): + logging.debug("Source file found: %s", f) + targets.append(os.path.join(root, f)) + + return [os.path.abspath(_) for _ in targets] + + +# ============================================================================== +def build_ignores_list(ignores_file_path): + logging.debug("Searching for ignores file: %s", ignores_file_path) + # If the ignores file doesn't exist, return an empty list: + if not os.path.isfile(ignores_file_path): + logging.debug("Ignores file not found") + return [] + ignores_list = [] + with open(ignores_file_path) as f: + for line in f.read().splitlines(): + logging.debug("Ignoring files like: %s", line) + if line.startswith('#'): + continue + ignores_list += glob.glob(line, recursive=True) + ignores_file_dir = os.path.dirname(ignores_file_path) + with cwd(ignores_file_dir): + ignores_list[:] = [os.path.abspath(_) for _ in ignores_list] + logging.debug("Ignores list:\n\t%s", "\n\t".join(ignores_list)) + return ignores_list + + +# ------------------------------------------------------------------------------ +from contextlib import contextmanager + + +@contextmanager +def cwd(path): + """A simple function change directory, an automatically restore the previous working + directory when done, using `with cwd(temp_dir):`""" + old_wd = os.getcwd() + os.chdir(path) + try: + yield + finally: + os.chdir(old_wd) + + +# ============================================================================== +def run_iwyu(source_file, iwyu_cmd, fix_includes_cmd): + """Run `include-what-you-use` on , an update that file's header includes by + sending the output to `fix_includes.py`. If either command returns an error code, return + `False`, otherwise return `True`.""" + logging.info("Processing file: %s", source_file) + + # Run IWYU on + iwyu_proc = subprocess.run(iwyu_cmd + [source_file], capture_output=True, check=False) + + # If IWYU returns an error, report on it: + if iwyu_proc.returncode != 0: + logging.error("Error: failed to parse file: %s", source_file) + logging.debug("IWYU returned: %s", iwyu_proc.returncode) + logging.debug("STDOUT:\n%s", iwyu_proc.stdout.decode('utf-8')) + logging.debug("STDERR:\n%s", iwyu_proc.stderr.decode('utf-8')) + # In addition to reporting the error, save the output for analysis: + with open(source_file + '.iwyu', 'wb') as f: + f.write(iwyu_proc.stderr) + # Don't run fix_includes if there was an error (or if we've got an old version of IWYU + # that returns bogus exit codes): + return False + + # IWYU reports on the associated header of *.cpp files, but if we want to skip processing + # that header, we need to use only the part of the output for the *.cpp file. Fortunately, + # the header is listed first, so we only need to search for the start of the target file's + # section of the output. + n = iwyu_proc.stderr.find(f"\n{source_file} should".encode('utf-8')) + iwyu_stderr = iwyu_proc.stderr[n:] + + # Run fix_includes.py, using the output (stderr) of IWYU: + fix_includes_proc = subprocess.run( + fix_includes_cmd, input=iwyu_stderr, capture_output=True, check=False) + + # Report any errors returned by fix_includes.py: + if fix_includes_proc.returncode != 0: + logging.error("Error: failed to fix includes for file: %s", source_file) + logging.debug("fix_includes.py returned: %s", fix_includes_proc.returncode) + logging.debug("STDOUT:\n%s", fix_includes_proc.stdout.decode('utf-8')) + logging.debug("STDERR:\n%s", fix_includes_proc.stderr.decode('utf-8')) + return False + + # Return true on success, false otherwise: + return True + +# ============================================================================== if __name__ == "__main__": - main() + try: + sys.exit(main()) + except KeyboardInterrupt: + logging.info("Aborting") + sys.exit(1) diff --git a/docs/codebase/code-style.md b/docs/codebase/code-style.md index ca5a4fab..c5fea013 100644 --- a/docs/codebase/code-style.md +++ b/docs/codebase/code-style.md @@ -390,6 +390,10 @@ If a plugin library has symbols meant to be exported, and more than one header f #include "kaleidoscope/plugin/something/Helper.h" ``` +### Automated header includes checking + +We have an automated wrapper for the `include-what-you-use` program from LLVM that processes most Kaleidoscope source files and updates their header includes to comply with the style guide. It requires at least version 0.18 of `include-what-you-use` in order to function properly (because earlier versions do not return a useful exit code, so determining if there was an error was difficult). It can be run by using the `make check-includes` target in the Kaleidoscope Makefile. + ## Scoping diff --git a/plugins/Kaleidoscope-AutoShift/src/kaleidoscope/plugin/AutoShift.cpp b/plugins/Kaleidoscope-AutoShift/src/kaleidoscope/plugin/AutoShift.cpp index dd6bc9a4..f627eb28 100644 --- a/plugins/Kaleidoscope-AutoShift/src/kaleidoscope/plugin/AutoShift.cpp +++ b/plugins/Kaleidoscope-AutoShift/src/kaleidoscope/plugin/AutoShift.cpp @@ -21,7 +21,7 @@ #include "kaleidoscope/KeyEvent.h" // for KeyEvent #include "kaleidoscope/KeyEventTracker.h" // for KeyEventTracker #include "kaleidoscope/Runtime.h" // for Runtime, Runtime_ -#include "kaleidoscope/key_defs.h" // for Key, Key_0, Key_1, Key_A +#include "kaleidoscope/key_defs.h" // for Key, Key_0, Key_1, Key_A, Key_F1, Key_F12, Key... #include "kaleidoscope/keyswitch_state.h" // for keyToggledOn, keyIsInjected // IWYU pragma: no_include "HIDAliases.h" diff --git a/plugins/Kaleidoscope-AutoShift/src/kaleidoscope/plugin/AutoShiftConfig.cpp b/plugins/Kaleidoscope-AutoShift/src/kaleidoscope/plugin/AutoShiftConfig.cpp index d59309f1..ebf50aad 100644 --- a/plugins/Kaleidoscope-AutoShift/src/kaleidoscope/plugin/AutoShiftConfig.cpp +++ b/plugins/Kaleidoscope-AutoShift/src/kaleidoscope/plugin/AutoShiftConfig.cpp @@ -17,15 +17,14 @@ #include "kaleidoscope/plugin/AutoShift.h" // IWYU pragma: associated -#include // for PSTR, strcmp_P, str... +#include // for PSTR, strcmp_P, strncmp_P #include // for EEPROMSettings #include // for Focus, FocusSerial #include // for uint16_t, uint8_t -#include "kaleidoscope/Runtime.h" // for Runtime, Runtime_ -#include "kaleidoscope/device/Base.h" // for Base<>::Storage -#include "kaleidoscope/device/virtual/Virtual.h" // for VirtualProps::Storage -#include "kaleidoscope/event_handler_result.h" // for EventHandlerResult +#include "kaleidoscope/Runtime.h" // for Runtime, Runtime_ +#include "kaleidoscope/device/device.h" // for VirtualProps::Storage, Base<>::Storage +#include "kaleidoscope/event_handler_result.h" // for EventHandlerResult, EventHandlerResult::OK namespace kaleidoscope { namespace plugin { diff --git a/plugins/Kaleidoscope-CharShift/src/kaleidoscope/plugin/CharShift.cpp b/plugins/Kaleidoscope-CharShift/src/kaleidoscope/plugin/CharShift.cpp index 207a160c..1a20ce09 100644 --- a/plugins/Kaleidoscope-CharShift/src/kaleidoscope/plugin/CharShift.cpp +++ b/plugins/Kaleidoscope-CharShift/src/kaleidoscope/plugin/CharShift.cpp @@ -17,21 +17,20 @@ #include "kaleidoscope/plugin/CharShift.h" -#include // for F, __FlashS... -#include // for Focus, Focu... -#include // for CS_FIRST +#include // for F, __FlashStringHelper +#include // for Focus, FocusSerial +#include // for CS_FIRST, CS_LAST -#include "kaleidoscope/KeyAddrMap.h" // for KeyAddrMap<... +#include "kaleidoscope/KeyAddrMap.h" // for KeyAddrMap<>::Iterator, KeyAddrMap #include "kaleidoscope/KeyEvent.h" // for KeyEvent #include "kaleidoscope/KeyMap.h" // for KeyMap -#include "kaleidoscope/LiveKeys.h" // for LiveKeys -#include "kaleidoscope/Runtime.h" // for Runtime -#include "kaleidoscope/device/Base.h" // for Base<>::HID -#include "kaleidoscope/device/virtual/Virtual.h" // for VirtualProp... +#include "kaleidoscope/LiveKeys.h" // for LiveKeys, live_keys +#include "kaleidoscope/Runtime.h" // for Runtime, Runtime_ +#include "kaleidoscope/device/device.h" // for Base<>::HID, VirtualProps::HID #include "kaleidoscope/driver/hid/keyboardio/Keyboard.h" // for Keyboard -#include "kaleidoscope/key_defs.h" // for Key, Key_NoKey +#include "kaleidoscope/key_defs.h" // for Key, Key_NoKey, Key_LeftShift #include "kaleidoscope/keyswitch_state.h" // for keyToggledOff -#include "kaleidoscope/progmem_helpers.h" // for cloneFromPr... +#include "kaleidoscope/progmem_helpers.h" // for cloneFromProgmem namespace kaleidoscope { namespace plugin { diff --git a/plugins/Kaleidoscope-Colormap/src/kaleidoscope/plugin/Colormap.cpp b/plugins/Kaleidoscope-Colormap/src/kaleidoscope/plugin/Colormap.cpp index 5d565210..1af6f7a9 100644 --- a/plugins/Kaleidoscope-Colormap/src/kaleidoscope/plugin/Colormap.cpp +++ b/plugins/Kaleidoscope-Colormap/src/kaleidoscope/plugin/Colormap.cpp @@ -17,14 +17,14 @@ #include "kaleidoscope/plugin/Colormap.h" -#include // for F, PSTR, __FlashStrin... +#include // for F, PSTR, __FlashStringHelper #include // for Focus, FocusSerial #include // for LEDPaletteTheme #include // for uint8_t, uint16_t #include "kaleidoscope/KeyAddr.h" // for KeyAddr #include "kaleidoscope/Runtime.h" // for Runtime, Runtime_ -#include "kaleidoscope/event_handler_result.h" // for EventHandlerResult +#include "kaleidoscope/event_handler_result.h" // for EventHandlerResult, EventHandlerResult::OK #include "kaleidoscope/layers.h" // for Layer, Layer_ #include "kaleidoscope/plugin/LEDControl.h" // for LEDControl diff --git a/plugins/Kaleidoscope-Colormap/src/kaleidoscope/plugin/Colormap.h b/plugins/Kaleidoscope-Colormap/src/kaleidoscope/plugin/Colormap.h index 7e47877e..56d280da 100644 --- a/plugins/Kaleidoscope-Colormap/src/kaleidoscope/plugin/Colormap.h +++ b/plugins/Kaleidoscope-Colormap/src/kaleidoscope/plugin/Colormap.h @@ -17,14 +17,14 @@ #pragma once -#include // for uint8_t, uin... +#include // for uint8_t, uint16_t #include "kaleidoscope/KeyAddr.h" // for KeyAddr -#include "kaleidoscope/event_handler_result.h" // for EventHandler... +#include "kaleidoscope/event_handler_result.h" // for EventHandlerResult #include "kaleidoscope/plugin.h" // for Plugin -#include "kaleidoscope/plugin/AccessTransientLEDMode.h" // for AccessTransi... +#include "kaleidoscope/plugin/AccessTransientLEDMode.h" // for AccessTransientLEDMode #include "kaleidoscope/plugin/LEDMode.h" // for LEDMode -#include "kaleidoscope/plugin/LEDModeInterface.h" // for LEDModeInter... +#include "kaleidoscope/plugin/LEDModeInterface.h" // for LEDModeInterface namespace kaleidoscope { namespace plugin { diff --git a/plugins/Kaleidoscope-Cycle/src/kaleidoscope/plugin/Cycle.cpp b/plugins/Kaleidoscope-Cycle/src/kaleidoscope/plugin/Cycle.cpp index bb553e82..b8a04dc5 100644 --- a/plugins/Kaleidoscope-Cycle/src/kaleidoscope/plugin/Cycle.cpp +++ b/plugins/Kaleidoscope-Cycle/src/kaleidoscope/plugin/Cycle.cpp @@ -25,9 +25,9 @@ #include "kaleidoscope/KeyAddr.h" // for KeyAddr, MatrixAddr #include "kaleidoscope/KeyEvent.h" // for KeyEvent #include "kaleidoscope/Runtime.h" // for Runtime, Runtime_ -#include "kaleidoscope/event_handler_result.h" // for EventHandlerResult -#include "kaleidoscope/key_defs.h" // for Key, Key_Backspace -#include "kaleidoscope/keyswitch_state.h" // for INJECTED, IS_PRESSED +#include "kaleidoscope/event_handler_result.h" // for EventHandlerResult, EventHandlerResult::E... +#include "kaleidoscope/key_defs.h" // for Key, Key_Backspace, CTRL_HELD, GUI_HELD +#include "kaleidoscope/keyswitch_state.h" // for INJECTED, IS_PRESSED, WAS_PRESSED, keyTog... namespace kaleidoscope { namespace plugin { diff --git a/plugins/Kaleidoscope-CycleTimeReport/src/kaleidoscope/plugin/CycleTimeReport.cpp b/plugins/Kaleidoscope-CycleTimeReport/src/kaleidoscope/plugin/CycleTimeReport.cpp index 443d45fc..2e46812b 100644 --- a/plugins/Kaleidoscope-CycleTimeReport/src/kaleidoscope/plugin/CycleTimeReport.cpp +++ b/plugins/Kaleidoscope-CycleTimeReport/src/kaleidoscope/plugin/CycleTimeReport.cpp @@ -17,12 +17,12 @@ #include "kaleidoscope/plugin/CycleTimeReport.h" -#include // for micros, F, __FlashStr... +#include // for micros, F, __FlashStringHelper #include // for Focus, FocusSerial #include // for uint16_t, uint32_t #include "kaleidoscope/Runtime.h" // for Runtime, Runtime_ -#include "kaleidoscope/event_handler_result.h" // for EventHandlerResult +#include "kaleidoscope/event_handler_result.h" // for EventHandlerResult, EventHandlerResult::OK namespace kaleidoscope { namespace plugin { diff --git a/plugins/Kaleidoscope-Devel-ArduinoTrace/src/ArduinoTrace.h b/plugins/Kaleidoscope-Devel-ArduinoTrace/src/ArduinoTrace.h index 00edd99c..67dbb95a 100644 --- a/plugins/Kaleidoscope-Devel-ArduinoTrace/src/ArduinoTrace.h +++ b/plugins/Kaleidoscope-Devel-ArduinoTrace/src/ArduinoTrace.h @@ -17,9 +17,11 @@ #pragma once -#include // for PROGMEM, F +#include // for PROGMEM #include // for size_t +// IWYU pragma: no_include "WString.h" + #ifndef ARDUINOTRACE_ENABLE #define ARDUINOTRACE_ENABLE 1 #endif diff --git a/plugins/Kaleidoscope-Devel-ArduinoTrace/src/Kaleidoscope-Devel-ArduinoTrace.h b/plugins/Kaleidoscope-Devel-ArduinoTrace/src/Kaleidoscope-Devel-ArduinoTrace.h index ecd10ed7..7119e7bd 100644 --- a/plugins/Kaleidoscope-Devel-ArduinoTrace/src/Kaleidoscope-Devel-ArduinoTrace.h +++ b/plugins/Kaleidoscope-Devel-ArduinoTrace/src/Kaleidoscope-Devel-ArduinoTrace.h @@ -23,7 +23,8 @@ #endif #endif -#include "ArduinoTrace.h" // for ARDUINOTRACE_INIT #include // for DebugStderrSerial, DebugStderr +#include "ArduinoTrace.h" // for ARDUINOTRACE_INIT + ARDUINOTRACE_INIT(9600) diff --git a/plugins/Kaleidoscope-DynamicMacros/src/kaleidoscope/plugin/DynamicMacros.cpp b/plugins/Kaleidoscope-DynamicMacros/src/kaleidoscope/plugin/DynamicMacros.cpp index 28230a44..39fa0977 100644 --- a/plugins/Kaleidoscope-DynamicMacros/src/kaleidoscope/plugin/DynamicMacros.cpp +++ b/plugins/Kaleidoscope-DynamicMacros/src/kaleidoscope/plugin/DynamicMacros.cpp @@ -16,21 +16,20 @@ #include "kaleidoscope/plugin/DynamicMacros.h" -#include // for delay, PSTR, strc... +#include // for delay, PSTR, strcmp_P, F, __FlashStri... #include // for Focus, FocusSerial -#include // for DYNAMIC_MACRO_FIRST +#include // for DYNAMIC_MACRO_FIRST, DYNAMIC_MACRO_LAST #include "kaleidoscope/KeyAddr.h" // for KeyAddr #include "kaleidoscope/KeyEvent.h" // for KeyEvent #include "kaleidoscope/Runtime.h" // for Runtime, Runtime_ -#include "kaleidoscope/device/device.h" // for VirtualProps::Sto... -#include "kaleidoscope/keyswitch_state.h" // for INJECTED, IS_PRESSED +#include "kaleidoscope/device/device.h" // for VirtualProps::Storage, Base<>::Storage +#include "kaleidoscope/keyswitch_state.h" // for INJECTED, IS_PRESSED, WAS_PRESSED #include "kaleidoscope/plugin/EEPROM-Settings.h" // for EEPROMSettings - // This is a special exception to the rule of only including a plugin's // top-level header file, because DynamicMacros doesn't depend on the Macros // plugin itself; it's just using the same macro step definitions. -#include "kaleidoscope/plugin/Macros/MacroSteps.h" // for MACRO_ACTION_END +#include "kaleidoscope/plugin/Macros/MacroSteps.h" // for MACRO_ACTION_END, MACRO_ACTION_STEP_E... namespace kaleidoscope { namespace plugin { diff --git a/plugins/Kaleidoscope-DynamicTapDance/src/kaleidoscope/plugin/DynamicTapDance.cpp b/plugins/Kaleidoscope-DynamicTapDance/src/kaleidoscope/plugin/DynamicTapDance.cpp index 13675c0f..c445aec4 100644 --- a/plugins/Kaleidoscope-DynamicTapDance/src/kaleidoscope/plugin/DynamicTapDance.cpp +++ b/plugins/Kaleidoscope-DynamicTapDance/src/kaleidoscope/plugin/DynamicTapDance.cpp @@ -17,7 +17,7 @@ #include "kaleidoscope/plugin/DynamicTapDance.h" -#include // for PSTR, F, __FlashStrin... +#include // for PSTR, F, __FlashStringHelper, strcmp_P #include // for EEPROMSettings #include // for Focus, FocusSerial #include // for uint16_t, uint8_t @@ -25,11 +25,11 @@ #include "kaleidoscope/KeyAddr.h" // for KeyAddr #include "kaleidoscope/KeyEvent.h" // for KeyEvent #include "kaleidoscope/Runtime.h" // for Runtime, Runtime_ -#include "kaleidoscope/device/device.h" // for VirtualProps::Storage -#include "kaleidoscope/event_handler_result.h" // for EventHandlerResult +#include "kaleidoscope/device/device.h" // for VirtualProps::Storage, Base<>::Storage +#include "kaleidoscope/event_handler_result.h" // for EventHandlerResult, EventHandlerResult::OK #include "kaleidoscope/key_defs.h" // for Key, Key_NoKey #include "kaleidoscope/keyswitch_state.h" // for IS_PRESSED, WAS_PRESSED -#include "kaleidoscope/plugin/TapDance.h" // for TapDance, TapDance::A... +#include "kaleidoscope/plugin/TapDance.h" // for TapDance, TapDance::ActionType, TapDance:... namespace kaleidoscope { namespace plugin { diff --git a/plugins/Kaleidoscope-DynamicTapDance/src/kaleidoscope/plugin/DynamicTapDance.h b/plugins/Kaleidoscope-DynamicTapDance/src/kaleidoscope/plugin/DynamicTapDance.h index 0d8147d6..4fcc0794 100644 --- a/plugins/Kaleidoscope-DynamicTapDance/src/kaleidoscope/plugin/DynamicTapDance.h +++ b/plugins/Kaleidoscope-DynamicTapDance/src/kaleidoscope/plugin/DynamicTapDance.h @@ -18,7 +18,7 @@ #pragma once #include // for TD_FIRST, TD_LAST -#include // for TapDance, TapDance::A... +#include // for TapDance, TapDance::ActionType #include // for uint8_t, uint16_t #include "kaleidoscope/KeyAddr.h" // for KeyAddr diff --git a/plugins/Kaleidoscope-EEPROM-Keymap-Programmer/src/kaleidoscope/plugin/EEPROM-Keymap-Programmer.cpp b/plugins/Kaleidoscope-EEPROM-Keymap-Programmer/src/kaleidoscope/plugin/EEPROM-Keymap-Programmer.cpp index ea993e70..4dc7672f 100644 --- a/plugins/Kaleidoscope-EEPROM-Keymap-Programmer/src/kaleidoscope/plugin/EEPROM-Keymap-Programmer.cpp +++ b/plugins/Kaleidoscope-EEPROM-Keymap-Programmer/src/kaleidoscope/plugin/EEPROM-Keymap-Programmer.cpp @@ -25,10 +25,10 @@ #include "kaleidoscope/KeyAddr.h" // for KeyAddr #include "kaleidoscope/KeyEvent.h" // for KeyEvent #include "kaleidoscope/Runtime.h" // for Runtime, Runtime_ -#include "kaleidoscope/device/device.h" // for Device, Base<>::Storage -#include "kaleidoscope/event_handler_result.h" // for EventHandlerResult -#include "kaleidoscope/key_defs.h" // for Key, Key_0, Key_1 -#include "kaleidoscope/keyswitch_state.h" // for keyToggledOn, keyTogg... +#include "kaleidoscope/device/device.h" // for Device, Base<>::Storage, VirtualProps::St... +#include "kaleidoscope/event_handler_result.h" // for EventHandlerResult, EventHandlerResult::E... +#include "kaleidoscope/key_defs.h" // for Key, Key_0, Key_1, Key_NoKey +#include "kaleidoscope/keyswitch_state.h" // for keyToggledOn, keyToggledOff #include "kaleidoscope/layers.h" // for Layer, Layer_ namespace kaleidoscope { diff --git a/plugins/Kaleidoscope-EEPROM-Keymap/src/kaleidoscope/plugin/EEPROM-Keymap.cpp b/plugins/Kaleidoscope-EEPROM-Keymap/src/kaleidoscope/plugin/EEPROM-Keymap.cpp index 1493b0dc..be12dab7 100644 --- a/plugins/Kaleidoscope-EEPROM-Keymap/src/kaleidoscope/plugin/EEPROM-Keymap.cpp +++ b/plugins/Kaleidoscope-EEPROM-Keymap/src/kaleidoscope/plugin/EEPROM-Keymap.cpp @@ -17,17 +17,17 @@ #include "kaleidoscope/plugin/EEPROM-Keymap.h" -#include // for PSTR, strcmp_P, F +#include // for PSTR, strcmp_P, F, __FlashStringHelper #include // for EEPROMSettings #include // for Focus, FocusSerial #include // for uint8_t, uint16_t -#include "kaleidoscope/KeyAddr.h" // for KeyAddr, MatrixAddr +#include "kaleidoscope/KeyAddr.h" // for KeyAddr, MatrixAddr, MatrixAddr<>::Range #include "kaleidoscope/Runtime.h" // for Runtime, Runtime_ -#include "kaleidoscope/device/device.h" // for VirtualProps::Storage -#include "kaleidoscope/event_handler_result.h" // for EventHandlerResult +#include "kaleidoscope/device/device.h" // for VirtualProps::Storage, Device, Base<>::St... +#include "kaleidoscope/event_handler_result.h" // for EventHandlerResult, EventHandlerResult::OK #include "kaleidoscope/key_defs.h" // for Key, Key_NoKey -#include "kaleidoscope/layers.h" // for Layer_, Layer, layer_... +#include "kaleidoscope/layers.h" // for Layer_, Layer, layer_count namespace kaleidoscope { namespace plugin { diff --git a/plugins/Kaleidoscope-EEPROM-Settings/src/kaleidoscope/plugin/EEPROM-Settings.cpp b/plugins/Kaleidoscope-EEPROM-Settings/src/kaleidoscope/plugin/EEPROM-Settings.cpp index a8aef233..4aed20ce 100644 --- a/plugins/Kaleidoscope-EEPROM-Settings/src/kaleidoscope/plugin/EEPROM-Settings.cpp +++ b/plugins/Kaleidoscope-EEPROM-Settings/src/kaleidoscope/plugin/EEPROM-Settings.cpp @@ -17,15 +17,15 @@ #include "kaleidoscope/plugin/EEPROM-Settings.h" -#include // for PSTR, strcmp_P, F +#include // for PSTR, strcmp_P, F, __FlashStringHelper #include // for Focus, FocusSerial #include // for uint16_t, uint8_t #include "kaleidoscope/Runtime.h" // for Runtime, Runtime_ -#include "kaleidoscope/device/device.h" // for VirtualProps::S... -#include "kaleidoscope/event_handler_result.h" // for EventHandlerResult -#include "kaleidoscope/layers.h" // for Layer, Layer_ -#include "kaleidoscope/plugin/EEPROM-Settings/crc.h" // for CRCCalculator +#include "kaleidoscope/device/device.h" // for VirtualProps::Storage, Base<>::Storage +#include "kaleidoscope/event_handler_result.h" // for EventHandlerResult, EventHandlerRes... +#include "kaleidoscope/layers.h" // for Layer, Layer_, layer_count +#include "kaleidoscope/plugin/EEPROM-Settings/crc.h" // for CRCCalculator, CRC_ namespace kaleidoscope { namespace plugin { diff --git a/plugins/Kaleidoscope-Escape-OneShot/src/kaleidoscope/plugin/Escape-OneShot-Config.cpp b/plugins/Kaleidoscope-Escape-OneShot/src/kaleidoscope/plugin/Escape-OneShot-Config.cpp index c920ca4b..8b6aad0f 100644 --- a/plugins/Kaleidoscope-Escape-OneShot/src/kaleidoscope/plugin/Escape-OneShot-Config.cpp +++ b/plugins/Kaleidoscope-Escape-OneShot/src/kaleidoscope/plugin/Escape-OneShot-Config.cpp @@ -17,14 +17,14 @@ #include "kaleidoscope/plugin/Escape-OneShot.h" // IWYU pragma: associated -#include // for PSTR, F, __FlashStrin... +#include // for PSTR, F, __FlashStringHelper, strcmp_P #include // for EEPROMSettings #include // for Focus, FocusSerial #include // for uint16_t #include "kaleidoscope/Runtime.h" // for Runtime, Runtime_ -#include "kaleidoscope/device/device.h" // for VirtualProps::Storage -#include "kaleidoscope/event_handler_result.h" // for EventHandlerResult +#include "kaleidoscope/device/device.h" // for VirtualProps::Storage, Base<>::Storage +#include "kaleidoscope/event_handler_result.h" // for EventHandlerResult, EventHandlerResult::OK #include "kaleidoscope/key_defs.h" // for Key namespace kaleidoscope { diff --git a/plugins/Kaleidoscope-Escape-OneShot/src/kaleidoscope/plugin/Escape-OneShot.cpp b/plugins/Kaleidoscope-Escape-OneShot/src/kaleidoscope/plugin/Escape-OneShot.cpp index 02d5e8dc..1c7b9d96 100644 --- a/plugins/Kaleidoscope-Escape-OneShot/src/kaleidoscope/plugin/Escape-OneShot.cpp +++ b/plugins/Kaleidoscope-Escape-OneShot/src/kaleidoscope/plugin/Escape-OneShot.cpp @@ -20,9 +20,9 @@ #include // for OneShot #include "kaleidoscope/KeyEvent.h" // for KeyEvent -#include "kaleidoscope/event_handler_result.h" // for EventHandlerResult -#include "kaleidoscope/key_defs.h" // for Key, Key_Escape, Key_... -#include "kaleidoscope/keyswitch_state.h" // for keyIsInjected, keyTog... +#include "kaleidoscope/event_handler_result.h" // for EventHandlerResult, EventHandlerResult::E... +#include "kaleidoscope/key_defs.h" // for Key, Key_Escape, Key_NoKey +#include "kaleidoscope/keyswitch_state.h" // for keyIsInjected, keyToggledOn namespace kaleidoscope { namespace plugin { diff --git a/plugins/Kaleidoscope-FingerPainter/src/kaleidoscope/plugin/FingerPainter.cpp b/plugins/Kaleidoscope-FingerPainter/src/kaleidoscope/plugin/FingerPainter.cpp index c3399846..07511754 100644 --- a/plugins/Kaleidoscope-FingerPainter/src/kaleidoscope/plugin/FingerPainter.cpp +++ b/plugins/Kaleidoscope-FingerPainter/src/kaleidoscope/plugin/FingerPainter.cpp @@ -17,7 +17,7 @@ #include "kaleidoscope/plugin/FingerPainter.h" -#include // for PSTR, strcmp_P, F +#include // for PSTR, strcmp_P, F, __FlashStringHelper #include // for Focus, FocusSerial #include // for LEDPaletteTheme #include // for uint16_t, uint8_t @@ -26,8 +26,8 @@ #include "kaleidoscope/KeyAddr.h" // for KeyAddr #include "kaleidoscope/KeyEvent.h" // for KeyEvent #include "kaleidoscope/Runtime.h" // for Runtime, Runtime_ -#include "kaleidoscope/device/device.h" // for Device, cRGB, Virtual... -#include "kaleidoscope/event_handler_result.h" // for EventHandlerResult +#include "kaleidoscope/device/device.h" // for Device, cRGB, VirtualProps::Storage, Base... +#include "kaleidoscope/event_handler_result.h" // for EventHandlerResult, EventHandlerResult::OK #include "kaleidoscope/keyswitch_state.h" // for keyToggledOff namespace kaleidoscope { diff --git a/plugins/Kaleidoscope-FocusSerial/src/kaleidoscope/plugin/FocusSerial.cpp b/plugins/Kaleidoscope-FocusSerial/src/kaleidoscope/plugin/FocusSerial.cpp index b3c15c34..1c063297 100644 --- a/plugins/Kaleidoscope-FocusSerial/src/kaleidoscope/plugin/FocusSerial.cpp +++ b/plugins/Kaleidoscope-FocusSerial/src/kaleidoscope/plugin/FocusSerial.cpp @@ -17,13 +17,13 @@ #include "kaleidoscope/plugin/FocusSerial.h" -#include // for __FlashStringHelper, F +#include // for PSTR, __FlashStringHelper, F, strcmp_P #include // for HardwareSerial #include // for uint8_t #include // for memset #include "kaleidoscope/Runtime.h" // for Runtime, Runtime_ -#include "kaleidoscope/event_handler_result.h" // for EventHandlerResult +#include "kaleidoscope/event_handler_result.h" // for EventHandlerResult, EventHandlerResult::OK #include "kaleidoscope/hooks.h" // for Hooks #ifdef __AVR__ diff --git a/plugins/Kaleidoscope-FocusSerial/src/kaleidoscope/plugin/FocusSerial.h b/plugins/Kaleidoscope-FocusSerial/src/kaleidoscope/plugin/FocusSerial.h index 48db60b1..2c8c8bde 100644 --- a/plugins/Kaleidoscope-FocusSerial/src/kaleidoscope/plugin/FocusSerial.h +++ b/plugins/Kaleidoscope-FocusSerial/src/kaleidoscope/plugin/FocusSerial.h @@ -17,16 +17,18 @@ #pragma once -#include // for __FlashStringHelper +#include // for delayMicroseconds #include // for HardwareSerial #include // for uint8_t, uint16_t #include "kaleidoscope/Runtime.h" // for Runtime, Runtime_ #include "kaleidoscope/device/device.h" // for cRGB -#include "kaleidoscope/event_handler_result.h" // for EventHandlerResult +#include "kaleidoscope/event_handler_result.h" // for EventHandlerResult, EventHandlerResult::OK #include "kaleidoscope/key_defs.h" // for Key #include "kaleidoscope/plugin.h" // for Plugin +// IWYU pragma: no_include "WString.h" + namespace kaleidoscope { namespace plugin { class FocusSerial : public kaleidoscope::Plugin { diff --git a/plugins/Kaleidoscope-GhostInTheFirmware/src/kaleidoscope/plugin/GhostInTheFirmware.cpp b/plugins/Kaleidoscope-GhostInTheFirmware/src/kaleidoscope/plugin/GhostInTheFirmware.cpp index 38cfba9a..9d3c0dcd 100644 --- a/plugins/Kaleidoscope-GhostInTheFirmware/src/kaleidoscope/plugin/GhostInTheFirmware.cpp +++ b/plugins/Kaleidoscope-GhostInTheFirmware/src/kaleidoscope/plugin/GhostInTheFirmware.cpp @@ -22,7 +22,7 @@ #include "kaleidoscope/KeyAddr.h" // for KeyAddr #include "kaleidoscope/KeyEvent.h" // for KeyEvent #include "kaleidoscope/Runtime.h" // for Runtime, Runtime_ -#include "kaleidoscope/event_handler_result.h" // for EventHandlerResult +#include "kaleidoscope/event_handler_result.h" // for EventHandlerResult, EventHandlerResult::OK #include "kaleidoscope/keyswitch_state.h" // for IS_PRESSED, WAS_PRESSED #include "kaleidoscope/progmem_helpers.h" // for loadFromProgmem diff --git a/plugins/Kaleidoscope-Hardware-GD32-Eval/src/kaleidoscope/device/gd32/Eval.h b/plugins/Kaleidoscope-Hardware-GD32-Eval/src/kaleidoscope/device/gd32/Eval.h index 5a7ab84c..560a5e40 100644 --- a/plugins/Kaleidoscope-Hardware-GD32-Eval/src/kaleidoscope/device/gd32/Eval.h +++ b/plugins/Kaleidoscope-Hardware-GD32-Eval/src/kaleidoscope/device/gd32/Eval.h @@ -22,10 +22,10 @@ #include #include "kaleidoscope/device/Base.h" -#include "kaleidoscope/driver/hid/Keyboardio.h" -#include "kaleidoscope/driver/storage/GD32Flash.h" #include "kaleidoscope/driver/bootloader/gd32/Base.h" +#include "kaleidoscope/driver/hid/Keyboardio.h" #include "kaleidoscope/driver/mcu/GD32.h" +#include "kaleidoscope/driver/storage/GD32Flash.h" namespace kaleidoscope { namespace device { diff --git a/plugins/Kaleidoscope-Hardware-Keyboardio-Model01/src/kaleidoscope/device/keyboardio/Model01.cpp b/plugins/Kaleidoscope-Hardware-Keyboardio-Model01/src/kaleidoscope/device/keyboardio/Model01.cpp index bb5d5c5b..7e24ed43 100644 --- a/plugins/Kaleidoscope-Hardware-Keyboardio-Model01/src/kaleidoscope/device/keyboardio/Model01.cpp +++ b/plugins/Kaleidoscope-Hardware-Keyboardio-Model01/src/kaleidoscope/device/keyboardio/Model01.cpp @@ -19,11 +19,10 @@ #include "kaleidoscope/device/keyboardio/Model01.h" -// System headers -#include // for uint8_t - // Arduino headers #include // for PROGMEM +// System headers +#include // for uint8_t #ifndef KALEIDOSCOPE_VIRTUAL_BUILD #include @@ -32,9 +31,10 @@ // Kaleidoscope headers #include "kaleidoscope/driver/keyscanner/Base_Impl.h" // IWYU pragma: keep +// IWYU pragma: no_include "kaleidoscope/device/device.h" // Kaleidoscope-Hardware-Keyboardio-Model01 headers -#include "kaleidoscope/driver/keyboardio/Model01Side.h" +#include "kaleidoscope/driver/keyboardio/Model01Side.h" // IWYU pragma: keep namespace kaleidoscope { namespace device { diff --git a/plugins/Kaleidoscope-Hardware-Keyboardio-Model01/src/kaleidoscope/device/keyboardio/Model01.h b/plugins/Kaleidoscope-Hardware-Keyboardio-Model01/src/kaleidoscope/device/keyboardio/Model01.h index cbd6d6a8..680f31a0 100644 --- a/plugins/Kaleidoscope-Hardware-Keyboardio-Model01/src/kaleidoscope/device/keyboardio/Model01.h +++ b/plugins/Kaleidoscope-Hardware-Keyboardio-Model01/src/kaleidoscope/device/keyboardio/Model01.h @@ -21,14 +21,16 @@ #ifdef ARDUINO_AVR_MODEL01 -// System headers -#include // for uint8_t // Arduino headers #include // for PROGMEM +// System headers +#include // for uint8_t +#include "kaleidoscope/MatrixAddr.h" // IWYU pragma: keep // Kaleidoscope headers -#include "kaleidoscope/MatrixAddr.h" // for MatrixAddr -#include "kaleidoscope/macro_helpers.h" // for RESTRICT_AR... +#include "kaleidoscope/macro_helpers.h" // for RESTRICT_ARGS_COUNT + +// IWYU pragma: no_include "kaleidoscope/KeyAddr.h" #define CRGB(r, g, b) \ (cRGB) { b, g, r } @@ -39,13 +41,12 @@ struct cRGB { uint8_t r; }; -#include "kaleidoscope/device/ATmega32U4Keyboard.h" // for ATmega32U4K... +#include "kaleidoscope/device/ATmega32U4Keyboard.h" // for ATmega32U4KeyboardProps, EXPORT... #include "kaleidoscope/driver/bootloader/avr/Caterina.h" // for Caterina -#include "kaleidoscope/driver/keyscanner/Base.h" // for BaseProps -#include "kaleidoscope/driver/led/Base.h" // for BaseProps - // Kaleidoscope-Hardware-Keyboardio-Model01 headers #include "kaleidoscope/driver/keyboardio/Model01Side.h" // for keydata_t +#include "kaleidoscope/driver/keyscanner/Base.h" // for BaseProps +#include "kaleidoscope/driver/led/Base.h" // for BaseProps namespace kaleidoscope { namespace device { diff --git a/plugins/Kaleidoscope-Hardware-Keyboardio-Model100/src/kaleidoscope/device/keyboardio/Model100.h b/plugins/Kaleidoscope-Hardware-Keyboardio-Model100/src/kaleidoscope/device/keyboardio/Model100.h index 5e666c45..a66579b8 100644 --- a/plugins/Kaleidoscope-Hardware-Keyboardio-Model100/src/kaleidoscope/device/keyboardio/Model100.h +++ b/plugins/Kaleidoscope-Hardware-Keyboardio-Model100/src/kaleidoscope/device/keyboardio/Model100.h @@ -42,8 +42,8 @@ struct cRGB { #include "kaleidoscope/driver/keyboardio/Model100Side.h" #include "kaleidoscope/driver/keyscanner/Base.h" #include "kaleidoscope/driver/led/Base.h" -#include "kaleidoscope/driver/storage/GD32Flash.h" #include "kaleidoscope/driver/mcu/GD32.h" +#include "kaleidoscope/driver/storage/GD32Flash.h" namespace kaleidoscope { diff --git a/plugins/Kaleidoscope-Hardware-Model01/src/Kaleidoscope-Hardware-Model01.h b/plugins/Kaleidoscope-Hardware-Model01/src/Kaleidoscope-Hardware-Model01.h index 6b4a1c37..e88cbcbe 100644 --- a/plugins/Kaleidoscope-Hardware-Model01/src/Kaleidoscope-Hardware-Model01.h +++ b/plugins/Kaleidoscope-Hardware-Model01/src/Kaleidoscope-Hardware-Model01.h @@ -17,4 +17,4 @@ #pragma once -#include "Kaleidoscope-Hardware-Keyboardio-Model01.h" +#include "Kaleidoscope-Hardware-Keyboardio-Model01.h" // IWYU pragma: keep diff --git a/plugins/Kaleidoscope-HardwareTestMode/src/kaleidoscope/plugin/HardwareTestMode.cpp b/plugins/Kaleidoscope-HardwareTestMode/src/kaleidoscope/plugin/HardwareTestMode.cpp index 6f0d9436..a3f25ccb 100644 --- a/plugins/Kaleidoscope-HardwareTestMode/src/kaleidoscope/plugin/HardwareTestMode.cpp +++ b/plugins/Kaleidoscope-HardwareTestMode/src/kaleidoscope/plugin/HardwareTestMode.cpp @@ -18,9 +18,9 @@ #include // for uint8_t -#include "kaleidoscope/KeyAddr.h" // for MatrixAddr -#include "kaleidoscope/Runtime.h" // for Runtime -#include "kaleidoscope/device/device.h" // for Device, cRGB +#include "kaleidoscope/KeyAddr.h" // for MatrixAddr, MatrixAddr<>::Range +#include "kaleidoscope/Runtime.h" // for Runtime, Runtime_ +#include "kaleidoscope/device/device.h" // for Device, cRGB, CRGB, Base<>::HID #include "kaleidoscope/driver/hid/keyboardio/Keyboard.h" // for Keyboard #include "kaleidoscope/plugin/LEDControl.h" // for LEDControl #include "kaleidoscope/plugin/LEDControl/LEDUtils.h" // for hsvToRgb diff --git a/plugins/Kaleidoscope-Heatmap/src/kaleidoscope/plugin/Heatmap.cpp b/plugins/Kaleidoscope-Heatmap/src/kaleidoscope/plugin/Heatmap.cpp index 74abad5e..2f31cb90 100644 --- a/plugins/Kaleidoscope-Heatmap/src/kaleidoscope/plugin/Heatmap.cpp +++ b/plugins/Kaleidoscope-Heatmap/src/kaleidoscope/plugin/Heatmap.cpp @@ -18,14 +18,14 @@ #include "kaleidoscope/plugin/Heatmap.h" #include // for pgm_read_byte, PROGMEM -#include // for uint16_t, uint8_t +#include // for uint16_t, uint8_t, INT16_MAX -#include "kaleidoscope/KeyAddr.h" // for MatrixAddr, MatrixAdd... +#include "kaleidoscope/KeyAddr.h" // for MatrixAddr, MatrixAddr<>::Range, KeyAddr #include "kaleidoscope/KeyEvent.h" // for KeyEvent #include "kaleidoscope/Runtime.h" // for Runtime, Runtime_ #include "kaleidoscope/device/device.h" // for cRGB -#include "kaleidoscope/event_handler_result.h" // for EventHandlerResult -#include "kaleidoscope/keyswitch_state.h" // for keyIsInjected, keyTog... +#include "kaleidoscope/event_handler_result.h" // for EventHandlerResult, EventHandlerResult::OK +#include "kaleidoscope/keyswitch_state.h" // for keyIsInjected, keyToggledOn #include "kaleidoscope/plugin/LEDControl.h" // for LEDControl namespace kaleidoscope { diff --git a/plugins/Kaleidoscope-Heatmap/src/kaleidoscope/plugin/Heatmap.h b/plugins/Kaleidoscope-Heatmap/src/kaleidoscope/plugin/Heatmap.h index 24b92c2d..90be4c79 100644 --- a/plugins/Kaleidoscope-Heatmap/src/kaleidoscope/plugin/Heatmap.h +++ b/plugins/Kaleidoscope-Heatmap/src/kaleidoscope/plugin/Heatmap.h @@ -17,16 +17,16 @@ #pragma once -#include // for uint16_t +#include // for uint16_t, uint8_t #include "kaleidoscope/KeyEvent.h" // for KeyEvent -#include "kaleidoscope/Runtime.h" // for Runtime, Run... +#include "kaleidoscope/Runtime.h" // for Runtime, Runtime_ #include "kaleidoscope/device/device.h" // for cRGB, Device -#include "kaleidoscope/event_handler_result.h" // for EventHandler... +#include "kaleidoscope/event_handler_result.h" // for EventHandlerResult #include "kaleidoscope/plugin.h" // for Plugin -#include "kaleidoscope/plugin/AccessTransientLEDMode.h" // for AccessTransi... +#include "kaleidoscope/plugin/AccessTransientLEDMode.h" // for AccessTransientLEDMode #include "kaleidoscope/plugin/LEDMode.h" // for LEDMode -#include "kaleidoscope/plugin/LEDModeInterface.h" // for LEDModeInter... +#include "kaleidoscope/plugin/LEDModeInterface.h" // for LEDModeInterface namespace kaleidoscope { namespace plugin { diff --git a/plugins/Kaleidoscope-HostOS/src/kaleidoscope/plugin/HostOS-Focus.cpp b/plugins/Kaleidoscope-HostOS/src/kaleidoscope/plugin/HostOS-Focus.cpp index 58d60ba4..fc6e99f3 100644 --- a/plugins/Kaleidoscope-HostOS/src/kaleidoscope/plugin/HostOS-Focus.cpp +++ b/plugins/Kaleidoscope-HostOS/src/kaleidoscope/plugin/HostOS-Focus.cpp @@ -21,7 +21,7 @@ #include // for Focus, FocusSerial #include // for uint8_t -#include "kaleidoscope/event_handler_result.h" // for EventHandlerResult +#include "kaleidoscope/event_handler_result.h" // for EventHandlerResult, EventHandlerResult::OK #include "kaleidoscope/plugin/HostOS.h" // for HostOS, Type namespace kaleidoscope { diff --git a/plugins/Kaleidoscope-HostOS/src/kaleidoscope/plugin/HostOS.cpp b/plugins/Kaleidoscope-HostOS/src/kaleidoscope/plugin/HostOS.cpp index 4eb9dc86..52dd0f2d 100644 --- a/plugins/Kaleidoscope-HostOS/src/kaleidoscope/plugin/HostOS.cpp +++ b/plugins/Kaleidoscope-HostOS/src/kaleidoscope/plugin/HostOS.cpp @@ -20,8 +20,8 @@ #include // for EEPROMSettings #include "kaleidoscope/Runtime.h" // for Runtime, Runtime_ -#include "kaleidoscope/device/device.h" // for VirtualProps::Storage -#include "kaleidoscope/event_handler_result.h" // for EventHandlerResult +#include "kaleidoscope/device/device.h" // for VirtualProps::Storage, Base<>::Storage +#include "kaleidoscope/event_handler_result.h" // for EventHandlerResult, EventHandlerResult::OK namespace kaleidoscope { namespace plugin { diff --git a/plugins/Kaleidoscope-HostPowerManagement/src/kaleidoscope/plugin/HostPowerManagement.cpp b/plugins/Kaleidoscope-HostPowerManagement/src/kaleidoscope/plugin/HostPowerManagement.cpp index 8a2b8fa8..d28f5d85 100644 --- a/plugins/Kaleidoscope-HostPowerManagement/src/kaleidoscope/plugin/HostPowerManagement.cpp +++ b/plugins/Kaleidoscope-HostPowerManagement/src/kaleidoscope/plugin/HostPowerManagement.cpp @@ -20,7 +20,7 @@ #include // IWYU pragma: keep #include // for uint8_t -#include "kaleidoscope/event_handler_result.h" // for EventHandlerResult +#include "kaleidoscope/event_handler_result.h" // for EventHandlerResult, EventHandlerResult::OK // This is a terrible hack until Arduino#6964 gets implemented. // It makes the `_usbSuspendState` symbol available to us. diff --git a/plugins/Kaleidoscope-IdleLEDs/src/kaleidoscope/plugin/IdleLEDs.cpp b/plugins/Kaleidoscope-IdleLEDs/src/kaleidoscope/plugin/IdleLEDs.cpp index 9d1d1b36..7a30b3a7 100644 --- a/plugins/Kaleidoscope-IdleLEDs/src/kaleidoscope/plugin/IdleLEDs.cpp +++ b/plugins/Kaleidoscope-IdleLEDs/src/kaleidoscope/plugin/IdleLEDs.cpp @@ -18,15 +18,15 @@ #include "kaleidoscope/plugin/IdleLEDs.h" -#include // for F, PSTR, __FlashStrin... +#include // for F, PSTR, __FlashStringHelper, strcmp_P #include // for EEPROMSettings #include // for Focus, FocusSerial #include // for uint32_t, uint16_t #include "kaleidoscope/KeyEvent.h" // for KeyEvent #include "kaleidoscope/Runtime.h" // for Runtime, Runtime_ -#include "kaleidoscope/device/device.h" // for VirtualProps::Storage -#include "kaleidoscope/event_handler_result.h" // for EventHandlerResult +#include "kaleidoscope/device/device.h" // for VirtualProps::Storage, Base<>::Storage +#include "kaleidoscope/event_handler_result.h" // for EventHandlerResult, EventHandlerResult::OK #include "kaleidoscope/plugin/LEDControl.h" // for LEDControl namespace kaleidoscope { diff --git a/plugins/Kaleidoscope-LED-ActiveLayerColor/src/kaleidoscope/plugin/LED-ActiveLayerColor.cpp b/plugins/Kaleidoscope-LED-ActiveLayerColor/src/kaleidoscope/plugin/LED-ActiveLayerColor.cpp index 4e7f8ab7..691b3018 100644 --- a/plugins/Kaleidoscope-LED-ActiveLayerColor/src/kaleidoscope/plugin/LED-ActiveLayerColor.cpp +++ b/plugins/Kaleidoscope-LED-ActiveLayerColor/src/kaleidoscope/plugin/LED-ActiveLayerColor.cpp @@ -22,7 +22,7 @@ #include "kaleidoscope/KeyAddr.h" // for KeyAddr #include "kaleidoscope/Runtime.h" // for Runtime, Runtime_ -#include "kaleidoscope/event_handler_result.h" // for EventHandlerResult +#include "kaleidoscope/event_handler_result.h" // for EventHandlerResult, EventHandlerResult::OK #include "kaleidoscope/layers.h" // for Layer, Layer_ #include "kaleidoscope/plugin/LEDControl.h" // for LEDControl diff --git a/plugins/Kaleidoscope-LED-ActiveLayerColor/src/kaleidoscope/plugin/LED-ActiveLayerColor.h b/plugins/Kaleidoscope-LED-ActiveLayerColor/src/kaleidoscope/plugin/LED-ActiveLayerColor.h index 927c6d51..d6e00c84 100644 --- a/plugins/Kaleidoscope-LED-ActiveLayerColor/src/kaleidoscope/plugin/LED-ActiveLayerColor.h +++ b/plugins/Kaleidoscope-LED-ActiveLayerColor/src/kaleidoscope/plugin/LED-ActiveLayerColor.h @@ -19,11 +19,11 @@ #include "kaleidoscope/KeyAddr.h" // for KeyAddr #include "kaleidoscope/device/device.h" // for cRGB -#include "kaleidoscope/event_handler_result.h" // for EventHandler... +#include "kaleidoscope/event_handler_result.h" // for EventHandlerResult #include "kaleidoscope/plugin.h" // for Plugin -#include "kaleidoscope/plugin/AccessTransientLEDMode.h" // for AccessTransi... +#include "kaleidoscope/plugin/AccessTransientLEDMode.h" // for AccessTransientLEDMode #include "kaleidoscope/plugin/LEDMode.h" // for LEDMode -#include "kaleidoscope/plugin/LEDModeInterface.h" // for LEDModeInter... +#include "kaleidoscope/plugin/LEDModeInterface.h" // for LEDModeInterface namespace kaleidoscope { namespace plugin { diff --git a/plugins/Kaleidoscope-LED-ActiveModColor/src/kaleidoscope/plugin/LED-ActiveModColor.cpp b/plugins/Kaleidoscope-LED-ActiveModColor/src/kaleidoscope/plugin/LED-ActiveModColor.cpp index 3a8bec01..5675224c 100644 --- a/plugins/Kaleidoscope-LED-ActiveModColor/src/kaleidoscope/plugin/LED-ActiveModColor.cpp +++ b/plugins/Kaleidoscope-LED-ActiveModColor/src/kaleidoscope/plugin/LED-ActiveModColor.cpp @@ -20,13 +20,13 @@ #include // for OneShot #include // for OneShot_ActiveStickyKey -#include "kaleidoscope/KeyAddr.h" // for KeyAddr, MatrixAddr -#include "kaleidoscope/KeyAddrBitfield.h" // for KeyAddrBitfield, KeyA... +#include "kaleidoscope/KeyAddr.h" // for KeyAddr, MatrixAddr, MatrixAddr<>::Range +#include "kaleidoscope/KeyAddrBitfield.h" // for KeyAddrBitfield, KeyAddrBitfield::Iterator #include "kaleidoscope/KeyEvent.h" // for KeyEvent #include "kaleidoscope/LiveKeys.h" // for LiveKeys, live_keys #include "kaleidoscope/device/device.h" // for CRGB, cRGB -#include "kaleidoscope/event_handler_result.h" // for EventHandlerResult -#include "kaleidoscope/key_defs.h" // for Key, Key_Inactive +#include "kaleidoscope/event_handler_result.h" // for EventHandlerResult, EventHandlerResult::OK +#include "kaleidoscope/key_defs.h" // for Key, Key_Inactive, Key_Masked #include "kaleidoscope/keyswitch_state.h" // for keyToggledOn #include "kaleidoscope/plugin/LEDControl.h" // for LEDControl diff --git a/plugins/Kaleidoscope-LED-AlphaSquare/src/kaleidoscope/plugin/LED-AlphaSquare.cpp b/plugins/Kaleidoscope-LED-AlphaSquare/src/kaleidoscope/plugin/LED-AlphaSquare.cpp index 05a5b378..6caee055 100644 --- a/plugins/Kaleidoscope-LED-AlphaSquare/src/kaleidoscope/plugin/LED-AlphaSquare.cpp +++ b/plugins/Kaleidoscope-LED-AlphaSquare/src/kaleidoscope/plugin/LED-AlphaSquare.cpp @@ -17,16 +17,15 @@ #include "kaleidoscope/plugin/LED-AlphaSquare.h" -#include // for bitRead -#include // for uint16_t - -#include "kaleidoscope/KeyAddr.h" // for KeyAddr -#include "kaleidoscope/Runtime.h" // for Runtime -#include "kaleidoscope/device/device.h" // for cRGB -#include "kaleidoscope/key_defs.h" // for Key, Key_A -#include "kaleidoscope/plugin/LEDControl.h" // for LEDControl - -#include "kaleidoscope/plugin/LED-AlphaSquare/Font-4x4.h" // for ALPHASQUAR... +#include // for bitRead, pgm_read_word, PROGMEM +#include // for uint16_t, uint8_t + +#include "kaleidoscope/KeyAddr.h" // for KeyAddr, MatrixAddr +#include "kaleidoscope/Runtime.h" // for Runtime, Runtime_ +#include "kaleidoscope/device/device.h" // for cRGB +#include "kaleidoscope/key_defs.h" // for Key, Key_A, Key_0 +#include "kaleidoscope/plugin/LED-AlphaSquare/Font-4x4.h" // for ALPHASQUARE_SYMBOL_0, ALPHASQU... +#include "kaleidoscope/plugin/LEDControl.h" // for LEDControl namespace kaleidoscope { namespace plugin { diff --git a/plugins/Kaleidoscope-LED-AlphaSquare/src/kaleidoscope/plugin/LED-AlphaSquare.h b/plugins/Kaleidoscope-LED-AlphaSquare/src/kaleidoscope/plugin/LED-AlphaSquare.h index 73c7f5ab..4cd28035 100644 --- a/plugins/Kaleidoscope-LED-AlphaSquare/src/kaleidoscope/plugin/LED-AlphaSquare.h +++ b/plugins/Kaleidoscope-LED-AlphaSquare/src/kaleidoscope/plugin/LED-AlphaSquare.h @@ -19,11 +19,10 @@ #include // for uint16_t, uint8_t -#include "kaleidoscope/KeyAddr.h" // for KeyAddr -#include "kaleidoscope/key_defs.h" // for Key -#include "kaleidoscope/plugin.h" // for Plugin - -struct cRGB; +#include "kaleidoscope/KeyAddr.h" // for KeyAddr +#include "kaleidoscope/device/device.h" // for cRGB +#include "kaleidoscope/key_defs.h" // for Key +#include "kaleidoscope/plugin.h" // for Plugin // clang-format off #define SYM4x4( \ diff --git a/plugins/Kaleidoscope-LED-AlphaSquare/src/kaleidoscope/plugin/LED-AlphaSquare/Effect.cpp b/plugins/Kaleidoscope-LED-AlphaSquare/src/kaleidoscope/plugin/LED-AlphaSquare/Effect.cpp index 1a328c83..3d2f6e6a 100644 --- a/plugins/Kaleidoscope-LED-AlphaSquare/src/kaleidoscope/plugin/LED-AlphaSquare/Effect.cpp +++ b/plugins/Kaleidoscope-LED-AlphaSquare/src/kaleidoscope/plugin/LED-AlphaSquare/Effect.cpp @@ -19,16 +19,15 @@ #include // for uint16_t, uint8_t -#include "kaleidoscope/KeyAddr.h" // for KeyAddr -#include "kaleidoscope/KeyEvent.h" // for KeyEvent -#include "kaleidoscope/Runtime.h" // for Runtime, Runtime_ -#include "kaleidoscope/device/device.h" // for Device, CRGB -#include "kaleidoscope/event_handler_result.h" // for EventHandlerResult -#include "kaleidoscope/key_defs.h" // for Key, Key_NoKey, Key_0 -#include "kaleidoscope/keyswitch_state.h" // for keyIsInjected -#include "kaleidoscope/plugin/LEDControl.h" // for LEDControl - +#include "kaleidoscope/KeyAddr.h" // for KeyAddr +#include "kaleidoscope/KeyEvent.h" // for KeyEvent +#include "kaleidoscope/Runtime.h" // for Runtime, Runtime_ +#include "kaleidoscope/device/device.h" // for Device, CRGB +#include "kaleidoscope/event_handler_result.h" // for EventHandlerResult, EventHandlerResult::OK +#include "kaleidoscope/key_defs.h" // for Key, Key_NoKey, Key_0, Key_A +#include "kaleidoscope/keyswitch_state.h" // for keyIsInjected #include "kaleidoscope/plugin/LED-AlphaSquare.h" // for AlphaSquare +#include "kaleidoscope/plugin/LEDControl.h" // for LEDControl namespace kaleidoscope { namespace plugin { diff --git a/plugins/Kaleidoscope-LED-AlphaSquare/src/kaleidoscope/plugin/LED-AlphaSquare/Effect.h b/plugins/Kaleidoscope-LED-AlphaSquare/src/kaleidoscope/plugin/LED-AlphaSquare/Effect.h index 440fcd3f..4ef84662 100644 --- a/plugins/Kaleidoscope-LED-AlphaSquare/src/kaleidoscope/plugin/LED-AlphaSquare/Effect.h +++ b/plugins/Kaleidoscope-LED-AlphaSquare/src/kaleidoscope/plugin/LED-AlphaSquare/Effect.h @@ -21,12 +21,12 @@ #include "kaleidoscope/KeyAddr.h" // for KeyAddr #include "kaleidoscope/KeyEvent.h" // for KeyEvent -#include "kaleidoscope/event_handler_result.h" // for EventHandler... +#include "kaleidoscope/event_handler_result.h" // for EventHandlerResult #include "kaleidoscope/key_defs.h" // for Key #include "kaleidoscope/plugin.h" // for Plugin -#include "kaleidoscope/plugin/AccessTransientLEDMode.h" // for AccessTransi... +#include "kaleidoscope/plugin/AccessTransientLEDMode.h" // for AccessTransientLEDMode #include "kaleidoscope/plugin/LEDMode.h" // for LEDMode -#include "kaleidoscope/plugin/LEDModeInterface.h" // for LEDModeInter... +#include "kaleidoscope/plugin/LEDModeInterface.h" // for LEDModeInterface namespace kaleidoscope { namespace plugin { diff --git a/plugins/Kaleidoscope-LED-Palette-Theme/src/kaleidoscope/plugin/LED-Palette-Theme.cpp b/plugins/Kaleidoscope-LED-Palette-Theme/src/kaleidoscope/plugin/LED-Palette-Theme.cpp index fb2cf695..13cbd3b1 100644 --- a/plugins/Kaleidoscope-LED-Palette-Theme/src/kaleidoscope/plugin/LED-Palette-Theme.cpp +++ b/plugins/Kaleidoscope-LED-Palette-Theme/src/kaleidoscope/plugin/LED-Palette-Theme.cpp @@ -24,9 +24,8 @@ #include "kaleidoscope/KeyAddr.h" // for KeyAddr #include "kaleidoscope/Runtime.h" // for Runtime, Runtime_ -#include "kaleidoscope/device/Base.h" // for Base<>::Storage -#include "kaleidoscope/device/device.h" // for cRGB, VirtualProps::S... -#include "kaleidoscope/event_handler_result.h" // for EventHandlerResult +#include "kaleidoscope/device/device.h" // for cRGB, VirtualProps::Storage, Device, Base... +#include "kaleidoscope/event_handler_result.h" // for EventHandlerResult, EventHandlerResult::OK #include "kaleidoscope/plugin/LEDControl.h" // for LEDControl namespace kaleidoscope { diff --git a/plugins/Kaleidoscope-LED-Stalker/src/kaleidoscope/plugin/LED-Stalker.cpp b/plugins/Kaleidoscope-LED-Stalker/src/kaleidoscope/plugin/LED-Stalker.cpp index 117745b9..4cbad4d0 100644 --- a/plugins/Kaleidoscope-LED-Stalker/src/kaleidoscope/plugin/LED-Stalker.cpp +++ b/plugins/Kaleidoscope-LED-Stalker/src/kaleidoscope/plugin/LED-Stalker.cpp @@ -18,13 +18,13 @@ #include "kaleidoscope/plugin/LED-Stalker.h" #include // for min -#include // for uint8_t, uint16_t +#include // for uint8_t, uint16_t, uint32_t -#include "kaleidoscope/KeyAddr.h" // for MatrixAddr, Key... +#include "kaleidoscope/KeyAddr.h" // for MatrixAddr, KeyAddr, MatrixAddr<>::... #include "kaleidoscope/KeyEvent.h" // for KeyEvent #include "kaleidoscope/Runtime.h" // for Runtime, Runtime_ #include "kaleidoscope/device/device.h" // for cRGB, CRGB -#include "kaleidoscope/event_handler_result.h" // for EventHandlerResult +#include "kaleidoscope/event_handler_result.h" // for EventHandlerResult, EventHandlerRes... #include "kaleidoscope/plugin/LEDControl.h" // for LEDControl #include "kaleidoscope/plugin/LEDControl/LEDUtils.h" // for hsvToRgb diff --git a/plugins/Kaleidoscope-LED-Stalker/src/kaleidoscope/plugin/LED-Stalker.h b/plugins/Kaleidoscope-LED-Stalker/src/kaleidoscope/plugin/LED-Stalker.h index 2d70ed78..424789ab 100644 --- a/plugins/Kaleidoscope-LED-Stalker/src/kaleidoscope/plugin/LED-Stalker.h +++ b/plugins/Kaleidoscope-LED-Stalker/src/kaleidoscope/plugin/LED-Stalker.h @@ -17,16 +17,16 @@ #pragma once -#include // for uint8_t, uin... +#include // for uint8_t, uint16_t #include "kaleidoscope/KeyEvent.h" // for KeyEvent -#include "kaleidoscope/Runtime.h" // for Runtime, Run... -#include "kaleidoscope/device/device.h" // for cRGB, CRGB -#include "kaleidoscope/event_handler_result.h" // for EventHandler... +#include "kaleidoscope/Runtime.h" // for Runtime, Runtime_ +#include "kaleidoscope/device/device.h" // for cRGB, CRGB, Device +#include "kaleidoscope/event_handler_result.h" // for EventHandlerResult #include "kaleidoscope/plugin.h" // for Plugin -#include "kaleidoscope/plugin/AccessTransientLEDMode.h" // for AccessTransi... +#include "kaleidoscope/plugin/AccessTransientLEDMode.h" // for AccessTransientLEDMode #include "kaleidoscope/plugin/LEDMode.h" // for LEDMode -#include "kaleidoscope/plugin/LEDModeInterface.h" // for LEDModeInter... +#include "kaleidoscope/plugin/LEDModeInterface.h" // for LEDModeInterface #define STALKER(v, ...) ({static kaleidoscope::plugin::stalker::v _effect __VA_ARGS__; &_effect; }) diff --git a/plugins/Kaleidoscope-LED-Wavepool/src/kaleidoscope/plugin/LED-Wavepool.cpp b/plugins/Kaleidoscope-LED-Wavepool/src/kaleidoscope/plugin/LED-Wavepool.cpp index 51c14102..e57803a8 100644 --- a/plugins/Kaleidoscope-LED-Wavepool/src/kaleidoscope/plugin/LED-Wavepool.cpp +++ b/plugins/Kaleidoscope-LED-Wavepool/src/kaleidoscope/plugin/LED-Wavepool.cpp @@ -20,14 +20,14 @@ #include "kaleidoscope/plugin/LED-Wavepool.h" -#include // for pgm_read_byte -#include // for int8_t, uint8_t +#include // for pgm_read_byte, PROGMEM, abs +#include // for int8_t, uint8_t, int16_t, intptr_t -#include "kaleidoscope/KeyAddr.h" // for MatrixAddr, Key... +#include "kaleidoscope/KeyAddr.h" // for MatrixAddr, KeyAddr, MatrixAddr<>::... #include "kaleidoscope/KeyEvent.h" // for KeyEvent #include "kaleidoscope/Runtime.h" // for Runtime, Runtime_ #include "kaleidoscope/device/device.h" // for Device, cRGB -#include "kaleidoscope/event_handler_result.h" // for EventHandlerResult +#include "kaleidoscope/event_handler_result.h" // for EventHandlerResult, EventHandlerRes... #include "kaleidoscope/keyswitch_state.h" // for keyIsPressed #include "kaleidoscope/plugin/LEDControl.h" // for LEDControl #include "kaleidoscope/plugin/LEDControl/LEDUtils.h" // for hsvToRgb diff --git a/plugins/Kaleidoscope-LED-Wavepool/src/kaleidoscope/plugin/LED-Wavepool.h b/plugins/Kaleidoscope-LED-Wavepool/src/kaleidoscope/plugin/LED-Wavepool.h index d640b8d3..55a63728 100644 --- a/plugins/Kaleidoscope-LED-Wavepool/src/kaleidoscope/plugin/LED-Wavepool.h +++ b/plugins/Kaleidoscope-LED-Wavepool/src/kaleidoscope/plugin/LED-Wavepool.h @@ -21,16 +21,16 @@ #ifdef ARDUINO_AVR_MODEL01 #include // for PROGMEM -#include // for uint8_t, int... +#include // for uint8_t, int16_t, int8_t, INT16_MAX #include "kaleidoscope/KeyEvent.h" // for KeyEvent -#include "kaleidoscope/Runtime.h" // for Runtime, Run... +#include "kaleidoscope/Runtime.h" // for Runtime, Runtime_ #include "kaleidoscope/device/device.h" // for Device -#include "kaleidoscope/event_handler_result.h" // for EventHandler... +#include "kaleidoscope/event_handler_result.h" // for EventHandlerResult #include "kaleidoscope/plugin.h" // for Plugin -#include "kaleidoscope/plugin/AccessTransientLEDMode.h" // for AccessTransi... +#include "kaleidoscope/plugin/AccessTransientLEDMode.h" // for AccessTransientLEDMode #include "kaleidoscope/plugin/LEDMode.h" // for LEDMode -#include "kaleidoscope/plugin/LEDModeInterface.h" // for LEDModeInter... +#include "kaleidoscope/plugin/LEDModeInterface.h" // for LEDModeInterface #define WP_WID 14 #define WP_HGT 5 diff --git a/plugins/Kaleidoscope-LEDEffect-BootAnimation/src/kaleidoscope/plugin/LEDEffect-BootAnimation.cpp b/plugins/Kaleidoscope-LEDEffect-BootAnimation/src/kaleidoscope/plugin/LEDEffect-BootAnimation.cpp index 52525bb0..d42fe694 100644 --- a/plugins/Kaleidoscope-LEDEffect-BootAnimation/src/kaleidoscope/plugin/LEDEffect-BootAnimation.cpp +++ b/plugins/Kaleidoscope-LEDEffect-BootAnimation/src/kaleidoscope/plugin/LEDEffect-BootAnimation.cpp @@ -20,11 +20,11 @@ #include // for PROGMEM, pgm_read_byte #include // for uint16_t, uint8_t -#include "kaleidoscope/KeyAddr.h" // for KeyAddr, MatrixAddr +#include "kaleidoscope/KeyAddr.h" // for KeyAddr, MatrixAddr, MatrixAddr<>::Range #include "kaleidoscope/Runtime.h" // for Runtime, Runtime_ #include "kaleidoscope/device/device.h" // for CRGB, cRGB -#include "kaleidoscope/event_handler_result.h" // for EventHandlerResult -#include "kaleidoscope/key_defs.h" // for Key, Key_O, Key_A, Key_B +#include "kaleidoscope/event_handler_result.h" // for EventHandlerResult, EventHandlerResult::OK +#include "kaleidoscope/key_defs.h" // for Key, Key_O, Key_A, Key_B, Key_D, Key_E #include "kaleidoscope/layers.h" // for Layer, Layer_ #include "kaleidoscope/plugin/LEDControl.h" // for LEDControl diff --git a/plugins/Kaleidoscope-LEDEffect-BootGreeting/src/kaleidoscope/plugin/LEDEffect-BootGreeting.cpp b/plugins/Kaleidoscope-LEDEffect-BootGreeting/src/kaleidoscope/plugin/LEDEffect-BootGreeting.cpp index 9687a5b7..2efe3c23 100644 --- a/plugins/Kaleidoscope-LEDEffect-BootGreeting/src/kaleidoscope/plugin/LEDEffect-BootGreeting.cpp +++ b/plugins/Kaleidoscope-LEDEffect-BootGreeting/src/kaleidoscope/plugin/LEDEffect-BootGreeting.cpp @@ -19,13 +19,13 @@ #include // for uint16_t, uint8_t -#include "kaleidoscope/KeyAddr.h" // for KeyAddr, Matrix... +#include "kaleidoscope/KeyAddr.h" // for KeyAddr, MatrixAddr, MatrixAddr<>::... #include "kaleidoscope/Runtime.h" // for Runtime, Runtime_ #include "kaleidoscope/device/device.h" // for cRGB -#include "kaleidoscope/event_handler_result.h" // for EventHandlerResult +#include "kaleidoscope/event_handler_result.h" // for EventHandlerResult, EventHandlerRes... #include "kaleidoscope/key_defs.h" // for Key #include "kaleidoscope/layers.h" // for Layer, Layer_ -#include "kaleidoscope/plugin/LEDControl.h" // for LEDControl, Key... +#include "kaleidoscope/plugin/LEDControl.h" // for LEDControl, Key_LEDEffectNext #include "kaleidoscope/plugin/LEDControl/LEDUtils.h" // for breath_compute namespace kaleidoscope { diff --git a/plugins/Kaleidoscope-LEDEffect-Chase/src/kaleidoscope/plugin/LEDEffect-Chase.cpp b/plugins/Kaleidoscope-LEDEffect-Chase/src/kaleidoscope/plugin/LEDEffect-Chase.cpp index a43697ab..877e622a 100644 --- a/plugins/Kaleidoscope-LEDEffect-Chase/src/kaleidoscope/plugin/LEDEffect-Chase.cpp +++ b/plugins/Kaleidoscope-LEDEffect-Chase/src/kaleidoscope/plugin/LEDEffect-Chase.cpp @@ -19,7 +19,7 @@ #include // for uint16_t, uint8_t #include "kaleidoscope/Runtime.h" // for Runtime, Runtime_ -#include "kaleidoscope/device/device.h" // for CRGB, Device, Base<>::LE... +#include "kaleidoscope/device/device.h" // for CRGB, Device, Base<>::LEDRangeIterator #include "kaleidoscope/plugin/LEDControl.h" // for LEDControl namespace kaleidoscope { diff --git a/plugins/Kaleidoscope-LEDEffect-Chase/src/kaleidoscope/plugin/LEDEffect-Chase.h b/plugins/Kaleidoscope-LEDEffect-Chase/src/kaleidoscope/plugin/LEDEffect-Chase.h index 177367df..8c3efd96 100644 --- a/plugins/Kaleidoscope-LEDEffect-Chase/src/kaleidoscope/plugin/LEDEffect-Chase.h +++ b/plugins/Kaleidoscope-LEDEffect-Chase/src/kaleidoscope/plugin/LEDEffect-Chase.h @@ -16,7 +16,7 @@ #pragma once -#include // for uint8_t, int8_t +#include // for uint8_t, int8_t, uint16_t #include "kaleidoscope/Runtime.h" // for Runtime, Runtime_ #include "kaleidoscope/plugin.h" // for Plugin diff --git a/plugins/Kaleidoscope-LEDEffect-Rainbow/src/kaleidoscope/plugin/LEDEffect-Rainbow.cpp b/plugins/Kaleidoscope-LEDEffect-Rainbow/src/kaleidoscope/plugin/LEDEffect-Rainbow.cpp index f64a3587..a5b60aab 100644 --- a/plugins/Kaleidoscope-LEDEffect-Rainbow/src/kaleidoscope/plugin/LEDEffect-Rainbow.cpp +++ b/plugins/Kaleidoscope-LEDEffect-Rainbow/src/kaleidoscope/plugin/LEDEffect-Rainbow.cpp @@ -20,7 +20,7 @@ #include // for uint8_t, uint16_t #include "kaleidoscope/Runtime.h" // for Runtime, Runtime_ -#include "kaleidoscope/device/device.h" // for Base<>::LEDRang... +#include "kaleidoscope/device/device.h" // for Base<>::LEDRangeIterator, Base<>::L... #include "kaleidoscope/plugin/LEDControl.h" // for LEDControl #include "kaleidoscope/plugin/LEDControl/LEDUtils.h" // for hsvToRgb diff --git a/plugins/Kaleidoscope-LEDEffects/src/kaleidoscope/plugin/TriColor.cpp b/plugins/Kaleidoscope-LEDEffects/src/kaleidoscope/plugin/TriColor.cpp index e8ec2ed7..09a3842d 100644 --- a/plugins/Kaleidoscope-LEDEffects/src/kaleidoscope/plugin/TriColor.cpp +++ b/plugins/Kaleidoscope-LEDEffects/src/kaleidoscope/plugin/TriColor.cpp @@ -17,9 +17,9 @@ #include "kaleidoscope/plugin/TriColor.h" -#include "kaleidoscope/KeyAddr.h" // for KeyAddr, MatrixAddr, Mat... +#include "kaleidoscope/KeyAddr.h" // for KeyAddr, MatrixAddr, MatrixAddr<>::Range #include "kaleidoscope/device/device.h" // for cRGB -#include "kaleidoscope/key_defs.h" // for Key, Key_0, Key_A, Key_E... +#include "kaleidoscope/key_defs.h" // for Key, Key_0, Key_A, Key_Escape, Key_F1, Key_F12 #include "kaleidoscope/layers.h" // for Layer, Layer_ #include "kaleidoscope/plugin/LEDControl.h" // for LEDControl diff --git a/plugins/Kaleidoscope-LayerFocus/src/kaleidoscope/plugin/LayerFocus.cpp b/plugins/Kaleidoscope-LayerFocus/src/kaleidoscope/plugin/LayerFocus.cpp index d86a2ad1..4fe4e1b2 100644 --- a/plugins/Kaleidoscope-LayerFocus/src/kaleidoscope/plugin/LayerFocus.cpp +++ b/plugins/Kaleidoscope-LayerFocus/src/kaleidoscope/plugin/LayerFocus.cpp @@ -18,11 +18,11 @@ #include "kaleidoscope/plugin/LayerFocus.h" -#include // for PSTR, strcmp_P, F +#include // for PSTR, strcmp_P, F, __FlashStringHelper #include // for Focus, FocusSerial #include // for uint8_t -#include "kaleidoscope/event_handler_result.h" // for EventHandlerResult +#include "kaleidoscope/event_handler_result.h" // for EventHandlerResult, EventHandlerResult::OK #include "kaleidoscope/layers.h" // for Layer, Layer_ namespace kaleidoscope { diff --git a/plugins/Kaleidoscope-Leader/src/kaleidoscope/plugin/Leader.cpp b/plugins/Kaleidoscope-Leader/src/kaleidoscope/plugin/Leader.cpp index 34b19413..1780c44c 100644 --- a/plugins/Kaleidoscope-Leader/src/kaleidoscope/plugin/Leader.cpp +++ b/plugins/Kaleidoscope-Leader/src/kaleidoscope/plugin/Leader.cpp @@ -17,16 +17,16 @@ #include "kaleidoscope/plugin/Leader.h" -#include // for F, __FlashStringHelper +#include // for F, __FlashStringHelper, pgm_read_ptr #include // for Focus, FocusSerial #include // for LEAD_FIRST, LEAD_LAST -#include // for uint16_t, uint8_t +#include // for uint16_t, uint8_t, int8_t #include "kaleidoscope/KeyAddr.h" // for KeyAddr #include "kaleidoscope/KeyEvent.h" // for KeyEvent #include "kaleidoscope/KeyEventTracker.h" // for KeyEventTracker #include "kaleidoscope/Runtime.h" // for Runtime, Runtime_ -#include "kaleidoscope/event_handler_result.h" // for EventHandlerResult +#include "kaleidoscope/event_handler_result.h" // for EventHandlerResult, EventHandlerResult::OK #include "kaleidoscope/key_defs.h" // for Key, Key_NoKey #include "kaleidoscope/keyswitch_state.h" // for INJECTED, keyToggledOff diff --git a/plugins/Kaleidoscope-Leader/src/kaleidoscope/plugin/Leader.h b/plugins/Kaleidoscope-Leader/src/kaleidoscope/plugin/Leader.h index 7408118d..7b0e59f0 100644 --- a/plugins/Kaleidoscope-Leader/src/kaleidoscope/plugin/Leader.h +++ b/plugins/Kaleidoscope-Leader/src/kaleidoscope/plugin/Leader.h @@ -19,14 +19,13 @@ #include // for LEAD_FIRST #include // for NULL -#include // for uint16_t, uint8_t +#include // for uint16_t, uint8_t, int8_t #include "kaleidoscope/KeyEvent.h" // for KeyEvent #include "kaleidoscope/KeyEventTracker.h" // for KeyEventTracker #include "kaleidoscope/event_handler_result.h" // for EventHandlerResult #include "kaleidoscope/key_defs.h" // for Key, Key_NoKey #include "kaleidoscope/plugin.h" // for Plugin - // ----------------------------------------------------------------------------- // Deprecation warning messages #include "kaleidoscope_internal/deprecations.h" // for DEPRECATED diff --git a/plugins/Kaleidoscope-Macros/src/kaleidoscope/plugin/Macros.cpp b/plugins/Kaleidoscope-Macros/src/kaleidoscope/plugin/Macros.cpp index 5d5622f3..c1c655c8 100644 --- a/plugins/Kaleidoscope-Macros/src/kaleidoscope/plugin/Macros.cpp +++ b/plugins/Kaleidoscope-Macros/src/kaleidoscope/plugin/Macros.cpp @@ -16,7 +16,7 @@ #include "kaleidoscope/plugin/Macros.h" -#include // for pgm_read_byte, delay +#include // for pgm_read_byte, delay, F, PROGMEM, __F... #include // for Focus, FocusSerial #include // for MACRO_FIRST #include // for uint8_t @@ -24,10 +24,10 @@ #include "kaleidoscope/KeyAddr.h" // for KeyAddr #include "kaleidoscope/KeyEvent.h" // for KeyEvent #include "kaleidoscope/Runtime.h" // for Runtime, Runtime_ -#include "kaleidoscope/event_handler_result.h" // for EventHandlerResult -#include "kaleidoscope/key_defs.h" // for Key, LSHIFT, Key_... -#include "kaleidoscope/keyswitch_state.h" // for INJECTED, IS_PRESSED -#include "kaleidoscope/plugin/Macros/MacroSteps.h" // for macro_t, MACRO_NONE +#include "kaleidoscope/event_handler_result.h" // for EventHandlerResult, EventHandlerResul... +#include "kaleidoscope/key_defs.h" // for Key, LSHIFT, Key_NoKey, Key_0, Key_1 +#include "kaleidoscope/keyswitch_state.h" // for INJECTED, IS_PRESSED, WAS_PRESSED +#include "kaleidoscope/plugin/Macros/MacroSteps.h" // for macro_t, MACRO_NONE, MACRO_ACTION_END // ============================================================================= // Default `macroAction()` function definitions diff --git a/plugins/Kaleidoscope-Macros/src/kaleidoscope/plugin/Macros.h b/plugins/Kaleidoscope-Macros/src/kaleidoscope/plugin/Macros.h index a5cfeaf7..a85573f4 100644 --- a/plugins/Kaleidoscope-Macros/src/kaleidoscope/plugin/Macros.h +++ b/plugins/Kaleidoscope-Macros/src/kaleidoscope/plugin/Macros.h @@ -18,7 +18,7 @@ #include // for uint8_t -#include "Kaleidoscope-Ranges.h" // for MACRO_FIRST, MACR... +#include "Kaleidoscope-Ranges.h" // for MACRO_FIRST, MACRO_LAST #include "kaleidoscope/KeyEvent.h" // for KeyEvent #include "kaleidoscope/event_handler_result.h" // for EventHandlerResult #include "kaleidoscope/key_defs.h" // for Key diff --git a/plugins/Kaleidoscope-MagicCombo/src/kaleidoscope/plugin/MagicCombo.cpp b/plugins/Kaleidoscope-MagicCombo/src/kaleidoscope/plugin/MagicCombo.cpp index f48b590d..463fdeae 100644 --- a/plugins/Kaleidoscope-MagicCombo/src/kaleidoscope/plugin/MagicCombo.cpp +++ b/plugins/Kaleidoscope-MagicCombo/src/kaleidoscope/plugin/MagicCombo.cpp @@ -17,13 +17,13 @@ #include "kaleidoscope/plugin/MagicCombo.h" -#include // for F, __FlashStringHelper +#include // for F, __FlashStringHelper, pgm_read_byte #include // for Focus, FocusSerial -#include // for uint16_t, int8_t, uin... +#include // for uint16_t, int8_t, uint8_t #include "kaleidoscope/Runtime.h" // for Runtime, Runtime_ #include "kaleidoscope/device/device.h" // for Device -#include "kaleidoscope/event_handler_result.h" // for EventHandlerResult +#include "kaleidoscope/event_handler_result.h" // for EventHandlerResult, EventHandlerResult::OK namespace kaleidoscope { namespace plugin { diff --git a/plugins/Kaleidoscope-MagicCombo/src/kaleidoscope/plugin/MagicCombo.h b/plugins/Kaleidoscope-MagicCombo/src/kaleidoscope/plugin/MagicCombo.h index 258671dc..1294da30 100644 --- a/plugins/Kaleidoscope-MagicCombo/src/kaleidoscope/plugin/MagicCombo.h +++ b/plugins/Kaleidoscope-MagicCombo/src/kaleidoscope/plugin/MagicCombo.h @@ -18,7 +18,7 @@ #pragma once #include // for PROGMEM -#include // for uint16_t, uint8_t +#include // for uint16_t, uint8_t, int8_t #include "kaleidoscope/event_handler_result.h" // for EventHandlerResult #include "kaleidoscope/plugin.h" // for Plugin diff --git a/plugins/Kaleidoscope-MouseKeys/src/kaleidoscope/plugin/MouseKeys.cpp b/plugins/Kaleidoscope-MouseKeys/src/kaleidoscope/plugin/MouseKeys.cpp index f57b29f5..551e3b61 100644 --- a/plugins/Kaleidoscope-MouseKeys/src/kaleidoscope/plugin/MouseKeys.cpp +++ b/plugins/Kaleidoscope-MouseKeys/src/kaleidoscope/plugin/MouseKeys.cpp @@ -16,20 +16,20 @@ #include "kaleidoscope/plugin/MouseKeys.h" -#include // for F, __F... -#include // for Focus -#include // for uint8_t +#include // for F, __FlashStringHelper +#include // for Focus, FocusSerial +#include // for uint8_t, uint16_t, int8_t #include "kaleidoscope/KeyEvent.h" // for KeyEvent -#include "kaleidoscope/Runtime.h" // for Runtime -#include "kaleidoscope/device/device.h" // for Base<>... -#include "kaleidoscope/driver/hid/keyboardio/AbsoluteMouse.h" // for Absolu... +#include "kaleidoscope/Runtime.h" // for Runtime, Runtime_ +#include "kaleidoscope/device/device.h" // for Base<>::HID, VirtualProps:... +#include "kaleidoscope/driver/hid/keyboardio/AbsoluteMouse.h" // for AbsoluteMouse #include "kaleidoscope/driver/hid/keyboardio/Mouse.h" // for Mouse -#include "kaleidoscope/event_handler_result.h" // for EventH... -#include "kaleidoscope/key_defs.h" // for Key -#include "kaleidoscope/keyswitch_state.h" // for keyTog... -#include "kaleidoscope/plugin/mousekeys/MouseKeyDefs.h" // for KEY_MO... -#include "kaleidoscope/plugin/mousekeys/MouseWrapper.h" // for MouseW... +#include "kaleidoscope/event_handler_result.h" // for EventHandlerResult, EventH... +#include "kaleidoscope/key_defs.h" // for Key, SYNTHETIC +#include "kaleidoscope/keyswitch_state.h" // for keyToggledOn +#include "kaleidoscope/plugin/mousekeys/MouseKeyDefs.h" // for KEY_MOUSE_BUTTON, KEY_MOUS... +#include "kaleidoscope/plugin/mousekeys/MouseWrapper.h" // for MouseWrapper, wrapper, WAR... namespace kaleidoscope { namespace plugin { diff --git a/plugins/Kaleidoscope-MouseKeys/src/kaleidoscope/plugin/mousekeys/MouseWrapper.cpp b/plugins/Kaleidoscope-MouseKeys/src/kaleidoscope/plugin/mousekeys/MouseWrapper.cpp index 0e9cc0aa..768a11d9 100644 --- a/plugins/Kaleidoscope-MouseKeys/src/kaleidoscope/plugin/mousekeys/MouseWrapper.cpp +++ b/plugins/Kaleidoscope-MouseKeys/src/kaleidoscope/plugin/mousekeys/MouseWrapper.cpp @@ -16,13 +16,13 @@ #include "kaleidoscope/plugin/mousekeys/MouseWrapper.h" -#include // for uint16_t +#include // for uint16_t, uint8_t, int8_t -#include "kaleidoscope/Runtime.h" // for Runtime -#include "kaleidoscope/device/device.h" // for Base<>... -#include "kaleidoscope/driver/hid/keyboardio/AbsoluteMouse.h" // for Absolu... +#include "kaleidoscope/Runtime.h" // for Runtime, Runtime_ +#include "kaleidoscope/device/device.h" // for Base<>::HID, VirtualProps:... +#include "kaleidoscope/driver/hid/keyboardio/AbsoluteMouse.h" // for AbsoluteMouse #include "kaleidoscope/driver/hid/keyboardio/Mouse.h" // for Mouse -#include "kaleidoscope/plugin/mousekeys/MouseWarpModes.h" // for MOUSE_... +#include "kaleidoscope/plugin/mousekeys/MouseWarpModes.h" // for MOUSE_WARP_GRID_2X2 namespace kaleidoscope { namespace plugin { diff --git a/plugins/Kaleidoscope-NumPad/src/kaleidoscope/plugin/NumPad.cpp b/plugins/Kaleidoscope-NumPad/src/kaleidoscope/plugin/NumPad.cpp index ce9b5542..93fc335a 100644 --- a/plugins/Kaleidoscope-NumPad/src/kaleidoscope/plugin/NumPad.cpp +++ b/plugins/Kaleidoscope-NumPad/src/kaleidoscope/plugin/NumPad.cpp @@ -18,10 +18,10 @@ #include // for uint8_t -#include "kaleidoscope/KeyAddr.h" // for KeyAddr, Matrix... +#include "kaleidoscope/KeyAddr.h" // for KeyAddr, MatrixAddr, MatrixAddr<>::... #include "kaleidoscope/device/device.h" // for cRGB, CRGB -#include "kaleidoscope/event_handler_result.h" // for EventHandlerResult -#include "kaleidoscope/key_defs.h" // for Key, KEY_FLAGS +#include "kaleidoscope/event_handler_result.h" // for EventHandlerResult, EventHandlerRes... +#include "kaleidoscope/key_defs.h" // for Key, KEY_FLAGS, Key_NoKey, LockLayer #include "kaleidoscope/layers.h" // for Layer, Layer_ #include "kaleidoscope/plugin/LEDControl.h" // for LEDControl #include "kaleidoscope/plugin/LEDControl/LEDUtils.h" // for breath_compute diff --git a/plugins/Kaleidoscope-NumPad/src/kaleidoscope/plugin/NumPad.h b/plugins/Kaleidoscope-NumPad/src/kaleidoscope/plugin/NumPad.h index 25a538d8..d3dc22e9 100644 --- a/plugins/Kaleidoscope-NumPad/src/kaleidoscope/plugin/NumPad.h +++ b/plugins/Kaleidoscope-NumPad/src/kaleidoscope/plugin/NumPad.h @@ -19,11 +19,10 @@ #include // for uint8_t #include "kaleidoscope/KeyAddr.h" // for KeyAddr +#include "kaleidoscope/device/device.h" // for cRGB #include "kaleidoscope/event_handler_result.h" // for EventHandlerResult #include "kaleidoscope/plugin.h" // for Plugin -struct cRGB; - namespace kaleidoscope { namespace plugin { diff --git a/plugins/Kaleidoscope-OneShot/src/kaleidoscope/plugin/OneShot.cpp b/plugins/Kaleidoscope-OneShot/src/kaleidoscope/plugin/OneShot.cpp index 86769c00..95bc29b0 100644 --- a/plugins/Kaleidoscope-OneShot/src/kaleidoscope/plugin/OneShot.cpp +++ b/plugins/Kaleidoscope-OneShot/src/kaleidoscope/plugin/OneShot.cpp @@ -17,18 +17,18 @@ #include "kaleidoscope/plugin/OneShot.h" -#include // for bitRead, F, __FlashSt... +#include // for bitRead, F, __FlashStringHelper #include // for Focus, FocusSerial #include // for OS_FIRST #include // for uint8_t, int8_t #include "kaleidoscope/KeyAddr.h" // for KeyAddr, MatrixAddr -#include "kaleidoscope/KeyAddrBitfield.h" // for KeyAddrBitfield, KeyA... +#include "kaleidoscope/KeyAddrBitfield.h" // for KeyAddrBitfield, KeyAddrBitfield::Iterator #include "kaleidoscope/KeyEvent.h" // for KeyEvent #include "kaleidoscope/Runtime.h" // for Runtime, Runtime_ -#include "kaleidoscope/event_handler_result.h" // for EventHandlerResult -#include "kaleidoscope/key_defs.h" // for Key, Key_LeftControl -#include "kaleidoscope/keyswitch_state.h" // for INJECTED, IS_PRESSED +#include "kaleidoscope/event_handler_result.h" // for EventHandlerResult, EventHandlerResult::OK +#include "kaleidoscope/key_defs.h" // for Key, Key_LeftControl, LAYER_SHIFT_OFFSET +#include "kaleidoscope/keyswitch_state.h" // for INJECTED, IS_PRESSED, WAS_PRESSED, keyIsI... namespace kaleidoscope { namespace plugin { diff --git a/plugins/Kaleidoscope-OneShot/src/kaleidoscope/plugin/OneShot.h b/plugins/Kaleidoscope-OneShot/src/kaleidoscope/plugin/OneShot.h index 9cdeca5d..63a70777 100644 --- a/plugins/Kaleidoscope-OneShot/src/kaleidoscope/plugin/OneShot.h +++ b/plugins/Kaleidoscope-OneShot/src/kaleidoscope/plugin/OneShot.h @@ -17,17 +17,19 @@ #pragma once -#include // for OS_FIRST, OS_LAST -#include // for uint16_t, uint8_t +#include // for OSL_FIRST, OSM_FIRST, OS_FIRST, OS_LAST +#include // for uint16_t, uint8_t, int16_t #include "kaleidoscope/KeyAddr.h" // for KeyAddr #include "kaleidoscope/KeyAddrBitfield.h" // for KeyAddrBitfield #include "kaleidoscope/KeyEvent.h" // for KeyEvent #include "kaleidoscope/Runtime.h" // for Runtime, Runtime_ #include "kaleidoscope/event_handler_result.h" // for EventHandlerResult -#include "kaleidoscope/key_defs.h" // for Key, Key_LeftControl +#include "kaleidoscope/key_defs.h" // for Key #include "kaleidoscope/plugin.h" // for Plugin +// IWYU pragma: no_include "HIDAliases.h" + // ---------------------------------------------------------------------------- // Keymap macros diff --git a/plugins/Kaleidoscope-OneShotMetaKeys/src/kaleidoscope/plugin/OneShotMetaKeys.cpp b/plugins/Kaleidoscope-OneShotMetaKeys/src/kaleidoscope/plugin/OneShotMetaKeys.cpp index 5a918a8b..febf4a1f 100644 --- a/plugins/Kaleidoscope-OneShotMetaKeys/src/kaleidoscope/plugin/OneShotMetaKeys.cpp +++ b/plugins/Kaleidoscope-OneShotMetaKeys/src/kaleidoscope/plugin/OneShotMetaKeys.cpp @@ -21,13 +21,13 @@ #include // for Focus, FocusSerial #include // for OneShot -#include "kaleidoscope/KeyAddr.h" // for MatrixAddr, MatrixAdd... -#include "kaleidoscope/KeyAddrMap.h" // for KeyAddrMap<>::Iterator +#include "kaleidoscope/KeyAddr.h" // for MatrixAddr, MatrixAddr<>::Range, KeyAddr +#include "kaleidoscope/KeyAddrMap.h" // for KeyAddrMap<>::Iterator, KeyAddrMap #include "kaleidoscope/KeyEvent.h" // for KeyEvent #include "kaleidoscope/KeyMap.h" // for KeyMap #include "kaleidoscope/LiveKeys.h" // for LiveKeys, live_keys -#include "kaleidoscope/event_handler_result.h" // for EventHandlerResult -#include "kaleidoscope/key_defs.h" // for Key, Key_Inactive +#include "kaleidoscope/event_handler_result.h" // for EventHandlerResult, EventHandlerResult::OK +#include "kaleidoscope/key_defs.h" // for Key, Key_Inactive, Key_Masked #include "kaleidoscope/keyswitch_state.h" // for INJECTED, keyToggledOff namespace kaleidoscope { diff --git a/plugins/Kaleidoscope-OneShotMetaKeys/src/kaleidoscope/plugin/OneShotMetaKeys.h b/plugins/Kaleidoscope-OneShotMetaKeys/src/kaleidoscope/plugin/OneShotMetaKeys.h index 9cf4f1b9..e623137f 100644 --- a/plugins/Kaleidoscope-OneShotMetaKeys/src/kaleidoscope/plugin/OneShotMetaKeys.h +++ b/plugins/Kaleidoscope-OneShotMetaKeys/src/kaleidoscope/plugin/OneShotMetaKeys.h @@ -17,7 +17,7 @@ #pragma once -#include // for OS_ACTIVE_STICKY, OS_... +#include // for OS_ACTIVE_STICKY, OS_META_STICKY #include "kaleidoscope/KeyEvent.h" // for KeyEvent #include "kaleidoscope/event_handler_result.h" // for EventHandlerResult diff --git a/plugins/Kaleidoscope-PersistentLEDMode/src/kaleidoscope/plugin/PersistentLEDMode.cpp b/plugins/Kaleidoscope-PersistentLEDMode/src/kaleidoscope/plugin/PersistentLEDMode.cpp index c72e2f15..ce378411 100644 --- a/plugins/Kaleidoscope-PersistentLEDMode/src/kaleidoscope/plugin/PersistentLEDMode.cpp +++ b/plugins/Kaleidoscope-PersistentLEDMode/src/kaleidoscope/plugin/PersistentLEDMode.cpp @@ -22,8 +22,8 @@ #include // for uint8_t, uint16_t #include "kaleidoscope/Runtime.h" // for Runtime, Runtime_ -#include "kaleidoscope/device/device.h" // for VirtualProps::Storage -#include "kaleidoscope/event_handler_result.h" // for EventHandlerResult +#include "kaleidoscope/device/device.h" // for VirtualProps::Storage, Base<>::Storage +#include "kaleidoscope/event_handler_result.h" // for EventHandlerResult, EventHandlerResult::OK #include "kaleidoscope/plugin/LEDControl.h" // for LEDControl namespace kaleidoscope { diff --git a/plugins/Kaleidoscope-Qukeys/src/kaleidoscope/plugin/Qukeys.cpp b/plugins/Kaleidoscope-Qukeys/src/kaleidoscope/plugin/Qukeys.cpp index 0e33618b..ca0b7e00 100644 --- a/plugins/Kaleidoscope-Qukeys/src/kaleidoscope/plugin/Qukeys.cpp +++ b/plugins/Kaleidoscope-Qukeys/src/kaleidoscope/plugin/Qukeys.cpp @@ -20,13 +20,13 @@ #include // for F, __FlashStringHelper #include // for Focus, FocusSerial -#include // for DUL_FIRST, DUM_FIRST +#include // for DUL_FIRST, DUM_FIRST, DUL_LAST, DUM_LAST #include "kaleidoscope/KeyAddrEventQueue.h" // for KeyAddrEventQueue #include "kaleidoscope/KeyEvent.h" // for KeyEvent #include "kaleidoscope/KeyEventTracker.h" // for KeyEventTracker #include "kaleidoscope/Runtime.h" // for Runtime, Runtime_ -#include "kaleidoscope/keyswitch_state.h" // for IS_PRESSED, WAS_PRESSED +#include "kaleidoscope/keyswitch_state.h" // for IS_PRESSED, WAS_PRESSED, keyIsInjected #include "kaleidoscope/layers.h" // for Layer, Layer_ #include "kaleidoscope/progmem_helpers.h" // for cloneFromProgmem diff --git a/plugins/Kaleidoscope-Qukeys/src/kaleidoscope/plugin/Qukeys.h b/plugins/Kaleidoscope-Qukeys/src/kaleidoscope/plugin/Qukeys.h index e4d674f7..45b483e7 100644 --- a/plugins/Kaleidoscope-Qukeys/src/kaleidoscope/plugin/Qukeys.h +++ b/plugins/Kaleidoscope-Qukeys/src/kaleidoscope/plugin/Qukeys.h @@ -19,8 +19,8 @@ #pragma once #include // for PROGMEM -#include // for DUM_FIRST -#include // for uint8_t, uint16_t +#include // for DUL_FIRST, DUM_FIRST +#include // for uint8_t, uint16_t, int8_t #include "kaleidoscope/KeyAddr.h" // for KeyAddr #include "kaleidoscope/KeyAddrEventQueue.h" // for KeyAddrEventQueue @@ -30,6 +30,8 @@ #include "kaleidoscope/key_defs.h" // for Key, Key_Transparent #include "kaleidoscope/plugin.h" // for Plugin +// IWYU pragma: no_include "HIDAliases.h" + // DualUse Key definitions for Qukeys in the keymap #define MT(mod, key) kaleidoscope::plugin::ModTapKey(Key_##mod, Key_##key) diff --git a/plugins/Kaleidoscope-Redial/src/kaleidoscope/plugin/Redial.cpp b/plugins/Kaleidoscope-Redial/src/kaleidoscope/plugin/Redial.cpp index 8f94fb79..62430969 100644 --- a/plugins/Kaleidoscope-Redial/src/kaleidoscope/plugin/Redial.cpp +++ b/plugins/Kaleidoscope-Redial/src/kaleidoscope/plugin/Redial.cpp @@ -21,8 +21,8 @@ #include // for Focus, FocusSerial #include "kaleidoscope/KeyEvent.h" // for KeyEvent -#include "kaleidoscope/event_handler_result.h" // for EventHandlerResult -#include "kaleidoscope/key_defs.h" // for Key, Key_0, Key_1, Key_A +#include "kaleidoscope/event_handler_result.h" // for EventHandlerResult, EventHandlerResult::OK +#include "kaleidoscope/key_defs.h" // for Key, Key_0, Key_1, Key_A, Key_Z #include "kaleidoscope/keyswitch_state.h" // for keyToggledOn namespace kaleidoscope { diff --git a/plugins/Kaleidoscope-ShapeShifter/src/kaleidoscope/plugin/ShapeShifter.cpp b/plugins/Kaleidoscope-ShapeShifter/src/kaleidoscope/plugin/ShapeShifter.cpp index 1714fd5b..9e7d68dc 100644 --- a/plugins/Kaleidoscope-ShapeShifter/src/kaleidoscope/plugin/ShapeShifter.cpp +++ b/plugins/Kaleidoscope-ShapeShifter/src/kaleidoscope/plugin/ShapeShifter.cpp @@ -19,10 +19,10 @@ #include // for uint8_t -#include "kaleidoscope/KeyAddr.h" // for MatrixAddr, MatrixAdd... +#include "kaleidoscope/KeyAddr.h" // for MatrixAddr, MatrixAddr<>::Range, KeyAddr #include "kaleidoscope/KeyEvent.h" // for KeyEvent #include "kaleidoscope/LiveKeys.h" // for LiveKeys, live_keys -#include "kaleidoscope/event_handler_result.h" // for EventHandlerResult +#include "kaleidoscope/event_handler_result.h" // for EventHandlerResult, EventHandlerResult::OK #include "kaleidoscope/key_defs.h" // for Key, Key_NoKey namespace kaleidoscope { diff --git a/plugins/Kaleidoscope-SpaceCadet/src/kaleidoscope/plugin/SpaceCadet.cpp b/plugins/Kaleidoscope-SpaceCadet/src/kaleidoscope/plugin/SpaceCadet.cpp index c4a9efa0..e01f3312 100644 --- a/plugins/Kaleidoscope-SpaceCadet/src/kaleidoscope/plugin/SpaceCadet.cpp +++ b/plugins/Kaleidoscope-SpaceCadet/src/kaleidoscope/plugin/SpaceCadet.cpp @@ -20,16 +20,16 @@ #include // for F, __FlashStringHelper #include // for Focus, FocusSerial -#include // for uint16_t, int8_t, uin... +#include // for uint16_t, int8_t, uint8_t #include "kaleidoscope/KeyAddr.h" // for KeyAddr, MatrixAddr #include "kaleidoscope/KeyAddrEventQueue.h" // for KeyAddrEventQueue #include "kaleidoscope/KeyEvent.h" // for KeyEvent #include "kaleidoscope/KeyEventTracker.h" // for KeyEventTracker #include "kaleidoscope/Runtime.h" // for Runtime, Runtime_ -#include "kaleidoscope/event_handler_result.h" // for EventHandlerResult -#include "kaleidoscope/key_defs.h" // for Key, Key_LeftParen -#include "kaleidoscope/keyswitch_state.h" // for keyToggledOn, WAS_PRE... +#include "kaleidoscope/event_handler_result.h" // for EventHandlerResult, EventHandlerResult::OK +#include "kaleidoscope/key_defs.h" // for Key, Key_LeftParen, Key_LeftShift, Key_Ri... +#include "kaleidoscope/keyswitch_state.h" // for keyToggledOn, WAS_PRESSED, keyIsInjected namespace kaleidoscope { namespace plugin { diff --git a/plugins/Kaleidoscope-SpaceCadet/src/kaleidoscope/plugin/SpaceCadet.h b/plugins/Kaleidoscope-SpaceCadet/src/kaleidoscope/plugin/SpaceCadet.h index e36ce48f..2f521419 100644 --- a/plugins/Kaleidoscope-SpaceCadet/src/kaleidoscope/plugin/SpaceCadet.h +++ b/plugins/Kaleidoscope-SpaceCadet/src/kaleidoscope/plugin/SpaceCadet.h @@ -19,7 +19,7 @@ #pragma once #include // for SC_FIRST, SC_LAST -#include // for uint16_t, uint8_t +#include // for uint16_t, uint8_t, int8_t #include "kaleidoscope/KeyAddrEventQueue.h" // for KeyAddrEventQueue #include "kaleidoscope/KeyEvent.h" // for KeyEvent diff --git a/plugins/Kaleidoscope-Steno/src/kaleidoscope/plugin/GeminiPR.cpp b/plugins/Kaleidoscope-Steno/src/kaleidoscope/plugin/GeminiPR.cpp index c036f80a..1ea2ba8e 100644 --- a/plugins/Kaleidoscope-Steno/src/kaleidoscope/plugin/GeminiPR.cpp +++ b/plugins/Kaleidoscope-Steno/src/kaleidoscope/plugin/GeminiPR.cpp @@ -25,7 +25,7 @@ #include "kaleidoscope/KeyEvent.h" // for KeyEvent #include "kaleidoscope/Runtime.h" // for Runtime, Runtime_ -#include "kaleidoscope/event_handler_result.h" // for EventHandlerResult +#include "kaleidoscope/event_handler_result.h" // for EventHandlerResult, EventHandlerResult::E... #include "kaleidoscope/key_defs.h" // for Key #include "kaleidoscope/keyswitch_state.h" // for keyToggledOn diff --git a/plugins/Kaleidoscope-Syster/src/kaleidoscope/plugin/Syster.cpp b/plugins/Kaleidoscope-Syster/src/kaleidoscope/plugin/Syster.cpp index 9f7b48d2..6fd52603 100644 --- a/plugins/Kaleidoscope-Syster/src/kaleidoscope/plugin/Syster.cpp +++ b/plugins/Kaleidoscope-Syster/src/kaleidoscope/plugin/Syster.cpp @@ -24,9 +24,9 @@ #include "kaleidoscope/KeyAddr.h" // for KeyAddr #include "kaleidoscope/KeyEvent.h" // for KeyEvent #include "kaleidoscope/Runtime.h" // for Runtime, Runtime_ -#include "kaleidoscope/event_handler_result.h" // for EventHandlerResult -#include "kaleidoscope/key_defs.h" // for Key, Key_Backspace -#include "kaleidoscope/keyswitch_state.h" // for INJECTED, WAS_PRESSED +#include "kaleidoscope/event_handler_result.h" // for EventHandlerResult, EventHandlerResult::OK +#include "kaleidoscope/key_defs.h" // for Key, Key_Backspace, Key_1, Key_A, Key_0 +#include "kaleidoscope/keyswitch_state.h" // for INJECTED, WAS_PRESSED, keyToggledOn, IS_P... namespace kaleidoscope { namespace plugin { diff --git a/plugins/Kaleidoscope-TapDance/src/kaleidoscope/plugin/TapDance.cpp b/plugins/Kaleidoscope-TapDance/src/kaleidoscope/plugin/TapDance.cpp index 15e6bf78..c55b5b1b 100644 --- a/plugins/Kaleidoscope-TapDance/src/kaleidoscope/plugin/TapDance.cpp +++ b/plugins/Kaleidoscope-TapDance/src/kaleidoscope/plugin/TapDance.cpp @@ -27,9 +27,9 @@ #include "kaleidoscope/KeyEvent.h" // for KeyEvent #include "kaleidoscope/KeyEventTracker.h" // for KeyEventTracker #include "kaleidoscope/Runtime.h" // for Runtime, Runtime_ -#include "kaleidoscope/event_handler_result.h" // for EventHandlerResult +#include "kaleidoscope/event_handler_result.h" // for EventHandlerResult, EventHandlerResult::OK #include "kaleidoscope/key_defs.h" // for Key -#include "kaleidoscope/keyswitch_state.h" // for keyIsInjected, keyTog... +#include "kaleidoscope/keyswitch_state.h" // for keyIsInjected, keyToggledOff #include "kaleidoscope/layers.h" // for Layer, Layer_ namespace kaleidoscope { diff --git a/plugins/Kaleidoscope-TopsyTurvy/src/kaleidoscope/plugin/TopsyTurvy.cpp b/plugins/Kaleidoscope-TopsyTurvy/src/kaleidoscope/plugin/TopsyTurvy.cpp index a31d1cee..6e4244fe 100644 --- a/plugins/Kaleidoscope-TopsyTurvy/src/kaleidoscope/plugin/TopsyTurvy.cpp +++ b/plugins/Kaleidoscope-TopsyTurvy/src/kaleidoscope/plugin/TopsyTurvy.cpp @@ -19,14 +19,14 @@ #include // for TT_FIRST -#include "kaleidoscope/KeyAddr.h" // for KeyAddr +#include "kaleidoscope/KeyAddr.h" // for KeyAddr, MatrixAddr, MatrixAddr... #include "kaleidoscope/KeyEvent.h" // for KeyEvent -#include "kaleidoscope/LiveKeys.h" // for LiveKeys -#include "kaleidoscope/Runtime.h" // for Runtime -#include "kaleidoscope/device/device.h" // for Base<>::HID +#include "kaleidoscope/LiveKeys.h" // for LiveKeys, live_keys +#include "kaleidoscope/Runtime.h" // for Runtime, Runtime_ +#include "kaleidoscope/device/device.h" // for Base<>::HID, VirtualProps::HID #include "kaleidoscope/driver/hid/keyboardio/Keyboard.h" // for Keyboard -#include "kaleidoscope/event_handler_result.h" // for EventHandle... -#include "kaleidoscope/key_defs.h" // for Key, Key_Le... +#include "kaleidoscope/event_handler_result.h" // for EventHandlerResult, EventHandle... +#include "kaleidoscope/key_defs.h" // for Key, Key_LeftShift, Key_NoKey #include "kaleidoscope/keyswitch_state.h" // for keyToggledOff namespace kaleidoscope { diff --git a/plugins/Kaleidoscope-Turbo/src/kaleidoscope/plugin/Turbo.cpp b/plugins/Kaleidoscope-Turbo/src/kaleidoscope/plugin/Turbo.cpp index fc83e70b..ae8c9fb9 100644 --- a/plugins/Kaleidoscope-Turbo/src/kaleidoscope/plugin/Turbo.cpp +++ b/plugins/Kaleidoscope-Turbo/src/kaleidoscope/plugin/Turbo.cpp @@ -17,20 +17,20 @@ #include "kaleidoscope/plugin/Turbo.h" -#include // for F, __FlashS... -#include // for Focus, Focu... -#include // for uint16_t +#include // for F, __FlashStringHelper +#include // for Focus, FocusSerial +#include // for uint16_t, uint32_t -#include "kaleidoscope/KeyAddr.h" // for MatrixAddr -#include "kaleidoscope/KeyAddrMap.h" // for KeyAddrMap<... +#include "kaleidoscope/KeyAddr.h" // for MatrixAddr, MatrixAddr<>::Range +#include "kaleidoscope/KeyAddrMap.h" // for KeyAddrMap<>::Iterator, KeyAddrMap #include "kaleidoscope/KeyEvent.h" // for KeyEvent #include "kaleidoscope/KeyMap.h" // for KeyMap -#include "kaleidoscope/LiveKeys.h" // for LiveKeys -#include "kaleidoscope/Runtime.h" // for Runtime +#include "kaleidoscope/LiveKeys.h" // for LiveKeys, live_keys +#include "kaleidoscope/Runtime.h" // for Runtime, Runtime_ #include "kaleidoscope/driver/hid/keyboardio/Keyboard.h" // for Keyboard -#include "kaleidoscope/event_handler_result.h" // for EventHandle... +#include "kaleidoscope/event_handler_result.h" // for EventHandlerResult, EventHandle... #include "kaleidoscope/key_defs.h" // for Key -#include "kaleidoscope/keyswitch_state.h" // for keyToggledOff +#include "kaleidoscope/keyswitch_state.h" // for keyToggledOff, keyToggledOn #include "kaleidoscope/plugin/LEDControl.h" // for LEDControl namespace kaleidoscope { diff --git a/plugins/Kaleidoscope-TypingBreaks/src/kaleidoscope/plugin/TypingBreaks.cpp b/plugins/Kaleidoscope-TypingBreaks/src/kaleidoscope/plugin/TypingBreaks.cpp index ffc106d3..a8164de8 100644 --- a/plugins/Kaleidoscope-TypingBreaks/src/kaleidoscope/plugin/TypingBreaks.cpp +++ b/plugins/Kaleidoscope-TypingBreaks/src/kaleidoscope/plugin/TypingBreaks.cpp @@ -17,7 +17,7 @@ #include "kaleidoscope/plugin/TypingBreaks.h" -#include // for PSTR, strcmp_P, F +#include // for PSTR, strcmp_P, F, __FlashStringHelper #include // for EEPROMSettings #include // for Focus, FocusSerial #include // for uint32_t, uint16_t @@ -25,8 +25,8 @@ #include "kaleidoscope/KeyAddr.h" // for KeyAddr #include "kaleidoscope/KeyEvent.h" // for KeyEvent #include "kaleidoscope/Runtime.h" // for Runtime, Runtime_ -#include "kaleidoscope/device/device.h" // for VirtualProps::Storage -#include "kaleidoscope/event_handler_result.h" // for EventHandlerResult +#include "kaleidoscope/device/device.h" // for VirtualProps::Storage, Base<>::Storage +#include "kaleidoscope/event_handler_result.h" // for EventHandlerResult, EventHandlerResult::OK #include "kaleidoscope/keyswitch_state.h" // for keyToggledOff namespace kaleidoscope { diff --git a/plugins/Kaleidoscope-USB-Quirks/src/kaleidoscope/plugin/USB-Quirks.cpp b/plugins/Kaleidoscope-USB-Quirks/src/kaleidoscope/plugin/USB-Quirks.cpp index 42d9f3d8..095739cc 100644 --- a/plugins/Kaleidoscope-USB-Quirks/src/kaleidoscope/plugin/USB-Quirks.cpp +++ b/plugins/Kaleidoscope-USB-Quirks/src/kaleidoscope/plugin/USB-Quirks.cpp @@ -20,8 +20,8 @@ #include // for delay #include // for uint8_t -#include "kaleidoscope/Runtime.h" // for Runtime -#include "kaleidoscope/device/device.h" // for Base<>::HID +#include "kaleidoscope/Runtime.h" // for Runtime, Runtime_ +#include "kaleidoscope/device/device.h" // for Base<>::HID, VirtualProps::HID #include "kaleidoscope/driver/hid/keyboardio/Keyboard.h" // for Keyboard namespace kaleidoscope { diff --git a/plugins/Kaleidoscope-Unicode/src/kaleidoscope/plugin/Unicode.cpp b/plugins/Kaleidoscope-Unicode/src/kaleidoscope/plugin/Unicode.cpp index 476a3ad7..5feaa72e 100644 --- a/plugins/Kaleidoscope-Unicode/src/kaleidoscope/plugin/Unicode.cpp +++ b/plugins/Kaleidoscope-Unicode/src/kaleidoscope/plugin/Unicode.cpp @@ -18,13 +18,13 @@ #include "kaleidoscope/plugin/Unicode.h" #include // for delay -#include // for HostOS, LINUX -#include // for uint8_t +#include // for HostOS, LINUX, MACOS, WINDOWS, OSX +#include // for uint8_t, uint32_t, int8_t -#include "kaleidoscope/Runtime.h" // for Runtime -#include "kaleidoscope/device/device.h" // for Base<>::HID +#include "kaleidoscope/Runtime.h" // for Runtime, Runtime_ +#include "kaleidoscope/device/device.h" // for Base<>::HID, VirtualProps::HID #include "kaleidoscope/driver/hid/keyboardio/Keyboard.h" // for Keyboard -#include "kaleidoscope/key_defs.h" // for Key, Key_Le... +#include "kaleidoscope/key_defs.h" // for Key, Key_LeftAlt, KEY_FLAGS, Key_A namespace kaleidoscope { namespace plugin { diff --git a/plugins/Kaleidoscope-WinKeyToggle/src/kaleidoscope/plugin/WinKeyToggle.cpp b/plugins/Kaleidoscope-WinKeyToggle/src/kaleidoscope/plugin/WinKeyToggle.cpp index 8083cb4a..af58f176 100644 --- a/plugins/Kaleidoscope-WinKeyToggle/src/kaleidoscope/plugin/WinKeyToggle.cpp +++ b/plugins/Kaleidoscope-WinKeyToggle/src/kaleidoscope/plugin/WinKeyToggle.cpp @@ -18,8 +18,8 @@ #include "kaleidoscope/plugin/WinKeyToggle.h" #include "kaleidoscope/KeyEvent.h" // for KeyEvent -#include "kaleidoscope/event_handler_result.h" // for EventHandlerResult -#include "kaleidoscope/key_defs.h" // for Key, Key_LeftGui, Key... +#include "kaleidoscope/event_handler_result.h" // for EventHandlerResult, EventHandlerResult::OK +#include "kaleidoscope/key_defs.h" // for Key, Key_LeftGui, Key_RightGui namespace kaleidoscope { namespace plugin { diff --git a/src/kaleidoscope/KeyAddrEventQueue.h b/src/kaleidoscope/KeyAddrEventQueue.h index f343a111..bd684a3a 100644 --- a/src/kaleidoscope/KeyAddrEventQueue.h +++ b/src/kaleidoscope/KeyAddrEventQueue.h @@ -25,7 +25,7 @@ #include "kaleidoscope/KeyEvent.h" // for KeyEvent, KeyEventId #include "kaleidoscope/Runtime.h" // for Runtime, Runtime_ #include "kaleidoscope/key_defs.h" // for Key_Undefined -#include "kaleidoscope/keyswitch_state.h" // for IS_PRESSED, WAS_PRESSED +#include "kaleidoscope/keyswitch_state.h" // for IS_PRESSED, WAS_PRESSED, keyToggledOff namespace kaleidoscope { diff --git a/src/kaleidoscope/KeyAddrMap.h b/src/kaleidoscope/KeyAddrMap.h index fdcc7815..d47222c2 100644 --- a/src/kaleidoscope/KeyAddrMap.h +++ b/src/kaleidoscope/KeyAddrMap.h @@ -64,6 +64,7 @@ class KeyAddrMap { // for (Key &key : key_map) {...} private: class Iterator; + friend class ThisType::Iterator; public: diff --git a/src/kaleidoscope/Runtime.cpp b/src/kaleidoscope/Runtime.cpp index 0618a4f0..1a9bd414 100644 --- a/src/kaleidoscope/Runtime.cpp +++ b/src/kaleidoscope/Runtime.cpp @@ -19,12 +19,12 @@ #include // for millis #include // for HardwareSerial -#include "kaleidoscope/KeyAddr.h" // for KeyAddr +#include "kaleidoscope/KeyAddr.h" // for KeyAddr, MatrixAddr, MatrixAddr... #include "kaleidoscope/KeyEvent.h" // for KeyEvent -#include "kaleidoscope/LiveKeys.h" // for LiveKeys -#include "kaleidoscope/device/device.h" // for Base<>::HID +#include "kaleidoscope/LiveKeys.h" // for LiveKeys, live_keys +#include "kaleidoscope/device/device.h" // for Base<>::HID, VirtualProps::HID #include "kaleidoscope/driver/hid/keyboardio/Keyboard.h" // for Keyboard -#include "kaleidoscope/keyswitch_state.h" // for keyToggledOff +#include "kaleidoscope/keyswitch_state.h" // for keyToggledOff, keyToggledOn #include "kaleidoscope/layers.h" // for Layer, Layer_ namespace kaleidoscope { diff --git a/src/kaleidoscope/device/ATmega32U4Keyboard.h b/src/kaleidoscope/device/ATmega32U4Keyboard.h index f3ec42fb..8bf7b53a 100644 --- a/src/kaleidoscope/device/ATmega32U4Keyboard.h +++ b/src/kaleidoscope/device/ATmega32U4Keyboard.h @@ -20,11 +20,11 @@ #if defined(__AVR__) || defined(KALEIDOSCOPE_VIRTUAL_BUILD) // IWYU pragma: begin_exports -#include "kaleidoscope/device/Base.h" // for BaseP... -#include "kaleidoscope/driver/hid/Keyboardio.h" // for Keybo... -#include "kaleidoscope/driver/mcu/ATmega32U4.h" // for ATmeg... -#include "kaleidoscope/driver/storage/ATmega32U4EEPROMProps.h" // for ATmeg... -#include "kaleidoscope/driver/storage/AVREEPROM.h" // for AVREE... +#include "kaleidoscope/device/Base.h" // for BaseProps +#include "kaleidoscope/driver/hid/Keyboardio.h" // for Keyboardio, KeyboardioProps +#include "kaleidoscope/driver/mcu/ATmega32U4.h" // for ATmega32U4, ATmega32U4Props +#include "kaleidoscope/driver/storage/ATmega32U4EEPROMProps.h" // for ATmega32U4EEPROMProps +#include "kaleidoscope/driver/storage/AVREEPROM.h" // for AVREEPROM // IWYU pragma: end_exports namespace kaleidoscope { @@ -48,8 +48,6 @@ class ATmega32U4Keyboard : public kaleidoscope::device::Base<_DeviceProps> { } }; #else // ifndef KALEIDOSCOPE_VIRTUAL_BUILD -template -class ATmega32U4Keyboard; #endif // ifndef KALEIDOSCOPE_VIRTUAL_BUILD } // namespace device diff --git a/src/kaleidoscope/device/Base.h b/src/kaleidoscope/device/Base.h index 756198ae..dea3f65f 100644 --- a/src/kaleidoscope/device/Base.h +++ b/src/kaleidoscope/device/Base.h @@ -23,14 +23,14 @@ #pragma once -#include // for uint8_t, int8_t +#include // for uint8_t, int8_t, uint32_t #include // for size_t, strlen, memcpy #include "kaleidoscope/driver/bootloader/None.h" // for None #include "kaleidoscope/driver/hid/Base.h" // for Base, BaseProps #include "kaleidoscope/driver/keyscanner/Base.h" // for BaseProps #include "kaleidoscope/driver/keyscanner/None.h" // for None -#include "kaleidoscope/driver/led/None.h" // for cRGB, BaseProps, CRGB +#include "kaleidoscope/driver/led/None.h" // for cRGB, BaseProps, CRGB, None #include "kaleidoscope/driver/mcu/Base.h" // for BaseProps #include "kaleidoscope/driver/mcu/None.h" // for None #include "kaleidoscope/driver/storage/Base.h" // for BaseProps diff --git a/src/kaleidoscope/device/virtual/DefaultHIDReportConsumer.cpp b/src/kaleidoscope/device/virtual/DefaultHIDReportConsumer.cpp index e82c28fa..83d4cd9c 100644 --- a/src/kaleidoscope/device/virtual/DefaultHIDReportConsumer.cpp +++ b/src/kaleidoscope/device/virtual/DefaultHIDReportConsumer.cpp @@ -19,8 +19,8 @@ #include "kaleidoscope/device/virtual/DefaultHIDReportConsumer.h" // From KeyboardioHID: -#include // for HID_REPORTID_NKRO_K... -#include // for HID_KeyboardReport_... +#include // for HID_REPORTID_NKRO_KEYBOARD +#include // for HID_KeyboardReport_Data_t, (anonymous u... // From system: #include // for uint8_t // From Arduino core: @@ -32,8 +32,8 @@ #undef min #undef max -#include // for operator<<, strings... -#include // for char_traits, operator+ +#include // for operator<<, stringstream, basic_ostream +#include // for char_traits, operator+, basic_string namespace kaleidoscope { diff --git a/src/kaleidoscope/device/virtual/Virtual.cpp b/src/kaleidoscope/device/virtual/Virtual.cpp index 70545eee..df971279 100644 --- a/src/kaleidoscope/device/virtual/Virtual.cpp +++ b/src/kaleidoscope/device/virtual/Virtual.cpp @@ -19,27 +19,23 @@ #include "kaleidoscope/device/virtual/Virtual.h" -// From system: -#include // for uint8_t, uint16_t -#include // for exit, size_t - // From Arduino: -#include // for EEPROMClass, EERef -#include // for getLineOfInput, isI... - +#include // for EEPROMClass, EERef // From KeyboardioHID: #include // for HIDReportObserver +// From system: +#include // for uint8_t, uint16_t +#include // for exit, size_t +#include // for getLineOfInput, isInte... +#include // for operator<<, string +#include // for operator==, char_traits // From Kaleidoscope: -#include "kaleidoscope/KeyAddr.h" // for MatrixAddr, MatrixA... -#include "kaleidoscope/device/virtual/DefaultHIDReportConsumer.h" // for DefaultHIDReportCon... +#include "kaleidoscope/KeyAddr.h" // for MatrixAddr, MatrixAddr... +#include "kaleidoscope/device/virtual/DefaultHIDReportConsumer.h" // for DefaultHIDReportConsumer #include "kaleidoscope/device/virtual/Logging.h" // for log_error, logging #include "kaleidoscope/key_defs.h" // for Key_NoKey -#include "kaleidoscope/keyswitch_state.h" // for IS_PRESSED, WAS_PRE... - -// These must come after other headers: -#include // for operator<<, string -#include // for operator==, char_tr... +#include "kaleidoscope/keyswitch_state.h" // for IS_PRESSED, WAS_PRESSED // FIXME: This relates to virtual/cores/arduino/EEPROM.h. // EEPROM static data must be defined here as only diff --git a/src/kaleidoscope/device/virtual/VirtualHID.cpp b/src/kaleidoscope/device/virtual/VirtualHID.cpp index 2ddd7b92..80ba0107 100644 --- a/src/kaleidoscope/device/virtual/VirtualHID.cpp +++ b/src/kaleidoscope/device/virtual/VirtualHID.cpp @@ -22,9 +22,13 @@ // library KeyboardioHID. It replaces all hardware related stuff // with stub implementations. +#include // for NULL +#include // for uint8_t + // From KeyboardioHID: -#include "HID.h" +#include "HID.h" // for HID_, HIDSubDescriptor, HID_::(anonymous), HID, HID_REPOR... #include "HIDReportObserver.h" // for HIDReportObserver +#include "PluggableUSB.h" // for USBSetup, EP_TYPE_INTERRUPT_IN, PluggableUSBModule #if defined(USBCON) diff --git a/src/kaleidoscope/driver/hid/Keyboardio.h b/src/kaleidoscope/driver/hid/Keyboardio.h index 17c54abe..f71d3a0a 100644 --- a/src/kaleidoscope/driver/hid/Keyboardio.h +++ b/src/kaleidoscope/driver/hid/Keyboardio.h @@ -17,10 +17,10 @@ #pragma once -#include "kaleidoscope/driver/hid/Base.h" // for Base, BaseProps -#include "keyboardio/AbsoluteMouse.h" // for AbsoluteMouse, AbsoluteMou... -#include "keyboardio/Keyboard.h" // for Keyboard, KeyboardProps -#include "keyboardio/Mouse.h" // for Mouse, MouseProps +#include "kaleidoscope/driver/hid/Base.h" // for Base, BaseProps +#include "kaleidoscope/driver/hid/keyboardio/AbsoluteMouse.h" // for AbsoluteMouse, AbsoluteMou... +#include "kaleidoscope/driver/hid/keyboardio/Keyboard.h" // for Keyboard, KeyboardProps +#include "kaleidoscope/driver/hid/keyboardio/Mouse.h" // for Mouse, MouseProps namespace kaleidoscope { namespace driver { diff --git a/src/kaleidoscope/driver/hid/base/Keyboard.h b/src/kaleidoscope/driver/hid/base/Keyboard.h index 0e0d500f..9aec4ac5 100644 --- a/src/kaleidoscope/driver/hid/base/Keyboard.h +++ b/src/kaleidoscope/driver/hid/base/Keyboard.h @@ -19,7 +19,7 @@ #include // for uint8_t -#include "kaleidoscope/key_defs.h" // for Key, Key_LeftAlt, Key_LeftControl +#include "kaleidoscope/key_defs.h" // for Key, Key_LeftAlt, Key_LeftControl, Key_LeftGui, Key_L... #ifndef HID_BOOT_PROTOCOL #define HID_BOOT_PROTOCOL 0 diff --git a/src/kaleidoscope/driver/hid/keyboardio/AbsoluteMouse.h b/src/kaleidoscope/driver/hid/keyboardio/AbsoluteMouse.h index 257e7b2d..8b70f0df 100644 --- a/src/kaleidoscope/driver/hid/keyboardio/AbsoluteMouse.h +++ b/src/kaleidoscope/driver/hid/keyboardio/AbsoluteMouse.h @@ -17,14 +17,12 @@ #pragma once -#include // for uint8_t, int8_t +#include // for SingleAbsoluteMouse_, SingleAbso... +#include // for uint8_t, int8_t, uint16_t -#include -// From KeyboardioHID: -#include "DeviceAPIs/AbsoluteMouseAPI.hpp" // for AbsoluteMous... -#include "SingleReport/SingleAbsoluteMouse.h" // for SingleAbsolu... -// From Kaleidoscope: -#include "kaleidoscope/driver/hid/base/AbsoluteMouse.h" // for AbsoluteMouse +#include "kaleidoscope/driver/hid/base/AbsoluteMouse.h" // for AbsoluteMouse, AbsoluteMouseProps + +// IWYU pragma: no_include "DeviceAPIs/AbsoluteMouseAPI.hpp" namespace kaleidoscope { namespace driver { diff --git a/src/kaleidoscope/driver/hid/keyboardio/Keyboard.h b/src/kaleidoscope/driver/hid/keyboardio/Keyboard.h index fb3fb350..d68c77c0 100644 --- a/src/kaleidoscope/driver/hid/keyboardio/Keyboard.h +++ b/src/kaleidoscope/driver/hid/keyboardio/Keyboard.h @@ -17,16 +17,11 @@ #pragma once -#include // for uint8_t, uint16_t - -#include -// From KeyboardioHID: -#include "BootKeyboard/BootKeyboard.h" // for BootKeyboard, Boo... -#include "MultiReport/ConsumerControl.h" // for ConsumerControl -#include "MultiReport/Keyboard.h" // for Keyboard, Keyboard_ -#include "MultiReport/SystemControl.h" // for SystemControl +#include // for BootKeyboard, BootKeyboard_, Keyboard +#include // for uint8_t, uint16_t + // From Kaleidoscope: -#include "kaleidoscope/driver/hid/base/Keyboard.h" // for Keyboard, Keyboar... +#include "kaleidoscope/driver/hid/base/Keyboard.h" // for Keyboard, KeyboardProps namespace kaleidoscope { namespace driver { diff --git a/src/kaleidoscope/driver/hid/keyboardio/Mouse.h b/src/kaleidoscope/driver/hid/keyboardio/Mouse.h index e1ec3ddf..b52cfe86 100644 --- a/src/kaleidoscope/driver/hid/keyboardio/Mouse.h +++ b/src/kaleidoscope/driver/hid/keyboardio/Mouse.h @@ -17,11 +17,9 @@ #pragma once -#include // for int8_t, uint8_t +#include // for HID_MouseReport_Data_t, (anonymous union... +#include // for int8_t, uint8_t -#include -// From KeyboardioHID: -#include "MultiReport/Mouse.h" // for HID_MouseReport_Data_t // From Kaleidoscope: #include "kaleidoscope/driver/hid/base/Mouse.h" // for Mouse, MouseProps diff --git a/src/kaleidoscope/driver/keyscanner/Base.h b/src/kaleidoscope/driver/keyscanner/Base.h index 58953c8e..1d2a757e 100644 --- a/src/kaleidoscope/driver/keyscanner/Base.h +++ b/src/kaleidoscope/driver/keyscanner/Base.h @@ -19,9 +19,11 @@ #include // for uint8_t -#include "kaleidoscope/MatrixAddr.h" // for MatrixAddr +#include "kaleidoscope/MatrixAddr.h" // IWYU pragma: keep #include "kaleidoscope/key_defs.h" // for Key +// IWYU pragma: no_include "kaleidoscope/KeyAddr.h" + namespace kaleidoscope { namespace driver { namespace keyscanner { diff --git a/src/kaleidoscope/driver/keyscanner/Base_Impl.h b/src/kaleidoscope/driver/keyscanner/Base_Impl.h index 17ae3b43..4e2455fd 100644 --- a/src/kaleidoscope/driver/keyscanner/Base_Impl.h +++ b/src/kaleidoscope/driver/keyscanner/Base_Impl.h @@ -21,10 +21,10 @@ #include "kaleidoscope/KeyEvent.h" // for KeyEvent #include "kaleidoscope/Runtime.h" // for Runtime, Runtime_ -#include "kaleidoscope/device/virtual/Virtual.h" // for Device +#include "kaleidoscope/device/device.h" // for Device #include "kaleidoscope/driver/keyscanner/Base.h" // for Base #include "kaleidoscope/key_defs.h" // for Key -#include "kaleidoscope/keyswitch_state.h" // for keyToggledOff, keyT... +#include "kaleidoscope/keyswitch_state.h" // for keyToggledOff, keyToggledOn namespace kaleidoscope { namespace driver { diff --git a/src/kaleidoscope/driver/led/None.h b/src/kaleidoscope/driver/led/None.h index df5d8502..89d6e0dd 100644 --- a/src/kaleidoscope/driver/led/None.h +++ b/src/kaleidoscope/driver/led/None.h @@ -30,7 +30,7 @@ struct cRGB { #endif -#include "kaleidoscope/driver/led/Base.h" // for Base, BaseProps (ptr only) +#include "kaleidoscope/driver/led/Base.h" // for Base, BaseProps namespace kaleidoscope { namespace driver { diff --git a/src/kaleidoscope/driver/mcu/None.h b/src/kaleidoscope/driver/mcu/None.h index 00e77def..e725bf6c 100644 --- a/src/kaleidoscope/driver/mcu/None.h +++ b/src/kaleidoscope/driver/mcu/None.h @@ -17,7 +17,7 @@ #pragma once -#include "kaleidoscope/driver/mcu/Base.h" // for Base, BaseProps (ptr only) +#include "kaleidoscope/driver/mcu/Base.h" // for Base, BaseProps namespace kaleidoscope { namespace driver { diff --git a/src/kaleidoscope/driver/storage/None.h b/src/kaleidoscope/driver/storage/None.h index 1939ec5c..4ad01c13 100644 --- a/src/kaleidoscope/driver/storage/None.h +++ b/src/kaleidoscope/driver/storage/None.h @@ -17,7 +17,7 @@ #pragma once -#include "kaleidoscope/driver/storage/Base.h" // for Base, BaseProps (ptr o... +#include "kaleidoscope/driver/storage/Base.h" // for Base, BaseProps namespace kaleidoscope { namespace driver { diff --git a/src/kaleidoscope/hooks.cpp b/src/kaleidoscope/hooks.cpp index 33408398..c59ddff3 100644 --- a/src/kaleidoscope/hooks.cpp +++ b/src/kaleidoscope/hooks.cpp @@ -14,10 +14,10 @@ * this program. If not, see . */ -#include "kaleidoscope/event_handler_result.h" // for EventHandlerResult +#include "kaleidoscope/event_handler_result.h" // for EventHandlerResult, EventHandlerResult::OK #include "kaleidoscope/event_handlers.h" // for _FOR_EACH_EVENT_HANDLER #include "kaleidoscope/hooks.h" // for Hooks -#include "kaleidoscope/macro_helpers.h" // for __NL__, MAKE_TEMPLATE... +#include "kaleidoscope/macro_helpers.h" // for __NL__, MAKE_TEMPLATE_SIGNATURE, UNWRAP namespace kaleidoscope { diff --git a/src/kaleidoscope/hooks.h b/src/kaleidoscope/hooks.h index a0f3c49d..231eca6b 100644 --- a/src/kaleidoscope/hooks.h +++ b/src/kaleidoscope/hooks.h @@ -19,13 +19,13 @@ #include "kaleidoscope/KeyEvent.h" // IWYU pragma: keep #include "kaleidoscope/event_handler_result.h" // for EventHandlerResult #include "kaleidoscope/event_handlers.h" // for _FOR_EACH_EVENT_HANDLER -#include "kaleidoscope/macro_helpers.h" // for __NL__, MAKE_TEMPLATE... +#include "kaleidoscope/macro_helpers.h" // for __NL__, MAKE_TEMPLATE_SIGNATURE, UNWRAP #include "kaleidoscope_internal/event_dispatch.h" // IWYU pragma: keep namespace kaleidoscope { // Forward declarations to enable friend declarations. -class Layer_; -class Runtime_; +class Layer_; // IWYU pragma: keep +class Runtime_; // IWYU pragma: keep namespace plugin { // Forward declarations to enable friend declarations. diff --git a/src/kaleidoscope/key_defs.h b/src/kaleidoscope/key_defs.h index 80e54874..8f5801ee 100644 --- a/src/kaleidoscope/key_defs.h +++ b/src/kaleidoscope/key_defs.h @@ -19,13 +19,12 @@ #include // for pgm_read_byte, INPUT #include // for uint8_t, uint16_t -#include "kaleidoscope/HIDTables.h" // for HID_KEYBOARD_LEFT_CONTROL - +#include "kaleidoscope/HIDTables.h" // for HID_KEYBOARD_LEFT_CONTROL, HID_KEYBOARD_RIGHT... // IWYU pragma: begin_exports #include "kaleidoscope/key_defs/aliases.h" #include "kaleidoscope/key_defs/consumerctl.h" #include "kaleidoscope/key_defs/keyboard.h" -#include "kaleidoscope/key_defs/keymaps.h" // for LAYER_MOVE_OFFSET, LAYER_... +#include "kaleidoscope/key_defs/keymaps.h" // for LAYER_MOVE_OFFSET, LAYER_SHIFT_OFFSET #include "kaleidoscope/key_defs/sysctl.h" // IWYU pragma: end_exports diff --git a/src/kaleidoscope/layers.cpp b/src/kaleidoscope/layers.cpp index c1252efd..9a98fd85 100644 --- a/src/kaleidoscope/layers.cpp +++ b/src/kaleidoscope/layers.cpp @@ -17,19 +17,18 @@ #include // for uint8_t, int8_t #include // for memmove, memset -#include "kaleidoscope/KeyAddr.h" // for KeyAddr -#include "kaleidoscope/KeyAddrMap.h" // for KeyAddrMap<>::Iterator -#include "kaleidoscope/KeyEvent.h" // for KeyEvent -#include "kaleidoscope/KeyMap.h" // for KeyMap -#include "kaleidoscope/LiveKeys.h" // for LiveKeys, live_keys -#include "kaleidoscope/MatrixAddr.h" // for MatrixAddr, MatrixA... -#include "kaleidoscope/device/virtual/Virtual.h" // for Device -#include "kaleidoscope/hooks.h" // for Hooks -#include "kaleidoscope/key_defs.h" // for Key, LAYER_MOVE_OFFSET -#include "kaleidoscope/keymaps.h" // for keyFromKeymap -#include "kaleidoscope/keyswitch_state.h" // for keyToggledOn -#include "kaleidoscope/layers.h" // for Layer_, Layer, Laye... -#include "kaleidoscope_internal/device.h" // for device +#include "kaleidoscope/KeyAddr.h" // for MatrixAddr, MatrixAddr<>::Range, KeyAddr +#include "kaleidoscope/KeyAddrMap.h" // for KeyAddrMap<>::Iterator, KeyAddrMap +#include "kaleidoscope/KeyEvent.h" // for KeyEvent +#include "kaleidoscope/KeyMap.h" // for KeyMap +#include "kaleidoscope/LiveKeys.h" // for LiveKeys, live_keys +#include "kaleidoscope/device/device.h" // for Device +#include "kaleidoscope/hooks.h" // for Hooks +#include "kaleidoscope/key_defs.h" // for Key, LAYER_MOVE_OFFSET, LAYER_SHIFT_OFFSET +#include "kaleidoscope/keymaps.h" // for keyFromKeymap +#include "kaleidoscope/keyswitch_state.h" // for keyToggledOn +#include "kaleidoscope/layers.h" // for Layer_, Layer, Layer_::GetKeyFunction, Layer_:... +#include "kaleidoscope_internal/device.h" // for device // The maximum number of layers allowed. #define MAX_LAYERS 32; diff --git a/src/kaleidoscope/layers.h b/src/kaleidoscope/layers.h index b013944d..d0dd9027 100644 --- a/src/kaleidoscope/layers.h +++ b/src/kaleidoscope/layers.h @@ -26,8 +26,8 @@ #include "kaleidoscope/keymaps.h" // IWYU pragma: keep #include "kaleidoscope/macro_helpers.h" // for __NL__ #include "kaleidoscope_internal/device.h" // for device -#include "kaleidoscope_internal/shortname.h" // for _INIT_HID_GETSHOR... -#include "kaleidoscope_internal/sketch_exploration/sketch_exploration.h" // for _INIT_SKETCH_EXPL... +#include "kaleidoscope_internal/shortname.h" // for _INIT_HID_GETSH... +#include "kaleidoscope_internal/sketch_exploration/sketch_exploration.h" // for _INIT_SKETCH_EX... // clang-format off diff --git a/src/kaleidoscope/plugin/LEDControl.cpp b/src/kaleidoscope/plugin/LEDControl.cpp index 517c94b1..7e85e7ba 100644 --- a/src/kaleidoscope/plugin/LEDControl.cpp +++ b/src/kaleidoscope/plugin/LEDControl.cpp @@ -16,16 +16,16 @@ #include "kaleidoscope/plugin/LEDControl.h" -#include // for PSTR, strcmp_P +#include // for PSTR, strcmp_P, strncmp_P #include // for Focus, FocusSerial -#include "kaleidoscope/KeyAddrMap.h" // for KeyAddrMap<>::Iter... +#include "kaleidoscope/KeyAddrMap.h" // for KeyAddrMap<>::Iterator, KeyAddrMap #include "kaleidoscope/KeyEvent.h" // for KeyEvent #include "kaleidoscope/KeyMap.h" // for KeyMap #include "kaleidoscope/LiveKeys.h" // for LiveKeys, live_keys #include "kaleidoscope/hooks.h" // for Hooks #include "kaleidoscope/keyswitch_state.h" // for keyToggledOn -#include "kaleidoscope_internal/LEDModeManager.h" // for LEDModeManager +#include "kaleidoscope_internal/LEDModeManager.h" // for LEDModeManager, LEDModeFactory using namespace kaleidoscope::internal; // NOLINT(build/namespaces) diff --git a/src/kaleidoscope/plugin/LEDControl.h b/src/kaleidoscope/plugin/LEDControl.h index 6dd7b40c..71a266eb 100644 --- a/src/kaleidoscope/plugin/LEDControl.h +++ b/src/kaleidoscope/plugin/LEDControl.h @@ -21,9 +21,9 @@ #include "kaleidoscope/KeyAddr.h" // for KeyAddr #include "kaleidoscope/KeyEvent.h" // for KeyEvent #include "kaleidoscope/Runtime.h" // for Runtime, Runtime_ -#include "kaleidoscope/device/device.h" // for cRGB, Device, Base... +#include "kaleidoscope/device/device.h" // for cRGB, Device, Base<>::LEDDriver, Virtu... #include "kaleidoscope/event_handler_result.h" // for EventHandlerResult -#include "kaleidoscope/key_defs.h" // for Key, IS_INTERNAL +#include "kaleidoscope/key_defs.h" // for Key, IS_INTERNAL, KEY_FLAGS, SYNTHETIC #include "kaleidoscope/plugin.h" // for Plugin #include "kaleidoscope/plugin/LEDMode.h" // for LEDMode #include "kaleidoscope/plugin/LEDModeInterface.h" // for LEDModeInterface diff --git a/src/kaleidoscope/plugin/LEDMode.h b/src/kaleidoscope/plugin/LEDMode.h index 7c54555c..c91c23c3 100644 --- a/src/kaleidoscope/plugin/LEDMode.h +++ b/src/kaleidoscope/plugin/LEDMode.h @@ -17,7 +17,7 @@ #pragma once #include "kaleidoscope/KeyAddr.h" // for KeyAddr -#include "kaleidoscope/event_handler_result.h" // for EventHandlerResult +#include "kaleidoscope/event_handler_result.h" // for EventHandlerResult, EventHandlerResult... #include "kaleidoscope/plugin.h" // for Plugin #include "kaleidoscope/plugin/AccessTransientLEDMode.h" // IWYU pragma: keep #include "kaleidoscope/plugin/LEDModeInterface.h" // for LEDModeInterface diff --git a/src/kaleidoscope/util/flasher/KeyboardioI2CBootloader.h b/src/kaleidoscope/util/flasher/KeyboardioI2CBootloader.h index a4b95fba..273a7c24 100644 --- a/src/kaleidoscope/util/flasher/KeyboardioI2CBootloader.h +++ b/src/kaleidoscope/util/flasher/KeyboardioI2CBootloader.h @@ -21,8 +21,8 @@ // TODO(@algernon): We should support AVR here, too. #ifdef __SAMD21G18A__ -#include #include +#include #include "kaleidoscope/util/crc16.h" #include "kaleidoscope/util/flasher/Base.h" diff --git a/src/kaleidoscope_internal/LEDModeManager.h b/src/kaleidoscope_internal/LEDModeManager.h index 245f5638..6141a5cd 100644 --- a/src/kaleidoscope_internal/LEDModeManager.h +++ b/src/kaleidoscope_internal/LEDModeManager.h @@ -16,20 +16,19 @@ #pragma once -#include // for PROGMEM +#include // for PROGMEM, memcpy_P, pgm_read_byte #include // for size_t #include // for uint8_t -// IWYU pragma: no_include -#include "kaleidoscope/macro_helpers.h" // for __NL__ +#include "kaleidoscope/macro_helpers.h" // for __NL__, ADD_TEMPLATE_BRACES_0 #include "kaleidoscope/plugin.h" // for Plugin -#include "kaleidoscope/plugin/LEDMode.h" // for LEDMode -#include "kaleidoscope/plugin/LEDModeInterface.h" // for LEDModeInt... +#include "kaleidoscope/plugin/LEDMode.h" // for LEDMode, LEDControl +#include "kaleidoscope/plugin/LEDModeInterface.h" // for LEDModeInterface #include "kaleidoscope_internal/array_like_storage.h" // IWYU pragma: keep -#include "kaleidoscope_internal/type_traits/has_method.h" // for DEFINE_HAS... +#include "kaleidoscope_internal/type_traits/has_method.h" // for DEFINE_HAS_METHOD_TRAITS #if defined(KALEIDOSCOPE_VIRTUAL_BUILD) || defined(ARDUINO_ARCH_STM32) -#include +#include // for operator new #else // To enable placement new, we need to supply a global operator @@ -44,8 +43,8 @@ namespace kaleidoscope { namespace plugin { // Forward declarations to avoid header inclusions -class LEDControl; -class LEDModeInterface; +class LEDControl; // IWYU pragma: keep +class LEDModeInterface; // IWYU pragma: keep } // namespace plugin diff --git a/src/kaleidoscope_internal/deprecations.h b/src/kaleidoscope_internal/deprecations.h index ff38a46a..95cb4d26 100644 --- a/src/kaleidoscope_internal/deprecations.h +++ b/src/kaleidoscope_internal/deprecations.h @@ -18,7 +18,7 @@ #pragma once -#include "kaleidoscope/macro_helpers.h" +#include "kaleidoscope/macro_helpers.h" // IWYU pragma: keep #define DEPRECATED(tag) \ __attribute__((deprecated(_DEPRECATE(_DEPRECATED_MESSAGE_ ## tag)))) diff --git a/src/kaleidoscope_internal/event_dispatch.h b/src/kaleidoscope_internal/event_dispatch.h index c2594283..d65551ad 100644 --- a/src/kaleidoscope_internal/event_dispatch.h +++ b/src/kaleidoscope_internal/event_dispatch.h @@ -35,11 +35,12 @@ #pragma once -#include "kaleidoscope/event_handlers.h" -#include "kaleidoscope/macro_helpers.h" -#include "kaleidoscope/plugin.h" -#include "kaleidoscope_internal/eventhandler_signature_check.h" -#include "kaleidoscope_internal/sketch_exploration/sketch_exploration.h" +#include "kaleidoscope/event_handlers.h" // for _FOR_EACH_EVENT... +#include "kaleidoscope/macro_helpers.h" // for __NL__, UNWRAP +#include "kaleidoscope/plugin.h" // IWYU pragma: keep +#include "kaleidoscope_internal/eventhandler_signature_check.h" // for _PREPARE_EVENT_... +#include "kaleidoscope_internal/sketch_exploration/plugin_exploration.h" // for _INIT_PLUGIN_EX... +#include "kaleidoscope_internal/sketch_exploration/sketch_exploration.h" // IWYU pragma: keep // Some words about the design of hook routing: // diff --git a/src/kaleidoscope_internal/eventhandler_signature_check.h b/src/kaleidoscope_internal/eventhandler_signature_check.h index 9269023c..3b913fb7 100644 --- a/src/kaleidoscope_internal/eventhandler_signature_check.h +++ b/src/kaleidoscope_internal/eventhandler_signature_check.h @@ -18,10 +18,10 @@ #pragma once -#include "kaleidoscope/event_handlers.h" // for _PROCESS_E... -#include "kaleidoscope/macro_helpers.h" // for __NL__ -#include "kaleidoscope_internal/type_traits/has_member.h" // for DEFINE_HAS... -#include "kaleidoscope_internal/type_traits/has_method.h" // for DEFINE_HAS... +#include "kaleidoscope/event_handlers.h" // for _PROCESS_EVENT_HANDLER_VERSIONS +#include "kaleidoscope/macro_helpers.h" // for __NL__, VERBOSE_STATIC_ASSERT_... +#include "kaleidoscope_internal/type_traits/has_member.h" // for DEFINE_HAS_MEMBER_TRAITS +#include "kaleidoscope_internal/type_traits/has_method.h" // for DEFINE_HAS_METHOD_TRAITS // ************************************************************************* // ************************************************************************* diff --git a/src/kaleidoscope_internal/sketch_exploration/sketch_exploration.h b/src/kaleidoscope_internal/sketch_exploration/sketch_exploration.h index 7e0aafa3..cb081d8e 100644 --- a/src/kaleidoscope_internal/sketch_exploration/sketch_exploration.h +++ b/src/kaleidoscope_internal/sketch_exploration/sketch_exploration.h @@ -18,7 +18,7 @@ #pragma once -#include "kaleidoscope_internal/sketch_exploration/keymap_exploration.h" +#include "kaleidoscope_internal/sketch_exploration/keymap_exploration.h" // for _INIT_KEYMAP_EX... #include "kaleidoscope_internal/sketch_exploration/plugin_exploration.h" // IWYU pragma: keep //!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! diff --git a/src/kaleidoscope_internal/type_traits/has_method.h b/src/kaleidoscope_internal/type_traits/has_method.h index 298a53e0..be9472fc 100644 --- a/src/kaleidoscope_internal/type_traits/has_method.h +++ b/src/kaleidoscope_internal/type_traits/has_method.h @@ -18,7 +18,7 @@ #pragma once -#include "kaleidoscope/macro_helpers.h" // for __NL__, UNWRAP, ADD_TEMPLATE... +#include "kaleidoscope/macro_helpers.h" // for __NL__, UNWRAP, ADD_TEMPLATE_BRACES, GLUE3, TEMP... #define DEFINE_HAS_METHOD_TRAITS(PREFIX, \ TMPL_PARAM_TYPE_LIST, TMPL_PARAM_LIST, \