-
Notifications
You must be signed in to change notification settings - Fork 940
/
AccessibleEvents.cs
319 lines (286 loc) · 14.9 KB
/
AccessibleEvents.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.
#nullable disable
namespace System.Windows.Forms
{
/// <summary>
/// Specifies events that are reported by accessible applications.
/// </summary>
public enum AccessibleEvents
{
/// <summary>
/// <c>EVENT_SYSTEM_SOUND</c>
/// Sent when a sound is played. Currently nothing is generating this, we
/// are going to be cleaning up the SOUNDSENTRY feature in the control panel
/// and will use this at that time. Applications implementing WinEvents
/// are perfectly welcome to use it. Clients of IAccessible* will simply
/// turn around and get back a non-visual object that describes the sound.
/// </summary>
SystemSound = 0x0001,
/// <summary>
/// <c>EVENT_SYSTEM_ALERT</c>
/// Sent when an alert needs to be given to the user. MessageBoxes generate
/// alerts for example.
/// </summary>
SystemAlert = 0x0002,
/// <summary>
/// <c>EVENT_SYSTEM_FOREGROUND</c>
/// Sent when the foreground (active) window changes, even if it is changing
/// to another window in the same thread as the previous one.
/// </summary>
SystemForeground = 0x0003,
/// <summary>
/// <c>EVENT_SYSTEM_MENUSTART</c>
/// Sent when entering into menu mode (system, app bar, and track popups).
/// </summary>
/// <seealso cref="SystemMenuEnd"/>.
SystemMenuStart = 0x0004,
/// <summary>
/// <c>EVENT_SYSTEM_MENUEND</c>
/// Sent when leaving from menu mode (system, app bar, and track popups).
/// </summary>
/// <seealso cref="SystemMenuStart"/>.
SystemMenuEnd = 0x0005,
/// <summary>
/// <c>EVENT_SYSTEM_MENUPOPUPSTART</c>
/// Sent when a menu popup comes up.
/// </summary>
/// <remarks>
/// Note that for a call to TrackPopupMenu(), a client will see <c>EVENT_SYSTEM_MENUSTART</c>
/// followed almost immediately by <c>EVENT_SYSTEM_MENUPOPUPSTART</c> for the popup being shown.
/// </remarks>
/// <seealso cref="SystemMenuPopupEnd"/>.
SystemMenuPopupStart = 0x0006,
/// <summary>
/// <c>EVENT_SYSTEM_MENUPOPUPEND</c>
/// Sent when a menu popup just before it is taken down.
/// </summary>
/// <remarks>
/// Note that for a call to TrackPopupMenu(), a client will see <c>EVENT_SYSTEM_MENUSTART</c>
/// followed almost immediately by <c>EVENT_SYSTEM_MENUPOPUPSTART</c> for the popup being shown.
/// </remarks>
/// <seealso cref="SystemMenuPopupStart"/>.
SystemMenuPopupEnd = 0x0007,
/// <summary>
/// <c>EVENT_SYSTEM_CAPTURESTART</c>
/// Sent when a window takes the capture.
/// </summary>
/// <seealso cref="SystemCaptureEnd"/>.
SystemCaptureStart = 0x0008,
/// <summary>
/// <c>EVENT_SYSTEM_CAPTUREEND</c>
/// Sent when a window releases the capture.
/// </summary>
/// <seealso cref="SystemCaptureStart"/>.
SystemCaptureEnd = 0x0009,
/// <summary>
/// <c>EVENT_SYSTEM_MOVESIZESTART</c>
/// Sent when a window enters move-size dragging mode.
/// </summary>
/// <seealso cref="SystemMoveSizeEnd"/>.
SystemMoveSizeStart = 0x000A,
/// <summary>
/// <c>EVENT_SYSTEM_MOVESIZEEND</c>
/// Sent when a window leaves move-size dragging mode.
/// </summary>
/// <seealso cref="SystemMoveSizeStart"/>.
SystemMoveSizeEnd = 0x000B,
/// <summary>
/// <c>EVENT_SYSTEM_CONTEXTHELPSTART</c>
/// Sent when a window enters context sensitive help mode.
/// </summary>
/// <seealso cref="SystemContextHelpEnd"/>.
SystemContextHelpStart = 0x000C,
/// <summary>
/// <c>EVENT_SYSTEM_CONTEXTHELPEND</c>
/// Sent when a window leaves context sensitive help mode.
/// </summary>
/// <seealso cref="SystemContextHelpStart"/>.
SystemContextHelpEnd = 0x000D,
/// <summary>
/// <c>EVENT_SYSTEM_DRAGDROPSTART</c>
/// Sent when a window enters drag drop mode.
/// </summary>
/// <seealso cref="SystemDragDropEnd"/>.
// Note that it is up to apps and OLE to generate this, since the system doesn't know.
// Like <c>EVENT_SYSTEM_SOUND</c>, it will be a while before this is prevalent.
SystemDragDropStart = 0x000E,
/// <summary>
/// <c>EVENT_SYSTEM_DRAGDROPEND</c>
/// Sent when a window leaves drag drop mode.
/// </summary>
/// <seealso cref="SystemDragDropStart"/>.
// Note that it is up to apps and OLE to generate this, since the system doesn't know.
// Like <c>EVENT_SYSTEM_SOUND</c>, it will be a while before this is prevalent.
SystemDragDropEnd = 0x000F,
/// <summary>
/// <c>EVENT_SYSTEM_DIALOGSTART</c>
/// Sent when a dialog comes up.
/// </summary>
/// <seealso cref="SystemDialogEnd"/>.
SystemDialogStart = 0x0010,
/// <summary>
/// <c>EVENT_SYSTEM_DIALOGEND</c>
/// Sent when a dialog just before it goes away.
/// </summary>
/// <seealso cref="SystemDialogStart"/>.
SystemDialogEnd = 0x0011,
/// <summary>
/// <c>EVENT_SYSTEM_SCROLLINGSTART</c>
/// Sent when beginning the tracking of a scrollbar in a window, and also for scrollbar controls.
/// </summary>
/// <seealso cref="SystemScrollingEnd"/>.
SystemScrollingStart = 0x0012,
/// <summary>
/// <c>EVENT_SYSTEM_SCROLLINGEND</c>
/// Sent when ending the tracking of a scrollbar in a window, and also for scrollbar controls.
/// </summary>
/// <seealso cref="SystemScrollingStart"/>.
SystemScrollingEnd = 0x0013,
/// <summary>
/// <c>EVENT_SYSTEM_SWITCHSTART</c>
/// Sent when beginning alt-tab mode with the switch window.
/// </summary>
/// <seealso cref="SystemSwitchEnd"/>.
SystemSwitchStart = 0x0014,
/// <summary>
/// <c>EVENT_SYSTEM_SWITCHEND</c>
/// Sent when ending alt-tab mode with the switch window.
/// </summary>
/// <seealso cref="SystemSwitchStart"/>.
SystemSwitchEnd = 0x0015,
/// <summary>
/// <c>EVENT_SYSTEM_MINIMIZESTART</c>
/// Sent when a window minimizes and just before it restores.
/// </summary>
/// <seealso cref="SystemMinimizeEnd"/>.
SystemMinimizeStart = 0x0016,
/// <summary>
/// <c>EVENT_SYSTEM_MINIMIZEEND</c>
/// Sent when a window minimizes and just before it restores.
/// </summary>
/// <seealso cref="SystemMinimizeStart"/>.
SystemMinimizeEnd = 0x0017,
// Object events
//
// The system AND apps generate these. The system generates these for
// real windows. Apps generate these for objects within their window which
// act like a separate control, e.g. an item in a list view.
//
// For all events, if you want detailed accessibility information, callers
// should
// * Call AccessibleObjectFromWindow() with the hwnd, idObject parameters
// of the event, and IID_IAccessible as the REFIID, to get back an
// IAccessible* to talk to
// * Initialize and fill in a VARIANT as VT_I4 with lVal the idChild
// parameter of the event.
// * If idChild isn't zero, call get_accChild() in the container to see
// if the child is an object in its own right. If so, you will get
// back an IDispatch* object for the child. You should release the
// parent, and call QueryInterface() on the child object to get its
// IAccessible*. Then you talk directly to the child. Otherwise,
// if get_accChild() returns you nothing, you should continue to
// use the child VARIANT. You will ask the container for the properties
// of the child identified by the VARIANT. In other words, the
// child in this case is accessible but not a full object.
// Like a button on a titlebar which is 'small' and has no children.
/// <summary>
/// <c>EVENT_OBJECT_CREATE</c>
/// Sent when an object has been created.
/// The system sends this event for the following user interface elements:
/// caret, header control, list-view control, tab control, toolbar control, tree view control,
/// and window object. Server applications send this event for their accessible objects.
/// </summary>
Create = 0x8000, // hwnd + ID + idChild is created item
/// <summary>
/// <c>EVENT_OBJECT_DESTROY</c>
/// Sent when an object has been destroyed.
/// The system sends this event for the following user interface elements:
/// caret, header control, list-view control, tab control, toolbar control, tree view control,
/// and window object. Server applications send this event for their accessible objects.
/// </summary>
Destroy = 0x8001, // hwnd + ID + idChild is destroyed item
/// <summary>
/// <c>EVENT_OBJECT_SHOW</c>
/// Sent when a hidden object is shown.
/// The system sends this event for the following user interface elements:
/// caret, cursor, and window object. Server applications send this event for their accessible objects.
/// Clients assume that when this event is sent by a parent object, all child objects are already displayed.
/// Therefore, server applications do not send this event for the child objects.
/// </summary>
Show = 0x8002, // hwnd + ID + idChild is shown item
/// <summary>
/// <c>EVENT_OBJECT_HIDE</c>
/// Sent when an object is hidden.
/// The system sends this event for the following user interface elements: caret and cursor.
/// Server applications send this event for their accessible objects.
/// When this event is generated for a parent object, all child objects are already hidden.
/// Server applications do not send this event for the child objects.
/// </summary>
Hide = 0x8003, // hwnd + ID + idChild is hidden item
/// <summary>
/// <c>EVENT_OBJECT_REORDER</c>
/// Sent when a container object has added, removed, or reordered its children.
/// The system sends this event for the following user interface elements:
/// header control, list-view control, toolbar control, and window object.
/// Server applications send this event as appropriate for their accessible objects.
/// </summary>
Reorder = 0x8004, // hwnd + ID + idChild is parent of zordering children
/// <summary>
/// Minimize the number of notifications!
/// When you are hiding a parent object, obviously all child objects are no
/// longer visible on screen. They still have the same "visible" status,
/// but are not truly visible. Hence do not send HIDE notifications for the
/// children also. One implies all. The same goes for SHOW.
/// </summary>
Focus = 0x8005, // hwnd + ID + idChild is focused item
Selection = 0x8006, // hwnd + ID + idChild is selected item (if only one), or idChild is OBJID_WINDOW if complex
SelectionAdd = 0x8007, // hwnd + ID + idChild is item added
SelectionRemove = 0x8008, // hwnd + ID + idChild is item removed
SelectionWithin = 0x8009, // hwnd + ID + idChild is parent of changed selected items
/// <summary>
/// There is only one "focused" child item in a parent. This is the place
/// keystrokes are going at a given moment. Hence only send a notification
/// about where the NEW focus is going. A NEW item getting the focus already
/// implies that the OLD item is losing it.
///
/// SELECTION however can be multiple. Hence the different SELECTION
/// notifications. Here's when to use each:
///
/// (1) Send a SELECTION notification in the simple single selection
/// case (like the focus) when the item with the selection is
/// merely moving to a different item within a container. hwnd + ID
/// is the container control, idChildItem is the new child with the
/// selection.
///
/// (2) Send a SELECTIONADD notification when a new item has simply been added
/// to the selection within a container. This is appropriate when the
/// number of newly selected items is very small. hwnd + ID is the
/// container control, idChildItem is the new child added to the selection.
///
/// (3) Send a SELECTIONREMOVE notification when a new item has simply been
/// removed from the selection within a container. This is appropriate
/// when the number of newly selected items is very small, just like
/// SELECTIONADD. hwnd + ID is the container control, idChildItem is the
/// new child removed from the selection.
///
/// (4) Send a SELECTIONWITHIN notification when the selected items within a
/// control have changed substantially. Rather than propagate a large
/// number of changes to reflect removal for some items, addition of
/// others, just tell somebody who cares that a lot happened. It will
/// be faster an easier for somebody watching to just turn around and
/// query the container control what the new bunch of selected items
/// are.
/// </summary>
StateChange = 0x800A, // hwnd + ID + idChild is item w/ state change
LocationChange = 0x800B, // hwnd + ID + idChild is moved/sized item
NameChange = 0x800C, // hwnd + ID + idChild is item w/ name change
DescriptionChange = 0x800D, // hwnd + ID + idChild is item w/ desc change
ValueChange = 0x800E, // hwnd + ID + idChild is item w/ value change
ParentChange = 0x800F, // hwnd + ID + idChild is item w/ new parent
HelpChange = 0x8010, // hwnd + ID + idChild is item w/ help change
DefaultActionChange = 0x8011, // hwnd + ID + idChild is item w/ def action change
AcceleratorChange = 0x8012, // hwnd + ID + idChild is item w/ keybd accel change
}
}