Bug 470455 - test_database_sync_embed_visits.js leaks, r=sdwilsh
[wine-gecko.git] / accessible / public / nsIAccessibleEvent.idl
blob2a1827660757ae17a19b231d54dc552f534ffda0
1 /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*-
2 /* ***** BEGIN LICENSE BLOCK *****
3 * Version: MPL 1.1/GPL 2.0/LGPL 2.1
5 * The contents of this file are subject to the Mozilla Public License Version
6 * 1.1 (the "License"); you may not use this file except in compliance with
7 * the License. You may obtain a copy of the License at
8 * http://www.mozilla.org/MPL/
10 * Software distributed under the License is distributed on an "AS IS" basis,
11 * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
12 * for the specific language governing rights and limitations under the
13 * License.
15 * The Original Code is mozilla.org code.
17 * The Initial Developer of the Original Code is
18 * Netscape Communications Corporation.
19 * Portions created by the Initial Developer are Copyright (C) 2003
20 * the Initial Developer. All Rights Reserved.
22 * Contributors:
23 * Aaron Leventhal <aleventh@us.ibm.com> (original author)
24 * Alexander Surkov <surkov.alexander@gmail.com>
26 * Alternatively, the contents of this file may be used under the terms of
27 * either the GNU General Public License Version 2 or later (the "GPL"), or
28 * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
29 * in which case the provisions of the GPL or the LGPL are applicable instead
30 * of those above. If you wish to allow use of your version of this file only
31 * under the terms of either the GPL or the LGPL, and not to allow others to
32 * use your version of this file under the terms of the MPL, indicate your
33 * decision by deleting the provisions above and replace them with the notice
34 * and other provisions required by the GPL or the LGPL. If you do not delete
35 * the provisions above, a recipient may use your version of this file under
36 * the terms of any one of the MPL, the GPL or the LGPL.
38 * ***** END LICENSE BLOCK ***** */
40 #include "nsISupports.idl"
42 interface nsIAccessible;
43 interface nsIAccessibleDocument;
44 interface nsIDOMNode;
46 %{C++
47 #define NS_ACCESSIBLE_EVENT_TOPIC "accessible-event"
50 /**
51 * An interface for accessibility events listened to
52 * by in-process accessibility clients, which can be used
53 * to find out how to get accessibility and DOM interfaces for
54 * the event and its target. To listen to in-process accessibility invents,
55 * make your object an nsIObserver, and listen for accessible-event by
56 * using code something like this:
57 * nsCOMPtr<nsIObserverService> observerService =
58 * do_GetService("@mozilla.org/observer-service;1", &rv);
59 * if (NS_SUCCEEDED(rv))
60 * rv = observerService->AddObserver(this, "accessible-event", PR_TRUE);
62 * @status UNDER_REVIEW
64 [scriptable, uuid(ba448f0e-a761-48c8-a0f5-1f25e23d4fe4)]
65 interface nsIAccessibleEvent : nsISupports
67 /**
68 * An object has been created.
70 const unsigned long EVENT_DOM_CREATE = 0x0001;
72 /**
73 * An object has been destroyed.
75 const unsigned long EVENT_DOM_DESTROY = 0x0002;
77 /**
78 * An object's properties or content have changed significantly so that the
79 * type of object has really changed, and therefore the accessible should be
80 * destroyed or recreated.
82 const unsigned long EVENT_DOM_SIGNIFICANT_CHANGE = 0x0003;
84 /**
85 * A hidden object is shown -- this is a layout occurance and is thus asynchronous
87 const unsigned long EVENT_ASYNCH_SHOW = 0x0004;
89 /**
90 * An object is hidden -- this is a layout occurance and is thus asynchronous
92 const unsigned long EVENT_ASYNCH_HIDE = 0x0005;
94 /**
95 * An object had a significant layout change which could affect
96 * the type of accessible object -- this is a layout occurance and is thus asynchronous
98 const unsigned long EVENT_ASYNCH_SIGNIFICANT_CHANGE = 0x0006;
101 * The active descendant of a component has changed. The active descendant
102 * is used in objects with transient children.
104 const unsigned long EVENT_ACTIVE_DECENDENT_CHANGED = 0x0007;
107 * An object has received the keyboard focus.
109 const unsigned long EVENT_FOCUS = 0x0008;
112 * An object's state has changed.
114 const unsigned long EVENT_STATE_CHANGE = 0x0009;
117 * An object has changed location, shape, or size.
119 const unsigned long EVENT_LOCATION_CHANGE = 0x000A;
122 * An object's Name property has changed.
124 const unsigned long EVENT_NAME_CHANGE = 0x000B;
127 * An object's Description property has changed.
129 const unsigned long EVENT_DESCRIPTION_CHANGE = 0x000C;
132 * An object's Value property has changed.
134 const unsigned long EVENT_VALUE_CHANGE = 0x000D;
137 * An object's help has changed.
139 const unsigned long EVENT_HELP_CHANGE = 0x000E;
142 * An object's default action has changed.
144 const unsigned long EVENT_DEFACTION_CHANGE = 0x000F;
147 * An object's action has changed.
149 const unsigned long EVENT_ACTION_CHANGE = 0x0010;
152 * An object's keyboard shortcut has changed.
154 const unsigned long EVENT_ACCELERATOR_CHANGE = 0x0011;
157 * The selection within a container object has changed.
159 const unsigned long EVENT_SELECTION = 0x0012;
162 * An item within a container object has been added to the selection.
164 const unsigned long EVENT_SELECTION_ADD = 0x0013;
167 * An item within a container object has been removed from the selection.
169 const unsigned long EVENT_SELECTION_REMOVE = 0x0014;
172 * Numerous selection changes have occurred within a container object.
174 const unsigned long EVENT_SELECTION_WITHIN = 0x0015;
177 * An alert has been generated. Server applications send this event when a
178 * user needs to know that a user interface element has changed.
180 const unsigned long EVENT_ALERT = 0x0016;
183 * The foreground window has changed.
185 const unsigned long EVENT_FOREGROUND = 0x0017;
188 * A menu item on the menu bar has been selected.
190 const unsigned long EVENT_MENU_START = 0x0018;
193 * A menu from the menu bar has been closed.
195 const unsigned long EVENT_MENU_END = 0x0019;
198 * A pop-up menu has been displayed.
200 const unsigned long EVENT_MENUPOPUP_START = 0x001A;
203 * A pop-up menu has been closed.
205 const unsigned long EVENT_MENUPOPUP_END = 0x001B;
208 * A window has received mouse capture.
210 const unsigned long EVENT_CAPTURE_START = 0x001C;
213 * A window has lost mouse capture.
215 const unsigned long EVENT_CAPTURE_END = 0x001D;
218 * A window is being moved or resized.
220 const unsigned long EVENT_MOVESIZE_START = 0x001E;
223 * The movement or resizing of a window has finished
225 const unsigned long EVENT_MOVESIZE_END = 0x001F;
228 * A window has entered context-sensitive Help mode
230 const unsigned long EVENT_CONTEXTHELP_START = 0x0020;
233 * A window has exited context-sensitive Help mode
235 const unsigned long EVENT_CONTEXTHELP_END = 0x0021;
238 * An application is about to enter drag-and-drop mode
240 const unsigned long EVENT_DRAGDROP_START = 0x0022;
243 * An application is about to exit drag-and-drop mode
245 const unsigned long EVENT_DRAGDROP_END = 0x0023;
248 * A dialog box has been displayed
250 const unsigned long EVENT_DIALOG_START = 0x0024;
253 * A dialog box has been closed
255 const unsigned long EVENT_DIALOG_END = 0x0025;
258 * Scrolling has started on a scroll bar
260 const unsigned long EVENT_SCROLLING_START = 0x0026;
263 * Scrolling has ended on a scroll bar
265 const unsigned long EVENT_SCROLLING_END = 0x0027;
268 * A window object is about to be minimized or maximized
270 const unsigned long EVENT_MINIMIZE_START = 0x0028;
273 * A window object has been minimized or maximized
275 const unsigned long EVENT_MINIMIZE_END = 0x0029;
278 * XXX:
280 const unsigned long EVENT_DOCUMENT_LOAD_START = 0x002A;
283 * The loading of the document has completed.
285 const unsigned long EVENT_DOCUMENT_LOAD_COMPLETE = 0x002B;
288 * The document contents are being reloaded.
290 const unsigned long EVENT_DOCUMENT_RELOAD = 0x002C;
293 * The loading of the document was interrupted.
295 const unsigned long EVENT_DOCUMENT_LOAD_STOPPED = 0x002D;
298 * The document wide attributes of the document object have changed.
300 const unsigned long EVENT_DOCUMENT_ATTRIBUTES_CHANGED = 0x002E;
303 * The contents of the document have changed.
305 const unsigned long EVENT_DOCUMENT_CONTENT_CHANGED = 0x002F;
307 const unsigned long EVENT_PROPERTY_CHANGED = 0x0030;
308 const unsigned long EVENT_SELECTION_CHANGED = 0x0031;
311 * A text object's attributes changed.
312 * Also see EVENT_OBJECT_ATTRIBUTE_CHANGED.
314 const unsigned long EVENT_TEXT_ATTRIBUTE_CHANGED = 0x0032;
317 * The caret has moved to a new position.
319 const unsigned long EVENT_TEXT_CARET_MOVED = 0x0033;
322 * This event indicates general text changes, i.e. changes to text that is
323 * exposed through the IAccessibleText and IAccessibleEditableText interfaces.
325 const unsigned long EVENT_TEXT_CHANGED = 0x0034;
328 * Text was inserted.
330 const unsigned long EVENT_TEXT_INSERTED = 0x0035;
333 * Text was removed.
335 const unsigned long EVENT_TEXT_REMOVED = 0x0036;
338 * Text was updated.
340 const unsigned long EVENT_TEXT_UPDATED = 0x0037;
343 * The text selection changed.
345 const unsigned long EVENT_TEXT_SELECTION_CHANGED = 0x0038;
348 * A visibile data event indicates the change of the visual appearance
349 * of an accessible object. This includes for example most of the
350 * attributes available via the IAccessibleComponent interface.
352 const unsigned long EVENT_VISIBLE_DATA_CHANGED = 0x0039;
355 * The caret moved from one column to the next.
357 const unsigned long EVENT_TEXT_COLUMN_CHANGED = 0x003A;
360 * The caret moved from one section to the next.
362 const unsigned long EVENT_SECTION_CHANGED = 0x003B;
365 * A table caption changed.
367 const unsigned long EVENT_TABLE_CAPTION_CHANGED = 0x003C;
370 * A table's data changed.
372 const unsigned long EVENT_TABLE_MODEL_CHANGED = 0x003D;
375 * A table's summary changed.
377 const unsigned long EVENT_TABLE_SUMMARY_CHANGED = 0x003E;
380 * A table's row description changed.
382 const unsigned long EVENT_TABLE_ROW_DESCRIPTION_CHANGED = 0x003F;
385 * A table's row header changed.
387 const unsigned long EVENT_TABLE_ROW_HEADER_CHANGED = 0x0040;
389 const unsigned long EVENT_TABLE_ROW_INSERT = 0x0041;
390 const unsigned long EVENT_TABLE_ROW_DELETE = 0x0042;
391 const unsigned long EVENT_TABLE_ROW_REORDER = 0x0043;
394 * A table's column description changed.
396 const unsigned long EVENT_TABLE_COLUMN_DESCRIPTION_CHANGED = 0x0044;
399 * A table's column header changed.
401 const unsigned long EVENT_TABLE_COLUMN_HEADER_CHANGED = 0x0045;
403 const unsigned long EVENT_TABLE_COLUMN_INSERT = 0x0046;
404 const unsigned long EVENT_TABLE_COLUMN_DELETE = 0x0047;
405 const unsigned long EVENT_TABLE_COLUMN_REORDER = 0x0048;
407 const unsigned long EVENT_WINDOW_ACTIVATE = 0x0049;
408 const unsigned long EVENT_WINDOW_CREATE = 0x004A;
409 const unsigned long EVENT_WINDOW_DEACTIVATE = 0x004B;
410 const unsigned long EVENT_WINDOW_DESTROY = 0x004C;
411 const unsigned long EVENT_WINDOW_MAXIMIZE = 0x004D;
412 const unsigned long EVENT_WINDOW_MINIMIZE = 0x004E;
413 const unsigned long EVENT_WINDOW_RESIZE = 0x004F;
414 const unsigned long EVENT_WINDOW_RESTORE = 0x0050;
417 * The ending index of this link within the containing string has changed.
419 const unsigned long EVENT_HYPERLINK_END_INDEX_CHANGED = 0x0051;
422 * The number of anchors assoicated with this hyperlink object has changed.
424 const unsigned long EVENT_HYPERLINK_NUMBER_OF_ANCHORS_CHANGED = 0x0052;
427 * The hyperlink selected state changed from selected to unselected or
428 * from unselected to selected.
430 const unsigned long EVENT_HYPERLINK_SELECTED_LINK_CHANGED = 0x0053;
433 * One of the links associated with the hypertext object has been activated.
435 const unsigned long EVENT_HYPERTEXT_LINK_ACTIVATED = 0x0054;
438 * One of the links associated with the hypertext object has been selected.
440 const unsigned long EVENT_HYPERTEXT_LINK_SELECTED = 0x0055;
443 * The starting index of this link within the containing string has changed.
445 const unsigned long EVENT_HYPERLINK_START_INDEX_CHANGED = 0x0056;
448 * Focus has changed from one hypertext object to another, or focus moved
449 * from a non-hypertext object to a hypertext object, or focus moved from a
450 * hypertext object to a non-hypertext object.
452 const unsigned long EVENT_HYPERTEXT_CHANGED = 0x0057;
455 * The number of hyperlinks associated with a hypertext object changed.
457 const unsigned long EVENT_HYPERTEXT_NLINKS_CHANGED = 0x0058;
460 * An object's attributes changed. Also see EVENT_TEXT_ATTRIBUTE_CHANGED.
462 const unsigned long EVENT_OBJECT_ATTRIBUTE_CHANGED = 0x0059;
465 * A slide changed in a presentation document or a page boundary was
466 * crossed in a word processing document.
468 const unsigned long EVENT_PAGE_CHANGED = 0x005A;
471 * Used internally in Gecko.
473 const unsigned long EVENT_INTERNAL_LOAD = 0x005B;
476 * An object's children have changed
478 const unsigned long EVENT_REORDER = 0x005C;
481 * Help make sure event map does not get out-of-line.
483 const unsigned long EVENT_LAST_ENTRY = 0x005D;
486 * The type of event, based on the enumerated event values
487 * defined in this interface.
489 readonly attribute unsigned long eventType;
492 * The nsIAccessible associated with the event.
493 * May return null if no accessible is available
495 readonly attribute nsIAccessible accessible;
498 * The nsIAccessibleDocument that the event target nsIAccessible
499 * resides in. This can be used to get the DOM window,
500 * the DOM document and the window handler, among other things.
502 readonly attribute nsIAccessibleDocument accessibleDocument;
505 * The nsIDOMNode associated with the event
506 * May return null if accessible for event has been shut down
508 readonly attribute nsIDOMNode DOMNode;
511 * Returns true if the event was caused by explicit user input,
512 * as opposed to purely originating from a timer or mouse movement
514 attribute boolean isFromUserInput;
518 [scriptable, uuid(444db51a-05fd-4576-8a64-32dbb2a83884)]
519 interface nsIAccessibleStateChangeEvent : nsIAccessibleEvent
522 * Returns the state of accessible (see constants declared
523 * in nsIAccessibleStates).
525 readonly attribute unsigned long state;
528 * Returns true if the state is extra state.
530 boolean isExtraState();
533 * Returns true if the state is turned on.
535 boolean isEnabled();
539 [scriptable, uuid(50a1e151-8e5f-4bcc-aaaf-a4bed1190e93)]
540 interface nsIAccessibleTextChangeEvent : nsIAccessibleEvent
543 * Returns offset of changed text in accessible.
545 readonly attribute long start;
548 * Returns length of changed text.
550 readonly attribute unsigned long length;
553 * Returns true if text was inserted, otherwise false.
555 boolean isInserted();
558 * The inserted or removed text
560 readonly attribute DOMString modifiedText;
563 [scriptable, uuid(b9076dce-4cd3-4e3d-a7f6-7f33a7f40c31)]
564 interface nsIAccessibleCaretMoveEvent: nsIAccessibleEvent
567 * Return caret offset.
569 readonly attribute long caretOffset;
572 [scriptable, uuid(a9485c7b-5861-4695-8441-fab0235b205d)]
573 interface nsIAccessibleTableChangeEvent: nsIAccessibleEvent
576 * Return the row or column index.
578 readonly attribute long rowOrColIndex;
581 * Return the number of rows or cols
583 readonly attribute long numRowsOrCols;