This product is available free of charge and may be used at your own risk. Have fun. Click here for the ISC license.
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 XSMOUSE10.ZIP file into a directory of your choice and unzip it. Copy the XSMOUSE.SYS device driver to your C:\OS2\BOOT directory. Look into your CONFIG.SYS file to determine which mouse device driver has been installed on your system. You may find AMOUSE.SYS or MOUSE.SYS and you need to add the STYPE=XSMOUSE$ parameter to that device driver statement and to insert the DEVICE=C:\OS2\BOOT\XSMOUSE.SYS device driver statement just above it. Restart your system. After that XSMOUSE$ will be the device driver name to be used.
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.
Opens the device driver for read/write access with this process.
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 for read/write access with this process.
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.
Opens the device driver for read/write access with this process.
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 for read/write access with this process.
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.