diff --git a/include/proc_ui/procui.h b/include/proc_ui/procui.h new file mode 100644 index 0000000..91ea06d --- /dev/null +++ b/include/proc_ui/procui.h @@ -0,0 +1,68 @@ +#pragma once +#include + +/** + * \defgroup proc_ui_procui ProcUI + * \ingroup proc_ui + * @{ + */ + +#ifdef __cplusplus +"C" { +#endif + +typedef void (*ProcUISaveCallback)(void); +typedef uint32_t (*ProcUISaveCallbackEx)(void*); +typedef uint32_t (*ProcUICallback)(void*); + +typedef enum ProcUIStatus +{ + PROCUI_STATUS_IN_FOREGROUND, + PROCUI_STATUS_IN_BACKGROUND, + PROCUI_STATUS_RELEASE_FOREGROUND, + PROCUI_STATUS_EXITING, +} ProcUIStatus; + +uint32_t +ProcUICalcMemorySize(uint32_t unk); + +void +ProcUIClearCallbacks(); + +void +ProcUIDrawDoneRelease(); + +BOOL +ProcUIInForeground(); + +BOOL +ProcUIInShutdown(); + +void +ProcUIInit(ProcUISaveCallback saveCallback); + +void +ProcUIInitEx(ProcUISaveCallbackEx saveCallback, + void *arg); + +BOOL +ProcUIIsRunning(); + +ProcUIStatus +ProcUIProcessMessages(BOOL block); + +void +ProcUISetSaveCallback(ProcUISaveCallbackEx saveCallback, + void *arg); + +void +ProcUIShutdown(); + +ProcUIStatus +ProcUISubProcessMessages(); + +#ifdef __cplusplus +} +#endif + +/** @} */ diff --git a/rpl/Makefile b/rpl/Makefile index 05d4607..92e4a17 100644 --- a/rpl/Makefile +++ b/rpl/Makefile @@ -1,5 +1,5 @@ WUT_ROOT := $(CURDIR)/.. -TARGETS := libcoreinit libgx2 libnsysnet libvpad libsysapp +TARGETS := libcoreinit libgx2 libnsysnet libvpad libsysapp libproc_ui all: @for dir in $(TARGETS); do \ diff --git a/rpl/libproc_ui/Makefile b/rpl/libproc_ui/Makefile new file mode 100644 index 0000000..0db6a68 --- /dev/null +++ b/rpl/libproc_ui/Makefile @@ -0,0 +1,2 @@ +-include ../common/rules.mk +-include ../../common/rules.mk diff --git a/rpl/libproc_ui/config.h b/rpl/libproc_ui/config.h new file mode 100644 index 0000000..ee3f41c --- /dev/null +++ b/rpl/libproc_ui/config.h @@ -0,0 +1 @@ +#define LIBRARY_NAME "proc_ui" diff --git a/rpl/libproc_ui/exports.h b/rpl/libproc_ui/exports.h new file mode 100644 index 0000000..0d24aa1 --- /dev/null +++ b/rpl/libproc_ui/exports.h @@ -0,0 +1,14 @@ +// procui/procui.h +EXPORT(ProcUICalcMemorySize); +EXPORT(ProcUIClearCallbacks); +EXPORT(ProcUIDrawDoneRelease); +EXPORT(ProcUIInForeground); +EXPORT(ProcUIInShutdown); +EXPORT(ProcUIInit); +EXPORT(ProcUIInitEx); +EXPORT(ProcUIIsRunning); +EXPORT(ProcUIProcessMessages); +EXPORT(ProcUISetSaveCallback); +EXPORT(ProcUIShutdown); +EXPORT(ProcUISubProcessMessages); +