]> diplodocus.org Git - xorg-xinput/blob - src/xinput.h
XSync the display before jumping in the grab code.
[xorg-xinput] / src / xinput.h
1 /*
2 * Copyright 1996 by Frederic Lepied, France. <Frederic.Lepied@sugix.frmug.org>
3 *
4 * Permission to use, copy, modify, distribute, and sell this software and its
5 * documentation for any purpose is hereby granted without fee, provided that
6 * the above copyright notice appear in all copies and that both that
7 * copyright notice and this permission notice appear in supporting
8 * documentation, and that the name of the authors not be used in
9 * advertising or publicity pertaining to distribution of the software without
10 * specific, written prior permission. The authors make no
11 * representations about the suitability of this software for any purpose. It
12 * is provided "as is" without express or implied warranty.
13 *
14 * THE AUTHORS DISCLAIM ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
15 * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
16 * EVENT SHALL THE AUTHORS BE LIABLE FOR ANY SPECIAL, INDIRECT OR
17 * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
18 * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
19 * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
20 * PERFORMANCE OF THIS SOFTWARE.
21 *
22 */
23
24 #if HAVE_CONFIG_H
25 #include <config.h>
26 #endif
27
28 #include <X11/Xlib.h>
29 #include <X11/extensions/XInput.h>
30 #ifdef HAVE_XI2
31 #include <X11/extensions/XInput2.h>
32 #endif
33 #include <X11/Xutil.h>
34 #include <stdio.h>
35 #include <stdlib.h>
36
37 #ifndef EXIT_SUCCESS
38 #define EXIT_SUCCESS 1
39 #endif
40 #ifndef EXIT_FAILURE
41 #define EXIT_FAILURE 0
42 #endif
43
44 XDeviceInfo*
45 find_device_info(
46 Display *display,
47 char *name,
48 Bool only_extended
49 );
50 int
51 xi2_find_device_id(Display *display, char *name);
52
53 int xinput_version(Display* display);
54
55 #define DECLARE(name) \
56 int (name) ( \
57 Display* display, \
58 int argc, \
59 char *argv[], \
60 char *prog_name, \
61 char *prog_desc \
62 )
63
64 DECLARE(get_feedbacks);
65 DECLARE(set_ptr_feedback);
66 DECLARE(get_button_map);
67 DECLARE(set_button_map);
68 DECLARE(set_pointer);
69 DECLARE(set_mode);
70 DECLARE(list);
71 DECLARE(test);
72 DECLARE(version);
73 DECLARE(set_integer_feedback);
74 DECLARE(query_state);
75 DECLARE(create_master);
76 DECLARE(remove_master);
77 DECLARE(change_attachment);
78 DECLARE(float_device);
79 DECLARE(set_clientpointer);
80 DECLARE(test_xi2);
81 DECLARE(list_props);
82 DECLARE(set_int_prop);
83 DECLARE(set_float_prop);
84 DECLARE(set_atom_prop);
85 DECLARE(watch_props);
86 DECLARE(delete_prop);
87 /* end of xinput.h */