Bug 1845134 - Part 4: Update existing ui-icons to use the latest source from acorn...
[gecko.git] / netwerk / base / nsIPrompt.idl
blob6fbed3355d9a640bff0a92e3f4cc243b6a907619
1 /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /* This Source Code Form is subject to the terms of the Mozilla Public
3 * License, v. 2.0. If a copy of the MPL was not distributed with this
4 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
6 /**
7 * This is the prompt interface which can be used without knowlege of a
8 * parent window. The parentage is hidden by the GetInterface though
9 * which it is gotten. This interface is identical to nsIPromptService
10 * but without the parent nsIDOMWindow parameter. See nsIPromptService
11 * for all documentation.
13 * Accesskeys can be attached to buttons and checkboxes by inserting
14 * an & before the accesskey character. For a real &, use && instead.
17 #include "nsISupports.idl"
19 [scriptable, uuid(a63f70c0-148b-11d3-9333-00104ba0fd40)]
20 interface nsIPrompt : nsISupports
22 void alert(in wstring dialogTitle,
23 in wstring text);
25 void alertCheck(in wstring dialogTitle,
26 in wstring text,
27 in wstring checkMsg,
28 inout boolean checkValue);
30 boolean confirm(in wstring dialogTitle,
31 in wstring text);
33 boolean confirmCheck(in wstring dialogTitle,
34 in wstring text,
35 in wstring checkMsg,
36 inout boolean checkValue);
38 const unsigned long BUTTON_POS_0 = 1;
39 const unsigned long BUTTON_POS_1 = 1 << 8;
40 const unsigned long BUTTON_POS_2 = 1 << 16;
42 const unsigned long BUTTON_TITLE_OK = 1;
43 const unsigned long BUTTON_TITLE_CANCEL = 2;
44 const unsigned long BUTTON_TITLE_YES = 3;
45 const unsigned long BUTTON_TITLE_NO = 4;
46 const unsigned long BUTTON_TITLE_SAVE = 5;
47 const unsigned long BUTTON_TITLE_DONT_SAVE = 6;
48 const unsigned long BUTTON_TITLE_REVERT = 7;
50 const unsigned long BUTTON_TITLE_IS_STRING = 127;
52 const unsigned long BUTTON_POS_0_DEFAULT = 0 << 24;
53 const unsigned long BUTTON_POS_1_DEFAULT = 1 << 24;
54 const unsigned long BUTTON_POS_2_DEFAULT = 2 << 24;
56 /* used for security dialogs, buttons are initially disabled */
57 const unsigned long BUTTON_DELAY_ENABLE = 1 << 26;
59 const unsigned long SHOW_SPINNER = 1 << 27;
61 const unsigned long STD_OK_CANCEL_BUTTONS = (BUTTON_TITLE_OK * BUTTON_POS_0) +
62 (BUTTON_TITLE_CANCEL * BUTTON_POS_1);
63 const unsigned long STD_YES_NO_BUTTONS = (BUTTON_TITLE_YES * BUTTON_POS_0) +
64 (BUTTON_TITLE_NO * BUTTON_POS_1);
67 // Indicates whether a prompt should be shown in-content, on tab level or as a separate window
68 const unsigned long MODAL_TYPE_CONTENT = 1;
69 const unsigned long MODAL_TYPE_TAB = 2;
70 const unsigned long MODAL_TYPE_WINDOW = 3;
71 // Like MODAL_TYPE_WINDOW, but shown inside a parent window (with similar
72 // styles as _TAB and _CONTENT types) rather than as a new window:
73 const unsigned long MODAL_TYPE_INTERNAL_WINDOW = 4;
75 int32_t confirmEx(in wstring dialogTitle,
76 in wstring text,
77 in unsigned long buttonFlags,
78 in wstring button0Title,
79 in wstring button1Title,
80 in wstring button2Title,
81 in wstring checkMsg,
82 inout boolean checkValue);
84 boolean prompt(in wstring dialogTitle,
85 in wstring text,
86 inout wstring value,
87 in wstring checkMsg,
88 inout boolean checkValue);
90 boolean promptPassword(in wstring dialogTitle,
91 in wstring text,
92 inout wstring password);
94 boolean promptUsernameAndPassword(in wstring dialogTitle,
95 in wstring text,
96 inout wstring username,
97 inout wstring password);
99 boolean select(in wstring dialogTitle,
100 in wstring text,
101 in Array<AString> selectList,
102 out long outSelection);