MyWebUniversity.com Home Page
 



OpenSolaris man pages main menu


STREAMS Modules                                      vuidmice(7M)



NAME
     vuidmice, vuidm3p, vuidm4p, vuidm5p,  vuid2ps2,  vuid3ps2  -
     converts mouse protocol to Firm Events

SYNOPSIS
     #include 


     #include 


     #include 


     int ioctl(fd, IPUSH, vuidm3p);


     int ioctl(fd, IPUSH, vuidm4p);


     int ioctl(fd, IPUSH, vuidm5p);


     int ioctl(fd, IPUSH, vuid2ps2);


     int ioctl(fd, IPUSH, vuid3ps2);


DESCRIPTION
     The  STREAMS modules vuidm3p,  vuidm4p,  vuidm5p,  vuid2ps2,
     and  vuid3ps2  convert  mouse  protocols to Firm events. The
     Firm event structure is  described  in   .
     Pushing  a   STREAMS  module  does  not automatically enable
     mouse protocol conversion  to  Firm  events.   The   STREAMS
     module  state  is  initially  set to raw or VUIDNATIVE mode
     which performs  no message processing. You must  change  the
     state  to  VUIDFIRMEVENT  mode  to initiate mouse protocol
     conversion to Firm events. This can be accomplished  by  the
     following code:

       int format;
       format = VUIDFIRMEVENT;
       ioctl(fd, VUIDSFORMAT, &format);



     You can also query the state of the  STREAMS module by using
     the VUIDGFORMAT option.

       int format;
       int fd;   /* file descriptor */



SunOS 5.11          Last change: 21 June 2005                   1






STREAMS Modules                                      vuidmice(7M)



       ioctl(fd, VUIDGFORMAT, &format);
       if ( format == VUIDNATIVE );
            /* The state of the module is in raw mode.
             * Message processing is not enabled.
             */
       if ( format == VUIDFIRMEVENT );
            /* Message processing is enabled.
             * Mouse protocol conversion to Firm events
             * are performed.



     The remainder of this section describes  the  processing  of
     STREAMS messages on the read- and write-side.

  Read Side Behavior
     MDATA      Incoming messages are queued  and  converted  to
                 Firm events.


     MFLUSH     The read queue of the module is flushed  of  all
                 its  data  messages  and  all data in the record
                 being accumulated are also flushed. The  message
                 is passed upstream.


  Write Side Behavior
     MIOCTL         Messages sent downstream as a result  of  an
                     ioctl(2)  system  call.  The two valid ioctl
                     options processed by  the  vuidmice  modules
                     are VUIDGFORMAT and VUIDSFORMAT.


     MFLUSH         The write queue of the module is flushed  of
                     all  its  data  messages  and the message is
                     passed downstream.


     VUIDGFORMAT     This option returns the current state of the
                     STREAMS  module.  The  state of the vuidmice
                     STREAMS module may either be VUIDNATIVE (no
                     message processing) or VUIDFIRMEVENT (con-
                     vert to Firm events).


     VUIDSFORMAT     This option sets the state of  the   STREAMS
                     module  to  VUIDFIRMEVENT. If the state of
                     the   STREAMS   module   is    already    in
                     VUIDFIRMEVENT,   this   option   is   non-
                     operational. It is not possible  to set  the
                     state  back  to   VUIDNATIVE once the state
                     becomes VUIDFIRMEVENT. To disable  message



SunOS 5.11          Last change: 21 June 2005                   2






STREAMS Modules                                      vuidmice(7M)



                     processing,  pop  the  STREAMS module out by
                     calling ioctl(fd, 1IPOP, vuid*).



     The following wheel support  ioctls  are  defined  for  PS/2
     mouse only:

     VUIDGWHELCOUNT    This ioctl takes a pointer to an  integer
                        as  argument  and  sets  the value of the
                        integer to the number of wheels available
                        on this device.


     VUIDGWHELINFO     This command returns  static  information
                        about   the   wheel that does not  change
                        while a  device is in use. Currently  the
                        only  information defined  is  the  wheel
                        orientation
                        which              is              either
                        VUIDWHELFORMATVERTICAL             or
                        VUIDWHELFORMATHORIZONTAL.

                             typedef struct {
                                     int     vers;
                                     int     id;
                                     int     format;
                             } wheelinfo;

                        The    ioctl    takes   a   pointer    to
                        "wheelinfo"  structure  with  the "vers"
                        set  to  the  current  version   of   the
                        "wheelinfo"  structure  and  "id" set to
                        the id of the wheel for which the  infor-
                        mation is desired.


     VUIDSWHELSTATE    VUIDSWHELSTATE sets  the  state  of  the
     VUIDGWHELSTATE    wheel  to  that  specified  in  the  sta-
                        teflags.  VUIDGWHELSTATE   returns   the
                        current  state settings in the stateflags
                        field.

                        stateflags is an   OR'ed   set  of   flag
                        bits.  The only flag currently defined is
                        VUIDWHELSTATENABLED.

                        When     stateflags     is     set     to
                        VUIDWHELSTATENABLED  the module con-
                        verts  motion of the specified wheel into
                        VUID events and sends those up  stream.




SunOS 5.11          Last change: 21 June 2005                   3






STREAMS Modules                                      vuidmice(7M)



                        Wheel events are disabled by default.

                        Applications that want to  change a  flag
                        should   first  get the current flags and
                        then change only the bit they want.

                             typedef struct {
                                     int             vers;
                                     int            id;
                                     uint32t       stateflags;
                              } wheelstate;

                        These    ioctls    take    pointer     to
                        'wheelstate'  as  an  argument  with the
                        'vers' and 'id' members filled up.  These
                        members have the same meaning as that for
                        'VUIDGWHELINFO' ioctl.


  Mouse Configurations
     
        Module           Protocol Type              Device      
    
     vuidm3p       3-Byte Protocol Microsoft  /dev/tty*         
                   2 Button Serial Mouse                        
    
     vuidm4p       4-Byte Protocol  Logitech  /dev/tty*         
                   3 Button Mouseman                            
    
     vuidm5p       Logitech  3  Button   Bus  /dev/logi/ dev/msm
                   Mouse Microsoft Bus Mouse                    
    
     vuid2ps2      PS/2  Protocol  2  Button  /dev/kdmouse      
                   PS/2 Compatible Mouse                        
    
     vuid3ps2      PS/2  Protocol  3  Button  /dev/kdmouse      
                   PS/2 Compatible Mouse                        
    


ATRIBUTES
     See attributes(5) for descriptions of the  following  attri-
     butes:












SunOS 5.11          Last change: 21 June 2005                   4






STREAMS Modules                                      vuidmice(7M)



     
     ATRIBUTE TYPE               ATRIBUTE VALUE             
    
     Architecture                 x86                         
    


SEE ALSO
     attributes(5), virtualkm(7D)


     STREAMS Programming Guide











































SunOS 5.11          Last change: 21 June 2005                   5



OpenSolaris man pages main menu

Contact us      |       About us      |       Term of use      |       Copyright © 2000-2010 MyWebUniversity.com ™