Back to index

lightning-sunbird  0.9+nobinonly
nsIPromptService.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) 2001
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 
00038 #include "nsISupports.idl"
00039 
00040 interface nsIDOMWindow;
00041 
00074 [scriptable, uuid(1630C61A-325E-49ca-8759-A31B16C47AA5)]
00075 interface nsIPromptService : nsISupports
00076 {
00087   void alert(in nsIDOMWindow aParent,
00088              in wstring aDialogTitle,
00089              in wstring aText);
00090 
00106   void alertCheck(in nsIDOMWindow aParent,
00107                   in wstring aDialogTitle,
00108                   in wstring aText,
00109                   in wstring aCheckMsg,
00110                   inout boolean aCheckState);
00111 
00124   boolean confirm(in nsIDOMWindow aParent,
00125                   in wstring aDialogTitle,
00126                   in wstring aText);
00127 
00145   boolean confirmCheck(in nsIDOMWindow aParent,
00146                        in wstring aDialogTitle,
00147                        in wstring aText,
00148                        in wstring aCheckMsg,
00149                        inout boolean aCheckState);
00150 
00162   const unsigned long BUTTON_POS_0              = 1;
00163   const unsigned long BUTTON_POS_1              = 1 << 8;
00164   const unsigned long BUTTON_POS_2              = 1 << 16;
00165      
00169   const unsigned long BUTTON_TITLE_OK            = 1;
00170   const unsigned long BUTTON_TITLE_CANCEL        = 2;
00171   const unsigned long BUTTON_TITLE_YES           = 3;
00172   const unsigned long BUTTON_TITLE_NO            = 4;
00173   const unsigned long BUTTON_TITLE_SAVE          = 5;
00174   const unsigned long BUTTON_TITLE_DONT_SAVE     = 6;
00175   const unsigned long BUTTON_TITLE_REVERT        = 7;
00176   const unsigned long BUTTON_TITLE_IS_STRING     = 127;
00177   
00181   const unsigned long BUTTON_POS_0_DEFAULT       = 0;
00182   const unsigned long BUTTON_POS_1_DEFAULT       = 1 << 24;
00183   const unsigned long BUTTON_POS_2_DEFAULT       = 1 << 25;
00184 
00192   const unsigned long BUTTON_DELAY_ENABLE        = 1 << 26;
00193 
00197   const unsigned long STD_OK_CANCEL_BUTTONS      = (BUTTON_TITLE_OK     * BUTTON_POS_0) +
00198                                                    (BUTTON_TITLE_CANCEL * BUTTON_POS_1);
00199 
00203   const unsigned long STD_YES_NO_BUTTONS         = (BUTTON_TITLE_YES * BUTTON_POS_0) +
00204                                                    (BUTTON_TITLE_NO  * BUTTON_POS_1);
00205 
00206 
00250   PRInt32 confirmEx(in nsIDOMWindow aParent,
00251                     in wstring aDialogTitle,
00252                     in wstring aText,
00253                     in unsigned long aButtonFlags,
00254                     in wstring aButton0Title,
00255                     in wstring aButton1Title,
00256                     in wstring aButton2Title,
00257                     in wstring aCheckMsg,
00258                     inout boolean aCheckState);
00259 
00282   boolean prompt(in nsIDOMWindow aParent,
00283                  in wstring aDialogTitle,
00284                  in wstring aText,
00285                  inout wstring aValue, 
00286                  in wstring aCheckMsg,
00287                  inout boolean aCheckState);
00288 
00317   boolean promptUsernameAndPassword(in nsIDOMWindow aParent,
00318                                     in wstring aDialogTitle,
00319                                     in wstring aText,
00320                                     inout wstring aUsername,
00321                                     inout wstring aPassword,
00322                                     in wstring aCheckMsg,
00323                                     inout boolean aCheckState);
00324 
00347   boolean promptPassword(in nsIDOMWindow aParent,
00348                          in wstring aDialogTitle,
00349                          in wstring aText,
00350                          inout wstring aPassword,
00351                          in wstring aCheckMsg,
00352                          inout boolean aCheckState);
00353 
00374   boolean select(in nsIDOMWindow aParent,
00375                  in wstring aDialogTitle,
00376                  in wstring aText,
00377                  in  PRUint32 aCount,
00378                  [array, size_is(aCount)] in wstring aSelectList,
00379                  out long aOutSelection);
00380 };