1 // Permission is hereby granted, free of charge, to any person obtaining
2 // a copy of this software and associated documentation files (the
3 // "Software"), to deal in the Software without restriction, including
4 // without limitation the rights to use, copy, modify, merge, publish,
5 // distribute, sublicense, and/or sell copies of the Software, and to
6 // permit persons to whom the Software is furnished to do so, subject to
7 // the following conditions:
9 // The above copyright notice and this permission notice shall be
10 // included in all copies or substantial portions of the Software.
12 // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
13 // EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
14 // MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
15 // NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
16 // LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
17 // OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
18 // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
20 // Copyright (c) 2007, 2008 Novell, Inc.
23 // Andreia Gaita (avidigal@novell.com)
28 namespace Mono.WebBrowser.DOM
30 public interface INode
32 IAttributeCollection Attributes { get; }
33 INodeList ChildNodes { get; }
34 INode FirstChild { get; }
35 INode InsertBefore (INode newChild, INode refChild);
36 INode ReplaceChild (INode newChild, INode oldChild);
37 INode RemoveChild (INode child);
38 INode AppendChild (INode child);
39 INode LastChild { get; }
40 string LocalName { get; }
42 IDocument Owner { get; }
44 INode Previous { get; }
46 string Value {get; set;}
47 IntPtr AccessibleObject {get;}
49 void FireEvent (string eventName);
51 bool Equals (object obj);
53 void AttachEventHandler (string eventName, EventHandler handler);
54 void DetachEventHandler (string eventName, EventHandler handler);
57 /// Attach a generic handler for events. The delegate needs to conform to the EventHandler signature,
58 /// i.e., be in the form (object sender, EventArgs e)
60 /// <param name="eventName">
61 /// A <see cref="System.String"/> with the name of the event to listen for.
63 /// <param name="handler">
64 /// A <see cref="System.Delegate"/> conforming to the EventHandler signature.
65 /// It will throw an exception if the delegate is not of the format (object sender, EventArgs e).
67 void AttachEventHandler (string eventName, System.Delegate handler);
68 void DetachEventHandler (string eventName, System.Delegate handler);
70 event NodeEventHandler Click;
71 event NodeEventHandler DoubleClick;
72 event NodeEventHandler KeyDown;
73 event NodeEventHandler KeyPress;
74 event NodeEventHandler KeyUp;
75 event NodeEventHandler MouseDown;
76 event NodeEventHandler MouseEnter;
77 event NodeEventHandler MouseLeave;
78 event NodeEventHandler MouseMove;
79 event NodeEventHandler MouseOver;
80 event NodeEventHandler MouseUp;
81 event NodeEventHandler OnFocus;
82 event NodeEventHandler OnBlur;
93 ProcessingInstruction = 7,
97 DocumentFragment = 11,