[ Previous | Next | Table of Contents | Index | Library Home | Legal | Search ]

Files Reference


mouse Special File

Purpose

Provides access to the natively attached mouse.

Description

The mouse special file serves as an interface between the application interface and the system mouse. This special file provides the application with the ability to receive input from the mouse and allows the application to change mouse configuration parameters, such as mouse sampling rates and resolution.

Configuration

Standard configuration methods work with the mouse special file. No user configurable attribute commands exist for this special file. Applications that open the special file can modify device attribute dynamically using the appropriate ioctl interface; however, modifications are not saved in the configuration database.

Usage Considerations

The open subroutine call specifying the mouse special file is processed normally except that the Oflag and Mode parameters are ignored. The open request is rejected when the special file is already opened or when a kernel extension attempts to open the special file. All mouse inputs are flushed following an open subroutine call until an input ring is established. The mouse device is reset to the default configuration when an open request is made.

The mouse special file does not support the read or write subroutine calls. Instead, input data is obtained from the mouse via the input ring. The read and write subroutine calls behave the same as read or write to the /dev/null file.

The mouse special file supports the following functions with ioctls:

IOCINFO Returns a devinfo structure.
MQUERYID Returns the query mouse device identifier.
MREGRING Specifies the address of the input ring and the value to be used as the source identifier when enqueueing reports on the ring.
MRFLUSH Flushes the input ring.
MTHRESHOLD Sets the mouse reporting threshold.
MRESOLUTION Sets the mouse resolution.
MSCALE Sets the mouse scale factor.
MSAMPLERATE Sets the mouse sample rate.

Error Codes

The following error codes can be found in the /usr/include/sys/errno.h file:

EFAULT Indicates insufficient authority to access an address or invalid address.
EIO Indicates and I/O error.
ENOMEM Indicates insufficient memory for required paging operation.
ENOSPC Indicates insufficient file system or paging space.
EINVAL Indicates invalid argument specified.
EINTR Indicates that the request has been interrupted by a signal.
EPERM Specifies a permanent error occurred.
EBUSY Indicates a device is busy.
ENXIO Indicates an unsupported device number.
ENODEV Indicates an unsupported device or device type mismatch.
EACCES Indicates that an open is not allowed.

Implementation Specifics

The mouse special file is part of Base Operating System (BOS) Runtime.

Files


/usr/include/sys/inputdd.h Contains the ioctl commands.

Related Information

The close subroutine, ioctl subroutine, open subroutine, read subroutine, write subroutine.

Special Files Overview .


[ Previous | Next | Table of Contents | Index | Library Home | Legal | Search ]