* Mono.Mozilla.dll.sources,
authorAndreia Gaita <avidigal@novell.com>
Thu, 8 Nov 2007 16:29:34 +0000 (16:29 -0000)
committerAndreia Gaita <avidigal@novell.com>
Thu, 8 Nov 2007 16:29:34 +0000 (16:29 -0000)
  Mono.Mozilla/DOM/Navigation.cs,
  Mono.Mozilla/interfaces/nsIHistoryEntry.cs,
  Mono.Mozilla/interfaces/nsIInputStream.cs,
  Mono.Mozilla/interfaces/nsISHistory.cs,
  Mono.Mozilla/interfaces/nsISHistoryListener.cs,
  Mono.Mozilla/interfaces/nsISimpleEnumerator.cs,
  Mono.Mozilla/interfaces/nsIURI.cs,
  Mono.Mozilla/interfaces/nsIWebNavigation.cs,
  Mono.WebBrowser/DOM/INavigation.cs:

Add nsIWebNavigation interface and related
dependencies to access navigation-related properties directly (CanGoBack, etc).
Add INavigation interface and implementation to expose navigation properties.
Navigation is now done through this interface (Reload(), Stop(), etc).

Please note: Due to threading issues on linux (namely, mozilla being run
on a different thread), only methods that do not affect drawing can be
invoked through the interfaces, so although Reload is now called from
the INavigation interface, it is still being routed through the Base
class and the glue code (and not through the nsIWebNavigation.Reload
call, as are other non-drawing-affecting methods like GetTitle).

* Mono.Mozilla/ICallback.cs, Callback.cs: Remove unneeded events, adjust parameters,
add support enumeration for tracking loading state.

* Mono.Mozilla/DOM/DOMHTMLDocument.cs, Mono.WebBrowser/DOM/IDOMHTMLDocument.cs:
Add URL getter.

* Mono.WebBrowser/IWebBrowser.cs, Mono.Mozilla/WebBrowser.cs:
Add Navigation interface getter.
Add Navigated event support through the StateChange and LocationChange
events.
Clean up cached objects when navigating.
Remove Reload, Forward, Stop, Home methods, these are now accessible
through the INavigation interface.

* Mono.Mozilla/Base.cs: Add call to return the navigation interface.
Add MarshalAs so that returning interfaces directly works on mono.

2007-11-08 Andreia Gaita <avidigal@novell.com>

svn path=/trunk/mcs/; revision=89207

18 files changed:
mcs/class/Mono.Mozilla/ChangeLog
mcs/class/Mono.Mozilla/Mono.Mozilla.dll.sources
mcs/class/Mono.Mozilla/Mono.Mozilla/Base.cs
mcs/class/Mono.Mozilla/Mono.Mozilla/Callback.cs
mcs/class/Mono.Mozilla/Mono.Mozilla/DOM/DOMHTMLDocument.cs
mcs/class/Mono.Mozilla/Mono.Mozilla/DOM/Navigation.cs [new file with mode: 0755]
mcs/class/Mono.Mozilla/Mono.Mozilla/ICallback.cs
mcs/class/Mono.Mozilla/Mono.Mozilla/WebBrowser.cs
mcs/class/Mono.Mozilla/Mono.Mozilla/interfaces/nsIHistoryEntry.cs [new file with mode: 0755]
mcs/class/Mono.Mozilla/Mono.Mozilla/interfaces/nsIInputStream.cs [new file with mode: 0755]
mcs/class/Mono.Mozilla/Mono.Mozilla/interfaces/nsISHistory.cs [new file with mode: 0755]
mcs/class/Mono.Mozilla/Mono.Mozilla/interfaces/nsISHistoryListener.cs [new file with mode: 0755]
mcs/class/Mono.Mozilla/Mono.Mozilla/interfaces/nsISimpleEnumerator.cs [new file with mode: 0755]
mcs/class/Mono.Mozilla/Mono.Mozilla/interfaces/nsIURI.cs [new file with mode: 0755]
mcs/class/Mono.Mozilla/Mono.Mozilla/interfaces/nsIWebNavigation.cs [new file with mode: 0755]
mcs/class/Mono.Mozilla/Mono.WebBrowser/DOM/IDOMHTMLDocument.cs
mcs/class/Mono.Mozilla/Mono.WebBrowser/DOM/INavigation.cs [new file with mode: 0755]
mcs/class/Mono.Mozilla/Mono.WebBrowser/IWebBrowser.cs

index fd3f59ce5d82022badd61fbbc74faafd41c44d25..1c1df0fcba44c67665be61d41992c2c9420f36cc 100644 (file)
@@ -1,3 +1,45 @@
+2007-11-08  Andreia Gaita  <avidigal@novell.com>\r
+\r
+       * Mono.Mozilla.dll.sources,\r
+         Mono.Mozilla/DOM/Navigation.cs,\r
+         Mono.Mozilla/interfaces/nsIHistoryEntry.cs,\r
+         Mono.Mozilla/interfaces/nsIInputStream.cs,\r
+         Mono.Mozilla/interfaces/nsISHistory.cs,\r
+         Mono.Mozilla/interfaces/nsISHistoryListener.cs,\r
+         Mono.Mozilla/interfaces/nsISimpleEnumerator.cs,\r
+         Mono.Mozilla/interfaces/nsIURI.cs,\r
+         Mono.Mozilla/interfaces/nsIWebNavigation.cs,\r
+         Mono.WebBrowser/DOM/INavigation.cs:\r
+\r
+       Add nsIWebNavigation interface and related \r
+       dependencies to access navigation-related properties directly (CanGoBack, etc). \r
+       Add INavigation interface and implementation to expose navigation properties. \r
+       Navigation is now done through this interface (Reload(), Stop(), etc).\r
+       \r
+       Please note: Due to threading issues on linux (namely, mozilla being run \r
+       on a different thread), only methods that do not affect drawing can be \r
+       invoked through the interfaces, so although Reload is now called from \r
+       the INavigation interface, it is still being routed through the Base \r
+       class and the glue code (and not through the nsIWebNavigation.Reload \r
+       call, as are other non-drawing-affecting methods like GetTitle).\r
+\r
+       * Mono.Mozilla/ICallback.cs, Callback.cs: Remove unneeded events, adjust parameters, \r
+       add support enumeration for tracking loading state.\r
+\r
+       * Mono.Mozilla/DOM/DOMHTMLDocument.cs, Mono.WebBrowser/DOM/IDOMHTMLDocument.cs: \r
+       Add URL getter.\r
+\r
+       * Mono.WebBrowser/IWebBrowser.cs, Mono.Mozilla/WebBrowser.cs: \r
+       Add Navigation interface getter.\r
+       Add Navigated event support through the StateChange and LocationChange\r
+       events.\r
+       Clean up cached objects when navigating.\r
+       Remove Reload, Forward, Stop, Home methods, these are now accessible \r
+       through the INavigation interface.\r
+\r
+       * Mono.Mozilla/Base.cs: Add call to return the navigation interface. \r
+       Add MarshalAs so that returning interfaces directly works on mono.\r
+\r
 2007-10-31  Andreia Gaita  <avidigal@novell.com>\r
 \r
        * Base.cs: Send (and create if needed) user dir to store local mozilla data\r
index 83d76d177e9544d5b55e8cc5da78be91aa35e143..16a205a18dfc76d4a53c5426e5f6cb1940c7584e 100644 (file)
@@ -8,6 +8,7 @@ Mono.Mozilla/DOM/DOMHTMLDocument.cs
 Mono.Mozilla/DOM/DOMHTMLElement.cs
 Mono.Mozilla/DOM/DOMNode.cs
 Mono.Mozilla/DOM/DOMObject.cs
+Mono.Mozilla/DOM/Navigation.cs
 Mono.Mozilla/interfaces/nsIDOMAttr.cs
 Mono.Mozilla/interfaces/nsIDOMCDATASection.cs
 Mono.Mozilla/interfaces/nsIDOMCharacterData.cs
@@ -27,8 +28,16 @@ Mono.Mozilla/interfaces/nsIDOMNode.cs
 Mono.Mozilla/interfaces/nsIDOMNodeList.cs
 Mono.Mozilla/interfaces/nsIDOMProcessingInstruction.cs
 Mono.Mozilla/interfaces/nsIDOMText.cs
