summaryrefslogtreecommitdiff
path: root/man/XF86Misc.man
blob: f9f9891cad5058b5925ae9ac9dfa8519e635c98d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
.\" $TOG: XF86Misc.man /main/7 1997/07/19 10:30:32 kaleb $
.\"
.\"
.\"
.\" Copyright (c) 1996  Joe Moss, The XFree86 Project
.\" 
.\" $XFree86: xc/programs/Xserver/hw/xfree86/doc/man/XF86Misc.man,v 3.12 2002/12/22 00:46:54 dawes Exp $
.de ZN
.ie t \fB\^\\$1\^\fR\\$2
.el \fI\^\\$1\^\fP\\$2
..
.TH XF86MISC 3X11 __vendorversion__ "X FUNCTIONS"
.SH NAME
XF86MiscQueryExtension, XF86MiscQueryVersion, XF86MiscGetMouseSettings, XF86MiscSetMouseSettings, XF86MiscGetKbdSettings, XF86MiscSetKbdSettings \- XFree86-Misc extension interface functions
.SH SYNTAX
.nf
.LP
\&#include <X11/extensions/xf86misc.h>
.LP
Bool XF86MiscQueryExtension(
    Display *\fIdisplay\fP\^,
    int *\fIevent_base_return\fP\^,
    int *\fIerror_base_return\fP\^);
.LP
Bool XF86MiscQueryVersion(
    Display *\fIdisplay\fP\^,
    int *\fImajor_version_return\fP\^,
    int *\fIminor_version_return\fP\^);
.ig
.LP
Status XF86MiscGetSaver(
    Display *\fIdisplay\fP\^,
    int \fIscreen\fP\^,
    int *\fIsuspend_time_return\fP\^,
    int *\fIoff_time_return\fP\^);
.LP
Status XF86MiscSetSaver(
    Display *\fIdisplay\fP\^,
    int \fIscreen\fP\^,
    int \fIsuspend_time\fP\^,
    int \fIoff_time\fP\^);
..
.LP
Status XF86MiscGetMouseSettings(
    Display *\fIdisplay\fP\^,
    XF86MiscMouseSettings *\fImseinfo\fP\^);
.LP
Status XF86MiscSetMouseSettings(
    Display *\fIdisplay\fP\^,
    XF86MiscMouseSettings *\fImseinfo\fP\^);
.LP
Status XF86MiscGetKbdSettings(
    Display *\fIdisplay\fP\^,
    XF86MiscKbdSettings *\fIkbdinfo\fP\^);
.LP
Status XF86MiscSetKbdSettings(
    Display *\fIdisplay\fP\^,
    XF86MiscKbdSettings *\fIkbdinfo\fP\^);
