PageRenderTime 61ms CodeModel.GetById 22ms RepoModel.GetById 1ms app.codeStats 0ms

/gecko_api/include/nsIPromptService.h

http://firefox-mac-pdf.googlecode.com/
C Header | 473 lines | 130 code | 60 blank | 283 comment | 0 complexity | 9f32cc9df13ff75c4432730dc7043d5b MD5 | raw file
  1. /*
  2. * DO NOT EDIT. THIS FILE IS GENERATED FROM /builds/tinderbox/XR-Trunk/Darwin_8.8.4_Depend/mozilla/embedding/components/windowwatcher/public/nsIPromptService.idl
  3. */
  4. #ifndef __gen_nsIPromptService_h__
  5. #define __gen_nsIPromptService_h__
  6. #ifndef __gen_nsISupports_h__
  7. #include "nsISupports.h"
  8. #endif
  9. /* For IDL files that don't want to include root IDL files. */
  10. #ifndef NS_NO_VTABLE
  11. #define NS_NO_VTABLE
  12. #endif
  13. class nsIDOMWindow; /* forward declaration */
  14. /* starting interface: nsIPromptService */
  15. #define NS_IPROMPTSERVICE_IID_STR "1630c61a-325e-49ca-8759-a31b16c47aa5"
  16. #define NS_IPROMPTSERVICE_IID \
  17. {0x1630c61a, 0x325e, 0x49ca, \
  18. { 0x87, 0x59, 0xa3, 0x1b, 0x16, 0xc4, 0x7a, 0xa5 }}
  19. /**
  20. * This is the interface to the embeddable prompt service; the service that
  21. * implements nsIPrompt. Its interface is designed to be just nsIPrompt, each
  22. * method modified to take a parent window parameter.
  23. *
  24. * Accesskeys can be attached to buttons and checkboxes by inserting an &
  25. * before the accesskey character in the checkbox message or button title. For
  26. * a real &, use && instead. (A "button title" generally refers to the text
  27. * label of a button.)
  28. *
  29. * One note: in all cases, the parent window parameter can be null. However,
  30. * these windows are all intended to have parents. So when no parent is
  31. * specified, the implementation should try hard to find a suitable foster
  32. * parent.
  33. *
  34. * Implementations are free to choose how they present the various button
  35. * types. For example, while prompts that give the user a choice between OK
  36. * and Cancel are required to return a boolean value indicating whether or not
  37. * the user accepted the prompt (pressed OK) or rejected the prompt (pressed
  38. * Cancel), the implementation of this interface could very well speak the
  39. * prompt to the user instead of rendering any visual user-interface. The
  40. * standard button types are merely idioms used to convey the nature of the
  41. * choice the user is to make.
  42. *
  43. * Because implementations of this interface may loosely interpret the various
  44. * button types, it is advised that text messages passed to these prompts do
  45. * not refer to the button types by name. For example, it is inadvisable to
  46. * tell the user to "Press OK to proceed." Instead, such a prompt might be
  47. * rewritten to ask the user: "Would you like to proceed?"
  48. *
  49. * @status FROZEN
  50. */
  51. class NS_NO_VTABLE NS_SCRIPTABLE nsIPromptService : public nsISupports {
  52. public:
  53. NS_DECLARE_STATIC_IID_ACCESSOR(NS_IPROMPTSERVICE_IID)
  54. /**
  55. * Puts up an alert dialog with an OK button.
  56. *
  57. * @param aParent
  58. * The parent window or null.
  59. * @param aDialogTitle
  60. * Text to appear in the title of the dialog.
  61. * @param aText
  62. * Text to appear in the body of the dialog.
  63. */
  64. /* void alert (in nsIDOMWindow aParent, in wstring aDialogTitle, in wstring aText); */
  65. NS_SCRIPTABLE NS_IMETHOD Alert(nsIDOMWindow *aParent, const PRUnichar *aDialogTitle, const PRUnichar *aText) = 0;
  66. /**
  67. * Puts up an alert dialog with an OK button and a labeled checkbox.
  68. *
  69. * @param aParent
  70. * The parent window or null.
  71. * @param aDialogTitle
  72. * Text to appear in the title of the dialog.
  73. * @param aText
  74. * Text to appear in the body of the dialog.
  75. * @param aCheckMsg
  76. * Text to appear with the checkbox.
  77. * @param aCheckState
  78. * Contains the initial checked state of the checkbox when this method
  79. * is called and the final checked state after this method returns.
  80. */
  81. /* void alertCheck (in nsIDOMWindow aParent, in wstring aDialogTitle, in wstring aText, in wstring aCheckMsg, inout boolean aCheckState); */
  82. NS_SCRIPTABLE NS_IMETHOD AlertCheck(nsIDOMWindow *aParent, const PRUnichar *aDialogTitle, const PRUnichar *aText, const PRUnichar *aCheckMsg, PRBool *aCheckState) = 0;
  83. /**
  84. * Puts up a dialog with OK and Cancel buttons.
  85. *
  86. * @param aParent
  87. * The parent window or null.
  88. * @param aDialogTitle
  89. * Text to appear in the title of the dialog.
  90. * @param aText
  91. * Text to appear in the body of the dialog.
  92. *
  93. * @return true for OK, false for Cancel
  94. */
  95. /* boolean confirm (in nsIDOMWindow aParent, in wstring aDialogTitle, in wstring aText); */
  96. NS_SCRIPTABLE NS_IMETHOD Confirm(nsIDOMWindow *aParent, const PRUnichar *aDialogTitle, const PRUnichar *aText, PRBool *_retval) = 0;
  97. /**
  98. * Puts up a dialog with OK and Cancel buttons and a labeled checkbox.
  99. *
  100. * @param aParent
  101. * The parent window or null.
  102. * @param aDialogTitle
  103. * Text to appear in the title of the dialog.
  104. * @param aText
  105. * Text to appear in the body of the dialog.
  106. * @param aCheckMsg
  107. * Text to appear with the checkbox.
  108. * @param aCheckState
  109. * Contains the initial checked state of the checkbox when this method
  110. * is called and the final checked state after this method returns.
  111. *
  112. * @return true for OK, false for Cancel
  113. */
  114. /* boolean confirmCheck (in nsIDOMWindow aParent, in wstring aDialogTitle, in wstring aText, in wstring aCheckMsg, inout boolean aCheckState); */
  115. NS_SCRIPTABLE NS_IMETHOD ConfirmCheck(nsIDOMWindow *aParent, const PRUnichar *aDialogTitle, const PRUnichar *aText, const PRUnichar *aCheckMsg, PRBool *aCheckState, PRBool *_retval) = 0;
  116. /**
  117. * Button Flags
  118. *
  119. * The following flags are combined to form the aButtonFlags parameter passed
  120. * to confirmEx. See confirmEx for more information on how the flags may be
  121. * combined.
  122. */
  123. /**
  124. * Button Position Flags
  125. */
  126. enum { BUTTON_POS_0 = 1U };
  127. enum { BUTTON_POS_1 = 256U };
  128. enum { BUTTON_POS_2 = 65536U };
  129. /**
  130. * Button Title Flags (used to set the labels of buttons in the prompt)
  131. */
  132. enum { BUTTON_TITLE_OK = 1U };
  133. enum { BUTTON_TITLE_CANCEL = 2U };
  134. enum { BUTTON_TITLE_YES = 3U };
  135. enum { BUTTON_TITLE_NO = 4U };
  136. enum { BUTTON_TITLE_SAVE = 5U };
  137. enum { BUTTON_TITLE_DONT_SAVE = 6U };
  138. enum { BUTTON_TITLE_REVERT = 7U };
  139. enum { BUTTON_TITLE_IS_STRING = 127U };
  140. /**
  141. * Button Default Flags (used to select which button is the default one)
  142. */
  143. enum { BUTTON_POS_0_DEFAULT = 0U };
  144. enum { BUTTON_POS_1_DEFAULT = 16777216U };
  145. enum { BUTTON_POS_2_DEFAULT = 33554432U };
  146. /**
  147. * Causes the buttons to be initially disabled. They are enabled after a
  148. * timeout expires. The implementation may interpret this loosely as the
  149. * intent is to ensure that the user does not click through a security dialog
  150. * too quickly. Strictly speaking, the implementation could choose to ignore
  151. * this flag.
  152. */
  153. enum { BUTTON_DELAY_ENABLE = 67108864U };
  154. /**
  155. * Selects the standard set of OK/Cancel buttons.
  156. */
  157. enum { STD_OK_CANCEL_BUTTONS = 513U };
  158. /**
  159. * Selects the standard set of Yes/No buttons.
  160. */
  161. enum { STD_YES_NO_BUTTONS = 1027U };
  162. /**
  163. * Puts up a dialog with up to 3 buttons and an optional, labeled checkbox.
  164. *
  165. * @param aParent
  166. * The parent window or null.
  167. * @param aDialogTitle
  168. * Text to appear in the title of the dialog.
  169. * @param aText
  170. * Text to appear in the body of the dialog.
  171. * @param aButtonFlags
  172. * A combination of Button Flags.
  173. * @param aButton0Title
  174. * Used when button 0 uses TITLE_IS_STRING
  175. * @param aButton1Title
  176. * Used when button 1 uses TITLE_IS_STRING
  177. * @param aButton2Title
  178. * Used when button 2 uses TITLE_IS_STRING
  179. * @param aCheckMsg
  180. * Text to appear with the checkbox. Null if no checkbox.
  181. * @param aCheckState
  182. * Contains the initial checked state of the checkbox when this method
  183. * is called and the final checked state after this method returns.
  184. *
  185. * @return index of the button pressed.
  186. *
  187. * Buttons are numbered 0 - 2. The implementation can decide whether the
  188. * sequence goes from right to left or left to right. Button 0 is the
  189. * default button unless one of the Button Default Flags is specified.
  190. *
  191. * A button may use a predefined title, specified by one of the Button Title
  192. * Flags values. Each title value can be multiplied by a position value to
  193. * assign the title to a particular button. If BUTTON_TITLE_IS_STRING is
  194. * used for a button, the string parameter for that button will be used. If
  195. * the value for a button position is zero, the button will not be shown.
  196. *
  197. * In general, aButtonFlags is constructed per the following example:
  198. *
  199. * aButtonFlags = (BUTTON_POS_0) * (BUTTON_TITLE_AAA) +
  200. * (BUTTON_POS_1) * (BUTTON_TITLE_BBB) +
  201. * BUTTON_POS_1_DEFAULT;
  202. *
  203. * where "AAA" and "BBB" correspond to one of the button titles.
  204. */
  205. /* PRInt32 confirmEx (in nsIDOMWindow aParent, in wstring aDialogTitle, in wstring aText, in unsigned long aButtonFlags, in wstring aButton0Title, in wstring aButton1Title, in wstring aButton2Title, in wstring aCheckMsg, inout boolean aCheckState); */
  206. NS_SCRIPTABLE NS_IMETHOD ConfirmEx(nsIDOMWindow *aParent, const PRUnichar *aDialogTitle, const PRUnichar *aText, PRUint32 aButtonFlags, const PRUnichar *aButton0Title, const PRUnichar *aButton1Title, const PRUnichar *aButton2Title, const PRUnichar *aCheckMsg, PRBool *aCheckState, PRInt32 *_retval) = 0;
  207. /**
  208. * Puts up a dialog with an edit field and an optional, labeled checkbox.
  209. *
  210. * @param aParent
  211. * The parent window or null.
  212. * @param aDialogTitle
  213. * Text to appear in the title of the dialog.
  214. * @param aText
  215. * Text to appear in the body of the dialog.
  216. * @param aValue
  217. * Contains the default value for the dialog field when this method
  218. * is called (null value is ok). Upon return, if the user pressed
  219. * OK, then this parameter contains a newly allocated string value.
  220. * Otherwise, the parameter's value is unmodified.
  221. * @param aCheckMsg
  222. * Text to appear with the checkbox. If null, check box will not be shown.
  223. * @param aCheckState
  224. * Contains the initial checked state of the checkbox when this method
  225. * is called and the final checked state after this method returns.
  226. *
  227. * @return true for OK, false for Cancel.
  228. */
  229. /* boolean prompt (in nsIDOMWindow aParent, in wstring aDialogTitle, in wstring aText, inout wstring aValue, in wstring aCheckMsg, inout boolean aCheckState); */
  230. NS_SCRIPTABLE NS_IMETHOD Prompt(nsIDOMWindow *aParent, const PRUnichar *aDialogTitle, const PRUnichar *aText, PRUnichar **aValue, const PRUnichar *aCheckMsg, PRBool *aCheckState, PRBool *_retval) = 0;
  231. /**
  232. * Puts up a dialog with an edit field, a password field, and an optional,
  233. * labeled checkbox.
  234. *
  235. * @param aParent
  236. * The parent window or null.
  237. * @param aDialogTitle
  238. * Text to appear in the title of the dialog.
  239. * @param aText
  240. * Text to appear in the body of the dialog.
  241. * @param aUsername
  242. * Contains the default value for the username field when this method
  243. * is called (null value is ok). Upon return, if the user pressed OK,
  244. * then this parameter contains a newly allocated string value.
  245. * Otherwise, the parameter's value is unmodified.
  246. * @param aPassword
  247. * Contains the default value for the password field when this method
  248. * is called (null value is ok). Upon return, if the user pressed OK,
  249. * then this parameter contains a newly allocated string value.
  250. * Otherwise, the parameter's value is unmodified.
  251. * @param aCheckMsg
  252. * Text to appear with the checkbox. If null, check box will not be shown.
  253. * @param aCheckState
  254. * Contains the initial checked state of the checkbox when this method
  255. * is called and the final checked state after this method returns.
  256. *
  257. * @return true for OK, false for Cancel.
  258. */
  259. /* boolean promptUsernameAndPassword (in nsIDOMWindow aParent, in wstring aDialogTitle, in wstring aText, inout wstring aUsername, inout wstring aPassword, in wstring aCheckMsg, inout boolean aCheckState); */
  260. NS_SCRIPTABLE NS_IMETHOD PromptUsernameAndPassword(nsIDOMWindow *aParent, const PRUnichar *aDialogTitle, const PRUnichar *aText, PRUnichar **aUsername, PRUnichar **aPassword, const PRUnichar *aCheckMsg, PRBool *aCheckState, PRBool *_retval) = 0;
  261. /**
  262. * Puts up a dialog with a password field and an optional, labeled checkbox.
  263. *
  264. * @param aParent
  265. * The parent window or null.
  266. * @param aDialogTitle
  267. * Text to appear in the title of the dialog.
  268. * @param aText
  269. * Text to appear in the body of the dialog.
  270. * @param aPassword
  271. * Contains the default value for the password field when this method
  272. * is called (null value is ok). Upon return, if the user pressed OK,
  273. * then this parameter contains a newly allocated string value.
  274. * Otherwise, the parameter's value is unmodified.
  275. * @param aCheckMsg
  276. * Text to appear with the checkbox. If null, check box will not be shown.
  277. * @param aCheckState
  278. * Contains the initial checked state of the checkbox when this method
  279. * is called and the final checked state after this method returns.
  280. *
  281. * @return true for OK, false for Cancel.
  282. */
  283. /* boolean promptPassword (in nsIDOMWindow aParent, in wstring aDialogTitle, in wstring aText, inout wstring aPassword, in wstring aCheckMsg, inout boolean aCheckState); */
  284. NS_SCRIPTABLE NS_IMETHOD PromptPassword(nsIDOMWindow *aParent, const PRUnichar *aDialogTitle, const PRUnichar *aText, PRUnichar **aPassword, const PRUnichar *aCheckMsg, PRBool *aCheckState, PRBool *_retval) = 0;
  285. /**
  286. * Puts up a dialog box which has a list box of strings from which the user
  287. * may make a single selection.
  288. *
  289. * @param aParent
  290. * The parent window or null.
  291. * @param aDialogTitle
  292. * Text to appear in the title of the dialog.
  293. * @param aText
  294. * Text to appear in the body of the dialog.
  295. * @param aCount
  296. * The length of the aSelectList array parameter.
  297. * @param aSelectList
  298. * The list of strings to display.
  299. * @param aOutSelection
  300. * Contains the index of the selected item in the list when this
  301. * method returns true.
  302. *
  303. * @return true for OK, false for Cancel.
  304. */
  305. /* boolean select (in nsIDOMWindow aParent, in wstring aDialogTitle, in wstring aText, in PRUint32 aCount, [array, size_is (aCount)] in wstring aSelectList, out long aOutSelection); */
  306. NS_SCRIPTABLE NS_IMETHOD Select(nsIDOMWindow *aParent, const PRUnichar *aDialogTitle, const PRUnichar *aText, PRUint32 aCount, const PRUnichar **aSelectList, PRInt32 *aOutSelection, PRBool *_retval) = 0;
  307. };
  308. NS_DEFINE_STATIC_IID_ACCESSOR(nsIPromptService, NS_IPROMPTSERVICE_IID)
  309. /* Use this macro when declaring classes that implement this interface. */
  310. #define NS_DECL_NSIPROMPTSERVICE \
  311. NS_SCRIPTABLE NS_IMETHOD Alert(nsIDOMWindow *aParent, const PRUnichar *aDialogTitle, const PRUnichar *aText); \
  312. NS_SCRIPTABLE NS_IMETHOD AlertCheck(nsIDOMWindow *aParent, const PRUnichar *aDialogTitle, const PRUnichar *aText, const PRUnichar *aCheckMsg, PRBool *aCheckState); \
  313. NS_SCRIPTABLE NS_IMETHOD Confirm(nsIDOMWindow *aParent, const PRUnichar *aDialogTitle, const PRUnichar *aText, PRBool *_retval); \
  314. NS_SCRIPTABLE NS_IMETHOD ConfirmCheck(nsIDOMWindow *aParent, const PRUnichar *aDialogTitle, const PRUnichar *aText, const PRUnichar *aCheckMsg, PRBool *aCheckState, PRBool *_retval); \
  315. NS_SCRIPTABLE NS_IMETHOD ConfirmEx(nsIDOMWindow *aParent, const PRUnichar *aDialogTitle, const PRUnichar *aText, PRUint32 aButtonFlags, const PRUnichar *aButton0Title, const PRUnichar *aButton1Title, const PRUnichar *aButton2Title, const PRUnichar *aCheckMsg, PRBool *aCheckState, PRInt32 *_retval); \
  316. NS_SCRIPTABLE NS_IMETHOD Prompt(nsIDOMWindow *aParent, const PRUnichar *aDialogTitle, const PRUnichar *aText, PRUnichar **aValue, const PRUnichar *aCheckMsg, PRBool *aCheckState, PRBool *_retval); \
  317. NS_SCRIPTABLE NS_IMETHOD PromptUsernameAndPassword(nsIDOMWindow *aParent, const PRUnichar *aDialogTitle, const PRUnichar *aText, PRUnichar **aUsername, PRUnichar **aPassword, const PRUnichar *aCheckMsg, PRBool *aCheckState, PRBool *_retval); \
  318. NS_SCRIPTABLE NS_IMETHOD PromptPassword(nsIDOMWindow *aParent, const PRUnichar *aDialogTitle, const PRUnichar *aText, PRUnichar **aPassword, const PRUnichar *aCheckMsg, PRBool *aCheckState, PRBool *_retval); \
  319. NS_SCRIPTABLE NS_IMETHOD Select(nsIDOMWindow *aParent, const PRUnichar *aDialogTitle, const PRUnichar *aText, PRUint32 aCount, const PRUnichar **aSelectList, PRInt32 *aOutSelection, PRBool *_retval);
  320. /* Use this macro to declare functions that forward the behavior of this interface to another object. */
  321. #define NS_FORWARD_NSIPROMPTSERVICE(_to) \
  322. NS_SCRIPTABLE NS_IMETHOD Alert(nsIDOMWindow *aParent, const PRUnichar *aDialogTitle, const PRUnichar *aText) { return _to Alert(aParent, aDialogTitle, aText); } \
  323. NS_SCRIPTABLE NS_IMETHOD AlertCheck(nsIDOMWindow *aParent, const PRUnichar *aDialogTitle, const PRUnichar *aText, const PRUnichar *aCheckMsg, PRBool *aCheckState) { return _to AlertCheck(aParent, aDialogTitle, aText, aCheckMsg, aCheckState); } \
  324. NS_SCRIPTABLE NS_IMETHOD Confirm(nsIDOMWindow *aParent, const PRUnichar *aDialogTitle, const PRUnichar *aText, PRBool *_retval) { return _to Confirm(aParent, aDialogTitle, aText, _retval); } \
  325. NS_SCRIPTABLE NS_IMETHOD ConfirmCheck(nsIDOMWindow *aParent, const PRUnichar *aDialogTitle, const PRUnichar *aText, const PRUnichar *aCheckMsg, PRBool *aCheckState, PRBool *_retval) { return _to ConfirmCheck(aParent, aDialogTitle, aText, aCheckMsg, aCheckState, _retval); } \
  326. NS_SCRIPTABLE NS_IMETHOD ConfirmEx(nsIDOMWindow *aParent, const PRUnichar *aDialogTitle, const PRUnichar *aText, PRUint32 aButtonFlags, const PRUnichar *aButton0Title, const PRUnichar *aButton1Title, const PRUnichar *aButton2Title, const PRUnichar *aCheckMsg, PRBool *aCheckState, PRInt32 *_retval) { return _to ConfirmEx(aParent, aDialogTitle, aText, aButtonFlags, aButton0Title, aButton1Title, aButton2Title, aCheckMsg, aCheckState, _retval); } \
  327. NS_SCRIPTABLE NS_IMETHOD Prompt(nsIDOMWindow *aParent, const PRUnichar *aDialogTitle, const PRUnichar *aText, PRUnichar **aValue, const PRUnichar *aCheckMsg, PRBool *aCheckState, PRBool *_retval) { return _to Prompt(aParent, aDialogTitle, aText, aValue, aCheckMsg, aCheckState, _retval); } \
  328. NS_SCRIPTABLE NS_IMETHOD PromptUsernameAndPassword(nsIDOMWindow *aParent, const PRUnichar *aDialogTitle, const PRUnichar *aText, PRUnichar **aUsername, PRUnichar **aPassword, const PRUnichar *aCheckMsg, PRBool *aCheckState, PRBool *_retval) { return _to PromptUsernameAndPassword(aParent, aDialogTitle, aText, aUsername, aPassword, aCheckMsg, aCheckState, _retval); } \
  329. NS_SCRIPTABLE NS_IMETHOD PromptPassword(nsIDOMWindow *aParent, const PRUnichar *aDialogTitle, const PRUnichar *aText, PRUnichar **aPassword, const PRUnichar *aCheckMsg, PRBool *aCheckState, PRBool *_retval) { return _to PromptPassword(aParent, aDialogTitle, aText, aPassword, aCheckMsg, aCheckState, _retval); } \
  330. NS_SCRIPTABLE NS_IMETHOD Select(nsIDOMWindow *aParent, const PRUnichar *aDialogTitle, const PRUnichar *aText, PRUint32 aCount, const PRUnichar **aSelectList, PRInt32 *aOutSelection, PRBool *_retval) { return _to Select(aParent, aDialogTitle, aText, aCount, aSelectList, aOutSelection, _retval); }
  331. /* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */
  332. #define NS_FORWARD_SAFE_NSIPROMPTSERVICE(_to) \
  333. NS_SCRIPTABLE NS_IMETHOD Alert(nsIDOMWindow *aParent, const PRUnichar *aDialogTitle, const PRUnichar *aText) { return !_to ? NS_ERROR_NULL_POINTER : _to->Alert(aParent, aDialogTitle, aText); } \
  334. NS_SCRIPTABLE NS_IMETHOD AlertCheck(nsIDOMWindow *aParent, const PRUnichar *aDialogTitle, const PRUnichar *aText, const PRUnichar *aCheckMsg, PRBool *aCheckState) { return !_to ? NS_ERROR_NULL_POINTER : _to->AlertCheck(aParent, aDialogTitle, aText, aCheckMsg, aCheckState); } \
  335. NS_SCRIPTABLE NS_IMETHOD Confirm(nsIDOMWindow *aParent, const PRUnichar *aDialogTitle, const PRUnichar *aText, PRBool *_retval) { return !_to ? NS_ERROR_NULL_POINTER : _to->Confirm(aParent, aDialogTitle, aText, _retval); } \
  336. NS_SCRIPTABLE NS_IMETHOD ConfirmCheck(nsIDOMWindow *aParent, const PRUnichar *aDialogTitle, const PRUnichar *aText, const PRUnichar *aCheckMsg, PRBool *aCheckState, PRBool *_retval) { return !_to ? NS_ERROR_NULL_POINTER : _to->ConfirmCheck(aParent, aDialogTitle, aText, aCheckMsg, aCheckState, _retval); } \
  337. NS_SCRIPTABLE NS_IMETHOD ConfirmEx(nsIDOMWindow *aParent, const PRUnichar *aDialogTitle, const PRUnichar *aText, PRUint32 aButtonFlags, const PRUnichar *aButton0Title, const PRUnichar *aButton1Title, const PRUnichar *aButton2Title, const PRUnichar *aCheckMsg, PRBool *aCheckState, PRInt32 *_retval) { return !_to ? NS_ERROR_NULL_POINTER : _to->ConfirmEx(aParent, aDialogTitle, aText, aButtonFlags, aButton0Title, aButton1Title, aButton2Title, aCheckMsg, aCheckState, _retval); } \
  338. NS_SCRIPTABLE NS_IMETHOD Prompt(nsIDOMWindow *aParent, const PRUnichar *aDialogTitle, const PRUnichar *aText, PRUnichar **aValue, const PRUnichar *aCheckMsg, PRBool *aCheckState, PRBool *_retval) { return !_to ? NS_ERROR_NULL_POINTER : _to->Prompt(aParent, aDialogTitle, aText, aValue, aCheckMsg, aCheckState, _retval); } \
  339. NS_SCRIPTABLE NS_IMETHOD PromptUsernameAndPassword(nsIDOMWindow *aParent, const PRUnichar *aDialogTitle, const PRUnichar *aText, PRUnichar **aUsername, PRUnichar **aPassword, const PRUnichar *aCheckMsg, PRBool *aCheckState, PRBool *_retval) { return !_to ? NS_ERROR_NULL_POINTER : _to->PromptUsernameAndPassword(aParent, aDialogTitle, aText, aUsername, aPassword, aCheckMsg, aCheckState, _retval); } \
  340. NS_SCRIPTABLE NS_IMETHOD PromptPassword(nsIDOMWindow *aParent, const PRUnichar *aDialogTitle, const PRUnichar *aText, PRUnichar **aPassword, const PRUnichar *aCheckMsg, PRBool *aCheckState, PRBool *_retval) { return !_to ? NS_ERROR_NULL_POINTER : _to->PromptPassword(aParent, aDialogTitle, aText, aPassword, aCheckMsg, aCheckState, _retval); } \
  341. NS_SCRIPTABLE NS_IMETHOD Select(nsIDOMWindow *aParent, const PRUnichar *aDialogTitle, const PRUnichar *aText, PRUint32 aCount, const PRUnichar **aSelectList, PRInt32 *aOutSelection, PRBool *_retval) { return !_to ? NS_ERROR_NULL_POINTER : _to->Select(aParent, aDialogTitle, aText, aCount, aSelectList, aOutSelection, _retval); }
  342. #if 0
  343. /* Use the code below as a template for the implementation class for this interface. */
  344. /* Header file */
  345. class nsPromptService : public nsIPromptService
  346. {
  347. public:
  348. NS_DECL_ISUPPORTS
  349. NS_DECL_NSIPROMPTSERVICE
  350. nsPromptService();
  351. private:
  352. ~nsPromptService();
  353. protected:
  354. /* additional members */
  355. };
  356. /* Implementation file */
  357. NS_IMPL_ISUPPORTS1(nsPromptService, nsIPromptService)
  358. nsPromptService::nsPromptService()
  359. {
  360. /* member initializers and constructor code */
  361. }
  362. nsPromptService::~nsPromptService()
  363. {
  364. /* destructor code */
  365. }
  366. /* void alert (in nsIDOMWindow aParent, in wstring aDialogTitle, in wstring aText); */
  367. NS_IMETHODIMP nsPromptService::Alert(nsIDOMWindow *aParent, const PRUnichar *aDialogTitle, const PRUnichar *aText)
  368. {
  369. return NS_ERROR_NOT_IMPLEMENTED;
  370. }
  371. /* void alertCheck (in nsIDOMWindow aParent, in wstring aDialogTitle, in wstring aText, in wstring aCheckMsg, inout boolean aCheckState); */
  372. NS_IMETHODIMP nsPromptService::AlertCheck(nsIDOMWindow *aParent, const PRUnichar *aDialogTitle, const PRUnichar *aText, const PRUnichar *aCheckMsg, PRBool *aCheckState)
  373. {
  374. return NS_ERROR_NOT_IMPLEMENTED;
  375. }
  376. /* boolean confirm (in nsIDOMWindow aParent, in wstring aDialogTitle, in wstring aText); */
  377. NS_IMETHODIMP nsPromptService::Confirm(nsIDOMWindow *aParent, const PRUnichar *aDialogTitle, const PRUnichar *aText, PRBool *_retval)
  378. {
  379. return NS_ERROR_NOT_IMPLEMENTED;
  380. }
  381. /* boolean confirmCheck (in nsIDOMWindow aParent, in wstring aDialogTitle, in wstring aText, in wstring aCheckMsg, inout boolean aCheckState); */
  382. NS_IMETHODIMP nsPromptService::ConfirmCheck(nsIDOMWindow *aParent, const PRUnichar *aDialogTitle, const PRUnichar *aText, const PRUnichar *aCheckMsg, PRBool *aCheckState, PRBool *_retval)
  383. {
  384. return NS_ERROR_NOT_IMPLEMENTED;
  385. }
  386. /* PRInt32 confirmEx (in nsIDOMWindow aParent, in wstring aDialogTitle, in wstring aText, in unsigned long aButtonFlags, in wstring aButton0Title, in wstring aButton1Title, in wstring aButton2Title, in wstring aCheckMsg, inout boolean aCheckState); */
  387. NS_IMETHODIMP nsPromptService::ConfirmEx(nsIDOMWindow *aParent, const PRUnichar *aDialogTitle, const PRUnichar *aText, PRUint32 aButtonFlags, const PRUnichar *aButton0Title, const PRUnichar *aButton1Title, const PRUnichar *aButton2Title, const PRUnichar *aCheckMsg, PRBool *aCheckState, PRInt32 *_retval)
  388. {
  389. return NS_ERROR_NOT_IMPLEMENTED;
  390. }
  391. /* boolean prompt (in nsIDOMWindow aParent, in wstring aDialogTitle, in wstring aText, inout wstring aValue, in wstring aCheckMsg, inout boolean aCheckState); */
  392. NS_IMETHODIMP nsPromptService::Prompt(nsIDOMWindow *aParent, const PRUnichar *aDialogTitle, const PRUnichar *aText, PRUnichar **aValue, const PRUnichar *aCheckMsg, PRBool *aCheckState, PRBool *_retval)
  393. {
  394. return NS_ERROR_NOT_IMPLEMENTED;
  395. }
  396. /* boolean promptUsernameAndPassword (in nsIDOMWindow aParent, in wstring aDialogTitle, in wstring aText, inout wstring aUsername, inout wstring aPassword, in wstring aCheckMsg, inout boolean aCheckState); */
  397. NS_IMETHODIMP nsPromptService::PromptUsernameAndPassword(nsIDOMWindow *aParent, const PRUnichar *aDialogTitle, const PRUnichar *aText, PRUnichar **aUsername, PRUnichar **aPassword, const PRUnichar *aCheckMsg, PRBool *aCheckState, PRBool *_retval)
  398. {
  399. return NS_ERROR_NOT_IMPLEMENTED;
  400. }
  401. /* boolean promptPassword (in nsIDOMWindow aParent, in wstring aDialogTitle, in wstring aText, inout wstring aPassword, in wstring aCheckMsg, inout boolean aCheckState); */
  402. NS_IMETHODIMP nsPromptService::PromptPassword(nsIDOMWindow *aParent, const PRUnichar *aDialogTitle, const PRUnichar *aText, PRUnichar **aPassword, const PRUnichar *aCheckMsg, PRBool *aCheckState, PRBool *_retval)
  403. {
  404. return NS_ERROR_NOT_IMPLEMENTED;
  405. }
  406. /* boolean select (in nsIDOMWindow aParent, in wstring aDialogTitle, in wstring aText, in PRUint32 aCount, [array, size_is (aCount)] in wstring aSelectList, out long aOutSelection); */
  407. NS_IMETHODIMP nsPromptService::Select(nsIDOMWindow *aParent, const PRUnichar *aDialogTitle, const PRUnichar *aText, PRUint32 aCount, const PRUnichar **aSelectList, PRInt32 *aOutSelection, PRBool *_retval)
  408. {
  409. return NS_ERROR_NOT_IMPLEMENTED;
  410. }
  411. /* End of implementation class template. */
  412. #endif
  413. #endif /* __gen_nsIPromptService_h__ */