Dialogs

Macros

#define OSL_DIALOG_NONE   0
 
#define OSL_DIALOG_MESSAGE   1
 
#define OSL_DIALOG_ERROR   2
 
#define OSL_DIALOG_NETCONF   3
 
#define OSL_DIALOG_STATUS_NONE   PSP_UTILITY_DIALOG_NONE
 
#define OSL_DIALOG_STATUS_INIT   PSP_UTILITY_DIALOG_INIT
 
#define OSL_DIALOG_STATUS_VISIBLE   PSP_UTILITY_DIALOG_VISIBLE
 
#define OSL_DIALOG_STATUS_QUIT   PSP_UTILITY_DIALOG_QUIT
 
#define OSL_DIALOG_STATUS_FINISHED   PSP_UTILITY_DIALOG_FINISHED
 

Functions

int oslDialogDrawAndWait (int dialogType)
 
int oslDialogIsActive ()
 
int oslInitMessageDialog (const char *message, int enableYesno)
 
int oslInitErrorDialog (const unsigned int error)
 
void oslDrawDialog ()
 
int oslGetDialogType ()
 
int oslGetDialogStatus ()
 
int oslGetDialogButtonPressed ()
 
int oslInitNetDialog ()
 
int oslDialogGetResult ()
 
void oslEndDialog ()
 

Detailed Description

Functions to display Sony's dialogs

Macro Definition Documentation

#define OSL_DIALOG_NONE   0

No dialog

#define OSL_DIALOG_MESSAGE   1

Message dialog

#define OSL_DIALOG_ERROR   2

Error dialog

#define OSL_DIALOG_NETCONF   3

Net conf dialog

#define OSL_DIALOG_STATUS_NONE   PSP_UTILITY_DIALOG_NONE

No dialog is currently active

#define OSL_DIALOG_STATUS_INIT   PSP_UTILITY_DIALOG_INIT

The dialog is currently being initialized

#define OSL_DIALOG_STATUS_VISIBLE   PSP_UTILITY_DIALOG_VISIBLE

The dialog is visible and ready for use

#define OSL_DIALOG_STATUS_QUIT   PSP_UTILITY_DIALOG_QUIT

The dialog has been canceled and should be shut down

#define OSL_DIALOG_STATUS_FINISHED   PSP_UTILITY_DIALOG_FINISHED

The dialog has successfully shut down

Function Documentation

int oslDialogDrawAndWait ( int  dialogType)

Universal routine which draws the current dialog (of the given dialog type) and waits for the user finish work with it. Returns 0 or ErrorCode (<0).

int oslDialogIsActive ( )

Tests whether any of ERROR,MESSAGE or NETCONF dialogs is currently active

int oslInitMessageDialog ( const char *  message,
int  enableYesno 
)

Initializes a Message Dialog

Parameters
*messageText shown in the message dialog
enableYesnoif 1 the dialog will have Yes/No option
int oslInitErrorDialog ( const unsigned int  error)

Initializes an Error Dialog

Parameters
errorError code
void oslDrawDialog ( )

Draws the current dialog to screen. After drawing it you should check if the user closed it. Remember to call oslEndDialog.

if (oslGetDialogStatus() == PSP_UTILITY_DIALOG_NONE){
//The user closed the dialog
}
int oslGetDialogType ( )

Returns the current dialog type

int oslGetDialogStatus ( )

Returns the current dialog status

int oslGetDialogButtonPressed ( )

Returns the button pressed in the dialog (only for message dialog with enableYesno == 1)

int oslInitNetDialog ( )

Initializes the net conf dialog

int oslDialogGetResult ( )

Gets the dialog result (OSL_DIALOG_CANCEL or OSL_DIALOG_OK)

void oslEndDialog ( )

Ends the current dialog