swc

Unnamed repository; edit this file 'description' to name the repository.
git clone git://git.nihaljere.xyz/swc
Log | Files | Refs | README | LICENSE

commit 315d441695670996edbbc799c82f77547af76ed4
parent 75b8e95ab939dbc2b4adf83ca8b07d8bb668b6ce
Author: Michael Forney <mforney@mforney.org>
Date:   Sun,  9 Feb 2014 04:01:19 -0800

bindings: Use an enum for modifiers

Diffstat:
Mlibswc/swc.h | 13++++++++-----
1 file changed, 8 insertions(+), 5 deletions(-)

diff --git a/libswc/swc.h b/libswc/swc.h @@ -174,11 +174,14 @@ struct swc_screen /* Bindings {{{ */ -#define SWC_MOD_CTRL (1 << 0) -#define SWC_MOD_ALT (1 << 1) -#define SWC_MOD_LOGO (1 << 2) -#define SWC_MOD_SHIFT (1 << 3) -#define SWC_MOD_ANY (-1) +enum +{ + SWC_MOD_CTRL = 1 << 0, + SWC_MOD_ALT = 1 << 1, + SWC_MOD_LOGO = 1 << 2, + SWC_MOD_SHIFT = 1 << 3, + SWC_MOD_ANY = ~0 +}; typedef void (* swc_binding_handler_t)(uint32_t time, uint32_t value, void * data);