May be freely used and exchanged, as long as it is not modified. You may use this product solely at your own risk. I cannot be held responsible for any damages occurring due to your using this product. You may not lease, rent or sell this product to any other party. Have fun.
Description - This driver enables you to send absolute mouse events into the system. It provides an application programming interface that conforms to the standard DosRead and DosWrite functions and as such may be easily used from rexx procedures using the charin and charout functions. It has been especially designed to ease the development and integration of touch screen solutions into the system.
Installation - Move the XSMOUSE00.ZIP file into a directory of your choice and unzip it. Copy the XSMOUSE.SYS file to your C:\OS2\BOOT directory. Modify your CONFIG.SYS file to contain DEVICE=C:\OS2\BOOT\XSMOUSE.SYS and DEVICE=C:\OS2\BOOT\MOUSE.SYS STYPE=XSMOUSE$ statements in that order and restart your system. After that XSMOUSE$ will be the device driver name to be used.
[Event Buffer] [Mouse Events] [Rexx Examples] [Prototyping Interface] [Application Program Interface]
| field | size | description |
|---|---|---|
| Event | word | mouse event flags |
| yPos | word | current y position |
| xPos | word | current x position |
| yMax | word | maximum y position |
| xMax | word | maximum x position |
The common event buffer is used to send absolute mouse events to mouse.sys like this is usually done for touch screens. Positions are measured in absolute coordinates. The coordinate position 0,0 represent the top left corner of the screen and the coordinate position yMax,xMax represent the bottom right corner of the screen and these are mapped by mouse.sys into the current display mode.
| button state | flag |
|---|---|
| all buttons up | 0000h |
| button 1 down | 0004h |
| button 2 down | 0010h |
| button 3 down | 0040h |
| button state | flag |
|---|---|
| all buttons up | 0001h |
| button 1 down | 0002h |
| button 2 down | 0008h |
| button 3 down | 0020h |
To report button states when the mouse stays at the old coordinate position use the mouse event flags listed under Old Position. To report button states when the mouse moves to the new coordinate position use the mouse event flags listed under New Position.
getevent.cmd - Reads the last pointing device event from the common event buffer. Displays that event in hexadecimal format.
putevent.cmd - Moves the pointer to the center of the screen. Displays that absolute pointing device event in hexadecimal format.
The prototyping interface uses OS/2 Procedures language 2/REXX functions. To emulate the mouse the following functions are described:
[Acquire Driver] [Read Mouse Event] [Write Mouse Event] [Release Driver]
Opens the device driver with read/write access for this process and denies read/write access to all other processes as required by the device driver. The device driver relies on standard file system access and sharing rules for contention control and does not use the notification of the open.
sName - Name of the device driver to be opened.
rc - Return Code. See the OS/2 Procedures Language 2/REXX Reference for the standard strings returned.
Reads the last pointing device event from the common event buffer.
sName - Name of the device driver to be used.
sBuffer - Name of the buffer to receive the common event buffer content.
Writes the absolute pointing device event into the common event buffer.
sName - Name of the device driver to be used.
sBuffer - Name of the buffer containing the absolute pointing device event.
rc - Return Code. See the OS/2 Procedures Language 2/REXX Reference for the standard strings returned.
Closes the device driver and allows read/write access to other processes. The device driver relies on standard file system access and sharing rules for contention control and does not use the notification of the close.
sName - Name of the device driver to be closed.
rc - Return Code. See the OS/2 Procedures Language 2/REXX Reference for the standard strings returned.
The application program interface uses OS/2 Control Program functions. To emulate the mouse the following functions are described:
Opens the device driver with read/write access for this process and denies read/write access to all other processes as required by the device driver. The device driver relies on standard file system access and sharing rules for contention control and does not use the notification of the open.
pszName - Address of the asciiz name of the device driver to be opened.
phDevice - Address of the variable to receive the device handle.
pulAction - Address of the variable to receive the action taken.
ulrc - Return Code. See the Control Program Guide and Reference for the standard values returned.
Reads the last pointing device event from the common event buffer.
hDevice - The device handle obtained from a previous call to DosOpen.
pBuffer - Address of the buffer to receive the common event buffer content.
pcbDone - Address of the variable to receive the number of bytes (10).
ulrc - Return Code. See the Control Program Guide and Reference for the standard values returned.
Writes the absolute pointing device event into the common event buffer.
hDevice - The device handle obtained from a previous call to DosOpen.
pBuffer - Address of the buffer containing the absolute pointing device event.
pcbDone - Address of the variable to receive the number of bytes (10).
ulrc - Return Code. See the Control Program Guide and Reference for the standard values returned.
Closes the device driver and allows read/write access to other processes. The device driver relies on standard file system access and sharing rules for contention control and does not use the notification of the close.
hDevice - The device handle obtained from a previous call to DosOpen.
ulrc - Return Code. See the Control Program Guide and Reference for the standard values returned.