Use enum wl_keyboard_key_state instead of integer

Instead of using a uint32_t for state everywhere (except on the wire,
where that's still the call signature), use the new
wl_keyboard_key_state enum, and explicit comparisons.

Signed-off-by: Daniel Stone <daniel@fooishbar.org>
diff --git a/clients/eventdemo.c b/clients/eventdemo.c
index cb8cbbf..daf3283 100644
--- a/clients/eventdemo.c
+++ b/clients/eventdemo.c
@@ -188,15 +188,19 @@
  */
 static void
 key_handler(struct window *window, struct input *input, uint32_t time,
-            uint32_t key, uint32_t unicode, uint32_t state, void *data)
+            uint32_t key, uint32_t unicode, enum wl_keyboard_key_state state,
+	    void *data)
 {
 	uint32_t modifiers = input_get_modifiers(input);
 
 	if(!log_key)
 		return;
 
-	printf("key key: %d, unicode: %d, state: %d, modifiers: %d\n",
-	       key, unicode, state, modifiers);
+	printf("key key: %d, unicode: %d, state: %s, modifiers: 0x%x\n",
+	       key, unicode,
+	       (state == WL_KEYBOARD_KEY_STATE_PRESSED) ? "pressed" :
+							  "released",
+	       modifiers);
 }
 
 /**