ProcUIRegisterCallback

Syntax

#include <cafe/procui.h>

typedef u32 (*ProcUICallbackFunction)(void*);

void ProcUIRegisterCallback(
    ProcUIMessage           message,
    ProcUICallbackFunction  func,
    void*                   data,
    s32                     priority
);

Parameters

message The message for which the callback is called.
func The function to be called.
data Data to be passed to the function.
priority Determines the order in which the callbacks are called. Low priority values are called first when the foreground is acquire and called last for all other callbacks.

Return Values

None.

Description

Registers a function to be called when a specific system message is received.

Supply return values when returning from the callback function pointed to by ProcUIRegisterCallback. If the code in your callback fails, you should return a nonzero value. If it succeeds, you should return 0.

Do Not Call From

Multiple threads This function is not thread-safe.

See Also

ProcUIClearCallbacks
ProcUIMessage

Revision History

2014/01/20 Description addition.
2013/07/01 Divided ProcUIRegisterCallback into 3 MAN pages.
2013/05/08 Automated cleanup pass.
2012/08/21 Cleanup Pass
2012/05/04 Initial version.


CONFIDENTIAL