layer_names.h 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475
  1. /*
  2. Copyright 2018-2022 Eric Gebhart <e.a.gebhart@gmail.com>
  3. This program is free software: you can redistribute it and/or modify
  4. it under the terms of the GNU General Public License as published by
  5. the Free Software Foundation, either version 2 of the License, or
  6. (at your option) any later version.
  7. This program is distributed in the hope that it will be useful,
  8. but WITHOUT ANY WARRANTY; without even the implied warranty of
  9. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  10. GNU General Public License for more details.
  11. You should have received a copy of the GNU General Public License
  12. along with this program. If not, see <http://www.gnu.org/licenses/>.
  13. */
  14. #include QMK_KEYBOARD_H
  15. #include "base_layers.h"
  16. #include "layouts.h"
  17. #include "layers.h"
  18. #if defined(OLED_CUSTOM_ENABLE)
  19. # include "oled_stuff.h"
  20. #endif
  21. #define MO_LAYERS MO(_LAYERS)
  22. #undef LANG_IS
  23. #define LANG_IS LOCALE_LAYERS
  24. enum base_layer_names{
  25. #include "base_names.h"
  26. BASE_NAME_COUNT
  27. };
  28. #undef LANG_IS
  29. #define LANG_IS DEFAULT_LANG
  30. // Get the enums for the layers.
  31. enum userspace_layers {
  32. #include "base_names.h"
  33. // get them again if we have another locale.
  34. #ifdef SECOND_LOCALE
  35. #undef LANG_IS
  36. #define LANG_IS SECOND_LOCALE
  37. #include "base_names.h"
  38. #undef LANG_IS
  39. #define LANG_IS DEFAULT_LANG
  40. #endif
  41. _LAYERS,
  42. #include "func_names.h"
  43. // get them again if we have another locale.
  44. #ifdef SECOND_LOCALE
  45. #undef LANG_IS
  46. #define LANG_IS SECOND_LOCALE
  47. #include "func_names.h"
  48. #undef LANG_IS
  49. #define LANG_IS DEFAULT_LANG
  50. #endif
  51. #include "util_names.h"
  52. };
  53. // find the beginning and end of each locale.
  54. #include "locale_layers.h"