[Overview][Constants][Types][Classes][Index] Reference for unit 'ptc' (#ptc)

IPTCConsole.PeekEvent

Returns the next event from the event queue, without removing it from the queue.

Declaration

Source position: baseconsoled.inc line 61

function IPTCConsole.PeekEvent(

  AWait: Boolean;

  const AEventMask: TPTCEventMask

):IPTCEvent;

Arguments

AWait

  

Whether the function should wait for an event if necessary.

AEventMask

  

The event mask.

Description

Returns the first event from the event queue, that matches the specified event mask. It doesn't remove the event from the queue. The returned value points to the internal event queue of the console and must NOT be freed by the application. To remove an event from the queue, IPTCConsole.NextEvent should be used instead. If no event that matches the specified mask is currently present on the event queue, the function returns NIL if the AWait parameter is FALSE or blocks and waits for such an event to arrive if the AWait parameter is TRUE.