home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
OS/2 Shareware BBS: 10 Tools
/
10-Tools.zip
/
textmode.zip
/
mou.doc
< prev
next >
Wrap
Text File
|
1994-08-22
|
34KB
|
1,163 lines
*
* Title: mou.doc
*
* Function:
* Workplace OS/2 mouse APIs
*
* Copyright:
* Copyright (C) IBM Corp. 1993
*
* Notes:
* This is preliminary documentation and subject to change.
*
MouDrawPtr
================================================================================
This call allows a process to notify the mouse device driver that an area
previously restricted to the pointer image is now available to the mouse device
driver.
CALL SYNTAX
-----------
#define INCL_MOU
APIRET rc = MouDrawPtr(DeviceHandle);
HMOU DeviceHandle; /* Mouse device handle */
APIRET rc; /* return code */
PARAMETERS
----------
DeviceHandle (HMOU) - input
Reserved value, must be zero
RETURNS
-------
Return code descriptions are:
0 NO_ERROR
385 ERROR_MOUSE_NO_DEVICE
466 ERROR_MOU_DETACHED
501 ERROR_MOUSE_NO_CONSOLE
REMARKS
-------
The collision area (the pointer image restricted area) is established by
by MouRemovePtr. MouDrawPtr nullifies the effect of the MouRemovePtr
command. If there was no previous MouDrawPtr command or if a previous
MouDrawPtr command has already nullified the collision area, the MouRemovePtr
command is effectively a null operation.
This call is required to begin session pointer image drawing. At session
start the collision area is defined as the size of the display.
MouFlushQue
================================================================================
This call directs the mouse driver to flush (empty) the mouse event queue.
CALL SYNTAX
-----------
#define INCL_MOU
APIRET rc = MouFlushQue(DeviceHandle);
HMOU DeviceHandle; /* Mouse device handle */
APIRET rc; /* return code */
PARAMETERS
----------
DeviceHandle (HMOU) - input
Reserved value, must be zero
RETURNS
-------
Return code descriptions are:
0 NO_ERROR
385 ERROR_MOUSE_NO_DEVICE
466 ERROR_MOU_DETACHED
501 ERROR_MOUSE_NO_CONSOLE
MouGetDevStatus
================================================================================
This call returns status flags for the installed mouse device driver.
CALL SYNTAX
-----------
#define INCL_MOU
APIRET rc = MouGetDevStatus(DeviceStatus, DeviceHandle);
PULONG DeviceStatus; /* Current status flags */
HMOU DeviceHandle; /* Mouse device handle */
APIRET rc; /* return code */
PARAMETERS
----------
DeviceStatus (PULONG) - output
Address of the current status flag settings for the installed mouse device
driver.
The return value is a 4-byte set of bit flags.
Bit Description
31-10 Reserved, set to zero.
9 Set if mouse data returned in mickeys, not pels.
8 Set if the drawing operations for pointer draw routine are
disabled.
7-4 Reserved, set to zero.
3 Set if pointer draw routine disabled by unsupported mode.
2 Set if flush in progress.
1 Set if block read in progress.
0 Set if event queue busy with I/O.
DeviceHandle (HMOU) - input
Reserved value, must be zero
RETURNS
-------
Return code descriptions are:
0 NO_ERROR
385 ERROR_MOUSE_NO_DEVICE
466 ERROR_MOU_DETACHED
501 ERROR_MOUSE_NO_CONSOLE
MouGetEventMask
================================================================================
This call returns the current value of the mouse event queue mask.
CALL SYNTAX
-----------
#define INCL_MOU
APIRET rc = MouGetEventMask(EventMask, DeviceHandle);
PULONG EventMask; /* Event Mask word */
HMOU DeviceHandle; /* Mouse device handle */
APIRET rc; /* return code */
PARAMETERS
----------
EventMask (PULONG) - output
Address in application storage where the current mouse device driver's
event mask is returned to the caller by the mouse device driver.
The EventMask is set by MouSetEventMask, and has the following definition:
Bit Description
31-7 Reserved, set to zero.
6 Report button 3 press/release events, without mouse motion.
5 Report button 3 press/release events, with mouse motion.
4 Report button 2 press/release events, without mouse motion.
3 Report button 2 press/release events, with mouse motion.
2 Report button 1 press/release events, without mouse motion.
1 Report button 1 press/release events, with mouse motion.
0 Report mouse motion events with no button press/release
events.
DeviceHandle (HMOU) - input
Reserved value, must be zero
RETURNS
-------
Return code descriptions are:
0 NO_ERROR
385 ERROR_MOUSE_NO_DEVICE
466 ERROR_MOU_DETACHED
501 ERROR_MOUSE_NO_CONSOLE
REMARKS
-------
MouGetNumButtons
================================================================================
This call returns the number of buttons supported on the installed mouse driver.
CALL SYNTAX
-----------
#define INCL_MOU
APIRET rc = MouGetNumButtons(NumberOfButtons, DeviceHandle);
PULONG NumberOfButtons; /* Number of mouse buttons */
HMOU DeviceHandle; /* Mouse device handle */
APIRET rc; /* return code */
PARAMETERS
----------
NumberOfButtons (PULONG) - output
Address of the number of physical buttons. The return values for the number
of buttons supported are:
Value Definition
1 One mouse button
2 Two mouse buttons
3 Three mouse buttons.
DeviceHandle (HMOU) - input
Reserved value, must be zero
RETURNS
-------
Return code descriptions are:
385 ERROR_MOUSE_NO_DEVICE
466 ERROR_MOU_DETACHED
501 ERROR_MOUSE_NO_CONSOLE
MouGetNumMickeys
================================================================================
This call returns the number of mickeys in each centimeter for the installed
mouse driver.
CALL SYNTAX
-----------
#define INCL_MOU
APIRET rc = MouGetNumMickeys(NumberOfMickeys, DeviceHandle);
PULONG NumberOfMickeys; /* Number mickeys/centimeter */
HMOU DeviceHandle; /* Mouse device handle */
APIRET rc; /* return code */
PARAMETERS
----------
NumberOfMickeys (PULONG) - output
Address of the number of physical mouse motion units. Mouse motion units
are reported in mickeys in each centimeter. This value is constant based
upon the mouse device attached.
DeviceHandle (HMOU) - input
Reserved value, must be zero.
RETURNS
-------
Return code descriptions are:
0 NO_ERROR
385 ERROR_MOUSE_NO_DEVICE
466 ERROR_MOU_DETACHED
501 ERROR_MOUSE_NO_CONSOLE
MouGetNumQueEl
================================================================================
This call returns the current status for the mouse device driver event queue.
CALL SYNTAX
-----------
typedef struct _MOUQUEINFO { /* mouqi */
ULONG cEvents; /* current number of event queue elements */
ULONG cmaxEvents; /* MaxNumQueElements value */
} MOUQUEINFO;
#define INCL_MOU
APIRET rc = MouGetNumQueEl(QueDataRecord, DeviceHandle);
PMOUQUEINFO QueDataRecord; /* Ptr to structure */
HMOU DeviceHandle; /* Mouse device handle */
APIRET rc; /* return code */
PARAMETERS
----------
QueDataRecord (PMOUQUEINFO) - output
Address of the mouse queue status structure:
numqelements (ULONG)
Current number of event queue elements, in the range 0 <> value <>
maxnumqelements.
maxnumqelements (ULONG)
Maximum number of queue elements supported.
DeviceHandle (HMOU) - input
Reserved value, must be zero.
RETURNS
-------
Return code descriptions are:
0 NO_ERROR
385 ERROR_MOUSE_NO_DEVICE
466 ERROR_MOU_DETACHED
501 ERROR_MOUSE_NO_CONSOLE
REMARKS
-------
The maxnumqelements returned by this function is established during mouse
device driver configuration.
MouGetPtrPos
================================================================================
This call queries the mouse driver to determine the current row and column
coordinate position of the mouse pointer.
CALL SYNTAX
-----------
typedef struct _PTRLOC { /* moupl */
ULONG row; /* pointer row screen position */
ULONG col; /* pointer column screen position */
} PTRLOC;
#define INCL_MOU
APIRET rc = MouGetPtrPos(PtrPos, DeviceHandle);
PPTRLOC PtrPos; /* Double word structure */
HMOU DeviceHandle; /* Mouse device handle */
APIRET rc; /* return code */
PARAMETERS
----------
PtrPos (PPTRLOC) - output
Address of the mouse pointer position structure:
pointerrow (ULONG)
Current pointer row coordinate (pels or characters).
pointercol (ULONG)
Current pointer column coordinate (pels or characters).
DeviceHandle (HMOU) - input
Reserved value, must be zero.
RETURNS
-------
Return code descriptions are:
0 NO_ERROR
385 ERROR_MOUSE_NO_DEVICE
466 ERROR_MOU_DETACHED
501 ERROR_MOUSE_NO_CONSOLE
REMARKS
-------
MouGetPtrShape
================================================================================
This call allows a process to get the pointer shape for the session.
CALL SYNTAX
-----------
typedef struct _PTRSHAPE {
USHORT cb; /* total length necessary to build image */
USHORT col; /* # of columns in mouse shape */
USHORT row; /* number of rows in mouse shape */
USHORT colHot; /* column of pointer image hotspot */
USHORT rowHot; /* row of pointer image hotspot */
} PTRSHAPE;
#define INCL_MOU
APIRET rc = MouGetPtrShape(PtrBuffer, PtrDefRec, DeviceHandle);
PBYTE PtrBuffer; /* Pointer shape buffer */
PPTRSHAPE PtrDefRec; /* Pointer definition struct */
HMOU DeviceHandle; /* Mouse device handle */
APIRET rc; /* return code */
PARAMETERS
----------
PtrBuffer (PBYTE) - output
Address of an area in application storage where the pointer draw device
driver returns the pointer bit image. See MouSetPtrShape for a further
description of the resulting content of this buffer.
PtrDefRec (PPTRSHAPE) - input/output
Address of a structure in application storage where the application stores
the data necessary for the pointer device driver to return information
about the Row by Col image for each bit plane for the mode the display is
currently running. See MouSetPtrShape for a further description of the
contents of this structure.
TotLength (USHORT)
Length of the pointer buffer available for the pointer device driver to
build a Row by Col image for each bit plane for the mode the display is
currently running. This value is supplied by the application. If the
value is too small, pointer draw places the true length of the image in
this field, and returns an error.
For all OS/2 system-supported modes, TotLength is specified in bytes and
is equal to:
Mono & Text Modes
For text mode height and width must be 1, so length is always 4.
TotLength = 4
Graphics Mode
Width-in-pels must be a multiple of 8.
TotLength = (height in pels)*(width in pels)*
(bits per pel)*2/8
col (USHORT)
Number of columns in the mouse shape. In graphics modes, this field
contains the pel width (columns) of the mouse shape for the session and
must be greater than or equal to 1. In text modes, col must equal 1.
row (USHORT)
Number of rows in the mouse shape. In graphics modes, this field
contains the pel height (rows) of the mouse shape for the session and
must be greater than or equal to 1. In text modes, row must equal 1.
coloffset (USHORT)
This value is returned by the mouse device driver to indicate the
relative column offset within the pointer image. The value defines the
center (hotspot) of the pointer image. This value is a signed number
that represents either character or pel offset, depending on the display
mode.
rowoffset (USHORT)
This value is returned by the mouse device driver to indicate the
relative row offset within the pointer image. The value defines the
center (hotspot) of the pointer image. This value is a signed number
that represents either character or pel offset, depending on the display
mode.
DeviceHandle (HMOU) - input
Reserved value, must be zero.
RETURNS
-------
Return code descriptions are:
0 NO_ERROR
385 ERROR_MOUSE_NO_DEVICE
387 ERROR_MOUSE_INV_PARMS
466 ERROR_MOU_DETACHED
501 ERROR_MOUSE_NO_CONSOLE
REMARKS
-------
The application passes a parameter list with the same meaning as defined for
MouSetPtrShape to the mouse device driver. The mouse device driver copies the
parameters that describe the pointer shape and attributes into the pointer
definition control block pointed to by the PtrDefRec parameter. The word 0
(buffer length = TotLength) pointer definition record parameter field must
contain the size in bytes of the application buffer where the device driver is
to insert the sessions pointer image. All other words in the parameter list are
returned to the application by MouGetPtrShape.
If the buffer size is insufficient, the TotLength field contains the actual size
in bytes of the returned pointer image.
The pointer shape may be set by the application with MouSetPtrShape or may be
the default image provided by the installed Pointer Device Driver.
MouGetScaleFact
================================================================================
This call returns a pair of 1-word scaling factors for the current mouse device.
CALL SYNTAX
-----------
typedef struct _SCALEFACT { /* mousc */
ULONG rowScale; /* row scaling factor */
ULONG colScale; /* column coordinate scaling factor */
} SCALEFACT;
#define INCL_MOU
APIRET rc = MouGetScaleFact(ScaleStruct, DeviceHandle);
PSCALEFACT ScaleStruct;
HMOU DeviceHandle; /* Mouse device handle */
APIRET rc; /* return code */
PARAMETERS
----------
ScaleStruct (PSCALEFACT) - output
Address of the control block structure that contains the current row and
column coordinate scaling factors. The scaling factors must be greater
than or equal to 1 and less than or equal to (32K - 1).
rowscale (ULONG)
Row scaling factor.
colscale (ULONG)
Column scaling factor.
See MouSetScaleFact for more information.
DeviceHandle (HMOU) - input
Reserved value, must be zero.
RETURNS
-------
Return code descriptions are:
0 NO_ERROR
385 ERROR_MOUSE_NO_DEVICE
466 ERROR_MOU_DETACHED
501 ERROR_MOUSE_NO_CONSOLE
REMARKS
-------
The units of the scale factor depend on the mode of the display screen for the
session. If the screen is operating in text mode, the scaling units are
relative to characters. If the screen is operating in graphics mode, the
scaling units are relative to pels.
MouReadEventQue
================================================================================
This call reads an event from the mouse device FIFO event queue, and places it
in a structure provided by the application.
CALL SYNTAX
-----------
typedef struct _MOUEVENTINFO { /* mouev */
ULONG fs; /* Mouse state */
LONG row; /* Horizontal position */
LONG col; /* Vertical position */
ULONG time; /* Timestamp */
} MOUEVENTINFO;
#define INCL_MOU
APIRET rc = MouReadEventQue(Buffer, ReadType, DeviceHandle);
PMOUEVENTINFO Buffer; /* 10 byte Structure address */
PULONG ReadType; /* Read type */
HMOU DeviceHandle; /* Mouse device handle */
APIRET rc; /* return code */
PARAMETERS
----------
Buffer (PMOUEVENTINFO) - output
Address of the status of the mouse event queue.
fs (ULONG)
State of the mouse at the time of the event.
Bit Description
31-7 Reserved, set to zero.
6 Set if button 3 is down.
5 Set if mouse is moving and button 3 is down.
4 Set if button 2 is down.
3 Set if mouse is moving and button 2 is down.
2 Set if button 1 is down.
1 Set if mouse is moving and button 1 is down.
0 Set if mouse is moving and no buttons are down.
row (ULONG)
Absolute or relative row position.
col (ULONG)
Absolute or relative column position.
time (ULONG)
Time stamp.
ReadType (PULONG) - input
Address of the action to take when MouReadEventQue is issued and the mouse
event queue is empty. If the mouse event queue is not empty, this
parameter is not examined by the mouse support. ReadType values are:
Value Definition
0 No Wait for data on empty queue (return a NULL record)
1 WAIT for data on empty queue.
DeviceHandle (HMOU) - input
Reserved value, must be zero.
RETURNS
-------
Return code descriptions are:
0 NO_ERROR
385 ERROR_MOUSE_NO_DEVICE
387 ERROR_MOUSE_INV_PARMS
393 ERROR_MOUSE_NO_DATA
466 ERROR_MOU_DETACHED
501 ERROR_MOUSE_NO_CONSOLE
REMARKS
-------
The types of queued events are directly affected by the current value of the
event mark. MouSetEventMask is used to indicate the types of events
desired, and MouGetEventMask is used to query the current value of the mask.
Refer to these functions for further explanation of the masking of events.
The Row and Column fields in the Buffer Parameter may contain either absolute
display coordinates or relative mouse motion in mickeys. See MouSetDevStatus
for additional information.
At session initialization, the event mask is zero, and thus no mouse events
will be generated until a MouSetEventMask is done.
The mouse events can also be read using KbdGetConsole.
MouRemovePtr
================================================================================
This call allows a process to notify the mouse device driver that the area
defined by the passed parameters is for the exclusive use of the application.
This area is defined as the collision area and is not available to the mouse
device driver when drawing pointer images.
CALL SYNTAX
-----------
typedef struct _NOPTRRECT { /* mourt */
ULONG row; /* upper left row coordinates */
ULONG col; /* upper left column coordinates */
ULONG cRow;
ULONG cCol;
} NOPTRRECT;
#define INCL_MOU
APIRET rc = MouRemovePtr(PtrArea, DeviceHandle);
PNOPTRRECT PtrArea; /* Address of pointer data block */
HMOU DeviceHandle; /* Mouse device handle */
APIRET rc; /* return code */
PARAMETERS
----------
PtrArea (PNOPTRRECT) - input
Address of the pointer shape collision area structure:
leftrow (ULONG)
Upper left row coordinate (pels or characters).
leftcol (ULONG)
Upper left column coordinate (pels or characters).
rightrow (ULONG)
Lower right row coordinate (pels or characters).
rightcol (ULONG)
Lower right column coordinate (pels or characters).
DeviceHandle (HMOU) - input
Reserved value, must be zero.
RETURNS
-------
Return code descriptions are:
0 NO_ERROR
385 ERROR_MOUSE_NO_DEVICE
387 ERROR_MOUSE_INV_PARMS
466 ERROR_MOU_DETACHED
501 ERROR_MOUSE_NO_CONSOLE
REMARKS
-------
MouRemovePtr may be issued by any process in the session. However, only one
collision area is active at a time. Each MouRemovePtr command has the effect of
resetting the collision area to the location and area specified by the current
command.
If the logical pointer position is outside of the collision area specified by
the latest MouRemovePtr command, the pointer image is drawn.
The MouDrawPtr command effectively cancels the MouRemovePtr command and allows
the pointer to be drawn anywhere on the screen, until a new MouRemovePtr command
is issued.
MouSetDevStatus
================================================================================
This call sets the mouse device driver status flags for the installed mouse
device driver.
CALL SYNTAX
-----------
#define INCL_MOU
APIRET rc = MouSetDevStatus(DeviceStatus, DeviceHandle);
PULONG DeviceStatus; /* Status flags */
HMOU DeviceHandle; /* Mouse device handle */
APIRET rc; /* return code */
PARAMETERS
----------
DeviceStatus (PULONG) - input
Address of the desired status flag settings.
The passed parameter is a 4-byte set of flags. Only the high-order byte
has meaning.
Bit Description
31-10 Reserved, set to zero.
9 Set if mouse device is to return data in mickeys.
8 Set if the drawing operations for the pointer draw routine are
to be disabled.
7-0 Reserved, set to zero.
DeviceHandle (HMOU) - input
Reserved value, must be zero.
RETURNS
-------
Return code descriptions are:
0 NO_ERROR
385 ERROR_MOUSE_NO_DEVICE
387 ERROR_MOUSE_INV_PARMS
466 ERROR_MOU_DETACHED
501 ERROR_MOUSE_NO_CONSOLE
REMARKS
-------
MouSetDevStatus is the complement to MouGetDevStatus. However, not all status
flags may be set with MouSetDevStatus. Only the flags corresponding to the
following functions may be modified:
- Return data in mickeys.
Normally, mouse data is returned to the application with the absolute
display mode coordinates of the pointer image position on the display
screen. By setting this status flag, mouse data is returned in relative
mickeys, a unit of mouse movement.
- Don't call pointer draw device.
Normally, the pointer draw device driver is called for all drawing
operations. By setting this status flag, the mouse device driver does not
call the pointer draw device driver. The application must draw any required
pointer image on the screen.
At session initialization, the device status is set to zero.
MouSetEventMask
================================================================================
This call assigns a new event mask to the current mouse device driver.
CALL SYNTAX
-----------
#define INCL_MOU
APIRET rc = MouSetEventMask(EventMask, DeviceHandle);
PULONG EventMask; /* Mouse device event mask ptr */
HMOU DeviceHandle; /* Mouse device handle */
APIRET rc; /* return code */
PARAMETERS
----------
EventMask (PULONG) - input
Address of a value in application storage used to indicate what mouse
events are to be placed on the event queue (see MouReadEventQue) and which
events are to be ignored.
The EventMask bit values are described below:
Bit Description
15-7 Reserved, set to zero.
6 Report button 3 press/release events, without mouse motion
5 Report button 3 press/release events, with mouse motion
4 Report button 2 press/release events, without mouse motion
3 Report button 2 press/release events, with mouse motion
2 Report button 1 press/release events, without mouse motion
1 Report button 1 press/release events, with mouse motion
0 Mouse motion events with no button press/release events.
A bit clear setting (set to zero) in an EventMask bit position indicates
that the associated type of event is not reported to the application.
DeviceHandle (HMOU) - input
Reserved value, must be zero.
RETURNS
-------
Return code descriptions are:
0 NO_ERROR
385 ERROR_MOUSE_NO_DEVICE
466 ERROR_MOU_DETACHED
501 ERROR_MOUSE_NO_CONSOLE
REMARKS
-------
Setting a bit in the event mask means that the associated event is reported on
the mouse FIFO event queue.
At session initialization, the event mask is set to zero.
MouSetPtrPos
================================================================================
This call directs the mouse driver to set a new row and column coordinate
position for the mouse pointer.
CALL SYNTAX
-----------
typedef struct _PTRLOC { /* moupl */
ULONG row; /* pointer row screen position */
ULONG col; /* pointer column screen position */
} PTRLOC;
#define INCL_MOU
APIRET rc = MouSetPtrPos(PtrPos, DeviceHandle);
PPTRLOC PtrPos; /* Double word structure */
HMOU DeviceHandle; /* Mouse device handle */
APIRET rc; /* return code */
PARAMETERS
----------
PtrPos (PPTRLOC) - input
Address of the mouse pointer position structure:
pointerrow (ULONG)
New pointer row coordinate (pels or characters).
pointercol (ULONG)
New pointer column coordinate (pels or characters).
DeviceHandle (HMOU) - input
Reserved value, must be zero.
RETURNS
-------
Return code descriptions are:
0 NO_ERROR
385 ERROR_MOUSE_NO_DEVICE
387 ERROR_MOUSE_INV_PARMS
466 ERROR_MOU_DETACHED
501 ERROR_MOUSE_NO_CONSOLE
REMARKS
-------
The application must ensure that the coordinate position specified conforms to
the current display mode orientation for the session. Pel values must be used
for graphics modes and character values for text modes.
This function has no effect on the display's current collision area definition
as specified by the MouDrawPtr call. If the mouse pointer image is directed
into a defined collision area, the pointer image is not drawn until either the
pointer is moved outside the collision area or the collision area is released by
the MouDrawPtr call.
At session initialization, the pointer is set to the center of the screen,
but is not drawn, because the collision area is set to the entire screen.
MouSetPtrShape
===============================================================================
This call allows a process to set the pointer shape and size to be used as the
mouse device driver pointer image for all applications in a session.
CALL SYNTAX
-----------
#define INCL_MOU
APIRET rc = MouSetPtrShape(PtrBuffer, PtrDefRec, DeviceHandle);
PBYTE PtrBuffer; /* Pointer shape buffer */
PPTRSHAPE PtrDefRec; /* Pointer definition record */
HMOU DeviceHandle; /* Mouse device handle */
APIRET rc; /* return code */
PARAMETERS
----------
PtrBuffer (PBYTE) - input
Address of a buffer containing the bit image used by the mouse device
driver as the pointer shape for that session. The buffer consists of AND
and XOR pointer masks in a format meaningful to the pointer draw device
driver.
For text modes (0, 1, 2, and 3) the following describes the AND and XOR
pointer mask bit definitions for each character cell of the mask:
Bit values are:
Bit Description
15 Blinking
14-12 Background color
11 Intensity
10-8 Foreground color
7-0 Character
PtrDefRec (PPTRSHAPE) - input
Address of the structure where the application stores the necessary data
for the pointer draw device driver to build a row-by-column image for each
bit plane for the current display mode. The pointer definition record
structure follows:
TotLength (USHORT)
The total length of the data necessary for the pointer draw device
driver to build a row-by-column image for each bit plane for the current
display mode.
For all OS/2 system-supported modes, TotLength is specified in bytes and
is equal to:
Mono & Text Modes
For text mode height and width must be 1, so length is
always 4.
Graphics Mode
Width-in-pels must be a multiple of 8.
TotLength = (height in pels)*(width in pels)*
(bits per pel)*2/8
col (USHORT)
Number of columns in the mouse shape. In graphics modes, this field
contains the pel width (columns) of the mouse shape for the session and
must be greater than or equal to 1. In text modes, col must equal 1.
row (USHORT)
Number of rows in the mouse shape. In graphics modes, this field
contains the pel height (rows) of the mouse shape for the session and
must be greater than or equal to 1. In text modes, row must equal 1.
coloffset (USHORT)
This value is returned by the mouse device driver to indicate the
relative column offset within the pointer image. The value defines the
center (hotspot) of the pointer image. This value is a signed number
that represents either character or pel offset, depending on the display
mode.
rowoffset (USHORT)
This value is returned by the mouse device driver to indicate the
relative row offset within the pointer image. The value defines the
center (hotspot) of the pointer image. This value is a signed number
that represents either character or pel offset, depending on the display
mode.
DeviceHandle (HMOU) - input
Reserved value, must be zero.
RETURNS
-------
Return code descriptions are:
0 NO_ERROR
385 ERROR_MOUSE_NO_DEVICE
387 ERROR_MOUSE_INV_PARMS
466 ERROR_MOU_DETACHED
501 ERROR_MOUSE_NO_CONSOLE
REMARKS
-------
An application passes a data image to the mouse device driver that the mouse
driver applies to the screen whenever the logical pointer position is not
located in the application-defined collision area. The application synchronizes
use of the screen with the mouse driver by way of MouRemovePtr and MouDrawPtr.
The pointer shape is mapped by the Pointer Draw Device Driver and determined
completely by the application. The height and width may vary from 1 through the
pel size of the display screen.
MouSetScaleFact
================================================================================
This call assigns to the current mouse device driver a new set of scaling factors.
CALL SYNTAX
-----------
typedef struct _SCALEFACT {
ULONG rowScale; /* row scaling factor */
ULONG colScale; /* column coordinate scaling factor */
} SCALEFACT;
#define INCL_MOU
APIRET rc = MouSetScaleFact(ScaleStruct, DeviceHandle);
PSCALEFACT ScaleStruct;
HMOU DeviceHandle; /* Mouse device handle */
APIRET rc; /* return code */
PARAMETERS
----------
ScaleStruct (PSCALEFACT) - input
Address of the control block structure that contains the current row and
column coordinate scaling factors. The scaling factors must be greater
than or equal to 1 and less than or equal to (32K - 1).
rowscale (ULONG)
Row scaling factor.
colscale (ULONG)
Column scaling factor.
DeviceHandle (HMOU) - input
Reserved value, must be zero.
RETURNS
-------
Return code descriptions are:
0 NO_ERROR
385 ERROR_MOUSE_NO_DEVICE
387 ERROR_MOUSE_INV_PARMS
466 ERROR_MOU_DETACHED
501 ERROR_MOUSE_NO_CONSOLE
REMARKS
-------
MouSetScaleFact sets the mickey-to-pixel ratio for mouse motion. The row scale
and column scale ratios specify a number of mickeys for each 8 pixels. The
default value for the row scale is 16 mickeys for each 8 pixels. The default
value for the column scale is 8 mickeys to 8 pixels.
The number of pixels moved does not have to correspond 1-to-1 with the number of
mickeys the mouse moves. The scaling factor defines a sensitivity for the mouse
that is a ratio of the number of mickeys required to move the cursor 8 pixels on
the screen. The sensitivity determines at what rate the cursor moves on the
screen.