projects
/
platform
/
upstream
/
kmscon.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
51bfe9d
)
uterm_input: introduce UTERM_INPUT_HAS_MODS()
author
David Herrmann
<dh.herrmann@googlemail.com>
Sun, 27 May 2012 14:43:26 +0000
(16:43 +0200)
committer
David Herrmann
<dh.herrmann@googlemail.com>
Sun, 27 May 2012 14:43:26 +0000
(16:43 +0200)
This is a convenient macro to check whether a given set of modifiers is
enabled on the given input event.
Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
src/uterm.h
patch
|
blob
|
history
diff --git
a/src/uterm.h
b/src/uterm.h
index
967961e
..
413d600
100644
(file)
--- a/
src/uterm.h
+++ b/
src/uterm.h
@@
-253,6
+253,8
@@
struct uterm_input_event {
uint32_t unicode; /* ucs4 unicode value or UTERM_INPUT_INVALID */
};
+#define UTERM_INPUT_HAS_MODS(_ev, _mods) (((_ev)->mods & (_mods)) == (_mods))
+
typedef void (*uterm_input_cb) (struct uterm_input *input,
struct uterm_input_event *ev,
void *data);