psl1ght
A free SDK for Sony's PS3 console
Loading...
Searching...
No Matches
sysutil.h File Reference

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.
 
#define SYSUTIL_OSK_INPUT_ENTERED   0x0505
 On-screen keyboard user entered input.
 
#define SYSUTIL_OSK_INPUT_CANCELED   0x0506
 On-screen keyboard has canceled input.
 
#define SYSUTIL_SYSTEMPARAM_ID_LANG   0x0111
 
#define SYSUTIL_SYSTEMPARAM_ID_ENTER_BUTTON_ASSIGN   0x0112
 
#define SYSUTIL_SYSTEMPARAM_ID_NICKNAME   0x0113
 
#define SYSUTIL_SYSTEMPARAM_ID_DATE_FORMAT   0x0114
 
#define SYSUTIL_SYSTEMPARAM_ID_TIME_FORMAT   0x0115
 
#define SYSUTIL_SYSTEMPARAM_ID_TIMEZONE   0x0116
 
#define SYSUTIL_SYSTEMPARAM_ID_SUMMERTIME   0x0117
 
#define SYSUTIL_SYSTEMPARAM_ID_GAME_PARENTAL_LEVEL   0x0121
 
#define SYSUTIL_SYSTEMPARAM_ID_GAME_PARENTAL_LEVEL0_RESTRICT   0x0123
 
#define SYSUTIL_SYSTEMPARAM_ID_INTERNET_BROWSER_START_RESTRICT   0x0125
 
#define SYSUTIL_SYSTEMPARAM_ID_CURRENT_USERNAME   0x0131
 
#define SYSUTIL_SYSTEMPARAM_ID_CURRENT_USER_HAS_NP_ACCOUNT   0x0141
 
#define SYSUTIL_SYSTEMPARAM_ID_CAMERA_PLFREQ   0x0151
 
#define SYSUTIL_SYSTEMPARAM_ID_PAD_RUMBLE   0x0152
 
#define SYSUTIL_SYSTEMPARAM_ID_KEYBOARD_TYPE   0x0153
 
#define SYSUTIL_SYSTEMPARAM_ID_JAPANESE_KEYBOARD_ENTRY_METHOD   0x0154
 
#define SYSUTIL_SYSTEMPARAM_ID_CHINESE_KEYBOARD_ENTRY_METHOD   0x0155
 
#define SYSUTIL_SYSTEMPARAM_ID_PAD_AUTOOFF   0x0156
 
#define SYSUTIL_SYSTEMPARAM_ID_MAGNETOMETER   0x0157
 
#define SYSUTIL_SYSTEMPARAM_NICKNAME_SIZE   128
 
#define SYSUTIL_SYSTEMPARAM_CURRENT_USERNAME_SIZE   64
 
#define SYSUTIL_LANG_JAPANESE   0
 
#define SYSUTIL_LANG_ENGLISH_US   1
 
#define SYSUTIL_LANG_FRENCH   2
 
#define SYSUTIL_LANG_SPANISH   3
 
#define SYSUTIL_LANG_GERMAN   4
 
#define SYSUTIL_LANG_ITALIAN   5
 
#define SYSUTIL_LANG_DUTCH   6
 
#define SYSUTIL_LANG_PORTUGUESE_PT   7
 
#define SYSUTIL_LANG_RUSSIAN   8
 
#define SYSUTIL_LANG_KOREAN   9
 
#define SYSUTIL_LANG_CHINESE_T   10
 
#define SYSUTIL_LANG_CHINESE_S   11
 
#define SYSUTIL_LANG_FINNISH   12
 
#define SYSUTIL_LANG_SWEDISH   13
 
#define SYSUTIL_LANG_DANISH   14
 
#define SYSUTIL_LANG_NORWEGIAN   15
 
#define SYSUTIL_LANG_POLISH   16
 
#define SYSUTIL_LANG_PORTUGUESE_BR   17
 
#define SYSUTIL_LANG_ENGLISH_GB   18
 
#define SYSUTIL_LANG_TURKISH   19
 

Typedefs

typedef void(* sysutilCallback) (u64 status, u64 param, void *usrdata)
 Pointer to callback function.
 

Functions

s32 sysUtilCheckCallback ()
 Check for events.
 
s32 sysUtilUnregisterCallback (s32 slot)
 Unregister a callback function.
 
s32 sysUtilRegisterCallback (s32 slot, sysutilCallback cb, void *usrdata)
 Register a callback function for system events.
 
s32 sysUtilGetSystemParamInt (s32 id, s32 *value)
 
s32 sysUtilGetSystemParamString (s32 id, char *buf, u32 bufsize)
 

Detailed Description

Miscellaneous system utility functions.

Definition in file sysutil.h.

Macro Definition Documentation

◆ SYSUTIL_DRAW_BEGIN

#define SYSUTIL_DRAW_BEGIN   0x0121

Beginning of XMB menu drawing.

Definition at line 25 of file sysutil.h.

◆ SYSUTIL_DRAW_END

#define SYSUTIL_DRAW_END   0x0122

End of XMB menu drawing.

Definition at line 27 of file sysutil.h.

◆ SYSUTIL_EVENT_SLOT0

#define SYSUTIL_EVENT_SLOT0   0

Event slot 0.

Definition at line 14 of file sysutil.h.

◆ SYSUTIL_EVENT_SLOT1

#define SYSUTIL_EVENT_SLOT1   1

Event slot 1.

Definition at line 16 of file sysutil.h.

◆ SYSUTIL_EVENT_SLOT2

#define SYSUTIL_EVENT_SLOT2   2

Event slot 2.

Definition at line 18 of file sysutil.h.

◆ SYSUTIL_EVENT_SLOT3

#define SYSUTIL_EVENT_SLOT3   3

Event slot 3.

Definition at line 20 of file sysutil.h.

◆ SYSUTIL_EXIT_GAME

#define SYSUTIL_EXIT_GAME   0x0101

Exit game requested.

Definition at line 23 of file sysutil.h.

◆ SYSUTIL_LANG_CHINESE_S

#define SYSUTIL_LANG_CHINESE_S   11

Definition at line 77 of file sysutil.h.

◆ SYSUTIL_LANG_CHINESE_T

#define SYSUTIL_LANG_CHINESE_T   10

Definition at line 76 of file sysutil.h.

◆ SYSUTIL_LANG_DANISH

#define SYSUTIL_LANG_DANISH   14

Definition at line 80 of file sysutil.h.

◆ SYSUTIL_LANG_DUTCH

#define SYSUTIL_LANG_DUTCH   6

Definition at line 72 of file sysutil.h.

◆ SYSUTIL_LANG_ENGLISH_GB

#define SYSUTIL_LANG_ENGLISH_GB   18

Definition at line 84 of file sysutil.h.

◆ SYSUTIL_LANG_ENGLISH_US

#define SYSUTIL_LANG_ENGLISH_US   1

Definition at line 67 of file sysutil.h.

◆ SYSUTIL_LANG_FINNISH

#define SYSUTIL_LANG_FINNISH   12

Definition at line 78 of file sysutil.h.

◆ SYSUTIL_LANG_FRENCH

#define SYSUTIL_LANG_FRENCH   2

Definition at line 68 of file sysutil.h.

◆ SYSUTIL_LANG_GERMAN

#define SYSUTIL_LANG_GERMAN   4

Definition at line 70 of file sysutil.h.

◆ SYSUTIL_LANG_ITALIAN

#define SYSUTIL_LANG_ITALIAN   5

Definition at line 71 of file sysutil.h.

◆ SYSUTIL_LANG_JAPANESE

#define SYSUTIL_LANG_JAPANESE   0

Definition at line 66 of file sysutil.h.

◆ SYSUTIL_LANG_KOREAN

#define SYSUTIL_LANG_KOREAN   9

Definition at line 75 of file sysutil.h.

◆ SYSUTIL_LANG_NORWEGIAN

#define SYSUTIL_LANG_NORWEGIAN   15

Definition at line 81 of file sysutil.h.

◆ SYSUTIL_LANG_POLISH

#define SYSUTIL_LANG_POLISH   16

Definition at line 82 of file sysutil.h.

◆ SYSUTIL_LANG_PORTUGUESE_BR

#define SYSUTIL_LANG_PORTUGUESE_BR   17

Definition at line 83 of file sysutil.h.

◆ SYSUTIL_LANG_PORTUGUESE_PT

#define SYSUTIL_LANG_PORTUGUESE_PT   7

Definition at line 73 of file sysutil.h.

