Warning: main(/www/www/htdocs/style/globals.php) [function.main]: failed to open stream: No such file or directory in /www/www/docs/6.4.1/photon/lib_ref/pt/ptprocessevent.html on line 1

Warning: main() [function.include]: Failed opening '/www/www/htdocs/style/globals.php' for inclusion (include_path='.:/www/www/common:/www/www/php/lib/php') in /www/www/docs/6.4.1/photon/lib_ref/pt/ptprocessevent.html on line 1

Warning: main(/www/www/htdocs/style/header.php) [function.main]: failed to open stream: No such file or directory in /www/www/docs/6.4.1/photon/lib_ref/pt/ptprocessevent.html on line 8

Warning: main() [function.include]: Failed opening '/www/www/htdocs/style/header.php' for inclusion (include_path='.:/www/www/common:/www/www/php/lib/php') in /www/www/docs/6.4.1/photon/lib_ref/pt/ptprocessevent.html on line 8

PtProcessEvent()

Standard Photon event-handling function

Synopsis:

void PtProcessEvent( void );

Library:

ph

Description:

This function is used primarily for modal-dialog-event handling. If this case, be sure to call PtModalStart() before the event-handling loop, and PtModalEnd() after it.


Note: 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.

Classification:

Photon

Safety:
Interrupt handler No
Signal handler No
Thread No

See also:

PtModalBlock(), PtModalEnd(), PtModalStart(), PtModalUnblock(),

Modal dialogs in the Window Management chapter of the Photon Programmer's Guide


Warning: main(/www/www/htdocs/style/footer.php) [function.main]: failed to open stream: No such file or directory in /www/www/docs/6.4.1/photon/lib_ref/pt/ptprocessevent.html on line 125

Warning: main() [function.include]: Failed opening '/www/www/htdocs/style/footer.php' for inclusion (include_path='.:/www/www/common:/www/www/php/lib/php') in /www/www/docs/6.4.1/photon/lib_ref/pt/ptprocessevent.html on line 125