*nix Documentation Project
·  Home
 +   man pages
·  Linux HOWTOs
·  FreeBSD Tips
·  *niX Forums

  man pages->NetBSD man pages -> wsmouse_input (9)              
Title
Content
Arch
Section
 

WSMOUSE(9)

Contents


NAME    [Toc]    [Back]

     wsmouse, wsmouse_input, wsmousedevprint - wscons mouse support

SYNOPSIS    [Toc]    [Back]

     #include <dev/wscons/wsconsio.h>
     #include <dev/wscons/wsmousevar.h>

     void
     wsmouse_input(struct device *msdev, u_int btns, int x, int y, int z,
             u_int flags);

     int
     wsmousedevprint(void *aux, const char *pnp);

DESCRIPTION    [Toc]    [Back]

     The wsmouse module is a component of the wscons(9) framework to provide
     machine-indpendent mouse support.  Most of the support is provided by the
     wsmouse(4) device driver, which must be a child of the hardware device
     driver.

DATA TYPES    [Toc]    [Back]

     Mouse drivers providing support for wscons pointer devices will make use
     of the following data types:

     struct wsmouse_accessops
              A structure used to specify the mouse access functions.  All
              pointer devices must provide this structure and pass it to the
              wsmouse(4) child device.  It has the following members:

                      int     (*enable)(void *);
                      int     (*ioctl)(void *v, u_long cmd, caddr_t data,
                                      int flag, struct proc *p);
                      void    (*disable)(void *);

              The enable member defines the function to be called to enable
              monitoring pointer movements and passing these events to wscons.
              The disable member defines the function to disable movement
              events.  The ioctl member defines the function to be called to
              perform mouse-specific ioctl calls.

              There is a void * cookie provided by the mouse driver associated
              with these functions, which is passed to them when they are
              invoked.

     struct wsmouse_attach_args
              A structure used to attach the wsmouse(4) child device.  It has
              the following members:

                      const struct wsmouse_accessops *accessops;
                      void *accesscookie;

FUNCTIONS    [Toc]    [Back]

     wsmouse_input(msdev, btns, x, y, z, flags)
              Callback from the mouse driver to the wsmouse interface driver.
              The argument btns specifies the current button configuration.
              The pointer coordinate is specified by the x, y, z tuple.  The
              flags argument specify whether the pointer device and the measurement
 is in relative or absolute mode.  Valid values for
              flags are:

              WSMOUSE_INPUT_DELTA
                       Relative mode.

              WSMOUSE_INPUT_ABSOLUTE_X
                       Obsolute mode in x-direction.

              WSMOUSE_INPUT_ABSOLUTE_Y
                       Obsolute mode in y-direction.

              WSMOUSE_INPUT_ABSOLUTE_Z
                       Obsolute mode in z-direction.

     wsmousedevprint(aux, pnp)
              The default wsmouse printing routine used by config_found().
              (see autoconf(9)).

AUTOCONFIGURATION    [Toc]    [Back]

     Mouse drivers which want to utilise the wsmouse module must be a parent
     to the wsmouse(4) device and provide an attachment interface.  To attach
     the wsmouse(4) device, the mouse driver must allocate and populate a
     wsmouse_attach_args structure with the supported operations and callbacks
     and call config_found() to perform the attach (see autoconf(9)).

OPERATION    [Toc]    [Back]

     When a mouse-movement event is received, the device driver must perform
     any necessary movement decoding to wscons events and pass the events to
     wscons via wsmouse_input().

     The wscons framework calls back into the hardware driver by invoking the
     functions that are specified in the accessops structure.  The enable()
     and disable() functions are relatively simple and self-explanatory.  The
     ioctl() function is called by the wscons interface to perform mouse-specific
 ioctl operations (see ioctl(2)).  The argument cmd to the ioctl()
     function specifies the specific command to perform using the data data.
     Valid commands are listed in sys/dev/wscons/wsconsio.h.

CODE REFERENCES    [Toc]    [Back]

     This section describes places within the NetBSD source tree where actual
     code implementing or utilising the machine-independent wscons subsystem
     can be found.  All pathnames are relative to /usr/src.

     The wscons subsystem is implemented within the directory sys/dev/wscons.
     The wsmouse module itself is implement within the file
     sys/dev/wscons/wsmouse.c.  ioctl(2) operations are listed in
     sys/dev/wscons/wsconsio.h.

SEE ALSO    [Toc]    [Back]

      
      
     ioctl(2), autoconf(9), driver(9), intro(9), wsdisplay(9), wskbd(9)

BSD                             October 7, 2001                            BSD
[ Back ]
 Similar pages
Name OS Title
wsmouse OpenBSD generic mouse support in wscons
wsmux OpenBSD console keyboard/mouse multiplexor for wscons
ums OpenBSD USB mouse support
ams OpenBSD Apple Mouse Support
wsfont_matches NetBSD wscons font support
wsfont_find NetBSD wscons font support
wsemuldisplaydevprint NetBSD wscons display support
wsfont_init NetBSD wscons font support
wsdisplaydevprint NetBSD wscons display support
wsdisplay_cnattach NetBSD wscons display support
Copyright © 2004-2005 DeniX Solutions SRL
newsletter delivery service