Thu, 22 Jan 2015 13:21:57 +0100
Incorporate requested changes from Mozilla in review:
https://bugzilla.mozilla.org/show_bug.cgi?id=1123480#c6
michael@0 | 1 | /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- |
michael@0 | 2 | /* This Source Code Form is subject to the terms of the Mozilla Public |
michael@0 | 3 | * License, v. 2.0. If a copy of the MPL was not distributed with this |
michael@0 | 4 | * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ |
michael@0 | 5 | |
michael@0 | 6 | #include "nsISupports.idl" |
michael@0 | 7 | |
michael@0 | 8 | interface nsIDOMNode; |
michael@0 | 9 | interface nsIAccessible; |
michael@0 | 10 | interface nsIWeakReference; |
michael@0 | 11 | interface nsIPresShell; |
michael@0 | 12 | interface nsIDOMWindow; |
michael@0 | 13 | interface nsIAccessiblePivot; |
michael@0 | 14 | |
michael@0 | 15 | /** |
michael@0 | 16 | * An interface for in-process accessibility clients wishing to get an |
michael@0 | 17 | * nsIAccessible for a given DOM node. More documentation at: |
michael@0 | 18 | * http://www.mozilla.org/projects/ui/accessibility |
michael@0 | 19 | */ |
michael@0 | 20 | [scriptable, uuid(17f86615-1a3d-4021-b227-3a2ef5cbffd8)] |
michael@0 | 21 | interface nsIAccessibleRetrieval : nsISupports |
michael@0 | 22 | { |
michael@0 | 23 | /** |
michael@0 | 24 | * Return application accessible. |
michael@0 | 25 | */ |
michael@0 | 26 | nsIAccessible getApplicationAccessible(); |
michael@0 | 27 | |
michael@0 | 28 | /** |
michael@0 | 29 | * Return an nsIAccessible for a DOM node in pres shell 0. |
michael@0 | 30 | * Create a new accessible of the appropriate type if necessary, |
michael@0 | 31 | * or use one from the accessibility cache if it already exists. |
michael@0 | 32 | * @param aNode The DOM node to get an accessible for. |
michael@0 | 33 | * @return The nsIAccessible for the given DOM node. |
michael@0 | 34 | */ |
michael@0 | 35 | nsIAccessible getAccessibleFor(in nsIDOMNode aNode); |
michael@0 | 36 | |
michael@0 | 37 | /** |
michael@0 | 38 | * Returns accessible role as a string. |
michael@0 | 39 | * |
michael@0 | 40 | * @param aRole - the accessible role constants. |
michael@0 | 41 | */ |
michael@0 | 42 | AString getStringRole(in unsigned long aRole); |
michael@0 | 43 | |
michael@0 | 44 | /** |
michael@0 | 45 | * Returns list which contains accessible states as a strings. |
michael@0 | 46 | * |
michael@0 | 47 | * @param aStates - accessible states. |
michael@0 | 48 | * @param aExtraStates - accessible extra states. |
michael@0 | 49 | */ |
michael@0 | 50 | nsISupports getStringStates(in unsigned long aStates, |
michael@0 | 51 | in unsigned long aExtraStates); |
michael@0 | 52 | |
michael@0 | 53 | /** |
michael@0 | 54 | * Get the type of accessible event as a string. |
michael@0 | 55 | * |
michael@0 | 56 | * @param aEventType - the accessible event type constant |
michael@0 | 57 | * @return - accessible event type presented as human readable string |
michael@0 | 58 | */ |
michael@0 | 59 | AString getStringEventType(in unsigned long aEventType); |
michael@0 | 60 | |
michael@0 | 61 | /** |
michael@0 | 62 | * Get the type of accessible relation as a string. |
michael@0 | 63 | * |
michael@0 | 64 | * @param aRelationType - the accessible relation type constant |
michael@0 | 65 | * @return - accessible relation type presented as human readable string |
michael@0 | 66 | */ |
michael@0 | 67 | AString getStringRelationType(in unsigned long aRelationType); |
michael@0 | 68 | |
michael@0 | 69 | /** |
michael@0 | 70 | * Return an accessible for the given DOM node from the cache. |
michael@0 | 71 | * @note the method is intended for testing purposes |
michael@0 | 72 | * |
michael@0 | 73 | * @param aNode [in] the DOM node to get an accessible for |
michael@0 | 74 | * |
michael@0 | 75 | * @return cached accessible for the given DOM node if any |
michael@0 | 76 | */ |
michael@0 | 77 | nsIAccessible getAccessibleFromCache(in nsIDOMNode aNode); |
michael@0 | 78 | |
michael@0 | 79 | /** |
michael@0 | 80 | * Create a new pivot for tracking a position and traversing a subtree. |
michael@0 | 81 | * |
michael@0 | 82 | * @param aRoot [in] the accessible root for the pivot |
michael@0 | 83 | * @return a new pivot |
michael@0 | 84 | */ |
michael@0 | 85 | nsIAccessiblePivot createAccessiblePivot(in nsIAccessible aRoot); |
michael@0 | 86 | |
michael@0 | 87 | /** |
michael@0 | 88 | * Enable logging for the given modules, all other modules aren't logged. |
michael@0 | 89 | * |
michael@0 | 90 | * @param aModules [in] list of modules, format is comma separated list |
michael@0 | 91 | * like 'docload,doccreate'. |
michael@0 | 92 | * @note Works on debug build only. |
michael@0 | 93 | * @see Logging.cpp for list of possible values. |
michael@0 | 94 | */ |
michael@0 | 95 | void setLogging(in ACString aModules); |
michael@0 | 96 | |
michael@0 | 97 | /** |
michael@0 | 98 | * Return true if the given module is logged. |
michael@0 | 99 | */ |
michael@0 | 100 | boolean isLogged(in AString aModule); |
michael@0 | 101 | }; |
michael@0 | 102 | |
michael@0 | 103 | |
michael@0 | 104 | %{ C++ |
michael@0 | 105 | |
michael@0 | 106 | // for component registration |
michael@0 | 107 | // {663CA4A8-D219-4000-925D-D8F66406B626} |
michael@0 | 108 | #define NS_ACCESSIBLE_RETRIEVAL_CID \ |
michael@0 | 109 | { 0x663ca4a8, 0xd219, 0x4000, { 0x92, 0x5d, 0xd8, 0xf6, 0x64, 0x6, 0xb6, 0x26 } } |
michael@0 | 110 | |
michael@0 | 111 | %} |