nsIAccessibleEvent.idl 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456
  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 nsIAccessible;
  7. interface nsIAccessibleDocument;
  8. interface nsIDOMNode;
  9. %{C++
  10. #define NS_ACCESSIBLE_EVENT_TOPIC "accessible-event"
  11. %}
  12. /**
  13. * An interface for accessibility events listened to
  14. * by in-process accessibility clients, which can be used
  15. * to find out how to get accessibility and DOM interfaces for
  16. * the event and its target. To listen to in-process accessibility invents,
  17. * make your object an nsIObserver, and listen for accessible-event by
  18. * using code something like this:
  19. * nsCOMPtr<nsIObserverService> observerService =
  20. * do_GetService("@mozilla.org/observer-service;1", &rv);
  21. * if (NS_SUCCEEDED(rv))
  22. * rv = observerService->AddObserver(this, "accessible-event", PR_TRUE);
  23. */
  24. [scriptable, builtinclass, uuid(20c69a40-6c2c-42a3-a578-6f4473aab9dd)]
  25. interface nsIAccessibleEvent : nsISupports
  26. {
  27. /**
  28. * An object has been created.
  29. */
  30. const unsigned long EVENT_SHOW = 0x0001;
  31. /**
  32. * An object has been destroyed.
  33. */
  34. const unsigned long EVENT_HIDE = 0x0002;
  35. /**
  36. * An object's children have changed
  37. */
  38. const unsigned long EVENT_REORDER = 0x0003;
  39. /**
  40. * The active descendant of a component has changed. The active descendant
  41. * is used in objects with transient children.
  42. */
  43. const unsigned long EVENT_ACTIVE_DECENDENT_CHANGED = 0x0004;
  44. /**
  45. * An object has received the keyboard focus.
  46. */
  47. const unsigned long EVENT_FOCUS = 0x0005;
  48. /**
  49. * An object's state has changed.
  50. */
  51. const unsigned long EVENT_STATE_CHANGE = 0x0006;
  52. /**
  53. * An object has changed location, shape, or size.
  54. */
  55. const unsigned long EVENT_LOCATION_CHANGE = 0x0007;
  56. /**
  57. * An object's Name property has changed.
  58. */
  59. const unsigned long EVENT_NAME_CHANGE = 0x0008;
  60. /**
  61. * An object's Description property has changed.
  62. */
  63. const unsigned long EVENT_DESCRIPTION_CHANGE = 0x0009;
  64. /**
  65. * An object's numeric Value has changed.
  66. */
  67. const unsigned long EVENT_VALUE_CHANGE = 0x000A;
  68. /**
  69. * An object's help has changed.
  70. */
  71. const unsigned long EVENT_HELP_CHANGE = 0x000B;
  72. /**
  73. * An object's default action has changed.
  74. */
  75. const unsigned long EVENT_DEFACTION_CHANGE = 0x000C;
  76. /**
  77. * An object's action has changed.
  78. */
  79. const unsigned long EVENT_ACTION_CHANGE = 0x000D;
  80. /**
  81. * An object's keyboard shortcut has changed.
  82. */
  83. const unsigned long EVENT_ACCELERATOR_CHANGE = 0x000E;
  84. /**
  85. * The selection within a container object has changed.
  86. */
  87. const unsigned long EVENT_SELECTION = 0x000F;
  88. /**
  89. * An item within a container object has been added to the selection.
  90. */
  91. const unsigned long EVENT_SELECTION_ADD = 0x0010;
  92. /**
  93. * An item within a container object has been removed from the selection.
  94. */
  95. const unsigned long EVENT_SELECTION_REMOVE = 0x0011;
  96. /**
  97. * Numerous selection changes have occurred within a container object.
  98. */
  99. const unsigned long EVENT_SELECTION_WITHIN = 0x0012;
  100. /**
  101. * An alert has been generated. Server applications send this event when a
  102. * user needs to know that a user interface element has changed.
  103. */
  104. const unsigned long EVENT_ALERT = 0x0013;
  105. /**
  106. * The foreground window has changed.
  107. */
  108. const unsigned long EVENT_FOREGROUND = 0x0014;
  109. /**
  110. * A menu item on the menu bar has been selected.
  111. */
  112. const unsigned long EVENT_MENU_START = 0x0015;
  113. /**
  114. * A menu from the menu bar has been closed.
  115. */
  116. const unsigned long EVENT_MENU_END = 0x0016;
  117. /**
  118. * A pop-up menu has been displayed.
  119. */
  120. const unsigned long EVENT_MENUPOPUP_START = 0x0017;
  121. /**
  122. * A pop-up menu has been closed.
  123. */
  124. const unsigned long EVENT_MENUPOPUP_END = 0x0018;
  125. /**
  126. * A window has received mouse capture.
  127. */
  128. const unsigned long EVENT_CAPTURE_START = 0x0019;
  129. /**
  130. * A window has lost mouse capture.
  131. */
  132. const unsigned long EVENT_CAPTURE_END = 0x001A;
  133. /**
  134. * A window is being moved or resized.
  135. */
  136. const unsigned long EVENT_MOVESIZE_START = 0x001B;
  137. /**
  138. * The movement or resizing of a window has finished
  139. */
  140. const unsigned long EVENT_MOVESIZE_END = 0x001C;
  141. /**
  142. * A window has entered context-sensitive Help mode
  143. */
  144. const unsigned long EVENT_CONTEXTHELP_START = 0x001D;
  145. /**
  146. * A window has exited context-sensitive Help mode
  147. */
  148. const unsigned long EVENT_CONTEXTHELP_END = 0x001E;
  149. /**
  150. * An application is about to enter drag-and-drop mode
  151. */
  152. const unsigned long EVENT_DRAGDROP_START = 0x001F;
  153. /**
  154. * An application is about to exit drag-and-drop mode
  155. */
  156. const unsigned long EVENT_DRAGDROP_END = 0x0020;
  157. /**
  158. * A dialog box has been displayed
  159. */
  160. const unsigned long EVENT_DIALOG_START = 0x0021;
  161. /**
  162. * A dialog box has been closed
  163. */
  164. const unsigned long EVENT_DIALOG_END = 0x0022;
  165. /**
  166. * Scrolling has started on a scroll bar
  167. */
  168. const unsigned long EVENT_SCROLLING_START = 0x0023;
  169. /**
  170. * Scrolling has ended on a scroll bar
  171. */
  172. const unsigned long EVENT_SCROLLING_END = 0x0024;
  173. /**
  174. * A window object is about to be minimized or maximized
  175. */
  176. const unsigned long EVENT_MINIMIZE_START = 0x0025;
  177. /**
  178. * A window object has been minimized or maximized
  179. */
  180. const unsigned long EVENT_MINIMIZE_END = 0x0026;
  181. /**
  182. * The loading of the document has completed.
  183. */
  184. const unsigned long EVENT_DOCUMENT_LOAD_COMPLETE = 0x0027;
  185. /**
  186. * The document contents are being reloaded.
  187. */
  188. const unsigned long EVENT_DOCUMENT_RELOAD = 0x0028;
  189. /**
  190. * The loading of the document was interrupted.
  191. */
  192. const unsigned long EVENT_DOCUMENT_LOAD_STOPPED = 0x0029;
  193. /**
  194. * The document wide attributes of the document object have changed.
  195. */
  196. const unsigned long EVENT_DOCUMENT_ATTRIBUTES_CHANGED = 0x002A;
  197. /**
  198. * The contents of the document have changed.
  199. */
  200. const unsigned long EVENT_DOCUMENT_CONTENT_CHANGED = 0x002B;
  201. const unsigned long EVENT_PROPERTY_CHANGED = 0x002C;
  202. /**
  203. * A slide changed in a presentation document or a page boundary was
  204. * crossed in a word processing document.
  205. */
  206. const unsigned long EVENT_PAGE_CHANGED = 0x002D;
  207. /**
  208. * A text object's attributes changed.
  209. * Also see EVENT_OBJECT_ATTRIBUTE_CHANGED.
  210. */
  211. const unsigned long EVENT_TEXT_ATTRIBUTE_CHANGED = 0x002E;
  212. /**
  213. * The caret has moved to a new position.
  214. */
  215. const unsigned long EVENT_TEXT_CARET_MOVED = 0x002F;
  216. /**
  217. * This event indicates general text changes, i.e. changes to text that is
  218. * exposed through the IAccessibleText and IAccessibleEditableText interfaces.
  219. */
  220. const unsigned long EVENT_TEXT_CHANGED = 0x0030;
  221. /**
  222. * Text was inserted.
  223. */
  224. const unsigned long EVENT_TEXT_INSERTED = 0x0031;
  225. /**
  226. * Text was removed.
  227. */
  228. const unsigned long EVENT_TEXT_REMOVED = 0x0032;
  229. /**
  230. * Text was updated.
  231. */
  232. const unsigned long EVENT_TEXT_UPDATED = 0x0033;
  233. /**
  234. * The text selection changed.
  235. */
  236. const unsigned long EVENT_TEXT_SELECTION_CHANGED = 0x0034;
  237. /**
  238. * A visibile data event indicates the change of the visual appearance
  239. * of an accessible object. This includes for example most of the
  240. * attributes available via the IAccessibleComponent interface.
  241. */
  242. const unsigned long EVENT_VISIBLE_DATA_CHANGED = 0x0035;
  243. /**
  244. * The caret moved from one column to the next.
  245. */
  246. const unsigned long EVENT_TEXT_COLUMN_CHANGED = 0x0036;
  247. /**
  248. * The caret moved from one section to the next.
  249. */
  250. const unsigned long EVENT_SECTION_CHANGED = 0x0037;
  251. /**
  252. * A table caption changed.
  253. */
  254. const unsigned long EVENT_TABLE_CAPTION_CHANGED = 0x0038;
  255. /**
  256. * A table's data changed.
  257. */
  258. const unsigned long EVENT_TABLE_MODEL_CHANGED = 0x0039;
  259. /**
  260. * A table's summary changed.
  261. */
  262. const unsigned long EVENT_TABLE_SUMMARY_CHANGED = 0x003A;
  263. /**
  264. * A table's row description changed.
  265. */
  266. const unsigned long EVENT_TABLE_ROW_DESCRIPTION_CHANGED = 0x003B;
  267. /**
  268. * A table's row header changed.
  269. */
  270. const unsigned long EVENT_TABLE_ROW_HEADER_CHANGED = 0x003C;
  271. const unsigned long EVENT_TABLE_ROW_INSERT = 0x003D;
  272. const unsigned long EVENT_TABLE_ROW_DELETE = 0x003E;
  273. const unsigned long EVENT_TABLE_ROW_REORDER = 0x003F;
  274. /**
  275. * A table's column description changed.
  276. */
  277. const unsigned long EVENT_TABLE_COLUMN_DESCRIPTION_CHANGED = 0x0040;
  278. /**
  279. * A table's column header changed.
  280. */
  281. const unsigned long EVENT_TABLE_COLUMN_HEADER_CHANGED = 0x0041;
  282. const unsigned long EVENT_TABLE_COLUMN_INSERT = 0x0042;
  283. const unsigned long EVENT_TABLE_COLUMN_DELETE = 0x0043;
  284. const unsigned long EVENT_TABLE_COLUMN_REORDER = 0x0044;
  285. const unsigned long EVENT_WINDOW_ACTIVATE = 0x0045;
  286. const unsigned long EVENT_WINDOW_CREATE = 0x0046;
  287. const unsigned long EVENT_WINDOW_DEACTIVATE = 0x0047;
  288. const unsigned long EVENT_WINDOW_DESTROY = 0x0048;
  289. const unsigned long EVENT_WINDOW_MAXIMIZE = 0x0049;
  290. const unsigned long EVENT_WINDOW_MINIMIZE = 0x004A;
  291. const unsigned long EVENT_WINDOW_RESIZE = 0x004B;
  292. const unsigned long EVENT_WINDOW_RESTORE = 0x004C;
  293. /**
  294. * The ending index of this link within the containing string has changed.
  295. */
  296. const unsigned long EVENT_HYPERLINK_END_INDEX_CHANGED = 0x004D;
  297. /**
  298. * The number of anchors assoicated with this hyperlink object has changed.
  299. */
  300. const unsigned long EVENT_HYPERLINK_NUMBER_OF_ANCHORS_CHANGED = 0x004E;
  301. /**
  302. * The hyperlink selected state changed from selected to unselected or
  303. * from unselected to selected.
  304. */
  305. const unsigned long EVENT_HYPERLINK_SELECTED_LINK_CHANGED = 0x004F;
  306. /**
  307. * One of the links associated with the hypertext object has been activated.
  308. */
  309. const unsigned long EVENT_HYPERTEXT_LINK_ACTIVATED = 0x0050;
  310. /**
  311. * One of the links associated with the hypertext object has been selected.
  312. */
  313. const unsigned long EVENT_HYPERTEXT_LINK_SELECTED = 0x0051;
  314. /**
  315. * The starting index of this link within the containing string has changed.
  316. */
  317. const unsigned long EVENT_HYPERLINK_START_INDEX_CHANGED = 0x0052;
  318. /**
  319. * Focus has changed from one hypertext object to another, or focus moved
  320. * from a non-hypertext object to a hypertext object, or focus moved from a
  321. * hypertext object to a non-hypertext object.
  322. */
  323. const unsigned long EVENT_HYPERTEXT_CHANGED = 0x0053;
  324. /**
  325. * The number of hyperlinks associated with a hypertext object changed.
  326. */
  327. const unsigned long EVENT_HYPERTEXT_NLINKS_CHANGED = 0x0054;
  328. /**
  329. * An object's attributes changed. Also see EVENT_TEXT_ATTRIBUTE_CHANGED.
  330. */
  331. const unsigned long EVENT_OBJECT_ATTRIBUTE_CHANGED = 0x0055;
  332. /**
  333. * A cursorable's virtual cursor has changed.
  334. */
  335. const unsigned long EVENT_VIRTUALCURSOR_CHANGED = 0x0056;
  336. /**
  337. * An object's text Value has changed.
  338. */
  339. const unsigned long EVENT_TEXT_VALUE_CHANGE = 0x0057;
  340. /**
  341. * Help make sure event map does not get out-of-line.
  342. */
  343. const unsigned long EVENT_LAST_ENTRY = 0x0058;
  344. /**
  345. * The type of event, based on the enumerated event values
  346. * defined in this interface.
  347. */
  348. readonly attribute unsigned long eventType;
  349. /**
  350. * The nsIAccessible associated with the event.
  351. * May return null if no accessible is available
  352. */
  353. readonly attribute nsIAccessible accessible;
  354. /**
  355. * The nsIAccessibleDocument that the event target nsIAccessible
  356. * resides in. This can be used to get the DOM window,
  357. * the DOM document and the window handler, among other things.
  358. */
  359. readonly attribute nsIAccessibleDocument accessibleDocument;
  360. /**
  361. * The nsIDOMNode associated with the event
  362. * May return null if accessible for event has been shut down
  363. */
  364. readonly attribute nsIDOMNode DOMNode;
  365. /**
  366. * Returns true if the event was caused by explicit user input,
  367. * as opposed to purely originating from a timer or mouse movement
  368. */
  369. readonly attribute boolean isFromUserInput;
  370. };