KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > eclipse > swt > internal > mozilla > nsIFilePicker


1 /* ***** BEGIN LICENSE BLOCK *****
2  * Version: MPL 1.1
3  *
4  * The contents of this file are subject to the Mozilla Public License Version
5  * 1.1 (the "License"); you may not use this file except in compliance with
6  * the License. You may obtain a copy of the License at
7  * http://www.mozilla.org/MPL/
8  *
9  * Software distributed under the License is distributed on an "AS IS" basis,
10  * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
11  * for the specific language governing rights and limitations under the
12  * License.
13  *
14  * The Original Code is Mozilla Communicator client code, released March 31, 1998.
15  *
16  * The Initial Developer of the Original Code is
17  * Netscape Communications Corporation.
18  * Portions created by Netscape are Copyright (C) 1998-1999
19  * Netscape Communications Corporation. All Rights Reserved.
20  *
21  * Contributor(s):
22  *
23  * IBM
24  * - Binding to permit interfacing between Mozilla and SWT
25  * - Copyright (C) 2005 IBM Corp. All Rights Reserved.
26  *
27  * ***** END LICENSE BLOCK ***** */

28 package org.eclipse.swt.internal.mozilla;
29
30 public class nsIFilePicker extends nsISupports {
31
32     static final int LAST_METHOD_ID = nsISupports.LAST_METHOD_ID + 15;
33
34     public static final String JavaDoc NS_IFILEPICKER_IID_STR =
35         "c47de916-1dd1-11b2-8141-82507fa02b21";
36
37     public static final nsID NS_IFILEPICKER_IID =
38         new nsID(NS_IFILEPICKER_IID_STR);
39
40     public nsIFilePicker(int /*long*/ address) {
41         super(address);
42     }
43
44     public static final int modeOpen = 0;
45     public static final int modeSave = 1;
46     public static final int modeGetFolder = 2;
47     public static final int modeOpenMultiple = 3;
48     public static final int returnOK = 0;
49     public static final int returnCancel = 1;
50     public static final int returnReplace = 2;
51     public static final int filterAll = 1;
52     public static final int filterHTML = 2;
53     public static final int filterText = 4;
54     public static final int filterImages = 8;
55     public static final int filterXML = 16;
56     public static final int filterXUL = 32;
57     public static final int filterApps = 64;
58
59     public int Init(int /*long*/ parent, char[] title, int mode) {
60         return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 1, getAddress(), parent, title, mode);
61     }
62
63     public int AppendFilters(int filterMask) {
64         return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 2, getAddress(), filterMask);
65     }
66
67     public int AppendFilter(char[] title, char[] filter) {
68         return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 3, getAddress(), title, filter);
69     }
70
71     public int GetDefaultString(int /*long*/[] aDefaultString) {
72         return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 4, getAddress(), aDefaultString);
73     }
74
75     public int SetDefaultString(char[] aDefaultString) {
76         return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 5, getAddress(), aDefaultString);
77     }
78
79     public int GetDefaultExtension(int /*long*/[] aDefaultExtension) {
80         return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 6, getAddress(), aDefaultExtension);
81     }
82
83     public int SetDefaultExtension(char[] aDefaultExtension) {
84         return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 7, getAddress(), aDefaultExtension);
85     }
86
87     public int GetFilterIndex(int[] aFilterIndex) {
88         return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 8, getAddress(), aFilterIndex);
89     }
90
91     public int SetFilterIndex(int aFilterIndex) {
92         return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 9, getAddress(), aFilterIndex);
93     }
94
95     public int GetDisplayDirectory(int /*long*/[] aDisplayDirectory) {
96         return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 10, getAddress(), aDisplayDirectory);
97     }
98
99     public int SetDisplayDirectory(int /*long*/ aDisplayDirectory) {
100         return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 11, getAddress(), aDisplayDirectory);
101     }
102
103     public int GetFile(int /*long*/[] aFile) {
104         return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 12, getAddress(), aFile);
105     }
106
107     public int GetFileURL(int /*long*/[] aFileURL) {
108         return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 13, getAddress(), aFileURL);
109     }
110
111     public int GetFiles(int /*long*/[] aFiles) {
112         return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 14, getAddress(), aFiles);
113     }
114
115     public int Show(int /*long*/ _retval) {
116         return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 15, getAddress(), _retval);
117     }
118 }
119
Popular Tags