comparison dwt/internal/mozilla/nsIFilePicker.d @ 45:d8635bb48c7c

Merge with SWT 3.5
author Jacob Carlborg <doob@me.com>
date Mon, 01 Dec 2008 17:07:00 +0100
parents
children 5583f8eeee6c
comparison
equal deleted inserted replaced
44:ca5e494f2bbf 45:d8635bb48c7c
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 DWT
25 * - Copyright (C) 2005 IBM Corp. All Rights Reserved.
26 *
27 * ***** END LICENSE BLOCK ***** */
28 module dwt.internal.mozilla.nsIFilePicker;
29
30 import dwt.dwthelper.utils;
31
32 public class nsIFilePicker extends nsISupports {
33
34 static final int LAST_METHOD_ID = nsISupports.LAST_METHOD_ID + 15;
35
36 public static final String NS_IFILEPICKER_IID_STR =
37 "c47de916-1dd1-11b2-8141-82507fa02b21";
38
39 public static final nsID NS_IFILEPICKER_IID =
40 new nsID(NS_IFILEPICKER_IID_STR);
41
42 public nsIFilePicker(int /*long*/ address) {
43 super(address);
44 }
45
46 public static final int modeOpen = 0;
47 public static final int modeSave = 1;
48 public static final int modeGetFolder = 2;
49 public static final int modeOpenMultiple = 3;
50 public static final int returnOK = 0;
51 public static final int returnCancel = 1;
52 public static final int returnReplace = 2;
53 public static final int filterAll = 1;
54 public static final int filterHTML = 2;
55 public static final int filterText = 4;
56 public static final int filterImages = 8;
57 public static final int filterXML = 16;
58 public static final int filterXUL = 32;
59 public static final int filterApps = 64;
60
61 public int Init(int /*long*/ parent, char[] title, int mode) {
62 return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 1, getAddress(), parent, title, mode);
63 }
64
65 public int AppendFilters(int filterMask) {
66 return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 2, getAddress(), filterMask);
67 }
68
69 public int AppendFilter(char[] title, char[] filter) {
70 return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 3, getAddress(), title, filter);
71 }
72
73 public int GetDefaultString(int /*long*/[] aDefaultString) {
74 return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 4, getAddress(), aDefaultString);
75 }
76
77 public int SetDefaultString(char[] aDefaultString) {
78 return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 5, getAddress(), aDefaultString);
79 }
80
81 public int GetDefaultExtension(int /*long*/[] aDefaultExtension) {
82 return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 6, getAddress(), aDefaultExtension);
83 }
84
85 public int SetDefaultExtension(char[] aDefaultExtension) {
86 return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 7, getAddress(), aDefaultExtension);
87 }
88
89 public int GetFilterIndex(int[] aFilterIndex) {
90 return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 8, getAddress(), aFilterIndex);
91 }
92
93 public int SetFilterIndex(int aFilterIndex) {
94 return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 9, getAddress(), aFilterIndex);
95 }
96
97 public int GetDisplayDirectory(int /*long*/[] aDisplayDirectory) {
98 return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 10, getAddress(), aDisplayDirectory);
99 }
100
101 public int SetDisplayDirectory(int /*long*/ aDisplayDirectory) {
102 return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 11, getAddress(), aDisplayDirectory);
103 }
104
105 public int GetFile(int /*long*/[] aFile) {
106 return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 12, getAddress(), aFile);
107 }
108
109 public int GetFileURL(int /*long*/[] aFileURL) {
110 return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 13, getAddress(), aFileURL);
111 }
112
113 public int GetFiles(int /*long*/[] aFiles) {
114 return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 14, getAddress(), aFiles);
115 }
116
117 public int Show(int /*long*/ _retval) {
118 return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 15, getAddress(), _retval);
119 }
120 }