1 /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*-
2 /* This Source Code Form is subject to the terms of the Mozilla Public
3 * License, v. 2.0. If a copy of the MPL was not distributed with this
4 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
6 #include
"nsISupports.idl"
8 interface nsIAccessible
;
9 interface nsIWeakReference
;
10 interface nsIAccessiblePivot
;
15 * An interface for in-process accessibility clients wishing to get an
16 * nsIAccessible for a given DOM node. More documentation at:
17 * http://www.mozilla.org/projects/ui/accessibility
19 [scriptable
, builtinclass
, uuid(2188e3a0
-c88e
-11e7
-8f1a
-0800200c9a66
)]
20 interface nsIAccessibilityService
: nsISupports
23 * Return application accessible.
25 nsIAccessible getApplicationAccessible
();
28 * Return an nsIAccessible for a DOM node in pres shell 0.
29 * Create a new accessible of the appropriate type if necessary,
30 * or use one from the accessibility cache if it already exists.
31 * @param aNode The DOM node to get an accessible for.
32 * @return The nsIAccessible for the given DOM node.
34 nsIAccessible getAccessibleFor
(in Node aNode
);
37 * Returns accessible role as a string.
39 * @param aRole - the accessible role constants.
41 AString getStringRole
(in unsigned long aRole
);
44 * Returns list which contains accessible states as a strings.
46 * @param aStates - accessible states.
47 * @param aExtraStates - accessible extra states.
49 nsISupports getStringStates
(in unsigned long aStates
,
50 in unsigned long aExtraStates
);
53 * Get the type of accessible event as a string.
55 * @param aEventType - the accessible event type constant
56 * @return - accessible event type presented as human readable string
58 AString getStringEventType
(in unsigned long aEventType
);
61 * Get the type of accessible relation as a string.
63 * @param aRelationType - the accessible relation type constant
64 * @return - accessible relation type presented as human readable string
66 AString getStringRelationType
(in unsigned long aRelationType
);
69 * Return an accessible for the given DOM node from the cache.
70 * @note the method is intended for testing purposes
72 * @param aNode [in] the DOM node to get an accessible for
74 * @return cached accessible for the given DOM node if any
76 nsIAccessible getAccessibleFromCache
(in Node aNode
);
79 * Create a new pivot for tracking a position and traversing a subtree.
81 * @param aRoot [in] the accessible root for the pivot
84 nsIAccessiblePivot createAccessiblePivot
(in nsIAccessible aRoot
);
87 * Enable logging for the given modules, all other modules aren't logged.
89 * @param aModules [in] list of modules, format is comma separated list
90 * like 'docload,doccreate'.
91 * @note Works on debug build only.
92 * @see Logging.cpp for list of possible values.
94 void setLogging
(in ACString aModules
);
97 * Return true if the given module is logged.
99 boolean isLogged
(in AString aModule
);
102 * Get the current accessibility service consumers.
103 * @returns a JSON string representing the accessibility service consumers.
105 AString getConsumers
();