[Previous] [Contents] [Next]

Mouse

Mouse manager (QNX)

Syntax:

Mouse [-n name] &

Mouse [-n name] test

Options:

-n name
The name to register (default is qnx/mouse) or the name of an installed driver to test.

Description:

The Mouse manager manages the mouse for system components which are not capable of dealing directly with the Input manager. This includes text-mode mouse applications (such as some mouse-aware editors and Watcom's wd debugger) and older versions of graphical user interfaces for QNX.

It reads and interprets a stream of data from the Input manager (through the file /dev/mousein), and processes this into an internal first-in first-out queue of significant mouse events. Application programs can "read" these mouse events by sending messages to the Mouse server via a set of mouse-specific functions.


Note:

To start or terminate Mouse, you must be logged in as the superuser (root).


Examples:

Start the mouse manager, auto-detecting the mouse type.

    mousetrap start

Start the mouse manager, reading data through /dev/mousein from the Input driver which is handling a Microsoft compatible serial mouse on /dev/ser1:

    Mouse &
    Input -d/dev/mousein msoft fd -d/dev/ser1

Test that the mouse manager is functioning correctly:

    Mouse test

Files:

For Mouse &:
When run as a driver, Mouse will usually close both standard output and standard error after startup initializations have been completed. During initialization, warning/informative messages may be written to standard output. Any problem which will cause Mouse to terminate will cause a diagnostic message to be written to standard error.

The Mouse manager reads mouse data from the file /dev/mousein which is managed by Input (which has been given a -d /dev/mousein option).

For Mouse test:
in the test mode, Mouse will attempt to talk to the mouse driver attached to the filename specified by the -n or to /dev/mouse.

Test output will be written to standard output.

Exit status:

For Mouse & :
When run as a manager, Mouse will usually never terminate. However, it will terminate if errors are encountered during initialization or in response to being given bad command-line parameters. Also, Mouse will terminate if it has forked itself into the background (which it will attempt to do if it was not started in the background to begin with).
0
Mouse successfully forked a background copy of itself.
>0
An error occurred during initialization, or an attempt to fork a copy of itself into the background failed. A diagnostic message will have been written to the standard error.
For Mouse test :
0
User successfully terminated a test by pressing both left and right mouse buttons.
>0
User had to terminate the test by killing the Mouse test process, or Mouse was unable to start the test because the Mouse driver was not running.

Caveats:

If supplied with command-line parameters intended for earlier versions of Mouse, Mouse will automatically run mousetrap to auto-detect the mouse type and run Input appropriately. Note that mousetrap is actually a link to inputtrap which runs in a special mode when invoked as mousetrap.

See also:

Input, inputtrap, mousetrap

mouse_*()


[Previous] [Contents] [Next]