From 8faf7c7f3887db8b8507c7ba340a894324a89f12 Mon Sep 17 00:00:00 2001 From: shinyquagsire23 Date: Wed, 27 Jul 2016 00:39:03 -0700 Subject: [PATCH 1/2] Add basic ProcUI RPL imports --- include/proc_ui/procui.h | 68 ++++++++++++++++++++++++++++++++++++++++ rpl/Makefile | 2 +- rpl/libproc_ui/Makefile | 2 ++ rpl/libproc_ui/config.h | 1 + rpl/libproc_ui/exports.h | 14 +++++++++ 5 files changed, 86 insertions(+), 1 deletion(-) create mode 100644 include/proc_ui/procui.h create mode 100644 rpl/libproc_ui/Makefile create mode 100644 rpl/libproc_ui/config.h create mode 100644 rpl/libproc_ui/exports.h 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); + From f4151dd9c14a550cdd6231a264568318a3379341 Mon Sep 17 00:00:00 2001 From: shinyquagsire23 Date: Wed, 27 Jul 2016 00:39:25 -0700 Subject: [PATCH 2/2] Add foreground management imports to coreinit --- include/coreinit/foreground.h | 27 +++++++++++++++++++++++++++ rpl/libcoreinit/exports.h | 5 +++++ 2 files changed, 32 insertions(+) create mode 100644 include/coreinit/foreground.h diff --git a/include/coreinit/foreground.h b/include/coreinit/foreground.h new file mode 100644 index 0000000..88eb1b0 --- /dev/null +++ b/include/coreinit/foreground.h @@ -0,0 +1,27 @@ +#pragma once +#include + +/** + * \defgroup coreinit_foreground Foreground Management + * \ingroup coreinit + * @{ + */ + +#ifdef __cplusplus +extern "C" { +#endif + +void +OSEnableForegroundExit(); + +void +OSReleaseForeground(); + +void +OSSavesDone_ReadyToRelease(); + +#ifdef __cplusplus +} +#endif + +/** @} */ diff --git a/rpl/libcoreinit/exports.h b/rpl/libcoreinit/exports.h index 9b782f4..474b727 100644 --- a/rpl/libcoreinit/exports.h +++ b/rpl/libcoreinit/exports.h @@ -152,6 +152,11 @@ EXPORT(FSSetPosFileAsync); EXPORT(FSGetVolumeState); EXPORT(FSGetLastErrorCodeForViewer); +// coreinit/foreground.h +EXPORT(OSEnableForegroundExit); +EXPORT(OSReleaseForeground); +EXPORT(OSSavesDone_ReadyToRelease); + // coreinit/frameheap.h EXPORT(MEMCreateFrmHeapEx); EXPORT(MEMDestroyFrmHeap);