From 632a04f1b7dea35f46a2fa478bf53869854a1b5e Mon Sep 17 00:00:00 2001
From: Drew DeVault <sir@cmpwn.com>
Date: Mon, 19 Jun 2017 15:15:37 -0400
Subject: Implement keyboard LEDs

---
 include/types.h     |  1 +
 include/wlr/types.h | 10 ++++++++++
 2 files changed, 11 insertions(+)

(limited to 'include')

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,
-- 
cgit v1.2.3