Difference between revisions of "MouSetPtrPos (OS/2 1.x)"

From EDM2
Jump to: navigation, search
(Created page with "==Description== This call directs the mouse driver to set a new row and column coordinate position for the mouse pointer. ==Syntax== <PRE> MouSetPtrPos (PtrPos, DeviceH...")
 
m (Example Code)
 
(3 intermediate revisions by 2 users not shown)
Line 1: Line 1:
==Description==
+
{{Legacy
 +
|RepFunc=[[MouSetPtrPos]]
 +
|Remarks=This page list the older version of the function for reference.
 +
}}
 
This call directs the mouse driver to set a new row and column coordinate position for the mouse pointer.
 
This call directs the mouse driver to set a new row and column coordinate position for the mouse pointer.
  
 
==Syntax==
 
==Syntax==
<PRE>
+
  MouSetPtrPos (PtrPos, DeviceHandle)
  MouSetPtrPos
+
  
    (PtrPos, DeviceHandle)
 
</PRE>
 
 
==Parameters==
 
==Parameters==
; PtrPos (PPTRLOC) - input : Address of the mouse pointer position structure:
+
;PtrPos (PPTRLOC) - input : Address of the mouse pointer position structure:
 
+
:pointerrow (USHORT) : New pointer row coordinate (pels or characters).
pointerrow (USHORT) : New pointer row coordinate (pels or characters).  
+
:pointercol (USHORT) : New pointer column coordinate (pels or characters).
 
+
;DeviceHandle (HMOU) - input : Handle of the mouse device from a previous MouOpen.
pointercol (USHORT) : New pointer column coordinate (pels or characters).  
+
 
+
; DeviceHandle (HMOU) - input : Handle of the mouse device from a previous MouOpen.  
+
  
 
==Return Code==
 
==Return Code==
 
  rc (USHORT) - return
 
  rc (USHORT) - return
 
 
Return code descriptions are:
 
Return code descriptions are:
 
 
* 0          NO_ERROR  
 
* 0          NO_ERROR  
 
* 385        ERROR_MOUSE_NO_DEVICE  
 
* 385        ERROR_MOUSE_NO_DEVICE  
Line 34: Line 29:
 
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.  
 
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.  
  
==Example Code==
+
==Bindings==
===C Binding===
+
===C===
 
<PRE>
 
<PRE>
typedef struct _PTRLOC {   /* moupl */
+
typedef struct _PTRLOC { /* moupl */
   USHORT row;               /* pointer row coordinate screen
+
   USHORT row;             /* pointer row coordinate screen position */
                                position */
+
   USHORT col;             /* pointer column coordinate screen position */
   USHORT col;               /* pointer column coordinate screen
+
                                position */
+
 
} PTRLOC;
 
} PTRLOC;
  
Line 54: Line 47:
 
</PRE>
 
</PRE>
  
===MASM Binding===
+
===MASM===
 
<PRE>
 
<PRE>
 
PTRLOC  struc
 
PTRLOC  struc
Line 70: Line 63:
 
Returns WORD
 
Returns WORD
 
</PRE>
 
</PRE>
==Related Functions==
 
*
 
 
  
[[Category:The OS/2 API Project]]
+
[[Category:Mou]]

Latest revision as of 16:57, 26 February 2019

Att.gif Legacy Function Warning
It is recommended to use a newer replacement for this function.
Replacement: MouSetPtrPos
Remarks: This page list the older version of the function for reference.

This call directs the mouse driver to set a new row and column coordinate position for the mouse pointer.

Syntax

MouSetPtrPos (PtrPos, DeviceHandle)

Parameters

PtrPos (PPTRLOC) - input 
Address of the mouse pointer position structure:
pointerrow (USHORT) : New pointer row coordinate (pels or characters).
pointercol (USHORT) : New pointer column coordinate (pels or characters).
DeviceHandle (HMOU) - input 
Handle of the mouse device 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

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.

Bindings

C

typedef struct _PTRLOC {  /* moupl */
  USHORT row;             /* pointer row coordinate screen position */
  USHORT col;             /* pointer column coordinate screen position */
} PTRLOC;

#define INCL_MOU

USHORT  rc = MouSetPtrPos(PtrPos, DeviceHandle);

PPTRLOC          PtrPos;        /* Double word structure */
HMOU             DeviceHandle;  /* Mouse device handle */

USHORT           rc;            /* return code */

MASM

PTRLOC  struc
  moupl_row  dw  ? ;pointer row coordinate screen position
  moupl_col  dw  ? ;pointer column coordinate screen position
PTRLOC  ends

EXTRN  MouSetPtrPos:FAR
INCL_MOU            EQU 1

PUSH@  OTHER   PtrPos        ;Double word structure
PUSH   WORD    DeviceHandle  ;Mouse device handle
CALL   MouSetPtrPos

Returns WORD