📄 nsipromptservice.h
字号:
* * @param dialogTitle * @param text * @param password in: Pre-fills the dialog field if non-null * out: If result is true, a newly allocated * string. If result is false, in string is not * touched. * @param checkMsg if null, check box will not be shown * @param checkValue * @return true for OK, false for Cancel */ /* boolean promptPassword (in nsIDOMWindow parent, in wstring dialogTitle, in wstring text, inout wstring password, in wstring checkMsg, inout boolean checkValue); */ NS_IMETHOD PromptPassword(nsIDOMWindow *parent, const PRUnichar *dialogTitle, const PRUnichar *text, PRUnichar **password, const PRUnichar *checkMsg, PRBool *checkValue, PRBool *_retval) = 0; /** * Puts up a dialog box which has a list box of strings */ /* boolean select (in nsIDOMWindow parent, in wstring dialogTitle, in wstring text, in PRUint32 count, [array, size_is (count)] in wstring selectList, out long outSelection); */ NS_IMETHOD Select(nsIDOMWindow *parent, const PRUnichar *dialogTitle, const PRUnichar *text, PRUint32 count, const PRUnichar **selectList, PRInt32 *outSelection, PRBool *_retval) = 0;};/* Use this macro when declaring classes that implement this interface. */#define NS_DECL_NSIPROMPTSERVICE \ NS_IMETHOD Alert(nsIDOMWindow *parent, const PRUnichar *dialogTitle, const PRUnichar *text); \ NS_IMETHOD AlertCheck(nsIDOMWindow *parent, const PRUnichar *dialogTitle, const PRUnichar *text, const PRUnichar *checkMsg, PRBool *checkValue); \ NS_IMETHOD Confirm(nsIDOMWindow *parent, const PRUnichar *dialogTitle, const PRUnichar *text, PRBool *_retval); \ NS_IMETHOD ConfirmCheck(nsIDOMWindow *parent, const PRUnichar *dialogTitle, const PRUnichar *text, const PRUnichar *checkMsg, PRBool *checkValue, PRBool *_retval); \ NS_IMETHOD ConfirmEx(nsIDOMWindow *parent, const PRUnichar *dialogTitle, const PRUnichar *text, PRUint32 buttonFlags, const PRUnichar *button0Title, const PRUnichar *button1Title, const PRUnichar *button2Title, const PRUnichar *checkMsg, PRBool *checkValue, PRInt32 *_retval); \ NS_IMETHOD Prompt(nsIDOMWindow *parent, const PRUnichar *dialogTitle, const PRUnichar *text, PRUnichar **value, const PRUnichar *checkMsg, PRBool *checkValue, PRBool *_retval); \ NS_IMETHOD PromptUsernameAndPassword(nsIDOMWindow *parent, const PRUnichar *dialogTitle, const PRUnichar *text, PRUnichar **username, PRUnichar **password, const PRUnichar *checkMsg, PRBool *checkValue, PRBool *_retval); \ NS_IMETHOD PromptPassword(nsIDOMWindow *parent, const PRUnichar *dialogTitle, const PRUnichar *text, PRUnichar **password, const PRUnichar *checkMsg, PRBool *checkValue, PRBool *_retval); \ NS_IMETHOD Select(nsIDOMWindow *parent, const PRUnichar *dialogTitle, const PRUnichar *text, PRUint32 count, const PRUnichar **selectList, PRInt32 *outSelection, PRBool *_retval); /* Use this macro to declare functions that forward the behavior of this interface to another object. */#define NS_FORWARD_NSIPROMPTSERVICE(_to) \ NS_IMETHOD Alert(nsIDOMWindow *parent, const PRUnichar *dialogTitle, const PRUnichar *text) { return _to Alert(parent, dialogTitle, text); } \ NS_IMETHOD AlertCheck(nsIDOMWindow *parent, const PRUnichar *dialogTitle, const PRUnichar *text, const PRUnichar *checkMsg, PRBool *checkValue) { return _to AlertCheck(parent, dialogTitle, text, checkMsg, checkValue); } \ NS_IMETHOD Confirm(nsIDOMWindow *parent, const PRUnichar *dialogTitle, const PRUnichar *text, PRBool *_retval) { return _to Confirm(parent, dialogTitle, text, _retval); } \ NS_IMETHOD ConfirmCheck(nsIDOMWindow *parent, const PRUnichar *dialogTitle, const PRUnichar *text, const PRUnichar *checkMsg, PRBool *checkValue, PRBool *_retval) { return _to ConfirmCheck(parent, dialogTitle, text, checkMsg, checkValue, _retval); } \ NS_IMETHOD ConfirmEx(nsIDOMWindow *parent, const PRUnichar *dialogTitle, const PRUnichar *text, PRUint32 buttonFlags, const PRUnichar *button0Title, const PRUnichar *button1Title, const PRUnichar *button2Title, const PRUnichar *checkMsg, PRBool *checkValue, PRInt32 *_retval) { return _to ConfirmEx(parent, dialogTitle, text, buttonFlags, button0Title, button1Title, button2Title, checkMsg, checkValue, _retval); } \ NS_IMETHOD Prompt(nsIDOMWindow *parent, const PRUnichar *dialogTitle, const PRUnichar *text, PRUnichar **value, const PRUnichar *checkMsg, PRBool *checkValue, PRBool *_retval) { return _to Prompt(parent, dialogTitle, text, value, checkMsg, checkValue, _retval); } \ NS_IMETHOD PromptUsernameAndPassword(nsIDOMWindow *parent, const PRUnichar *dialogTitle, const PRUnichar *text, PRUnichar **username, PRUnichar **password, const PRUnichar *checkMsg, PRBool *checkValue, PRBool *_retval) { return _to PromptUsernameAndPassword(parent, dialogTitle, text, username, password, checkMsg, checkValue, _retval); } \ NS_IMETHOD PromptPassword(nsIDOMWindow *parent, const PRUnichar *dialogTitle, const PRUnichar *text, PRUnichar **password, const PRUnichar *checkMsg, PRBool *checkValue, PRBool *_retval) { return _to PromptPassword(parent, dialogTitle, text, password, checkMsg, checkValue, _retval); } \ NS_IMETHOD Select(nsIDOMWindow *parent, const PRUnichar *dialogTitle, const PRUnichar *text, PRUint32 count, const PRUnichar **selectList, PRInt32 *outSelection, PRBool *_retval) { return _to Select(parent, dialogTitle, text, count, selectList, outSelection, _retval); } /* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */#define NS_FORWARD_SAFE_NSIPROMPTSERVICE(_to) \ NS_IMETHOD Alert(nsIDOMWindow *parent, const PRUnichar *dialogTitle, const PRUnichar *text) { return !_to ? NS_ERROR_NULL_POINTER : _to->Alert(parent, dialogTitle, text); } \ NS_IMETHOD AlertCheck(nsIDOMWindow *parent, const PRUnichar *dialogTitle, const PRUnichar *text, const PRUnichar *checkMsg, PRBool *checkValue) { return !_to ? NS_ERROR_NULL_POINTER : _to->AlertCheck(parent, dialogTitle, text, checkMsg, checkValue); } \ NS_IMETHOD Confirm(nsIDOMWindow *parent, const PRUnichar *dialogTitle, const PRUnichar *text, PRBool *_retval) { return !_to ? NS_ERROR_NULL_POINTER : _to->Confirm(parent, dialogTitle, text, _retval); } \ NS_IMETHOD ConfirmCheck(nsIDOMWindow *parent, const PRUnichar *dialogTitle, const PRUnichar *text, const PRUnichar *checkMsg, PRBool *checkValue, PRBool *_retval) { return !_to ? NS_ERROR_NULL_POINTER : _to->ConfirmCheck(parent, dialogTitle, text, checkMsg, checkValue, _retval); } \ NS_IMETHOD ConfirmEx(nsIDOMWindow *parent, const PRUnichar *dialogTitle, const PRUnichar *text, PRUint32 buttonFlags, const PRUnichar *button0Title, const PRUnichar *button1Title, const PRUnichar *button2Title, const PRUnichar *checkMsg, PRBool *checkValue, PRInt32 *_retval) { return !_to ? NS_ERROR_NULL_POINTER : _to->ConfirmEx(parent, dialogTitle, text, buttonFlags, button0Title, button1Title, button2Title, checkMsg, checkValue, _retval); } \ NS_IMETHOD Prompt(nsIDOMWindow *parent, const PRUnichar *dialogTitle, const PRUnichar *text, PRUnichar **value, const PRUnichar *checkMsg, PRBool *checkValue, PRBool *_retval) { return !_to ? NS_ERROR_NULL_POINTER : _to->Prompt(parent, dialogTitle, text, value, checkMsg, checkValue, _retval); } \ NS_IMETHOD PromptUsernameAndPassword(nsIDOMWindow *parent, const PRUnichar *dialogTitle, const PRUnichar *text, PRUnichar **username, PRUnichar **password, const PRUnichar *checkMsg, PRBool *checkValue, PRBool *_retval) { return !_to ? NS_ERROR_NULL_POINTER : _to->PromptUsernameAndPassword(parent, dialogTitle, text, username, password, checkMsg, checkValue, _retval); } \ NS_IMETHOD PromptPassword(nsIDOMWindow *parent, const PRUnichar *dialogTitle, const PRUnichar *text, PRUnichar **password, const PRUnichar *checkMsg, PRBool *checkValue, PRBool *_retval) { return !_to ? NS_ERROR_NULL_POINTER : _to->PromptPassword(parent, dialogTitle, text, password, checkMsg, checkValue, _retval); } \ NS_IMETHOD Select(nsIDOMWindow *parent, const PRUnichar *dialogTitle, const PRUnichar *text, PRUint32 count, const PRUnichar **selectList, PRInt32 *outSelection, PRBool *_retval) { return !_to ? NS_ERROR_NULL_POINTER : _to->Select(parent, dialogTitle, text, count, selectList, outSelection, _retval); } #if 0/* Use the code below as a template for the implementation class for this interface. *//* Header file */class nsPromptService : public nsIPromptService{public: NS_DECL_ISUPPORTS NS_DECL_NSIPROMPTSERVICE nsPromptService(); virtual ~nsPromptService(); /* additional members */};/* Implementation file */NS_IMPL_ISUPPORTS1(nsPromptService, nsIPromptService)nsPromptService::nsPromptService(){ /* member initializers and constructor code */}nsPromptService::~nsPromptService(){ /* destructor code */}/* void alert (in nsIDOMWindow parent, in wstring dialogTitle, in wstring text); */NS_IMETHODIMP nsPromptService::Alert(nsIDOMWindow *parent, const PRUnichar *dialogTitle, const PRUnichar *text){ return NS_ERROR_NOT_IMPLEMENTED;}/* void alertCheck (in nsIDOMWindow parent, in wstring dialogTitle, in wstring text, in wstring checkMsg, inout boolean checkValue); */NS_IMETHODIMP nsPromptService::AlertCheck(nsIDOMWindow *parent, const PRUnichar *dialogTitle, const PRUnichar *text, const PRUnichar *checkMsg, PRBool *checkValue){ return NS_ERROR_NOT_IMPLEMENTED;}/* boolean confirm (in nsIDOMWindow parent, in wstring dialogTitle, in wstring text); */NS_IMETHODIMP nsPromptService::Confirm(nsIDOMWindow *parent, const PRUnichar *dialogTitle, const PRUnichar *text, PRBool *_retval){ return NS_ERROR_NOT_IMPLEMENTED;}/* boolean confirmCheck (in nsIDOMWindow parent, in wstring dialogTitle, in wstring text, in wstring checkMsg, inout boolean checkValue); */NS_IMETHODIMP nsPromptService::ConfirmCheck(nsIDOMWindow *parent, const PRUnichar *dialogTitle, const PRUnichar *text, const PRUnichar *checkMsg, PRBool *checkValue, PRBool *_retval){ return NS_ERROR_NOT_IMPLEMENTED;}/* PRInt32 confirmEx (in nsIDOMWindow parent, in wstring dialogTitle, in wstring text, in unsigned long buttonFlags, in wstring button0Title, in wstring button1Title, in wstring button2Title, in wstring checkMsg, inout boolean checkValue); */NS_IMETHODIMP nsPromptService::ConfirmEx(nsIDOMWindow *parent, const PRUnichar *dialogTitle, const PRUnichar *text, PRUint32 buttonFlags, const PRUnichar *button0Title, const PRUnichar *button1Title, const PRUnichar *button2Title, const PRUnichar *checkMsg, PRBool *checkValue, PRInt32 *_retval){ return NS_ERROR_NOT_IMPLEMENTED;}/* boolean prompt (in nsIDOMWindow parent, in wstring dialogTitle, in wstring text, inout wstring value, in wstring checkMsg, inout boolean checkValue); */NS_IMETHODIMP nsPromptService::Prompt(nsIDOMWindow *parent, const PRUnichar *dialogTitle, const PRUnichar *text, PRUnichar **value, const PRUnichar *checkMsg, PRBool *checkValue, PRBool *_retval){ return NS_ERROR_NOT_IMPLEMENTED;}/* boolean promptUsernameAndPassword (in nsIDOMWindow parent, in wstring dialogTitle, in wstring text, inout wstring username, inout wstring password, in wstring checkMsg, inout boolean checkValue); */NS_IMETHODIMP nsPromptService::PromptUsernameAndPassword(nsIDOMWindow *parent, const PRUnichar *dialogTitle, const PRUnichar *text, PRUnichar **username, PRUnichar **password, const PRUnichar *checkMsg, PRBool *checkValue, PRBool *_retval){ return NS_ERROR_NOT_IMPLEMENTED;}/* boolean promptPassword (in nsIDOMWindow parent, in wstring dialogTitle, in wstring text, inout wstring password, in wstring checkMsg, inout boolean checkValue); */NS_IMETHODIMP nsPromptService::PromptPassword(nsIDOMWindow *parent, const PRUnichar *dialogTitle, const PRUnichar *text, PRUnichar **password, const PRUnichar *checkMsg, PRBool *checkValue, PRBool *_retval){ return NS_ERROR_NOT_IMPLEMENTED;}/* boolean select (in nsIDOMWindow parent, in wstring dialogTitle, in wstring text, in PRUint32 count, [array, size_is (count)] in wstring selectList, out long outSelection); */NS_IMETHODIMP nsPromptService::Select(nsIDOMWindow *parent, const PRUnichar *dialogTitle, const PRUnichar *text, PRUint32 count, const PRUnichar **selectList, PRInt32 *outSelection, PRBool *_retval){ return NS_ERROR_NOT_IMPLEMENTED;}/* End of implementation class template. */#endif// {1630C61A-325E-49ca-8759-A31B16C47AA5}#define NS_PROMPTSERVICE_IID \ {0x1630C61A, 0x325E, 0x49ca, {0x87, 0x59, 0xA3, 0x1B, 0x16, 0xC4, 0x7A, 0xA5}}#endif /* __gen_nsIPromptService_h__ */
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -