summaryrefslogtreecommitdiff
path: root/include/user/shellutil.h
blob: 1f77727b7050606d327a0d20e17e145cd0973a21 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
#ifndef _PSP2_SHELLUTIL_H_
#define _PSP2_SHELLUTIL_H_

#ifdef __cplusplus
extern "C" {
#endif

enum {
	SCE_SHELL_UTIL_LOCK_TYPE_PS_BTN			= 0x1,
	SCE_SHELL_UTIL_LOCK_TYPE_QUICK_MENU		= 0x2,
	SCE_SHELL_UTIL_LOCK_TYPE_POWEROFF_MENU	= 0x4,
	SCE_SHELL_UTIL_LOCK_TYPE_UNK8			= 0x8,
	SCE_SHELL_UTIL_LOCK_TYPE_UNK10			= 0x10,
	SCE_SHELL_UTIL_LOCK_TYPE_UNK20			= 0x20,
	SCE_SHELL_UTIL_LOCK_TYPE_UNK40			= 0x40,
	SCE_SHELL_UTIL_LOCK_TYPE_UNK80			= 0x80,
	SCE_SHELL_UTIL_LOCK_TYPE_UNK100			= 0x100,
	SCE_SHELL_UTIL_LOCK_TYPE_UNK200			= 0x200,
	SCE_SHELL_UTIL_LOCK_TYPE_MUSIC_PLAYER	= 0x400,
	SCE_SHELL_UTIL_LOCK_TYPE_PS_BTN_2		= 0x800, //! without the stop symbol
};

enum {
	SCE_SHELL_UTIL_LOCK_MODE_LOCK		= 0x1,
	SCE_SHELL_UTIL_LOCK_MODE_UNLOCK		= 0x2,
};

typedef void (SceShellUtilEventHandler)(int result, int mode, int type, void *userData);

/**
 * Init events
 *
 * @param[in] unk - Unknown, use 0
 *
 * @return 0 on success, < 0 on error.
*/
int sceShellUtilInitEvents(int unk);

/**
 * Register event handler
 *
 * @param[in] handler - Event handler
 *
 * @param[in] userData - The user data passed to the handler
 *
 * @return 0 on success, < 0 on error.
*/
int sceShellUtilRegisterEventHandler(SceShellUtilEventHandler *handler, void *userData);

/**
 * Lock event
 *
 * @param[in] type - One of ::ShellUtilLockType
 *
 * @return 0 on success, < 0 on error.
*/
int sceShellUtilLock(int type);

/**
 * Unlock event
 *
 * @param[in] type - One of ::ShellUtilLockType
 *
 * @return 0 on success, < 0 on error.
*/
int sceShellUtilUnlock(int type);

#ifdef __cplusplus
}
#endif

#endif /* _PSP2_SHELLUTIL_H_ */