summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJulien Danjou <julien@danjou.info>2009-04-14 11:44:06 +0200
committerArnaud Fontaine <arnau@debian.org>2010-11-14 19:51:10 +0900
commit02c8c43a95bad0a390764c8aafe0699b69e6ee40 (patch)
tree17140ed4b3cc0868a5b12efc08c68e942100d3b8
parentbd40d52032e2fe7307171dc090754550cb4a302d (diff)
event: add define to get request and error types
Signed-off-by: Julien Danjou <julien@danjou.info>
-rw-r--r--event/event.c2
-rw-r--r--event/xcb_event.h4
2 files changed, 4 insertions, 2 deletions
diff --git a/event/event.c b/event/event.c
index 743232b..ce83d6e 100644
--- a/event/event.c
+++ b/event/event.c
@@ -1,5 +1,5 @@
/*
- * Copyright © 2008 Julien Danjou <julien@danjou.info>
+ * Copyright © 2008-2009 Julien Danjou <julien@danjou.info>
*
* Permission is hereby granted, free of charge, to any person
* obtaining a copy of this software and associated documentation
diff --git a/event/xcb_event.h b/event/xcb_event.h
index 6326158..05b9cac 100644
--- a/event/xcb_event.h
+++ b/event/xcb_event.h
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2008 Julien Danjou <julien@danjou.info>
+ * Copyright (C) 2008-2009 Julien Danjou <julien@danjou.info>
*
* Permission is hereby granted, free of charge, to any person
* obtaining a copy of this software and associated documentation
@@ -55,6 +55,8 @@ extern "C" {
#define XCB_EVENT_RESPONSE_TYPE_MASK (0x7f)
#define XCB_EVENT_RESPONSE_TYPE(e) (e->response_type & XCB_EVENT_RESPONSE_TYPE_MASK)
#define XCB_EVENT_SENT(e) (e->response_type & ~XCB_EVENT_RESPONSE_TYPE_MASK)
+#define XCB_EVENT_ERROR_TYPE(e) (*((uint8_t *) e + 1))
+#define XCB_EVENT_REQUEST_TYPE(e) (*((uint8_t *) e + 10))
typedef int (*xcb_generic_event_handler_t)(void *data, xcb_connection_t *c, xcb_generic_event_t *event);
typedef int (*xcb_generic_error_handler_t)(void *data, xcb_connection_t *c, xcb_generic_error_t *error);