Jump to content

MouReadEventQue: Difference between revisions

From EDM2
Created page with "==Description== Reads an event from the mouse device driver FIFO event queue and places it in a structure provided by the application. ==Syntax== <PRE> #define INCL_MOU #incl..."
 
mNo edit summary
 
(2 intermediate revisions by one other user not shown)
Line 1: Line 1:
==Description==
Reads an event from the mouse device driver FIFO event queue and places it in a structure provided by the application.
Reads an event from the mouse device driver FIFO event queue and places it in a structure provided by the application.


==Syntax==
==Syntax==
MouReadEventQue(EventMask, Wait, DeviceHandle);
==Parameters==
;EventMask (PMOUENVENTINFO) - output : Pointer to the mouse-event queue.
:Address of the mouse-event queue data.
;Wait (PULONG) - input : Wait flag.
:A pointer to a ULONG containing the action to take when MouReadEventQue is issued and the mouse event queue is empty. If the mouse event queue is not empty, this parameter is not examined by the mouse support.
:May be one of the following values:
:* MOU_NOWAIT Do not wait for data on an empty queue (return a NULL record).
:* MOU_WAIT Wait for data on an empty queue.
;DeviceHandle (HMOU) - input :  Reserved. Must be 0.
==Return Code==
rc (APIRET) - returns
MouReadEventQue returns one of the following values:
* 0 NO_ERROR
* 387 ERROR_MOUSE_INV_PARMS
* 393 ERROR_MOUSE_NO_DATA
* 466 ERROR_MOU_DETACHED
* 501 ERROR_MOUSE_NO_CONSOLE
==Sample==
<PRE>
<PRE>
#define INCL_MOU
#define INCL_MOU
Line 13: Line 34:


rc = MouReadEventQue(EventMask, Wait, DeviceHandle);
rc = MouReadEventQue(EventMask, Wait, DeviceHandle);
</PRE>
</PRE>
==Parameters==
;  EventMask (PMOUENVENTINFO) - output : Pointer to the mouse-event queue.
Address of the mouse-event queue data.
; Wait (PULONG) - input : Wait flag.
A pointer to a ULONG containing the action to take when MouReadEventQue is issued and the mouse event queue is empty. If the mouse event queue is not empty, this parameter is not examined by the mouse support.


May be one of the following values:
* MOU_NOWAIT Do not wait for data on an empty queue (return a NULL record).
* MOU_WAIT  Wait for data on an empty queue.
; DeviceHandle (HMOU) - input :  Reserved. Must be 0.
==Return Code==
rc (APIRET) - returns
MouReadEventQue returns one of the following values:
* 0          NO_ERROR
* 387        ERROR_MOUSE_INV_PARMS
* 393        ERROR_MOUSE_NO_DATA
* 466        ERROR_MOU_DETACHED
* 501        ERROR_MOUSE_NO_CONSOLE
==Remarks==
==Remarks==
The types of queued events are directly affected by the current value of the event mark. MouSetEventMask is used to indicate the types of events desired, and MouGetEventMask is used to query the current value of the mask. Refer to these functions for more information about the masking of events.  
The types of queued events are directly affected by the current value of the event mark. MouSetEventMask is used to indicate the types of events desired, and MouGetEventMask is used to query the current value of the mask. Refer to these functions for more information about the masking of events.  


==Example Code==
[[Category:Mou]]
<PRE>
 
</PRE>
==Related Functions==
*
 
 
[[Category:The OS/2 API Project]]

Latest revision as of 15:24, 29 February 2020

Reads an event from the mouse device driver FIFO event queue and places it in a structure provided by the application.

Syntax

MouReadEventQue(EventMask, Wait, DeviceHandle);

Parameters

EventMask (PMOUENVENTINFO) - output
Pointer to the mouse-event queue.
Address of the mouse-event queue data.
Wait (PULONG) - input
Wait flag.
A pointer to a ULONG containing the action to take when MouReadEventQue is issued and the mouse event queue is empty. If the mouse event queue is not empty, this parameter is not examined by the mouse support.
May be one of the following values:
  • MOU_NOWAIT Do not wait for data on an empty queue (return a NULL record).
  • MOU_WAIT Wait for data on an empty queue.
DeviceHandle (HMOU) - input
Reserved. Must be 0.

Return Code

rc (APIRET) - returns

MouReadEventQue returns one of the following values:

  • 0 NO_ERROR
  • 387 ERROR_MOUSE_INV_PARMS
  • 393 ERROR_MOUSE_NO_DATA
  • 466 ERROR_MOU_DETACHED
  • 501 ERROR_MOUSE_NO_CONSOLE

Sample

#define INCL_MOU
#include <os2.h>

PMOUENVENTINFO    EventMask;     /*  Pointer to the mouse-event queue. */
PULONG            Wait;          /*  Wait flag. */
HMOU              DeviceHandle;  /*  Reserved.  Must be 0. */
APIRET            rc;            /*  Return code. */

rc = MouReadEventQue(EventMask, Wait, DeviceHandle);

Remarks

The types of queued events are directly affected by the current value of the event mark. MouSetEventMask is used to indicate the types of events desired, and MouGetEventMask is used to query the current value of the mask. Refer to these functions for more information about the masking of events.