1 /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*-
2 /* ***** BEGIN LICENSE BLOCK *****
3 * Version: MPL 1.1/GPL 2.0/LGPL 2.1
5 * The contents of this file are subject to the Mozilla Public License Version
6 * 1.1 (the "License"); you may not use this file except in compliance with
7 * the License. You may obtain a copy of the License at
8 * http://www.mozilla.org/MPL/
10 * Software distributed under the License is distributed on an "AS IS" basis,
11 * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
12 * for the specific language governing rights and limitations under the
15 * The Original Code is mozilla.org code.
17 * The Initial Developer of the Original Code is
18 * Netscape Communications Corporation.
19 * Portions created by the Initial Developer are Copyright (C) 2003
20 * the Initial Developer. All Rights Reserved.
22 * Original Author: Aaron Leventhal (aaronl@netscape.com)
25 * Alternatively, the contents of this file may be used under the terms of
26 * either the GNU General Public License Version 2 or later (the "GPL"), or
27 * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
28 * in which case the provisions of the GPL or the LGPL are applicable instead
29 * of those above. If you wish to allow use of your version of this file only
30 * under the terms of either the GPL or the LGPL, and not to allow others to
31 * use your version of this file under the terms of the MPL, indicate your
32 * decision by deleting the provisions above and replace them with the notice
33 * and other provisions required by the GPL or the LGPL. If you do not delete
34 * the provisions above, a recipient may use your version of this file under
35 * the terms of any one of the MPL, the GPL or the LGPL.
37 * ***** END LICENSE BLOCK ***** */
39 #include
"nsISupports.idl"
41 interface nsIAccessible
;
42 interface nsIAccessibleEvent
;
44 struct nsRoleMapEntry
;
46 [ptr] native nsRoleMapEntryPtr
(nsRoleMapEntry
);
48 [uuid(893ee16d
-c157
-4d5f
-b236
-60b3b2bef6a5
)]
49 interface nsPIAccessible
: nsISupports
52 * Set accessible parent.
54 void setParent
(in nsIAccessible aAccParent
);
57 * Set first accessible child.
59 void setFirstChild
(in nsIAccessible aAccFirstChild
);
62 * Set next sibling accessible.
64 void setNextSibling
(in nsIAccessible aAccNextSibling
);
67 * Return parent accessible only if cached.
69 void getCachedParent
(out nsIAccessible aAccParent
);
72 * Return first child accessible only if cached.
74 void getCachedFirstChild
(out nsIAccessible aAccFirstChild
);
77 * Set the child count to -1 (unknown) and null out cached child pointers
79 void invalidateChildren
();
82 * Fire accessible event.
84 * @param aEvent - DOM event
85 * @param aTarget - target of DOM event
87 * XXX: eventually this method will be removed (see bug 377022)
89 void fireToolkitEvent
(in unsigned long aEvent
, in nsIAccessible aTarget
);
92 * Fire accessible event.
94 void fireAccessibleEvent
(in nsIAccessibleEvent aAccEvent
);
97 * Return true if there are accessible children in anonymous content
99 readonly attribute
boolean allowsAnonChildAccessibles
;
102 * Assert if child not in parent's cache.
104 void testChildCache
(in nsIAccessible aCachedChild
);
107 * Returns text of accessible if accessible has text role otherwise empty
110 void appendTextTo
(out AString aString
, in unsigned long aStartOffset
,
111 in unsigned long aLength
);
114 * Set the ARIA role map entry for a new accessible.
115 * For a newly created accessible, specify which role map entry should be used.
116 * @param aRoleMapEntry The ARIA nsRoleMapEntry* for the accessible, or
119 void setRoleMapEntry
(in nsRoleMapEntryPtr aRoleMapEntry
);
122 * Maps ARIA state attributes to state of accessible. Note the given state
123 * argument should hold states for accessible before you pass it into this
125 * @param in/out where to fill the states into.
127 void getARIAState
(out unsigned long aState
);