Mercurial > projects > dwt-win
comparison 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 |
comparison
equal
deleted
inserted
replaced
326:e4d29367b1fa | 327:b0d7eb5bd76c |
---|---|
1 module dwt.internal.mozilla.nsIFilePicker; | |
2 | |
3 import dwt.internal.mozilla.Common; | |
4 import dwt.internal.mozilla.nsID; | |
5 import dwt.internal.mozilla.nsISupports; | |
6 import dwt.internal.mozilla.nsILocalFile; | |
7 import dwt.internal.mozilla.nsIFileURL; | |
8 import dwt.internal.mozilla.nsIDOMWindow; | |
9 import dwt.internal.mozilla.nsISimpleEnumerator; | |
10 import dwt.internal.mozilla.nsStringAPI; | |
11 | |
12 const char[] NS_IFILEPICKER_IID_STR = "c47de916-1dd1-11b2-8141-82507fa02b21"; | |
13 | |
14 const nsIID NS_IFILEPICKER_IID= | |
15 {0xc47de916, 0x1dd1, 0x11b2, | |
16 [ 0x81, 0x41, 0x82, 0x50, 0x7f, 0xa0, 0x2b, 0x21 ]}; | |
17 | |
18 interface nsIFilePicker : nsISupports { | |
19 | |
20 static const char[] IID_STR = NS_IFILEPICKER_IID_STR; | |
21 static const nsIID IID = NS_IFILEPICKER_IID; | |
22 | |
23 enum { modeOpen = 0 }; | |
24 enum { modeSave = 1 }; | |
25 enum { modeGetFolder = 2 }; | |
26 enum { modeOpenMultiple = 3 }; | |
27 enum { returnOK = 0 }; | |
28 enum { returnCancel = 1 }; | |
29 enum { returnReplace = 2 }; | |
30 enum { filterAll = 1 }; | |
31 enum { filterHTML = 2 }; | |
32 enum { filterText = 4 }; | |
33 enum { filterImages = 8 }; | |
34 enum { filterXML = 16 }; | |
35 enum { filterXUL = 32 }; | |
36 enum { filterApps = 64 }; | |
37 | |
38 extern(System): | |
39 nsresult Init(nsIDOMWindow parent, nsAString * title, PRInt16 mode); | |
40 nsresult AppendFilters(PRInt32 filterMask); | |
41 nsresult AppendFilter(nsAString * title, nsAString * filter); | |
42 nsresult GetDefaultString(nsAString * aDefaultString); | |
43 nsresult SetDefaultString(nsAString * aDefaultString); | |
44 nsresult GetDefaultExtension(nsAString * aDefaultExtension); | |
45 nsresult SetDefaultExtension(nsAString * aDefaultExtension); | |
46 nsresult GetFilterIndex(PRInt32 *aFilterIndex); | |
47 nsresult SetFilterIndex(PRInt32 aFilterIndex); | |
48 nsresult GetDisplayDirectory(nsILocalFile *aDisplayDirectory); | |
49 nsresult SetDisplayDirectory(nsILocalFile aDisplayDirectory); | |
50 nsresult GetFile(nsILocalFile *aFile); | |
51 nsresult GetFileURL(nsIFileURL *aFileURL); | |
52 nsresult GetFiles(nsISimpleEnumerator *aFiles); | |
53 nsresult Show(PRInt16 *_retval); | |
54 | |
55 } | |
56 |