[Previous]
[Bookset]
[Next]

PtCreateAppContext()

Create a new application context

Synopsis:

PtAppContext_t PtCreateAppContext( void );

Description:

This function creates an additional/alternative application context that contains its own set of WorkProcs, input procs, signal handlers (using default context only), and event processing.

An application can operate in this new context using the PtAppProcessEvent() or PtAppMainLoop() event processing functions (these functions are covers for the ones with the default context). Applications normally operate in the default context created for them by PtAppInit() and used implicitly by the PtMainLoop() and PtProcessEvent() functions (and by every PhAB application).

Returns:

A PtAppContext_t pointer to the created application context. If an error occurs, the function returns NULL.

Classification:

Photon

Safety:
Interrupt handler No
Signal handler No
Thread No

Caveats:

The use of multiple application contexts isn't fully supported and is intended for possible future use by a multithreaded widget library.

See also:

PtAppInit(), PtMainLoop(), PtProcessEvent(), PtAppAddInput(), PtAppAddWorkProc(), PtAppRemoveWorkProc(), PtAppRemoveInput()


[Previous]
[Bookset]
[Next]