compositor: add a way to change the keyboard locks

This adds a function weston_keyboard_set_locks() which can be used to
change the state of the num lock and the caps locks, changing the leds too.
Only the evdev and libinput backends supports this, since it doesn't make
sense for embedded sessions.

Tested-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
diff --git a/src/compositor.h b/src/compositor.h
index 24a9768..a40dabd 100644
--- a/src/compositor.h
+++ b/src/compositor.h
@@ -68,6 +68,11 @@
 	MODIFIER_SHIFT = (1 << 3),
 };
 
+enum weston_keyboard_locks {
+	WESTON_NUM_LOCK = (1 << 0),
+	WESTON_CAPS_LOCK = (1 << 1),
+};
+
 enum weston_led {
 	LED_NUM_LOCK = (1 << 0),
 	LED_CAPS_LOCK = (1 << 1),
@@ -393,6 +398,13 @@
 			   struct weston_keyboard_grab *grab);
 void
 weston_keyboard_end_grab(struct weston_keyboard *keyboard);
+int
+/*
+ * 'mask' and 'value' should be a bitwise mask of one or more
+ * valued of the weston_keyboard_locks enum.
+ */
+weston_keyboard_set_locks(struct weston_keyboard *keyboard,
+			  uint32_t mask, uint32_t value);
 
 struct weston_touch *
 weston_touch_create(void);