annotate dwt/internal/mozilla/nsIFilePicker.d @ 327:b0d7eb5bd76c

Adding Mozilla XPCOM interfaces from dwt-linux to dwt-win
author John Reimer <terminal.node@gmail.com>
date Fri, 02 Jan 2009 17:45:10 -0800
parents
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
327
b0d7eb5bd76c Adding Mozilla XPCOM interfaces from dwt-linux to dwt-win
John Reimer <terminal.node@gmail.com>
parents:
diff changeset
1 module dwt.internal.mozilla.nsIFilePicker;
b0d7eb5bd76c Adding Mozilla XPCOM interfaces from dwt-linux to dwt-win
John Reimer <terminal.node@gmail.com>
parents:
diff changeset
2
b0d7eb5bd76c Adding Mozilla XPCOM interfaces from dwt-linux to dwt-win
John Reimer <terminal.node@gmail.com>
parents:
diff changeset
3 import dwt.internal.mozilla.Common;
b0d7eb5bd76c Adding Mozilla XPCOM interfaces from dwt-linux to dwt-win
John Reimer <terminal.node@gmail.com>
parents:
diff changeset
4 import dwt.internal.mozilla.nsID;
b0d7eb5bd76c Adding Mozilla XPCOM interfaces from dwt-linux to dwt-win
John Reimer <terminal.node@gmail.com>
parents:
diff changeset
5 import dwt.internal.mozilla.nsISupports;
b0d7eb5bd76c Adding Mozilla XPCOM interfaces from dwt-linux to dwt-win
John Reimer <terminal.node@gmail.com>
parents:
diff changeset
6 import dwt.internal.mozilla.nsILocalFile;
b0d7eb5bd76c Adding Mozilla XPCOM interfaces from dwt-linux to dwt-win
John Reimer <terminal.node@gmail.com>
parents:
diff changeset
7 import dwt.internal.mozilla.nsIFileURL;
b0d7eb5bd76c Adding Mozilla XPCOM interfaces from dwt-linux to dwt-win
John Reimer <terminal.node@gmail.com>
parents:
diff changeset
8 import dwt.internal.mozilla.nsIDOMWindow;
b0d7eb5bd76c Adding Mozilla XPCOM interfaces from dwt-linux to dwt-win
John Reimer <terminal.node@gmail.com>
parents:
diff changeset
9 import dwt.internal.mozilla.nsISimpleEnumerator;
b0d7eb5bd76c Adding Mozilla XPCOM interfaces from dwt-linux to dwt-win
John Reimer <terminal.node@gmail.com>
parents:
diff changeset
10 import dwt.internal.mozilla.nsStringAPI;
b0d7eb5bd76c Adding Mozilla XPCOM interfaces from dwt-linux to dwt-win
John Reimer <terminal.node@gmail.com>
parents:
diff changeset
11
b0d7eb5bd76c Adding Mozilla XPCOM interfaces from dwt-linux to dwt-win
John Reimer <terminal.node@gmail.com>
parents:
diff changeset
12 const char[] NS_IFILEPICKER_IID_STR = "c47de916-1dd1-11b2-8141-82507fa02b21";
b0d7eb5bd76c Adding Mozilla XPCOM interfaces from dwt-linux to dwt-win
John Reimer <terminal.node@gmail.com>
parents:
diff changeset
13
b0d7eb5bd76c Adding Mozilla XPCOM interfaces from dwt-linux to dwt-win
John Reimer <terminal.node@gmail.com>
parents:
diff changeset
14 const nsIID NS_IFILEPICKER_IID=
b0d7eb5bd76c Adding Mozilla XPCOM interfaces from dwt-linux to dwt-win
John Reimer <terminal.node@gmail.com>
parents:
diff changeset
15 {0xc47de916, 0x1dd1, 0x11b2,
b0d7eb5bd76c Adding Mozilla XPCOM interfaces from dwt-linux to dwt-win
John Reimer <terminal.node@gmail.com>
parents:
diff changeset
16 [ 0x81, 0x41, 0x82, 0x50, 0x7f, 0xa0, 0x2b, 0x21 ]};
b0d7eb5bd76c Adding Mozilla XPCOM interfaces from dwt-linux to dwt-win
John Reimer <terminal.node@gmail.com>
parents:
diff changeset
17
b0d7eb5bd76c Adding Mozilla XPCOM interfaces from dwt-linux to dwt-win
John Reimer <terminal.node@gmail.com>
parents:
diff changeset
18 interface nsIFilePicker : nsISupports {
b0d7eb5bd76c Adding Mozilla XPCOM interfaces from dwt-linux to dwt-win
John Reimer <terminal.node@gmail.com>
parents:
diff changeset
19
b0d7eb5bd76c Adding Mozilla XPCOM interfaces from dwt-linux to dwt-win
John Reimer <terminal.node@gmail.com>
parents:
diff changeset
20 static const char[] IID_STR = NS_IFILEPICKER_IID_STR;
b0d7eb5bd76c Adding Mozilla XPCOM interfaces from dwt-linux to dwt-win
John Reimer <terminal.node@gmail.com>
parents:
diff changeset
21 static const nsIID IID = NS_IFILEPICKER_IID;
b0d7eb5bd76c Adding Mozilla XPCOM interfaces from dwt-linux to dwt-win
John Reimer <terminal.node@gmail.com>
parents:
diff changeset
22
b0d7eb5bd76c Adding Mozilla XPCOM interfaces from dwt-linux to dwt-win
John Reimer <terminal.node@gmail.com>
parents:
diff changeset
23 enum { modeOpen = 0 };
b0d7eb5bd76c Adding Mozilla XPCOM interfaces from dwt-linux to dwt-win
John Reimer <terminal.node@gmail.com>
parents:
diff changeset
24 enum { modeSave = 1 };
b0d7eb5bd76c Adding Mozilla XPCOM interfaces from dwt-linux to dwt-win
John Reimer <terminal.node@gmail.com>
parents:
diff changeset
25 enum { modeGetFolder = 2 };
b0d7eb5bd76c Adding Mozilla XPCOM interfaces from dwt-linux to dwt-win
John Reimer <terminal.node@gmail.com>
parents:
diff changeset
26 enum { modeOpenMultiple = 3 };
b0d7eb5bd76c Adding Mozilla XPCOM interfaces from dwt-linux to dwt-win
John Reimer <terminal.node@gmail.com>
parents:
diff changeset
27 enum { returnOK = 0 };
b0d7eb5bd76c Adding Mozilla XPCOM interfaces from dwt-linux to dwt-win
John Reimer <terminal.node@gmail.com>
parents:
diff changeset
28 enum { returnCancel = 1 };
b0d7eb5bd76c Adding Mozilla XPCOM interfaces from dwt-linux to dwt-win
John Reimer <terminal.node@gmail.com>
parents:
diff changeset
29 enum { returnReplace = 2 };
b0d7eb5bd76c Adding Mozilla XPCOM interfaces from dwt-linux to dwt-win
John Reimer <terminal.node@gmail.com>
parents:
diff changeset
30 enum { filterAll = 1 };
b0d7eb5bd76c Adding Mozilla XPCOM interfaces from dwt-linux to dwt-win
John Reimer <terminal.node@gmail.com>
parents:
diff changeset
31 enum { filterHTML = 2 };
b0d7eb5bd76c Adding Mozilla XPCOM interfaces from dwt-linux to dwt-win
John Reimer <terminal.node@gmail.com>
parents:
diff changeset
32 enum { filterText = 4 };
b0d7eb5bd76c Adding Mozilla XPCOM interfaces from dwt-linux to dwt-win
John Reimer <terminal.node@gmail.com>
parents:
diff changeset
33 enum { filterImages = 8 };
b0d7eb5bd76c Adding Mozilla XPCOM interfaces from dwt-linux to dwt-win
John Reimer <terminal.node@gmail.com>
parents:
diff changeset
34 enum { filterXML = 16 };
b0d7eb5bd76c Adding Mozilla XPCOM interfaces from dwt-linux to dwt-win
John Reimer <terminal.node@gmail.com>
parents:
diff changeset
35 enum { filterXUL = 32 };
b0d7eb5bd76c Adding Mozilla XPCOM interfaces from dwt-linux to dwt-win
John Reimer <terminal.node@gmail.com>
parents:
diff changeset
36 enum { filterApps = 64 };
b0d7eb5bd76c Adding Mozilla XPCOM interfaces from dwt-linux to dwt-win
John Reimer <terminal.node@gmail.com>
parents:
diff changeset
37
b0d7eb5bd76c Adding Mozilla XPCOM interfaces from dwt-linux to dwt-win
John Reimer <terminal.node@gmail.com>
parents:
diff changeset
38 extern(System):
b0d7eb5bd76c Adding Mozilla XPCOM interfaces from dwt-linux to dwt-win
John Reimer <terminal.node@gmail.com>
parents:
diff changeset
39 nsresult Init(nsIDOMWindow parent, nsAString * title, PRInt16 mode);
b0d7eb5bd76c Adding Mozilla XPCOM interfaces from dwt-linux to dwt-win
John Reimer <terminal.node@gmail.com>
parents:
diff changeset
40 nsresult AppendFilters(PRInt32 filterMask);
b0d7eb5bd76c Adding Mozilla XPCOM interfaces from dwt-linux to dwt-win
John Reimer <terminal.node@gmail.com>
parents:
diff changeset
41 nsresult AppendFilter(nsAString * title, nsAString * filter);
b0d7eb5bd76c Adding Mozilla XPCOM interfaces from dwt-linux to dwt-win
John Reimer <terminal.node@gmail.com>
parents:
diff changeset
42 nsresult GetDefaultString(nsAString * aDefaultString);
b0d7eb5bd76c Adding Mozilla XPCOM interfaces from dwt-linux to dwt-win
John Reimer <terminal.node@gmail.com>
parents:
diff changeset
43 nsresult SetDefaultString(nsAString * aDefaultString);
b0d7eb5bd76c Adding Mozilla XPCOM interfaces from dwt-linux to dwt-win
John Reimer <terminal.node@gmail.com>
parents:
diff changeset
44 nsresult GetDefaultExtension(nsAString * aDefaultExtension);
b0d7eb5bd76c Adding Mozilla XPCOM interfaces from dwt-linux to dwt-win
John Reimer <terminal.node@gmail.com>
parents:
diff changeset
45 nsresult SetDefaultExtension(nsAString * aDefaultExtension);
b0d7eb5bd76c Adding Mozilla XPCOM interfaces from dwt-linux to dwt-win
John Reimer <terminal.node@gmail.com>
parents:
diff changeset
46 nsresult GetFilterIndex(PRInt32 *aFilterIndex);
b0d7eb5bd76c Adding Mozilla XPCOM interfaces from dwt-linux to dwt-win
John Reimer <terminal.node@gmail.com>
parents:
diff changeset
47 nsresult SetFilterIndex(PRInt32 aFilterIndex);
b0d7eb5bd76c Adding Mozilla XPCOM interfaces from dwt-linux to dwt-win
John Reimer <terminal.node@gmail.com>
parents:
diff changeset
48 nsresult GetDisplayDirectory(nsILocalFile *aDisplayDirectory);
b0d7eb5bd76c Adding Mozilla XPCOM interfaces from dwt-linux to dwt-win
John Reimer <terminal.node@gmail.com>
parents:
diff changeset
49 nsresult SetDisplayDirectory(nsILocalFile aDisplayDirectory);
b0d7eb5bd76c Adding Mozilla XPCOM interfaces from dwt-linux to dwt-win
John Reimer <terminal.node@gmail.com>
parents:
diff changeset
50 nsresult GetFile(nsILocalFile *aFile);
b0d7eb5bd76c Adding Mozilla XPCOM interfaces from dwt-linux to dwt-win
John Reimer <terminal.node@gmail.com>
parents:
diff changeset
51 nsresult GetFileURL(nsIFileURL *aFileURL);
b0d7eb5bd76c Adding Mozilla XPCOM interfaces from dwt-linux to dwt-win
John Reimer <terminal.node@gmail.com>
parents:
diff changeset
52 nsresult GetFiles(nsISimpleEnumerator *aFiles);
b0d7eb5bd76c Adding Mozilla XPCOM interfaces from dwt-linux to dwt-win
John Reimer <terminal.node@gmail.com>
parents:
diff changeset
53 nsresult Show(PRInt16 *_retval);
b0d7eb5bd76c Adding Mozilla XPCOM interfaces from dwt-linux to dwt-win
John Reimer <terminal.node@gmail.com>
parents:
diff changeset
54
b0d7eb5bd76c Adding Mozilla XPCOM interfaces from dwt-linux to dwt-win
John Reimer <terminal.node@gmail.com>
parents:
diff changeset
55 }
b0d7eb5bd76c Adding Mozilla XPCOM interfaces from dwt-linux to dwt-win
John Reimer <terminal.node@gmail.com>
parents:
diff changeset
56