◆ SYSUTIL_LANG_RUSSIAN

#define SYSUTIL_LANG_RUSSIAN   8

Definition at line 74 of file sysutil.h.

◆ SYSUTIL_LANG_SPANISH

#define SYSUTIL_LANG_SPANISH   3

Definition at line 69 of file sysutil.h.

◆ SYSUTIL_LANG_SWEDISH

#define SYSUTIL_LANG_SWEDISH   13

Definition at line 79 of file sysutil.h.

◆ SYSUTIL_LANG_TURKISH

#define SYSUTIL_LANG_TURKISH   19

Definition at line 85 of file sysutil.h.

◆ SYSUTIL_MENU_CLOSE

#define SYSUTIL_MENU_CLOSE   0x0132

XMB menu has been closed.

Definition at line 31 of file sysutil.h.

◆ SYSUTIL_MENU_OPEN

#define SYSUTIL_MENU_OPEN   0x0131

XMB menu has been opened.

Definition at line 29 of file sysutil.h.

◆ SYSUTIL_OK

#define SYSUTIL_OK   0

Return value.

Definition at line 11 of file sysutil.h.

◆ SYSUTIL_OSK_DONE

#define SYSUTIL_OSK_DONE   0x0503

On-screen keyboard has finished a user entry.

Definition at line 35 of file sysutil.h.

◆ SYSUTIL_OSK_INPUT_CANCELED

#define SYSUTIL_OSK_INPUT_CANCELED   0x0506

On-screen keyboard has canceled input.

Definition at line 41 of file sysutil.h.

◆ SYSUTIL_OSK_INPUT_ENTERED

#define SYSUTIL_OSK_INPUT_ENTERED   0x0505

On-screen keyboard user entered input.

Definition at line 39 of file sysutil.h.

◆ SYSUTIL_OSK_LOADED

#define SYSUTIL_OSK_LOADED   0x0502

On-screen keyboard has been loaded.

Definition at line 33 of file sysutil.h.

◆ SYSUTIL_OSK_UNLOADED

#define SYSUTIL_OSK_UNLOADED   0x0504

On-screen keyboard has been unloaded.

Definition at line 37 of file sysutil.h.

◆ SYSUTIL_SYSTEMPARAM_CURRENT_USERNAME_SIZE

#define SYSUTIL_SYSTEMPARAM_CURRENT_USERNAME_SIZE   64

Definition at line 64 of file sysutil.h.

◆ SYSUTIL_SYSTEMPARAM_ID_CAMERA_PLFREQ

#define SYSUTIL_SYSTEMPARAM_ID_CAMERA_PLFREQ   0x0151

Definition at line 55 of file sysutil.h.

◆ SYSUTIL_SYSTEMPARAM_ID_CHINESE_KEYBOARD_ENTRY_METHOD

#define SYSUTIL_SYSTEMPARAM_ID_CHINESE_KEYBOARD_ENTRY_METHOD   0x0155

Definition at line 59 of file sysutil.h.

◆ SYSUTIL_SYSTEMPARAM_ID_CURRENT_USER_HAS_NP_ACCOUNT

#define SYSUTIL_SYSTEMPARAM_ID_CURRENT_USER_HAS_NP_ACCOUNT   0x0141

Definition at line 54 of file sysutil.h.

◆ SYSUTIL_SYSTEMPARAM_ID_CURRENT_USERNAME

#define SYSUTIL_SYSTEMPARAM_ID_CURRENT_USERNAME   0x0131

Definition at line 53 of file sysutil.h.

◆ SYSUTIL_SYSTEMPARAM_ID_DATE_FORMAT

#define SYSUTIL_SYSTEMPARAM_ID_DATE_FORMAT   0x0114

Definition at line 46 of file sysutil.h.

◆ SYSUTIL_SYSTEMPARAM_ID_ENTER_BUTTON_ASSIGN

#define SYSUTIL_SYSTEMPARAM_ID_ENTER_BUTTON_ASSIGN   0x0112

Definition at line 44 of file sysutil.h.

◆ SYSUTIL_SYSTEMPARAM_ID_GAME_PARENTAL_LEVEL

#define SYSUTIL_SYSTEMPARAM_ID_GAME_PARENTAL_LEVEL   0x0121

Definition at line 50 of file sysutil.h.

