1 // THIS FILE AUTOMATICALLY GENERATED BY xpidl2cs.pl
2 // EDITING IS PROBABLY UNWISE
3 // Permission is hereby granted, free of charge, to any person obtaining
4 // a copy of this software and associated documentation files (the
5 // "Software"), to deal in the Software without restriction, including
6 // without limitation the rights to use, copy, modify, merge, publish,
7 // distribute, sublicense, and/or sell copies of the Software, and to
8 // permit persons to whom the Software is furnished to do so, subject to
9 // the following conditions:
11 // The above copyright notice and this permission notice shall be
12 // included in all copies or substantial portions of the Software.
14 // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
15 // EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
16 // MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
17 // NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
18 // LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
19 // OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
20 // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
22 // Copyright (c) 2007, 2008 Novell, Inc.
25 // Andreia Gaita (avidigal@novell.com)
29 using System
.Runtime
.InteropServices
;
30 using System
.Runtime
.CompilerServices
;
33 namespace Mono
.Mozilla
{
35 [Guid ("a6cf9075-15b3-11d2-932e-00805f8add32")]
36 [InterfaceType (ComInterfaceType
.InterfaceIsIUnknown
)]
38 internal interface nsIDOMDocument
: nsIDOMNode
{
40 [PreserveSigAttribute
]
41 [MethodImpl (MethodImplOptions
.InternalCall
, MethodCodeType
= MethodCodeType
.Runtime
)]
42 int getNodeName ( /*DOMString*/ HandleRef ret
);
44 [PreserveSigAttribute
]
45 [MethodImpl (MethodImplOptions
.InternalCall
, MethodCodeType
= MethodCodeType
.Runtime
)]
46 int getNodeValue ( /*DOMString*/ HandleRef ret
);
48 [PreserveSigAttribute
]
49 [MethodImpl (MethodImplOptions
.InternalCall
, MethodCodeType
= MethodCodeType
.Runtime
)]
50 int setNodeValue ( /*DOMString*/ HandleRef
value);
52 [PreserveSigAttribute
]
53 [MethodImpl (MethodImplOptions
.InternalCall
, MethodCodeType
= MethodCodeType
.Runtime
)]
54 int getNodeType ( out ushort ret
);
56 [PreserveSigAttribute
]
57 [MethodImpl (MethodImplOptions
.InternalCall
, MethodCodeType
= MethodCodeType
.Runtime
)]
58 int getParentNode ([MarshalAs (UnmanagedType
.Interface
)] out nsIDOMNode ret
);
60 [PreserveSigAttribute
]
61 [MethodImpl (MethodImplOptions
.InternalCall
, MethodCodeType
= MethodCodeType
.Runtime
)]
62 int getChildNodes ([MarshalAs (UnmanagedType
.Interface
)] out nsIDOMNodeList ret
);
64 [PreserveSigAttribute
]
65 [MethodImpl (MethodImplOptions
.InternalCall
, MethodCodeType
= MethodCodeType
.Runtime
)]
66 int getFirstChild ([MarshalAs (UnmanagedType
.Interface
)] out nsIDOMNode ret
);
68 [PreserveSigAttribute
]
69 [MethodImpl (MethodImplOptions
.InternalCall
, MethodCodeType
= MethodCodeType
.Runtime
)]
70 int getLastChild ([MarshalAs (UnmanagedType
.Interface
)] out nsIDOMNode ret
);
72 [PreserveSigAttribute
]
73 [MethodImpl (MethodImplOptions
.InternalCall
, MethodCodeType
= MethodCodeType
.Runtime
)]
74 int getPreviousSibling ([MarshalAs (UnmanagedType
.Interface
)] out nsIDOMNode ret
);
76 [PreserveSigAttribute
]
77 [MethodImpl (MethodImplOptions
.InternalCall
, MethodCodeType
= MethodCodeType
.Runtime
)]
78 int getNextSibling ([MarshalAs (UnmanagedType
.Interface
)] out nsIDOMNode ret
);
80 [PreserveSigAttribute
]
81 [MethodImpl (MethodImplOptions
.InternalCall
, MethodCodeType
= MethodCodeType
.Runtime
)]
82 int getAttributes ([MarshalAs (UnmanagedType
.Interface
)] out nsIDOMNamedNodeMap ret
);
84 [PreserveSigAttribute
]
85 [MethodImpl (MethodImplOptions
.InternalCall
, MethodCodeType
= MethodCodeType
.Runtime
)]
86 int getOwnerDocument ([MarshalAs (UnmanagedType
.Interface
)] out nsIDOMDocument ret
);
88 [PreserveSigAttribute
]
89 [MethodImpl (MethodImplOptions
.InternalCall
, MethodCodeType
= MethodCodeType
.Runtime
)]
91 [MarshalAs (UnmanagedType
.Interface
)] nsIDOMNode newChild
,
92 [MarshalAs (UnmanagedType
.Interface
)] nsIDOMNode refChild
,[MarshalAs (UnmanagedType
.Interface
)] out nsIDOMNode ret
);
94 [PreserveSigAttribute
]
95 [MethodImpl (MethodImplOptions
.InternalCall
, MethodCodeType
= MethodCodeType
.Runtime
)]
97 [MarshalAs (UnmanagedType
.Interface
)] nsIDOMNode newChild
,
98 [MarshalAs (UnmanagedType
.Interface
)] nsIDOMNode oldChild
,[MarshalAs (UnmanagedType
.Interface
)] out nsIDOMNode ret
);
100 [PreserveSigAttribute
]
101 [MethodImpl (MethodImplOptions
.InternalCall
, MethodCodeType
= MethodCodeType
.Runtime
)]
103 [MarshalAs (UnmanagedType
.Interface
)] nsIDOMNode oldChild
,[MarshalAs (UnmanagedType
.Interface
)] out nsIDOMNode ret
);
105 [PreserveSigAttribute
]
106 [MethodImpl (MethodImplOptions
.InternalCall
, MethodCodeType
= MethodCodeType
.Runtime
)]
108 [MarshalAs (UnmanagedType
.Interface
)] nsIDOMNode newChild
,[MarshalAs (UnmanagedType
.Interface
)] out nsIDOMNode ret
);
110 [PreserveSigAttribute
]
111 [MethodImpl (MethodImplOptions
.InternalCall
, MethodCodeType
= MethodCodeType
.Runtime
)]
112 int hasChildNodes ( out bool ret
);
114 [PreserveSigAttribute
]
115 [MethodImpl (MethodImplOptions
.InternalCall
, MethodCodeType
= MethodCodeType
.Runtime
)]
117 bool deep
,[MarshalAs (UnmanagedType
.Interface
)] out nsIDOMNode ret
);
119 [PreserveSigAttribute
]
120 [MethodImpl (MethodImplOptions
.InternalCall
, MethodCodeType
= MethodCodeType
.Runtime
)]
123 [PreserveSigAttribute
]
124 [MethodImpl (MethodImplOptions
.InternalCall
, MethodCodeType
= MethodCodeType
.Runtime
)]
126 /*DOMString*/ HandleRef feature
,
127 /*DOMString*/ HandleRef version
, out bool ret
);
129 [PreserveSigAttribute
]
130 [MethodImpl (MethodImplOptions
.InternalCall
, MethodCodeType
= MethodCodeType
.Runtime
)]
131 int getNamespaceURI ( /*DOMString*/ HandleRef ret
);
133 [PreserveSigAttribute
]
134 [MethodImpl (MethodImplOptions
.InternalCall
, MethodCodeType
= MethodCodeType
.Runtime
)]
135 int getPrefix ( /*DOMString*/ HandleRef ret
);
137 [PreserveSigAttribute
]
138 [MethodImpl (MethodImplOptions
.InternalCall
, MethodCodeType
= MethodCodeType
.Runtime
)]
139 int setPrefix ( /*DOMString*/ HandleRef
value);
141 [PreserveSigAttribute
]
142 [MethodImpl (MethodImplOptions
.InternalCall
, MethodCodeType
= MethodCodeType
.Runtime
)]
143 int getLocalName ( /*DOMString*/ HandleRef ret
);
145 [PreserveSigAttribute
]
146 [MethodImpl (MethodImplOptions
.InternalCall
, MethodCodeType
= MethodCodeType
.Runtime
)]
147 int hasAttributes ( out bool ret
);
151 #region nsIDOMDocument
152 [PreserveSigAttribute
]
153 [MethodImpl (MethodImplOptions
.InternalCall
, MethodCodeType
= MethodCodeType
.Runtime
)]
154 int getDoctype ([MarshalAs (UnmanagedType
.Interface
)] out nsIDOMDocumentType ret
);
156 [PreserveSigAttribute
]
157 [MethodImpl (MethodImplOptions
.InternalCall
, MethodCodeType
= MethodCodeType
.Runtime
)]
158 int getImplementation ([MarshalAs (UnmanagedType
.Interface
)] out nsIDOMDOMImplementation ret
);
160 [PreserveSigAttribute
]
161 [MethodImpl (MethodImplOptions
.InternalCall
, MethodCodeType
= MethodCodeType
.Runtime
)]
162 int getDocumentElement ([MarshalAs (UnmanagedType
.Interface
)] out nsIDOMElement ret
);
164 [PreserveSigAttribute
]
165 [MethodImpl (MethodImplOptions
.InternalCall
, MethodCodeType
= MethodCodeType
.Runtime
)]
167 /*DOMString*/ HandleRef tagName
,[MarshalAs (UnmanagedType
.Interface
)] out nsIDOMElement ret
);
169 [PreserveSigAttribute
]
170 [MethodImpl (MethodImplOptions
.InternalCall
, MethodCodeType
= MethodCodeType
.Runtime
)]
171 int createDocumentFragment ([MarshalAs (UnmanagedType
.Interface
)] out nsIDOMDocumentFragment ret
);
173 [PreserveSigAttribute
]
174 [MethodImpl (MethodImplOptions
.InternalCall
, MethodCodeType
= MethodCodeType
.Runtime
)]
176 /*DOMString*/ HandleRef data
,[MarshalAs (UnmanagedType
.Interface
)] out nsIDOMText ret
);
178 [PreserveSigAttribute
]
179 [MethodImpl (MethodImplOptions
.InternalCall
, MethodCodeType
= MethodCodeType
.Runtime
)]
181 /*DOMString*/ HandleRef data
,[MarshalAs (UnmanagedType
.Interface
)] out nsIDOMComment ret
);
183 [PreserveSigAttribute
]
184 [MethodImpl (MethodImplOptions
.InternalCall
, MethodCodeType
= MethodCodeType
.Runtime
)]
185 int createCDATASection (
186 /*DOMString*/ HandleRef data
,[MarshalAs (UnmanagedType
.Interface
)] out nsIDOMCDATASection ret
);
188 [PreserveSigAttribute
]
189 [MethodImpl (MethodImplOptions
.InternalCall
, MethodCodeType
= MethodCodeType
.Runtime
)]
190 int createProcessingInstruction (
191 /*DOMString*/ HandleRef target
,
192 /*DOMString*/ HandleRef data
,[MarshalAs (UnmanagedType
.Interface
)] out nsIDOMProcessingInstruction ret
);
194 [PreserveSigAttribute
]
195 [MethodImpl (MethodImplOptions
.InternalCall
, MethodCodeType
= MethodCodeType
.Runtime
)]
196 int createAttribute (
197 /*DOMString*/ HandleRef name
,[MarshalAs (UnmanagedType
.Interface
)] out nsIDOMAttr ret
);
199 [PreserveSigAttribute
]
200 [MethodImpl (MethodImplOptions
.InternalCall
, MethodCodeType
= MethodCodeType
.Runtime
)]
201 int createEntityReference (
202 /*DOMString*/ HandleRef name
,[MarshalAs (UnmanagedType
.Interface
)] out nsIDOMEntityReference ret
);
204 [PreserveSigAttribute
]
205 [MethodImpl (MethodImplOptions
.InternalCall
, MethodCodeType
= MethodCodeType
.Runtime
)]
206 int getElementsByTagName (
207 /*DOMString*/ HandleRef tagname
,[MarshalAs (UnmanagedType
.Interface
)] out nsIDOMNodeList ret
);
209 [PreserveSigAttribute
]
210 [MethodImpl (MethodImplOptions
.InternalCall
, MethodCodeType
= MethodCodeType
.Runtime
)]
212 [MarshalAs (UnmanagedType
.Interface
)] nsIDOMNode importedNode
,
213 bool deep
,[MarshalAs (UnmanagedType
.Interface
)] out nsIDOMNode ret
);
215 [PreserveSigAttribute
]
216 [MethodImpl (MethodImplOptions
.InternalCall
, MethodCodeType
= MethodCodeType
.Runtime
)]
217 int createElementNS (
218 /*DOMString*/ HandleRef namespaceURI
,
219 /*DOMString*/ HandleRef qualifiedName
,[MarshalAs (UnmanagedType
.Interface
)] out nsIDOMElement ret
);
221 [PreserveSigAttribute
]
222 [MethodImpl (MethodImplOptions
.InternalCall
, MethodCodeType
= MethodCodeType
.Runtime
)]
223 int createAttributeNS (
224 /*DOMString*/ HandleRef namespaceURI
,
225 /*DOMString*/ HandleRef qualifiedName
,[MarshalAs (UnmanagedType
.Interface
)] out nsIDOMAttr ret
);
227 [PreserveSigAttribute
]
228 [MethodImpl (MethodImplOptions
.InternalCall
, MethodCodeType
= MethodCodeType
.Runtime
)]
229 int getElementsByTagNameNS (
230 /*DOMString*/ HandleRef namespaceURI
,
231 /*DOMString*/ HandleRef localName
,[MarshalAs (UnmanagedType
.Interface
)] out nsIDOMNodeList ret
);
233 [PreserveSigAttribute
]
234 [MethodImpl (MethodImplOptions
.InternalCall
, MethodCodeType
= MethodCodeType
.Runtime
)]
236 /*DOMString*/ HandleRef elementId
,[MarshalAs (UnmanagedType
.Interface
)] out nsIDOMElement ret
);
242 internal class nsDOMDocument
{
243 public static nsIDOMDocument
GetProxy (Mono
.WebBrowser
.IWebBrowser control
, nsIDOMDocument obj
)
245 object o
= Base
.GetProxyForObject (control
, typeof(nsIDOMDocument
).GUID
, obj
);
246 return o
as nsIDOMDocument
;