source: trunk/xdotool/xdo.h @ 1068

Last change on this file since 1068 was 1068, checked in by dkg, 5 years ago

xdotool: changes to appease gcc and reduce warnings.

File size: 1.9 KB
Line 
1/*
2 * xdo library header
3 * - include this if you have code that uses xdo
4 *
5 * $Id: xdo.h 1538 2007-09-04 06:00:24Z psionic $
6 */
7
8#include <X11/Xlib.h>
9
10#define SEARCH_VISIBLEONLY (1L << 0)
11#define SEARCH_TITLE (1L << 1)
12#define SEARCH_CLASS (1L << 2)
13#define SEARCH_NAME (1L << 3)
14
15#define SIZE_USEHINTS (1L << 0)
16
17/* Map keysym name to actual ascii */
18typedef struct keysymcharmap {
19  const char *keysym;
20  const char key;
21} keysymcharmap_t;
22
23/* map character to keycode */
24typedef struct charcodemap {
25  char key;
26  int code;
27  int shift;
28} charcodemap_t;
29
30typedef struct xdo {
31  Display *xdpy;
32  char *display_name;
33  charcodemap_t *charcodes;
34  int keycode_high; /* highest and lowest keycodes */
35  int keycode_low;  /* used by this X server */
36
37  int close_display_when_freed;
38} xdo_t;
39
40
41xdo_t* xdo_new(char *display);
42xdo_t* xdo_new_with_opened_display(Display *xdpy, const char *display,
43                                   int close_display_when_freed);
44void xdo_free(xdo_t *xdo);
45
46int xdo_mousemove(xdo_t *xdo, int x, int y);
47int xdo_mousemove_relative(xdo_t *xdo, int x, int y);
48int xdo_mousedown(xdo_t *xdo, uint button);
49int xdo_mouseup(xdo_t *xdo, uint button);
50
51int xdo_click(xdo_t *xdo, uint button);
52
53int xdo_type(xdo_t *xdo, char *string);
54int xdo_keysequence(xdo_t *xdo, char *keysequence);
55int xdo_keysequence_up(xdo_t *xdo, char *keysequence);
56int xdo_keysequence_down(xdo_t *xdo, char *keysequence);
57
58int xdo_window_move(xdo_t *xdo, Window wid, int x, int y);
59int xdo_window_setsize(xdo_t *xdo, Window wid, int w, int h, int flags);
60int xdo_window_focus(xdo_t *xdo, Window wid);
61int xdo_window_raise(xdo_t *xdo, Window wid);
62int xdo_window_get_focus(xdo_t *xdo, Window *window_ret);
63
64int xdo_window_map(xdo_t *xdo, Window wid);
65int xdo_window_unmap(xdo_t *xdo, Window wid);
66
67/* Returns: windowlist and nwindows */
68void xdo_window_list_by_regex(xdo_t *xdo, char *regex, int flags,
69                              Window **windowlist, int *nwindows);
Note: See TracBrowser for help on using the repository browser.