Jump to content

MouGetPtrShape: Difference between revisions

From EDM2
m Martini moved page OS2 API:CPIMouGetPtrShape to OS2 API:CPI:MouGetPtrShape: Error on page name.
Ak120 (talk | contribs)
mNo edit summary
Line 1: Line 1:
==Description==
Gets the pointer shape for the session.
Gets the pointer shape for the session.


Line 12: Line 11:
APIRET      rc;            /*  Return code. */
APIRET      rc;            /*  Return code. */


rc = MouGetPtrShape(PtrBuffer, PtrDefRec,
rc = MouGetPtrShape(PtrBuffer, PtrDefRec, DeviceHandle);
      DeviceHandle);
</PRE>


</PRE>
==Parameters==
==Parameters==
; PtrBuffer (PVOID) - output : Pointer shape buffer.
;PtrBuffer (PVOID) - output :Pointer shape buffer.
Address of a buffer containing the bit image used as the pointer shape for the session. The buffer consists of AND and XOR pointer masks.
:Address of a buffer containing the bit image used as the pointer shape for the session. The buffer consists of AND and XOR pointer masks.


For CGA-compatible text modes (0, 1, 2, and 3) the following describes the AND and XOR pointer mask bit definitions for each character cell of the masks. Bit values are*colon.
For CGA-compatible text modes (0, 1, 2, and 3) the following describes the AND and XOR pointer mask bit definitions for each character cell of the masks. Bit values are *colon.
 
  15        Blinking
  15        Blinking  
  14-12    Background color
  14-12    Background color  
  11        Instensity
  11        Instensity  
  10-8      Foreground color
  10-8      Foreground color  
  7-0      Character
  7-0      Character  
;PtrDefRec (PPTRSHAPE) - in/out : Pointer definition structure.
:Contains information about the pointer shape.
; DeviceHandle (HMOU) - input :  Reserved. Must be 0.


; PtrDefRec (PPTRSHAPE) - in/out : Pointer definition structure.
Contains information about the pointer shape.
; DeviceHandle (HMOU) - input :  Reserved. Must be 0.
==Return Code==
==Return Code==
  rc (APIRET) - returns
  rc (APIRET) - returns
MouGetPtrShape returns one of the following values:
MouGetPtrShape returns one of the following values:
 
* 0 NO_ERROR
* 0     NO_ERROR
* 387 ERROR_MOUSE_INV_PARMS  
* 387       ERROR_MOUSE_INV_PARMS  
* 466 ERROR_MOU_DETACHED  
* 466       ERROR_MOU_DETACHED  
* 501 ERROR_MOUSE_NO_CONSOLE
* 501       ERROR_MOUSE_NO_CONSOLE


==Remarks==
==Remarks==
Line 49: Line 43:
The pointer shape may be set by the application with MouSetPtrShape or may be the default image provided by the installed Pointer Device Driver.  
The pointer shape may be set by the application with MouSetPtrShape or may be the default image provided by the installed Pointer Device Driver.  


==Example Code==
<PRE>
</PRE>
==Related Functions==
==Related Functions==
* [[OS2 API:CPI:
* [[MouSetPtrShape]]
 


[[Category:The OS/2 API Project]]
[[Category:Mou]]

Revision as of 22:36, 23 December 2016

Gets the pointer shape for the session.

Syntax

#define INCL_MOU
#include <os2.h>

PVOID        PtrBuffer;     /*  Pointer shape buffer. */
PPTRSHAPE    PtrDefRec;     /*  Pointer definition structure. */
HMOU         DeviceHandle;  /*  Reserved.  Must be 0. */
APIRET       rc;            /*  Return code. */

rc = MouGetPtrShape(PtrBuffer, PtrDefRec, DeviceHandle);

Parameters

PtrBuffer (PVOID) - output
Pointer shape buffer.
Address of a buffer containing the bit image used as the pointer shape for the session. The buffer consists of AND and XOR pointer masks.

For CGA-compatible text modes (0, 1, 2, and 3) the following describes the AND and XOR pointer mask bit definitions for each character cell of the masks. Bit values are *colon.

15        Blinking
14-12     Background color
11        Instensity
10-8      Foreground color
7-0       Character
PtrDefRec (PPTRSHAPE) - in/out
Pointer definition structure.
Contains information about the pointer shape.
DeviceHandle (HMOU) - input
Reserved. Must be 0.

Return Code

rc (APIRET) - returns

MouGetPtrShape returns one of the following values:

  • 0 NO_ERROR
  • 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 cb field must contain the size in bytes of the application buffer where the device driver is to insert the sessions pointer image. All other fields are returned to the application by MouGetPtrShape.

If the buffer size is insufficient, the cb 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.

Related Functions