Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Move most sources to a kaleidoscope/ subdir and namespace #364

Merged
merged 1 commit into from Oct 14, 2018

Conversation

algernon
Copy link
Contributor

Lots of things were already under the kaleidoscope namespace, but were in the "wrong" directory. This big patchset moves everything under kaleidoscope/, and namespaces Layers_. There are a few un-namespaced things, but because their use is so widespread, and they're used so commonly, we don't want to namespace those (like handleKeyswitchEvent), at least not yet.

As a minor side-effect, this moves a few global statics that were once in Layers.cpp into the Layer_ class itself, for clarity and encapsulation.

Non-namespaced headers that were used outside of Kaleidoscope itself will still work, but will emit a compile-time warning.

This is a prerequirement for #137. The hardware plugins use macro_helpers.h, and Qukeys uses key_defs_keymaps.h, which are deprecated by this PR, and will emit warnings. I will be submitting separate PRs to clean those up.

@algernon algernon added the enhancement New feature or request label Oct 14, 2018
@algernon algernon requested a review from obra October 14, 2018 08:16
@algernon
Copy link
Contributor Author

The Travis tests will continue failing, because the Kaleidoscope in the bundle conflicts with the current one. Joyful, but I don't have the resources to fix Travis too at this time.

Lots of things were already under the `kaleidoscope` namespace, but were in the
"wrong" directory. This big patchset moves everything under `kaleidoscope/`, and
namespaces `Layers_`. There are a few un-namespaced things, but because their
use is so widespread, and they're used so commonly, we don't want to namespace
those (like `handleKeyswitchEvent`), at least not yet.

As a minor side-effect, this moves a few global statics that were once in
`Layers.cpp` into the `Layer_` class itself, for clarity and encapsulation.

Non-namespaced headers that were used outside of Kaleidoscope itself will still
work, but will emit a compile-time warning.

Signed-off-by: Gergely Nagy <algernon@keyboard.io>
@algernon
Copy link
Contributor Author

Turns out, I just needed to shadow layers.h. Otherwise Kaleidoscope-NumPad pulled in the other layers.h from the bundle. This is super confusing, but I'm glad travis is green. \o/

@obra obra merged commit b40b2ea into master Oct 14, 2018
@obra obra deleted the f/namespacing branch October 14, 2018 19:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants