Back to index

lightning-sunbird  0.9+nobinonly
nsIPrompt.idl
Go to the documentation of this file.
00001 /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
00002 /* ***** BEGIN LICENSE BLOCK *****
00003  * Version: MPL 1.1/GPL 2.0/LGPL 2.1
00004  *
00005  * The contents of this file are subject to the Mozilla Public License Version
00006  * 1.1 (the "License"); you may not use this file except in compliance with
00007  * the License. You may obtain a copy of the License at
00008  * http://www.mozilla.org/MPL/
00009  *
00010  * Software distributed under the License is distributed on an "AS IS" basis,
00011  * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
00012  * for the specific language governing rights and limitations under the
00013  * License.
00014  *
00015  * The Original Code is mozilla.org code.
00016  *
00017  * The Initial Developer of the Original Code is
00018  * Netscape Communications Corporation.
00019  * Portions created by the Initial Developer are Copyright (C) 1998
00020  * the Initial Developer. All Rights Reserved.
00021  *
00022  * Contributor(s):
00023  *
00024  * Alternatively, the contents of this file may be used under the terms of
00025  * either the GNU General Public License Version 2 or later (the "GPL"), or
00026  * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
00027  * in which case the provisions of the GPL or the LGPL are applicable instead
00028  * of those above. If you wish to allow use of your version of this file only
00029  * under the terms of either the GPL or the LGPL, and not to allow others to
00030  * use your version of this file under the terms of the MPL, indicate your
00031  * decision by deleting the provisions above and replace them with the notice
00032  * and other provisions required by the GPL or the LGPL. If you do not delete
00033  * the provisions above, a recipient may use your version of this file under
00034  * the terms of any one of the MPL, the GPL or the LGPL.
00035  *
00036  * ***** END LICENSE BLOCK ***** */
00037 
00053 #include "nsISupports.idl"
00054 
00055 [scriptable, uuid(a63f70c0-148b-11d3-9333-00104ba0fd40)]
00056 interface nsIPrompt : nsISupports
00057 {
00058     void alert(in wstring dialogTitle,
00059                in wstring text);
00060 
00061     void alertCheck(in wstring dialogTitle,
00062                     in wstring text,
00063                     in wstring checkMsg,
00064                     inout boolean checkValue);
00065 
00066     boolean confirm(in wstring dialogTitle,
00067                     in wstring text);
00068 
00069     boolean confirmCheck(in wstring dialogTitle,
00070                          in wstring text,
00071                          in wstring checkMsg,
00072                          inout boolean checkValue);
00073                          
00074     const unsigned long BUTTON_POS_0              = 1;
00075     const unsigned long BUTTON_POS_1              = 1 << 8;
00076     const unsigned long BUTTON_POS_2              = 1 << 16;
00077      
00078     const unsigned long BUTTON_TITLE_OK            = 1;
00079     const unsigned long BUTTON_TITLE_CANCEL        = 2;
00080     const unsigned long BUTTON_TITLE_YES           = 3;
00081     const unsigned long BUTTON_TITLE_NO            = 4;
00082     const unsigned long BUTTON_TITLE_SAVE          = 5;
00083     const unsigned long BUTTON_TITLE_DONT_SAVE     = 6;
00084     const unsigned long BUTTON_TITLE_REVERT        = 7;
00085 
00086     const unsigned long BUTTON_TITLE_IS_STRING     = 127;
00087     
00088     const unsigned long BUTTON_POS_0_DEFAULT       = 0 << 24;
00089     const unsigned long BUTTON_POS_1_DEFAULT       = 1 << 24;
00090     const unsigned long BUTTON_POS_2_DEFAULT       = 2 << 24;
00091 
00092     /* used for security dialogs, buttons are initially disabled */
00093     const unsigned long BUTTON_DELAY_ENABLE        = 1 << 26;
00094 
00095     const unsigned long STD_OK_CANCEL_BUTTONS      = (BUTTON_TITLE_OK * BUTTON_POS_0) +
00096                                                     (BUTTON_TITLE_CANCEL * BUTTON_POS_1);
00097 
00098     PRInt32 confirmEx(in wstring dialogTitle,
00099                    in wstring text,
00100                    in unsigned long buttonFlags,
00101                    in wstring button0Title,
00102                    in wstring button1Title,
00103                    in wstring button2Title,
00104                    in wstring checkMsg,
00105                    inout boolean checkValue);
00106 
00107      boolean prompt(in wstring dialogTitle,
00108                     in wstring text,
00109                     inout wstring value, 
00110                     in wstring checkMsg,
00111                     inout boolean checkValue);
00112 
00113      boolean promptPassword(in wstring dialogTitle,
00114                             in wstring text,
00115                             inout wstring password,
00116                             in wstring checkMsg,
00117                             inout boolean checkValue);
00118  
00119      boolean promptUsernameAndPassword(in wstring dialogTitle,
00120                                        in wstring text,
00121                                        inout wstring username,
00122                                        inout wstring password,
00123                                        in wstring checkMsg,
00124                                        inout boolean checkValue);
00125     
00126     boolean select(in wstring dialogTitle,
00127                    in wstring text,
00128                    in  PRUint32 count,
00129                    [array, size_is(count)] in wstring selectList,
00130                    out long outSelection);
00131 };