mirror of
https://github.com/labwc/labwc.git
synced 2025-11-01 22:58:47 -04:00
include: Add min/max helpers
Signed-off-by: Joshua Ashton <joshua@froggi.es>
This commit is contained in:
parent
8652f97887
commit
a6e1ee0a25
1 changed files with 10 additions and 0 deletions
|
|
@ -41,6 +41,16 @@
|
|||
#define XCURSOR_SIZE 24
|
||||
#define XCURSOR_MOVE "grabbing"
|
||||
|
||||
#define max(a,b) \
|
||||
({ __typeof__ (a) _a = (a); \
|
||||
__typeof__ (b) _b = (b); \
|
||||
_a > _b ? _a : _b; })
|
||||
|
||||
#define min(a,b) \
|
||||
({ __typeof__ (a) _a = (a); \
|
||||
__typeof__ (b) _b = (b); \
|
||||
_a < _b ? _a : _b; })
|
||||
|
||||
enum input_mode {
|
||||
LAB_INPUT_STATE_PASSTHROUGH = 0,
|
||||
LAB_INPUT_STATE_MOVE,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue