Mercurial > projects > dwt-mac
comparison dwt/internal/mozilla/nsIWebNavigation.d @ 125:5583f8eeee6c
Synced mozilla with dwt-linux
author | Jacob Carlborg <doob@me.com> |
---|---|
date | Fri, 16 Jan 2009 12:49:08 +0100 |
parents | d8635bb48c7c |
children |
comparison
equal
deleted
inserted
replaced
124:540fa4e9974a | 125:5583f8eeee6c |
---|---|
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) 2003, 2008 IBM Corp. All Rights Reserved. | |
26 * | |
27 * ***** END LICENSE BLOCK ***** */ | |
28 module dwt.internal.mozilla.nsIWebNavigation; | 1 module dwt.internal.mozilla.nsIWebNavigation; |
29 | 2 |
30 import dwt.dwthelper.utils; | 3 import dwt.internal.mozilla.Common; |
4 import dwt.internal.mozilla.nsID; | |
5 import dwt.internal.mozilla.nsISupports; | |
31 | 6 |
32 public class nsIWebNavigation extends nsISupports { | 7 import dwt.internal.mozilla.nsIDOMDocument; |
8 import dwt.internal.mozilla.nsIInputStream; | |
9 import dwt.internal.mozilla.nsISHistory; | |
10 import dwt.internal.mozilla.nsIURI; | |
33 | 11 |
34 static final int LAST_METHOD_ID = nsISupports.LAST_METHOD_ID + 13; | 12 const char[] NS_IWEBNAVIGATION_IID_STR = "f5d9e7b0-d930-11d3-b057-00a024ffc08c"; |
35 | 13 |
36 public static final String NS_IWEBNAVIGATION_IID_STR = | 14 const nsIID NS_IWEBNAVIGATION_IID= |
37 "f5d9e7b0-d930-11d3-b057-00a024ffc08c"; | 15 {0xf5d9e7b0, 0xd930, 0x11d3, |
16 [ 0xb0, 0x57, 0x00, 0xa0, 0x24, 0xff, 0xc0, 0x8c ]}; | |
38 | 17 |
39 public static final nsID NS_IWEBNAVIGATION_IID = | 18 interface nsIWebNavigation : nsISupports { |
40 new nsID(NS_IWEBNAVIGATION_IID_STR); | |
41 | 19 |
42 public nsIWebNavigation(int /*long*/ address) { | 20 static const char[] IID_STR = NS_IWEBNAVIGATION_IID_STR; |
43 super(address); | 21 static const nsIID IID = NS_IWEBNAVIGATION_IID; |
44 } | |
45 | 22 |
46 public int GetCanGoBack(int[] aCanGoBack) { | 23 extern(System): |
47 return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 1, getAddress(), aCanGoBack); | 24 nsresult GetCanGoBack(PRBool *aCanGoBack); |
48 } | 25 nsresult GetCanGoForward(PRBool *aCanGoForward); |
26 nsresult GoBack(); | |
27 nsresult GoForward(); | |
28 nsresult GotoIndex(PRInt32 index); | |
49 | 29 |
50 public int GetCanGoForward(int[] aCanGoForward) { | 30 enum { LOAD_FLAGS_MASK = 65535U }; |
51 return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 2, getAddress(), aCanGoForward); | 31 enum { LOAD_FLAGS_NONE = 0U }; |
52 } | 32 enum { LOAD_FLAGS_IS_REFRESH = 16U }; |
33 enum { LOAD_FLAGS_IS_LINK = 32U }; | |
34 enum { LOAD_FLAGS_BYPASS_HISTORY = 64U }; | |
35 enum { LOAD_FLAGS_REPLACE_HISTORY = 128U }; | |
36 enum { LOAD_FLAGS_BYPASS_CACHE = 256U }; | |
37 enum { LOAD_FLAGS_BYPASS_PROXY = 512U }; | |
38 enum { LOAD_FLAGS_CHARSET_CHANGE = 1024U }; | |
39 enum { LOAD_FLAGS_STOP_CONTENT = 2048U }; | |
40 enum { LOAD_FLAGS_FROM_EXTERNAL = 4096U }; | |
41 enum { LOAD_FLAGS_ALLOW_THIRD_PARTY_FIXUP = 8192U }; | |
42 enum { LOAD_FLAGS_FIRST_LOAD = 16384U }; | |
53 | 43 |
54 public int GoBack() { | 44 nsresult LoadURI(PRUnichar *aURI, PRUint32 aLoadFlags, nsIURI aReferrer, nsIInputStream aPostData, nsIInputStream aHeaders); |
55 return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 3, getAddress()); | 45 nsresult Reload(PRUint32 aReloadFlags); |
56 } | |
57 | 46 |
58 public int GoForward() { | 47 enum { STOP_NETWORK = 1U }; |
59 return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 4, getAddress()); | 48 enum { STOP_CONTENT = 2U }; |
60 } | 49 enum { STOP_ALL = 3U }; |
61 | 50 |
62 public int GotoIndex(int index) { | 51 nsresult Stop(PRUint32 aStopFlags); |
63 return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 5, getAddress(), index); | 52 nsresult GetDocument(nsIDOMDocument *aDocument); |
64 } | 53 nsresult GetCurrentURI(nsIURI *aCurrentURI); |
54 nsresult GetReferringURI(nsIURI *aReferringURI); | |
55 nsresult GetSessionHistory(nsISHistory *aSessionHistory); | |
56 nsresult SetSessionHistory(nsISHistory aSessionHistory); | |
65 | 57 |
66 public static final int LOAD_FLAGS_MASK = 65535; | 58 } |
67 | 59 |
68 public static final int LOAD_FLAGS_NONE = 0; | |
69 | |
70 public static final int LOAD_FLAGS_IS_REFRESH = 16; | |
71 | |
72 public static final int LOAD_FLAGS_IS_LINK = 32; | |
73 | |
74 public static final int LOAD_FLAGS_BYPASS_HISTORY = 64; | |
75 | |
76 public static final int LOAD_FLAGS_REPLACE_HISTORY = 128; | |
77 | |
78 public static final int LOAD_FLAGS_BYPASS_CACHE = 256; | |
79 | |
80 public static final int LOAD_FLAGS_BYPASS_PROXY = 512; | |
81 | |
82 public static final int LOAD_FLAGS_CHARSET_CHANGE = 1024; | |
83 | |
84 public int LoadURI(char[] uri, int loadFlags, int /*long*/ referrer, int /*long*/ postData, int /*long*/ headers) { | |
85 return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 6, getAddress(), uri, loadFlags, referrer, postData, headers); | |
86 } | |
87 | |
88 public int Reload(int reloadFlags) { | |
89 return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 7, getAddress(), reloadFlags); | |
90 } | |
91 | |
92 public static final int STOP_NETWORK = 1; | |
93 | |
94 public static final int STOP_CONTENT = 2; | |
95 | |
96 public static final int STOP_ALL = 3; | |
97 | |
98 public int Stop(int stopFlags) { | |
99 return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 8, getAddress(), stopFlags); | |
100 } | |
101 | |
102 public int GetDocument(int /*long*/[] aDocument) { | |
103 return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 9, getAddress(), aDocument); | |
104 } | |
105 | |
106 public int GetCurrentURI(int /*long*/[] aCurrentURI) { | |
107 return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 10, getAddress(), aCurrentURI); | |
108 } | |
109 | |
110 public int GetReferringURI(int /*long*/[] aReferringURI) { | |
111 return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 11, getAddress(), aReferringURI); | |
112 } | |
113 | |
114 public int GetSessionHistory(int /*long*/[] aSessionHistory) { | |
115 return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 12, getAddress(), aSessionHistory); | |
116 } | |
117 | |
118 public int SetSessionHistory(int /*long*/ aSessionHistory) { | |
119 return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 13, getAddress(), aSessionHistory); | |
120 } | |
121 } |