-
Notifications
You must be signed in to change notification settings - Fork 9
/
Copy pathclasses.h
94 lines (74 loc) · 1.4 KB
/
classes.h
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
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
typedef enum FIT_TYPE {
CENTER,
TILE,
STRETCH,
FIT_AUTO,
FIT_HEIGHT,
FIT_WIDTH,
ZOOM
} fit_t;
typedef enum FLIP_TYPE {
NONE,
HORIZONTAL,
VERTICAL,
DIAGONAL
} flip_t;
typedef enum GRAVITY_TYPE {
PERCENTAGE,
POSITION
} gravity_t;
struct rgb_triple { int r, g, b; };
#ifdef HAVE_LIBXINERAMA
// used for quicksort
struct pair {
unsigned int index;
int value;
};
// comparison functions for pairs
int
ascending( const void *a, const void *b )
{
return ( (*((struct pair*) a)).value - (*((struct pair*) b)).value);
}
int
descending( const void *a, const void *b )
{
return ( (*((struct pair*) b)).value - (*((struct pair*) a)).value);
}
#endif
struct screen {
struct monitor **monitors;
unsigned int num_mons;
unsigned int screen_width;
unsigned int screen_height;
};
struct monitor {
unsigned int width;
unsigned int height;
unsigned int xpos;
unsigned int ypos;
struct wallpaper *wall;
};
struct wallpaper {
Imlib_Image image;
char *image_path;
unsigned int span;
unsigned int monitor;
unsigned int width;
unsigned int height;
int xpos;
int ypos;
gravity_t xg_type;
gravity_t yg_type;
float xg;
float yg;
struct rgb_triple *bgcol;
struct rgb_triple *tint;
unsigned int greyscale;
unsigned int blur;
unsigned int sharpen;
float contrast;
float brightness;
fit_t option;
flip_t axis;
};