1vuidmice(7M)                    STREAMS Modules                   vuidmice(7M)
2
3
4

NAME

6       vuidmice,  vuidm3p,  vuidm4p,  vuidm5p,  vuid2ps2,  vuid3ps2 - converts
7       mouse protocol to Firm Events
8

SYNOPSIS

10       #include <sys/stream.h>
11
12
13       #include <sys/vuid_event.h>
14
15
16       #include <sys/vuid_wheel.h>
17
18
19       int ioctl(fd, I_PUSH, vuidm3p);
20
21
22       int ioctl(fd, I_PUSH, vuidm4p);
23
24
25       int ioctl(fd, I_PUSH, vuidm5p);
26
27
28       int ioctl(fd, I_PUSH, vuid2ps2);
29
30
31       int ioctl(fd, I_PUSH, vuid3ps2);
32
33

DESCRIPTION

35       The  STREAMS modules vuidm3p, vuidm4p, vuidm5p, vuid2ps2, and  vuid3ps2
36       convert  mouse  protocols  to  Firm events. The Firm event structure is
37       described in  <sys/vuid_event.h>. Pushing a  STREAMS  module  does  not
38       automatically  enable  mouse  protocol  conversion to Firm events.  The
39       STREAMS module state is initially set to raw or VUID_NATIVE mode  which
40       performs    no  message  processing.  You  must  change  the  state  to
41       VUID_FIRM_EVENT mode to initiate  mouse  protocol  conversion  to  Firm
42       events. This can be accomplished by the following code:
43
44         int format;
45         format = VUID_FIRM_EVENT;
46         ioctl(fd, VUIDSFORMAT, &format);
47
48
49
50       You can also query the state of the  STREAMS module by using the VUIDG‐
51       FORMAT option.
52
53         int format;
54         int fd;   /* file descriptor */
55         ioctl(fd, VUIDGFORMAT, &format);
56         if ( format == VUID_NATIVE );
57              /* The state of the module is in raw mode.
58               * Message processing is not enabled.
59               */
60         if ( format == VUID_FIRM_EVENT );
61              /* Message processing is enabled.
62               * Mouse protocol conversion to Firm events
63               * are performed.
64
65
66
67       The remainder of this section describes the processing of STREAMS  mes‐
68       sages on the read- and write-side.
69
70   Read Side Behavior
71       M_DATA      Incoming messages are queued and converted to Firm events.
72
73
74       M_FLUSH     The  read  queue  of  the module is flushed of all its data
75                   messages and all data in the record being  accumulated  are
76                   also flushed. The message is passed upstream.
77
78
79   Write Side Behavior
80       M_IOCTL         Messages  sent  downstream  as  a result of an ioctl(2)
81                       system call.  The two valid ioctl options processed  by
82                       the vuidmice modules are VUIDGFORMAT and VUIDSFORMAT.
83
84
85       M_FLUSH         The  write  queue  of  the module is flushed of all its
86                       data messages and the message is passed downstream.
87
88
89       VUIDGFORMAT     This option returns the current state of  the   STREAMS
90                       module.  The  state  of the vuidmice STREAMS module may
91                       either  be  VUID_NATIVE  (no  message  processing)   or
92                       VUID_FIRM_EVENT (convert to Firm events).
93
94
95       VUIDSFORMAT     This  option  sets  the state of the  STREAMS module to
96                       VUID_FIRM_EVENT. If the state of the STREAMS module  is
97                       already  in  VUID_FIRM_EVENT, this option is non-opera‐
98                       tional. It is not possible  to set the  state  back  to
99                       VUID_NATIVE  once the state becomes VUID_FIRM_EVENT. To
100                       disable message processing, pop the STREAMS module  out
101                       by calling ioctl(fd, 1I_POP, vuid*).
102
103
104
105       The following wheel support ioctls are defined for PS/2 mouse only:
106
107       VUIDGWHEELCOUNT    This ioctl takes a pointer to an integer as argument
108                          and sets the value of the integer to the  number  of
109                          wheels available on this device.
110
111
112       VUIDGWHEELINFO     This command returns static information   about  the
113                          wheel that does not  change while a   device  is  in
114                          use.  Currently  the   only  information defined  is
115                          the                 wheel                orientation
116                          which   is   either   VUID_WHEEL_FORMAT_VERTICAL  or
117                          VUID_WHEEL_FORMAT_HORIZONTAL.
118
119                               typedef struct {
120                                       int     vers;
121                                       int     id;
122                                       int     format;
123                               } wheel_info;
124
125                          The  ioctl  takes a pointer to  "wheel_info"  struc‐
126                          ture  with  the "vers" set to the current version of
127                          the "wheel_info" structure and "id" set to the id of
128                          the wheel for which the information is desired.
129
130
131       VUIDSWHEELSTATE    VUIDSWHEELSTATE  sets the state of the wheel to that
132       VUIDGWHEELSTATE    specified in the stateflags. VUIDGWHEELSTATE returns
133                          the current state settings in the stateflags field.
134
135                          stateflags is an  OR'ed  set of  flag bits. The only
136                          flag currently defined is VUID_WHEEL_STATE_ENABLED.
137
138                          When stateflags is set  to  VUID_WHEEL_STATE_ENABLED
139                          the  module  converts  motion of the specified wheel
140                          into VUID events and sends those up  stream.
141
142                          Wheel events are disabled by default.
143
144                          Applications that want to   change  a  flag   should
145                          first get the current flags and then change only the
146                          bit they want.
147
148                               typedef struct {
149                                       int             vers;
150                                       int            id;
151                                       uint32_t       stateflags;
152                                } wheel_state;
153
154                          These ioctls take pointer  to  'wheel_state'  as  an
155                          argument with the 'vers' and 'id' members filled up.
156                          These members have the  same  meaning  as  that  for
157                          'VUIDGWHEELINFO' ioctl.
158
159
160   Mouse Configurations
161       ┌─────────────┬───────────────────────────┬────────────────────┐
162       │   Module    │       Protocol Type       │       Device       │
163       ├─────────────┼───────────────────────────┼────────────────────┤
164       │vuidm3p      │ 3-Byte Protocol Microsoft │ /dev/tty*          │
165       │             │ 2 Button Serial Mouse     │                    │
166       ├─────────────┼───────────────────────────┼────────────────────┤
167       │vuidm4p      │ 4-Byte Protocol  Logitech │ /dev/tty*          │
168       │             │ 3 Button Mouseman         │                    │
169       ├─────────────┼───────────────────────────┼────────────────────┤
170       │vuidm5p      │ Logitech   3  Button  Bus │ /dev/logi/ dev/msm │
171       │             │ Mouse Microsoft Bus Mouse │                    │
172       ├─────────────┼───────────────────────────┼────────────────────┤
173       │vuid2ps2     │ PS/2  Protocol  2  Button │ /dev/kdmouse       │
174       │             │ PS/2 Compatible Mouse     │                    │
175       ├─────────────┼───────────────────────────┼────────────────────┤
176       │vuid3ps2     │ PS/2  Protocol  3  Button │ /dev/kdmouse       │
177       │             │ PS/2 Compatible Mouse     │                    │
178       └─────────────┴───────────────────────────┴────────────────────┘
179

ATTRIBUTES

181       See attributes(5) for descriptions of the following attributes:
182
183
184
185
186       ┌─────────────────────────────┬─────────────────────────────┐
187ATTRIBUTE TYPE               ATTRIBUTE VALUE              
188       ├─────────────────────────────┼─────────────────────────────┤
189       │Architecture                 │x86                          │
190       └─────────────────────────────┴─────────────────────────────┘
191

SEE ALSO

193       attributes(5), virtualkm(7D)
194
195
196       STREAMS Programming Guide
197
198
199
200SunOS 5.11                       21 June 2005                     vuidmice(7M)
Impressum