psl1ght
A free SDK for Sony's PS3 console
|
Miscellaneous system utility functions. More...
#include <ppu-types.h>
Go to the source code of this file.
Macros | |
#define | SYSUTIL_OK 0 |
Return value. | |
#define | SYSUTIL_EVENT_SLOT0 0 |
Event slot 0. | |
#define | SYSUTIL_EVENT_SLOT1 1 |
Event slot 1. | |
#define | SYSUTIL_EVENT_SLOT2 2 |
Event slot 2. | |
#define | SYSUTIL_EVENT_SLOT3 3 |
Event slot 3. | |
#define | SYSUTIL_EXIT_GAME 0x0101 |
Exit game requested. | |
#define | SYSUTIL_DRAW_BEGIN 0x0121 |
Beginning of XMB menu drawing. | |
#define | SYSUTIL_DRAW_END 0x0122 |
End of XMB menu drawing. | |
#define | SYSUTIL_MENU_OPEN 0x0131 |
XMB menu has been opened. | |
#define | SYSUTIL_MENU_CLOSE 0x0132 |
XMB menu has been closed. | |
#define | SYSUTIL_OSK_LOADED 0x0502 |
On-screen keyboard has been loaded. | |
#define | SYSUTIL_OSK_DONE 0x0503 |
On-screen keyboard has finished a user entry. | |
#define | SYSUTIL_OSK_UNLOADED 0x0504 |
On-screen keyboard has been unloaded. | |
Typedefs | |
typedef void(* | sysutilCallback) (u64 status, u64 param, void *usrdata) |
Pointer to callback function. More... | |
Functions | |
s32 | sysUtilCheckCallback () |
Check for events. More... | |
s32 | sysUtilUnregisterCallback (s32 slot) |
Unregister a callback function. More... | |
s32 | sysUtilRegisterCallback (s32 slot, sysutilCallback cb, void *usrdata) |
Register a callback function for system events. More... | |
Miscellaneous system utility functions.
typedef void(* sysutilCallback) (u64 status, u64 param, void *usrdata) |
Pointer to callback function.
status | Event value. Possible values are: |
param | Event parameter, depending on event value. |
usrdata | Pointer to user data as provided to the sysUtilRegisterCallback function. |
s32 sysUtilCheckCallback | ( | ) |
Check for events.
This function usually is called in the main loop of a program, to regularly check for new events. In case of an event, the callback function (previously registered using sysUtilRegisterCallback) is called.
s32 sysUtilRegisterCallback | ( | s32 | slot, |
sysutilCallback | cb, | ||
void * | usrdata | ||
) |
Register a callback function for system events.
This function usually is called at the beginning of a program to set up an event manager. There can be up to 4 event managers installed at the same time, by placing them in different slots. All system events are delivered to all 4 slots in order, so each manager will see all of them.
slot | Event slot identifier. Possible values are: |
cb | Pointer to callback function. |
usrdata | Pointer to user data, to be sent to callback function. May be NULL . |
s32 sysUtilUnregisterCallback | ( | s32 | slot | ) |
Unregister a callback function.
This function usually is called at the end of a program to unregister the event manager.