en:docs:fapi:mousetptrshape

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Next revision
Previous revision
en:docs:fapi:mousetptrshape [2021/10/07 13:45] – created prokusheven:docs:fapi:mousetptrshape [2021/11/04 13:11] (current) prokushev
Line 1: Line 1:
 +{{page>en:templates:fapiint}}
 +
 +====== 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. 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.
  
-==Syntax==+===== Syntax ===== 
 +<code c>
  MouSetPtrShape (PtrBuffer, PtrDefRec, DeviceHandle)  MouSetPtrShape (PtrBuffer, PtrDefRec, DeviceHandle)
 +</code>
  
-==Parameters== +===== 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 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: +
-::{|class="wikitable" +
-!Bit||Description +
-|- +
-|15||Blinking +
-|- +
-|14-12||Background colour +
-|- +
-|11||Intensity +
-|- +
-|10-8||Foreground colour +
-|- +
-|7-0||Character +
-|} +
-;PtrDefRec (P[[PTRSHAPE]]) - 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. +
-:'''Programming Note:''' For other custom displays and for the extended modes of the EGA attachment, it is possible to set the display to modes that require multiple bit planes. In these cases, the area sized by the row and column limits must be repeated for each bit plane supported in that mode. Consequently, the calling process must supply enough data to allow the mouse device driver to draw the pointer shape on all currently supported bit planes in that session. For text modes, row and column offset must equal 0. +
-;DeviceHandle (HMOU) - input: Contains the handle of the mouse device obtained from a previous MouOpen.+
  
-==Return Code== +  * 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. 
-;rc (USHORT) - return:Return code descriptions are: + 
-*0 NO_ERROR +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: 
-*385 ERROR_MOUSE_NO_DEVICE + 
-*387 ERROR_MOUSE_INV_PARMS +^ Bit ^ Description ^ 
-*466 ERROR_MOU_DETACHED +|15|Blinking| 
-*501 ERROR_MOUSE_NO_CONSOLE +|14-12|Background colour| 
-*505 ERROR_MOU_EXTENDED_SG+|11|Intensity| 
 +|10-8|Foreground colour| 
 +|7-0|Character| 
 + 
 +  * PtrDefRec (P[[PTRSHAPE]]) - 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. 
 + 
 +**Programming Note:** For other custom displays and for the extended modes of the EGA attachment, it is possible to set the display to modes that require multiple bit planes. In these cases, the area sized by the row and column limits must be repeated for each bit plane supported in that mode. Consequently, the calling process must supply enough data to allow the mouse device driver to draw the pointer shape on all currently supported bit planes in that session. For text modes, row and column offset must equal 0. 
 + 
 +  * DeviceHandle (HMOU) - input: Contains the handle of the mouse device obtained from a previous MouOpen. 
 + 
 +===== Return Code ===== 
 + 
 +rc (USHORT) - return: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 
 +  *505 ERROR_MOU_EXTENDED_SG 
 + 
 +===== Remarks =====
  
-==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. 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.
  
Line 40: Line 49:
 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. For restrictions concerning the Pointer Draw Device Driver, see IBM Operating System/2 Version 1.2 I/O Subsystems And Device Support Volume 1.  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. For restrictions concerning the Pointer Draw Device Driver, see IBM Operating System/2 Version 1.2 I/O Subsystems And Device Support Volume 1. 
  
-==Bindings== +===== Bindings ===== 
-===C=== + 
-<PRE>+====C==== 
 +<code c>
 typedef struct _PTRSHAPE { /* moups */ typedef struct _PTRSHAPE { /* moups */
   USHORT cb;               /* total length necessary to build image */   USHORT cb;               /* total length necessary to build image */
Line 60: Line 70:
  
 USHORT     rc;            /* return code */ USHORT     rc;            /* return code */
-</PRE>+</code>
  
-===MASM=== +====MASM==== 
-<PRE>+<code asm>
 PTRSHAPE struc PTRSHAPE struc
   moups_cb      dw  ? ;total length necessary to build image   moups_cb      dw  ? ;total length necessary to build image
Line 81: Line 91:
  
 Returns WORD Returns WORD
-</PRE>+</code> 
  
-[[Category:Mou]]+{{page>en:templates:fapi}}