nsIAccessibilityService.idl 3.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109
  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/. */
  5. #include "nsISupports.idl"
  6. interface nsIDOMNode;
  7. interface nsIAccessible;
  8. interface nsIWeakReference;
  9. interface nsIPresShell;
  10. interface nsIAccessiblePivot;
  11. /**
  12. * An interface for in-process accessibility clients wishing to get an
  13. * nsIAccessible for a given DOM node. More documentation at:
  14. * http://www.mozilla.org/projects/ui/accessibility
  15. */
  16. [scriptable, builtinclass, uuid(9a6f80fe-25cc-405c-9f8f-25869bc9f94e)]
  17. interface nsIAccessibilityService : nsISupports
  18. {
  19. /**
  20. * Return application accessible.
  21. */
  22. nsIAccessible getApplicationAccessible();
  23. /**
  24. * Return an nsIAccessible for a DOM node in pres shell 0.
  25. * Create a new accessible of the appropriate type if necessary,
  26. * or use one from the accessibility cache if it already exists.
  27. * @param aNode The DOM node to get an accessible for.
  28. * @return The nsIAccessible for the given DOM node.
  29. */
  30. nsIAccessible getAccessibleFor(in nsIDOMNode aNode);
  31. /**
  32. * Returns accessible role as a string.
  33. *
  34. * @param aRole - the accessible role constants.
  35. */
  36. AString getStringRole(in unsigned long aRole);
  37. /**
  38. * Returns list which contains accessible states as a strings.
  39. *
  40. * @param aStates - accessible states.
  41. * @param aExtraStates - accessible extra states.
  42. */
  43. nsISupports getStringStates(in unsigned long aStates,
  44. in unsigned long aExtraStates);
  45. /**
  46. * Get the type of accessible event as a string.
  47. *
  48. * @param aEventType - the accessible event type constant
  49. * @return - accessible event type presented as human readable string
  50. */
  51. AString getStringEventType(in unsigned long aEventType);
  52. /**
  53. * Get the type of accessible relation as a string.
  54. *
  55. * @param aRelationType - the accessible relation type constant
  56. * @return - accessible relation type presented as human readable string
  57. */
  58. AString getStringRelationType(in unsigned long aRelationType);
  59. /**
  60. * Return an accessible for the given DOM node from the cache.
  61. * @note the method is intended for testing purposes
  62. *
  63. * @param aNode [in] the DOM node to get an accessible for
  64. *
  65. * @return cached accessible for the given DOM node if any
  66. */
  67. nsIAccessible getAccessibleFromCache(in nsIDOMNode aNode);
  68. /**
  69. * Create a new pivot for tracking a position and traversing a subtree.
  70. *
  71. * @param aRoot [in] the accessible root for the pivot
  72. * @return a new pivot
  73. */
  74. nsIAccessiblePivot createAccessiblePivot(in nsIAccessible aRoot);
  75. /**
  76. * Enable logging for the given modules, all other modules aren't logged.
  77. *
  78. * @param aModules [in] list of modules, format is comma separated list
  79. * like 'docload,doccreate'.
  80. * @note Works on debug build only.
  81. * @see Logging.cpp for list of possible values.
  82. */
  83. void setLogging(in ACString aModules);
  84. /**
  85. * Return true if the given module is logged.
  86. */
  87. boolean isLogged(in AString aModule);
  88. };
  89. /**
  90. * @deprecated, use nsIAccessibilityService instead.
  91. */
  92. [scriptable, builtinclass, uuid(d85e0cbe-47ce-490c-8488-f821dd2be0c2)]
  93. interface nsIAccessibleRetrieval : nsIAccessibilityService
  94. {
  95. };