Jump to content

MouSetEventMask: Difference between revisions

From EDM2
Created page with "==Description== Assigns a new event mask to the current mouse device driver. ==Syntax== <PRE> #define INCL_MOU #include <os2.h> PULONG EventMask; /* Mouse device eve..."
 
Ak120 (talk | contribs)
 
(3 intermediate revisions by 2 users not shown)
Line 1: Line 1:
==Description==
Assigns a new event mask to the current mouse device driver.
Assigns a new event mask to the current mouse device driver.


==Syntax==
==Syntax==
<PRE>
MouSetEventMask(EventMask, DeviceHandle)
#define INCL_MOU
#include <os2.h>


PULONG    EventMask;    /*  Mouse device event mask pointer. */
HMOU      DeviceHandle;  /*  Reserved.  Must be 0. */
APIRET    rc;            /*  Return code. */
rc = MouSetEventMask(EventMask, DeviceHandle);
</PRE>
==Parameters==
==Parameters==
; EventMask (PULONG) - input : Mouse device event mask pointer.
;EventMask (PULONG) - input:Mouse device event mask pointer.
 
:The EventMask bit values are:
The EventMask bit values are:
::31-7 - Reserved. Set to 0.
 
::6 - Report button 3 press/release events, without mouse motion.
      Bit            Description
::5 - Report button 3 press/release events, with mouse motion.
31-7           Reserved. Set to 0.  
::4 - Report button 2 press/release events, without mouse motion.
6           Report button 3 press/release events, without mouse motion.  
::3 - Report button 2 press/release events, with mouse motion.
5           Report button 3 press/release events, with mouse motion.  
::2 - Report button 1 press/release events, without mouse motion.
4           Report button 2 press/release events, without mouse motion.  
::1 - Report button 1 press/release events, with mouse motion.
3           Report button 2 press/release events, with mouse motion.  
::0 - Mouse motion events with no button press/release events.
2           Report button 1 press/release events, without mouse motion.  
;DeviceHandle (HMOU) - input: Reserved. Must be 0.
1           Report button 1 press/release events, with mouse motion.  
0           Mouse motion events with no button press/release events.
 
; DeviceHandle (HMOU) - input : Reserved. Must be 0.


==Return Code==
==Return Code==
rc (APIRET) - returns
;rc (APIRET) - returns:MouSetEventMask returns one of the following values:
 
* 0   NO_ERROR
MouSetEventMask returns one of the following values:
* 466 ERROR_MOU_DETACHED
 
* 501 ERROR_MOUSE_NO_CONSOLE
* 0         NO_ERROR
* 466       ERROR_MOU_DETACHED  
* 501       ERROR_MOUSE_NO_CONSOLE


==Remarks==
==Remarks==
Setting a bit in the event mask means that the associated event is reported on the mouse FIFO event queue.
Setting a bit in the event mask means that the associated event is reported on the mouse FIFO event queue.


At session initialization, the event mask is set to report all events.  
At session initialization, the event mask is set to report all events.
 
==Example Code==
<PRE>
 
</PRE>
==Related Functions==
*
 


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

Latest revision as of 13:04, 11 June 2019

Assigns a new event mask to the current mouse device driver.

Syntax

MouSetEventMask(EventMask, DeviceHandle)

Parameters

EventMask (PULONG) - input
Mouse device event mask pointer.
The EventMask bit values are:
31-7 - Reserved. Set to 0.
6 - Report button 3 press/release events, without mouse motion.
5 - Report button 3 press/release events, with mouse motion.
4 - Report button 2 press/release events, without mouse motion.
3 - Report button 2 press/release events, with mouse motion.
2 - Report button 1 press/release events, without mouse motion.
1 - Report button 1 press/release events, with mouse motion.
0 - Mouse motion events with no button press/release events.
DeviceHandle (HMOU) - input
Reserved. Must be 0.

Return Code

rc (APIRET) - returns
MouSetEventMask returns one of the following values:
  • 0 NO_ERROR
  • 466 ERROR_MOU_DETACHED
  • 501 ERROR_MOUSE_NO_CONSOLE

Remarks

Setting a bit in the event mask means that the associated event is reported on the mouse FIFO event queue.

At session initialization, the event mask is set to report all events.