+2008-06-02 Andreia Gaita <avidigal@novell.com>
+
+ * WebBrowserBase.cs: Implement support for ScriptErrorsSuppressed
+ (which also suppresses all popup dialogs). Throw NotSupported
+ exceptions for activex getters/setters.
+ * WebBrowser.cs: Implement DocumentStream, DocumentType, IsBusy,
+ IsOffline, ReadyState, ScriptErrorsSuppressed, ScrollbarsEnabled,
+ StatusText, Version, GoSearch
+ * HtmlDocument.cs: Add DocType support
+
2008-06-02 Andy Hume <andyhume32@yahoo.co.uk>
* TextBox.cs: Implement TextBoxAutoCompleteSourceConverter.
#endregion
+ #region Internal and Private
private Color ParseColor (string color) {
if (color.IndexOf ("#") >= 0) {
return Color.FromArgb (int.Parse (color.Substring (color.IndexOf ("#") + 1), NumberStyles.HexNumber));
}
return Color.FromName (color);
}
+
+ internal string DocType {
+ get { return this.document.DocType.Name; }
+ }
+ #endregion
}
+
}
#endif
\ No newline at end of file
using System;\r
using System.ComponentModel;\r
using System.Runtime.InteropServices;\r
+using System.Reflection;\r
using System.Windows.Forms;\r
using System.IO;\r
using System.Drawing;\r
private bool navigated; // flag indicating that at least one page has been loaded (besides the initial about:blank)\r
private bool allowNavigation; // if this is true, and navigated is also true, no other navigation is allowed\r
\r
- private bool allowWebBrowserDrop;\r
+ private bool allowWebBrowserDrop = true;\r
private bool isWebBrowserContextMenuEnabled;\r
private object objectForScripting;\r
- private bool scriptErrorsSuppressed;\r
- private bool scrollBarsEnabled;\r
- private string statusText;\r
private bool webBrowserShortcutsEnabled;\r
+ \r
+ private WebBrowserReadyState readyState;\r
\r
private HtmlDocument document;\r
\r
set { allowNavigation = value; }\r
}\r
\r
- [MonoTODO ("Stub, not implemented")]\r
[DefaultValue (true)]\r
public bool AllowWebBrowserDrop {\r
get { return allowWebBrowserDrop; }\r
}\r
}\r
\r
- [MonoTODO ("Stub, not implemented")]\r
[BrowsableAttribute(false)]\r
[DesignerSerializationVisibilityAttribute(DesignerSerializationVisibility.Hidden)]\r
public Stream DocumentStream {\r
- get { return null; }\r
+ get {\r
+ string text = this.DocumentText;\r
+ StreamReader s = new StreamReader (text);\r
+ return s.BaseStream;\r
+ }\r
set { \r
if (this.allowNavigation && this.navigated)\r
return;\r
+ this.Url = new Uri ("about:blank");\r
+ using (StreamReader sourceReader = new StreamReader(value))\r
+ {\r
+ this.DocumentText = sourceReader.ReadToEnd();\r
+ }\r
}\r
}\r
\r
private set { document.Title = value; }\r
}\r
\r
- [MonoTODO ("Stub, not implemented")]\r
[BrowsableAttribute(false)]\r
[DesignerSerializationVisibilityAttribute(DesignerSerializationVisibility.Hidden)]\r
public string DocumentType {\r
- get { return String.Empty; }\r
+ get { return document.DocType; }\r
}\r
\r
[MonoTODO ("Stub, not implemented")]\r
get { return WebBrowserEncryptionLevel.Unknown; }\r
}\r
\r
- [MonoTODO ("Stub, not implemented")]\r
public override bool Focused {\r
get { return base.Focused; }\r
}\r
\r
- [MonoTODO ("Stub, not implemented")]\r
[BrowsableAttribute(false)]\r
[DesignerSerializationVisibilityAttribute(DesignerSerializationVisibility.Hidden)]\r
public bool IsBusy {\r
- get { return false; }\r
+ get { return !documentReady; }\r
}\r
\r
- [MonoTODO ("Stub, not implemented")]\r
[BrowsableAttribute(false)]\r
[DesignerSerializationVisibilityAttribute(DesignerSerializationVisibility.Hidden)]\r
public bool IsOffline {\r
- get { return true; }\r
+ get { return WebHost.Offline; }\r
}\r
\r
[MonoTODO ("Stub, not implemented")]\r
set { objectForScripting = value; }\r
}\r
\r
- [MonoTODO ("Stub, not implemented")]\r
[BrowsableAttribute(false)]\r
[DesignerSerializationVisibilityAttribute(DesignerSerializationVisibility.Hidden)]\r
public WebBrowserReadyState ReadyState {\r
- get { return WebBrowserReadyState.Uninitialized; }\r
+ get { return readyState; }\r
}\r
\r
- [MonoTODO ("Stub, not implemented")]\r
[DefaultValue(false)]\r
public bool ScriptErrorsSuppressed {\r
- get { return scriptErrorsSuppressed; }\r
- set { scriptErrorsSuppressed = value; }\r
+ get { return SuppressDialogs; }\r
+ set { SuppressDialogs = value; }\r
}\r
\r
- [MonoTODO ("Stub, not implemented")]\r
[DefaultValue(true)]\r
public bool ScrollBarsEnabled {\r
- get { return scrollBarsEnabled; }\r
- set { scrollBarsEnabled = value; }\r
+ get { return WebHost.ScrollbarsEnabled; }\r
+ set { WebHost.ScrollbarsEnabled = value; }\r
}\r
\r
- [MonoTODO ("Stub, not implemented")]\r
[BrowsableAttribute(false)]\r
[DesignerSerializationVisibilityAttribute(DesignerSerializationVisibility.Hidden)]\r
public virtual string StatusText {\r
- get { return statusText; }\r
+ get { return base.status; }\r
}\r
\r
[BindableAttribute(true)] \r
set { this.Navigate (value); }\r
}\r
\r
- [MonoTODO ("Stub, not implemented")]\r
[BrowsableAttribute(false)]\r
[DesignerSerializationVisibilityAttribute(DesignerSerializationVisibility.Hidden)]\r
public Version Version {\r
- get { return null; }\r
+ get { \r
+ Assembly ass = WebHost.GetType().Assembly;\r
+ return ass.GetName().Version;\r
+ }\r
}\r
\r
[MonoTODO ("Stub, not implemented")]\r
\r
public void GoSearch ()\r
{\r
- throw new NotImplementedException ();\r
+ string url = "http://www.google.com";\r
+ try {\r
+ Microsoft.Win32.RegistryKey reg = Microsoft.Win32.Registry.CurrentUser.OpenSubKey (@"Software\Microsoft\Internet Explorer\Main\Search Page");\r
+ if (reg != null) {\r
+ object searchUrl = reg.GetValue ("Default_Search_URL");\r
+ if (searchUrl != null && searchUrl is string) {\r
+ Uri uri;\r
+ if (System.Uri.TryCreate (searchUrl as string, UriKind.Absolute, out uri))\r
+ url = uri.ToString ();\r
+ }\r
+ }\r
+ } catch {\r
+ }\r
+ Navigate (url);\r
}\r
\r
public void Print ()\r
OnNewWindow (c);\r
return c.Cancel;\r
}\r
-\r
- internal override void OnWebHostLoadFinished (object sender, Mono.WebBrowser.LoadFinishedEventArgs e)\r
- {\r
- documentReady = true;\r
- if (!this.navigated) {\r
- this.navigated = true;\r
- return;\r
- }\r
- \r
- WebBrowserDocumentCompletedEventArgs n = new WebBrowserDocumentCompletedEventArgs (new Uri (e.Uri));\r
- OnDocumentCompleted (n);\r
- }\r
\r
internal override void OnWebHostLoadStarted (object sender, Mono.WebBrowser.LoadStartedEventArgs e)\r
{\r
- documentReady = false;\r
- document = null;\r
if (!this.navigated)\r
return;\r
+ documentReady = false;\r
+ document = null;\r
+ readyState = WebBrowserReadyState.Loading;\r
WebBrowserNavigatingEventArgs n = new WebBrowserNavigatingEventArgs (new Uri (e.Uri), e.FrameName);\r
OnNavigating (n);\r
}\r
{\r
if (!this.navigated)\r
return;\r
+ readyState = WebBrowserReadyState.Loaded;\r
WebBrowserNavigatedEventArgs n = new WebBrowserNavigatedEventArgs (new Uri (e.Uri));\r
OnNavigated (n);\r
}\r
{\r
if (!this.navigated)\r
return;\r
+ readyState = WebBrowserReadyState.Interactive;\r
WebBrowserProgressChangedEventArgs n = new WebBrowserProgressChangedEventArgs (e.Progress, e.MaxProgress);\r
OnProgressChanged (n);\r
}\r
+\r
+ internal override void OnWebHostLoadFinished (object sender, Mono.WebBrowser.LoadFinishedEventArgs e)\r
+ {\r
+ documentReady = true;\r
+ if (!this.navigated) {\r
+ this.navigated = true;\r
+ return;\r
+ }\r
+ readyState = WebBrowserReadyState.Complete;\r
+ WebBrowserDocumentCompletedEventArgs n = new WebBrowserDocumentCompletedEventArgs (new Uri (e.Uri));\r
+ OnDocumentCompleted (n);\r
+ }\r
#endregion\r
\r
[MonoTODO ("Stub, not implemented")]\r
public class WebBrowserBase : Control\r
{\r
internal bool documentReady;\r
+ private bool suppressDialogs;\r
+ internal bool SuppressDialogs {\r
+ get { return suppressDialogs; }\r
+ set { \r
+ suppressDialogs = value;\r
+ webHost.Alert -= new Mono.WebBrowser.AlertEventHandler (OnWebHostAlert);\r
+ if (!suppressDialogs)\r
+ webHost.Alert += new Mono.WebBrowser.AlertEventHandler (OnWebHostAlert); \r
+ }\r
+ }\r
+ \r
+ protected string status;\r
\r
#region Public Properties\r
\r
- [MonoTODO ("Stub, not implemented")]\r
[Browsable (false)] \r
[DesignerSerializationVisibility (DesignerSerializationVisibility.Hidden)]\r
public Object ActiveXInstance {\r
- get { throw new NotImplementedException (); }\r
+ get { throw new NotSupportedException ("Retrieving a reference to an activex interface is not supported. Sorry."); }\r
}\r
\r
- [MonoTODO ("Stub, not implemented")]\r
[Browsable (false)]\r
[DesignerSerializationVisibility (DesignerSerializationVisibility.Hidden)]\r
[EditorBrowsable (EditorBrowsableState.Never)]\r
public override bool AllowDrop {\r
- get { return false; }\r
- set { throw new NotSupportedException (); }\r
+ get { return base.AllowDrop; }\r
+ set { base.AllowDrop = value; }\r
}\r
\r
[Browsable (false)]\r
\r
protected virtual void AttachInterfaces (object nativeActiveXObject)\r
{\r
- throw new NotImplementedException ();\r
+ throw new NotSupportedException ("Retrieving a reference to an activex interface is not supported. Sorry.");\r
}\r
\r
protected virtual void CreateSink ()\r
{\r
- throw new NotImplementedException ();\r
+ throw new NotSupportedException ("Retrieving a reference to an activex interface is not supported. Sorry.");\r
}\r
\r
protected virtual WebBrowserSiteBase CreateWebBrowserSiteBase ()\r
{\r
- return new WebBrowserSiteBase ();\r
+ throw new NotSupportedException ("Retrieving a reference to an activex interface is not supported. Sorry.");\r
}\r
\r
protected virtual void DetachInterfaces ()\r
{\r
- throw new NotImplementedException ();\r
+ throw new NotSupportedException ("Retrieving a reference to an activex interface is not supported. Sorry.");\r
}\r
\r
protected virtual void DetachSink ()\r
{\r
- throw new NotImplementedException ();\r
+ throw new NotSupportedException ("Retrieving a reference to an activex interface is not supported. Sorry.");\r
}\r
\r
#endregion\r
webHost.MouseClick += new Mono.WebBrowser.DOM.NodeEventHandler (OnWebHostMouseClick);\r
webHost.Focus += new EventHandler (OnWebHostFocus);\r
webHost.CreateNewWindow += new Mono.WebBrowser.CreateNewWindowEventHandler (OnWebHostCreateNewWindow);\r
- webHost.Alert += new Mono.WebBrowser.AlertEventHandler (OnWebHostAlert);\r
webHost.LoadStarted += new LoadStartedEventHandler (OnWebHostLoadStarted);\r
webHost.LoadCommited += new LoadCommitedEventHandler (OnWebHostLoadCommited);\r
webHost.ProgressChanged += new Mono.WebBrowser.ProgressChangedEventHandler (OnWebHostProgressChanged);\r
webHost.LoadFinished += new LoadFinishedEventHandler (OnWebHostLoadFinished);\r
+ \r
+ if (!suppressDialogs)\r
+ webHost.Alert += new Mono.WebBrowser.AlertEventHandler (OnWebHostAlert);\r
+ \r
+ webHost.StatusChanged += delegate (object sender, Mono.WebBrowser.StatusChangedEventArgs e) {\r
+ status = e.Message;\r
+ }; \r
}\r
\r
void OnWebHostAlert (object sender, Mono.WebBrowser.AlertEventArgs e)\r
// You can specify all the values or you can default the Revision and Build Numbers \r
// by using the '*' as shown below:\r
\r
-[assembly: AssemblyVersion("0.3.0.0")]\r
+[assembly: AssemblyVersion("0.4.0.0")]\r
\r
//\r
// In order to sign your assembly you must specify a key to use. Refer to the \r
+2008-06-02 Andreia Gaita <avidigal@novell.com>
+
+ * Mono.WebBrowser.dll.sources, Mono.WebBrowser2K5.csproj: Added new
+ classes/interfaces
+ * Mono.WebBrowser/DOM/IMediaList.cs: Added (Stylesheet.Media support)
+ * Mono.WebBrowser/DOM/IDocument.cs: Added Doctype, Implementation,
+ Stylesheets
+ * Mono.WebBrowser/DOM/IDocumentType.cs,
+ Mono.Mozilla/DOM/DocumentType.cs: Added (Document.DocumentType
+ support)
+ * Mono.WebBrowser/DOM/IStylesheetList.cs,
+ Mono.Mozilla/DOM/StylesheetList.cs,
+ Mono.Mozilla/interfaces/nsIDOMHTMLStyleElement.cs,
+ Mono.Mozilla/interfaces/nsIDOMDocumentStyle.cs,
+ Mono.Mozilla/interfaces/nsIDOMStyleSheetList.cs: Added
+ (Document.Stylesheets support)
+ * Mono.WebBrowser/DOM/IDOMImplementation.cs,
+ Mono.Mozilla/DOM/DOMImplementation.cs: Added
+ (Document.Implementation support)
+ * Mono.WebBrowser/DOM/INamedNodeMap.cs,
+ Mono.Mozilla/DOM/NamedNodeMap.cs: Added (Node collection for named
+ node access - DocumentType.Entities, DocumentType.Notations)
+ * Mono.WebBrowser/DOM/IStylesheet.cs, Mono.Mozilla/DOM/Stylesheet.cs:
+ Added (StylesheetList.Item support)
+ * Mono.WebBrowser/Exception.cs: Added error code for Preferences
+ service
+ * Mono.WebBrowser/IWebBrowser.cs, Mono.Mozilla/WebBrowser.cs: Add
+ Offline, ScrollbarsEnabled
+ * Mono.Mozilla/DOM/Document.cs: This class wraps both dom Document and
+ HTMLDocument, so assume that the object is a Document (which
+ HTMLDocument inherits from), and cast appropriately when calling
+ properties or methods that are from the child class. Add DocType,
+ Implementation, Stylesheets acessors
+ * Mono.Mozilla/interfaces/nsIPrefBranch.cs,
+ Mono.Mozilla/interfaces/nsIPrefService.cs: Added (browser
+ preferences support)
+ * Mono.Mozilla/interfaces/nsIClassInfo.cs: Added (interface querying
+ support)
+ * Assembly/AssemblyInfo.cs: Version bump
+
2008-05-22 Andreia Gaita <avidigal@novell.com>
* Makefile: Fix build target
--- /dev/null
+// Permission is hereby granted, free of charge, to any person obtaining
+// a copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to
+// permit persons to whom the Software is furnished to do so, subject to
+// the following conditions:
+//
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+//
+// Copyright (c) 2008 Novell, Inc.
+//
+// Authors:
+// Andreia Gaita (avidigal@novell.com)
+//
+
+using System;
+using Mono.WebBrowser.DOM;
+
+namespace Mono.Mozilla.DOM
+{
+ internal class DOMImplementation : DOMObject, IDOMImplementation
+ {
+ private nsIDOMDOMImplementation unmanagedDomImpl;
+ protected int hashcode;
+
+ public DOMImplementation(WebBrowser control, nsIDOMDOMImplementation domImpl) : base (control)
+ {
+ if (control.platform != control.enginePlatform)
+ unmanagedDomImpl = nsDOMDOMImplementation.GetProxy (control, domImpl);
+ else
+ unmanagedDomImpl = domImpl;
+ hashcode = unmanagedDomImpl.GetHashCode ();
+ }
+
+ #region IDisposable Members
+ protected override void Dispose (bool disposing)
+ {
+ if (!disposed) {
+ if (disposing) {
+ this.unmanagedDomImpl = null;
+ }
+ }
+ base.Dispose(disposing);
+ }
+ #endregion
+
+
+ #region IDOMImplementation Members
+
+ public bool HasFeature (string feature, string version)
+ {
+ Base.StringSet (storage, feature);
+ UniString ver = new UniString (version);
+ bool ret;
+ unmanagedDomImpl.hasFeature (storage, ver.Handle, out ret);
+ return ret;
+ }
+
+ public IDocumentType CreateDocumentType (string qualifiedName,
+ string publicId,
+ string systemId)
+ {
+ nsIDOMDocumentType doctype;
+ Base.StringSet (storage, qualifiedName);
+ UniString pubId = new UniString (publicId);
+ UniString sysId = new UniString (systemId);
+ unmanagedDomImpl.createDocumentType (storage, pubId.Handle, sysId.Handle, out doctype);
+ return new DocumentType (this.control, doctype);
+ }
+
+ public IDocument CreateDocument(string namespaceURI,
+ string qualifiedName,
+ IDocumentType doctype)
+ {
+ nsIDOMDocument doc;
+ Base.StringSet (storage, namespaceURI);
+ UniString qual = new UniString (qualifiedName);
+ unmanagedDomImpl.createDocument (storage, qual.Handle, ((DocumentType)doctype).ComObject, out doc);
+ return new Document (this.control, doc);
+
+ }
+ #endregion
+
+ }
+}
{\r
internal class Document : Node, IDocument\r
{\r
- internal nsIDOMHTMLDocument document;\r
+ internal nsIDOMDocument document;\r
\r
public Document (WebBrowser control, nsIDOMHTMLDocument document)\r
: base (control, document)\r
this.document = document;\r
}\r
\r
+ public Document (WebBrowser control, nsIDOMDocument document)\r
+ : base (control, document)\r
+ {\r
+ if (control.platform != control.enginePlatform)\r
+ this.document = nsDOMDocument.GetProxy (control, document);\r
+ else\r
+ this.document = document;\r
+ }\r
+ \r
#region IDisposable Members\r
protected override void Dispose (bool disposing)\r
{\r
}\r
#endregion\r
\r
- #region IDocument Members\r
+ #region IDocument Properties\r
\r
public IElement Active {
get {
}
public string ActiveLinkColor {
- get {
+ get {\r
+ if (!(document is nsIDOMHTMLDocument))\r
+ return String.Empty;
nsIDOMHTMLElement element;\r
- this.document.getBody (out element);
+ ((nsIDOMHTMLDocument)document).getBody (out element);
((nsIDOMHTMLBodyElement)element).getALink(storage);
return Base.StringGet (storage);
}
- set {
+ set {\r
+ if (!(document is nsIDOMHTMLDocument))\r
+ return;
Base.StringSet (storage, value);
nsIDOMHTMLElement element;\r
- this.document.getBody (out element);
+ ((nsIDOMHTMLDocument)document).getBody (out element);
((nsIDOMHTMLBodyElement)element).setALink(storage);
}
}
public IElementCollection Anchors {\r
- get {
+ get {\r
+ if (!(document is nsIDOMHTMLDocument))\r
+ return null;
nsIDOMHTMLCollection ret;\r
- this.document.getAnchors (out ret);
+ ((nsIDOMHTMLDocument)document).getAnchors (out ret);
return new HTMLElementCollection(control, (nsIDOMNodeList)ret);\r
}\r
public IElementCollection Applets {\r
get {
+ if (!(document is nsIDOMHTMLDocument))\r
+ return null;
nsIDOMHTMLCollection ret;\r
- this.document.getApplets (out ret);
+ ((nsIDOMHTMLDocument)document).getApplets (out ret);
return new HTMLElementCollection(control, (nsIDOMNodeList)ret);\r
}\r
public string Background {
get {
+ if (!(document is nsIDOMHTMLDocument))\r
+ return String.Empty;
nsIDOMHTMLElement element;\r
- this.document.getBody (out element);
+ ((nsIDOMHTMLDocument)document).getBody (out element);
((nsIDOMHTMLBodyElement)element).getBackground(storage);
return Base.StringGet (storage);
}
- set {
+ set {\r
+ if (!(document is nsIDOMHTMLDocument))\r
+ return;
Base.StringSet (storage, value);
nsIDOMHTMLElement element;\r
- this.document.getBody (out element);
+ ((nsIDOMHTMLDocument)document).getBody (out element);
((nsIDOMHTMLBodyElement)element).setBackground(storage);
}
}
public string BackColor {
get {
+ if (!(document is nsIDOMHTMLDocument))\r
+ return String.Empty;
nsIDOMHTMLElement element;\r
- this.document.getBody (out element);
+ ((nsIDOMHTMLDocument)document).getBody (out element);
((nsIDOMHTMLBodyElement)element).getBgColor(storage);
return Base.StringGet (storage);
}
set {
+ if (!(document is nsIDOMHTMLDocument))\r
+ return;
Base.StringSet (storage, value);
nsIDOMHTMLElement element;\r
- this.document.getBody (out element);
+ ((nsIDOMHTMLDocument)document).getBody (out element);
((nsIDOMHTMLBodyElement)element).setBgColor(storage);
}
}
public IElement Body {\r
get {\r
+ if (!(document is nsIDOMHTMLDocument))\r
+ return null;\r
+
if (!resources.Contains ("Body")) {\r
nsIDOMHTMLElement element;\r
- this.document.getBody (out element);\r
+ ((nsIDOMHTMLDocument)document).getBody (out element);\r
nsIDOMHTMLBodyElement b = element as nsIDOMHTMLBodyElement;\r
resources.Add ("Body", new HTMLElement (control, b));\r
}\r
public string Cookie {\r
get {\r
- this.document.getCookie (storage);
+ if (!(document is nsIDOMHTMLDocument))\r
+ return String.Empty;\r
+ ((nsIDOMHTMLDocument)document).getCookie (storage);
return Base.StringGet (storage);\r
}\r
set {
+ if (!(document is nsIDOMHTMLDocument))\r
+ return;
Base.StringSet (storage, value);\r
- this.document.setCookie (storage);\r
+ ((nsIDOMHTMLDocument)document).setCookie (storage);\r
}\r
}\r
public string Domain {\r
get {\r
- this.document.getDomain (storage);
+ if (!(document is nsIDOMHTMLDocument))\r
+ return String.Empty;\r
+ ((nsIDOMHTMLDocument)document).getDomain (storage);
return Base.StringGet (storage);\r
}\r
}\r
return resources["DocumentElement"] as IElement;\r
}\r
}\r
+ \r
+ public IDocumentType DocType {\r
+ get {\r
+ nsIDOMDocumentType doctype;\r
+ this.document.getDoctype (out doctype);\r
+ return new DocumentType (this.control, doctype);\r
+ }\r
+ }\r
+ \r
public string ForeColor {
get {
+ if (!(document is nsIDOMHTMLDocument))\r
+ return String.Empty;\r
nsIDOMHTMLElement element;\r
- this.document.getBody (out element);
+ ((nsIDOMHTMLDocument)document).getBody (out element);
((nsIDOMHTMLBodyElement)element).getText(storage);
return Base.StringGet (storage);
}
set {
+ if (!(document is nsIDOMHTMLDocument))\r
+ return;
Base.StringSet (storage, value);
nsIDOMHTMLElement element;\r
- this.document.getBody (out element);
+ ((nsIDOMHTMLDocument)document).getBody (out element);
((nsIDOMHTMLBodyElement)element).setText(storage);
}
}
public IElementCollection Forms {\r
get {
+ if (!(document is nsIDOMHTMLDocument))\r
+ return null;
nsIDOMHTMLCollection ret;\r
- this.document.getForms (out ret);
+ ((nsIDOMHTMLDocument)document).getForms (out ret);
return new HTMLElementCollection(control, (nsIDOMNodeList)ret);\r
}\r
public IElementCollection Images {\r
get {
+ if (!(document is nsIDOMHTMLDocument))\r
+ return null;
nsIDOMHTMLCollection ret;\r
- this.document.getImages (out ret);
+ ((nsIDOMHTMLDocument)document).getImages (out ret);
return new HTMLElementCollection(control, (nsIDOMNodeList)ret);\r
}\r
+ }\r
+ \r
+ public IDOMImplementation Implementation {\r
+ get {\r
+ nsIDOMDOMImplementation implementation;\r
+ document.getImplementation (out implementation);\r
+ return new DOMImplementation (this.control, implementation);\r
+ }\r
}
public string LinkColor {
get {
+ if (!(document is nsIDOMHTMLDocument))\r
+ return String.Empty;\r
nsIDOMHTMLElement element;\r
- this.document.getBody (out element);
+ ((nsIDOMHTMLDocument)document).getBody (out element);
((nsIDOMHTMLBodyElement)element).getLink(storage);
return Base.StringGet (storage);
}
set {
+ if (!(document is nsIDOMHTMLDocument))\r
+ return;
Base.StringSet (storage, value);
nsIDOMHTMLElement element;\r
- this.document.getBody (out element);
+ ((nsIDOMHTMLDocument)document).getBody (out element);
((nsIDOMHTMLBodyElement)element).setLink(storage);
}
}
public IElementCollection Links {\r
get {
+ if (!(document is nsIDOMHTMLDocument))\r
+ return null;
nsIDOMHTMLCollection ret;\r
- this.document.getLinks (out ret);
+ ((nsIDOMHTMLDocument)document).getLinks (out ret);
return new HTMLElementCollection(control, (nsIDOMNodeList)ret);\r
}\r
- }
-\r
+ }\r
+
+ public IStylesheetList Stylesheets\r
+ {\r
+ get {\r
+ nsIDOMStyleSheetList styleList;\r
+ nsIDOMDocumentStyle docStyle = ((nsIDOMDocumentStyle)this.document);\r
+ docStyle.getStyleSheets (out styleList);\r
+ return new StylesheetList (this.control, styleList);\r
+ }\r
+ }\r
+ \r
public string Title {\r
get {\r
- this.document.getTitle (storage);\r
+ if (!(document is nsIDOMHTMLDocument))\r
+ return String.Empty;\r
+ ((nsIDOMHTMLDocument)document).getTitle (storage);\r
return Base.StringGet (storage);\r
}\r
set {\r
Base.StringSet (storage, value);\r
- this.document.setTitle (storage);\r
+ ((nsIDOMHTMLDocument)document).setTitle (storage);\r
}\r
}\r
\r
public string Url {\r
get {\r
- this.document.getURL (storage);\r
+ if (!(document is nsIDOMHTMLDocument))\r
+ return String.Empty;\r
+ ((nsIDOMHTMLDocument)document).getURL (storage);\r
return Base.StringGet (storage);\r
}\r
}\r
public string VisitedLinkColor {
get {
+ if (!(document is nsIDOMHTMLDocument))\r
+ return String.Empty;\r
nsIDOMHTMLElement element;\r
- this.document.getBody (out element);
+ ((nsIDOMHTMLDocument)document).getBody (out element);
((nsIDOMHTMLBodyElement)element).getVLink(storage);
return Base.StringGet (storage);
}
set {
+ if (!(document is nsIDOMHTMLDocument))\r
+ return;
Base.StringSet (storage, value);
nsIDOMHTMLElement element;\r
- this.document.getBody (out element);
+ ((nsIDOMHTMLDocument)document).getBody (out element);
((nsIDOMHTMLBodyElement)element).setVLink(storage);
}
}\r
}\r
}
-
+ #endregion
+\r
+ #region Public IDocument Methods
public IElement CreateElement (string tagName)
{
nsIDOMElement nsElement;
Base.StringSet (storage, tagName);
- this.document.createElement (storage, out nsElement);
- return new HTMLElement (control, (nsIDOMHTMLElement)nsElement);
+ this.document.createElement (storage, out nsElement);\r
+ if (document is nsIDOMHTMLDocument)\r
+ return new HTMLElement (control, (nsIDOMHTMLElement)nsElement);\r
+ return new Element (control, nsElement);
}
\r
public IElement GetElementById (string id)\r
}
public void Write (string text) {
+ if (!(document is nsIDOMHTMLDocument))\r
+ return;\r
Base.StringSet (storage, text);
- this.document.write (storage);
+ ((nsIDOMHTMLDocument)document).write (storage);
}\r
\r
public string InvokeScript (string script)\r
--- /dev/null
+// Permission is hereby granted, free of charge, to any person obtaining
+// a copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to
+// permit persons to whom the Software is furnished to do so, subject to
+// the following conditions:
+//
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+//
+// Copyright (c) 2008 Novell, Inc.
+//
+// Authors:
+// Andreia Gaita (avidigal@novell.com)
+//
+
+using System;
+using Mono.WebBrowser.DOM;
+
+namespace Mono.Mozilla.DOM
+{
+ internal class DocumentType : Node, IDocumentType
+ {
+ internal nsIDOMDocumentType doctype;\r
+\r
+ public DocumentType (WebBrowser control, nsIDOMDocumentType doctype)\r
+ : base (control, doctype as nsIDOMNode)\r
+ {\r
+ if (control.platform != control.enginePlatform)\r
+ this.doctype = nsDOMDocumentType.GetProxy (control, doctype);\r
+ else\r
+ this.doctype = doctype;\r
+ }
+
+\r
+ #region IDisposable Members\r
+ protected override void Dispose (bool disposing)\r
+ {\r
+ if (!disposed) {\r
+ if (disposing) {\r
+ this.resources.Clear ();\r
+ this.doctype = null;\r
+ }\r
+ }\r
+ base.Dispose (disposing);\r
+ }\r
+ #endregion
+
+ internal nsIDOMDocumentType ComObject\r
+ {\r
+ get { return doctype; }\r
+ }
+
+ #region IDocumentType
+ public string Name {
+ get {
+ doctype.getName (storage);
+ return Base.StringGet (storage);
+ }
+ }
+ public INamedNodeMap Entities {
+ get {
+ nsIDOMNamedNodeMap nodeMap;
+ doctype.getEntities (out nodeMap);
+ return new NamedNodeMap (this.control, nodeMap);
+ }
+ }
+ public INamedNodeMap Notations {
+ get {
+ nsIDOMNamedNodeMap nodeMap;
+ doctype.getNotations (out nodeMap);
+ return new NamedNodeMap (this.control, nodeMap);
+ }
+ }
+ public string PublicId {
+ get {
+ doctype.getPublicId (storage);
+ return Base.StringGet (storage);
+ }
+ }
+ public string SystemId {
+ get {
+ doctype.getSystemId (storage);
+ return Base.StringGet (storage);
+ }
+ }
+ public string InternalSubset {
+ get {
+ doctype.getInternalSubset (storage);
+ return Base.StringGet (storage);
+ }
+ }
+ #endregion
+
+ public override int GetHashCode () {
+ return this.hashcode;
+ } \r
+\r
+ }
+}
--- /dev/null
+// Permission is hereby granted, free of charge, to any person obtaining
+// a copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to
+// permit persons to whom the Software is furnished to do so, subject to
+// the following conditions:
+//
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+//
+// Copyright (c) 2008 Novell, Inc.
+//
+// Authors:
+// Andreia Gaita (avidigal@novell.com)
+//
+
+using System;\r
+using System.Collections;
+#if NET_2_0
+using System.Collections.Generic;
+#endif\r
+using Mono.WebBrowser;\r
+using Mono.WebBrowser.DOM;\r
+
+namespace Mono.Mozilla.DOM
+{
+ internal class NamedNodeMap : NodeList, INamedNodeMap
+ {
+ protected new nsIDOMNamedNodeMap unmanagedNodes;\r
+\r
+ public NamedNodeMap (WebBrowser control, nsIDOMNamedNodeMap nodeMap)\r
+ : base (control, true)\r
+ {\r
+ if (control.platform != control.enginePlatform)\r
+ unmanagedNodes = nsDOMNamedNodeMap.GetProxy (control, nodeMap);\r
+ else\r
+ unmanagedNodes = nodeMap;\r
+ }
+
+ internal override void Load ()\r
+ {\r
+ Clear ();\r
+ uint count;\r
+ unmanagedNodes.getLength (out count);\r
+ nodeCount = (int) count;\r
+ nodes = new Node[count];\r
+ for (int i = 0; i < count; i++) {\r
+ nsIDOMNode node;\r
+ unmanagedNodes.item ((uint) i, out node);\r
+ nodes[i] = new Attribute (control, node as nsIDOMAttr);\r
+ }\r
+ }\r
+
+ public override int Count {
+ get {\r
+ if (unmanagedNodes != null && nodes == null)\r
+ Load ();\r
+ return nodeCount;
+ }
+ }\r
+
+ #region IList members\r
+ public new INode this[int index]\r
+ {\r
+ get\r
+ {\r
+ if (index < 0 || index >= Count)\r
+ throw new ArgumentOutOfRangeException ("index");\r
+ return nodes[index] as INode;\r
+ }\r
+ set { }\r
+ }\r
+
+ public INode this [string name]\r
+ {
+ get {\r
+ Base.StringSet (storage, name);\r
+ nsIDOMNode ret;\r
+ unmanagedNodes.getNamedItem (storage, out ret);\r
+ for (int i = 0; i < Count; i++) {
+ if (nodes[i].GetHashCode ().Equals (ret.GetHashCode ()))
+ return nodes[i];
+ }\r
+ return null;
+ }
+ set {
+ }\r
+ }
+
+ public INode RemoveNamedItem (string name) {
+ Base.StringSet (storage, name);
+ nsIDOMNode ret;
+ unmanagedNodes.removeNamedItem (storage, out ret);
+ for (int i = 0; i < Count; i++) {
+ if (nodes[i].GetHashCode ().Equals (ret.GetHashCode ())) {
+ INode node = nodes[i];
+ this.Remove (nodes[i]);
+ return node;
+ }
+ }\r
+ return null;
+ }
+
+ public INode this[string namespaceURI, string localName] {
+ get {
+ Base.StringSet (storage, namespaceURI);
+ UniString str = new Mono.Mozilla.UniString(localName);\r
+ nsIDOMNode ret;\r
+ unmanagedNodes.getNamedItemNS (storage, str.Handle, out ret);
+ for (int i = 0; i < Count; i++) {
+ if (nodes[i].GetHashCode ().Equals (ret.GetHashCode ()))
+ return nodes[i];
+ }\r
+ return null;
+ }
+ set {
+ }
+ }
+
+ public INode RemoveNamedItemNS(string namespaceURI, string localName) {
+ Base.StringSet (storage, namespaceURI);
+ nsIDOMNode ret;
+ UniString str = new Mono.Mozilla.UniString(localName);
+ unmanagedNodes.removeNamedItemNS (storage, str.Handle, out ret);
+ for (int i = 0; i < Count; i++) {
+ if (nodes[i].GetHashCode ().Equals (ret.GetHashCode ())) {
+ INode node = nodes[i];
+ this.Remove (nodes[i]);
+ return node;
+ }
+ }\r
+ return null;
+ }
+ \r
+ #endregion
+
+ public override int GetHashCode () {
+ return this.unmanagedNodes.GetHashCode ();
+ }
+ }
+}
--- /dev/null
+// Permission is hereby granted, free of charge, to any person obtaining
+// a copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to
+// permit persons to whom the Software is furnished to do so, subject to
+// the following conditions:
+//
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+//
+// Copyright (c) 2008 Novell, Inc.
+//
+// Authors:
+// Andreia Gaita (avidigal@novell.com)
+//
+
+using System;
+using Mono.WebBrowser.DOM;
+namespace Mono.Mozilla.DOM
+{
+ internal class Stylesheet : DOMObject, IStylesheet
+ {
+ private nsIDOMStyleSheet unmanagedStyle;
+ protected int hashcode;
+
+ public Stylesheet(WebBrowser control, nsIDOMStyleSheet stylesheet) : base (control)
+ {
+ if (control.platform != control.enginePlatform)
+ unmanagedStyle = nsDOMStyleSheet.GetProxy (control, stylesheet);
+ else
+ unmanagedStyle = stylesheet;
+ hashcode = unmanagedStyle.GetHashCode ();
+ }
+
+ #region IDisposable Members
+ protected override void Dispose (bool disposing)
+ {
+ if (!disposed) {
+ if (disposing) {
+ this.unmanagedStyle = null;
+ }
+ }
+ base.Dispose(disposing);
+ }
+ #endregion
+
+#region Properties
+ public string Type {
+ get {
+ unmanagedStyle.getType (storage);
+ return Base.StringGet (storage);
+ }
+ }
+ public string Href {
+ get {
+ unmanagedStyle.getHref (storage);
+ return Base.StringGet (storage);
+ }
+ }
+
+
+ public bool Disabled {
+ get {
+ bool ret;
+ unmanagedStyle.getDisabled (out ret);
+ return ret;
+ }
+
+ set {
+ unmanagedStyle.setDisabled (value);
+ }
+ }
+
+ public INode OwnerNode {
+ get {
+ nsIDOMNode owner;
+ unmanagedStyle.getOwnerNode (out owner);
+/*
+ nsIClassInfo classinfo = owner as nsIClassInfo;
+ uint count;
+ IntPtr list;
+ bool isStyleElement = false;
+ classinfo.getInterfaces (out count, out list);
+ for (int i = 0; i < count; i++) {
+ Guid guid = (Guid) System.Runtime.InteropServices.Marshal.PtrToStructure (list, typeof(Guid));
+ if (typeof (Mono.Mozilla.nsIDOMHTMLStyleElement).GUID.Equals (guid)) {
+ isStyleElement = true;
+ break;
+ }
+ }
+ if (isStyleElement)
+*/
+ if ((owner as nsIDOMHTMLElement) != null)
+ return new HTMLElement (this.control, owner as Mono.Mozilla.nsIDOMHTMLElement);
+ return new Node (this.control, owner);
+ }
+ }
+
+ public IStylesheet ParentStyleSheet {
+ get {
+ nsIDOMStyleSheet parent;
+ unmanagedStyle.getParentStyleSheet (out parent);
+ return new Stylesheet (this.control, parent);
+ }
+ }
+
+ public string Title {
+ get {
+ unmanagedStyle.getTitle (storage);
+ return Base.StringGet (storage);
+ }
+ }
+ public IMediaList Media {
+ get {
+ return null;
+ }
+ }
+#endregion
+
+
+#region Methods
+ public override int GetHashCode () {
+ return this.hashcode;
+ }
+#endregion
+ }
+}
--- /dev/null
+// Permission is hereby granted, free of charge, to any person obtaining
+// a copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to
+// permit persons to whom the Software is furnished to do so, subject to
+// the following conditions:
+//
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+//
+// Copyright (c) 2008 Novell, Inc.
+//
+// Authors:
+// Andreia Gaita (avidigal@novell.com)
+//
+
+using System;
+using System.Collections;
+#if NET_2_0
+using System.Collections.Generic;
+#endif
+using Mono.WebBrowser.DOM;
+
+namespace Mono.Mozilla.DOM
+{
+ internal class StylesheetList : DOMObject, IStylesheetList
+ {
+ private nsIDOMStyleSheetList unmanagedStyles;
+#if NET_2_0
+ private List<IStylesheet> styles;
+#else
+ private IStylesheet[] styles;
+ protected int styleCount;
+#endif
+
+ public StylesheetList(WebBrowser control, nsIDOMStyleSheetList stylesheetList) : base (control)
+ {
+ if (control.platform != control.enginePlatform)
+ unmanagedStyles = nsDOMStyleSheetList.GetProxy (control, stylesheetList);
+ else
+ unmanagedStyles = stylesheetList;
+#if NET_2_0
+ styles = new List<IStylesheet>();
+#endif
+ }
+
+ #region IDisposable Members
+ protected override void Dispose (bool disposing)
+ {
+ if (!disposed) {
+ if (disposing) {
+ Clear ();
+ }
+ }
+ base.Dispose(disposing);
+ }
+ #endregion
+
+ #region Helpers
+ protected void Clear ()
+ {
+#if NET_2_0
+ styles.Clear ();
+#else
+ if (styles != null) {
+ for (int i = 0; i < styleCount; i++) {
+ styles[i] = null;
+ }
+ styleCount = 0;
+ styles = null;
+ }
+#endif
+ }
+
+ internal void Load ()
+ {
+ Clear ();
+ uint count;
+ unmanagedStyles.getLength (out count);
+#if ONLY_1_1
+ Stylesheet[] tmpstyles = new Stylesheet[count];
+#endif
+ for (int i = 0; i < count;i++) {
+ nsIDOMStyleSheet style;
+ unmanagedStyles.item ((uint)i, out style);
+#if NET_2_0
+ styles.Add (new Stylesheet (control, style));
+#else
+ tmpstyles[styleCount++] = new Stylesheet (control, style);
+#endif
+ }
+#if ONLY_1_1
+
+ styles = new Stylesheet[styleCount];
+ Array.Copy (tmpstyles, styles, styleCount);
+#endif
+ }
+ #endregion
+
+#if NET_2_0
+ IEnumerator IEnumerable.GetEnumerator()
+ {
+ if (styles.Count == 0)
+ Load ();
+ return styles.GetEnumerator();
+ }
+#else
+
+#region IEnumerable members
+ public IEnumerator GetEnumerator ()
+ {
+ return new StyleEnumerator (this);
+ }
+#endregion
+
+#endif
+
+#if NET_2_0
+ public IStylesheet this [int index] {
+ get {
+ return styles[index];
+ }
+ set {
+ styles[index] = value;
+ }
+ }
+#else
+ public IStylesheet this [int index] {
+ get {
+ if (index < 0 || index >= styleCount)
+ throw new ArgumentOutOfRangeException ("index");
+ return styles [index];
+ }
+ set {
+ if (index < 0 || index >= styleCount)
+ throw new ArgumentOutOfRangeException ("index");
+ styles [index] = value as IStylesheet;
+ }
+ }
+#endif
+
+
+ public int Count {
+ get {
+#if NET_2_0
+ if (styles.Count == 0)
+ Load ();
+ return styles.Count;
+#else
+ if (unmanagedStyles != null && styles == null)
+ Load ();
+ return styleCount;
+#endif
+ }
+ }
+
+#if ONLY_1_1
+ internal class StyleEnumerator : IEnumerator {
+
+ private StylesheetList collection;
+ private int index = -1;
+
+ public StyleEnumerator (StylesheetList collection)
+ {
+ this.collection = collection;
+ }
+
+ public object Current {
+ get {
+ if (index == -1)
+ return null;
+ return collection [index];
+ }
+ }
+
+ public bool MoveNext ()
+ {
+ if (index + 1 >= collection.Count)
+ return false;
+ index++;
+ return true;
+ }
+
+ public void Reset ()
+ {
+ index = -1;
+ }
+ }
+#endif
+
+
+
+ }
+}
public string StatusText {
get { return statusText; }
}\r
+ \r
+ public bool Offline {\r
+ get {\r
+ bool ret;\r
+ IOService.getOffline (out ret);\r
+ return ret;\r
+ }\r
+ set {\r
+ IOService.setOffline (value);\r
+ }\r
+ }\r
+ \r
+ private nsIPrefService prefService;\r
+ public bool ScrollbarsEnabled {\r
+ get {\r
+ if (prefService == null) {\r
+ IntPtr prefServicePtr = IntPtr.Zero;\r
+ nsIServiceManager man = Base.gluezilla_getServiceManager ();\r
+ man.getServiceByContractID ("@mozilla.org/preferences-service;1", typeof (nsIPrefService).GUID, out prefServicePtr);\r
+ if (prefServicePtr == IntPtr.Zero)\r
+ throw new Mono.WebBrowser.Exception (Mono.WebBrowser.Exception.ErrorCodes.PrefService);
+ try {\r
+ prefService = (nsIPrefService)Marshal.GetObjectForIUnknown (prefServicePtr);\r
+ } catch (System.Exception ex) {\r
+ throw new Mono.WebBrowser.Exception (Mono.WebBrowser.Exception.ErrorCodes.PrefService, ex);\r
+ }\r
+ }\r
+ nsIPrefBranch prefBranch;\r
+ prefService.getBranch ("dom. disable_window_open_feature", out prefBranch);\r
+ bool ret = true;\r
+ prefBranch.getBoolPref ("scrollbars", out ret);\r
+ return ret;\r
+ }\r
+ set {\r
+ Console.Error.WriteLine ("set scrollbars enabled = " + value);\r
+ if (prefService == null) {\r
+ IntPtr prefServicePtr = IntPtr.Zero;\r
+ nsIServiceManager man = Base.gluezilla_getServiceManager ();\r
+ man.getServiceByContractID ("@mozilla.org/preferences-service;1", typeof (nsIPrefService).GUID, out prefServicePtr);\r
+ if (prefServicePtr == IntPtr.Zero)\r
+ throw new Mono.WebBrowser.Exception (Mono.WebBrowser.Exception.ErrorCodes.PrefService);
+
+ try {\r
+ prefService = (nsIPrefService)Marshal.GetObjectForIUnknown (prefServicePtr);\r
+ } catch (System.Exception ex) {\r
+ throw new Mono.WebBrowser.Exception (Mono.WebBrowser.Exception.ErrorCodes.PrefService, ex);\r
+ }\r
+ }\r
+ nsIPrefBranch prefBranch;\r
+ prefService.getBranch ("dom. disable_window_open_feature", out prefBranch);\r
+ prefBranch.setBoolPref ("scrollbars", value ? 1 : 0);\r
+ Console.Error.WriteLine ("set scrollbars enabled = " + value + " done");\r
+ }\r
+ }\r
+
internal System.ComponentModel.EventHandlerList DomEvents {
get {
if (domEvents == null)
return events;
}
}
-
+\r
+ \r
+ nsIServiceManager servMan;\r
+ internal nsIServiceManager ServiceManager {\r
+ get {\r
+ if (servMan == null)\r
+ servMan = Base.gluezilla_getServiceManager ();\r
+ return servMan;\r
+ }\r
+ }
+ \r
+ nsIIOService ioService;\r
+ internal nsIIOService IOService {\r
+ get {\r
+ if (ioService == null) {\r
+ IntPtr ioServicePtr = IntPtr.Zero;\r
+\r
+ \r
+\r
+ if (ioServicePtr == IntPtr.Zero)
+ ServiceManager.getServiceByContractID ("@mozilla.org/network/io-service;1", typeof (nsIIOService).GUID, out ioServicePtr);\r
+ if (ioServicePtr == IntPtr.Zero)\r
+ throw new Mono.WebBrowser.Exception (Mono.WebBrowser.Exception.ErrorCodes.IOService);
+\r
+ try {\r
+ ioService = (nsIIOService)Marshal.GetObjectForIUnknown (ioServicePtr);\r
+ } catch (System.Exception ex) {\r
+ throw new Mono.WebBrowser.Exception (Mono.WebBrowser.Exception.ErrorCodes.IOService, ex);\r
+ }\r
+ }\r
+ return ioService;\r
+ }\r
+ } \r
+
#region Layout\r
public void FocusIn (FocusOption focus)\r
{\r
Render (html, "file:///", "text/html");\r
}\r
\r
- \r
- nsIServiceManager servMan;
- IntPtr ioServicePtr;\r
- nsIIOService ioService;\r
- \r
+ \r
public void Render (string html, string uri, string contentType)\r
{\r
- nsIWebBrowserStream stream;\r
\r
+ nsIWebBrowserStream stream;\r
if (Navigation != null) {\r
stream = (nsIWebBrowserStream) navigation.navigation;\r
} else\r
throw new Mono.WebBrowser.Exception (Mono.WebBrowser.Exception.ErrorCodes.Navigation);
-\r
- \r
- if (servMan == null)\r
- servMan = Base.gluezilla_getServiceManager ();\r
-
- \r
- if (ioServicePtr == IntPtr.Zero)
- servMan.getServiceByContractID ("@mozilla.org/network/io-service;1", typeof (nsIIOService).GUID, out ioServicePtr);\r
- if (ioServicePtr == IntPtr.Zero)\r
- throw new Mono.WebBrowser.Exception (Mono.WebBrowser.Exception.ErrorCodes.IOService);
-
- \r
- if (ioService == null) {\r
- try {\r
- ioService = (nsIIOService)Marshal.GetObjectForIUnknown (ioServicePtr);\r
- } catch (System.Exception ex) {\r
- throw new Mono.WebBrowser.Exception (Mono.WebBrowser.Exception.ErrorCodes.IOService, ex);\r
- }\r
- }\r
-\r
AsciiString asciiUri = new AsciiString (uri);
nsIURI ret;
- ioService.newURI (asciiUri.Handle, null, null, out ret);\r
+ IOService.newURI (asciiUri.Handle, null, null, out ret);\r
\r
AsciiString ctype = new AsciiString(contentType);\r
\r
--- /dev/null
+// THIS FILE AUTOMATICALLY GENERATED BY xpidl2cs.pl
+// EDITING IS PROBABLY UNWISE
+// Permission is hereby granted, free of charge, to any person obtaining
+// a copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to
+// permit persons to whom the Software is furnished to do so, subject to
+// the following conditions:
+//
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+//
+// Copyright (c) 2007, 2008 Novell, Inc.
+//
+// Authors:
+// Andreia Gaita (avidigal@novell.com)
+//
+
+using System;
+using System.Runtime.InteropServices;
+using System.Runtime.CompilerServices;
+using System.Text;
+
+namespace Mono.Mozilla {
+
+ [Guid ("986c11d0-f340-11d4-9075-0010a4e73d9a")]
+ [InterfaceType (ComInterfaceType.InterfaceIsIUnknown)]
+ [ComImport ()]
+ internal interface nsIClassInfo {
+
+#region nsIClassInfo
+ [PreserveSigAttribute]
+ [MethodImpl (MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
+ int getInterfaces (
+ out UInt32 count,
+ out IntPtr array);
+
+ [PreserveSigAttribute]
+ [MethodImpl (MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
+ int getHelperForLanguage (
+ UInt32 language,[MarshalAs (UnmanagedType.Interface)] out IntPtr ret);
+
+ [PreserveSigAttribute]
+ [MethodImpl (MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
+ int getContractID ( ref IntPtr ret);
+
+ [PreserveSigAttribute]
+ [MethodImpl (MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
+ int getClassDescription ( ref IntPtr ret);
+
+ [PreserveSigAttribute]
+ [MethodImpl (MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
+ int getClassID ([MarshalAs (UnmanagedType.LPStruct)] out Guid ret);
+
+ [PreserveSigAttribute]
+ [MethodImpl (MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
+ int getImplementationLanguage ( out UInt32 ret);
+
+ [PreserveSigAttribute]
+ [MethodImpl (MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
+ int getFlags ( out UInt32 ret);
+
+ [PreserveSigAttribute]
+ [MethodImpl (MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
+ int getClassIDNoAlloc ([MarshalAs (UnmanagedType.LPStruct)] out Guid ret);
+
+#endregion
+ }
+
+
+ internal class nsClassInfo {
+ public static nsIClassInfo GetProxy (Mono.WebBrowser.IWebBrowser control, nsIClassInfo obj)
+ {
+ object o = Base.GetProxyForObject (control, typeof(nsIClassInfo).GUID, obj);
+ return o as nsIClassInfo;
+ }
+ }
+}
--- /dev/null
+// THIS FILE AUTOMATICALLY GENERATED BY xpidl2cs.pl
+// EDITING IS PROBABLY UNWISE
+// Permission is hereby granted, free of charge, to any person obtaining
+// a copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to
+// permit persons to whom the Software is furnished to do so, subject to
+// the following conditions:
+//
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+//
+// Copyright (c) 2007, 2008 Novell, Inc.
+//
+// Authors:
+// Andreia Gaita (avidigal@novell.com)
+//
+
+using System;
+using System.Runtime.InteropServices;
+using System.Runtime.CompilerServices;
+using System.Text;
+
+namespace Mono.Mozilla {
+
+ [Guid ("3d9f4973-dd2e-48f5-b5f7-2634e09eadd9")]
+ [InterfaceType (ComInterfaceType.InterfaceIsIUnknown)]
+ [ComImport ()]
+ internal interface nsIDOMDocumentStyle {
+
+#region nsIDOMDocumentStyle
+ [PreserveSigAttribute]
+ [MethodImpl (MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
+ int getStyleSheets ([MarshalAs (UnmanagedType.Interface)] out nsIDOMStyleSheetList ret);
+
+#endregion
+ }
+
+
+ internal class nsDOMDocumentStyle {
+ public static nsIDOMDocumentStyle GetProxy (Mono.WebBrowser.IWebBrowser control, nsIDOMDocumentStyle obj)
+ {
+ object o = Base.GetProxyForObject (control, typeof(nsIDOMDocumentStyle).GUID, obj);
+ return o as nsIDOMDocumentStyle;
+ }
+ }
+}
--- /dev/null
+// THIS FILE AUTOMATICALLY GENERATED BY xpidl2cs.pl
+// EDITING IS PROBABLY UNWISE
+// Permission is hereby granted, free of charge, to any person obtaining
+// a copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to
+// permit persons to whom the Software is furnished to do so, subject to
+// the following conditions:
+//
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+//
+// Copyright (c) 2007, 2008 Novell, Inc.
+//
+// Authors:
+// Andreia Gaita (avidigal@novell.com)
+//
+
+using System;
+using System.Runtime.InteropServices;
+using System.Runtime.CompilerServices;
+using System.Text;
+
+namespace Mono.Mozilla {
+
+ [Guid ("a6cf908d-15b3-11d2-932e-00805f8add32")]
+ [InterfaceType (ComInterfaceType.InterfaceIsIUnknown)]
+ [ComImport ()]
+ internal interface nsIDOMHTMLStyleElement : nsIDOMHTMLElement {
+#region nsIDOMNode
+ [PreserveSigAttribute]
+ [MethodImpl (MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
+ int getNodeName ( /*DOMString*/ HandleRef ret);
+
+ [PreserveSigAttribute]
+ [MethodImpl (MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
+ int getNodeValue ( /*DOMString*/ HandleRef ret);
+
+ [PreserveSigAttribute]
+ [MethodImpl (MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
+ int setNodeValue ( /*DOMString*/ HandleRef value);
+
+ [PreserveSigAttribute]
+ [MethodImpl (MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
+ int getNodeType ( out ushort ret);
+
+ [PreserveSigAttribute]
+ [MethodImpl (MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
+ int getParentNode ([MarshalAs (UnmanagedType.Interface)] out nsIDOMNode ret);
+
+ [PreserveSigAttribute]
+ [MethodImpl (MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
+ int getChildNodes ([MarshalAs (UnmanagedType.Interface)] out nsIDOMNodeList ret);
+
+ [PreserveSigAttribute]
+ [MethodImpl (MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
+ int getFirstChild ([MarshalAs (UnmanagedType.Interface)] out nsIDOMNode ret);
+
+ [PreserveSigAttribute]
+ [MethodImpl (MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
+ int getLastChild ([MarshalAs (UnmanagedType.Interface)] out nsIDOMNode ret);
+
+ [PreserveSigAttribute]
+ [MethodImpl (MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
+ int getPreviousSibling ([MarshalAs (UnmanagedType.Interface)] out nsIDOMNode ret);
+
+ [PreserveSigAttribute]
+ [MethodImpl (MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
+ int getNextSibling ([MarshalAs (UnmanagedType.Interface)] out nsIDOMNode ret);
+
+ [PreserveSigAttribute]
+ [MethodImpl (MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
+ int getAttributes ([MarshalAs (UnmanagedType.Interface)] out nsIDOMNamedNodeMap ret);
+
+ [PreserveSigAttribute]
+ [MethodImpl (MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
+ int getOwnerDocument ([MarshalAs (UnmanagedType.Interface)] out nsIDOMDocument ret);
+
+ [PreserveSigAttribute]
+ [MethodImpl (MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
+ int insertBefore (
+ [MarshalAs (UnmanagedType.Interface)] nsIDOMNode newChild,
+ [MarshalAs (UnmanagedType.Interface)] nsIDOMNode refChild,[MarshalAs (UnmanagedType.Interface)] out nsIDOMNode ret);
+
+ [PreserveSigAttribute]
+ [MethodImpl (MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
+ int replaceChild (
+ [MarshalAs (UnmanagedType.Interface)] nsIDOMNode newChild,
+ [MarshalAs (UnmanagedType.Interface)] nsIDOMNode oldChild,[MarshalAs (UnmanagedType.Interface)] out nsIDOMNode ret);
+
+ [PreserveSigAttribute]
+ [MethodImpl (MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
+ int removeChild (
+ [MarshalAs (UnmanagedType.Interface)] nsIDOMNode oldChild,[MarshalAs (UnmanagedType.Interface)] out nsIDOMNode ret);
+
+ [PreserveSigAttribute]
+ [MethodImpl (MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
+ int appendChild (
+ [MarshalAs (UnmanagedType.Interface)] nsIDOMNode newChild,[MarshalAs (UnmanagedType.Interface)] out nsIDOMNode ret);
+
+ [PreserveSigAttribute]
+ [MethodImpl (MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
+ int hasChildNodes ( out bool ret);
+
+ [PreserveSigAttribute]
+ [MethodImpl (MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
+ int cloneNode (
+ bool deep,[MarshalAs (UnmanagedType.Interface)] out nsIDOMNode ret);
+
+ [PreserveSigAttribute]
+ [MethodImpl (MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
+ int normalize ();
+
+ [PreserveSigAttribute]
+ [MethodImpl (MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
+ int isSupported (
+ /*DOMString*/ HandleRef feature,
+ /*DOMString*/ HandleRef version, out bool ret);
+
+ [PreserveSigAttribute]
+ [MethodImpl (MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
+ int getNamespaceURI ( /*DOMString*/ HandleRef ret);
+
+ [PreserveSigAttribute]
+ [MethodImpl (MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
+ int getPrefix ( /*DOMString*/ HandleRef ret);
+
+ [PreserveSigAttribute]
+ [MethodImpl (MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
+ int setPrefix ( /*DOMString*/ HandleRef value);
+
+ [PreserveSigAttribute]
+ [MethodImpl (MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
+ int getLocalName ( /*DOMString*/ HandleRef ret);
+
+ [PreserveSigAttribute]
+ [MethodImpl (MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
+ int hasAttributes ( out bool ret);
+
+#endregion
+
+#region nsIDOMElement
+ [PreserveSigAttribute]
+ [MethodImpl (MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
+ int getTagName ( /*DOMString*/ HandleRef ret);
+
+ [PreserveSigAttribute]
+ [MethodImpl (MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
+ int getAttribute (
+ /*DOMString*/ HandleRef name, /*DOMString*/ HandleRef ret);
+
+ [PreserveSigAttribute]
+ [MethodImpl (MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
+ int setAttribute (
+ /*DOMString*/ HandleRef name,
+ /*DOMString*/ HandleRef value);
+
+ [PreserveSigAttribute]
+ [MethodImpl (MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
+ int removeAttribute (
+ /*DOMString*/ HandleRef name);
+
+ [PreserveSigAttribute]
+ [MethodImpl (MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
+ int getAttributeNode (
+ /*DOMString*/ HandleRef name,[MarshalAs (UnmanagedType.Interface)] out nsIDOMAttr ret);
+
+ [PreserveSigAttribute]
+ [MethodImpl (MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
+ int setAttributeNode (
+ [MarshalAs (UnmanagedType.Interface)] nsIDOMAttr newAttr,[MarshalAs (UnmanagedType.Interface)] out nsIDOMAttr ret);
+
+ [PreserveSigAttribute]
+ [MethodImpl (MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
+ int removeAttributeNode (
+ [MarshalAs (UnmanagedType.Interface)] nsIDOMAttr oldAttr,[MarshalAs (UnmanagedType.Interface)] out nsIDOMAttr ret);
+
+ [PreserveSigAttribute]
+ [MethodImpl (MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
+ int getElementsByTagName (
+ /*DOMString*/ HandleRef name,[MarshalAs (UnmanagedType.Interface)] out nsIDOMNodeList ret);
+
+ [PreserveSigAttribute]
+ [MethodImpl (MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
+ int getAttributeNS (
+ /*DOMString*/ HandleRef namespaceURI,
+ /*DOMString*/ HandleRef localName, /*DOMString*/ HandleRef ret);
+
+ [PreserveSigAttribute]
+ [MethodImpl (MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
+ int setAttributeNS (
+ /*DOMString*/ HandleRef namespaceURI,
+ /*DOMString*/ HandleRef qualifiedName,
+ /*DOMString*/ HandleRef value);
+
+ [PreserveSigAttribute]
+ [MethodImpl (MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
+ int removeAttributeNS (
+ /*DOMString*/ HandleRef namespaceURI,
+ /*DOMString*/ HandleRef localName);
+
+ [PreserveSigAttribute]
+ [MethodImpl (MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
+ int getAttributeNodeNS (
+ /*DOMString*/ HandleRef namespaceURI,
+ /*DOMString*/ HandleRef localName,[MarshalAs (UnmanagedType.Interface)] out nsIDOMAttr ret);
+
+ [PreserveSigAttribute]
+ [MethodImpl (MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
+ int setAttributeNodeNS (
+ [MarshalAs (UnmanagedType.Interface)] nsIDOMAttr newAttr,[MarshalAs (UnmanagedType.Interface)] out nsIDOMAttr ret);
+
+ [PreserveSigAttribute]
+ [MethodImpl (MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
+ int getElementsByTagNameNS (
+ /*DOMString*/ HandleRef namespaceURI,
+ /*DOMString*/ HandleRef localName,[MarshalAs (UnmanagedType.Interface)] out nsIDOMNodeList ret);
+
+ [PreserveSigAttribute]
+ [MethodImpl (MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
+ int hasAttribute (
+ /*DOMString*/ HandleRef name, out bool ret);
+
+ [PreserveSigAttribute]
+ [MethodImpl (MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
+ int hasAttributeNS (
+ /*DOMString*/ HandleRef namespaceURI,
+ /*DOMString*/ HandleRef localName, out bool ret);
+
+#endregion
+
+#region nsIDOMHTMLElement
+ [PreserveSigAttribute]
+ [MethodImpl (MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
+ int getId ( /*DOMString*/ HandleRef ret);
+
+ [PreserveSigAttribute]
+ [MethodImpl (MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
+ int setId ( /*DOMString*/ HandleRef value);
+
+ [PreserveSigAttribute]
+ [MethodImpl (MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
+ int getTitle ( /*DOMString*/ HandleRef ret);
+
+ [PreserveSigAttribute]
+ [MethodImpl (MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
+ int setTitle ( /*DOMString*/ HandleRef value);
+
+ [PreserveSigAttribute]
+ [MethodImpl (MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
+ int getLang ( /*DOMString*/ HandleRef ret);
+
+ [PreserveSigAttribute]
+ [MethodImpl (MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
+ int setLang ( /*DOMString*/ HandleRef value);
+
+ [PreserveSigAttribute]
+ [MethodImpl (MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
+ int getDir ( /*DOMString*/ HandleRef ret);
+
+ [PreserveSigAttribute]
+ [MethodImpl (MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
+ int setDir ( /*DOMString*/ HandleRef value);
+
+ [PreserveSigAttribute]
+ [MethodImpl (MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
+ int getClassName ( /*DOMString*/ HandleRef ret);
+
+ [PreserveSigAttribute]
+ [MethodImpl (MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
+ int setClassName ( /*DOMString*/ HandleRef value);
+
+#endregion
+
+#region nsIDOMHTMLStyleElement
+ [PreserveSigAttribute]
+ [MethodImpl (MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
+ int getDisabled ( out bool ret);
+
+ [PreserveSigAttribute]
+ [MethodImpl (MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
+ int setDisabled ( bool value);
+
+ [PreserveSigAttribute]
+ [MethodImpl (MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
+ int getMedia ( /*DOMString*/ HandleRef ret);
+
+ [PreserveSigAttribute]
+ [MethodImpl (MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
+ int setMedia ( /*DOMString*/ HandleRef value);
+
+ [PreserveSigAttribute]
+ [MethodImpl (MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
+ int getType ( /*DOMString*/ HandleRef ret);
+
+ [PreserveSigAttribute]
+ [MethodImpl (MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
+ int setType ( /*DOMString*/ HandleRef value);
+
+#endregion
+ }
+
+
+ internal class nsDOMHTMLStyleElement {
+ public static nsIDOMHTMLStyleElement GetProxy (Mono.WebBrowser.IWebBrowser control, nsIDOMHTMLStyleElement obj)
+ {
+ object o = Base.GetProxyForObject (control, typeof(nsIDOMHTMLStyleElement).GUID, obj);
+ return o as nsIDOMHTMLStyleElement;
+ }
+ }
+}
--- /dev/null
+// THIS FILE AUTOMATICALLY GENERATED BY xpidl2cs.pl
+// EDITING IS PROBABLY UNWISE
+// Permission is hereby granted, free of charge, to any person obtaining
+// a copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to
+// permit persons to whom the Software is furnished to do so, subject to
+// the following conditions:
+//
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+//
+// Copyright (c) 2007, 2008 Novell, Inc.
+//
+// Authors:
+// Andreia Gaita (avidigal@novell.com)
+//
+
+using System;
+using System.Runtime.InteropServices;
+using System.Runtime.CompilerServices;
+using System.Text;
+
+namespace Mono.Mozilla {
+
+ [Guid ("a6cf9081-15b3-11d2-932e-00805f8add32")]
+ [InterfaceType (ComInterfaceType.InterfaceIsIUnknown)]
+ [ComImport ()]
+ internal interface nsIDOMStyleSheetList {
+
+#region nsIDOMStyleSheetList
+ [PreserveSigAttribute]
+ [MethodImpl (MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
+ int getLength ( out uint ret);
+
+ [PreserveSigAttribute]
+ [MethodImpl (MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
+ int item (
+ uint index,[MarshalAs (UnmanagedType.Interface)] out nsIDOMStyleSheet ret);
+
+#endregion
+ }
+
+
+ internal class nsDOMStyleSheetList {
+ public static nsIDOMStyleSheetList GetProxy (Mono.WebBrowser.IWebBrowser control, nsIDOMStyleSheetList obj)
+ {
+ object o = Base.GetProxyForObject (control, typeof(nsIDOMStyleSheetList).GUID, obj);
+ return o as nsIDOMStyleSheetList;
+ }
+ }
+}
--- /dev/null
+// THIS FILE AUTOMATICALLY GENERATED BY xpidl2cs.pl
+// EDITING IS PROBABLY UNWISE
+// Permission is hereby granted, free of charge, to any person obtaining
+// a copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to
+// permit persons to whom the Software is furnished to do so, subject to
+// the following conditions:
+//
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+//
+// Copyright (c) 2007, 2008 Novell, Inc.
+//
+// Authors:
+// Andreia Gaita (avidigal@novell.com)
+//
+
+using System;
+using System.Runtime.InteropServices;
+using System.Runtime.CompilerServices;
+using System.Text;
+
+namespace Mono.Mozilla {
+
+ [Guid ("56c35506-f14b-11d3-99d3-ddbfac2ccf65")]
+ [InterfaceType (ComInterfaceType.InterfaceIsIUnknown)]
+ [ComImport ()]
+ internal interface nsIPrefBranch {
+
+#region nsIPrefBranch
+ [PreserveSigAttribute]
+ [MethodImpl (MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
+ int getRoot ( ref IntPtr ret);
+
+ [PreserveSigAttribute]
+ [MethodImpl (MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
+ int getPrefType (
+ [MarshalAs (UnmanagedType.LPStr)] string aPrefName, out int ret);
+
+ [PreserveSigAttribute]
+ [MethodImpl (MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
+ int getBoolPref (
+ [MarshalAs (UnmanagedType.LPStr)] string aPrefName, out bool ret);
+
+ [PreserveSigAttribute]
+ [MethodImpl (MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
+ int setBoolPref (
+ [MarshalAs (UnmanagedType.LPStr)] string aPrefName,
+ int aValue);
+
+ [PreserveSigAttribute]
+ [MethodImpl (MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
+ int getCharPref (
+ [MarshalAs (UnmanagedType.LPStr)] string aPrefName,[MarshalAs (UnmanagedType.LPStr)] ref string ret);
+
+ [PreserveSigAttribute]
+ [MethodImpl (MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
+ int setCharPref (
+ [MarshalAs (UnmanagedType.LPStr)] string aPrefName,
+ [MarshalAs (UnmanagedType.LPStr)] string aValue);
+
+ [PreserveSigAttribute]
+ [MethodImpl (MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
+ int getIntPref (
+ [MarshalAs (UnmanagedType.LPStr)] string aPrefName, out int ret);
+
+ [PreserveSigAttribute]
+ [MethodImpl (MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
+ int setIntPref (
+ [MarshalAs (UnmanagedType.LPStr)] string aPrefName,
+ int aValue);
+
+ [PreserveSigAttribute]
+ [MethodImpl (MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
+ int getComplexValue (
+ [MarshalAs (UnmanagedType.LPStr)] string aPrefName,
+ [MarshalAs (UnmanagedType.LPStruct)] Guid aType,
+ out IntPtr aValue);
+
+ [PreserveSigAttribute]
+ [MethodImpl (MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
+ int setComplexValue (
+ [MarshalAs (UnmanagedType.LPStr)] string aPrefName,
+ [MarshalAs (UnmanagedType.LPStruct)] Guid aType,
+ IntPtr aValue);
+
+ [PreserveSigAttribute]
+ [MethodImpl (MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
+ int clearUserPref (
+ [MarshalAs (UnmanagedType.LPStr)] string aPrefName);
+
+ [PreserveSigAttribute]
+ [MethodImpl (MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
+ int lockPref (
+ [MarshalAs (UnmanagedType.LPStr)] string aPrefName);
+
+ [PreserveSigAttribute]
+ [MethodImpl (MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
+ int prefHasUserValue (
+ [MarshalAs (UnmanagedType.LPStr)] string aPrefName, out bool ret);
+
+ [PreserveSigAttribute]
+ [MethodImpl (MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
+ int prefIsLocked (
+ [MarshalAs (UnmanagedType.LPStr)] string aPrefName, out bool ret);
+
+ [PreserveSigAttribute]
+ [MethodImpl (MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
+ int unlockPref (
+ [MarshalAs (UnmanagedType.LPStr)] string aPrefName);
+
+ [PreserveSigAttribute]
+ [MethodImpl (MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
+ int deleteBranch (
+ [MarshalAs (UnmanagedType.LPStr)] string aStartingAt);
+
+ [PreserveSigAttribute]
+ [MethodImpl (MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
+ int getChildList (
+ [MarshalAs (UnmanagedType.LPStr)] string aStartingAt,
+ out uint aCount,
+ [MarshalAs (UnmanagedType.LPStr)] out string[] aChildArray);
+
+ [PreserveSigAttribute]
+ [MethodImpl (MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
+ int resetBranch (
+ [MarshalAs (UnmanagedType.LPStr)] string aStartingAt);
+
+#endregion
+ }
+
+
+ internal class nsPrefBranch {
+ public static nsIPrefBranch GetProxy (Mono.WebBrowser.IWebBrowser control, nsIPrefBranch obj)
+ {
+ object o = Base.GetProxyForObject (control, typeof(nsIPrefBranch).GUID, obj);
+ return o as nsIPrefBranch;
+ }
+ }
+}
--- /dev/null
+// THIS FILE AUTOMATICALLY GENERATED BY xpidl2cs.pl
+// EDITING IS PROBABLY UNWISE
+// Permission is hereby granted, free of charge, to any person obtaining
+// a copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to
+// permit persons to whom the Software is furnished to do so, subject to
+// the following conditions:
+//
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+//
+// Copyright (c) 2007, 2008 Novell, Inc.
+//
+// Authors:
+// Andreia Gaita (avidigal@novell.com)
+//
+
+using System;
+using System.Runtime.InteropServices;
+using System.Runtime.CompilerServices;
+using System.Text;
+
+namespace Mono.Mozilla {
+
+ [Guid ("decb9cc7-c08f-4ea5-be91-a8fc637ce2d2")]
+ [InterfaceType (ComInterfaceType.InterfaceIsIUnknown)]
+ [ComImport ()]
+ internal interface nsIPrefService {
+
+#region nsIPrefService
+ [PreserveSigAttribute]
+ [MethodImpl (MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
+ int readUserPrefs (
+ [MarshalAs (UnmanagedType.Interface)] nsIFile aFile);
+
+ [PreserveSigAttribute]
+ [MethodImpl (MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
+ int resetPrefs ();
+
+ [PreserveSigAttribute]
+ [MethodImpl (MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
+ int resetUserPrefs ();
+
+ [PreserveSigAttribute]
+ [MethodImpl (MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
+ int savePrefFile (
+ [MarshalAs (UnmanagedType.Interface)] nsIFile aFile);
+
+ [PreserveSigAttribute]
+ [MethodImpl (MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
+ int getBranch (
+ [MarshalAs (UnmanagedType.LPStr)] string aPrefRoot,[MarshalAs (UnmanagedType.Interface)] out nsIPrefBranch ret);
+
+ [PreserveSigAttribute]
+ [MethodImpl (MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
+ int getDefaultBranch (
+ [MarshalAs (UnmanagedType.LPStr)] string aPrefRoot,[MarshalAs (UnmanagedType.Interface)] out nsIPrefBranch ret);
+
+#endregion
+ }
+
+
+ internal class nsPrefService {
+ public static nsIPrefService GetProxy (Mono.WebBrowser.IWebBrowser control, nsIPrefService obj)
+ {
+ object o = Base.GetProxyForObject (control, typeof(nsIPrefService).GUID, obj);
+ return o as nsIPrefService;
+ }
+ }
+}
Mono.Mozilla/AsciiString.cs
Mono.Mozilla/Base.cs
Mono.Mozilla/Callback.cs
+Mono.Mozilla/DOM/DocumentType.cs
+Mono.Mozilla/DOM/DOMImplementation.cs
Mono.Mozilla/DOM/EventListener.cs
+Mono.Mozilla/DOM/NamedNodeMap.cs
+Mono.Mozilla/DOM/Stylesheet.cs
+Mono.Mozilla/DOM/StylesheetList.cs
Mono.Mozilla/interfaces/nsICancelable.cs
Mono.Mozilla/interfaces/nsIChannel.cs
+Mono.Mozilla/interfaces/nsIClassInfo.cs
Mono.Mozilla/interfaces/nsIDOMCSSRule.cs
Mono.Mozilla/interfaces/nsIDOMCSSRuleList.cs
Mono.Mozilla/interfaces/nsIDOMCSSStyleDeclaration.cs
Mono.Mozilla/interfaces/nsIDOMCSSStyleSheet.cs
Mono.Mozilla/interfaces/nsIDOMCSSValue.cs
Mono.Mozilla/interfaces/nsIDOMDocumentEvent.cs
+Mono.Mozilla/interfaces/nsIDOMDocumentStyle.cs
Mono.Mozilla/interfaces/nsIDOMEvent.cs
Mono.Mozilla/interfaces/nsIDOMEventListener.cs
Mono.Mozilla/interfaces/nsIDOMEventTarget.cs
+Mono.Mozilla/interfaces/nsIDOMHTMLStyleElement.cs
Mono.Mozilla/interfaces/nsIDOMKeyEvent.cs
Mono.Mozilla/interfaces/nsIDOMMediaList.cs
Mono.Mozilla/interfaces/nsIDOMMouseEvent.cs
Mono.Mozilla/interfaces/nsIDOMNSRange.cs
Mono.Mozilla/interfaces/nsIDOMStyleSheet.cs
+Mono.Mozilla/interfaces/nsIDOMStyleSheetList.cs
Mono.Mozilla/interfaces/nsIDOMUIEvent.cs
Mono.Mozilla/interfaces/nsIDOMViewCSS.cs
Mono.Mozilla/interfaces/nsIFile.cs
Mono.Mozilla/interfaces/nsIIOService.cs
Mono.Mozilla/interfaces/nsILoadGroup.cs
+Mono.Mozilla/interfaces/nsIPrefBranch.cs
+Mono.Mozilla/interfaces/nsIPrefService.cs
Mono.Mozilla/interfaces/nsIProtocolHandler.cs
Mono.Mozilla/interfaces/nsIRequest.cs
Mono.Mozilla/interfaces/nsIRequestObserver.cs
Mono.Mozilla/interfaces/extras/NodeType.cs
Mono.Mozilla/interfaces/extras/nsIWriteSegmentFun.cs
Mono.Mozilla/interfaces/extras/Options.cs
+Mono.WebBrowser/DOM/IDocumentType.cs
+Mono.WebBrowser/DOM/IDOMImplementation.cs
+Mono.WebBrowser/DOM/IMediaList.cs
+Mono.WebBrowser/DOM/INamedNodeMap.cs
+Mono.WebBrowser/DOM/IStylesheet.cs
+Mono.WebBrowser/DOM/IStylesheetList.cs
Mono.WebBrowser/DOM/NodeEventArgs.cs
Mono.WebBrowser/DOM/NodeEventHandler.cs
Mono.WebBrowser/IWebBrowser.cs
--- /dev/null
+// Permission is hereby granted, free of charge, to any person obtaining
+// a copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to
+// permit persons to whom the Software is furnished to do so, subject to
+// the following conditions:
+//
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+//
+// Copyright (c) 2008 Novell, Inc.
+//
+// Authors:
+// Andreia Gaita (avidigal@novell.com)
+//
+
+using System;
+
+namespace Mono.WebBrowser.DOM
+{
+ public interface IDOMImplementation
+ {
+ bool HasFeature (string feature, string version);
+ IDocumentType CreateDocumentType (string qualifiedName,
+ string publicId,
+ string systemId);
+ IDocument CreateDocument(string namespaceURI,
+ string qualifiedName,
+ IDocumentType doctype);
+ }
+}
IElement Body { get; }
string Charset { get; set; }
string Cookie { get; set; }
- IElement DocumentElement { get; }
+ IElement DocumentElement { get; }\r
+ IDocumentType DocType { get; }
string Domain { get; }
string ForeColor { get; set; }
IElementCollection Forms { get; }
- IElementCollection Images { get; }
+ IElementCollection Images { get; }\r
+ IDOMImplementation Implementation { get; }
string LinkColor { get; set; }
- IElementCollection Links { get; }
+ IElementCollection Links { get; }\r
+ IStylesheetList Stylesheets {get;}\r
string Title { get; set;}\r
string Url { get; }
string VisitedLinkColor { get; set; }\r
--- /dev/null
+// Permission is hereby granted, free of charge, to any person obtaining
+// a copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to
+// permit persons to whom the Software is furnished to do so, subject to
+// the following conditions:
+//
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+//
+// Copyright (c) 2008 Novell, Inc.
+//
+// Authors:
+// Andreia Gaita (avidigal@novell.com)
+//
+
+using System;
+
+namespace Mono.WebBrowser.DOM
+{
+ public interface IDocumentType : INode
+ {
+ string Name { get; }
+ INamedNodeMap Entities { get; }
+ INamedNodeMap Notations { get; }
+ string PublicId { get; }
+ string SystemId { get; }
+ string InternalSubset { get; }
+ }
+}
--- /dev/null
+// Permission is hereby granted, free of charge, to any person obtaining
+// a copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to
+// permit persons to whom the Software is furnished to do so, subject to
+// the following conditions:
+//
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+//
+// Copyright (c) 2008 Novell, Inc.
+//
+// Authors:
+// Andreia Gaita (avidigal@novell.com)
+//
+
+using System;
+
+namespace Mono.WebBrowser.DOM
+{
+
+
+ public interface IMediaList
+ {
+ }
+}
--- /dev/null
+// Permission is hereby granted, free of charge, to any person obtaining
+// a copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to
+// permit persons to whom the Software is furnished to do so, subject to
+// the following conditions:
+//
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+//
+// Copyright (c) 2008 Novell, Inc.
+//
+// Authors:
+// Andreia Gaita (avidigal@novell.com)
+//
+
+using System;
+using System.Collections;
+
+namespace Mono.WebBrowser.DOM
+{
+ public interface INamedNodeMap : IList
+ {
+ INode this[string name] { get; set; }
+ INode RemoveNamedItem (string name);
+ INode this[int index] { get; set; }
+ INode this[string namespaceURI, string localName] {get; set;}
+ INode RemoveNamedItemNS(string namespaceURI, string localName);
+ }
+}
--- /dev/null
+// Permission is hereby granted, free of charge, to any person obtaining
+// a copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to
+// permit persons to whom the Software is furnished to do so, subject to
+// the following conditions:
+//
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+//
+// Copyright (c) 2008 Novell, Inc.
+//
+// Authors:
+// Andreia Gaita (avidigal@novell.com)
+//
+
+using System;
+
+namespace Mono.WebBrowser.DOM
+{
+ public interface IStylesheet
+ {
+ string Type { get; }
+ bool Disabled { get; set; }
+ INode OwnerNode { get; }
+ IStylesheet ParentStyleSheet { get; }
+ string Href { get; }
+ string Title { get; }
+ IMediaList Media { get; }
+ }
+}
--- /dev/null
+// Permission is hereby granted, free of charge, to any person obtaining
+// a copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to
+// permit persons to whom the Software is furnished to do so, subject to
+// the following conditions:
+//
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+//
+// Copyright (c) 2008 Novell, Inc.
+//
+// Authors:
+// Andreia Gaita (avidigal@novell.com)
+//
+
+using System;
+using System.Collections;
+#if NET_2_0
+using System.Collections.Generic;
+#endif
+
+namespace Mono.WebBrowser.DOM
+{
+ public interface IStylesheetList : IEnumerable
+ {
+ int Count { get; }
+ IStylesheet this [int index]{ get; set; }
+ }
+}
messages.Insert ((int) ErrorCodes.ServiceManager, String.Intern ("Error obtaining a handle to the service manager."));\r
messages.Insert ((int) ErrorCodes.IOService, String.Intern ("Error obtaining a handle to the io service."));\r
messages.Insert ((int) ErrorCodes.DirectoryService, String.Intern ("Error obtaining a handle to the directory service."));\r
+ messages.Insert ((int) ErrorCodes.PrefService, String.Intern ("Error obtaining a handle to the preferences service."));\r
messages.Insert ((int) ErrorCodes.StreamNotOpen, String.Intern ("Stream is not open for writing. Call OpenStream before appending."));\r
messages.Insert ((int) ErrorCodes.Navigation, String.Intern ("An error occurred while initializing the navigation object."));\r
}\r
ServiceManager,\r
IOService,\r
DirectoryService,\r
+ PrefService,\r
StreamNotOpen,\r
Navigation\r
}\r
void Render (string html);\r
void Render (string html, string uri, string contentType);\r
\r
- \r
bool Initialized { get; }
IWindow Window { get; }\r
IDocument Document { get; }\r
+ bool Offline {get; set;}\r
+ \r
/// <value>
/// Object exposing navigation methods like Go, Back, etc.
/// </value>\r
INavigation Navigation { get; }\r
+ bool ScrollbarsEnabled { get; set; }\r
\r
event NodeEventHandler KeyDown;\r
event NodeEventHandler KeyPress;\r
</ApplicationIcon>
<AssemblyKeyContainerName>
</AssemblyKeyContainerName>
- <AssemblyName>Mono.Mozilla</AssemblyName>
+ <AssemblyName>Mono.WebBrowser</AssemblyName>
<AssemblyOriginatorKeyFile>
</AssemblyOriginatorKeyFile>
<DefaultClientScript>JScript</DefaultClientScript>
<DefaultTargetSchema>IE50</DefaultTargetSchema>
<DelaySign>false</DelaySign>
<OutputType>Library</OutputType>
- <RootNamespace>Mono.Mozilla</RootNamespace>
+ <RootNamespace>Mono.WebBrowser</RootNamespace>
<RunPostBuildEvent>OnBuildSuccess</RunPostBuildEvent>
<StartupObject>
</StartupObject>
<Compile Include="Mono.Mozilla\AsciiString.cs" />
<Compile Include="Mono.Mozilla\Base.cs" />
<Compile Include="Mono.Mozilla\Callback.cs" />
+ <Compile Include="Mono.Mozilla\DOM\DocumentType.cs" />
+ <Compile Include="Mono.Mozilla\DOM\DOMImplementation.cs" />
<Compile Include="Mono.Mozilla\DOM\EventListener.cs" />
+ <Compile Include="Mono.Mozilla\DOM\NamedNodeMap.cs" />
+ <Compile Include="Mono.Mozilla\DOM\Stylesheet.cs" />
+ <Compile Include="Mono.Mozilla\DOM\StylesheetList.cs" />
<Compile Include="Mono.Mozilla\interfaces\nsICancelable.cs" />
<Compile Include="Mono.Mozilla\interfaces\nsIChannel.cs" />
+ <Compile Include="Mono.Mozilla\interfaces\nsIClassInfo.cs" />
<Compile Include="Mono.Mozilla\interfaces\nsIDOMCSSRule.cs" />
<Compile Include="Mono.Mozilla\interfaces\nsIDOMCSSRuleList.cs" />
<Compile Include="Mono.Mozilla\interfaces\nsIDOMCSSStyleDeclaration.cs" />
<Compile Include="Mono.Mozilla\interfaces\nsIDOMCSSStyleSheet.cs" />
<Compile Include="Mono.Mozilla\interfaces\nsIDOMCSSValue.cs" />
<Compile Include="Mono.Mozilla\interfaces\nsIDOMDocumentEvent.cs" />
+ <Compile Include="Mono.Mozilla\interfaces\nsIDOMDocumentStyle.cs" />
<Compile Include="Mono.Mozilla\interfaces\nsIDOMEvent.cs" />
<Compile Include="Mono.Mozilla\interfaces\nsIDOMEventListener.cs" />
<Compile Include="Mono.Mozilla\interfaces\nsIDOMEventTarget.cs" />
+ <Compile Include="Mono.Mozilla\interfaces\nsIDOMHTMLStyleElement.cs" />
<Compile Include="Mono.Mozilla\interfaces\nsIDOMKeyEvent.cs" />
<Compile Include="Mono.Mozilla\interfaces\nsIDOMMediaList.cs" />
<Compile Include="Mono.Mozilla\interfaces\nsIDOMMouseEvent.cs" />
<Compile Include="Mono.Mozilla\interfaces\nsIDOMNSRange.cs" />
<Compile Include="Mono.Mozilla\interfaces\nsIDOMStyleSheet.cs" />
+ <Compile Include="Mono.Mozilla\interfaces\nsIDOMStyleSheetList.cs" />
<Compile Include="Mono.Mozilla\interfaces\nsIDOMUIEvent.cs" />
<Compile Include="Mono.Mozilla\interfaces\nsIDOMViewCSS.cs" />
<Compile Include="Mono.Mozilla\interfaces\nsIFile.cs" />
<Compile Include="Mono.Mozilla\interfaces\nsIIOService.cs" />
<Compile Include="Mono.Mozilla\interfaces\nsILoadGroup.cs" />
+ <Compile Include="Mono.Mozilla\interfaces\nsIPrefBranch.cs" />
+ <Compile Include="Mono.Mozilla\interfaces\nsIPrefService.cs" />
<Compile Include="Mono.Mozilla\interfaces\nsIProtocolHandler.cs" />
<Compile Include="Mono.Mozilla\interfaces\nsIRequest.cs" />
<Compile Include="Mono.Mozilla\interfaces\nsIRequestObserver.cs" />
<Compile Include="Mono.Mozilla\interfaces\extras\NodeType.cs" />
<Compile Include="Mono.Mozilla\interfaces\extras\nsIWriteSegmentFun.cs" />
<Compile Include="Mono.Mozilla\interfaces\extras\Options.cs" />
+ <Compile Include="Mono.WebBrowser\DOM\IDocumentType.cs" />
+ <Compile Include="Mono.WebBrowser\DOM\IDOMImplementation.cs" />
+ <Compile Include="Mono.WebBrowser\DOM\IMediaList.cs" />
+ <Compile Include="Mono.WebBrowser\DOM\INamedNodeMap.cs" />
+ <Compile Include="Mono.WebBrowser\DOM\IStylesheet.cs" />
+ <Compile Include="Mono.WebBrowser\DOM\IStylesheetList.cs" />
<Compile Include="Mono.WebBrowser\DOM\NodeEventArgs.cs" />
<Compile Include="Mono.WebBrowser\DOM\NodeEventHandler.cs" />
<Compile Include="Mono.WebBrowser\IWebBrowser.cs" />
</ItemGroup>
<ItemGroup>
<None Include="ChangeLog" />
- <None Include="Mono.Mozilla.dll.sources" />
+ <None Include="Mono.WebBrowser.dll.sources" />
<None Include="README" />
</ItemGroup>
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />