11 #include <sys/types.h>
37 #define SIZE_USEHINTS (1L << 0)
38 #define SIZE_USEHINTS_X (1L << 1)
39 #define SIZE_USEHINTS_Y (1L << 2)
49 #define CURRENTWINDOW (0)
98 XModifierKeymap *modmap;
110 int keysyms_per_keycode;
137 unsigned int input_state;
145 #define SEARCH_TITLE (1UL << 0)
151 #define SEARCH_CLASS (1UL << 1)
157 #define SEARCH_NAME (1UL << 2)
163 #define SEARCH_PID (1UL << 3)
169 #define SEARCH_ONLYVISIBLE (1UL << 4)
176 #define SEARCH_SCREEN (1UL << 5)
182 #define SEARCH_CLASSNAME (1UL << 6)
189 #define SEARCH_DESKTOP (1UL << 7)
210 enum { SEARCH_ANY, SEARCH_ALL } require;
225 #define XDO_SUCCESS 0
235 xdo_t* xdo_new(
char *display);
245 xdo_t* xdo_new_with_opened_display(Display *xdpy,
const char *display,
246 int close_display_when_freed);
251 const char *xdo_version(
void);
267 int xdo_mousemove(
const xdo_t *
xdo,
int x,
int y,
int screen);
276 int xdo_mousemove_relative_to_window(
const xdo_t *
xdo, Window window,
int x,
int y);
284 int xdo_mousemove_relative(
const xdo_t *
xdo,
int x,
int y);
294 int xdo_mousedown(
const xdo_t *
xdo, Window window,
int button);
304 int xdo_mouseup(
const xdo_t *
xdo, Window window,
int button);
313 int xdo_mouselocation(
const xdo_t *
xdo,
int *x,
int *y,
int *screen_num);
320 int xdo_mousewindow(
const xdo_t *
xdo, Window *window_ret);
334 int xdo_mouselocation2(
const xdo_t *
xdo,
int *x_ret,
int *y_ret,
335 int *screen_num_ret, Window *window_ret);
344 int xdo_mouse_wait_for_move_from(
const xdo_t *
xdo,
int origin_x,
int origin_y);
353 int xdo_mouse_wait_for_move_to(
const xdo_t *
xdo,
int dest_x,
int dest_y);
362 int xdo_click(
const xdo_t *
xdo, Window window,
int button);
372 int xdo_click_multiple(
const xdo_t *
xdo, Window window,
int button,
373 int repeat, useconds_t delay);
386 int xdo_type(
const xdo_t *
xdo, Window window,
const char *
string, useconds_t delay);
409 int xdo_keysequence(
const xdo_t *
xdo, Window window,
410 const char *keysequence, useconds_t delay);
417 int xdo_keysequence_up(
const xdo_t *
xdo, Window window,
418 const char *keysequence, useconds_t delay);
425 int xdo_keysequence_down(
const xdo_t *
xdo, Window window,
426 const char *keysequence, useconds_t delay);
439 int xdo_keysequence_list_do(
const xdo_t *
xdo, Window window,
441 int pressed,
int *modifier, useconds_t delay);
465 int xdo_window_wait_for_map_state(
const xdo_t *
xdo, Window wid,
int map_state);
469 int xdo_window_wait_for_size(
const xdo_t *
xdo, Window window,
unsigned int width,
470 unsigned int height,
int flags,
int to_or_from);
482 int xdo_window_move(
const xdo_t *
xdo, Window wid,
int x,
int y);
496 int xdo_window_translate_with_sizehint(
const xdo_t *
xdo, Window window,
497 int width,
int height,
int *width_ret,
509 int xdo_window_setsize(
const xdo_t *
xdo, Window wid,
int w,
int h,
int flags);
520 int xdo_window_setprop (
const xdo_t *
xdo, Window wid,
const char *property,
529 int xdo_window_setclass(
const xdo_t *
xdo, Window wid,
const char *name,
535 int xdo_window_seturgency (
const xdo_t *
xdo, Window wid,
int urgency);
546 int xdo_window_set_override_redirect(
const xdo_t *
xdo, Window wid,
547 int override_redirect);
555 int xdo_window_focus(
const xdo_t *
xdo, Window wid);
563 int xdo_window_raise(
const xdo_t *
xdo, Window wid);
571 int xdo_window_get_focus(
const xdo_t *
xdo, Window *window_ret);
579 int xdo_window_wait_for_focus(
const xdo_t *
xdo, Window window,
int want_focus);
588 int xdo_window_get_pid(
const xdo_t *
xdo, Window window);
599 int xdo_window_sane_get_focus(
const xdo_t *
xdo, Window *window_ret);
612 int xdo_window_activate(
const xdo_t *
xdo, Window wid);
623 int xdo_window_wait_for_active(
const xdo_t *
xdo, Window window,
int active);
631 int xdo_window_map(
const xdo_t *
xdo, Window wid);
638 int xdo_window_unmap(
const xdo_t *
xdo, Window wid);
643 int xdo_window_minimize(
const xdo_t *
xdo, Window wid);
651 int xdo_window_reparent(
const xdo_t *
xdo, Window wid_source, Window wid_target);
664 int xdo_get_window_location(
const xdo_t *
xdo, Window wid,
665 int *x_ret,
int *y_ret, Screen **screen_ret);
674 int xdo_get_window_size(
const xdo_t *
xdo, Window wid,
unsigned int *width_ret,
675 unsigned int *height_ret);
686 int xdo_window_get_active(
const xdo_t *
xdo, Window *window_ret);
694 int xdo_window_select_with_click(
const xdo_t *
xdo, Window *window_ret);
702 int xdo_set_number_of_desktops(
const xdo_t *
xdo,
long ndesktops);
711 int xdo_get_number_of_desktops(
const xdo_t *
xdo,
long *ndesktops);
719 int xdo_set_current_desktop(
const xdo_t *
xdo,
long desktop);
727 int xdo_get_current_desktop(
const xdo_t *
xdo,
long *desktop);
736 int xdo_set_desktop_for_window(
const xdo_t *
xdo, Window wid,
long desktop);
748 int xdo_get_desktop_for_window(
const xdo_t *
xdo, Window wid,
long *desktop);
759 Window **windowlist_ret,
int *nwindows_ret);
772 unsigned char *xdo_getwinprop(
const xdo_t *
xdo, Window window, Atom atom,
773 long *nitems, Atom *type,
int *size);
782 unsigned int xdo_get_input_state(
const xdo_t *
xdo);
798 const char **xdo_symbol_map(
void);
812 int xdo_clear_active_modifiers(
const xdo_t *
xdo, Window window,
820 int xdo_set_active_modifiers(
const xdo_t *
xdo, Window window,
834 int xdo_get_desktop_viewport(
const xdo_t *
xdo,
int *x_ret,
int *y_ret);
842 int xdo_set_desktop_viewport(
const xdo_t *
xdo,
int x,
int y);
848 int xdo_window_kill(
const xdo_t *
xdo, Window window);
853 #define XDO_FIND_PARENTS (0)
858 #define XDO_FIND_CHILDREN (1)
864 int xdo_window_find_client(
const xdo_t *
xdo, Window window, Window *window_ret,
872 int xdo_get_window_name(
const xdo_t *
xdo, Window window,
873 unsigned char **name_ret,
int *name_len_ret,
884 void xdo_disable_feature(
xdo_t *
xdo,
int feature);
894 void xdo_enable_feature(
xdo_t *
xdo,
int feature);
904 int xdo_has_feature(
xdo_t *
xdo,
int feature);
909 int xdo_get_viewport_dimensions(
xdo_t *
xdo,
unsigned int *width,
910 unsigned int *height,
int screen);