Jump to content

MouGetEventMask (OS/2 1.x): Difference between revisions

From EDM2
No edit summary
Ak120 (talk | contribs)
mNo edit summary
 
Line 1: Line 1:
{{Legacy
|RepFunc=[[MouGetEventMask]]
|Remarks=This page list the older version of the function for reference.
}}
This call returns the current value of the mouse event queue mask.
This call returns the current value of the mouse event queue mask.


Line 10: Line 6:
==Parameters==
==Parameters==
;EventMask (PUSHORT) - output : Address in application storage where the current mouse device driver's event mask is returned to the caller by the mouse device driver.
;EventMask (PUSHORT) - 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:
The EventMask is set by MouSetEventMask, and has the following definition:
::{|class="wikitable"
'''Bit       Description'''
!Bit||Description
15-7     Reserved, set to zero.  
|-
6       Set to report button 3 press/release events, without mouse motion.  
|15-7||Reserved, set to zero.
5       Set to report button 3 press/release events, with mouse motion.  
|-
4       Set to report button 2 press/release events, without mouse motion.  
|6||Set to report button 3 press/release events, without mouse motion.
3       Set to report button 2 press/release events, with mouse motion.  
|-
2       Set to report button 1 press/release events, without mouse motion.  
|5||Set to report button 3 press/release events, with mouse motion.
1       Set to report button 1 press/release events, with mouse motion.  
|-
0       Set to report mouse motion events with no button press/release events.  
|4||Set to report button 2 press/release events, without mouse motion.
 
|-
; DeviceHandle (HMOU) - input : Handle of the mouse device from a previous MouOpen.  
|3||Set to report button 2 press/release events, with mouse motion.
|-
|2||Set to report button 1 press/release events, without mouse motion.
|-
|1||Set to report button 1 press/release events, with mouse motion.
|-
|0||Set to report mouse motion events with no button press/release events.
|}
;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  
*466 ERROR_MOU_DETACHED
* 466       ERROR_MOU_DETACHED  
*501 ERROR_MOUSE_NO_CONSOLE
* 501       ERROR_MOUSE_NO_CONSOLE  
*505 ERROR_MOU_EXTENDED_SG
* 505       ERROR_MOU_EXTENDED_SG


==Remarks==
==Remarks==
Buttons are logically numbered from left to right.  
Buttons are logically numbered from left to right.


==Example Code==
==Bindings==
=== C Binding===
=== C ===
<PRE>
<PRE>
#define INCL_MOU
#define INCL_MOU
Line 43: Line 46:
USHORT  rc = MouGetEventMask(EventMask, DeviceHandle);
USHORT  rc = MouGetEventMask(EventMask, DeviceHandle);


PUSHORT         EventMask;    /* Event Mask word */
PUSHORT EventMask;    /* Event Mask word */
HMOU             DeviceHandle;  /* Mouse device handle */
HMOU   DeviceHandle;  /* Mouse device handle */


USHORT           rc;            /* return code */
USHORT rc;            /* return code */
</PRE>
</PRE>


===MASM Binding===
===MASM===
<PRE>
<PRE>
EXTRN  MouGetEventMask:FAR
EXTRN  MouGetEventMask:FAR
Line 60: Line 63:
Returns WORD
Returns WORD
</PRE>
</PRE>
==Related Functions==
*


[[Category:Mou]]
[[Category:Mou]]

Latest revision as of 22:36, 11 December 2019

This call returns the current value of the mouse event queue mask.

Syntax

MouGetEventMask (EventMask, DeviceHandle)

Parameters

EventMask (PUSHORT) - 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
15-7 Reserved, set to zero.
6 Set to report button 3 press/release events, without mouse motion.
5 Set to report button 3 press/release events, with mouse motion.
4 Set to report button 2 press/release events, without mouse motion.
3 Set to report button 2 press/release events, with mouse motion.
2 Set to report button 1 press/release events, without mouse motion.
1 Set to report button 1 press/release events, with mouse motion.
0 Set to report mouse motion events with no button press/release events.
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
  • 466 ERROR_MOU_DETACHED
  • 501 ERROR_MOUSE_NO_CONSOLE
  • 505 ERROR_MOU_EXTENDED_SG

Remarks

Buttons are logically numbered from left to right.

Bindings

C

#define INCL_MOU

USHORT  rc = MouGetEventMask(EventMask, DeviceHandle);

PUSHORT EventMask;     /* Event Mask word */
HMOU    DeviceHandle;  /* Mouse device handle */

USHORT  rc;            /* return code */

MASM

EXTRN  MouGetEventMask:FAR
INCL_MOU            EQU 1

PUSH@  WORD    EventMask     ;Event Mask word
PUSH   WORD    DeviceHandle  ;Mouse device handle
CALL   MouGetEventMask

Returns WORD