Differences
This shows you the differences between two versions of the page.
Next revision | Previous revision |
en:ibm:prcp:mou:readevtque [2016/02/04 05:33] – created valerius | en:ibm:prcp:mou:readevtque [2016/09/15 04:17] (current) – valerius |
---|
==== MouReadEventQue ==== | ==== MouReadEventQue ==== |
| |
**Bindings**: C, MASM | **Bindings**: [[readevtque#C bindings|C]], [[readevtque#MASM bindings|MASM]] |
| |
This call reads an event from the mouse device FIFO event queue, and places it in a structure provided by the application. | This call reads an event from the mouse device FIFO event queue, and places it in a structure provided by the application. |
**Remarks** | **Remarks** |
| |
The types of queued events are directly affected by the current value of the Mouse //EventMask//. [[en:ibm:prcp:mou:seteventmask|MouSetEventMask]] is used to indicate the types of events desired, and [[en:ibm:prcp:mou:geteventmask|MouGetEventMask]] is used to query the current value of the mask. Refer to these functions for further explanation of the masking of events. | The types of queued events are directly affected by the current value of the Mouse //EventMask//. [[en:ibm:prcp:mou:setevtmask|MouSetEventMask]] is used to indicate the types of events desired, and [[en:ibm:prcp:mou:getevtmask|MouGetEventMask]] is used to query the current value of the mask. Refer to these functions for further explanation of the masking of events. |
| |
Recognition of the mouse transition depends on the use of //MouState// returned in the event record. The application should focus on bit transitions that occur in this word. It is important to properly set the event mask with [[en:ibm:prcp:mou:seteventmask|MouSetEventMask]] for reporting the state transitions. | Recognition of the mouse transition depends on the use of //MouState// returned in the event record. The application should focus on bit transitions that occur in this word. It is important to properly set the event mask with [[en:ibm:prcp:mou:setevtmask|MouSetEventMask]] for reporting the state transitions. |
| |
//MouState// reports the state of the mouse that resulted from the action that caused the event. The action can be pressing or releasing a button, and/or moving the mouse. All status is given, regardless of the //EventMask// that was used to determine whether or not to report the event. | //MouState// reports the state of the mouse that resulted from the action that caused the event. The action can be pressing or releasing a button, and/or moving the mouse. All status is given, regardless of the //EventMask// that was used to determine whether or not to report the event. |
| |
The //Row// and //Column// fields in the Buffer Parameter may contain either absolute display coordinates or relative mouse motion in mickeys. See [[en:ibm:prcp:mou:setdevstatus|MouSetDevStatus]] for additional information. | The //Row// and //Column// fields in the Buffer Parameter may contain either absolute display coordinates or relative mouse motion in mickeys. See [[en:ibm:prcp:mou:setdevstatus|MouSetDevStatus]] for additional information. |
| |
| === C bindings === |
| |
| <code c> |
| typedef struct _MOUEVENTINFO { /* mouev */ |
| USHORT fs; /* State of mouse at time event was |
| reported */ |
| ULONG time; /* Time since boot in milliseconds */ |
| USHORT row; /* Absolute/relative row position */ |
| USHORT col; /* Absolute/relative column position */ |
| }MOUEVENTINFO; |
| |
| #define INCL_MOU |
| |
| USHORT rc = MouReadEventQue(Buffer, ReadType, DeviceHandle); |
| |
| PMOUEVENTINFO Buffer; /* 10 byte Structure address */ |
| PUSHORT ReadType; /* Read type */ |
| HMOU DeviceHandle; /* Mouse device handle */ |
| |
| USHORT rc; /* return code */ |
| </code> |
| |
| === MASM bindings === |
| |
| <code asm> |
| MOUEVENTINFO struc |
| mouev_fs dw ? ;State of mouse at time event was reported |
| mouev_time dd ? ;time since boot in milliseconds |
| mouev_row dw ? ;absolute/relative row position |
| mouev_col dw ? ;absolute/relative column position |
| MOUEVENTINFO ends |
| |
| EXTRN MouReadEventQue:FAR |
| INCL_MOU EQU 1 |
| |
| PUSH@ OTHER Buffer ;10 byte Structure address |
| PUSH@ WORD ReadType ;Read type |
| PUSH WORD DeviceHandle ;Mouse device handle |
| CALL MouReadEventQue |
| |
| Returns WORD |
| </code> |
| |