diff options
author | Rinnegatamante | 2017-06-15 11:36:33 +0200 |
---|---|---|
committer | Sunguk Lee | 2017-06-15 18:36:33 +0900 |
commit | b5646d6867a3c279e0a7f5b3db42678f84d7ff15 (patch) | |
tree | b625c863cf3657b5901523e438bddb8330c10a74 /include/user/appmgr.h | |
parent | Removed next entry (diff) | |
download | vds-libraries-b5646d6867a3c279e0a7f5b3db42678f84d7ff15.tar.gz |
Named anonymous enums in psp2. (#179)
* Named anonymous enums in psp2.
Named anonymous enums in psp2.
* Properly sorted enums.
* Several modifications (see desc)
Added some missing info, fixed identation in some places, aligned all
enums and comments with spaces as delimiters, replaced decimal negative
errorcode in location.h with hexadecimal one, added some comments and
fixed some documentation comments.
* Minor fixes in identation.
* Yet another minor identation fix.
* Fixed enums in structs.
* Reverted SceBool changes.
* SceBool fix.
* Fix for compilation with g++-
* Added some doc references in jpegenc.
* Fixed some references.
Diffstat (limited to '')
-rw-r--r-- | include/user/appmgr.h | 75 |
1 files changed, 35 insertions, 40 deletions
diff --git a/include/user/appmgr.h b/include/user/appmgr.h index 8a4a9d7..d0e8b81 100644 --- a/include/user/appmgr.h +++ b/include/user/appmgr.h @@ -7,50 +7,45 @@ extern "C" { #endif -enum { +typedef enum SceAppMgrErrorCode { //! Busy - SCE_APPMGR_ERROR_BUSY = 0x80802000, - + SCE_APPMGR_ERROR_BUSY = 0x80802000, //! Invalid state - SCE_APPMGR_ERROR_STATE = 0x80802013, - + SCE_APPMGR_ERROR_STATE = 0x80802013, //! NULL pointer SCE_APPMGR_ERROR_NULL_POINTER = 0x80802016, - //!< Invalid param - SCE_APPMGR_ERROR_INVALID = 0x8080201a, - + SCE_APPMGR_ERROR_INVALID = 0x8080201a, //!< Invalid self path - SCE_APPMGR_ERROR_INVALID_SELF_PATH = 0x8080201e, - + SCE_APPMGR_ERROR_INVALID_SELF_PATH = 0x8080201e, //!< argv is too long - SCE_APPMGR_ERROR_TOO_LONG_ARGV = 0x8080201d -}; - -enum { - SCE_APPMGR_SYSTEMEVENT_ON_RESUME = 0x10000003, - SCE_APPMGR_SYSTEMEVENT_ON_STORE_PURCHASE = 0x10000004, - SCE_APPMGR_SYSTEMEVENT_ON_NP_MESSAGE_ARRIVED = 0x10000005, - SCE_APPMGR_SYSTEMEVENT_ON_STORE_REDEMPTION = 0x10000006, -}; - -enum { - SCE_APPMGR_INFOBAR_VISIBILITY_INVISIBLE = 0, - SCE_APPMGR_INFOBAR_VISIBILITY_VISIBLE = 1 -}; - -enum { - SCE_APPMGR_INFOBAR_COLOR_BLACK = 0, - SCE_APPMGR_INFOBAR_COLOR_WHITE = 1 -}; - -enum { - SCE_APPMGR_INFOBAR_TRANSPARENCY_OPAQUE = 0, - SCE_APPMGR_INFOBAR_TRANSPARENCY_TRANSLUCENT = 1 -}; + SCE_APPMGR_ERROR_TOO_LONG_ARGV = 0x8080201d +} SceAppMgrErrorCode; + +typedef enum SceAppMgrSystemEventType { + SCE_APPMGR_SYSTEMEVENT_ON_RESUME = 0x10000003, + SCE_APPMGR_SYSTEMEVENT_ON_STORE_PURCHASE = 0x10000004, + SCE_APPMGR_SYSTEMEVENT_ON_NP_MESSAGE_ARRIVED = 0x10000005, + SCE_APPMGR_SYSTEMEVENT_ON_STORE_REDEMPTION = 0x10000006 +} SceAppMgrSystemEventType; + +typedef enum SceAppMgrInfoBarVisibility { + SCE_APPMGR_INFOBAR_VISIBILITY_INVISIBLE = 0, + SCE_APPMGR_INFOBAR_VISIBILITY_VISIBLE = 1 +} SceAppMgrInfoBarVisibility; + +typedef enum SceAppMgrInfoBarColor { + SCE_APPMGR_INFOBAR_COLOR_BLACK = 0, + SCE_APPMGR_INFOBAR_COLOR_WHITE = 1 +} SceAppMgrInfoBarColor; + +typedef enum SceAppMgrInfoBarTransparency { + SCE_APPMGR_INFOBAR_TRANSPARENCY_OPAQUE = 0, + SCE_APPMGR_INFOBAR_TRANSPARENCY_TRANSLUCENT = 1 +} SceAppMgrInfoBarTransparency; typedef struct SceAppMgrSystemEvent { - int systemEvent; + int systemEvent; //!< One of ::SceAppMgrSystemEventType uint8_t reserved[60]; } SceAppMgrSystemEvent; @@ -58,6 +53,10 @@ typedef struct SceAppMgrAppState SceAppMgrAppState; // Missing struct typedef struct SceAppMgrExecOptParam SceAppMgrExecOptParam; // Missing struct typedef struct SceAppMgrLaunchAppOptParam SceAppMgrLaunchAppOptParam; // Missing struct +typedef struct sceAppMgrLoadExecOptParam { + int reserved[64]; +} sceAppMgrLoadExecOptParam; + #define SCE_APPMGR_MAX_APP_NAME_LENGTH (31) //! Destroy all other apps @@ -89,11 +88,7 @@ int sceAppMgrAcquireBgmPort(void); int sceAppMgrReleaseBgmPort(void); //! Set infobar state -int sceAppMgrSetInfobarState(int visibility, int color, int transparency); - -typedef struct sceAppMgrLoadExecOptParam { - int reserved[256 / 4]; -} sceAppMgrLoadExecOptParam; +int sceAppMgrSetInfobarState(SceAppMgrInfoBarVisibility visibility, SceAppMgrInfoBarColor color, SceAppMgrInfoBarTransparency transparency); int sceAppMgrLoadExec(const char *appPath, char * const argv[], const SceAppMgrExecOptParam *optParam); |