diff 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
line wrap: on
line diff
--- a/dwt/internal/mozilla/nsIWebNavigation.d	Fri Jan 16 12:19:08 2009 +0100
+++ b/dwt/internal/mozilla/nsIWebNavigation.d	Fri Jan 16 12:49:08 2009 +0100
@@ -1,121 +1,59 @@
-/* ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is Mozilla Communicator client code, released March 31, 1998.
- *
- * The Initial Developer of the Original Code is
- * Netscape Communications Corporation.
- * Portions created by Netscape are Copyright (C) 1998-1999
- * Netscape Communications Corporation.  All Rights Reserved.
- *
- * Contributor(s):
- *
- * IBM
- * -  Binding to permit interfacing between Mozilla and DWT
- * -  Copyright (C) 2003, 2008 IBM Corp.  All Rights Reserved.
- *
- * ***** END LICENSE BLOCK ***** */
 module dwt.internal.mozilla.nsIWebNavigation;
 
-import dwt.dwthelper.utils;
-
-public class nsIWebNavigation extends nsISupports {
-
-    static final int LAST_METHOD_ID = nsISupports.LAST_METHOD_ID + 13;
-
-    public static final String NS_IWEBNAVIGATION_IID_STR =
-        "f5d9e7b0-d930-11d3-b057-00a024ffc08c";
+import dwt.internal.mozilla.Common;
+import dwt.internal.mozilla.nsID;
+import dwt.internal.mozilla.nsISupports;
 
-    public static final nsID NS_IWEBNAVIGATION_IID =
-        new nsID(NS_IWEBNAVIGATION_IID_STR);
+import dwt.internal.mozilla.nsIDOMDocument;
+import dwt.internal.mozilla.nsIInputStream;
+import dwt.internal.mozilla.nsISHistory; 
+import dwt.internal.mozilla.nsIURI; 
 
-    public nsIWebNavigation(int /*long*/ address) {
-        super(address);
-    }
-
-    public int GetCanGoBack(int[] aCanGoBack) {
-        return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 1, getAddress(), aCanGoBack);
-    }
+const char[] NS_IWEBNAVIGATION_IID_STR = "f5d9e7b0-d930-11d3-b057-00a024ffc08c";
 
-    public int GetCanGoForward(int[] aCanGoForward) {
-        return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 2, getAddress(), aCanGoForward);
-    }
+const nsIID NS_IWEBNAVIGATION_IID= 
+  {0xf5d9e7b0, 0xd930, 0x11d3, 
+    [ 0xb0, 0x57, 0x00, 0xa0, 0x24, 0xff, 0xc0, 0x8c ]};
 
-    public int GoBack() {
-        return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 3, getAddress());
-    }
-
-    public int GoForward() {
-        return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 4, getAddress());
-    }
+interface nsIWebNavigation : nsISupports {
 
-    public int GotoIndex(int index) {
-        return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 5, getAddress(), index);
-    }
-
-    public static final int LOAD_FLAGS_MASK = 65535;
+  static const char[] IID_STR = NS_IWEBNAVIGATION_IID_STR;
+  static const nsIID IID = NS_IWEBNAVIGATION_IID;
 
-    public static final int LOAD_FLAGS_NONE = 0;
-
-    public static final int LOAD_FLAGS_IS_REFRESH = 16;
-
-    public static final int LOAD_FLAGS_IS_LINK = 32;
-
-    public static final int LOAD_FLAGS_BYPASS_HISTORY = 64;
+extern(System):
+  nsresult GetCanGoBack(PRBool *aCanGoBack);
+  nsresult GetCanGoForward(PRBool *aCanGoForward);
+  nsresult GoBack();
+  nsresult GoForward();
+  nsresult GotoIndex(PRInt32 index);
 
-    public static final int LOAD_FLAGS_REPLACE_HISTORY = 128;
-
-    public static final int LOAD_FLAGS_BYPASS_CACHE = 256;
-
-    public static final int LOAD_FLAGS_BYPASS_PROXY = 512;
-
-    public static final int LOAD_FLAGS_CHARSET_CHANGE = 1024;
-
-    public int LoadURI(char[] uri, int loadFlags, int /*long*/ referrer, int /*long*/ postData, int /*long*/ headers) {
-        return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 6, getAddress(), uri, loadFlags, referrer, postData, headers);
-    }
-
-    public int Reload(int reloadFlags) {
-        return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 7, getAddress(), reloadFlags);
-    }
-
-    public static final int STOP_NETWORK = 1;
-
-    public static final int STOP_CONTENT = 2;
-
-    public static final int STOP_ALL = 3;
+  enum { LOAD_FLAGS_MASK = 65535U };
+  enum { LOAD_FLAGS_NONE = 0U };
+  enum { LOAD_FLAGS_IS_REFRESH = 16U };
+  enum { LOAD_FLAGS_IS_LINK = 32U };
+  enum { LOAD_FLAGS_BYPASS_HISTORY = 64U };
+  enum { LOAD_FLAGS_REPLACE_HISTORY = 128U };
+  enum { LOAD_FLAGS_BYPASS_CACHE = 256U };
+  enum { LOAD_FLAGS_BYPASS_PROXY = 512U };
+  enum { LOAD_FLAGS_CHARSET_CHANGE = 1024U };
+  enum { LOAD_FLAGS_STOP_CONTENT = 2048U };
+  enum { LOAD_FLAGS_FROM_EXTERNAL = 4096U };
+  enum { LOAD_FLAGS_ALLOW_THIRD_PARTY_FIXUP = 8192U };
+  enum { LOAD_FLAGS_FIRST_LOAD = 16384U };
 
-    public int Stop(int stopFlags) {
-        return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 8, getAddress(), stopFlags);
-    }
+  nsresult LoadURI(PRUnichar *aURI, PRUint32 aLoadFlags, nsIURI aReferrer, nsIInputStream aPostData, nsIInputStream aHeaders);
+  nsresult Reload(PRUint32 aReloadFlags);
 
-    public int GetDocument(int /*long*/[] aDocument) {
-        return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 9, getAddress(), aDocument);
-    }
-
-    public int GetCurrentURI(int /*long*/[] aCurrentURI) {
-        return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 10, getAddress(), aCurrentURI);
-    }
+  enum { STOP_NETWORK = 1U };
+  enum { STOP_CONTENT = 2U };
+  enum { STOP_ALL = 3U };
 
-    public int GetReferringURI(int /*long*/[] aReferringURI) {
-        return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 11, getAddress(), aReferringURI);
-    }
+  nsresult Stop(PRUint32 aStopFlags);
+  nsresult GetDocument(nsIDOMDocument  *aDocument);
+  nsresult GetCurrentURI(nsIURI  *aCurrentURI);
+  nsresult GetReferringURI(nsIURI  *aReferringURI);
+  nsresult GetSessionHistory(nsISHistory  *aSessionHistory);
+  nsresult SetSessionHistory(nsISHistory  aSessionHistory);
 
-    public int GetSessionHistory(int /*long*/[] aSessionHistory) {
-        return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 12, getAddress(), aSessionHistory);
-    }
+}
 
-    public int SetSessionHistory(int /*long*/ aSessionHistory) {
-        return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 13, getAddress(), aSessionHistory);
-    }
-}