wut  v1.5.0
Wii U Toolchain
procui.h
Go to the documentation of this file.
1 #pragma once
2 #include <wut.h>
3 #include <coreinit/time.h>
4 
40 #ifdef __cplusplus
41 extern "C" {
42 #endif
43 
47 typedef void (*ProcUISaveCallback)(void);
52 typedef uint32_t (*ProcUISaveCallbackEx)(void *);
57 typedef uint32_t (*ProcUICallback)(void *);
58 
59 typedef enum ProcUICallbackType
60 {
74 
75 typedef enum ProcUIStatus
76 {
86 
98 void
100 
123 void
125 
137 BOOL
139 
150 BOOL
152 
165 void
167 
184 void
186  void *arg);
187 
199 BOOL
201 
230 
253 void
255  ProcUICallback callback,
256  void *param,
257  uint32_t priority);
258 
280 void
282  ProcUICallback callback,
283  void *param,
284  uint32_t priority,
285  uint32_t core);
286 
299 void
301  void *param,
302  OSTime interval);
303 
319 void
321  void *arg);
322 
331 void
333 
357 
358 #ifdef __cplusplus
359 }
360 #endif
361 
int64_t OSTime
Definition: time.h:18
void ProcUISetSaveCallback(ProcUISaveCallbackEx saveCallback, void *arg)
Sets the save callback.
void ProcUIInitEx(ProcUISaveCallbackEx saveCallback, void *arg)
Initialises the ProcUI library for use; using a save callback that takes arguments.
BOOL ProcUIInShutdown()
Determines whether the application is in shutdown and should quit.
void ProcUIClearCallbacks()
Unregister all ProcUI callbacks.
uint32_t(* ProcUICallback)(void *)
Generic ProcUI callback.
Definition: procui.h:57
void ProcUIShutdown()
Shut down the ProcUI library for the current application.
BOOL ProcUIIsRunning()
Determines whether the ProcUI library is running/initialised.
ProcUIStatus ProcUISubProcessMessages(BOOL block)
ProcUIProcessMessages(), but for secondary cores.
ProcUICallbackType
Definition: procui.h:60
void ProcUIRegisterBackgroundCallback(ProcUICallback callback, void *param, OSTime interval)
Register a callback which will be called periodically while in background.
uint32_t(* ProcUISaveCallbackEx)(void *)
Called when the application needs to save.
Definition: procui.h:52
ProcUIStatus ProcUIProcessMessages(BOOL block)
Main runloop for ProcUI.
BOOL ProcUIInForeground()
Determines whether the application is in the foreground.
ProcUIStatus
Definition: procui.h:76
void ProcUIInit(ProcUISaveCallback saveCallback)
Initialises the ProcUI library for use.
void(* ProcUISaveCallback)(void)
Called when the application needs to save.
Definition: procui.h:47
void ProcUIDrawDoneRelease()
Signifies to ProcUI that the current application has released all foreground resources,...
void ProcUIRegisterCallbackCore(ProcUICallbackType type, ProcUICallback callback, void *param, uint32_t priority, uint32_t core)
Register a callback for certain ProcUI events, executed on the given core.
void ProcUIRegisterCallback(ProcUICallbackType type, ProcUICallback callback, void *param, uint32_t priority)
Register a callback for certain ProcUI events.
@ PROCUI_CALLBACK_ACQUIRE
Application acquires the foreground.
Definition: procui.h:62
@ PROCUI_CALLBACK_RELEASE
Application must release the foreground.
Definition: procui.h:64
@ PROCUI_CALLBACK_NET_IO_STOP
Application must stop using networking.
Definition: procui.h:70
@ PROCUI_CALLBACK_HOME_BUTTON_DENIED
The user attempted to press the HOME button but was denied.
Definition: procui.h:72
@ PROCUI_CALLBACK_NET_IO_START
Application may start using networking.
Definition: procui.h:68
@ PROCUI_CALLBACK_EXIT
Application must exit.
Definition: procui.h:66
@ PROCUI_STATUS_RELEASE_FOREGROUND
The application must release the foregound - see ProcUIDrawDoneRelease()
Definition: procui.h:82
@ PROCUI_STATUS_IN_FOREGROUND
The application is in the foreground. All resources may be used.
Definition: procui.h:78
@ PROCUI_STATUS_IN_BACKGROUND
The application is in the background, only limited resources are usable.
Definition: procui.h:80
@ PROCUI_STATUS_EXITING
The application must release all resources (including ProcUI) and quit.
Definition: procui.h:84
int32_t BOOL
Definition: wut_types.h:7