libxdo

Loading...
Searching...
No Matches
xdotool.h
1#ifndef _XDOTOOL_H_
2#define _XDOTOOL_H_
3
4#ifdef __cplusplus
5 extern "C" {
6#endif
7
8/* TODO(sissel): use proper printf format depending on the storage
9 * size of Window (could be 4 or 8 bytes depending on platform */
10#define window_print(window) (printf("%ld\n", window))
11#define window_each(context, window_arg, block) \
12{ \
13 Window *windows; \
14 int nwindows; \
15 window_list(context, window_arg, &windows, &nwindows, False); \
16 int w_index;\
17 for (w_index = 0; w_index < nwindows; w_index++) { \
18 Window window = windows[w_index]; \
19 { \
20 block \
21 } \
22 } \
23} /* end define window_each */
24
25
26
27 typedef struct context {
28 xdo_t *xdo;
29 const char *prog;
30 int argc;
31 char **argv;
32 int debug;
33
34 /* Window stack */
35 Window *windows;
36 int nwindows;
37 Window window_placeholder[1];
38
39 /* Last known mouse position */
40 int last_mouse_x;
41 int last_mouse_y;
42 int last_mouse_screen;
43 int have_last_mouse;
44} context_t;
45
46 int xdotool_main(int argc, char **argv);
47 int cmd_exec(context_t *context);
48 int cmd_sleep(context_t *context);
49 int cmd_behave(context_t *context);
50 int cmd_behave_screen_edge(context_t *context);
51 int cmd_click(context_t *context);
52 int cmd_getactivewindow(context_t *context);
53 int cmd_getmouselocation(context_t *context);
54 int cmd_getwindowfocus(context_t *context);
55 int cmd_getwindowname(context_t *context);
56 int cmd_getwindowclassname(context_t *context);
57 int cmd_getwindowpid(context_t *context);
58 int cmd_getwindowgeometry(context_t *context);
59 int cmd_help(context_t *context);
60 int cmd_key(context_t *context);
61 int cmd_mousedown(context_t *context);
62 int cmd_mousemove(context_t *context);
63 int cmd_mousemove_relative(context_t *context);
64 int cmd_mouseup(context_t *context);
65 int cmd_search(context_t *context);
66 int cmd_set_window(context_t *context);
67 int cmd_type(context_t *context);
68 int cmd_version(context_t *context);
69 int cmd_window_select(context_t *context);
70 int cmd_windowactivate(context_t *context);
71 int cmd_windowfocus(context_t *context);
72 int cmd_windowkill(context_t *context);
73 int cmd_windowclose(context_t *context);
74 int cmd_windowquit(context_t *context);
75 int cmd_windowmap(context_t *context);
76 int cmd_windowminimize(context_t *context);
77 int cmd_windowmove(context_t *context);
78 int cmd_windowraise(context_t *context);
79 int cmd_windowreparent(context_t *context);
80 int cmd_windowsize(context_t *context);
81 int cmd_windowstate(context_t *context);
82 int cmd_windowunmap(context_t *context);
83/* pager-like commands */
84 int cmd_set_num_desktops(context_t *context);
85 int cmd_get_num_desktops(context_t *context);
86 int cmd_set_desktop(context_t *context);
87 int cmd_get_desktop(context_t *context);
88 int cmd_set_desktop_for_window(context_t *context);
89 int cmd_get_desktop_for_window(context_t *context);
90 int cmd_set_desktop_viewport(context_t *context);
91 int cmd_get_desktop_viewport(context_t *context);
92 int cmd_get_display_geometry(context_t *context);
93
94#ifdef __cplusplus
95} /* extern "C" */
96#endif
97
98#endif /* _XDOTOOL_H_ */
context
Definition xdotool.h:27
xdo
The main context.
Definition xdo.h:78