◆ SYSUTIL_SYSTEMPARAM_ID_GAME_PARENTAL_LEVEL0_RESTRICT

#define SYSUTIL_SYSTEMPARAM_ID_GAME_PARENTAL_LEVEL0_RESTRICT   0x0123

Definition at line 51 of file sysutil.h.

◆ SYSUTIL_SYSTEMPARAM_ID_INTERNET_BROWSER_START_RESTRICT

#define SYSUTIL_SYSTEMPARAM_ID_INTERNET_BROWSER_START_RESTRICT   0x0125

Definition at line 52 of file sysutil.h.

◆ SYSUTIL_SYSTEMPARAM_ID_JAPANESE_KEYBOARD_ENTRY_METHOD

#define SYSUTIL_SYSTEMPARAM_ID_JAPANESE_KEYBOARD_ENTRY_METHOD   0x0154

Definition at line 58 of file sysutil.h.

◆ SYSUTIL_SYSTEMPARAM_ID_KEYBOARD_TYPE

#define SYSUTIL_SYSTEMPARAM_ID_KEYBOARD_TYPE   0x0153

Definition at line 57 of file sysutil.h.

◆ SYSUTIL_SYSTEMPARAM_ID_LANG

#define SYSUTIL_SYSTEMPARAM_ID_LANG   0x0111

Definition at line 43 of file sysutil.h.

◆ SYSUTIL_SYSTEMPARAM_ID_MAGNETOMETER

#define SYSUTIL_SYSTEMPARAM_ID_MAGNETOMETER   0x0157

Definition at line 61 of file sysutil.h.

◆ SYSUTIL_SYSTEMPARAM_ID_NICKNAME

#define SYSUTIL_SYSTEMPARAM_ID_NICKNAME   0x0113

Definition at line 45 of file sysutil.h.

◆ SYSUTIL_SYSTEMPARAM_ID_PAD_AUTOOFF

#define SYSUTIL_SYSTEMPARAM_ID_PAD_AUTOOFF   0x0156

Definition at line 60 of file sysutil.h.

◆ SYSUTIL_SYSTEMPARAM_ID_PAD_RUMBLE

#define SYSUTIL_SYSTEMPARAM_ID_PAD_RUMBLE   0x0152

Definition at line 56 of file sysutil.h.

◆ SYSUTIL_SYSTEMPARAM_ID_SUMMERTIME

#define SYSUTIL_SYSTEMPARAM_ID_SUMMERTIME   0x0117

Definition at line 49 of file sysutil.h.

◆ SYSUTIL_SYSTEMPARAM_ID_TIME_FORMAT

#define SYSUTIL_SYSTEMPARAM_ID_TIME_FORMAT   0x0115

Definition at line 47 of file sysutil.h.

◆ SYSUTIL_SYSTEMPARAM_ID_TIMEZONE

#define SYSUTIL_SYSTEMPARAM_ID_TIMEZONE   0x0116

Definition at line 48 of file sysutil.h.

◆ SYSUTIL_SYSTEMPARAM_NICKNAME_SIZE

#define SYSUTIL_SYSTEMPARAM_NICKNAME_SIZE   128

Definition at line 63 of file sysutil.h.

Typedef Documentation

◆ sysutilCallback

typedef void(* sysutilCallback) (u64 status, u64 param, void *usrdata)

Pointer to callback function.

Parameters
statusEvent value. Possible values are:
paramEvent parameter, depending on event value.
usrdataPointer to user data as provided to the sysUtilRegisterCallback function.

Definition at line 108 of file sysutil.h.

Function Documentation

◆ sysUtilCheckCallback()

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.

◆ sysUtilGetSystemParamInt()

s32 sysUtilGetSystemParamInt ( s32  id,
s32 *  value 
)

◆ sysUtilGetSystemParamString()

s32 sysUtilGetSystemParamString ( s32  id,
char *  buf,
u32  bufsize 
)

◆ sysUtilRegisterCallback()

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.

Parameters
slotEvent slot identifier. Possible values are:
cbPointer to callback function.
usrdataPointer to user data, to be sent to callback function. May be NULL.

◆ sysUtilUnregisterCallback()

s32 sysUtilUnregisterCallback ( s32  slot)

Unregister a callback function.

This function usually is called at the end of a program to unregister the event manager.