source: branches/upstream/xdotool/current/xdo.h @ 1085

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

[svn-upgrade] Integrating new upstream version, xdotool (20080603)

File size: 2.4 KB
Line 
1/*
2 * xdo library header
3 * - include this if you have code that uses xdo
4 *
5 * $Id: xdo.h 1891 2008-06-03 09:00:20Z jordansissel $
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 SEARCH_IGNORE_TRANSIENTS (1L << 4)
16#define SEARCH_IGNORE_WINDOW_INPUTONLY (1L << 5)
17
18#define SIZE_USEHINTS (1L << 0)
19
20/* Map keysym name to actual ascii */
21typedef struct keysymcharmap {
22  const char *keysym;
23  char key;
24} keysymcharmap_t;
25
26/* map character to keycode */
27typedef struct charcodemap {
28  char key;
29  int code;
30  int shift;
31} charcodemap_t;
32
33typedef struct xdo {
34  Display *xdpy;
35  char *display_name;
36  charcodemap_t *charcodes;
37  int keycode_high; /* highest and lowest keycodes */
38  int keycode_low;  /* used by this X server */
39
40  int close_display_when_freed;
41} xdo_t;
42
43xdo_t* xdo_new(char *display);
44xdo_t* xdo_new_with_opened_display(Display *xdpy, const char *display,
45                                   int close_display_when_freed);
46void xdo_free(xdo_t *xdo);
47
48int xdo_mousemove(xdo_t *xdo, int x, int y);
49int xdo_mousemove_relative(xdo_t *xdo, int x, int y);
50int xdo_mousedown(xdo_t *xdo, int button);
51int xdo_mouseup(xdo_t *xdo, int button);
52
53int xdo_click(xdo_t *xdo, int button);
54
55int xdo_type(xdo_t *xdo, char *string);
56int xdo_keysequence(xdo_t *xdo, char *keysequence);
57int xdo_keysequence_up(xdo_t *xdo, char *keysequence);
58int xdo_keysequence_down(xdo_t *xdo, char *keysequence);
59
60int xdo_window_move(xdo_t *xdo, Window wid, int x, int y);
61int xdo_window_setsize(xdo_t *xdo, Window wid, int w, int h, int flags);
62int xdo_window_focus(xdo_t *xdo, Window wid);
63int xdo_window_raise(xdo_t *xdo, Window wid);
64int xdo_window_get_focus(xdo_t *xdo, Window *window_ret);
65int xdo_window_activate(xdo_t *xdo, Window wid);
66
67int xdo_window_map(xdo_t *xdo, Window wid);
68int xdo_window_unmap(xdo_t *xdo, Window wid);
69
70/* pager-like behaviors */
71int xdo_set_number_of_desktops(xdo_t *xdo, long ndesktops);
72int xdo_get_number_of_desktops(xdo_t *xdo, long *ndesktops);
73int xdo_set_current_desktop(xdo_t *xdo, long desktop);
74int xdo_get_current_desktop(xdo_t *xdo, long *desktop);
75int xdo_set_desktop_for_window(xdo_t *xdo, Window wid, long desktop);
76int xdo_get_desktop_for_window(xdo_t *xdo, Window wid, long *desktop);
77
78/* Returns: windowlist and nwindows */
79int xdo_window_list_by_regex(xdo_t *xdo, char *regex, int flags,
80                             Window **windowlist, int *nwindows);
Note: See TracBrowser for help on using the repository browser.