+Mono.Mozilla/interfaces/nsIHistoryEntry.cs
+Mono.Mozilla/interfaces/nsIInputStream.cs
+Mono.Mozilla/interfaces/nsISHistory.cs
+Mono.Mozilla/interfaces/nsISHistoryListener.cs
+Mono.Mozilla/interfaces/nsISimpleEnumerator.cs
+Mono.Mozilla/interfaces/nsIURI.cs
+Mono.Mozilla/interfaces/nsIWebNavigation.cs
 Mono.WebBrowser/IWebBrowser.cs
 Mono.WebBrowser/Manager.cs
 Mono.WebBrowser/DOM/IDOMHTMLDocument.cs
 Mono.WebBrowser/DOM/IDOMHTMLElement.cs
 Mono.WebBrowser/DOM/IDOMNode.cs
+Mono.WebBrowser/DOM/INavigation.cs
index 2f476e117532406adaf5e5a9e2428d5c29ec213c..d6d0ee5c3a1af696da8bbf460f4f190569427fd1 100644 (file)
@@ -228,7 +228,16 @@ namespace Mono.Mozilla
                                return null;\r
                        BindingInfo info = getBinding (control);\r
 \r
-                       return gluezilla_getDomDocument (info.gluezilla);\r
+                       return gluezilla_getDomDocument (info.gluezilla);
+               }\r
+\r
+               public static nsIWebNavigation GetWebNavigation (IWebBrowser control)\r
+               {\r
+                       if (!isInitialized ())\r
+                               return null;\r
+                       BindingInfo info = getBinding (control);\r
+\r
+                       return gluezilla_getWebNavigation (info.gluezilla);\r
                }\r
 \r
                public static IntPtr StringInit ()\r
@@ -292,8 +301,12 @@ namespace Mono.Mozilla
                private static extern int gluezilla_reload (IntPtr instance, ReloadOption option);\r
 \r
                // dom\r
-               [DllImport ("gluezilla")]\r
+               [DllImport ("gluezilla")]
+               [return:MarshalAs(UnmanagedType.Interface)]\r
                private static extern nsIDOMHTMLDocument gluezilla_getDomDocument (IntPtr instance);\r
+               [DllImport ("gluezilla")]
+               [return:MarshalAs(UnmanagedType.Interface)]\r
+               private static extern nsIWebNavigation gluezilla_getWebNavigation (IntPtr instance);\r
 \r
                [DllImport ("gluezilla")]\r
                private static extern IntPtr gluezilla_stringInit ();\r
index f8efc02267a980b480b48ed0b6a1657fc0f56eec..39ed42ec0caa055f19e2a34cc6b4880bd2586b98 100644 (file)
@@ -32,58 +32,58 @@ namespace Mono.Mozilla {
 \r
        public delegate void CallbackDelegate ();\r
 \r
-       public delegate void CallbackDelegateStringString       (string arg1, string arg2);\r
+       public delegate void CallbackDelegateString (string arg1);\r
+       public delegate void CallbackDelegateStringString (string arg1, string arg2);\r
        public delegate void CallbackDelegateStringInt          (string arg1, Int32 arg2);\r
        public delegate void CallbackDelegateStringIntInt       (string arg1, Int32 arg2, Int32 arg3);\r
        public delegate void CallbackDelegateStringIntUint      (string arg1, Int32 arg2, UInt32 arg3);\r
 \r
 \r
-       public delegate void CallbackDelegateIntInt                     (Int32 arg1, Int32 arg2);\r
+       public delegate void CallbackDelegateIntInt                     (Int32 arg1, Int32 arg2);
+       public delegate void CallbackDelegateIntUint                    (Int32 arg2, UInt32 arg3);\r
 \r
        public delegate void CallbackDelegateUint                       (UInt32 arg1);\r
-       public delegate void CallbackDelegateUintInt            (UInt32 arg1, Int32 arg2);\r
+       public delegate void CallbackDelegateUintInt                    (UInt32 arg1, Int32 arg2);\r
 \r
        public delegate void CallbackDelegatePtrPtr                     (IntPtr arg1, IntPtr arg2);\r
 \r
-       //Don't have to worry about marshelling bool, PRBool seems very constant and uses 4 bit int underneath\r
+       //Don't have to worry about marshalling bool, PRBool seems very constant and uses 4 bit int underneath\r
        public delegate void CallbackDelegateBool                       (bool val);
        
        public delegate bool DomKeyCallbackDelegate                     (KeyInfo keyInfo, ModifierKeys modifiers);
        public delegate bool MouseCallbackDelegate                      (MouseInfo mouseInfo, ModifierKeys modifiers);\r
 \r
-       public delegate void GetControlSizeCallbackDelegate (ref SizeInfo sz);\r
-\r
-       public delegate void GenericCallbackDelegate            (IntPtr type);\r
+       public delegate void GenericCallbackDelegate                    (IntPtr type);\r
 \r
        public delegate bool CallbackDelegate2                          ();\r
-       public delegate bool CallbackDelegate2String            (string arg1);\r
+       public delegate bool CallbackDelegate2String                    (string arg1);\r
 
 
        public delegate bool CallbackDelegate2OnAlertCheck      (IntPtr title, IntPtr text, IntPtr chkMsg, ref bool chkState);
        public delegate bool CallbackDelegate2OnConfirm         (IntPtr title, IntPtr text);
-       public delegate bool CallbackDelegate2OnConfirmCheck(IntPtr title, IntPtr text, IntPtr chkMsg, ref bool chkState);\r
+       public delegate bool CallbackDelegate2OnConfirmCheck    (IntPtr title, IntPtr text, IntPtr chkMsg, ref bool chkState);\r
        public delegate bool CallbackDelegate2OnConfirmEx       (IntPtr title, IntPtr text, Mono.WebBrowser.DialogButtonFlags flags, 
-                                                                                                                IntPtr title0, IntPtr title1, IntPtr title2,\r
-                                                                                                                IntPtr chkMsg, ref bool chkState, out Int32 retVal);\r
+                                                                                                                        IntPtr title0, IntPtr title1, IntPtr title2,\r
+                                                                                                                        IntPtr chkMsg, ref bool chkState, out Int32 retVal);\r
        public delegate bool CallbackDelegate2OnPrompt          (IntPtr title, IntPtr text,\r
-                                                                                                                ref IntPtr retVal);\r
+                                                                                                                        ref IntPtr retVal);\r
        public delegate bool CallbackDelegate2OnPromptUsernameAndPassword \r
-                                                                                                               (IntPtr title, IntPtr text,\r
-                                                                                                                IntPtr chkMsg, ref bool chkState, \r
-                                                                                                                out IntPtr username, out IntPtr password);\r
+                                                                                                                       (IntPtr title, IntPtr text,\r
+                                                                                                                        IntPtr chkMsg, ref bool chkState, \r
+                                                                                                                        out IntPtr username, out IntPtr password);\r
        public delegate bool CallbackDelegate2OnPromptPassword\r
