Remove deprecated Layer API functions as per the schedule

pull/1002/head
Jesse Vincent 4 years ago
parent 8db5e7fd33
commit 3227a2dcf4
No known key found for this signature in database
GPG Key ID: 122F5DF7108E4046

@ -338,7 +338,7 @@ The layer system used to be index-ordered, meaning that we'd look keys up on
layers based on the _index_ of active layers. Kaleidoscope now uses activation
order, which looks up keys based on the order of layer activation.
This means that the following functions are deprecated, and will be removed by **2020-12-31**:
The following functions have been removed as of **2021-01-01**:
- `Layer.top()`, which used to return the topmost layer index. Use
`Layer.mostRecent()` instead, which returns the most recently activated layer.

@ -96,24 +96,14 @@ class Layer_ {
static void activate(uint8_t layer);
static void deactivate(uint8_t layer);
static void activateNext();
static void deactivateTop() DEPRECATED(LAYER_DEACTIVATETOP) {
deactivateMostRecent();
}
static void deactivateMostRecent();
static void move(uint8_t layer);
static uint8_t top(void) DEPRECATED(LAYER_TOP) {
return mostRecent();
}
static uint8_t mostRecent() {
return active_layers_[active_layer_count_ - 1];
}
static boolean isActive(uint8_t layer);
static uint32_t getLayerState(void) DEPRECATED(LAYER_GETLAYERSTATE) {
return layer_state_;
}
static Key eventHandler(Key mappedKey, KeyAddr key_addr, uint8_t keyState);
typedef Key(*GetKeyFunction)(uint8_t layer, KeyAddr key_addr);

@ -33,16 +33,3 @@
"For further information and examples on how to do that, \n" __NL__ \
"please see UPGRADING.md"
#define _DEPRECATED_MESSAGE_LAYER_DEACTIVATETOP __NL__ \
"`Layer.deactivateTop()` is deprecated.\n" __NL__ \
"Please use `Layer.deactivateMostRecent()` instead."
#define _DEPRECATED_MESSAGE_LAYER_TOP __NL__ \
"`Layer.top()` is deprecated.\n" __NL__ \
"Please use `Layer.mostRecent()` instead."
#define _DEPRECATED_MESSAGE_LAYER_GETLAYERSTATE __NL__ \
"`Layer.getLayerState()` is deprecated.\n" __NL__ \
"Layers are now in activation-order, please use" __NL__ \
"`Layer.forEachActiveLayer()` instead."

Loading…
Cancel
Save