Imported Upstream version 3.6.0

Former-commit-id: da6be194a6b1221998fc28233f2503bd61dd9d14
This commit is contained in:
Jo Shields
2014-08-13 10:39:27 +01:00
commit a575963da9
50588 changed files with 8155799 additions and 0 deletions

View File

@@ -0,0 +1,86 @@
//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 class NodeEventArgs : EventArgs
{
private DOM.INode node;
#region Public Constructors
public NodeEventArgs (DOM.INode node)
: base ()
{
this.node = node;
}
#endregion // Public Constructors
#region Public Instance Properties
public INode Node
{
get { return this.node; }
}
public IElement Element {
get {
if (this.node is IElement)
return (IElement) node;
return null;
}
}
public IDocument Document {
get {
if (this.node is IDocument)
return (IDocument) node;
return null;
}
}
#endregion // Public Instance Properties
}
public class WindowEventArgs : EventArgs
{
private DOM.IWindow window;
#region Public Constructors
public WindowEventArgs (DOM.IWindow window)
: base ()
{
this.window = window;
}
#endregion // Public Constructors
#region Public Instance Properties
public IWindow Window
{
get { return this.window; }
}
#endregion // Public Instance Properties
}
}

View File

@@ -0,0 +1,32 @@
//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 delegate void NodeEventHandler (object sender, NodeEventArgs e);
public delegate void WindowEventHandler (object sender, WindowEventArgs e);
}

View File

@@ -0,0 +1,36 @@
// 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;
namespace Mono.WebBrowser.DOM
{
public interface IAttribute : INode
{
string Name { get;}
int GetHashCode ();
}
}

View File

@@ -0,0 +1,37 @@
// 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 IAttributeCollection : INodeList
{
IAttribute this[string name] { get; }
bool Exists (string name);
int GetHashCode ();
}
}

View File

@@ -0,0 +1,40 @@
// 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);
}
}

View File

@@ -0,0 +1,70 @@
// 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 Mono.WebBrowser;
namespace Mono.WebBrowser.DOM
{
public interface IDocument : INode
{
IElement Active { get; }
string ActiveLinkColor { get; set;}
IElementCollection Anchors { get; }
IElementCollection Applets { get; }
string Background { get; set; }
string BackColor { get; set; }
IElement Body { get; }
string Charset { get; set; }
string Cookie { get; set; }
IElement DocumentElement { get; }
IDocumentType DocType { get; }
string Domain { get; }
string ForeColor { get; set; }
IElementCollection Forms { get; }
IElementCollection Images { get; }
IDOMImplementation Implementation { get; }
string LinkColor { get; set; }
IElementCollection Links { get; }
IStylesheetList Stylesheets {get;}
string Title { get; set;}
string Url { get; }
string VisitedLinkColor { get; set; }
IWindow Window { get; }
IAttribute CreateAttribute (string name);
IElement CreateElement (string tagName);
IElement GetElementById (string id);
IElement GetElement (int x, int y);
IElementCollection GetElementsByTagName (string id);
void Write (string text);
string InvokeScript (string script);
int GetHashCode ();
event EventHandler LoadStopped;
}
}

View File

@@ -0,0 +1,39 @@
// 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; }
}
}

View File

@@ -0,0 +1,69 @@
// 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.IO;
namespace Mono.WebBrowser.DOM
{
public interface IElement : INode
{
IElementCollection All { get; }
IElementCollection Children { get; }
int ClientWidth { get; }
int ClientHeight { get; }
int ScrollHeight { get; }
int ScrollWidth { get; }
int ScrollLeft { get; set;}
int ScrollTop { get; set; }
int OffsetHeight { get; }
int OffsetWidth { get; }
int OffsetLeft { get; }
int OffsetTop { get; }
IElement OffsetParent { get; }
string InnerText { get; set; }
string InnerHTML { get; set; }
string OuterText { get; set; }
string OuterHTML { get; set; }
string Style { get; set; }
int TabIndex { get; set; }
string TagName { get; }
bool Disabled { get; set; }
Stream ContentStream { get; }
IElement AppendChild (IElement child);
void Blur ();
void Focus ();
bool HasAttribute (string name);
string GetAttribute (string name);
IElementCollection GetElementsByTagName (string id);
int GetHashCode ();
void ScrollIntoView (bool alignWithTop);
void SetAttribute (string name, string value);
}
}

View File

