1XF86MISC(3)                       X FUNCTIONS                      XF86MISC(3)
2
3
4

NAME

6       XF86MiscQueryExtension, XF86MiscQueryVersion, XF86MiscGetMouseSettings,
7       XF86MiscSetMouseSettings,  XF86MiscGetKbdSettings,   XF86MiscSetKbdSet‐
8       tings - Extension library for the XFree86-Misc X extension.
9

SYNTAX

11       #include <X11/extensions/xf86misc.h>
12
13       Bool XF86MiscQueryExtension(
14           Display *display,
15           int *event_base_return,
16           int *error_base_return);
17
18       Bool XF86MiscQueryVersion(
19           Display *display,
20           int *major_version_return,
21           int *minor_version_return);
22
23       Status XF86MiscGetMouseSettings(
24           Display *display,
25           XF86MiscMouseSettings *mseinfo);
26
27       Status XF86MiscSetMouseSettings(
28           Display *display,
29           XF86MiscMouseSettings *mseinfo);
30
31       Status XF86MiscGetKbdSettings(
32           Display *display,
33           XF86MiscKbdSettings *kbdinfo);
34
35       Status XF86MiscSetKbdSettings(
36           Display *display,
37           XF86MiscKbdSettings *kbdinfo);
38

ARGUMENTS

40       display             Specifies the connection to the X server.
41
42       screen              Specifies which screen number the setting apply to.
43
44       event_base_return   Returns the base event number for the extension.
45
46       error_base_return   Returns the base error number for the extension.
47
48       major_version_return
49                           Returns the major version number of the extension.
50
51       minor_version_return
52                           Returns the minor version number of the extension.
53
54       mseinfo             Specifies  a  structure  which  contains  the mouse
55                           parameters.
56
57       kbdinfo             Specifies a structure which contains  the  keyboard
58                           parameters.
59

STRUCTURES

61       Mouse:
62       typedef struct {
63           char *device;             /∗ returned path to device */
64           int type;                 /∗ mouse protocol */
65           int baudrate;             /∗ 1200, 2400, 4800, or 9600 */
66           int samplerate;           /∗ samples per second */
67           int resolution;           /∗ resolution, count per inch */
68           int buttons;              /∗ number of buttons */
69           Bool emulate3buttons;     /∗ Button1+Button3 -> Button2 ? */
70           int emulate3timeout;      /∗ in milliseconds */
71           Bool chordmiddle;         /∗ Button1+Button3 == Button2 ? */
72           int flags;                /∗ Device open flags */
73       } XF86MiscMouseSettings;
74
75       Keyboard:
76       typedef struct {
77           int type;                 /∗ of keyboard: 84-key, 101-key, Xqueue  */
78           int rate;                 /∗ repeat rate */
79           int delay;                /∗ delay until repeat starts */
80           Bool servnumlock;         /∗ Server handles NumLock ? */
81       } XF86MiscKbdSettings;
82

DESCRIPTION

84       These  functions  provide  an  interface  to the XFree86-Misc extension
85       which allows various server settings to be queried and changed  dynami‐
86       cally.   Applications  that  use  these  functions  must be linked with
87       -lXxf86misc
88
89   POWER-SAVER FUNCTIONS
90       The XF86MiscGetSaver and XF86MiscSetSaver functions have been  removed.
91       This functionality is now provided by the DPMS extension.
92
93   MOUSE FUNCTIONS
94       Mouse parameters can be queried using the function XF86MiscGetMouseSet‐
95       tings.  The structure pointed to by its second argument  is  filled  in
96       with the current mouse settings.
97
98       Not  all fields are valid in all cases.  For example, when the protocol
99       indicates a bus mouse (i.e. the type field has value MTYPE_BUSMOUSE  as
100       defined  in xf86misc.h), then the value in the baudrate field should be
101       ignored as it does not apply to bus mice.
102
103       The samplerate field contains the resolution in  lines  per  inch  when
104       using the Hitachi tablet protocol.
105
106       The device field of the structure points to dynamically allocated stor‐
107       age which should be freed by the caller.
108
109       Any of the fields of the structure can be altered and  then  passed  to
110       the  XF86MiscSetMouseSettings  function  to  change  their value in the
111       server, with the following restrictions:
112
113            1) The device can not be changed
114
115            2) The protocol can not be changed to or from Xqueue or OsMouse
116
117            3) The buttons field can not be changed
118
119            4) Invalid combinations of parameters are not allowed
120
121       The server will generate an error if any of  the  above  is  attempted,
122       except the first - the contents of the device field are simply ignored.
123
124       A  change  of the protocol causes the device to be closed and reopened.
125       Changes to the baud rate, sample rate, resolution or flags, when appli‐
126       cable  to  the selected protocol, also cause a reopen of the device.  A
127       reopen can be forced by using the MF_REOPEN flag, except in the case of
128       the  OsMouse  and  Xqueue protocols which ignore all attempts to reopen
129       the device.
130
131   KEYBOARD FUNCTIONS
132       The XF86MiscGetKbdSettings function allows you to retrieve the  current
133       keyboard-related settings from the server.
134
135       Using  the  XF86MiscSetKbdSettings  function,  the  keyboard autorepeat
136       delay and rate can be set.  Requests to change the type and servnumlock
137       fields  are ignored (except for checking for an invalid keyboard type).
138       This is expected to change in a future release.
139
140   OTHER FUNCTIONS
141       Two functions,  XF86MiscQueryExtension  and  XF86MiscQueryVersion,  are
142       provided which allow the client to query some information regarding the
143       extension itself.
144

PREDEFINED VALUES

146       The header file X11/extensions/xf86misc.h contains definitions for
147
148       MTYPE_*   Mouse protocols
149
150       KTYPE_*   Keyboard types
151
152       MF_*      Mouse flags
153

SEE ALSO

155       xset(1), xorg.conf(5)
156

AUTHORS

158       Joe Moss and David Dawes, The XFree86 Project, Inc.
159
160
161
162
163X Version 11                  libXxf86misc 1.0.4                   XF86MISC(3)
Impressum