The Mouse unit is a programming
interface for controlling a mouse pointing device in MS-DOS and Win32
console applications.
Included is the ability to define and install your own interrupt
mouse driver. This driver is called whenever a button on the mouse
is pressed or released or when the mouse is moved.
It is also possible to poll for mouse movement.
The benefits of having an interrupt mouse driver is that mouse events
can take place at any time; one doesn't have to wait for them.
Polling for mouse events must occur within some type of loop where the status
of the mouse is constantly checked. There are many benefits over polling
for mouse events.
The Mouse unit gives a Pascal program access to the main mouse-support
functions:
Determining the presence or absence of a mouse
Mouse cursor positioning
Getting information about the position and the button states
Installing a mouse-driven Pascal interrupt handler