Introduce named aliases for mouse buttons.

This increases readability and allows us to cover up the fact that
XCB doesn't define constants for left/right scrolling.
This commit is contained in:
Ingo Bürk
2017-02-12 20:36:42 +01:00
committed by Ingo Bürk
parent ad9c879cbd
commit 7732971ad8
3 changed files with 24 additions and 13 deletions

View File

@ -24,6 +24,17 @@
#define DEFAULT_DIR_MODE (S_IRWXU | S_IRGRP | S_IXGRP | S_IROTH | S_IXOTH)
/** Mouse buttons */
#define XCB_BUTTON_CLICK_LEFT XCB_BUTTON_INDEX_1
#define XCB_BUTTON_CLICK_MIDDLE XCB_BUTTON_INDEX_2
#define XCB_BUTTON_CLICK_RIGHT XCB_BUTTON_INDEX_3
#define XCB_BUTTON_SCROLL_UP XCB_BUTTON_INDEX_4
#define XCB_BUTTON_SCROLL_DOWN XCB_BUTTON_INDEX_5
/* xcb doesn't define constants for these. */
#define XCB_BUTTON_SCROLL_LEFT 6
#define XCB_BUTTON_SCROLL_RIGHT 7
/**
* XCB connection and root screen
*