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;
131 #define SEARCH_TITLE (1UL << 0)
137 #define SEARCH_CLASS (1UL << 1)
143 #define SEARCH_NAME (1UL << 2)
149 #define SEARCH_PID (1UL << 3)
155 #define SEARCH_ONLYVISIBLE (1UL << 4)
162 #define SEARCH_SCREEN (1UL << 5)
168 #define SEARCH_CLASSNAME (1UL << 6)
175 #define SEARCH_DESKTOP (1UL << 7)
196 enum { SEARCH_ANY, SEARCH_ALL }
require;
211 #define XDO_SUCCESS 0
221 xdo_t* xdo_new(
const char *display);
231 xdo_t* xdo_new_with_opened_display(Display *xdpy,
const char *display,
232 int close_display_when_freed);
237 const char *xdo_version(
void);
253 int xdo_move_mouse(
const xdo_t *
xdo,
int x,
int y,
int screen);
262 int xdo_move_mouse_relative_to_window(
const xdo_t *
xdo, Window window,
int x,
int y);
270 int xdo_move_mouse_relative(
const xdo_t *
xdo,
int x,
int y);
280 int xdo_mouse_down(
const xdo_t *
xdo, Window window,
int button);
290 int xdo_mouse_up(
const xdo_t *
xdo, Window window,
int button);
299 int xdo_get_mouse_location(
const xdo_t *
xdo,
int *x,
int *y,
int *screen_num);
306 int xdo_get_window_at_mouse(
const xdo_t *
xdo, Window *window_ret);
320 int xdo_get_mouse_location2(
const xdo_t *
xdo,
int *x_ret,
int *y_ret,
321 int *screen_num_ret, Window *window_ret);
330 int xdo_wait_for_mouse_move_from(
const xdo_t *
xdo,
int origin_x,
int origin_y);
339 int xdo_wait_for_mouse_move_to(
const xdo_t *
xdo,
int dest_x,
int dest_y);
348 int xdo_click_window(
const xdo_t *
xdo, Window window,
int button);
358 int xdo_click_window_multiple(
const xdo_t *
xdo, Window window,
int button,
359 int repeat, useconds_t delay);
372 int xdo_enter_text_window(
const xdo_t *
xdo, Window window,
const char *
string, useconds_t delay);
395 int xdo_send_keysequence_window(
const xdo_t *
xdo, Window window,
396 const char *keysequence, useconds_t delay);
403 int xdo_send_keysequence_window_up(
const xdo_t *
xdo, Window window,
404 const char *keysequence, useconds_t delay);
411 int xdo_send_keysequence_window_down(
const xdo_t *
xdo, Window window,
412 const char *keysequence, useconds_t delay);
425 int xdo_send_keysequence_window_list_do(
const xdo_t *
xdo, Window window,
427 int pressed,
int *modifier, useconds_t delay);
451 int xdo_wait_for_window_map_state(
const xdo_t *
xdo, Window wid,
int map_state);
455 int xdo_wait_for_window_size(
const xdo_t *
xdo, Window window,
unsigned int width,
456 unsigned int height,
int flags,
int to_or_from);
468 int xdo_move_window(
const xdo_t *
xdo, Window wid,
int x,
int y);
482 int xdo_translate_window_with_sizehint(
const xdo_t *
xdo, Window window,
483 unsigned int width,
unsigned int height,
484 unsigned int *width_ret,
unsigned int *height_ret);
495 int xdo_set_window_size(
const xdo_t *
xdo, Window wid,
int w,
int h,
int flags);
506 int xdo_set_window_property(
const xdo_t *
xdo, Window wid,
const char *property,
515 int xdo_set_window_class(
const xdo_t *
xdo, Window wid,
const char *name,
521 int xdo_set_window_urgency (
const xdo_t *
xdo, Window wid,
int urgency);
532 int xdo_set_window_override_redirect(
const xdo_t *
xdo, Window wid,
533 int override_redirect);
541 int xdo_focus_window(
const xdo_t *
xdo, Window wid);
549 int xdo_raise_window(
const xdo_t *
xdo, Window wid);
557 int xdo_get_focused_window(
const xdo_t *
xdo, Window *window_ret);
565 int xdo_wait_for_window_focus(
const xdo_t *
xdo, Window window,
int want_focus);
574 int xdo_get_pid_window(
const xdo_t *
xdo, Window window);
585 int xdo_get_focused_window_sane(
const xdo_t *
xdo, Window *window_ret);
598 int xdo_activate_window(
const xdo_t *
xdo, Window wid);
609 int xdo_wait_for_window_active(
const xdo_t *
xdo, Window window,
int active);
617 int xdo_map_window(
const xdo_t *
xdo, Window wid);
624 int xdo_unmap_window(
const xdo_t *
xdo, Window wid);
629 int xdo_minimize_window(
const xdo_t *
xdo, Window wid);
637 int xdo_reparent_window(
const xdo_t *
xdo, Window wid_source, Window wid_target);
650 int xdo_get_window_location(
const xdo_t *
xdo, Window wid,
651 int *x_ret,
int *y_ret, Screen **screen_ret);
660 int xdo_get_window_size(
const xdo_t *
xdo, Window wid,
unsigned int *width_ret,
661 unsigned int *height_ret);
672 int xdo_get_active_window(
const xdo_t *
xdo, Window *window_ret);
680 int xdo_select_window_with_click(
const xdo_t *
xdo, Window *window_ret);
688 int xdo_set_number_of_desktops(
const xdo_t *
xdo,
long ndesktops);
697 int xdo_get_number_of_desktops(
const xdo_t *
xdo,
long *ndesktops);
705 int xdo_set_current_desktop(
const xdo_t *
xdo,
long desktop);
713 int xdo_get_current_desktop(
const xdo_t *
xdo,
long *desktop);
722 int xdo_set_desktop_for_window(
const xdo_t *
xdo, Window wid,
long desktop);
734 int xdo_get_desktop_for_window(
const xdo_t *
xdo, Window wid,
long *desktop);
745 Window **windowlist_ret,
unsigned int *nwindows_ret);
758 unsigned char *xdo_get_window_property_by_atom(
const xdo_t *
xdo, Window window, Atom atom,
759 long *nitems, Atom *type,
int *size);
772 int xdo_get_window_property(
const xdo_t *
xdo, Window window,
const char *property,
773 unsigned char **value,
long *nitems, Atom *type,
int *size);
782 unsigned int xdo_get_input_state(
const xdo_t *
xdo);
798 const char **xdo_get_symbol_map(
void);
817 int xdo_clear_active_modifiers(
const xdo_t *
xdo, Window window,
826 int xdo_set_active_modifiers(
const xdo_t *
xdo, Window window,
836 int xdo_get_desktop_viewport(
const xdo_t *
xdo,
int *x_ret,
int *y_ret);
844 int xdo_set_desktop_viewport(
const xdo_t *
xdo,
int x,
int y);
850 int xdo_kill_window(
const xdo_t *
xdo, Window window);
855 #define XDO_FIND_PARENTS (0)
860 #define XDO_FIND_CHILDREN (1)
866 int xdo_find_window_client(
const xdo_t *
xdo, Window window, Window *window_ret,
874 int xdo_get_window_name(
const xdo_t *
xdo, Window window,
875 unsigned char **name_ret,
int *name_len_ret,
886 void xdo_disable_feature(
xdo_t *
xdo,
int feature);
896 void xdo_enable_feature(
xdo_t *
xdo,
int feature);
906 int xdo_has_feature(
xdo_t *
xdo,
int feature);
915 int xdo_get_viewport_dimensions(
xdo_t *
xdo,
unsigned int *width,
916 unsigned int *height,
int screen);