Skip to content

Commit

Permalink
event: add define to get request and error types
Browse files Browse the repository at this point in the history
Signed-off-by: Julien Danjou <[email protected]>
  • Loading branch information
jd committed Apr 14, 2009
1 parent 84f8352 commit 6ff3c2b
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 1 addition & 1 deletion event/event.c
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright © 2008 Julien Danjou <[email protected]>
* Copyright © 2008-2009 Julien Danjou <[email protected]>
*
* Permission is hereby granted, free of charge, to any person
* obtaining a copy of this software and associated documentation
Expand Down
4 changes: 3 additions & 1 deletion event/xcb_event.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (C) 2008 Julien Danjou <[email protected]>
* Copyright (C) 2008-2009 Julien Danjou <[email protected]>
*
* Permission is hereby granted, free of charge, to any person
* obtaining a copy of this software and associated documentation
Expand Down Expand Up @@ -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);
Expand Down

0 comments on commit 6ff3c2b

Please sign in to comment.