psputility_msgdialog.h

Go to the documentation of this file.
00001 /*
00002  * PSP Software Development Kit - http://www.pspdev.org
00003  * -----------------------------------------------------------------------
00004  * Licensed under the BSD license, see LICENSE in PSPSDK root for details.
00005  *
00006  *  psputility_msdialog.h - Definitions and Functions for Dialogs
00007  *                         section of the pspUtility library
00008  *
00009  * Copyright (c) 2005 Marcus Comstedt <marcus@mc.pp.se>
00010  *                       (c) 2008 InsertWittyName <tias_dp@hotmail.com>
00011  *
00012  * $Id: psputility_msgdialog.h 2433 2008-10-15 10:00:27Z iwn $
00013  */
00014 #ifndef __PSPUTILITY_DIALOGS_H__
00015 #define __PSPUTILITY_DIALOGS_H__
00016 
00017 #ifdef __cplusplus
00018 extern "C" {
00019 #endif
00020 
00021 typedef enum
00022 {
00023         PSP_UTILITY_MSGDIALOG_MODE_ERROR = 0, /* Error message */
00024         PSP_UTILITY_MSGDIALOG_MODE_TEXT /* String message */
00025         
00026 } pspUtilityMsgDialogMode;
00027 
00028 typedef enum
00029 {
00030         PSP_UTILITY_MSGDIALOG_OPTION_ERROR = 0, /* Error message (why two flags?) */
00031         PSP_UTILITY_MSGDIALOG_OPTION_TEXT = 0x00000001, /* Text message (why two flags?) */
00032         PSP_UTILITY_MSGDIALOG_OPTION_YESNO_BUTTONS = 0x00000010,        /* Yes/No buttons instead of 'Cancel' */
00033         PSP_UTILITY_MSGDIALOG_OPTION_DEFAULT_NO  = 0x00000100   /* Default position 'No', if not set will default to 'Yes' */
00034         
00035 } pspUtilityMsgDialogOption;
00036 
00037 typedef enum
00038 {
00039         PSP_UTILITY_MSGDIALOG_RESULT_UNKNOWN1 = 0,
00040         PSP_UTILITY_MSGDIALOG_RESULT_YES,
00041         PSP_UTILITY_MSGDIALOG_RESULT_NO,
00042         PSP_UTILITY_MSGDIALOG_RESULT_BACK
00043         
00044 } pspUtilityMsgDialogPressed;
00045 
00049 typedef struct _pspUtilityMsgDialogParams
00050 {
00051     pspUtilityDialogCommon base;
00052     int unknown;
00053         pspUtilityMsgDialogMode mode;
00054         unsigned int errorValue;
00056     char message[512];
00057         int options; /* OR ::pspUtilityMsgDialogOption together for multiple options */
00058         pspUtilityMsgDialogPressed buttonPressed;
00059 
00060 } pspUtilityMsgDialogParams;
00061 
00068 int sceUtilityMsgDialogInitStart(pspUtilityMsgDialogParams *params);
00069 
00075 void sceUtilityMsgDialogShutdownStart(void);
00076 
00084 int sceUtilityMsgDialogGetStatus(void);
00085 
00091 void sceUtilityMsgDialogUpdate(int n);
00092 
00096 int sceUtilityMsgDialogAbort(void);
00097 
00098 #ifdef __cplusplus
00099 }
00100 #endif
00101 
00102 #endif