forked from jordansissel/xdotool
-
Notifications
You must be signed in to change notification settings - Fork 0
/
xdotool.h
88 lines (80 loc) · 2.72 KB
/
xdotool.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
#ifndef _XDOTOOL_H_
#define _XDOTOOL_H_
/* TODO(sissel): use proper printf format depending on the storage
* size of Window (could be 4 or 8 bytes depending on platform */
#define window_print(window) (printf("%ld\n", window))
#define window_each(context, window_arg, block) \
{ \
Window *windows; \
int nwindows; \
window_list(context, window_arg, &windows, &nwindows, False); \
int w_index;\
for (w_index = 0; w_index < nwindows; w_index++) { \
Window window = windows[w_index]; \
{ \
block \
} \
} \
} /* end define window_each */
typedef struct context {
xdo_t *xdo;
const char *prog;
int argc;
char **argv;