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
;
11 interface nsIAccessibleTextLeafPoint
;
16 * An interface for in-process accessibility clients wishing to get an
17 * nsIAccessible for a given DOM node. More documentation at:
18 * http://www.mozilla.org/projects/ui/accessibility
20 [scriptable
, builtinclass
, uuid(2188e3a0
-c88e
-11e7
-8f1a
-0800200c9a66
)]
21 interface nsIAccessibilityService
: nsISupports
24 * Return application accessible.
26 nsIAccessible getApplicationAccessible
();
29 * Return an nsIAccessible for a DOM node in pres shell 0.
30 * Create a new accessible of the appropriate type if necessary,
31 * or use one from the accessibility cache if it already exists.
32 * @param aNode The DOM node to get an accessible for.
33 * @return The nsIAccessible for the given DOM node.
35 nsIAccessible getAccessibleFor
(in Node aNode
);
37 nsIAccessible getAccessibleDescendantFor
(in Node aNode
);
40 * Returns accessible role as a string.
42 * @param aRole - the accessible role constants.
44 AString getStringRole
(in unsigned long aRole
);
47 * Returns list which contains accessible states as a strings.
49 * @param aStates - accessible states.
50 * @param aExtraStates - accessible extra states.
52 nsISupports getStringStates
(in unsigned long aStates
,
53 in unsigned long aExtraStates
);
56 * Get the type of accessible event as a string.
58 * @param aEventType - the accessible event type constant
59 * @return - accessible event type presented as human readable string
61 AString getStringEventType
(in unsigned long aEventType
);
64 * Get the type of accessible relation as a string.
66 * @param aRelationType - the accessible relation type constant
67 * @return - accessible relation type presented as human readable string
69 AString getStringRelationType
(in unsigned long aRelationType
);
72 * Return an accessible for the given DOM node from the cache.
73 * @note the method is intended for testing purposes
75 * @param aNode [in] the DOM node to get an accessible for
77 * @return cached accessible for the given DOM node if any
79 nsIAccessible getAccessibleFromCache
(in Node aNode
);
82 * Create a new pivot for tracking a position and traversing a subtree.
84 * @param aRoot [in] the accessible root for the pivot
87 nsIAccessiblePivot createAccessiblePivot
(in nsIAccessible aRoot
);
90 * Create a new nsIAccessibleTextLeafPoint.
92 * @param aAccessible [in] the accessible for the point
93 * @param aOffset [in] the offset of the point
96 nsIAccessibleTextLeafPoint createTextLeafPoint
(in nsIAccessible aAccessible
,
100 * Enable logging for the given modules, all other modules aren't logged.
102 * @param aModules [in] list of modules, format is comma separated list
103 * like 'docload,doccreate'.
104 * @note Works on debug build only.
105 * @see Logging.cpp for list of possible values.
107 void setLogging
(in ACString aModules
);
110 * Return true if the given module is logged.
112 boolean isLogged
(in AString aModule
);
115 * Get the current accessibility service consumers.
116 * @returns a JSON string representing the accessibility service consumers.
118 AString getConsumers
();