Operating systems, development tools, and professional services
for connected embedded systems
for connected embedded systems
![]() |
![]() |
![]() |
![]() |
PtAppInit()
Initialize an application and create the main window
Synopsis:
PtWidget_t *PtAppInit( PtAppContext_t *app_context,
int *argc,
char **argv,
int num_args,
PtArg_t const *args );
Library:
ph
Description:
This function:
- Initializes the connection to the Photon Manager.
- Initializes the widget library.
- Creates a default application context (app_context) if one doesn't exist.
- Creates a main window using the num_args and args arguments--these are the same arguments passed to PtCreateWidget().
![]() |
The application that calls PtAppInit() must have the appropriate permissions to read from and write to the attached Photon server, or the call will fail. |
Returns:
A pointer to the main window, or NULL if an error occurs.
Classification:
Photon
| Safety: | |
|---|---|
| Interrupt handler | No |
| Signal handler | No |
| Thread | No |
See also:
PhAttach(), PtArg_t. PtCreateWidget(), PtInit(), PtMainLoop()
"Basic steps" in the Programming Photon without PhAB chapter of the Photon Programmer's Guide
![]() |
![]() |
![]() |
![]() |

![[Previous]](../prev.gif)
![[Contents]](../contents.gif)
![[Index]](../keyword_index.gif)
![[Next]](../next.gif)
