QNX Developer Support
|This version of this document is no longer maintained. For the latest documentation, see http://www.qnx.com/developers/docs.|
Standard Photon event-handling function
void PtProcessEvent( void );
|We recommend using PtModalBlock() and PtModalUnblock() instead of a PtModalStart() / PtProcessEvent() / PtModalEnd() loop. PtModalBlock() makes it easier for you to write modal code that's compatible with multithreaded applications.|
If a Photon event is pending, this function processes the event and returns. If no event is pending, or if no work procedure has been defined, the function blocks until an event is received.
Before waiting for an event, this function performs an equivalent of PtLeave(Pt_EVENT_PROCESS_ALLOW). This turns the calling thread into an event reader if it wasn't one already. If you passed the Pt_DELAY_EXIT flag to PtEnter() before calling this function, it will also disable the effect of that flag.
After getting an event, PtProcessEvent() performs an equivalent of PtEnter(0). This means that if another thread called PtExit() while the function was waiting for an event, PtProcessEvent() doesn't invoke any callbacks and will not return.
"Modal dialogs" in the Window Management chapter of the Photon Programmer's Guide