8210 uts: remove kb streams module
[unleashed.git] / usr / src / man / man7m / vuidmice.7m
blob3b0ef6db5da068caed750b06b6923c94df08aa74
1 '\" te
2 .\" Copyright (c) 2004, Sun Microsystems, Inc.
3 .\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License").  You may not use this file except in compliance with the License.
4 .\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing.  See the License for the specific language governing permissions and limitations under the License.
5 .\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE.  If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
6 .TH VUIDMICE 7M "Jun 21, 2005"
7 .SH NAME
8 vuidmice, vuidm3p, vuidm4p, vuidm5p, vuid2ps2, vuid3ps2 \- converts mouse
9 protocol to Firm Events
10 .SH SYNOPSIS
11 .LP
12 .nf
13 #include <sys/stream.h>
14 .fi
16 .LP
17 .nf
18 #include <sys/vuid_event.h>
19 .fi
21 .LP
22 .nf
23 #include <sys/vuid_wheel.h>
24 .fi
26 .LP
27 .nf
28 int ioctl(\fIfd\fR, I_PUSH, vuidm3p);
29 .fi
31 .LP
32 .nf
33 int ioctl(\fIfd\fR, I_PUSH, vuidm4p);
34 .fi
36 .LP
37 .nf
38 int ioctl(\fIfd\fR, I_PUSH, vuidm5p);
39 .fi
41 .LP
42 .nf
43 int ioctl(\fIfd\fR, I_PUSH, vuid2ps2);
44 .fi
46 .LP
47 .nf
48 int ioctl(\fIfd\fR, I_PUSH, vuid3ps2);
49 .fi
51 .SH DESCRIPTION
52 .sp
53 .LP
54 The  STREAMS modules \fBvuidm3p\fR, \fBvuidm4p\fR, \fBvuidm5p\fR,
55 \fBvuid2ps2\fR, and \fBvuid3ps2\fR convert mouse protocols to Firm events. The
56 Firm event structure is described in  <\fBsys/vuid_event.h\fR>. Pushing a
57 STREAMS module does not automatically enable mouse protocol conversion to Firm
58 events.  The  STREAMS module state is initially set to raw or \fBVUID_NATIVE\fR
59 mode which performs  no message processing. You must change the state to
60 \fBVUID_FIRM_EVENT\fR mode to initiate mouse protocol conversion to Firm
61 events. This can be accomplished by the following code:
62 .sp
63 .in +2
64 .nf
65 int format;
66 format = VUID_FIRM_EVENT;
67 ioctl(fd, VUIDSFORMAT, &format);
68 .fi
69 .in -2
71 .sp
72 .LP
73 You can also query the state of the  STREAMS module by using the
74 \fBVUIDGFORMAT\fR option.
75 .sp
76 .in +2
77 .nf
78 int format;
79 int fd; /* file descriptor */
80 ioctl(fd, VUIDGFORMAT, &format);
81 if ( format == VUID_NATIVE );
82         /* The state of the module is in raw mode.
83          * Message processing is not enabled.
84          */
85 if ( format == VUID_FIRM_EVENT );
86         /* Message processing is enabled.
87          * Mouse protocol conversion to Firm events
88          * are performed.
89 .fi
90 .in -2
92 .sp
93 .LP
94 The remainder of this section describes the processing of STREAMS messages on
95 the read- and write-side.
96 .SS "Read Side Behavior"
97 .sp
98 .ne 2
99 .na
100 \fB\fBM_DATA\fR \fR
102 .RS 12n
103 Incoming messages are queued and converted to Firm events.
107 .ne 2
109 \fB\fBM_FLUSH\fR \fR
111 .RS 12n
112 The read queue of the module is flushed of all its data messages and all data
113 in the record being accumulated are also flushed. The message is passed
114 upstream.
117 .SS "Write Side Behavior"
119 .ne 2
121 \fB\fBM_IOCTL\fR \fR
123 .RS 16n
124 Messages sent downstream as a result of an \fBioctl\fR(2) system call.  The two
125 valid \fBioctl\fR options processed by the \fBvuidmice\fR modules are
126 \fBVUIDGFORMAT\fR and \fBVUIDSFORMAT\fR.
130 .ne 2
132 \fB\fBM_FLUSH\fR \fR
134 .RS 16n
135 The write queue of the module is flushed of all its data messages and the
136 message is passed downstream.
140 .ne 2
142 \fB\fBVUIDGFORMAT\fR \fR
144 .RS 16n
145 This option returns the current state of the  STREAMS module. The state of the
146 \fBvuidmice\fR STREAMS module may either be \fBVUID_NATIVE\fR (no message
147 processing) or \fBVUID_FIRM_EVENT\fR (convert to Firm events).
151 .ne 2
153 \fB\fBVUIDSFORMAT\fR \fR
155 .RS 16n
156 This option sets the state of the  STREAMS module to \fBVUID_FIRM_EVENT.\fR If
157 the state of the STREAMS module is already in \fBVUID_FIRM_EVENT\fR, this
158 option is non-operational. It is not possible  to set the state back to
159 \fBVUID_NATIVE\fR once the state becomes \fBVUID_FIRM_EVENT.\fR To disable
160 message processing, pop the STREAMS module out by calling \fBioctl(fd, 1I_POP,
161 vuid*)\fR.
166 The following wheel support ioctls are defined for PS/2 mouse only:
168 .ne 2
170 \fBVUIDGWHEELCOUNT\fR
172 .RS 19n
173 This ioctl takes a pointer to an integer as argument and sets the value of the
174 integer to the number of wheels available on this device.
178 .ne 2
180 \fBVUIDGWHEELINFO\fR
182 .RS 19n
183 This command returns static information   about  the  wheel that does not
184 change while a  device is in use. Currently the  only information defined  is
185 the  wheel orientation                                 which is either
186 VUID_WHEEL_FORMAT_VERTICAL or  VUID_WHEEL_FORMAT_HORIZONTAL.
188 .in +2
190    typedef struct {
191            int     vers;
192            int     id;
193            int     format;
194    } wheel_info;
196 .in -2
198 The  ioctl  takes a pointer to "wheel_info" structure with the "vers" set to
199 the current version of the "wheel_info" structure and "id" set to the id of the
200 wheel for which the information is desired.
204 .ne 2
206 \fBVUIDSWHEELSTATE\fR
210 \fBVUIDGWHEELSTATE\fR
212 .RS 19n
213 VUIDSWHEELSTATE sets the state of the wheel to that specified in the
214 stateflags. VUIDGWHEELSTATE returns the current state settings in the
215 stateflags field.
217 stateflags is an  OR'ed  set of  flag bits. The only flag currently defined is
218 VUID_WHEEL_STATE_ENABLED.
220 When stateflags is set to VUID_WHEEL_STATE_ENABLED the module converts  motion
221 of the specified wheel into VUID events and sends those up  stream.
223 Wheel events are disabled by default.
225 Applications that want to  change a flag  should  first get the current flags
226 and then change only the bit they want.
228 .in +2
230    typedef struct {
231            int             vers;
232            int            id;
233            uint32_t       stateflags;
234     } wheel_state;
236 .in -2
238 These ioctls take pointer to 'wheel_state' as an argument with the 'vers'
239 and 'id' members filled up. These members have the same meaning as that
240 for 'VUIDGWHEELINFO' ioctl.
243 .SS "Mouse Configurations"
248 box;
249 c | c | c
250 l | l | l .
251 Module  Protocol Type   Device
253 vuidm3p T{
254 3-Byte Protocol Microsoft 2 Button Serial Mouse
255 T}      /dev/tty*
257 vuidm4p T{
258 4-Byte Protocol Logitech 3 Button Mouseman
259 T}      /dev/tty*
261 vuidm5p T{
262 Logitech 3 Button Bus Mouse Microsoft Bus Mouse
263 T}      /dev/logi/ dev/msm
265 vuid2ps2        T{
266 PS/2 Protocol 2 Button PS/2 Compatible Mouse
267 T}      /dev/kdmouse
269 vuid3ps2        T{
270 PS/2 Protocol 3 Button PS/2 Compatible Mouse
271 T}      /dev/kdmouse
274 .SH ATTRIBUTES
277 See \fBattributes\fR(5) for descriptions of the following attributes:
282 box;
283 c | c
284 l | l .
285 ATTRIBUTE TYPE  ATTRIBUTE VALUE
287 Architecture    x86
290 .SH SEE ALSO
293 \fBattributes\fR(5), \fBvirtualkm\fR(7D)
296 \fISTREAMS Programming Guide\fR