-                                                                                                               (IntPtr title, IntPtr text,\r
-                                                                                                                IntPtr chkMsg, ref bool chkState, 
-                                                                                                                out IntPtr password);\r
+                                                                                                                       (IntPtr title, IntPtr text,\r
+                                                                                                                        IntPtr chkMsg, ref bool chkState, 
+                                                                                                                        out IntPtr password);\r
        public delegate bool CallbackDelegate2OnSelect          (IntPtr title, IntPtr text, 
-                                                                                                                UInt32 count, IntPtr list, 
-                                                                                                                out Int32 retVal);
+                                                                                                                        UInt32 count, IntPtr list, 
+                                                                                                                        out Int32 retVal);
 
        
        [StructLayout (LayoutKind.Sequential)]
        public struct CallbackBinder {
                
-               public CallbackDelegate                                 OnWidgetLoaded;
+               public CallbackDelegate                         OnWidgetLoaded;
                public CallbackDelegate                                 OnJSStatus;
                public CallbackDelegate                                 OnLinkStatus;
                public CallbackDelegate                                 OnDestroyBrowser;\r
@@ -91,19 +91,18 @@ namespace Mono.Mozilla {
                public CallbackDelegate                                 OnFocusNext;
                public CallbackDelegate                                 OnFocusPrev;
                public CallbackDelegate                                 OnTitleChanged;\r
-               public CallbackDelegateStringIntInt             OnShowTooltipWindow;
+               public CallbackDelegateStringIntInt     OnShowTooltipWindow;
                public CallbackDelegate                                 OnHideTooltipWindow;
                public CallbackDelegate                                 OnStateNetStart;
                public CallbackDelegate                                 OnStateNetStop;\r
                public CallbackDelegateUintInt                  OnStateSpecial;\r
-               public CallbackDelegateStringIntUint    OnStateChange;\r
+               public CallbackDelegateIntUint          OnStateChange;\r
                public CallbackDelegateIntInt                   OnProgress;\r
-               public CallbackDelegateStringIntInt             OnProgressAll;
-               public CallbackDelegate                                 OnLocationChanged;\r
+               public CallbackDelegateStringIntInt     OnProgressAll;
+               public CallbackDelegateString                           OnLocationChanged;\r
                public CallbackDelegateStringInt                OnStatusChange;\r
-               public CallbackDelegateUint                             OnSecurityChange;\r
-               public CallbackDelegateBool                             OnVisibility;
-               public GetControlSizeCallbackDelegate   GetControlSize;
+               public CallbackDelegateUint                     OnSecurityChange;\r
+               public CallbackDelegateBool                     OnVisibility;
                public DomKeyCallbackDelegate                   OnDomKeyDown;
                public DomKeyCallbackDelegate                   OnDomKeyUp;
                public DomKeyCallbackDelegate                   OnDomKeyPress;
@@ -117,7 +116,7 @@ namespace Mono.Mozilla {
                public CallbackDelegate2                                OnFocusIn;\r
                public CallbackDelegate2                                OnFocusOut;\r
                public CallbackDelegate2String                  OnBeforeURIOpen;\r
-               public CallbackDelegate                                 OnFocus;\r
+               public CallbackDelegate                         OnFocus;\r
                public CallbackDelegate2                                OnCreateNewWindow;\r
                public CallbackDelegatePtrPtr                   OnAlert;
 
@@ -133,52 +132,51 @@ namespace Mono.Mozilla {
                public GenericCallbackDelegate                  OnGeneric;
                
                internal CallbackBinder (ICallback callback) {
-                       this.OnWidgetLoaded                     = new CallbackDelegate (callback.OnWidgetLoaded);
-                       this.GetControlSize                     = new GetControlSizeCallbackDelegate (callback.GetControlSize);
-                       this.OnJSStatus                         = new CallbackDelegate (callback.OnJSStatus);
+                       this.OnWidgetLoaded             = new CallbackDelegate (callback.OnWidgetLoaded);
+                       this.OnJSStatus                 = new CallbackDelegate (callback.OnJSStatus);
                        this.OnLinkStatus                       = new CallbackDelegate (callback.OnLinkStatus);
                        this.OnDestroyBrowser           = new CallbackDelegate (callback.OnDestroyBrowser);\r
                        this.OnSizeTo                           = new CallbackDelegateIntInt (callback.OnClientSizeTo);
                        this.OnFocusNext                        = new CallbackDelegate (callback.OnFocusNext);
                        this.OnFocusPrev                        = new CallbackDelegate (callback.OnFocusPrev);
-                       this.OnTitleChanged                     = new CallbackDelegate (callback.OnTitleChanged);\r
+                       this.OnTitleChanged             = new CallbackDelegate (callback.OnTitleChanged);\r
                        this.OnShowTooltipWindow        = new CallbackDelegateStringIntInt (callback.OnShowTooltipWindow);
                        this.OnHideTooltipWindow        = new CallbackDelegate (callback.OnHideTooltipWindow);
                        this.OnStateNetStart            = new CallbackDelegate (callback.OnStateNetStart);
-                       this.OnStateNetStop                     = new CallbackDelegate (callback.OnStateNetStop);\r
-                       this.OnStateSpecial                     = new CallbackDelegateUintInt (callback.OnStateSpecial);\r
-                       this.OnStateChange                      = new CallbackDelegateStringIntUint (callback.OnStateChange);\r
-                       this.OnProgress                         = new CallbackDelegateIntInt (callback.OnProgress);\r
+                       this.OnStateNetStop             = new CallbackDelegate (callback.OnStateNetStop);\r
+                       this.OnStateSpecial             = new CallbackDelegateUintInt (callback.OnStateSpecial);\r
+                       this.OnStateChange                      = new CallbackDelegateIntUint (callback.OnStateChange);\r
+                       this.OnProgress                 = new CallbackDelegateIntInt (callback.OnProgress);\r
                        this.OnProgressAll                      = new CallbackDelegateStringIntInt (callback.OnProgressAll);
-                       this.OnLocationChanged          = new CallbackDelegate (callback.OnLocationChanged);\r
-                       this.OnStatusChange                     = new CallbackDelegateStringInt (callback.OnStatusChange);\r
+                       this.OnLocationChanged          = new CallbackDelegateString (callback.OnLocationChanged);\r
+                       this.OnStatusChange             = new CallbackDelegateStringInt (callback.OnStatusChange);\r
                        this.OnSecurityChange           = new CallbackDelegateUint (callback.OnSecurityChange);\r
                        this.OnVisibility                       = new CallbackDelegateBool (callback.OnVisibility);
                        this.OnDomKeyDown                       = new DomKeyCallbackDelegate (callback.OnClientDomKeyDown);
-                       this.OnDomKeyUp                         = new DomKeyCallbackDelegate (callback.OnClientDomKeyUp);
+                       this.OnDomKeyUp                 = new DomKeyCallbackDelegate (callback.OnClientDomKeyUp);
                        this.OnDomKeyPress                      = new DomKeyCallbackDelegate (callback.OnClientDomKeyPress);
                        this.OnMouseDown                        = new MouseCallbackDelegate (callback.OnClientMouseDown);
                        this.OnMouseUp                          = new MouseCallbackDelegate (callback.OnClientMouseUp);
                        this.OnMouseClick                       = new MouseCallbackDelegate (callback.OnClientMouseClick);
-                       this.OnMouseDoubleClick         = new MouseCallbackDelegate (callback.OnClientMouseDoubleClick);
+                       this.OnMouseDoubleClick = new MouseCallbackDelegate (callback.OnClientMouseDoubleClick);
                        this.OnMouseOver                        = new MouseCallbackDelegate (callback.OnClientMouseOver);
-                       this.OnMouseOut                         = new MouseCallbackDelegate (callback.OnClientMouseOut);\r
-                       this.OnActivate                         = new CallbackDelegate2 (callback.OnClientActivate);\r
+                       this.OnMouseOut                 = new MouseCallbackDelegate (callback.OnClientMouseOut);\r
+                       this.OnActivate                 = new CallbackDelegate2 (callback.OnClientActivate);\r
                        this.OnFocusIn                          = new CallbackDelegate2 (callback.OnClientFocusIn);\r
-                       this.OnFocusOut                         = new CallbackDelegate2 (callback.OnClientFocusOut);\r
+                       this.OnFocusOut                 = new CallbackDelegate2 (callback.OnClientFocusOut);\r
                        this.OnBeforeURIOpen            = new CallbackDelegate2String (callback.OnBeforeURIOpen);\r
                        this.OnFocus                            = new CallbackDelegate (callback.OnFocus);\r
                        this.OnCreateNewWindow          = new CallbackDelegate2 (callback.OnCreateNewWindow);\r
                        this.OnAlert                            = new CallbackDelegatePtrPtr (callback.OnAlert);\r
 \r
-                       this.OnAlertCheck= new CallbackDelegate2OnAlertCheck (callback.OnAlertCheck);\r
-                       this.OnConfirm = new CallbackDelegate2OnConfirm (callback.OnConfirm);\r
-                       this.OnConfirmCheck = new CallbackDelegate2OnConfirmCheck (callback.OnConfirmCheck);\r
-                       this.OnConfirmEx = new CallbackDelegate2OnConfirmEx (callback.OnConfirmEx);\r
-                       this.OnPrompt = new CallbackDelegate2OnPrompt (callback.OnPrompt);\r
+                       this.OnAlertCheck                       = new CallbackDelegate2OnAlertCheck (callback.OnAlertCheck);\r
+                       this.OnConfirm                  = new CallbackDelegate2OnConfirm (callback.OnConfirm);\r
+                       this.OnConfirmCheck             = new CallbackDelegate2OnConfirmCheck (callback.OnConfirmCheck);\r
+                       this.OnConfirmEx                        = new CallbackDelegate2OnConfirmEx (callback.OnConfirmEx);\r
+                       this.OnPrompt                           = new CallbackDelegate2OnPrompt (callback.OnPrompt);\r
                        this.OnPromptUsernameAndPassword = new CallbackDelegate2OnPromptUsernameAndPassword (callback.OnPromptUsernameAndPassword);\r
-                       this.OnPromptPassword = new CallbackDelegate2OnPromptPassword (callback.OnPromptPassword);\r
-                       this.OnSelect = new CallbackDelegate2OnSelect (callback.OnSelect);
+                       this.OnPromptPassword           = new CallbackDelegate2OnPromptPassword (callback.OnPromptPassword);\r
+                       this.OnSelect                           = new CallbackDelegate2OnSelect (callback.OnSelect);
 \r
 \r
                        this.OnGeneric                          = new GenericCallbackDelegate (callback.OnGeneric);\r
index 486e84240a585fd1c067c72f7060d00ea2d6b8d1..59e276427d7b0f50c5881c268769ccbf8683ab2e 100644 (file)
@@ -60,6 +60,15 @@ namespace Mono.Mozilla.DOM
                                this.document.setTitle (storage);\r
                        }\r
                }\r
+\r
+               public string Url {\r
+                       get\r
+                       {\r
+                               this.document.getURL (storage);\r
+                               return Base.StringGet (storage);\r
+                       }\r
+               }\r
+\r
                public IDOMHTMLElement getElementById (string id)\r
                {\r
                        nsIDOMElement nsElement;\r
diff --git a/mcs/class/Mono.Mozilla/Mono.Mozilla/DOM/Navigation.cs b/mcs/class/Mono.Mozilla/Mono.Mozilla/DOM/Navigation.cs
new file mode 100755 (executable)
index 0000000..187ca2a
--- /dev/null
@@ -0,0 +1,95 @@
+// Permission is hereby granted, free of charge, to any person obtaining\r
+// a copy of this software and associated documentation files (the\r
+// "Software"), to deal in the Software without restriction, including\r
+// without limitation the rights to use, copy, modify, merge, publish,\r
+// distribute, sublicense, and/or sell copies of the Software, and to\r
+// permit persons to whom the Software is furnished to do so, subject to\r
+// the following conditions:\r
+// \r
+// The above copyright notice and this permission notice shall be\r
+// included in all copies or substantial portions of the Software.\r
+// \r
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,\r
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\r
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND\r
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE\r
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION\r
+// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION\r
+// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\r
+//\r
+// Copyright (c) 2007 Novell, Inc.\r
+//\r
+// Authors:\r
+//     Andreia Gaita (avidigal@novell.com)\r
+//\r
+\r
+using System;\r
+using System.Runtime.InteropServices;\r
+using System.Text;\r
+using Mono.WebBrowser;\r
+using Mono.WebBrowser.DOM;\r
+\r
+namespace Mono.Mozilla.DOM\r
+{\r
+       internal class Navigation: INavigation\r
+       {\r
+\r
+               private nsIWebNavigation webNav;\r
+               private IWebBrowser control;\r
+               public Navigation (IWebBrowser control, nsIWebNavigation webNav)\r
+               {\r
+                       this.webNav = webNav;\r
+                       this.control = control;\r
+               }\r
+\r
+               #region INavigation Members\r
+\r
+               public bool CanGoBack {\r
+                       get {\r
+                               bool canGoBack;\r
+                               webNav.CanGoBack (out canGoBack);\r
+                               return canGoBack;\r
+                       }\r
+               }\r
+\r
+               public bool CanGoForward {\r
+                       get {\r
+                               bool canGoForward;\r
+                               webNav.CanGoForward (out canGoForward);\r
+                               return canGoForward;\r
+                       }\r
+               }\r
+\r
+               public bool Back ()\r
+               {\r
+                       return Base.Back (control);\r
+               }\r
+\r
+               public bool Forward ()\r
+               {\r
+                       return Base.Forward (control);\r
+               }\r
+\r
+               public void Home ()\r
+               {\r
+                       Base.Home (control);\r
+               }\r
+\r
+               public void Reload ()\r
+               {\r
+                       Base.Reload (control, ReloadOption.None);\r
+               }\r
+\r
+               public void Reload (ReloadOption option)\r
+               {\r
+                       Base.Reload (control, option);\r
+               }\r
+\r
+               public void Stop ()\r
+               {\r
+                       Base.Stop (control);\r
+               }\r
+\r
+               #endregion\r
+       }\r
+}\r
index 3c8aa93071f5d00ad035369c837dcd80c7faca31..bc338b17308a36d4da24a29acedd2cfcc33b2fd6 100644 (file)
@@ -31,37 +31,36 @@ namespace Mono.Mozilla
 {\r
        internal interface ICallback\r
        {\r
-               void OnWidgetLoaded                             ();\r
+               void OnWidgetLoaded                     ();\r
 \r
-               void GetControlSize                             (ref SizeInfo sz);\r
-               void OnJSStatus                                 ();\r
+               void OnJSStatus                         ();\r
                void OnLinkStatus                               ();\r
                void OnDestroyBrowser                   ();\r
-               void OnClientSizeTo                             (Int32 width, Int32 height);\r
+               void OnClientSizeTo                     (Int32 width, Int32 height);\r
                void OnFocusNext                                ();\r
                void OnFocusPrev                                ();\r
-               void OnTitleChanged                             ();\r
+               void OnTitleChanged                     ();\r
                void OnShowTooltipWindow                (string tiptext, Int32 x, Int32 y);\r
                void OnHideTooltipWindow                ();\r
                void OnStateNetStart                    ();\r
-               void OnStateNetStop                             ();\r
-               void OnStateSpecial                             (UInt32 stateFlags, Int32 status);\r
-               void OnStateChange                              (string URI, Int32 status, UInt32 stateFlags);\r
-               void OnProgress                                 (Int32 currentTotalProgress, Int32 maxTotalProgress);\r
+               void OnStateNetStop                     ();\r
+               void OnStateSpecial                     (UInt32 stateFlags, Int32 status);\r
+               void OnStateChange                              (Int32 status, UInt32 state);\r
+               void OnProgress                         (Int32 currentTotalProgress, Int32 maxTotalProgress);\r
                void OnProgressAll                              (string URI, Int32 currentTotalProgress, Int32 maxTotalProgress);\r
-               void OnLocationChanged                  ();\r
-               void OnStatusChange                             (string message, Int32 status);\r
+               void OnLocationChanged          (string URI);\r
+               void OnStatusChange                     (string message, Int32 status);\r
                void OnSecurityChange                   (UInt32 state);\r
                void OnVisibility                               (bool val);\r
 \r
                //Don't have to worry about marshelling bool, bool seems very constant and uses 4 bit int underneath\r
-               bool OnClientDomKeyDown                 (KeyInfo keyInfo, ModifierKeys modKey);\r
+               bool OnClientDomKeyDown         (KeyInfo keyInfo, ModifierKeys modKey);\r
                bool OnClientDomKeyUp                   (KeyInfo keyInfo, ModifierKeys modKey);\r
                bool OnClientDomKeyPress                (KeyInfo keyInfo, ModifierKeys modKey);\r
 \r
                bool OnClientMouseDown                  (MouseInfo mouseInfo, ModifierKeys modifiers);\r
                bool OnClientMouseUp                    (MouseInfo mouseInfo, ModifierKeys modifiers);\r
-               bool OnClientMouseClick                 (MouseInfo mouseInfo, ModifierKeys modifiers);\r
+               bool OnClientMouseClick         (MouseInfo mouseInfo, ModifierKeys modifiers);\r
                bool OnClientMouseDoubleClick   (MouseInfo mouseInfo, ModifierKeys modifiers);\r
                bool OnClientMouseOver                  (MouseInfo mouseInfo, ModifierKeys modifiers);\r
                bool OnClientMouseOut                   (MouseInfo mouseInfo, ModifierKeys modifiers);\r
@@ -81,7 +80,7 @@ namespace Mono.Mozilla
                void OnAlert                                    (IntPtr title, IntPtr text);\r
                bool OnAlertCheck                               (IntPtr title, IntPtr text, IntPtr chkMsg, ref bool chkState);
                bool OnConfirm                                  (IntPtr title, IntPtr text);
-               bool OnConfirmCheck                             (IntPtr title, IntPtr text, IntPtr chkMsg, ref bool chkState);\r
+               bool OnConfirmCheck                     (IntPtr title, IntPtr text, IntPtr chkMsg, ref bool chkState);\r
 \r
                bool OnConfirmEx                                (IntPtr title, IntPtr text, Mono.WebBrowser.DialogButtonFlags flags, 
                                                                                 IntPtr title0, IntPtr title1, IntPtr title2,\r
@@ -142,5 +141,26 @@ namespace Mono.Mozilla
                public UInt32 charCode;\r
                public UInt32 keyCode;\r
        }
+       
+       [Flags]
+       internal enum StateFlags
+       {
+               Start = 1,
+               Redirecting = 2,
+               Transferring = 4,
+               Negotiating = 8,
+               Stop = 16,
+               IsRequest = 65536,
+               IsDocument =    131072,
+               IsNetwork = 262144,
+               IsWindow = 524288,
+               Restoring = 16777216,
+               IsInsecure = 4,
+               IsBroken = 1,
+               IsSecure = 2,
+               SecureHigh = 262144,
+               SecureMed = 65536,
+               SecureLow = 131072
+       }
 \r
 }\r
index aafe97fda5d8373edc41c43de446f27e38ae9f9b..99466f8fa5894b3843353c4b86ddd5b2ae78a278 100644 (file)
@@ -41,6 +41,7 @@ namespace Mono.Mozilla
        {\r
                private bool loaded;\r
                private IDOMHTMLDocument document;\r
+               private INavigation navigation;\r
 \r
                public WebBrowser ()\r
                {\r
@@ -70,6 +71,17 @@ namespace Mono.Mozilla
                        }\r
                }\r
 \r
+               public INavigation Navigation\r
+               {\r
+                       get\r
+                       {\r
+                               if (navigation == null) {\r
+                                       nsIWebNavigation webNav = Base.GetWebNavigation (this);\r
+                                       navigation = new DOM.Navigation (this, webNav);\r
+                               }\r
+                               return navigation;\r
+                       }\r
+               }\r
 \r
                #region Layout\r
                public void FocusIn (FocusOption focus)\r
@@ -95,61 +107,15 @@ namespace Mono.Mozilla
                        Base.Resize (this, width, height);\r
                }\r
 \r
-               #endregion\r
-\r
-               #region Navigation\r
-               public void Navigate (string uri)\r
+               public void Navigate (string url)\r
                {\r
-                       Base.Navigate (this, uri);\r
+                       this.document = null;\r
+                       this.navigation = null;\r
+                       Base.Navigate (this, url);\r
                }\r
 \r
-               /// <summary>\r
-               /// Navigate to the next page in history\r
-               /// </summary>\r
-               /// <returns>False if it can't navigate forward</returns>\r
-               public bool Forward ()\r
-               {\r
-                       return Base.Forward (this);\r
-               }\r
-\r
-               /// <summary>\r
-               /// Navigate to the previous page in history\r
-               /// </summary>\r
-               /// <returns>False if it can't navigate back</returns>\r
-               public bool Back ()\r
-               {\r
-                       return Base.Back (this);\r
-               }\r
-\r
-               public void Home ()\r
-               {\r
-                       Base.Home (this);\r
-               }\r
-\r
-               /// <summary>\r
-               /// Stop all activity\r
-               /// </summary>\r
-               public void Stop ()\r
-               {\r
-                       Base.Stop (this);\r
-               }\r
-\r
-               /// <summary>\r
-               /// Reload the current page in the browser\r
-               /// </summary>\r
-               public void Reload ()\r
-               {\r
-                       Base.Reload (this, ReloadOption.None);\r
-               }\r
-\r
-               public void Reload (ReloadOption option)\r
-               {\r
-                       Base.Reload (this, option);\r
-               }\r
                #endregion\r
 \r
-\r
-\r
                #region Events\r
                static object KeyDownEvent = new object ();\r
                public event EventHandler KeyDown\r
@@ -234,6 +200,14 @@ namespace Mono.Mozilla
                        remove { Events.RemoveHandler (AlertEvent, value); }\r
                }\r
 \r
+
+               static object NavigatedEvent = new object ();\r
+               public event EventHandler Navigated\r
+               {\r
+                       add { Events.AddHandler (NavigatedEvent, value); }\r
+                       remove { Events.RemoveHandler (NavigatedEvent, value); }\r
+               }\r
+
                #endregion\r
 \r
 \r
@@ -244,12 +218,6 @@ namespace Mono.Mozilla
                        //                      loaded = true;\r
                }\r
 \r
-\r
-               public void GetControlSize (ref SizeInfo sz)\r
-               {\r
-                       // TODO:  Add WebBrowser.GetControlSize implementation\r
-               }\r
-\r
                public void OnJSStatus ()\r
                {\r
                        // TODO:  Add WebBrowser.OnJSStatus implementation\r
@@ -310,9 +278,16 @@ namespace Mono.Mozilla
                        // TODO:  Add WebBrowser.OnStateSpecial implementation\r
                }\r
 \r
-               public void OnStateChange (string URI, Int32 status, UInt32 stateFlags)\r
+               public void OnStateChange (Int32 status, UInt32 state)\r
                {\r
-                       // TODO:  Add WebBrowser.OnStateChange implementation\r
+                       //if ((state & (uint) StateFlags.Start) != 0 && (state & (uint) StateFlags.IsDocument) != 0)
+                       //{\r
+                       //    EventHandler eh = (EventHandler) (Events[NavigatedEvent]);\r
+                       //    if (eh != null) {\r
+                       //        EventArgs e = new EventArgs ();\r
+                       //        eh (this, e);\r
+                       //    }
+                       //}\r
                }\r
 \r
                public void OnProgress (Int32 currentTotalProgress, Int32 maxTotalProgress)\r
@@ -325,9 +300,13 @@ namespace Mono.Mozilla
                        // TODO:  Add WebBrowser.OnProgressAll implementation\r
                }\r
 \r
-               public void OnLocationChanged ()\r
+               public void OnLocationChanged (string uri)\r
                {\r
-                       // TODO:  Add WebBrowser.OnLocationChanged implementation\r
+                       EventHandler eh = (EventHandler) (Events[NavigatedEvent]);\r
+                       if (eh != null) {\r
+                               EventArgs e = new EventArgs ();\r
+                               eh (this, e);\r
+                       }\r
                }\r
 \r
                public void OnStatusChange (string message, Int32 status)\r
@@ -504,7 +483,6 @@ namespace Mono.Mozilla
 \r
                public bool OnAlertCheck (IntPtr title, IntPtr text, IntPtr chkMsg, ref bool chkState)\r
                {\r
-                       Console.WriteLine ("alert check");\r
                        AlertEventHandler eh = (AlertEventHandler) (Events[AlertEvent]);\r
                        if (eh != null) {\r
                                AlertEventArgs e = new AlertEventArgs ();\r
diff --git a/mcs/class/Mono.Mozilla/Mono.Mozilla/interfaces/nsIHistoryEntry.cs b/mcs/class/Mono.Mozilla/Mono.Mozilla/interfaces/nsIHistoryEntry.cs
new file mode 100755 (executable)
index 0000000..abec61d
--- /dev/null
@@ -0,0 +1,53 @@
+// Permission is hereby granted, free of charge, to any person obtaining\r
+// a copy of this software and associated documentation files (the\r
+// "Software"), to deal in the Software without restriction, including\r
+// without limitation the rights to use, copy, modify, merge, publish,\r
+// distribute, sublicense, and/or sell copies of the Software, and to\r
+// permit persons to whom the Software is furnished to do so, subject to\r
+// the following conditions:\r
+// \r
+// The above copyright notice and this permission notice shall be\r
+// included in all copies or substantial portions of the Software.\r
+// \r
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,\r
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\r
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND\r
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE\r
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION\r
+// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION\r
+// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\r
+//\r
+// Copyright (c) 2007 Novell, Inc.\r
+//\r
+// Authors:\r
+//     Andreia Gaita (avidigal@novell.com)\r
+//\r
+\r
+using System;\r
+using System.Text;\r
+using System.Runtime.InteropServices;\r
+using System.Runtime.CompilerServices;\r
+\r
+namespace Mono.Mozilla\r
+{\r
+\r
+       [Guid ("a41661d4-1417-11d5-9882-00c04fa02f40")]\r
+       [InterfaceType (ComInterfaceType.InterfaceIsIUnknown)]\r
+       [ComImport ()]\r
+       internal interface nsIHistoryEntry\r
+       {\r
+               [PreserveSigAttribute]\r
+               [MethodImpl (MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]\r
+               int GetURI ([MarshalAs (UnmanagedType.Interface)] out nsIURI aURI);\r
+\r
+\r
+               [PreserveSigAttribute]\r
+               [MethodImpl (MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]\r
+               int GetTitle (StringBuilder aTitle);\r
+\r
+\r
+               [PreserveSigAttribute]\r
+               [MethodImpl (MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]\r
+               int GetIsSubFrame (out bool aIsSubFrame);\r
+       }\r
+}\r
diff --git a/mcs/class/Mono.Mozilla/Mono.Mozilla/interfaces/nsIInputStream.cs b/mcs/class/Mono.Mozilla/Mono.Mozilla/interfaces/nsIInputStream.cs
new file mode 100755 (executable)
index 0000000..4184de2
--- /dev/null
@@ -0,0 +1,91 @@
+// Permission is hereby granted, free of charge, to any person obtaining\r
+// a copy of this software and associated documentation files (the\r
+// "Software"), to deal in the Software without restriction, including\r
+// without limitation the rights to use, copy, modify, merge, publish,\r
+// distribute, sublicense, and/or sell copies of the Software, and to\r
+// permit persons to whom the Software is furnished to do so, subject to\r
+// the following conditions:\r
+// \r
+// The above copyright notice and this permission notice shall be\r
+// included in all copies or substantial portions of the Software.\r
+// \r
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,\r
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\r
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND\r
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE\r
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION\r
+// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION\r
+// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\r
+//\r
+// Copyright (c) 2007 Novell, Inc.\r
+//\r
+// Authors:\r
+//     Andreia Gaita (avidigal@novell.com)\r
+//\r
+\r
+/***\r
+ * From nsIInputStream.h:\r
+ * \r
+ * The signature of the writer function passed to ReadSegments. This\r
+ * is the "consumer" of data that gets read from the stream's buffer.\r
+ *\r
+ * @param aInStream stream being read\r
+ * @param aClosure opaque parameter passed to ReadSegments\r
+ * @param aFromSegment pointer to memory owned by the input stream\r
+ * @param aToOffset amount already read (since ReadSegments was called)\r
+ * @param aCount length of fromSegment\r
+ * @param aWriteCount number of bytes read\r
+ *\r
+ * Implementers should return the following:\r
+ *\r
+ * @return NS_OK and (*aWriteCount > 0) if consumed some data\r
+ * @return <any-error> if not interested in consuming any data\r
+ *\r
+ * Errors are never passed to the caller of ReadSegments.\r
+ *\r
+ * NOTE: returning NS_OK and (*aWriteCount = 0) has undefined behavior.\r
+ *\r
+ * @status FROZEN\r
+ * typedef NS_CALLBACK(nsWriteSegmentFun)(nsIInputStream *aInStream,\r
+                                       void *aClosure,\r
+                                       const char *aFromSegment,\r
+                                       PRUint32 aToOffset,\r
+                                       PRUint32 aCount,\r
+                                       PRUint32 *aWriteCount);\r
+*/\r
+\r
+\r
+using System;\r
+using System.Text;\r
+using System.Runtime.InteropServices;\r
+using System.Runtime.CompilerServices;\r
+\r
+namespace Mono.Mozilla\r
+{\r
+\r
+       [Guid ("fa9c7f6c-61b3-11d4-9877-00c04fa0cf4a")]\r
+       [InterfaceType (ComInterfaceType.InterfaceIsIUnknown)]\r
+       [ComImport ()]\r
+       internal interface nsIInputStream\r
+       {\r
+               [PreserveSigAttribute]\r
+               [MethodImpl (MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]\r
+               int Close ();\r
+\r
+               [PreserveSigAttribute]\r
+               [MethodImpl (MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]\r
+               int Available (out UInt32 _retval);\r
+\r
+               [PreserveSigAttribute]\r
+               [MethodImpl (MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]\r
+               int Read (StringBuilder aBuf, UInt32 aCount, out UInt32 _retval);\r
+\r
+               [PreserveSigAttribute]\r
+               [MethodImpl (MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]\r
+               int ReadSegments (IntPtr aWriter, IntPtr aClosure, UInt32 aCount, out UInt32 _retval);\r
+\r
+               [PreserveSigAttribute]\r
+               [MethodImpl (MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]\r
+               int IsNonBlocking (out bool _retval);\r
+       }\r
+}\r
diff --git a/mcs/class/Mono.Mozilla/Mono.Mozilla/interfaces/nsISHistory.cs b/mcs/class/Mono.Mozilla/Mono.Mozilla/interfaces/nsISHistory.cs
new file mode 100755 (executable)
index 0000000..d5289df
--- /dev/null
@@ -0,0 +1,75 @@
+// Permission is hereby granted, free of charge, to any person obtaining\r
+// a copy of this software and associated documentation files (the\r
+// "Software"), to deal in the Software without restriction, including\r
+// without limitation the rights to use, copy, modify, merge, publish,\r
+// distribute, sublicense, and/or sell copies of the Software, and to\r
+// permit persons to whom the Software is furnished to do so, subject to\r
+// the following conditions:\r
+// \r
+// The above copyright notice and this permission notice shall be\r
+// included in all copies or substantial portions of the Software.\r
+// \r
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,\r
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\r
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND\r
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE\r
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION\r
+// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION\r
+// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\r
+//\r
+// Copyright (c) 2007 Novell, Inc.\r
+//\r
+// Authors:\r
+//     Andreia Gaita (avidigal@novell.com)\r
+//\r
+\r
+using System;\r
+using System.Runtime.InteropServices;\r
+using System.Runtime.CompilerServices;\r
+\r
+namespace Mono.Mozilla\r
+{\r
+\r
+       [Guid ("7294fe9b-14d8-11d5-9882-00c04fa02f40")]\r
+       [InterfaceType (ComInterfaceType.InterfaceIsIUnknown)]\r
+       [ComImport ()]\r
+       internal interface nsISHistory\r
+       {\r
+               [PreserveSigAttribute]\r
+               [MethodImpl (MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]\r
+               int GetCount (out Int32 aCount);\r
+\r
+               [PreserveSigAttribute]\r
+               [MethodImpl (MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]\r
+               int GetIndex (out Int32 aIndex);\r
+\r
+               [PreserveSigAttribute]\r
+               [MethodImpl (MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]\r
+               int GetMaxLength (out Int32 aMaxLength);\r
+\r
+               [PreserveSigAttribute]\r
+               [MethodImpl (MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]\r
+               int SetMaxLength (Int32 aMaxLength);\r
+\r
+               [PreserveSigAttribute]\r
+               [MethodImpl (MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]\r
+               int GetEntryAtIndex (Int32 index, bool modifyIndex,\r
+                       [MarshalAs (UnmanagedType.Interface)] out nsIHistoryEntry _retval);\r
+\r
+               [PreserveSigAttribute]\r
+               [MethodImpl (MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]\r
+               int PurgeHistory (Int32 numEntries);\r
+\r
+               [PreserveSigAttribute]\r
+               [MethodImpl (MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]\r
+               int AddSHistoryListener ([MarshalAs (UnmanagedType.Interface)] nsISHistoryListener aListener);\r
+\r
+               [PreserveSigAttribute]\r
+               [MethodImpl (MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]\r
+               int RemoveSHistoryListener ([MarshalAs (UnmanagedType.Interface)] nsISHistoryListener aListener);\r
+\r
+               [PreserveSigAttribute]\r
+               [MethodImpl (MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]\r
+               int GetSHistoryEnumerator ([MarshalAs (UnmanagedType.Interface)] out nsISimpleEnumerator aSHistoryEnumerator);\r
+       }\r
+}\r
diff --git a/mcs/class/Mono.Mozilla/Mono.Mozilla/interfaces/nsISHistoryListener.cs b/mcs/class/Mono.Mozilla/Mono.Mozilla/interfaces/nsISHistoryListener.cs
new file mode 100755 (executable)
index 0000000..aad540a
--- /dev/null
@@ -0,0 +1,62 @@
+// Permission is hereby granted, free of charge, to any person obtaining\r
+// a copy of this software and associated documentation files (the\r
+// "Software"), to deal in the Software without restriction, including\r
+// without limitation the rights to use, copy, modify, merge, publish,\r
+// distribute, sublicense, and/or sell copies of the Software, and to\r
+// permit persons to whom the Software is furnished to do so, subject to\r
+// the following conditions:\r
+// \r
+// The above copyright notice and this permission notice shall be\r
+// included in all copies or substantial portions of the Software.\r
+// \r
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,\r
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\r
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND\r
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE\r
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION\r
+// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION\r
+// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\r
+//\r
+// Copyright (c) 2007 Novell, Inc.\r
+//\r
+// Authors:\r
+//     Andreia Gaita (avidigal@novell.com)\r
+//\r
+\r
+using System;\r
+using System.Runtime.InteropServices;\r
+using System.Runtime.CompilerServices;\r
+\r
+namespace Mono.Mozilla\r
+{\r
+\r
+       [Guid ("d1899240-f9d2-11d2-bdd6-000064657374")]\r
+       [InterfaceType (ComInterfaceType.InterfaceIsIUnknown)]\r
+       [ComImport ()]\r
+       internal interface nsISHistoryListener\r
+       {\r
+               [PreserveSigAttribute]\r
+               [MethodImpl (MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]\r
+               int OnHistoryNewEntry ([MarshalAs (UnmanagedType.Interface)] nsIURI aNewURI);\r
+\r
+               [PreserveSigAttribute]\r
+               [MethodImpl (MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]\r
+               int OnHistoryGoBack ([MarshalAs (UnmanagedType.Interface)] nsIURI aBackURI, out bool _retval);\r
+\r
+               [PreserveSigAttribute]\r
+               [MethodImpl (MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]\r
+               int OnHistoryGoForward ([MarshalAs (UnmanagedType.Interface)] nsIURI aForwardURI, out bool _retval);\r
+\r
+               [PreserveSigAttribute]\r
+               [MethodImpl (MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]\r
+               int OnHistoryReload ([MarshalAs (UnmanagedType.Interface)] nsIURI aReloadURI, UInt32 aReloadFlags, out bool _retval);\r
+\r
+               [PreserveSigAttribute]\r
+               [MethodImpl (MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]\r
+               int OnHistoryGotoIndex (Int32 aIndex, [MarshalAs (UnmanagedType.Interface)] nsIURI aGotoURI, out bool _retval);\r
+\r
+               [PreserveSigAttribute]\r
+               [MethodImpl (MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]\r
+               int OnHistoryPurge (Int32 aNumEntries, out bool _retval);\r
+       }\r
+}\r
diff --git a/mcs/class/Mono.Mozilla/Mono.Mozilla/interfaces/nsISimpleEnumerator.cs b/mcs/class/Mono.Mozilla/Mono.Mozilla/interfaces/nsISimpleEnumerator.cs
new file mode 100755 (executable)
index 0000000..3605eaa
--- /dev/null
@@ -0,0 +1,46 @@
+// Permission is hereby granted, free of charge, to any person obtaining\r
+// a copy of this software and associated documentation files (the\r
+// "Software"), to deal in the Software without restriction, including\r
+// without limitation the rights to use, copy, modify, merge, publish,\r
+// distribute, sublicense, and/or sell copies of the Software, and to\r
+// permit persons to whom the Software is furnished to do so, subject to\r
+// the following conditions:\r
+// \r
+// The above copyright notice and this permission notice shall be\r
+// included in all copies or substantial portions of the Software.\r
+// \r
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,\r
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\r
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND\r
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE\r
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION\r
+// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION\r
+// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\r
+//\r
+// Copyright (c) 2007 Novell, Inc.\r
+//\r
+// Authors:\r
+//     Andreia Gaita (avidigal@novell.com)\r
+//\r
+\r
+using System;\r
+using System.Runtime.InteropServices;\r
+using System.Runtime.CompilerServices;\r
+\r
+namespace Mono.Mozilla\r
+{\r
+\r
+       [Guid ("d1899240-f9d2-11d2-bdd6-000064657374")]\r
+       [InterfaceType (ComInterfaceType.InterfaceIsIUnknown)]\r
+       [ComImport ()]\r
+       internal interface nsISimpleEnumerator\r
+       {\r
+               [PreserveSigAttribute]\r
+               [MethodImpl (MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]\r
+               int HasMoreElements (out bool _retval);\r
+\r
+               [PreserveSigAttribute]\r
+               [MethodImpl (MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]\r
+               int GetNext (out IntPtr _retval); \r
+       }\r
+}\r
diff --git a/mcs/class/Mono.Mozilla/Mono.Mozilla/interfaces/nsIURI.cs b/mcs/class/Mono.Mozilla/Mono.Mozilla/interfaces/nsIURI.cs
new file mode 100755 (executable)
index 0000000..9337cc9
--- /dev/null
@@ -0,0 +1,142 @@
+// Permission is hereby granted, free of charge, to any person obtaining\r
+// a copy of this software and associated documentation files (the\r
+// "Software"), to deal in the Software without restriction, including\r
+// without limitation the rights to use, copy, modify, merge, publish,\r
+// distribute, sublicense, and/or sell copies of the Software, and to\r
+// permit persons to whom the Software is furnished to do so, subject to\r
+// the following conditions:\r
+// \r
+// The above copyright notice and this permission notice shall be\r
+// included in all copies or substantial portions of the Software.\r
+// \r
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,\r
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\r
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND\r
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE\r
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION\r
+// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION\r
+// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\r
+//\r
+// Copyright (c) 2007 Novell, Inc.\r
+//\r
+// Authors:\r
+//     Andreia Gaita (avidigal@novell.com)\r
+//\r
+\r
+using System;\r
+using System.Runtime.InteropServices;\r
+using System.Runtime.CompilerServices;\r
+\r
+namespace Mono.Mozilla\r
+{\r
+\r
+       [Guid ("07a22cc0-0ce5-11d3-9331-00104ba0fd40")]\r
+       [InterfaceType (ComInterfaceType.InterfaceIsIUnknown)]\r
+       [ComImport ()]\r
+       internal interface nsIURI\r
+       {\r
+               [PreserveSigAttribute]\r
+               [MethodImpl (MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]\r
+               int GetSpec (HandleRef aSpec);\r
+\r
+               [PreserveSigAttribute]\r
+               [MethodImpl (MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]\r
+               int SetSpec (HandleRef aSpec);\r
+\r
+               [PreserveSigAttribute]\r
+               [MethodImpl (MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]\r
+               int GetPrePath (HandleRef aPrePath);\r
+\r
+               [PreserveSigAttribute]\r
+               [MethodImpl (MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]\r
+               int GetScheme (HandleRef aScheme);\r
+\r
+               [PreserveSigAttribute]\r
+               [MethodImpl (MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]\r
+               int SetScheme (HandleRef aScheme);\r
+\r
+               [PreserveSigAttribute]\r
+               [MethodImpl (MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]\r
+               int GetUserPass (HandleRef aUserPass);\r
+\r
+               [PreserveSigAttribute]\r
+               [MethodImpl (MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]\r
+               int SetUserPass (HandleRef aUserPass);\r
+\r
+               [PreserveSigAttribute]\r
+               [MethodImpl (MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]\r
+               int GetUsername (HandleRef aUsername);\r
+\r
+               [PreserveSigAttribute]\r
+               [MethodImpl (MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]\r
+               int SetUsername (HandleRef aUsername);\r
+\r
+               [PreserveSigAttribute]\r
+               [MethodImpl (MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]\r
+               int GetPassword (HandleRef aPassword);\r
+\r
+               [PreserveSigAttribute]\r
+               [MethodImpl (MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]\r
+               int SetPassword (HandleRef aPassword);\r
+\r
+               [PreserveSigAttribute]\r
+               [MethodImpl (MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]\r
+               int GetHostPort (HandleRef aHostPort);\r
+\r
+               [PreserveSigAttribute]\r
+               [MethodImpl (MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]\r
+               int SetHostPort (HandleRef aHostPort);\r
+\r
+               [PreserveSigAttribute]\r
+               [MethodImpl (MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]\r
+               int GetHost (HandleRef aHost);\r
+\r
+               [PreserveSigAttribute]\r
+               [MethodImpl (MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]\r
+               int SetHost (HandleRef aHost);\r
+\r
+               [PreserveSigAttribute]\r
+               [MethodImpl (MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]\r
+               int GetPort (out Int32 aPort);\r
+\r
+               [PreserveSigAttribute]\r
+               [MethodImpl (MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]\r
+               int SetPort (Int32 aPort);\r
+\r
+               [PreserveSigAttribute]\r
+               [MethodImpl (MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]\r
+               int GetPath (HandleRef aPath);\r
+\r
+               [PreserveSigAttribute]\r
+               [MethodImpl (MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]\r
+               int SetPath (HandleRef aPath);\r
+\r
+               [PreserveSigAttribute]\r
+               [MethodImpl (MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]\r
+               int Equals ([MarshalAs (UnmanagedType.Interface)] nsIURI other, out bool _retval);\r
+\r
+               [PreserveSigAttribute]\r
+               [MethodImpl (MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]\r
+               int SchemeIs (string scheme, out bool _retval);\r
+\r
+               [PreserveSigAttribute]\r
+               [MethodImpl (MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]\r
+               int Clone ([MarshalAs (UnmanagedType.Interface)] out nsIURI _retval);\r
+\r
+               [PreserveSigAttribute]\r
+               [MethodImpl (MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]\r
+               int Resolve (HandleRef relativePath, HandleRef _retval);\r
+\r
+               [PreserveSigAttribute]\r
+               [MethodImpl (MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]\r
+               int GetAsciiSpec (HandleRef aAsciiSpec);\r
+\r
+               [PreserveSigAttribute]\r
+               [MethodImpl (MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]\r
+               int GetAsciiHost (HandleRef aAsciiHost);\r
+\r
+               [PreserveSigAttribute]\r
+               [MethodImpl (MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]\r
+               int GetOriginCharset (HandleRef aOriginCharset);\r
+       }\r
+}\r
diff --git a/mcs/class/Mono.Mozilla/Mono.Mozilla/interfaces/nsIWebNavigation.cs b/mcs/class/Mono.Mozilla/Mono.Mozilla/interfaces/nsIWebNavigation.cs
new file mode 100755 (executable)
index 0000000..cd30f02
--- /dev/null
@@ -0,0 +1,114 @@
+// Permission is hereby granted, free of charge, to any person obtaining\r
+// a copy of this software and associated documentation files (the\r
+// "Software"), to deal in the Software without restriction, including\r
+// without limitation the rights to use, copy, modify, merge, publish,\r
+// distribute, sublicense, and/or sell copies of the Software, and to\r
+// permit persons to whom the Software is furnished to do so, subject to\r
+// the following conditions:\r
+// \r
+// The above copyright notice and this permission notice shall be\r
+// included in all copies or substantial portions of the Software.\r
+// \r
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,\r
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\r
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND\r
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE\r
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION\r
+// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION\r
+// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\r
+//\r
+// Copyright (c) 2007 Novell, Inc.\r
+//\r
+// Authors:\r
+//     Andreia Gaita (avidigal@novell.com)\r
+//\r
+\r
+using System;\r
+using System.Runtime.InteropServices;\r
+using System.Runtime.CompilerServices;\r
+\r
+namespace Mono.Mozilla\r
+{\r
+\r
+       [Guid ("f5d9e7b0-d930-11d3-b057-00a024ffc08c")]\r
+       [InterfaceType (ComInterfaceType.InterfaceIsIUnknown)]\r
+       [ComImport ()]\r
+       internal interface nsIWebNavigation\r
+       {\r
+               [PreserveSigAttribute]\r
+               [MethodImpl (MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]\r
+               int CanGoBack (out bool canGoBack);\r
+\r
+               [PreserveSigAttribute]\r
+               [MethodImpl (MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]\r
+               int CanGoForward (out bool canGoForward);\r
+\r
+               /// <summary>\r
+               /// Do not use on non-windows platforms due to threading problems\r
+               /// </summary>\r
+               /// <returns></returns>\r
+               [PreserveSigAttribute]\r
+               [MethodImpl (MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]\r
+               int GoBack ();\r
+\r
+               /// <summary>\r
+               /// Do not use on non-windows platforms due to threading problems\r
+               /// </summary>\r
+               /// <returns></returns>\r
+               [PreserveSigAttribute]\r
+               [MethodImpl (MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]\r
+               int GoForward ();\r
+\r
+               /// <summary>\r
+               /// Do not use on non-windows platforms due to threading problems\r
+               /// </summary>\r
+               /// <returns></returns>\r
+               [PreserveSigAttribute]\r
+               [MethodImpl (MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]\r
+               int GotoIndex (Int32 index);\r
+\r
+               /// <summary>\r
+               /// Do not use on non-windows platforms due to threading problems\r
+               /// </summary>\r
+               /// <returns></returns>\r
+               [PreserveSigAttribute]\r
+               [MethodImpl (MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]\r
+               int LoadURI (string uri, UInt32 loadFlags,\r
+                                       [MarshalAs (UnmanagedType.Interface)] nsIURI referrer,\r
+                                  [MarshalAs (UnmanagedType.Interface)] nsIInputStream postData,\r
+                                  [MarshalAs (UnmanagedType.Interface)] nsIInputStream headers);\r
+\r
+               /// <summary>\r
+               /// Do not use on non-windows platforms due to threading problems\r
+               /// </summary>\r
+               /// <returns></returns>\r
+               [PreserveSigAttribute]\r
+               [MethodImpl (MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]\r
+               int Reload (UInt32 reloadFlags);\r
+\r
+               [PreserveSigAttribute]\r
+               [MethodImpl (MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]\r
+               int Stop (UInt32 stopFlags);\r
+\r
+               [PreserveSigAttribute]\r
+               [MethodImpl (MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]\r
+               int GetDocument ([MarshalAs (UnmanagedType.Interface)] out nsIDOMDocument document);\r
+\r
+               [PreserveSigAttribute]\r
+               [MethodImpl (MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]\r
+               int GetCurrentURI ([MarshalAs (UnmanagedType.Interface)] out nsIURI currentURI);\r
+\r
+               [PreserveSigAttribute]\r
+               [MethodImpl (MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]\r
+               int GetReferringURI ([MarshalAs (UnmanagedType.Interface)] out nsIURI referringURI);\r
+\r
+               [PreserveSigAttribute]\r
+               [MethodImpl (MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]\r
+               int GetSessionHistory ([MarshalAs (UnmanagedType.Interface)] out nsISHistory sessionHistory);\r
+\r
+               [PreserveSigAttribute]\r
+               [MethodImpl (MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]\r
+               int SetSessionHistory ([MarshalAs (UnmanagedType.Interface)] nsISHistory sessionHistory);\r
+\r
+       }\r
+}\r
index e58362b20f566f36cf48b8e58fa637ad6d4d3fc9..56f6b53611f8b25d2ad01e59e52f7ee672dac496 100644 (file)
@@ -32,6 +32,7 @@ namespace Mono.WebBrowser.DOM
        {\r
                IDOMHTMLElement Body { get; }\r
                string Title { get; set;}\r
+               string Url { get; }\r
                IDOMHTMLElement getElementById (string id);\r
        }\r
 }\r
diff --git a/mcs/class/Mono.Mozilla/Mono.WebBrowser/DOM/INavigation.cs b/mcs/class/Mono.Mozilla/Mono.WebBrowser/DOM/INavigation.cs
new file mode 100755 (executable)
index 0000000..217d336
--- /dev/null
@@ -0,0 +1,42 @@
+// Permission is hereby granted, free of charge, to any person obtaining\r
+// a copy of this software and associated documentation files (the\r
+// "Software"), to deal in the Software without restriction, including\r
+// without limitation the rights to use, copy, modify, merge, publish,\r
+// distribute, sublicense, and/or sell copies of the Software, and to\r
+// permit persons to whom the Software is furnished to do so, subject to\r
+// the following conditions:\r
+// \r
+// The above copyright notice and this permission notice shall be\r
+// included in all copies or substantial portions of the Software.\r
+// \r
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,\r
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\r
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND\r
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE\r
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION\r
+// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION\r
+// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\r
+//\r
+// Copyright (c) 2007 Novell, Inc.\r
+//\r
+// Authors:\r
+//     Andreia Gaita (avidigal@novell.com)\r
+//\r
+\r
+using System;\r
+using Mono.WebBrowser;\r
+\r
+namespace Mono.WebBrowser.DOM\r
+{\r
+       public interface INavigation\r
+       {\r
+               bool CanGoBack { get; }\r
+               bool CanGoForward { get; }\r
+               bool Back ();\r
+               bool Forward ();\r
+               void Home ();\r
+               void Reload ();\r
+               void Reload (ReloadOption option);\r
+               void Stop ();\r
+       }\r
+}\r
index bec5945891f208bb6f9e5ed310b3884cd9882d0e..29b1a2ff070b378874d1a1951e82e8b8830c7075 100644 (file)
@@ -41,17 +41,10 @@ namespace Mono.WebBrowser
                void Activate ();\r
                void Deactivate ();\r
                void Resize (int width, int height);\r
-               void Navigate (string uri);\r
-               bool Forward ();\r
-               bool Back ();\r
-               void Home ();\r
-               void Stop ();\r
-               void Reload ();\r
-               void Reload (ReloadOption option);\r
-\r
+               void Navigate (string url);\r
 \r
                IDOMHTMLDocument Document { get; }\r
-\r
+               INavigation Navigation { get; }\r
 \r
                event EventHandler KeyDown;\r
                event EventHandler KeyPress;\r
@@ -66,6 +59,7 @@ namespace Mono.WebBrowser
                event EventHandler Focus;\r
                event CreateNewWindowEventHandler CreateNewWindow;\r
                event AlertEventHandler Alert;\r
+               event EventHandler Navigated;\r
        }
 
        public enum ReloadOption\r