diff options
Diffstat (limited to 'common/layer_switch.h')
-rw-r--r-- | common/layer_switch.h | 33 |
1 files changed, 28 insertions, 5 deletions
diff --git a/common/layer_switch.h b/common/layer_switch.h index 9f0695260c..25c81a5dc2 100644 --- a/common/layer_switch.h +++ b/common/layer_switch.h @@ -21,16 +21,39 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #include "keyboard.h" #include "action.h" -uint16_t layer_switch_stat; -uint16_t layer_switch_stat_get(void); -void layer_switch_stat_set(uint16_t stat); +/* base layer to fall back */ +extern uint8_t default_layer; + +/* layer status */ +extern uint16_t layer_switch_stat; + +/* return layer status */ +uint16_t layer_switch_get_stat(void); +/* return current active layer */ +uint8_t layer_switch_get_layer(void); + +/* switch off all layers */ void layer_switch_clear(void); +/* set layer status */ +void layer_switch_set(uint16_t stat); +/* move to layer */ +void layer_switch_move(uint8_t layer); +/* switch on layer */ void layer_switch_on(uint8_t layer); +/* switch off layer */ void layer_switch_off(uint8_t layer); -/* invert state */ -void layer_switch_inv(uint8_t layer); +/* switch state of layer */ +void layer_switch_invert(uint8_t layer); + +/* bitwise operation against layer status */ +void layer_switch_or(uint16_t stat); +void layer_switch_and(uint16_t stat); +void layer_switch_xor(uint16_t stat); + void layer_switch_debug(void); + +/* return action depending on current layer status */ action_t layer_switch_get_action(key_t key); #endif |