001: /* ***** BEGIN LICENSE BLOCK *****
002: * Version: MPL 1.1
003: *
004: * The contents of this file are subject to the Mozilla Public License Version
005: * 1.1 (the "License"); you may not use this file except in compliance with
006: * the License. You may obtain a copy of the License at
007: * http://www.mozilla.org/MPL/
008: *
009: * Software distributed under the License is distributed on an "AS IS" basis,
010: * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
011: * for the specific language governing rights and limitations under the
012: * License.
013: *
014: * The Original Code is Mozilla Communicator client code, released March 31, 1998.
015: *
016: * The Initial Developer of the Original Code is
017: * Netscape Communications Corporation.
018: * Portions created by Netscape are Copyright (C) 1998-1999
019: * Netscape Communications Corporation. All Rights Reserved.
020: *
021: * Contributor(s):
022: *
023: * IBM
024: * - Binding to permit interfacing between Mozilla and SWT
025: * - Copyright (C) 2003 IBM Corp. All Rights Reserved.
026: *
027: * ***** END LICENSE BLOCK ***** */
028: package org.eclipse.swt.internal.mozilla;
029:
030: public class nsIPromptService extends nsISupports {
031:
032: static final int LAST_METHOD_ID = nsISupports.LAST_METHOD_ID + 9;
033:
034: public static final String NS_IPROMPTSERVICE_IID_STR = "1630c61a-325e-49ca-8759-a31b16c47aa5";
035:
036: public static final nsID NS_IPROMPTSERVICE_IID = new nsID(
037: NS_IPROMPTSERVICE_IID_STR);
038:
039: public nsIPromptService(int /*long*/address) {
040: super (address);
041: }
042:
043: public int Alert(int /*long*/aParent, char[] aDialogTitle,
044: char[] aText) {
045: return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 1,
046: getAddress(), aParent, aDialogTitle, aText);
047: }
048:
049: public int AlertCheck(int /*long*/aParent, char[] aDialogTitle,
050: char[] aText, char[] aCheckMsg, boolean[] aCheckState) {
051: return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 2,
052: getAddress(), aParent, aDialogTitle, aText, aCheckMsg,
053: aCheckState);
054: }
055:
056: public int Confirm(int /*long*/aParent, char[] aDialogTitle,
057: char[] aText, boolean[] _retval) {
058: return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 3,
059: getAddress(), aParent, aDialogTitle, aText, _retval);
060: }
061:
062: public int ConfirmCheck(int /*long*/aParent, char[] aDialogTitle,
063: char[] aText, char[] aCheckMsg, boolean[] aCheckState,
064: boolean[] _retval) {
065: return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 4,
066: getAddress(), aParent, aDialogTitle, aText, aCheckMsg,
067: aCheckState, _retval);
068: }
069:
070: public static final int BUTTON_POS_0 = 1;
071:
072: public static final int BUTTON_POS_1 = 256;
073:
074: public static final int BUTTON_POS_2 = 65536;
075:
076: public static final int BUTTON_TITLE_OK = 1;
077:
078: public static final int BUTTON_TITLE_CANCEL = 2;
079:
080: public static final int BUTTON_TITLE_YES = 3;
081:
082: public static final int BUTTON_TITLE_NO = 4;
083:
084: public static final int BUTTON_TITLE_SAVE = 5;
085:
086: public static final int BUTTON_TITLE_DONT_SAVE = 6;
087:
088: public static final int BUTTON_TITLE_REVERT = 7;
089:
090: public static final int BUTTON_TITLE_IS_STRING = 127;
091:
092: public static final int BUTTON_POS_0_DEFAULT = 0;
093:
094: public static final int BUTTON_POS_1_DEFAULT = 16777216;
095:
096: public static final int BUTTON_POS_2_DEFAULT = 33554432;
097:
098: public static final int BUTTON_DELAY_ENABLE = 67108864;
099:
100: public static final int STD_OK_CANCEL_BUTTONS = 513;
101:
102: public static final int STD_YES_NO_BUTTONS = 1027;
103:
104: public int ConfirmEx(int /*long*/aParent, char[] aDialogTitle,
105: char[] aText, int aButtonFlags, char[] aButton0Title,
106: char[] aButton1Title, char[] aButton2Title,
107: char[] aCheckMsg, boolean[] aCheckState, int[] _retval) {
108: return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 5,
109: getAddress(), aParent, aDialogTitle, aText,
110: aButtonFlags, aButton0Title, aButton1Title,
111: aButton2Title, aCheckMsg, aCheckState, _retval);
112: }
113:
114: public int Prompt(int /*long*/aParent, char[] aDialogTitle,
115: char[] aText, int /*long*/[] aValue, char[] aCheckMsg,
116: boolean[] aCheckState, boolean[] _retval) {
117: return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 6,
118: getAddress(), aParent, aDialogTitle, aText, aValue,
119: aCheckMsg, aCheckState, _retval);
120: }
121:
122: public int PromptUsernameAndPassword(int /*long*/aParent,
123: char[] aDialogTitle, char[] aText,
124: int /*long*/[] aUsername, int /*long*/[] aPassword,
125: char[] aCheckMsg, boolean[] aCheckState, boolean[] _retval) {
126: return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 7,
127: getAddress(), aParent, aDialogTitle, aText, aUsername,
128: aPassword, aCheckMsg, aCheckState, _retval);
129: }
130:
131: public int PromptPassword(int /*long*/aParent,
132: char[] aDialogTitle, char[] aText,
133: int /*long*/[] aPassword, char[] aCheckMsg,
134: boolean[] aCheckState, boolean[] _retval) {
135: return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 8,
136: getAddress(), aParent, aDialogTitle, aText, aPassword,
137: aCheckMsg, aCheckState, _retval);
138: }
139:
140: public int Select(int /*long*/aParent, char[] aDialogTitle,
141: char[] aText, int aCount, int /*long*/[] aSelectList,
142: int[] aOutSelection, boolean[] _retval) {
143: return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 9,
144: getAddress(), aParent, aDialogTitle, aText, aCount,
145: aSelectList, aOutSelection, _retval);
146: }
147: }
|