Jump to content

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

From EDM2
Created page with "==Description== This call assigns a new event mask to the current mouse device driver. ==Syntax== <PRE> MouSetEventMask (EventMask, DeviceHandle) </PRE> ==Parameters==..."
 
Ak120 (talk | contribs)
mNo edit summary
 
(3 intermediate revisions by 2 users not shown)
Line 1: Line 1:
==Description==
{{Legacy
|RepFunc=[[MouSetEventMask]]
|Remarks=This page list the older version of the function for reference.
}}
This call assigns a new event mask to the current mouse device driver.
This call assigns a new event mask to the current mouse device driver.


==Syntax==
==Syntax==
<PRE>
  MouSetEventMask (EventMask, DeviceHandle)
  MouSetEventMask
 
    (EventMask, DeviceHandle)
</PRE>


==Parameters==
==Parameters==
; EventMask (PUSHORT) - 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.
;EventMask (PUSHORT) - 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:
The EventMask bit values are described below:
  '''Bit     Description'''
 
  15-7     Reserved, set to zero.
  '''Bit       Description'''
  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
  6        Set to report button 3 press/release events, without mouse motion  
  4        Set to report button 2 press/release events, without mouse motion
  5        Set to report button 3 press/release events, with mouse motion  
  3        Set to report button 2 press/release events, with mouse motion
  4        Set to report button 2 press/release events, without mouse motion  
  2        Set to report button 1 press/release events, without mouse motion
  3        Set to report button 2 press/release events, with mouse motion  
  1        Set to report button 1 press/release events, with mouse motion
  2        Set to report button 1 press/release events, without mouse motion  
  0        Set to mouse motion events with no button press/release events.
  1        Set to report button 1 press/release events, with mouse motion  
: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. Note also that the mouse buttons are always numbered from left to right. When the mouse is properly positioned for use, the left-hand button is button 1.
  0        Set to mouse motion events with no button press/release events.  
;DeviceHandle (HMOU) - input : Handle of the mouse device from a previous MouOpen.
 
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. Note also that the mouse buttons are always numbered from left to right. When the mouse is properly positioned for use, the left-hand button is button 1.  
 
; 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:
 
* 0   NO_ERROR
Return code descriptions are:
* 385 ERROR_MOUSE_NO_DEVICE
 
* 466 ERROR_MOU_DETACHED
* 0         NO_ERROR  
* 501 ERROR_MOUSE_NO_CONSOLE
* 385       ERROR_MOUSE_NO_DEVICE  
* 505 ERROR_MOU_EXTENDED_SG
* 466       ERROR_MOU_DETACHED  
* 501       ERROR_MOUSE_NO_CONSOLE  
* 505       ERROR_MOU_EXTENDED_SG


==Remarks==
==Remarks==
Setting a bit in the event mask means that the associated event is reported on the mouse FIFO event queue. See MouReadEventQue for examples of event mask use.  
Setting a bit in the event mask means that the associated event is reported on the mouse FIFO event queue. See MouReadEventQue for examples of event mask use.


==Example Code==
==Bindings==
=== C Binding===
=== C ===
<PRE>
<PRE>
#define INCL_MOU
#define INCL_MOU
Line 49: Line 41:
USHORT  rc = MouSetEventMask(EventMask, DeviceHandle);
USHORT  rc = MouSetEventMask(EventMask, DeviceHandle);


PUSHORT         EventMask;    /* Mouse device event mask ptr */
PUSHORT EventMask;    /* Mouse device event mask ptr */
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  MouSetEventMask:FAR
EXTRN  MouSetEventMask:FAR
Line 67: Line 59:
</PRE>
</PRE>


==Related Functions==
[[Category:Mou]]
*
 
[[Category:The OS/2 API Project]]

Latest revision as of 17:22, 14 September 2019

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

This call assigns a new event mask to the current mouse device driver.

Syntax

MouSetEventMask (EventMask, DeviceHandle)

Parameters

EventMask (PUSHORT) - 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        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 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. Note also that the mouse buttons are always numbered from left to right. When the mouse is properly positioned for use, the left-hand button is button 1.
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

Setting a bit in the event mask means that the associated event is reported on the mouse FIFO event queue. See MouReadEventQue for examples of event mask use.

Bindings

C

#define INCL_MOU

USHORT  rc = MouSetEventMask(EventMask, DeviceHandle);

PUSHORT EventMask;     /* Mouse device event mask ptr */
HMOU    DeviceHandle;  /* Mouse device handle */

USHORT  rc;            /* return code */

MASM

EXTRN  MouSetEventMask:FAR
INCL_MOU            EQU 1

PUSH@  WORD    EventMask     ;Mouse device event mask ptr
PUSH   WORD    DeviceHandle  ;Mouse device handle
CALL   MouSetEventMask

Returns WORD