<trclass="memdesc:gae08f8396cbc4f5a1fc92eb3d70643078"><tdclass="mdescLeft"> </td><tdclass="mdescRight">Called when the application needs to save. <ahref="#gae08f8396cbc4f5a1fc92eb3d70643078">More...</a><br/></td></tr>
<trclass="memdesc:gaad92b1b2283d9e294ca4ee0b4f42fd92"><tdclass="mdescLeft"> </td><tdclass="mdescRight">Called when the application needs to save. <ahref="#gaad92b1b2283d9e294ca4ee0b4f42fd92">More...</a><br/></td></tr>
<trclass="memdesc:ga6509e620feaf54dc2e2f7d23313e2f79"><tdclass="mdescLeft"> </td><tdclass="mdescRight">Unregister all ProcUI callbacks. <ahref="#ga6509e620feaf54dc2e2f7d23313e2f79">More...</a><br/></td></tr>
<trclass="memdesc:gae89a764a7dedc01cfa80ec3a6733c229"><tdclass="mdescLeft"> </td><tdclass="mdescRight">Signifies to ProcUI that the current application has released all foreground resources, drawn its last frame, and is ready to be moved into the background. <ahref="#gae89a764a7dedc01cfa80ec3a6733c229">More...</a><br/></td></tr>
<trclass="memdesc:gabeabd14866cfdea46181526148f25727"><tdclass="mdescLeft"> </td><tdclass="mdescRight">Determines whether the application is in the foreground. <ahref="#gabeabd14866cfdea46181526148f25727">More...</a><br/></td></tr>
<trclass="memdesc:ga32550ec8e2a44fa047ccd0ed0c2af67c"><tdclass="mdescLeft"> </td><tdclass="mdescRight">Determines whether the application is in shutdown and should quit. <ahref="#ga32550ec8e2a44fa047ccd0ed0c2af67c">More...</a><br/></td></tr>
<trclass="memdesc:gae02b06d5d7a51f364abbfde02cfa14ef"><tdclass="mdescLeft"> </td><tdclass="mdescRight">Initialises the ProcUI library for use. <ahref="#gae02b06d5d7a51f364abbfde02cfa14ef">More...</a><br/></td></tr>
<trclass="memdesc:ga25e6a2ffe24eb8f466869352e619fc3f"><tdclass="mdescLeft"> </td><tdclass="mdescRight">Initialises the ProcUI library for use; using a save callback that takes arguments. <ahref="#ga25e6a2ffe24eb8f466869352e619fc3f">More...</a><br/></td></tr>
<trclass="memdesc:ga918dbc5c465f8c5f2b9f376cd9354df9"><tdclass="mdescLeft"> </td><tdclass="mdescRight">Determines whether the application is running. <ahref="#ga918dbc5c465f8c5f2b9f376cd9354df9">More...</a><br/></td></tr>
<trclass="memdesc:gab32d41d50911feff627b2b2bc535d00f"><tdclass="mdescLeft"> </td><tdclass="mdescRight">Main runloop for ProcUI. <ahref="#gab32d41d50911feff627b2b2bc535d00f">More...</a><br/></td></tr>
<trclass="memdesc:gafe451bcd44c4f7b967b2beec38df0517"><tdclass="mdescLeft"> </td><tdclass="mdescRight">Register a callback for certain ProcUI events. <ahref="#gafe451bcd44c4f7b967b2beec38df0517">More...</a><br/></td></tr>
<trclass="memdesc:gaecc3b07dce458491d7c331958ffff701"><tdclass="mdescLeft"> </td><tdclass="mdescRight">Register a callback for certain ProcUI events, executed on the given core. <ahref="#gaecc3b07dce458491d7c331958ffff701">More...</a><br/></td></tr>
<trclass="memdesc:ga1f3302a943ee4921b17d702d5e4c7f59"><tdclass="mdescLeft"> </td><tdclass="mdescRight">Sets the save callback. <ahref="#ga1f3302a943ee4921b17d702d5e4c7f59">More...</a><br/></td></tr>
<trclass="memdesc:ga6eee334c8cccc14367c7d972d6d00987"><tdclass="mdescLeft"> </td><tdclass="mdescRight">Shut down the ProcUI library for the current application. <ahref="#ga6eee334c8cccc14367c7d972d6d00987">More...</a><br/></td></tr>
<trclass="memdesc:ga93dbed34ef225ecf734045b191b51375"><tdclass="mdescLeft"> </td><tdclass="mdescRight"><aclass="el"href="group__proc__ui__procui.html#gab32d41d50911feff627b2b2bc535d00f"title="Main runloop for ProcUI.">ProcUIProcessMessages()</a>, but for secondary cores. <ahref="#ga93dbed34ef225ecf734045b191b51375">More...</a><br/></td></tr>
<p>After calling <aclass="el"href="group__proc__ui__procui.html#gae02b06d5d7a51f364abbfde02cfa14ef"title="Initialises the ProcUI library for use.">ProcUIInit()</a> or <aclass="el"href="group__proc__ui__procui.html#ga25e6a2ffe24eb8f466869352e619fc3f"title="Initialises the ProcUI library for use; using a save callback that takes arguments.">ProcUIInitEx()</a>, an application may call <aclass="el"href="group__proc__ui__procui.html#gab32d41d50911feff627b2b2bc535d00f"title="Main runloop for ProcUI.">ProcUIProcessMessages()</a> to process and update its state. These states may include:</p><ul>
<li><aclass="el"href="group__proc__ui__procui.html#ggade66d5052242731e3eac46278b7a4f2ba71de7c3c1b9407f64cea7bb9036c3d36"title="The application is in the foreground. All resources may be used.">PROCUI_STATUS_IN_FOREGROUND</a> - The default state of an application. All system resources and hardware is available, and the application runs without any serious restrictions.</li>
<li><aclass="el"href="group__proc__ui__procui.html#ggade66d5052242731e3eac46278b7a4f2ba7cb4dd11068823c46ebd543f51d3844b"title="The application is in the background, only limited resources are usable.">PROCUI_STATUS_IN_BACKGROUND</a> - When the user instructs the OS to switch to a secondary application (HOME menu overlay, Internet Browser, etc.) the application enters this background state. Background applications are heavily restricted - they get a small amount of CPU time on core 2 (all other threads are suspended), access to filesystems, and some network IO. They have no access to graphics, inputs or user interaction of any kind.</li>
<li><aclass="el"href="group__proc__ui__procui.html#ggade66d5052242731e3eac46278b7a4f2ba3a9c97294e921391b07c5ead02678030"title="The application must release the foregound - see ProcUIDrawDoneRelease()">PROCUI_STATUS_RELEASE_FOREGROUND</a> - The user has requested a foreground switch. The current application must release all foreground-only resources, calling <aclass="el"href="group__proc__ui__procui.html#gae89a764a7dedc01cfa80ec3a6733c229"title="Signifies to ProcUI that the current application has released all foreground resources,...">ProcUIDrawDoneRelease()</a> when it's ready to go into the background.</li>
<li><aclass="el"href="group__proc__ui__procui.html#ggade66d5052242731e3eac46278b7a4f2baed39f119bca7f219c93a9dd075d71bcf"title="The application must release all resources (including ProcUI) and quit.">PROCUI_STATUS_EXITING</a> - The application must release all resources, call <aclass="el"href="group__proc__ui__procui.html#ga6eee334c8cccc14367c7d972d6d00987"title="Shut down the ProcUI library for the current application.">ProcUIShutdown()</a>, and exit.</li>
<p>An application can determine its state by either examining <aclass="el"href="group__proc__ui__procui.html#gab32d41d50911feff627b2b2bc535d00f"title="Main runloop for ProcUI.">ProcUIProcessMessages()</a>'s return value, or using callbacks via <aclass="el"href="group__proc__ui__procui.html#gafe451bcd44c4f7b967b2beec38df0517"title="Register a callback for certain ProcUI events.">ProcUIRegisterCallback()</a>. </p>
<p>Called when the application needs to save. </p>
<pclass="definition">Definition at line <aclass="el"href="procui_8h_source.html#l00046">46</a> of file <aclass="el"href="procui_8h_source.html">procui.h</a>.</p>
<p>void* argument is provided in <aclass="el"href="group__proc__ui__procui.html#ga25e6a2ffe24eb8f466869352e619fc3f"title="Initialises the ProcUI library for use; using a save callback that takes arguments.">ProcUIInitEx()</a>. </p>
<pclass="definition">Definition at line <aclass="el"href="procui_8h_source.html#l00051">51</a> of file <aclass="el"href="procui_8h_source.html">procui.h</a>.</p>
<p>void* argument is provided in <aclass="el"href="group__proc__ui__procui.html#gafe451bcd44c4f7b967b2beec38df0517"title="Register a callback for certain ProcUI events.">ProcUIRegisterCallback()</a>. </p>
<pclass="definition">Definition at line <aclass="el"href="procui_8h_source.html#l00056">56</a> of file <aclass="el"href="procui_8h_source.html">procui.h</a>.</p>
<tr><thcolspan="2">Enumerator</th></tr><tr><tdclass="fieldname"><aid="gga9eba9de3b8f84c2482c358a1493ecda8a14172ef5b73cf100d2d87f90ff63af94"></a>PROCUI_CALLBACK_ACQUIRE </td><tdclass="fielddoc"><p>Application acquires the foreground. </p>
</td></tr>
<tr><tdclass="fieldname"><aid="gga9eba9de3b8f84c2482c358a1493ecda8a2fa189187f6095d962eccd00231be94e"></a>PROCUI_CALLBACK_RELEASE </td><tdclass="fielddoc"><p>Application must release the foreground. </p>
</td></tr>
<tr><tdclass="fieldname"><aid="gga9eba9de3b8f84c2482c358a1493ecda8afe1590ca1394fd33548bc1fc6d5f33c8"></a>PROCUI_CALLBACK_EXIT </td><tdclass="fielddoc"><p>Application must exit. </p>
</td></tr>
<tr><tdclass="fieldname"><aid="gga9eba9de3b8f84c2482c358a1493ecda8aa4a9e50cd1bb571f73ce31a9dfbe0eeb"></a>PROCUI_CALLBACK_NET_IO_START </td><tdclass="fielddoc"><p>Application may start using networking. </p>
</td></tr>
<tr><tdclass="fieldname"><aid="gga9eba9de3b8f84c2482c358a1493ecda8a577edd8076d43ce61ce10f140ca136af"></a>PROCUI_CALLBACK_NET_IO_STOP </td><tdclass="fielddoc"><p>Application must stop using networking. </p>
</td></tr>
<tr><tdclass="fieldname"><aid="gga9eba9de3b8f84c2482c358a1493ecda8a651ffc0a735522261ba2e33ae71e05ed"></a>PROCUI_CALLBACK_HOME_BUTTON_DENIED </td><tdclass="fielddoc"><p>The user attempted to press the HOME button but was denied. </p>
</td></tr>
</table>
<pclass="definition">Definition at line <aclass="el"href="procui_8h_source.html#l00058">58</a> of file <aclass="el"href="procui_8h_source.html">procui.h</a>.</p>
<tr><thcolspan="2">Enumerator</th></tr><tr><tdclass="fieldname"><aid="ggade66d5052242731e3eac46278b7a4f2ba71de7c3c1b9407f64cea7bb9036c3d36"></a>PROCUI_STATUS_IN_FOREGROUND </td><tdclass="fielddoc"><p>The application is in the foreground. All resources may be used. </p>
<tr><tdclass="fieldname"><aid="ggade66d5052242731e3eac46278b7a4f2ba7cb4dd11068823c46ebd543f51d3844b"></a>PROCUI_STATUS_IN_BACKGROUND </td><tdclass="fielddoc"><p>The application is in the background, only limited resources are usable. </p>
<tr><tdclass="fieldname"><aid="ggade66d5052242731e3eac46278b7a4f2ba3a9c97294e921391b07c5ead02678030"></a>PROCUI_STATUS_RELEASE_FOREGROUND </td><tdclass="fielddoc"><p>The application must release the foregound - see <aclass="el"href="group__proc__ui__procui.html#gae89a764a7dedc01cfa80ec3a6733c229"title="Signifies to ProcUI that the current application has released all foreground resources,...">ProcUIDrawDoneRelease()</a></p>
<tr><tdclass="fieldname"><aid="ggade66d5052242731e3eac46278b7a4f2baed39f119bca7f219c93a9dd075d71bcf"></a>PROCUI_STATUS_EXITING </td><tdclass="fielddoc"><p>The application must release all resources (including ProcUI) and quit. </p>
<pclass="definition">Definition at line <aclass="el"href="procui_8h_source.html#l00074">74</a> of file <aclass="el"href="procui_8h_source.html">procui.h</a>.</p>
<li><aclass="el"href="group__proc__ui__procui.html#gafe451bcd44c4f7b967b2beec38df0517"title="Register a callback for certain ProcUI events.">ProcUIRegisterCallback()</a></li>
<p>Signifies to ProcUI that the current application has released all foreground resources, drawn its last frame, and is ready to be moved into the background. </p>
<p>Should only be called when the application is in the <aclass="el"href="group__proc__ui__procui.html#ggade66d5052242731e3eac46278b7a4f2ba3a9c97294e921391b07c5ead02678030"title="The application must release the foregound - see ProcUIDrawDoneRelease()">PROCUI_STATUS_RELEASE_FOREGROUND</a> state.</p>
<dlclass="section note"><dt>Note</dt><dd>After calling this function, the context will switch next time <aclass="el"href="group__proc__ui__procui.html#gab32d41d50911feff627b2b2bc535d00f"title="Main runloop for ProcUI.">ProcUIProcessMessages()</a> is called. All user threads on core 0 and 1 will be suspended once this happens.</dd></dl>
<dlclass="section warning"><dt>Warning</dt><dd>Do not attempt to use foreground-only resources after calling this function and its accompanying <aclass="el"href="group__proc__ui__procui.html#gab32d41d50911feff627b2b2bc535d00f"title="Main runloop for ProcUI.">ProcUIProcessMessages()</a>. You should wait until ProcUI indicates <aclass="el"href="group__proc__ui__procui.html#ggade66d5052242731e3eac46278b7a4f2ba71de7c3c1b9407f64cea7bb9036c3d36"title="The application is in the foreground. All resources may be used.">PROCUI_STATUS_IN_FOREGROUND</a>. </dd></dl>
<dlclass="section return"><dt>Returns</dt><dd><code>true</code> if the application status is <aclass="el"href="group__proc__ui__procui.html#ggade66d5052242731e3eac46278b7a4f2ba71de7c3c1b9407f64cea7bb9036c3d36"title="The application is in the foreground. All resources may be used.">PROCUI_STATUS_IN_FOREGROUND</a>.</dd></dl>
<li><aclass="el"href="group__proc__ui__procui.html#ggade66d5052242731e3eac46278b7a4f2ba71de7c3c1b9407f64cea7bb9036c3d36"title="The application is in the foreground. All resources may be used.">PROCUI_STATUS_IN_FOREGROUND</a></li>
<li><aclass="el"href="group__proc__ui__procui.html#gafe451bcd44c4f7b967b2beec38df0517"title="Register a callback for certain ProcUI events.">ProcUIRegisterCallback()</a></li>
<dlclass="section return"><dt>Returns</dt><dd><code>true</code> if the application status is <aclass="el"href="group__proc__ui__procui.html#ggade66d5052242731e3eac46278b7a4f2baed39f119bca7f219c93a9dd075d71bcf"title="The application must release all resources (including ProcUI) and quit.">PROCUI_STATUS_EXITING</a>.</dd></dl>
<li><aclass="el"href="group__proc__ui__procui.html#ggade66d5052242731e3eac46278b7a4f2baed39f119bca7f219c93a9dd075d71bcf"title="The application must release all resources (including ProcUI) and quit.">PROCUI_STATUS_EXITING</a></li>
<li><aclass="el"href="group__proc__ui__procui.html#gafe451bcd44c4f7b967b2beec38df0517"title="Register a callback for certain ProcUI events.">ProcUIRegisterCallback()</a></li>
<tr><tdclass="paramname">saveCallback</td><td>A callback to be called when the application needs to save. The callback cannot be NULL and it must call <aclass="el"href="group__coreinit__foreground.html#ga41ce26ec13d7c37f0a46e1eb2d5cbcf7">OSSavesDone_ReadyToRelease()</a>.</td></tr>
<li><aclass="el"href="group__proc__ui__procui.html#ga1f3302a943ee4921b17d702d5e4c7f59"title="Sets the save callback.">ProcUISetSaveCallback()</a></li>
<li><aclass="el"href="group__proc__ui__procui.html#ga6eee334c8cccc14367c7d972d6d00987"title="Shut down the ProcUI library for the current application.">ProcUIShutdown()</a></li>
<p>Initialises the ProcUI library for use; using a save callback that takes arguments. </p>
<dlclass="params"><dt>Parameters</dt><dd>
<tableclass="params">
<tr><tdclass="paramname">saveCallback</td><td>A callback to be called when the application needs to save. The callback cannot be NULL and it must call <aclass="el"href="group__coreinit__foreground.html#ga41ce26ec13d7c37f0a46e1eb2d5cbcf7">OSSavesDone_ReadyToRelease()</a>.</td></tr>
<tr><tdclass="paramname">arg</td><td>An argument to pass into saveCallbackEx.</td></tr>
<li><aclass="el"href="group__proc__ui__procui.html#ga1f3302a943ee4921b17d702d5e4c7f59"title="Sets the save callback.">ProcUISetSaveCallback()</a></li>
<li><aclass="el"href="group__proc__ui__procui.html#ga6eee334c8cccc14367c7d972d6d00987"title="Shut down the ProcUI library for the current application.">ProcUIShutdown()</a></li>
<p>This function processes messages from the OS and provides it an opportinity to take control (to open the HOME menu overlay, for example). Returns the current state of the application.</p>
<dlclass="params"><dt>Parameters</dt><dd>
<tableclass="params">
<tr><tdclass="paramname">block</td><td>Determines whether the function should block before returning. If <code>false</code>, the function returns immediately and all messages and callbacks are processed asynchronously.</td></tr>
</table>
</dd>
</dl>
<dlclass="section return"><dt>Returns</dt><dd>The current state of the program. See <aclass="el"href="group__proc__ui__procui.html#gade66d5052242731e3eac46278b7a4f2b">ProcUIStatus</a>. If block is <code>false</code>, this value is undefined and should be ignored.</dd></dl>
<dlclass="section warning"><dt>Warning</dt><dd>ProcUI's non-blocking mode is not widely used and may have undocumented behaviour. Be careful with callbacks and the return value.</dd></dl>
<dlclass="section note"><dt>Note</dt><dd>This function should only be called from the main core. See <aclass="el"href="group__coreinit__core.html#gaeb060ef03e7d812f07709738601b004e"title="Determines whether the current thread is running on the main core.">OSIsMainCore()</a> and <aclass="el"href="group__proc__ui__procui.html#ga93dbed34ef225ecf734045b191b51375"title="ProcUIProcessMessages(), but for secondary cores.">ProcUISubProcessMessages()</a>. </dd></dl>
<p>Register a callback for certain ProcUI events. </p>
<dlclass="params"><dt>Parameters</dt><dd>
<tableclass="params">
<tr><tdclass="paramname">type</td><td>The event to register a callback for. See <aclass="el"href="group__proc__ui__procui.html#ga9eba9de3b8f84c2482c358a1493ecda8">ProcUICallbackType</a>.</td></tr>
<tr><tdclass="paramname">callback</td><td>Function pointer for the callback to call when the given event occurs.</td></tr>
<tr><tdclass="paramname">param</td><td>Argument for the callback. This will be passed in as the <em>second</em> argument.</td></tr>
<tr><tdclass="paramname">priority</td><td>The priority of the callback.</td></tr>
<li><aclass="el"href="group__proc__ui__procui.html#gaecc3b07dce458491d7c331958ffff701"title="Register a callback for certain ProcUI events, executed on the given core.">ProcUIRegisterCallbackCore()</a></li>
<p>Register a callback for certain ProcUI events, executed on the given core. </p>
<dlclass="params"><dt>Parameters</dt><dd>
<tableclass="params">
<tr><tdclass="paramname">type</td><td>The event to register a callback for. See <aclass="el"href="group__proc__ui__procui.html#ga9eba9de3b8f84c2482c358a1493ecda8">ProcUICallbackType</a>.</td></tr>
<tr><tdclass="paramname">callback</td><td>Function pointer for the callback to call when the given event occurs.</td></tr>
<tr><tdclass="paramname">param</td><td>Argument for the callback. This will be passed in as the <em>second</em> argument.</td></tr>
<tr><tdclass="paramname">priority</td><td>The priority of the callback.</td></tr>
<tr><tdclass="paramname">core</td><td>The core ID to run the callback on.</td></tr>
<li><aclass="el"href="group__proc__ui__procui.html#gafe451bcd44c4f7b967b2beec38df0517"title="Register a callback for certain ProcUI events.">ProcUIRegisterCallback()</a></li>
<p>Unlike <aclass="el"href="group__proc__ui__procui.html#ga25e6a2ffe24eb8f466869352e619fc3f"title="Initialises the ProcUI library for use; using a save callback that takes arguments.">ProcUIInitEx()</a>, this function can be called while ProcUI is already running.</p>
<tr><tdclass="paramname">saveCallback</td><td>A callback to be called when the application needs to save. The callback cannot be NULL and it must call <aclass="el"href="group__coreinit__foreground.html#ga41ce26ec13d7c37f0a46e1eb2d5cbcf7">OSSavesDone_ReadyToRelease()</a>.</td></tr>
<tr><tdclass="paramname">arg</td><td>An argument to pass into saveCallbackEx.</td></tr>
<li><aclass="el"href="group__proc__ui__procui.html#ga25e6a2ffe24eb8f466869352e619fc3f"title="Initialises the ProcUI library for use; using a save callback that takes arguments.">ProcUIInitEx()</a></li>
<dlclass="section note"><dt>Note</dt><dd>Do not attempt to use any ProcUI library functions after calling this function, except for <aclass="el"href="group__proc__ui__procui.html#gae02b06d5d7a51f364abbfde02cfa14ef"title="Initialises the ProcUI library for use.">ProcUIInit()</a> or <aclass="el"href="group__proc__ui__procui.html#ga25e6a2ffe24eb8f466869352e619fc3f"title="Initialises the ProcUI library for use; using a save callback that takes arguments.">ProcUIInitEx()</a>. </dd></dl>
<p><aclass="el"href="group__proc__ui__procui.html#gab32d41d50911feff627b2b2bc535d00f"title="Main runloop for ProcUI.">ProcUIProcessMessages()</a>, but for secondary cores. </p>
<tr><tdclass="paramname">block</td><td>Determines whether the function should block before returning. If <code>false</code>, the function returns immediately and all messages and callbacks are processed asynchronously.</td></tr>
</table>
</dd>
</dl>
<dlclass="section return"><dt>Returns</dt><dd>The current state of the program - see <aclass="el"href="group__proc__ui__procui.html#gade66d5052242731e3eac46278b7a4f2b">ProcUIStatus</a>. If block is <code>false</code>, this value is undefined and should be ignored.</dd></dl>
<dlclass="section warning"><dt>Warning</dt><dd>ProcUI's non-blocking mode is not widely used and may have undocumented behaviour. Be careful with callbacks and the return value. </dd></dl>