From 8c93d5b3c87870ae4af79d08a571941a67369769 Mon Sep 17 00:00:00 2001 From: James Benton Date: Wed, 10 May 2017 17:21:57 +0100 Subject: [PATCH] proc_ui: Add ProcUIRegisterCallback{Core}. --- include/proc_ui/procui.h | 27 +++++++++++++++++++++++++-- src/rpl/proc_ui/exports.h | 2 ++ 2 files changed, 27 insertions(+), 2 deletions(-) diff --git a/include/proc_ui/procui.h b/include/proc_ui/procui.h index 521e7e8..c68bf91 100644 --- a/include/proc_ui/procui.h +++ b/include/proc_ui/procui.h @@ -12,8 +12,18 @@ extern "C" { #endif typedef void (*ProcUISaveCallback)(void); -typedef uint32_t (*ProcUISaveCallbackEx)(void*); -typedef uint32_t (*ProcUICallback)(void*); +typedef uint32_t (*ProcUISaveCallbackEx)(void *); +typedef uint32_t (*ProcUICallback)(void *); + +typedef enum ProcUICallbackType +{ + PROCUI_CALLBACK_ACQUIRE, + PROCUI_CALLBACK_RELEASE, + PROCUI_CALLBACK_EXIT, + PROCUI_CALLBACK_NET_IO_START, + PROCUI_CALLBACK_NET_IO_STOP, + PROCUI_CALLBACK_HOME_BUTTON_DENIED, +} ProcUICallbackType; typedef enum ProcUIStatus { @@ -51,6 +61,19 @@ ProcUIIsRunning(); ProcUIStatus ProcUIProcessMessages(BOOL block); +void +ProcUIRegisterCallback(ProcUICallbackType type, + ProcUICallback callback, + void *param, + uint32_t priority); + +void +ProcUIRegisterCallbackCore(ProcUICallbackType type, + ProcUICallback callback, + void *param, + uint32_t priority, + uint32_t core); + void ProcUISetSaveCallback(ProcUISaveCallbackEx saveCallback, void *arg); diff --git a/src/rpl/proc_ui/exports.h b/src/rpl/proc_ui/exports.h index 0d24aa1..8c58339 100644 --- a/src/rpl/proc_ui/exports.h +++ b/src/rpl/proc_ui/exports.h @@ -8,6 +8,8 @@ EXPORT(ProcUIInit); EXPORT(ProcUIInitEx); EXPORT(ProcUIIsRunning); EXPORT(ProcUIProcessMessages); +EXPORT(ProcUIRegisterCallback); +EXPORT(ProcUIRegisterCallbackCore); EXPORT(ProcUISetSaveCallback); EXPORT(ProcUIShutdown); EXPORT(ProcUISubProcessMessages);