@@ -0,0 +1,36 @@
// 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 IElementCollection : INodeList
{
IElement this [int index]{ get; set; }
int GetHashCode ();
}
}

View File

@@ -0,0 +1,39 @@
// 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;
namespace Mono.WebBrowser.DOM
{
public interface IHistory
{
int Count { get; }
void Back (int count);
void Forward (int count);
void GoToIndex (int index);
void GoToUrl (string url);
}
}

View File

@@ -0,0 +1,35 @@
// 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
{
}
}

View File

@@ -0,0 +1,39 @@
// 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);
}
}

View File

@@ -0,0 +1,102 @@
// 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 Mono.WebBrowser;
namespace Mono.WebBrowser.DOM
{
public interface INavigation
{
bool CanGoBack { get; }
bool CanGoForward { get; }
bool Back ();
bool Forward ();
void Home ();
void Reload ();
void Reload (ReloadOption option);
void Stop ();
/// <summary>
/// Navigate to the page in the history, by index.
/// </summary>
/// <param name="index">
/// A <see cref="System.Int32"/> representing an absolute index in the
/// history (that is, > -1 and < history length
/// </param>
void Go (int index);
/// <summary>
///
/// </summary>
/// <param name="index">
/// A <see cref="System.Int32"/> representing an index in the
/// history, that can be relative or absolute depending on the relative argument
/// </param>
/// <param name="relative">
/// A <see cref="System.Boolean"/> indicating whether the index is relative to
/// the current place in history or not (i.e., if relative = true, index can be
/// positive or negative, and index=-1 means load the previous page in the history.
/// if relative = false, index must be > -1, and index = 0 means load the first
/// page of the history.
/// </param>
void Go (int index, bool relative);
/// <summary>
/// Navigate to an Url. Uses default loading flags, so the page might come
/// from cache
/// </summary>
/// <param name="url">
/// A <see cref="System.String"/> representing an Url
/// </param>
void Go (string url);
/// <summary>
///
/// </summary>
/// <param name="url">
/// A <see cref="System.String"/> representing an Url.
/// </param>
/// <param name="flags">
/// A <see cref="LoadFlags"/> that control if the page comes from cache or not.
/// </param>
void Go (string url, LoadFlags flags);
int HistoryCount { get; }
}
[Flags]
public enum LoadFlags : uint {
None = 0x0000,
AsMetaRefresh = 0x0010,
AsLinkClick = 0x0020,
BypassHistory = 0x0040,
ReplaceHistory = 0x0080,
BypassLocalCache = 0x0100,
BypassProxy = 0x0200,
CharsetChange = 0x0400
}
}

View File

@@ -0,0 +1,100 @@
// 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;
namespace Mono.WebBrowser.DOM
{
public interface INode
{
IAttributeCollection Attributes { get; }
INodeList ChildNodes { get; }
INode FirstChild { get; }
INode InsertBefore (INode newChild, INode refChild);
INode ReplaceChild (INode newChild, INode oldChild);
INode RemoveChild (INode child);
INode AppendChild (INode child);
INode LastChild { get; }
string LocalName { get; }
INode Next { get; }
IDocument Owner { get; }
INode Parent {get;}
INode Previous { get; }
NodeType Type { get;}
string Value {get; set;}
IntPtr AccessibleObject {get;}
void FireEvent (string eventName);
int GetHashCode ();
bool Equals (object obj);
void AttachEventHandler (string eventName, EventHandler handler);
void DetachEventHandler (string eventName, EventHandler handler);
/// <summary>
/// Attach a generic handler for events. The delegate needs to conform to the EventHandler signature,
/// i.e., be in the form (object sender, EventArgs e)
/// </summary>
/// <param name="eventName">
/// A <see cref="System.String"/> with the name of the event to listen for.
/// </param>
/// <param name="handler">
/// A <see cref="System.Delegate"/> conforming to the EventHandler signature.
/// It will throw an exception if the delegate is not of the format (object sender, EventArgs e).
/// </param>
void AttachEventHandler (string eventName, System.Delegate handler);
void DetachEventHandler (string eventName, System.Delegate handler);
event NodeEventHandler Click;
event NodeEventHandler DoubleClick;
event NodeEventHandler KeyDown;
event NodeEventHandler KeyPress;
event NodeEventHandler KeyUp;
event NodeEventHandler MouseDown;
event NodeEventHandler MouseEnter;
event NodeEventHandler MouseLeave;
event NodeEventHandler MouseMove;
event NodeEventHandler MouseOver;
event NodeEventHandler MouseUp;
event NodeEventHandler OnFocus;
event NodeEventHandler OnBlur;
}
public enum NodeType
{
Element = 1,
Attribute = 2,
Text = 3,
CDataSection = 4,
EntityReference = 5,
Entity = 6,
ProcessingInstruction = 7,
Comment = 8,
Document = 9,
DocumentType = 10,
DocumentFragment = 11,
Notation = 12
}
}

