michael@0: /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- michael@0: /* This Source Code Form is subject to the terms of the Mozilla Public michael@0: * License, v. 2.0. If a copy of the MPL was not distributed with this michael@0: * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ michael@0: michael@0: #include "nsISupports.idl" michael@0: michael@0: interface nsIDOMNode; michael@0: interface nsIAccessible; michael@0: interface nsIWeakReference; michael@0: interface nsIPresShell; michael@0: interface nsIDOMWindow; michael@0: interface nsIAccessiblePivot; michael@0: michael@0: /** michael@0: * An interface for in-process accessibility clients wishing to get an michael@0: * nsIAccessible for a given DOM node. More documentation at: michael@0: * http://www.mozilla.org/projects/ui/accessibility michael@0: */ michael@0: [scriptable, uuid(17f86615-1a3d-4021-b227-3a2ef5cbffd8)] michael@0: interface nsIAccessibleRetrieval : nsISupports michael@0: { michael@0: /** michael@0: * Return application accessible. michael@0: */ michael@0: nsIAccessible getApplicationAccessible(); michael@0: michael@0: /** michael@0: * Return an nsIAccessible for a DOM node in pres shell 0. michael@0: * Create a new accessible of the appropriate type if necessary, michael@0: * or use one from the accessibility cache if it already exists. michael@0: * @param aNode The DOM node to get an accessible for. michael@0: * @return The nsIAccessible for the given DOM node. michael@0: */ michael@0: nsIAccessible getAccessibleFor(in nsIDOMNode aNode); michael@0: michael@0: /** michael@0: * Returns accessible role as a string. michael@0: * michael@0: * @param aRole - the accessible role constants. michael@0: */ michael@0: AString getStringRole(in unsigned long aRole); michael@0: michael@0: /** michael@0: * Returns list which contains accessible states as a strings. michael@0: * michael@0: * @param aStates - accessible states. michael@0: * @param aExtraStates - accessible extra states. michael@0: */ michael@0: nsISupports getStringStates(in unsigned long aStates, michael@0: in unsigned long aExtraStates); michael@0: michael@0: /** michael@0: * Get the type of accessible event as a string. michael@0: * michael@0: * @param aEventType - the accessible event type constant michael@0: * @return - accessible event type presented as human readable string michael@0: */ michael@0: AString getStringEventType(in unsigned long aEventType); michael@0: michael@0: /** michael@0: * Get the type of accessible relation as a string. michael@0: * michael@0: * @param aRelationType - the accessible relation type constant michael@0: * @return - accessible relation type presented as human readable string michael@0: */ michael@0: AString getStringRelationType(in unsigned long aRelationType); michael@0: michael@0: /** michael@0: * Return an accessible for the given DOM node from the cache. michael@0: * @note the method is intended for testing purposes michael@0: * michael@0: * @param aNode [in] the DOM node to get an accessible for michael@0: * michael@0: * @return cached accessible for the given DOM node if any michael@0: */ michael@0: nsIAccessible getAccessibleFromCache(in nsIDOMNode aNode); michael@0: michael@0: /** michael@0: * Create a new pivot for tracking a position and traversing a subtree. michael@0: * michael@0: * @param aRoot [in] the accessible root for the pivot michael@0: * @return a new pivot michael@0: */ michael@0: nsIAccessiblePivot createAccessiblePivot(in nsIAccessible aRoot); michael@0: michael@0: /** michael@0: * Enable logging for the given modules, all other modules aren't logged. michael@0: * michael@0: * @param aModules [in] list of modules, format is comma separated list michael@0: * like 'docload,doccreate'. michael@0: * @note Works on debug build only. michael@0: * @see Logging.cpp for list of possible values. michael@0: */ michael@0: void setLogging(in ACString aModules); michael@0: michael@0: /** michael@0: * Return true if the given module is logged. michael@0: */ michael@0: boolean isLogged(in AString aModule); michael@0: }; michael@0: michael@0: michael@0: %{ C++ michael@0: michael@0: // for component registration michael@0: // {663CA4A8-D219-4000-925D-D8F66406B626} michael@0: #define NS_ACCESSIBLE_RETRIEVAL_CID \ michael@0: { 0x663ca4a8, 0xd219, 0x4000, { 0x92, 0x5d, 0xd8, 0xf6, 0x64, 0x6, 0xb6, 0x26 } } michael@0: michael@0: %}