aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorDrew DeVault <sir@cmpwn.com>2017-06-19 15:15:37 -0400
committerDrew DeVault <sir@cmpwn.com>2017-06-19 15:15:37 -0400
commit632a04f1b7dea35f46a2fa478bf53869854a1b5e (patch)
treec5b5a57ddf085993a16a5c9f29076b90f3baccf1 /include
parentecb04afcadc96cc8d39749311e4c1c412bebf4a9 (diff)
Implement keyboard LEDs
Diffstat (limited to 'include')
-rw-r--r--include/types.h1
-rw-r--r--include/wlr/types.h10
2 files changed, 11 insertions, 0 deletions
diff --git a/include/types.h b/include/types.h
index 2063c3f5..54aa5606 100644
--- a/include/types.h
+++ b/include/types.h
@@ -23,6 +23,7 @@ void wlr_output_free(struct wlr_output *output);
struct wlr_keyboard_impl {
void (*destroy)(struct wlr_keyboard_state *state);
+ void (*led_update)(struct wlr_keyboard_state *state, uint32_t leds);
};
struct wlr_keyboard *wlr_keyboard_create(struct wlr_keyboard_impl *impl,
diff --git a/include/wlr/types.h b/include/wlr/types.h
index 2ca73cc2..1d2abab5 100644
--- a/include/wlr/types.h
+++ b/include/wlr/types.h
@@ -53,18 +53,28 @@ void wlr_output_destroy(struct wlr_output *output);
void wlr_output_effective_resolution(struct wlr_output *output,
int *width, int *height);
+enum WLR_KEYBOARD_LED {
+ WLR_LED_NUM_LOCK = 1,
+ WLR_LED_CAPS_LOCK = 2,
+ WLR_LED_SCROLL_LOCK = 4,
+ WLR_LED_LAST
+};
+
struct wlr_keyboard_state;
struct wlr_keyboard_impl;
struct wlr_keyboard {
struct wlr_keyboard_state *state;
struct wlr_keyboard_impl *impl;
+ uint32_t leds;
struct {
struct wl_signal key;
} events;
};
+void wlr_keyboard_led_update(struct wlr_keyboard *keyboard, uint32_t leds);
+
enum wlr_key_state {
WLR_KEY_RELEASED,
WLR_KEY_PRESSED,