41#define SIZE_USEHINTS (1L << 0)
42#define SIZE_USEHINTS_X (1L << 1)
43#define SIZE_USEHINTS_Y (1L << 2)
53#define CURRENTWINDOW (0)
87 charcodemap_t *charcodes;
99 int keysyms_per_keycode;
120#define SEARCH_TITLE (1UL << 0)
126#define SEARCH_CLASS (1UL << 1)
132#define SEARCH_NAME (1UL << 2)
138#define SEARCH_PID (1UL << 3)
144#define SEARCH_ONLYVISIBLE (1UL << 4)
151#define SEARCH_SCREEN (1UL << 5)
157#define SEARCH_CLASSNAME (1UL << 6)
164#define SEARCH_DESKTOP (1UL << 7)
170#define SEARCH_ROLE (1UL << 8)
191 enum { SEARCH_ANY, SEARCH_ALL } require;
216xdo_t* xdo_new(
const char *display);
226xdo_t* xdo_new_with_opened_display(Display *xdpy,
const char *display,
227 int close_display_when_freed);
232const char *xdo_version(
void);
248int xdo_move_mouse(
const xdo_t *
xdo,
int x,
int y,
int screen);
257int xdo_move_mouse_relative_to_window(
const xdo_t *
xdo, Window window,
int x,
int y);
265int xdo_move_mouse_relative(
const xdo_t *
xdo,
int x,
int y);
275int xdo_mouse_down(
const xdo_t *
xdo, Window window,
int button);
285int xdo_mouse_up(
const xdo_t *
xdo, Window window,
int button);
294int xdo_get_mouse_location(
const xdo_t *
xdo,
int *x,
int *y,
int *screen_num);
301int xdo_get_window_at_mouse(
const xdo_t *
xdo, Window *window_ret);
315int xdo_get_mouse_location2(
const xdo_t *
xdo,
int *x_ret,
int *y_ret,
316 int *screen_num_ret, Window *window_ret);
325int xdo_wait_for_mouse_move_from(
const xdo_t *
xdo,
int origin_x,
int origin_y);
334int xdo_wait_for_mouse_move_to(
const xdo_t *
xdo,
int dest_x,
int dest_y);
343int xdo_click_window(
const xdo_t *
xdo, Window window,
int button);
353int xdo_click_window_multiple(
const xdo_t *
xdo, Window window,
int button,
354 int repeat, useconds_t delay);
367int xdo_enter_text_window(
const xdo_t *
xdo, Window window,
const char *
string, useconds_t delay);
390int xdo_send_keysequence_window(
const xdo_t *
xdo, Window window,
391 const char *keysequence, useconds_t delay);
398int xdo_send_keysequence_window_up(
const xdo_t *
xdo, Window window,
399 const char *keysequence, useconds_t delay);
406int xdo_send_keysequence_window_down(
const xdo_t *
xdo, Window window,
407 const char *keysequence, useconds_t delay);
420int xdo_send_keysequence_window_list_do(
const xdo_t *
xdo, Window window,
421 charcodemap_t *keys,
int nkeys,
422 int pressed,
int *modifier, useconds_t delay);
437int xdo_wait_for_window_map_state(
const xdo_t *
xdo, Window wid,
int map_state);
441int xdo_wait_for_window_size(
const xdo_t *
xdo, Window window,
unsigned int width,
442 unsigned int height,
int flags,
int to_or_from);
454int xdo_move_window(
const xdo_t *
xdo, Window wid,
int x,
int y);
468int xdo_translate_window_with_sizehint(
const xdo_t *
xdo, Window window,
469 unsigned int width,
unsigned int height,
470 unsigned int *width_ret,
unsigned int *height_ret);
481int xdo_set_window_size(
const xdo_t *
xdo, Window wid,
int w,
int h,
int flags);
492int xdo_set_window_property(
const xdo_t *
xdo, Window wid,
const char *property,
501int xdo_set_window_class(
const xdo_t *
xdo, Window wid,
const char *name,
507int xdo_set_window_urgency (
const xdo_t *
xdo, Window wid,
int urgency);
518int xdo_set_window_override_redirect(
const xdo_t *
xdo, Window wid,
519 int override_redirect);
527int xdo_focus_window(
const xdo_t *
xdo, Window wid);
535int xdo_raise_window(
const xdo_t *
xdo, Window wid);
543int xdo_lower_window(
const xdo_t *
xdo, Window wid);
551int xdo_get_focused_window(
const xdo_t *
xdo, Window *window_ret);
559int xdo_wait_for_window_focus(
const xdo_t *
xdo, Window window,
int want_focus);
568int xdo_get_pid_window(
const xdo_t *
xdo, Window window);
579int xdo_get_focused_window_sane(
const xdo_t *
xdo, Window *window_ret);
592int xdo_activate_window(
const xdo_t *
xdo, Window wid);
603int xdo_wait_for_window_active(
const xdo_t *
xdo, Window window,
int active);
611int xdo_map_window(
const xdo_t *
xdo, Window wid);
618int xdo_unmap_window(
const xdo_t *
xdo, Window wid);
623int xdo_minimize_window(
const xdo_t *
xdo, Window wid);
625#define _NET_WM_STATE_REMOVE 0
626#define _NET_WM_STATE_ADD 1
627#define _NET_WM_STATE_TOGGLE 2
634int xdo_get_window_classname(
const xdo_t *
xdo, Window window,
unsigned char **class_ret);
640int xdo_window_state(
xdo_t *
xdo, Window window,
unsigned long action,
const char *property);
648int xdo_reparent_window(
const xdo_t *
xdo, Window wid_source, Window wid_target);
661int xdo_get_window_location(
const xdo_t *
xdo, Window wid,
662 int *x_ret,
int *y_ret, Screen **screen_ret);
671int xdo_get_window_size(
const xdo_t *
xdo, Window wid,
unsigned int *width_ret,
672 unsigned int *height_ret);
683int xdo_get_active_window(
const xdo_t *
xdo, Window *window_ret);
691int xdo_select_window_with_click(
const xdo_t *
xdo, Window *window_ret);
699int xdo_set_number_of_desktops(
const xdo_t *
xdo,
long ndesktops);
708int xdo_get_number_of_desktops(
const xdo_t *
xdo,
long *ndesktops);
716int xdo_set_current_desktop(
const xdo_t *
xdo,
long desktop);
724int xdo_get_current_desktop(
const xdo_t *
xdo,
long *desktop);
733int xdo_set_desktop_for_window(
const xdo_t *
xdo, Window wid,
long desktop);
745int xdo_get_desktop_for_window(
const xdo_t *
xdo, Window wid,
long *desktop);
756 Window **windowlist_ret,
unsigned int *nwindows_ret);
769unsigned char *xdo_get_window_property_by_atom(
const xdo_t *
xdo, Window window, Atom atom,
770 long *nitems, Atom *type,
int *size);
783int xdo_get_window_property(
const xdo_t *
xdo, Window window,
const char *property,
784 unsigned char **value,
long *nitems, Atom *type,
int *size);
793unsigned int xdo_get_input_state(
const xdo_t *
xdo);
803const char **xdo_get_symbol_map(
void);
814int xdo_get_active_modifiers(
const xdo_t *
xdo, charcodemap_t **keys,
822int xdo_clear_active_modifiers(
const xdo_t *
xdo, Window window,
823 charcodemap_t *active_mods,
831int xdo_set_active_modifiers(
const xdo_t *
xdo, Window window,
832 charcodemap_t *active_mods,
841int xdo_get_desktop_viewport(
const xdo_t *
xdo,
int *x_ret,
int *y_ret);
849int xdo_set_desktop_viewport(
const xdo_t *
xdo,
int x,
int y);
855int xdo_kill_window(
const xdo_t *
xdo, Window window);
861int xdo_close_window(
const xdo_t *
xdo, Window window);
867int xdo_quit_window(
const xdo_t *
xdo, Window window);
872#define XDO_FIND_PARENTS (0)
877#define XDO_FIND_CHILDREN (1)
883int xdo_find_window_client(
const xdo_t *
xdo, Window window, Window *window_ret,
894int xdo_get_window_name(
const xdo_t *
xdo, Window window,
895 unsigned char **name_ret,
int *name_len_ret,
906void xdo_disable_feature(
xdo_t *
xdo,
int feature);
916void xdo_enable_feature(
xdo_t *
xdo,
int feature);
926int xdo_has_feature(
xdo_t *
xdo,
int feature);
935int xdo_get_viewport_dimensions(
xdo_t *
xdo,
unsigned int *width,
936 unsigned int *height,
int screen);
int modmask
the keyboard group that has this key in it
Definition xdo.h:65
int group
the symbol representing this key
Definition xdo.h:64
KeySym symbol
the keycode that this key is on
Definition xdo.h:63
KeyCode code
the letter for this key, like 'a'
Definition xdo.h:62
int needs_binding
the modifiers to apply when sending this key
Definition xdo.h:68
The window search query structure.
Definition xdo.h:177
long desktop
What desktop to search, if any.
Definition xdo.h:199
unsigned int limit
How many results to return?
Definition xdo.h:202
const char * winclassname
pattern to test against a window class
Definition xdo.h:180
int screen
boolean; set true to search only visible windows
Definition xdo.h:186
unsigned int searchmask
bitmask of things you are searching for, such as SEARCH_NAME, etc.
Definition xdo.h:196
int only_visible
depth of search.
Definition xdo.h:185
int pid
pattern to test against a window role
Definition xdo.h:183
const char * winrole
pattern to test against a window name
Definition xdo.h:182
const char * winclass
pattern to test against a window title
Definition xdo.h:179
long max_depth
window pid (From window atom _NET_WM_PID)
Definition xdo.h:184
const char * winname
pattern to test against a window class
Definition xdo.h:181
The main context.
Definition xdo.h:78
int debug
Enable debug output?
Definition xdo.h:108
int features_mask
Feature flags, such as XDO_FEATURE_XTEST, etc...
Definition xdo.h:111
int quiet
Be extra quiet?
Definition xdo.h:105
int close_display_when_freed
Should we close the display when calling xdo_free?
Definition xdo.h:102
Display * xdpy
The Display for Xlib.
Definition xdo.h:81
char * display_name
The display name, if any.
Definition xdo.h:84
struct xdo xdo_t
The main context.
struct xdo_search xdo_search_t
The window search query structure.
int xdo_search_windows(const xdo_t *xdo, const xdo_search_t *search, Window **windowlist_ret, unsigned int *nwindows_ret)
Search for windows.
Definition xdo_search.c:32