
29 Apr
2013
29 Apr
'13
7:58 p.m.
2013/4/29 Jon Cruz <jon@...18...>:
A C cleanup could be #define MOD__SHIFT(event) ((event)->key.state & GDK_SHIFT_MASK)
But since we don't want macros at all, we can use a different approach. A non-friend, non-member helper function can work
bool isModSetShift(GdkEvent const *event) { return event->key.state & GDK_SHIFT_MASK; }
Two remarks 1. These functions are already present in src/ui/tool/event-utils.h, it's just a matter of using them 2. According to our coding conventions, static and global functions are supposed to use names_with_underscores
Regards, Krzysztof