forked from SeleniumHQ/selenium
-
Notifications
You must be signed in to change notification settings - Fork 0
/
nsIAccessibleDocument.h
293 lines (239 loc) · 11 KB
/
nsIAccessibleDocument.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
/*
* DO NOT EDIT. THIS FILE IS GENERATED FROM nsIAccessibleDocument.idl
*/
#ifndef __gen_nsIAccessibleDocument_18_h__
#define __gen_nsIAccessibleDocument_18_h__
#ifndef __gen_nsISupports_h__
#include "nsISupports.h"
#endif
/* For IDL files that don't want to include root IDL files. */
#ifndef NS_NO_VTABLE
#define NS_NO_VTABLE
#endif
class nsIAccessible; /* forward declaration */
class nsIAccessNode; /* forward declaration */
class nsIDOMDocument; /* forward declaration */
class nsIDOMNode; /* forward declaration */
class nsIDOMWindow; /* forward declaration */
/* starting interface: nsIAccessibleDocument */
#define NS_IACCESSIBLEDOCUMENT_18_IID_STR "8781fc88-355f-4439-881f-6504a0a1ceb6"
#define NS_IACCESSIBLEDOCUMENT_18_IID \
{0x8781fc88, 0x355f, 0x4439, \
{ 0x88, 0x1f, 0x65, 0x04, 0xa0, 0xa1, 0xce, 0xb6 }}
/**
* An interface for in-process accessibility clients
* that wish to retrieve information about a document.
* When accessibility is turned on in Gecko,
* there is an nsIAccessibleDocument for each document
* whether it is XUL, HTML or whatever.
* You can QueryInterface to nsIAccessibleDocument from
* the nsIAccessible or nsIAccessNode for the root node
* of a document. You can also get one from
* nsIAccessNode::GetAccessibleDocument() or
* nsIAccessibleEvent::GetAccessibleDocument()
*
* @status UNDER_REVIEW
*/
class NS_NO_VTABLE nsIAccessibleDocument_18 : public nsISupports {
public:
NS_DECLARE_STATIC_IID_ACCESSOR(NS_IACCESSIBLEDOCUMENT_18_IID)
/**
* The URL of the document
*/
/* readonly attribute AString URL; */
NS_IMETHOD GetURL(nsAString & aURL) = 0;
/**
* The title of the document, as specified in the document.
*/
/* readonly attribute AString title; */
NS_IMETHOD GetTitle(nsAString & aTitle) = 0;
/**
* The mime type of the document
*/
/* readonly attribute AString mimeType; */
NS_IMETHOD GetMimeType(nsAString & aMimeType) = 0;
/**
* The doc type of the document, as specified in the document.
*/
/* readonly attribute AString docType; */
NS_IMETHOD GetDocType(nsAString & aDocType) = 0;
/**
* True if the document is live in an editor.
* False if the document is being displayed but not edited.
* If a <div> is contentEditable, then it has its own document,
* with isEditable == true.
*/
/* readonly attribute boolean isEditable; */
NS_IMETHOD GetIsEditable(PRBool *aIsEditable) = 0;
/**
* The nsIDOMDocument interface associated with this document.
*/
/* readonly attribute nsIDOMDocument document; */
NS_IMETHOD GetDocument(nsIDOMDocument * *aDocument) = 0;
/**
* The nsIDOMWindow that the document resides in.
*/
/* readonly attribute nsIDOMWindow window; */
NS_IMETHOD GetWindow(nsIDOMWindow * *aWindow) = 0;
/* readonly attribute nsIAccessible caretAccessible; */
NS_IMETHOD GetCaretAccessible(nsIAccessible * *aCaretAccessible) = 0;
/**
* The namespace for each ID that is handed back.
*/
/* AString getNameSpaceURIForID (in short nameSpaceID); */
NS_IMETHOD GetNameSpaceURIForID(PRInt16 nameSpaceID, nsAString & _retval) = 0;
/**
* The window handle for the OS window the document is being displayed in.
* For example, in Windows you can static cast it to an HWND.
*/
/* [noscript] readonly attribute voidPtr windowHandle; */
NS_IMETHOD GetWindowHandle(void * *aWindowHandle) = 0;
/**
* Returns the access node cached by this document
* @param aUniqueID The unique ID used to cache the node.
* This matches up with the uniqueID attribute on
* nsIAccessNode.
* @return The nsIAccessNode cached for this particular unique ID.
*/
/* [noscript] nsIAccessNode getCachedAccessNode (in voidPtr aUniqueID); */
NS_IMETHOD GetCachedAccessNode(void * aUniqueID, nsIAccessNode **_retval) = 0;
/**
* Returns the first accessible parent of a DOM node.
* Guaranteed not to return nsnull if the DOM node is in a document.
* @param aDOMNode The DOM node we need an accessible for.
* @return An first nsIAccessible found by crawling up the DOM node
* to the document root.
*/
/* nsIAccessible getAccessibleInParentChain (in nsIDOMNode aDOMNode); */
NS_IMETHOD GetAccessibleInParentChain(nsIDOMNode *aDOMNode, nsIAccessible **_retval) = 0;
};
NS_DEFINE_STATIC_IID_ACCESSOR(nsIAccessibleDocument_18, NS_IACCESSIBLEDOCUMENT_18_IID)
/* Use this macro when declaring classes that implement this interface. */
#define NS_DECL_NSIACCESSIBLEDOCUMENT_18 \
NS_IMETHOD GetURL(nsAString & aURL); \
NS_IMETHOD GetTitle(nsAString & aTitle); \
NS_IMETHOD GetMimeType(nsAString & aMimeType); \
NS_IMETHOD GetDocType(nsAString & aDocType); \
NS_IMETHOD GetIsEditable(PRBool *aIsEditable); \
NS_IMETHOD GetDocument(nsIDOMDocument * *aDocument); \
NS_IMETHOD GetWindow(nsIDOMWindow * *aWindow); \
NS_IMETHOD GetCaretAccessible(nsIAccessible * *aCaretAccessible); \
NS_IMETHOD GetNameSpaceURIForID(PRInt16 nameSpaceID, nsAString & _retval); \
NS_IMETHOD GetWindowHandle(void * *aWindowHandle); \
NS_IMETHOD GetCachedAccessNode(void * aUniqueID, nsIAccessNode **_retval); \
NS_IMETHOD GetAccessibleInParentChain(nsIDOMNode *aDOMNode, nsIAccessible **_retval);
/* Use this macro to declare functions that forward the behavior of this interface to another object. */
#define NS_FORWARD_NSIACCESSIBLEDOCUMENT_18(_to) \
NS_IMETHOD GetURL(nsAString & aURL) { return _to GetURL(aURL); } \
NS_IMETHOD GetTitle(nsAString & aTitle) { return _to GetTitle(aTitle); } \
NS_IMETHOD GetMimeType(nsAString & aMimeType) { return _to GetMimeType(aMimeType); } \
NS_IMETHOD GetDocType(nsAString & aDocType) { return _to GetDocType(aDocType); } \
NS_IMETHOD GetIsEditable(PRBool *aIsEditable) { return _to GetIsEditable(aIsEditable); } \
NS_IMETHOD GetDocument(nsIDOMDocument * *aDocument) { return _to GetDocument(aDocument); } \
NS_IMETHOD GetWindow(nsIDOMWindow * *aWindow) { return _to GetWindow(aWindow); } \
NS_IMETHOD GetCaretAccessible(nsIAccessible * *aCaretAccessible) { return _to GetCaretAccessible(aCaretAccessible); } \
NS_IMETHOD GetNameSpaceURIForID(PRInt16 nameSpaceID, nsAString & _retval) { return _to GetNameSpaceURIForID(nameSpaceID, _retval); } \
NS_IMETHOD GetWindowHandle(void * *aWindowHandle) { return _to GetWindowHandle(aWindowHandle); } \
NS_IMETHOD GetCachedAccessNode(void * aUniqueID, nsIAccessNode **_retval) { return _to GetCachedAccessNode(aUniqueID, _retval); } \
NS_IMETHOD GetAccessibleInParentChain(nsIDOMNode *aDOMNode, nsIAccessible **_retval) { return _to GetAccessibleInParentChain(aDOMNode, _retval); }
/* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */
#define NS_FORWARD_SAFE_NSIACCESSIBLEDOCUMENT_18(_to) \
NS_IMETHOD GetURL(nsAString & aURL) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetURL(aURL); } \
NS_IMETHOD GetTitle(nsAString & aTitle) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetTitle(aTitle); } \
NS_IMETHOD GetMimeType(nsAString & aMimeType) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetMimeType(aMimeType); } \
NS_IMETHOD GetDocType(nsAString & aDocType) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetDocType(aDocType); } \
NS_IMETHOD GetIsEditable(PRBool *aIsEditable) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetIsEditable(aIsEditable); } \
NS_IMETHOD GetDocument(nsIDOMDocument * *aDocument) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetDocument(aDocument); } \
NS_IMETHOD GetWindow(nsIDOMWindow * *aWindow) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetWindow(aWindow); } \
NS_IMETHOD GetCaretAccessible(nsIAccessible * *aCaretAccessible) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetCaretAccessible(aCaretAccessible); } \
NS_IMETHOD GetNameSpaceURIForID(PRInt16 nameSpaceID, nsAString & _retval) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetNameSpaceURIForID(nameSpaceID, _retval); } \
NS_IMETHOD GetWindowHandle(void * *aWindowHandle) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetWindowHandle(aWindowHandle); } \
NS_IMETHOD GetCachedAccessNode(void * aUniqueID, nsIAccessNode **_retval) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetCachedAccessNode(aUniqueID, _retval); } \
NS_IMETHOD GetAccessibleInParentChain(nsIDOMNode *aDOMNode, nsIAccessible **_retval) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetAccessibleInParentChain(aDOMNode, _retval); }
#if 0
/* Use the code below as a template for the implementation class for this interface. */
/* Header file */
class nsAccessibleDocument : public nsIAccessibleDocument
{
public:
NS_DECL_ISUPPORTS
NS_DECL_NSIACCESSIBLEDOCUMENT
nsAccessibleDocument();
private:
~nsAccessibleDocument();
protected:
/* additional members */
};
/* Implementation file */
NS_IMPL_ISUPPORTS1(nsAccessibleDocument, nsIAccessibleDocument)
nsAccessibleDocument::nsAccessibleDocument()
{
/* member initializers and constructor code */
}
nsAccessibleDocument::~nsAccessibleDocument()
{
/* destructor code */
}
/* readonly attribute AString URL; */
NS_IMETHODIMP nsAccessibleDocument::GetURL(nsAString & aURL)
{
return NS_ERROR_NOT_IMPLEMENTED;
}
/* readonly attribute AString title; */
NS_IMETHODIMP nsAccessibleDocument::GetTitle(nsAString & aTitle)
{
return NS_ERROR_NOT_IMPLEMENTED;
}
/* readonly attribute AString mimeType; */
NS_IMETHODIMP nsAccessibleDocument::GetMimeType(nsAString & aMimeType)
{
return NS_ERROR_NOT_IMPLEMENTED;
}
/* readonly attribute AString docType; */
NS_IMETHODIMP nsAccessibleDocument::GetDocType(nsAString & aDocType)
{
return NS_ERROR_NOT_IMPLEMENTED;
}
/* readonly attribute boolean isEditable; */
NS_IMETHODIMP nsAccessibleDocument::GetIsEditable(PRBool *aIsEditable)
{
return NS_ERROR_NOT_IMPLEMENTED;
}
/* readonly attribute nsIDOMDocument document; */
NS_IMETHODIMP nsAccessibleDocument::GetDocument(nsIDOMDocument * *aDocument)
{
return NS_ERROR_NOT_IMPLEMENTED;
}
/* readonly attribute nsIDOMWindow window; */
NS_IMETHODIMP nsAccessibleDocument::GetWindow(nsIDOMWindow * *aWindow)
{
return NS_ERROR_NOT_IMPLEMENTED;
}
/* readonly attribute nsIAccessible caretAccessible; */
NS_IMETHODIMP nsAccessibleDocument::GetCaretAccessible(nsIAccessible * *aCaretAccessible)
{
return NS_ERROR_NOT_IMPLEMENTED;
}
/* AString getNameSpaceURIForID (in short nameSpaceID); */
NS_IMETHODIMP nsAccessibleDocument::GetNameSpaceURIForID(PRInt16 nameSpaceID, nsAString & _retval)
{
return NS_ERROR_NOT_IMPLEMENTED;
}
/* [noscript] readonly attribute voidPtr windowHandle; */
NS_IMETHODIMP nsAccessibleDocument::GetWindowHandle(void * *aWindowHandle)
{
return NS_ERROR_NOT_IMPLEMENTED;
}
/* [noscript] nsIAccessNode getCachedAccessNode (in voidPtr aUniqueID); */
NS_IMETHODIMP nsAccessibleDocument::GetCachedAccessNode(void * aUniqueID, nsIAccessNode **_retval)
{
return NS_ERROR_NOT_IMPLEMENTED;
}
/* nsIAccessible getAccessibleInParentChain (in nsIDOMNode aDOMNode); */
NS_IMETHODIMP nsAccessibleDocument::GetAccessibleInParentChain(nsIDOMNode *aDOMNode, nsIAccessible **_retval)
{
return NS_ERROR_NOT_IMPLEMENTED;
}
/* End of implementation class template. */
#endif
#endif /* __gen_nsIAccessibleDocument_18_h__ */