IrrReadMouseEvent

section index

## NAME

IrrReadMouseEvent - Read the oldest mouse event in the buffer

## SYNOPSIS

IrrReadMouseEvent()

## INPUTS

## FUNCTION

read mouse event

## EXAMPLE

       ; while there are mouse events waiting to be processed
       While IrrReadMouseEvent()

           ; read the mouse event out.
           *MouseEvent.IRR_MOUSE_EVENT = IrrReadMouseEvent()

           ; find out the mouse-action
           Select *MouseEvent\action
               Case #IRR_EMIE_LMOUSE_PRESSED_DOWN
               Case #IRR_EMIE_MOUSE_MOVED
                   mouseX.l = *MouseEvent\x
                   mouseY.l = *MouseEvent\y
               Case #IRR_EMIE_MOUSE_WHEEL
                   mouseWheel.f = *MouseEvent\wheel
           EndSelect

       Wend

## RESULT

pointer to a IRR_MOUSE_EVENT-Structure