.fi
.SH ARGUMENTS
.IP \fIdisplay\fP 2i
Specifies the connection to the X server.
.IP \fIscreen\fP 2i
Specifies which screen number the setting apply to.
.IP \fIevent_base_return\fP 2i
Returns the base event number for the extension.
.IP \fIerror_base_return\fP 2i
Returns the base error number for the extension.
.IP \fImajor_version_return\fP 2i
Returns the major version number of the extension.
.IP \fIminor_version_return\fP 2i
Returns the minor version number of the extension.
.ig
.IP \fIsuspend_time_return\fP 2i
Returns the number of seconds of idle time the server
will wait before activating the monitor's suspend mode.
.IP \fIoff_time_return\fP 2i
Returns the number of seconds of idle time the server
will wait before causing the monitor to powerdown.
.IP \fIsuspend_time\fP 2i
Specifies the number of seconds of idle time the server
should wait before activating the monitor's suspend mode.
.IP \fIoff_time\fP 2i
Specifies the number of seconds of idle time the server
should wait before causing the monitor to powerdown.
..
.IP \fImseinfo\fP 2i
Specifies a structure which contains the mouse parameters.
.IP \fIkbdinfo\fP 2i
Specifies a structure which contains the keyboard parameters.
.SH STRUCTURES
.nf
.ta 3i
\fIMouse:\fP
typedef struct {
    char *device; 	/* returned path to device */
    int type;	/* mouse protocol */
    int baudrate;	/* 1200, 2400, 4800, or 9600 */
    int samplerate;	/* samples per second */
    int resolution;	/* resolution, count per inch */
    int buttons;	/* number of buttons */
    Bool emulate3buttons;	/* Button1+Button3 -> Button2 ? */
    int emulate3timeout;	/* in milliseconds */
    Bool chordmiddle;	/* Button1+Button3 == Button2 ? */
    int flags;	/* Device open flags */
} XF86MiscMouseSettings;
.LP
\fIKeyboard:\fP
typedef struct {
    int type;	/* of keyboard: 84-key, 101-key, Xqueue  */
    int rate;	/* repeat rate */
    int delay;	/* delay until repeat starts */
    Bool servnumlock;	/* Server handles NumLock ? */
} XF86MiscKbdSettings;
.fi
.SH DESCRIPTION
These functions provide an interface to the
\fIXFree86-Misc\fP extension
which allows various server settings to be
queried and changed dynamically.
Applications that use these functions must be linked with
.ZN -lXxf86misc
.SS "POWER-SAVER FUNCTIONS"
The
.ZN XF86MiscGetSaver
and
.ZN XF86MiscSetSaver
functions have been removed.  This functionality is now provided by
the DPMS extension.
.SS "MOUSE FUNCTIONS"
Mouse parameters can be queried using the function
.ZN XF86MiscGetMouseSettings .
The structure pointed to by its second argument is filled in
with the current mouse settings.
.PP
Not all fields are valid in all cases.
For example, when the protocol indicates a bus mouse (i.e. the
type field has value
.ZN MTYPE_BUSMOUSE
as defined in
.ZN xf86misc.h ),
then the value in the
.ZN baudrate
field should be ignored as it does not apply to bus mice.
.PP
The
.ZN samplerate
field contains the resolution in lines per inch when
using the Hitachi tablet protocol.
.PP
The device field of the structure points to dynamically
allocated storage which should be freed by the caller.
.PP
Any of the fields of the structure can be altered and then passed
to the
.ZN XF86MiscSetMouseSettings
function to change their value in the server,
with the following restrictions:
.RS 5
.IP 1) 3
The device can not be changed
.IP 2) 3
The protocol can not be changed to or from Xqueue or OsMouse
.IP 3) 3
The buttons field can not be changed 
.IP 4) 3
Invalid combinations of parameters are not allowed
.RE
.PP
The server will generate an error if any of the above is attempted,
except the first \- the contents of the device field are simply ignored.
.PP
A change of the protocol causes the device to be closed and reopened.
Changes to the baud rate, sample rate, resolution or flags, 
when applicable to the
selected protocol, also cause a reopen of the device.
A reopen can be forced by using the MF_REOPEN flag, except in the
case of the OsMouse and Xqueue protocols which ignore all attempts
to reopen the device.
.SS "KEYBOARD FUNCTIONS"
The
.ZN XF86MiscGetKbdSettings
function allows you to retrieve the current keyboard-related
settings from the server.
.PP
Using the
.ZN XF86MiscSetKbdSettings
function, the keyboard autorepeat delay and rate can be set.
Requests to change the
.ZN type
and
.ZN servnumlock
fields are ignored (except for checking for an invalid keyboard type).
This is expected to change in a future release.
.SS "OTHER FUNCTIONS"
Two functions,
.ZN XF86MiscQueryExtension
and
.ZN XF86MiscQueryVersion ,
are provided which allow the client to query some information
regarding the extension itself.
.SH PREDEFINED VALUES
The header file
.ZN X11/extensions/xf86misc.h
contains definitions for
.IP \fBMTYPE_\fP* 1i
Mouse protocols
.IP \fBKTYPE_\fP* 1i
Keyboard types
.IP \fBMF_\fP* 1i
Mouse flags
.SH "SEE ALSO"
xset(1), XF86Config(__filemansuffix__)
.SH AUTHORS
Joe Moss and David Dawes, The XFree86 Project, Inc.