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) 2005 IBM Corp. All Rights Reserved.
026: *
027: * ***** END LICENSE BLOCK ***** */
028: package org.eclipse.swt.internal.mozilla;
029:
030: public class nsIFilePicker extends nsISupports {
031:
032: static final int LAST_METHOD_ID = nsISupports.LAST_METHOD_ID + 15;
033:
034: public static final String NS_IFILEPICKER_IID_STR = "c47de916-1dd1-11b2-8141-82507fa02b21";
035:
036: public static final nsID NS_IFILEPICKER_IID = new nsID(
037: NS_IFILEPICKER_IID_STR);
038:
039: public nsIFilePicker(int /*long*/address) {
040: super (address);
041: }
042:
043: public static final int modeOpen = 0;
044: public static final int modeSave = 1;
045: public static final int modeGetFolder = 2;
046: public static final int modeOpenMultiple = 3;
047: public static final int returnOK = 0;
048: public static final int returnCancel = 1;
049: public static final int returnReplace = 2;
050: public static final int filterAll = 1;
051: public static final int filterHTML = 2;
052: public static final int filterText = 4;
053: public static final int filterImages = 8;
054: public static final int filterXML = 16;
055: public static final int filterXUL = 32;
056: public static final int filterApps = 64;
057:
058: public int Init(int /*long*/parent, char[] title, int mode) {
059: return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 1,
060: getAddress(), parent, title, mode);
061: }
062:
063: public int AppendFilters(int filterMask) {
064: return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 2,
065: getAddress(), filterMask);
066: }
067:
068: public int AppendFilter(char[] title, char[] filter) {
069: return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 3,
070: getAddress(), title, filter);
071: }
072:
073: public int GetDefaultString(int /*long*/[] aDefaultString) {
074: return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 4,
075: getAddress(), aDefaultString);
076: }
077:
078: public int SetDefaultString(char[] aDefaultString) {
079: return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 5,
080: getAddress(), aDefaultString);
081: }
082:
083: public int GetDefaultExtension(int /*long*/[] aDefaultExtension) {
084: return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 6,
085: getAddress(), aDefaultExtension);
086: }
087:
088: public int SetDefaultExtension(char[] aDefaultExtension) {
089: return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 7,
090: getAddress(), aDefaultExtension);
091: }
092:
093: public int GetFilterIndex(int[] aFilterIndex) {
094: return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 8,
095: getAddress(), aFilterIndex);
096: }
097:
098: public int SetFilterIndex(int aFilterIndex) {
099: return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 9,
100: getAddress(), aFilterIndex);
101: }
102:
103: public int GetDisplayDirectory(int /*long*/[] aDisplayDirectory) {
104: return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 10,
105: getAddress(), aDisplayDirectory);
106: }
107:
108: public int SetDisplayDirectory(int /*long*/aDisplayDirectory) {
109: return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 11,
110: getAddress(), aDisplayDirectory);
111: }
112:
113: public int GetFile(int /*long*/[] aFile) {
114: return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 12,
115: getAddress(), aFile);
116: }
117:
118: public int GetFileURL(int /*long*/[] aFileURL) {
119: return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 13,
120: getAddress(), aFileURL);
121: }
122:
123: public int GetFiles(int /*long*/[] aFiles) {
124: return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 14,
125: getAddress(), aFiles);
126: }
127:
128: public int Show(int /*long*/_retval) {
129: return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 15,
130: getAddress(), _retval);
131: }
132: }
|