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"
8 vuidmice, vuidm3p, vuidm4p, vuidm5p, vuid2ps2, vuid3ps2 \- converts mouse
9 protocol to Firm Events
13 #include <sys/stream.h>
18 #include <sys/vuid_event.h>
23 #include <sys/vuid_wheel.h>
28 int ioctl(\fIfd\fR, I_PUSH, vuidm3p);
33 int ioctl(\fIfd\fR, I_PUSH, vuidm4p);
38 int ioctl(\fIfd\fR, I_PUSH, vuidm5p);
43 int ioctl(\fIfd\fR, I_PUSH, vuid2ps2);
48 int ioctl(\fIfd\fR, I_PUSH, vuid3ps2);
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:
66 format = VUID_FIRM_EVENT;
67 ioctl(fd, VUIDSFORMAT, &format);
73 You can also query the state of the STREAMS module by using the
74 \fBVUIDGFORMAT\fR option.
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.
85 if ( format == VUID_FIRM_EVENT );
86 /* Message processing is enabled.
87 * Mouse protocol conversion to Firm events
94 The remainder of this section describes the processing of STREAMS messages on
95 the read- and write-side.
96 .SS "Read Side Behavior"
103 Incoming messages are queued and converted to Firm events.
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
117 .SS "Write Side Behavior"
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.
135 The write queue of the module is flushed of all its data messages and the
136 message is passed downstream.
142 \fB\fBVUIDGFORMAT\fR \fR
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).
153 \fB\fBVUIDSFORMAT\fR \fR
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,
166 The following wheel support ioctls are defined for PS/2 mouse only:
170 \fBVUIDGWHEELCOUNT\fR
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.
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.
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.
206 \fBVUIDSWHEELSTATE\fR
210 \fBVUIDGWHEELSTATE\fR
213 VUIDSWHEELSTATE sets the state of the wheel to that specified in the
214 stateflags. VUIDGWHEELSTATE returns the current state settings in the
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.
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"
251 Module Protocol Type Device
254 3-Byte Protocol Microsoft 2 Button Serial Mouse
258 4-Byte Protocol Logitech 3 Button Mouseman
262 Logitech 3 Button Bus Mouse Microsoft Bus Mouse
263 T} /dev/logi/ dev/msm
266 PS/2 Protocol 2 Button PS/2 Compatible Mouse
270 PS/2 Protocol 3 Button PS/2 Compatible Mouse
277 See \fBattributes\fR(5) for descriptions of the following attributes:
285 ATTRIBUTE TYPE ATTRIBUTE VALUE
293 \fBattributes\fR(5), \fBvirtualkm\fR(7D)
296 \fISTREAMS Programming Guide\fR