summaryrefslogtreecommitdiff
path: root/src/typedefs.h
blob: c2b82cedfe064264b76eeb9ba625ca0259561a33 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
#ifndef _TYPEDEFS_H_
#define _TYPEDEFS_H_

/* Vchan/Xenstore parameters */
#define LINPICKER_TOKEN "@i"
#define LINPICKER_VPORT 6000

/* Security label dimensions */
#define FONT_FILE PKGDATADIR "/decker.ttf"
#define BFONT_HEIGHT 18
#define SFONT_HEIGHT 14
#define SECLABEL_HEIGHT (BFONT_HEIGHT + 6)
#define MOUSELABEL_HEIGHT (SFONT_HEIGHT + 8)
#define MOUSELABEL_WIDTH MOUSELABEL_HEIGHT
#define MOUSELABEL_OFFSET 0
#define MAX_THUMBS 5
#define THUMB_SCALE 6
#define THUMB_PAD 25
#define BORDER_WIDTH 2
#define CURSOR_WIDTH 10

/* General defines */
#define NITPICKER_OK                   0
#define NITPICKER_ERR_ILLEGAL_ID     -11
#define NITPICKER_ERR_OUT_OF_MEM     -12
#define NITPICKER_ERR_OUT_OF_CLIENTS -13
#define NITPICKER_ERR_OUT_OF_BUFS    -14
#define NITPICKER_ERR_OUT_OF_VIEWS   -15
#define NITPICKER_ERR_NO_BUFFER      -16

#define STATE_FREE      0
#define STATE_ALLOCATED 1

/* Utility macros */
#define ARRAY_SIZE(a) (sizeof(a)/sizeof(*a))

#ifndef MAX
#define MAX(a,b) ((a)>(b)?(a):(b))
#endif

#ifndef MIN
#define MIN(a,b) ((a)<(b)?(a):(b))
#endif

#endif