1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/netwerk/base/public/nsIPrompt.idl Wed Dec 31 06:09:35 2014 +0100 1.3 @@ -0,0 +1,97 @@ 1.4 +/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ 1.5 +/* This Source Code Form is subject to the terms of the Mozilla Public 1.6 + * License, v. 2.0. If a copy of the MPL was not distributed with this 1.7 + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ 1.8 + 1.9 +/** 1.10 + * This is the prompt interface which can be used without knowlege of a 1.11 + * parent window. The parentage is hidden by the GetInterface though 1.12 + * which it is gotten. This interface is identical to nsIPromptService 1.13 + * but without the parent nsIDOMWindow parameter. See nsIPromptService 1.14 + * for all documentation. 1.15 + * 1.16 + * Accesskeys can be attached to buttons and checkboxes by inserting 1.17 + * an & before the accesskey character. For a real &, use && instead. 1.18 + */ 1.19 + 1.20 +#include "nsISupports.idl" 1.21 + 1.22 +[scriptable, uuid(a63f70c0-148b-11d3-9333-00104ba0fd40)] 1.23 +interface nsIPrompt : nsISupports 1.24 +{ 1.25 + void alert(in wstring dialogTitle, 1.26 + in wstring text); 1.27 + 1.28 + void alertCheck(in wstring dialogTitle, 1.29 + in wstring text, 1.30 + in wstring checkMsg, 1.31 + inout boolean checkValue); 1.32 + 1.33 + boolean confirm(in wstring dialogTitle, 1.34 + in wstring text); 1.35 + 1.36 + boolean confirmCheck(in wstring dialogTitle, 1.37 + in wstring text, 1.38 + in wstring checkMsg, 1.39 + inout boolean checkValue); 1.40 + 1.41 + const unsigned long BUTTON_POS_0 = 1; 1.42 + const unsigned long BUTTON_POS_1 = 1 << 8; 1.43 + const unsigned long BUTTON_POS_2 = 1 << 16; 1.44 + 1.45 + const unsigned long BUTTON_TITLE_OK = 1; 1.46 + const unsigned long BUTTON_TITLE_CANCEL = 2; 1.47 + const unsigned long BUTTON_TITLE_YES = 3; 1.48 + const unsigned long BUTTON_TITLE_NO = 4; 1.49 + const unsigned long BUTTON_TITLE_SAVE = 5; 1.50 + const unsigned long BUTTON_TITLE_DONT_SAVE = 6; 1.51 + const unsigned long BUTTON_TITLE_REVERT = 7; 1.52 + 1.53 + const unsigned long BUTTON_TITLE_IS_STRING = 127; 1.54 + 1.55 + const unsigned long BUTTON_POS_0_DEFAULT = 0 << 24; 1.56 + const unsigned long BUTTON_POS_1_DEFAULT = 1 << 24; 1.57 + const unsigned long BUTTON_POS_2_DEFAULT = 2 << 24; 1.58 + 1.59 + /* used for security dialogs, buttons are initially disabled */ 1.60 + const unsigned long BUTTON_DELAY_ENABLE = 1 << 26; 1.61 + 1.62 + const unsigned long STD_OK_CANCEL_BUTTONS = (BUTTON_TITLE_OK * BUTTON_POS_0) + 1.63 + (BUTTON_TITLE_CANCEL * BUTTON_POS_1); 1.64 + const unsigned long STD_YES_NO_BUTTONS = (BUTTON_TITLE_YES * BUTTON_POS_0) + 1.65 + (BUTTON_TITLE_NO * BUTTON_POS_1); 1.66 + 1.67 + int32_t confirmEx(in wstring dialogTitle, 1.68 + in wstring text, 1.69 + in unsigned long buttonFlags, 1.70 + in wstring button0Title, 1.71 + in wstring button1Title, 1.72 + in wstring button2Title, 1.73 + in wstring checkMsg, 1.74 + inout boolean checkValue); 1.75 + 1.76 + boolean prompt(in wstring dialogTitle, 1.77 + in wstring text, 1.78 + inout wstring value, 1.79 + in wstring checkMsg, 1.80 + inout boolean checkValue); 1.81 + 1.82 + boolean promptPassword(in wstring dialogTitle, 1.83 + in wstring text, 1.84 + inout wstring password, 1.85 + in wstring checkMsg, 1.86 + inout boolean checkValue); 1.87 + 1.88 + boolean promptUsernameAndPassword(in wstring dialogTitle, 1.89 + in wstring text, 1.90 + inout wstring username, 1.91 + inout wstring password, 1.92 + in wstring checkMsg, 1.93 + inout boolean checkValue); 1.94 + 1.95 + boolean select(in wstring dialogTitle, 1.96 + in wstring text, 1.97 + in uint32_t count, 1.98 + [array, size_is(count)] in wstring selectList, 1.99 + out long outSelection); 1.100 +};