accessible/public/nsIAccessibleRetrieval.idl

changeset 0
6474c204b198
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/accessible/public/nsIAccessibleRetrieval.idl	Wed Dec 31 06:09:35 2014 +0100
     1.3 @@ -0,0 +1,111 @@
     1.4 +/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*-
     1.5 +/* This Source Code Form is subject to the terms of the Mozilla Public
     1.6 + * License, v. 2.0. If a copy of the MPL was not distributed with this
     1.7 + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
     1.8 +
     1.9 +#include "nsISupports.idl"
    1.10 +
    1.11 +interface nsIDOMNode;
    1.12 +interface nsIAccessible;
    1.13 +interface nsIWeakReference;
    1.14 +interface nsIPresShell;
    1.15 +interface nsIDOMWindow;
    1.16 +interface nsIAccessiblePivot;
    1.17 +
    1.18 +/**
    1.19 + * An interface for in-process accessibility clients wishing to get an
    1.20 + * nsIAccessible for a given DOM node.  More documentation at:
    1.21 + *   http://www.mozilla.org/projects/ui/accessibility
    1.22 + */
    1.23 +[scriptable, uuid(17f86615-1a3d-4021-b227-3a2ef5cbffd8)]
    1.24 +interface nsIAccessibleRetrieval : nsISupports
    1.25 +{
    1.26 +  /**
    1.27 +   * Return application accessible.
    1.28 +   */
    1.29 +  nsIAccessible getApplicationAccessible();
    1.30 +
    1.31 +  /**
    1.32 +   * Return an nsIAccessible for a DOM node in pres shell 0.
    1.33 +   * Create a new accessible of the appropriate type if necessary,
    1.34 +   * or use one from the accessibility cache if it already exists.
    1.35 +   * @param aNode The DOM node to get an accessible for.
    1.36 +   * @return The nsIAccessible for the given DOM node.
    1.37 +   */
    1.38 +  nsIAccessible getAccessibleFor(in nsIDOMNode aNode);
    1.39 +
    1.40 +   /**
    1.41 +    * Returns accessible role as a string.
    1.42 +    *
    1.43 +    * @param aRole - the accessible role constants.
    1.44 +    */
    1.45 +  AString getStringRole(in unsigned long aRole);
    1.46 +
    1.47 +   /**
    1.48 +    * Returns list which contains accessible states as a strings.
    1.49 +    *
    1.50 +    * @param aStates - accessible states.
    1.51 +    * @param aExtraStates - accessible extra states.
    1.52 +    */
    1.53 +  nsISupports getStringStates(in unsigned long aStates,
    1.54 +                              in unsigned long aExtraStates);
    1.55 +
    1.56 +  /**
    1.57 +   * Get the type of accessible event as a string.
    1.58 +   *
    1.59 +   * @param aEventType - the accessible event type constant
    1.60 +   * @return - accessible event type presented as human readable string
    1.61 +   */
    1.62 +  AString getStringEventType(in unsigned long aEventType);
    1.63 +
    1.64 +  /**
    1.65 +   * Get the type of accessible relation as a string.
    1.66 +   *
    1.67 +   * @param aRelationType - the accessible relation type constant
    1.68 +   * @return - accessible relation type presented as human readable string
    1.69 +   */
    1.70 +  AString getStringRelationType(in unsigned long aRelationType);
    1.71 +
    1.72 +  /**
    1.73 +   * Return an accessible for the given DOM node from the cache.
    1.74 +   * @note  the method is intended for testing purposes
    1.75 +   *
    1.76 +   * @param aNode  [in] the DOM node to get an accessible for
    1.77 +   *
    1.78 +   * @return       cached accessible for the given DOM node if any
    1.79 +   */
    1.80 +  nsIAccessible getAccessibleFromCache(in nsIDOMNode aNode);
    1.81 +
    1.82 +  /**
    1.83 +   * Create a new pivot for tracking a position and traversing a subtree.
    1.84 +   *
    1.85 +   * @param aRoot [in] the accessible root for the pivot
    1.86 +   * @return a new pivot
    1.87 +   */
    1.88 +  nsIAccessiblePivot createAccessiblePivot(in nsIAccessible aRoot);
    1.89 +
    1.90 +  /**
    1.91 +   * Enable logging for the given modules, all other modules aren't logged.
    1.92 +   *
    1.93 +   * @param aModules [in] list of modules, format is comma separated list
    1.94 +   *                      like 'docload,doccreate'.
    1.95 +   * @note Works on debug build only.
    1.96 +   * @see Logging.cpp for list of possible values.
    1.97 +   */
    1.98 +  void setLogging(in ACString aModules);
    1.99 +
   1.100 +  /**
   1.101 +   * Return true if the given module is logged.
   1.102 +   */
   1.103 +  boolean isLogged(in AString aModule);
   1.104 +};
   1.105 +
   1.106 +
   1.107 +%{ C++
   1.108 +
   1.109 +// for component registration
   1.110 +// {663CA4A8-D219-4000-925D-D8F66406B626}
   1.111 +#define NS_ACCESSIBLE_RETRIEVAL_CID \
   1.112 +{ 0x663ca4a8, 0xd219, 0x4000, { 0x92, 0x5d, 0xd8, 0xf6, 0x64, 0x6, 0xb6, 0x26 } }
   1.113 +
   1.114 +%}

mercurial