View File

@@ -0,0 +1,38 @@
// 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 INodeList : IList
{
INode this [int index]{ get; set; }
int GetHashCode ();
}
}

View File

@@ -0,0 +1,40 @@
// 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; }
}
}

View File

@@ -0,0 +1,39 @@
// 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; }
}
}

View File

@@ -0,0 +1,56 @@
// 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;
namespace Mono.WebBrowser.DOM
{
public interface IWindow
{
IDocument Document { get; }
IWindowCollection Frames { get; }
string Name { get; set; }
IWindow Parent { get; }
string StatusText { get; }
IWindow Top { get; }
IHistory History {get;}
void AttachEventHandler (string eventName, EventHandler handler);
void DetachEventHandler (string eventName, EventHandler handler);
void Focus ();
bool Equals (object obj);
int GetHashCode ();
void Open (string url);
void ScrollTo (int x, int y);
event EventHandler Load;
event EventHandler Unload;
event EventHandler OnFocus;
event EventHandler OnBlur;
event EventHandler Error;
event EventHandler Scroll;
}
}

View File

@@ -0,0 +1,34 @@
// 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 IWindowCollection : IList
{
IWindow this [int index]{ get; set; }
}
}

View File

@@ -0,0 +1,103 @@
// 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.Text;
using System.Collections;
namespace Mono.WebBrowser
{
public class Exception : System.Exception
{
ErrorCodes code;
static ArrayList messages = new ArrayList();
static Exception ()
{
messages.Insert ((int) ErrorCodes.Other, String.Intern ("A critical error occurred."));
messages.Insert ((int) ErrorCodes.GluezillaInit, String.Intern ("An error occurred while initializing gluezilla. Please make sure you have libgluezilla installed."));
messages.Insert ((int) ErrorCodes.EngineNotSupported, String.Intern ("Browser engine not supported at this time: "));
messages.Insert ((int) ErrorCodes.ServiceManager, String.Intern ("Error obtaining a handle to the service manager."));
messages.Insert ((int) ErrorCodes.IOService, String.Intern ("Error obtaining a handle to the io service."));
messages.Insert ((int) ErrorCodes.DirectoryService, String.Intern ("Error obtaining a handle to the directory service."));
messages.Insert ((int) ErrorCodes.PrefService, String.Intern ("Error obtaining a handle to the preferences service."));
messages.Insert ((int) ErrorCodes.StreamNotOpen, String.Intern ("Stream is not open for writing. Call OpenStream before appending."));
messages.Insert ((int) ErrorCodes.Navigation, String.Intern ("An error occurred while initializing the navigation object."));
messages.Insert ((int) ErrorCodes.AccessibilityService, String.Intern ("Error obtaining a handle to the accessibility service."));
messages.Insert ((int) ErrorCodes.DocumentEncoderService, String.Intern ("Error obtaining a handle to the document encoder service."));
}
internal ErrorCodes ErrorCode
{
get { return code; }
}
internal Exception (ErrorCodes code)
: base (GetMessage (code, String.Empty))
{
this.code = code;
}
internal Exception (ErrorCodes code, string message)
: base (GetMessage (code, message))
{
this.code = code;
}
internal Exception (ErrorCodes code, System.Exception innerException)
: base (GetMessage (code, String.Empty), innerException)
{
this.code = code;
}
internal Exception (ErrorCodes code, string message, Exception innerException)
: base (GetMessage (code, message), innerException)
{
this.code = code;
}
private static string GetMessage (ErrorCodes code, string message)
{
string msg = Exception.messages[(int) code] as string;
return msg + " " + message;
}
internal enum ErrorCodes
{
Other,
GluezillaInit,
EngineNotSupported,
ServiceManager,
IOService,
DirectoryService,
PrefService,
StreamNotOpen,
Navigation,
AccessibilityService,
DocumentEncoderService
}
}
}

Some files were not shown because too many files have changed in this diff Show More