wmclock: Bump to version 1.0.15.
[dockapps.git] / wmix / include / common.h
blob6d6e89567fff969266d9a1308d2e918a883caa3b
1 /* WMix 3.0 -- a mixer using the OSS mixer API.
2 * Copyright (C) 2000, 2001
3 * Daniel Richard G. <skunk@mit.edu>,
4 * timecop <timecop@japan.co.jp>
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; either version 2 of the License, or
9 * (at your option) any later version.
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
16 * You should have received a copy of the GNU General Public License
17 * along with this program; if not, write to the Free Software
18 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
21 typedef unsigned int bool;
23 #define false 0
24 #define true (!false)
26 #define NULL_CURSOR 1
27 #define NORMAL_CURSOR 2
28 #define HAND_CURSOR 3
29 #define BAR_CURSOR 4
31 #define MIN(a, b) (((a) < (b)) ? (a) : (b))
32 #define MAX(a, b) (((a) > (b)) ? (a) : (b))
33 #define CLAMP(x, low, high) (((x) > (high)) ? (high) : (((x) < (low)) ? (low) : (x)))
35 #define MAX_DOUBLE_CLICK_TIME 0.5
38 * Get the number of element in a static array
40 * Do not use on an allocated array, it will not work
42 #define lengthof(arr) \
43 ((ssize_t)(sizeof( arr ) / sizeof( arr[0] )))