notepad: Show status bar.
[wine.git] / include / uiautomationcore.idl
blob98894407441061e9ade7049cbd26d91df7b31447
1 /*
2 * Copyright 2012 Jacek Caban for CodeWeavers
4 * This library is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU Lesser General Public
6 * License as published by the Free Software Foundation; either
7 * version 2.1 of the License, or (at your option) any later version.
9 * This library is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 * Lesser General Public License for more details.
14 * You should have received a copy of the GNU Lesser General Public
15 * License along with this library; if not, write to the Free Software
16 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
19 #define DO_NO_IMPORTS
20 import "oaidl.idl";
21 import "oleacc.idl";
23 enum NavigateDirection {
24 NavigateDirection_Parent = 0x0000,
25 NavigateDirection_NextSibling = 0x0001,
26 NavigateDirection_PreviousSibling = 0x0002,
27 NavigateDirection_FirstChild = 0x0003,
28 NavigateDirection_LastChild = 0x0004,
31 enum ProviderOptions {
32 ProviderOptions_ClientSideProvider = 0x0001,
33 ProviderOptions_ServerSideProvider = 0x0002,
34 ProviderOptions_NonClientAreaProvider = 0x0004,
35 ProviderOptions_OverrideProvider = 0x0008,
36 ProviderOptions_ProviderOwnsSetFocus = 0x0010,
37 ProviderOptions_UseComThreading = 0x0020,
38 ProviderOptions_RefuseNonClientSupport = 0x0040,
39 ProviderOptions_HasNativeIAccessible = 0x0080,
40 ProviderOptions_UseClientCoordinates = 0x0100,
43 enum StructureChangeType {
44 StructureChangeType_ChildAdded = 0x0000,
45 StructureChangeType_ChildRemoved = 0x0001,
46 StructureChangeType_ChildrenInvalidated = 0x0002,
47 StructureChangeType_ChildrenBulkAdded = 0x0003,
48 StructureChangeType_ChildrenBulkRemoved = 0x0004,
49 StructureChangeType_ChildrenReordered = 0x0005,
52 enum TextEditChangeType {
53 TextEditChangeType_None = 0x0000,
54 TextEditChangeType_AutoCorrect = 0x0001,
55 TextEditChangeType_Composition = 0x0002,
56 TextEditChangeType_CompositionFinalized = 0x0003,
57 TextEditChangeType_AutoComplete = 0x0004,
60 enum OrientationType {
61 OrientationType_None = 0x0000,
62 OrientationType_Horizontal = 0x0001,
63 OrientationType_Vertical = 0x0002,
66 enum WindowVisualState {
67 WindowVisualState_Normal = 0x0000,
68 WindowVisualState_Maximized = 0x0001,
69 WindowVisualState_Minimized = 0x0002,
72 enum WindowInteractionState {
73 WindowInteractionState_Running = 0x0000,
74 WindowInteractionState_Closing = 0x0001,
75 WindowInteractionState_ReadyForUserInteraction = 0x0002,
76 WindowInteractionState_BlockedByModalWindow = 0x0003,
77 WindowInteractionState_NotResponding = 0x0004,
80 enum LiveSetting {
81 Off = 0x0000,
82 Polite = 0x0001,
83 Assertive = 0x0002,
86 typedef int PROPERTYID;
87 typedef int PATTERNID;
88 typedef int EVENTID;
89 typedef int TEXTATTRIBUTEID;
90 typedef int CONTROLTYPEID;
91 typedef int LANDMARKTYPEID;
92 typedef int METADATAID;
93 typedef int HEADINGLEVELID;
95 struct UiaRect {
96 double left;
97 double top;
98 double width;
99 double height;
102 struct UiaChangeInfo {
103 int uiaId;
104 VARIANT payload;
105 VARIANT extraInfo;
109 version(1.0),
110 uuid(930299ce-9965-4dec-b0f4-a54848d4b667),
111 lcid(0),
112 hidden
114 library UIA
116 importlib("stdole2.tlb");
119 object,
120 uuid(d6dd68d1-86fd-4332-8666-9abedea2d24c),
121 pointer_default(unique),
122 oleautomation
124 interface IRawElementProviderSimple : IUnknown
126 [propget] HRESULT ProviderOptions([out, retval] enum ProviderOptions *pRetVal);
128 HRESULT GetPatternProvider(
129 [in] PATTERNID patternId,
130 [out, retval] IUnknown **pRetVal);
132 HRESULT GetPropertyValue(
133 [in] PROPERTYID propertyId,
134 [out, retval] VARIANT *pRetVal);
136 [propget] HRESULT HostRawElementProvider([out, retval] IRawElementProviderSimple **pRetVal);
140 object,
141 uuid(f8b80ada-2c44-48d0-89be-5ff23c9cd875),
142 pointer_default(unique),
143 oleautomation
145 interface IAccessibleEx : IUnknown
147 HRESULT GetObjectForChild(
148 [in] long idChild,
149 [out, retval] IAccessibleEx **pRetVal);
151 HRESULT GetIAccessiblePair(
152 [out] IAccessible **ppAcc,
153 [out] long *pidChild);
155 HRESULT GetRuntimeId(
156 [out, retval] SAFEARRAY(int) *pRetVal);
158 HRESULT ConvertReturnedElement(
159 [in] IRawElementProviderSimple *pIn,
160 [out] IAccessibleEx **ppRetValOut);
163 interface IRawElementProviderFragmentRoot;
166 object,
167 uuid(f7063da8-8359-439c-9297-bbc5299a7d87),
168 pointer_default(unique),
169 oleautomation
171 interface IRawElementProviderFragment : IUnknown
173 HRESULT Navigate(
174 [in] enum NavigateDirection direction,
175 [out, retval] IRawElementProviderFragment **pRetVal);
177 HRESULT GetRuntimeId([out, retval] SAFEARRAY(int) *pRetVal);
178 HRESULT get_BoundingRectangle([out, retval] struct UiaRect *pRetVal);
180 * FIXME: Current versions of Windows SDK use
181 * SAFEARRAY(IRawElementProviderFragmentRoot *) instead of
182 * SAFEARRAY(VARIANT). The new type is currently unsupported
183 * in widl, we should switch to it when it is.
185 HRESULT GetEmbeddedFragmentRoots([out, retval] SAFEARRAY(VARIANT) *pRetVal);
186 HRESULT SetFocus();
188 [propget] HRESULT FragmentRoot([out, retval] IRawElementProviderFragmentRoot **pRetVal);
192 object,
193 uuid(620ce2a5-ab8f-40a9-86cb-de3c75599b58),
194 pointer_default(unique),
195 oleautomation
197 interface IRawElementProviderFragmentRoot : IUnknown
199 HRESULT ElementProviderFromPoint(
200 [in] double x,
201 [in] double y,
202 [out, retval] IRawElementProviderFragment **pRetVal);
204 HRESULT GetFocus([out, retval] IRawElementProviderFragment **pRetVal);
209 object,
210 uuid(1d5df27c-8947-4425-b8d9-79787bb460b8),
211 pointer_default(unique),
212 oleautomation
214 interface IRawElementProviderHwndOverride : IUnknown
216 HRESULT GetOverrideProviderForHwnd(
217 [in] HWND hwnd,
218 [out, retval] IRawElementProviderSimple **pRetVal);
222 object,
223 uuid(e44c3566-915d-4070-99c6-047bff5a08f5),
224 pointer_default(unique),
225 oleautomation
227 interface ILegacyIAccessibleProvider : IUnknown
229 HRESULT Select(long flagsSelect);
230 HRESULT DoDefaultAction();
231 HRESULT SetValue(LPCWSTR szValue);
232 HRESULT GetIAccessible([out, retval] IAccessible **ppAccessible);
234 [propget] HRESULT ChildId([out, retval] int *pRetVal);
235 [propget] HRESULT Name([out, retval] BSTR *pszName);
236 [propget] HRESULT Value([out, retval] BSTR *pszValue);
237 [propget] HRESULT Description([out, retval] BSTR *pszDescription);
238 [propget] HRESULT Role([out, retval] DWORD *pdwRole);
239 [propget] HRESULT State([out, retval] DWORD *pdwState);
240 [propget] HRESULT Help([out, retval] BSTR *pszHelp);
241 [propget] HRESULT KeyboardShortcut([out, retval] BSTR *pszKeyboardShortcut);
243 * FIXME: Current versions of Windows SDK use
244 * SAFEARRAY(IRawElementProviderSimple *) instead of
245 * SAFEARRAY(VARIANT). The new type is currently unsupported
246 * in widl, we should switch to it when it is.
248 HRESULT GetSelection([out, retval] SAFEARRAY(VARIANT) *pvarSelectedChildren);
249 [propget] HRESULT DefaultAction([out, retval] BSTR *pszDefaultAction);
252 enum UIAutomationType {
253 UIAutomationType_Int = 0x01,
254 UIAutomationType_Bool = 0x02,
255 UIAutomationType_String = 0x03,
256 UIAutomationType_Double = 0x04,
257 UIAutomationType_Point = 0x05,
258 UIAutomationType_Rect = 0x06,
259 UIAutomationType_Element = 0x07,
261 UIAutomationType_Array = 0x00010000,
262 UIAutomationType_Out = 0x00020000,
264 UIAutomationType_IntArray = ( UIAutomationType_Int | UIAutomationType_Array ),
265 UIAutomationType_BoolArray = ( UIAutomationType_Bool | UIAutomationType_Array ),
266 UIAutomationType_StringArray = ( UIAutomationType_String | UIAutomationType_Array ),
267 UIAutomationType_DoubleArray = ( UIAutomationType_Double | UIAutomationType_Array ),
268 UIAutomationType_PointArray = ( UIAutomationType_Point | UIAutomationType_Array ),
269 UIAutomationType_RectArray = ( UIAutomationType_Rect | UIAutomationType_Array ),
270 UIAutomationType_ElementArray = ( UIAutomationType_Element | UIAutomationType_Array ),
272 UIAutomationType_OutInt = ( UIAutomationType_Int | UIAutomationType_Out ),
273 UIAutomationType_OutBool = ( UIAutomationType_Bool | UIAutomationType_Out ),
274 UIAutomationType_OutString = ( UIAutomationType_String | UIAutomationType_Out ),
275 UIAutomationType_OutDouble = ( UIAutomationType_Double | UIAutomationType_Out ),
276 UIAutomationType_OutPoint = ( UIAutomationType_Point | UIAutomationType_Out ),
277 UIAutomationType_OutRect = ( UIAutomationType_Rect | UIAutomationType_Out ),
278 UIAutomationType_OutElement = ( UIAutomationType_Element | UIAutomationType_Out ),
280 UIAutomationType_OutIntArray = ( UIAutomationType_Int | UIAutomationType_Array | UIAutomationType_Out ),
281 UIAutomationType_OutBoolArray = ( UIAutomationType_Bool | UIAutomationType_Array | UIAutomationType_Out ),
282 UIAutomationType_OutStringArray = ( UIAutomationType_String | UIAutomationType_Array | UIAutomationType_Out ),
283 UIAutomationType_OutDoubleArray = ( UIAutomationType_Double | UIAutomationType_Array | UIAutomationType_Out ),
284 UIAutomationType_OutPointArray = ( UIAutomationType_Point | UIAutomationType_Array | UIAutomationType_Out ),
285 UIAutomationType_OutRectArray = ( UIAutomationType_Rect | UIAutomationType_Array | UIAutomationType_Out ),
286 UIAutomationType_OutElementArray = ( UIAutomationType_Element | UIAutomationType_Array | UIAutomationType_Out ),
289 cpp_quote("DEFINE_ENUM_FLAG_OPERATORS(UIAutomationType)")
291 struct UIAutomationParameter {
292 enum UIAutomationType type;
293 void *pData;
296 struct UIAutomationPropertyInfo {
297 GUID guid;
298 LPCWSTR pProgrammaticName;
299 enum UIAutomationType type;
302 struct UIAutomationEventInfo {
303 GUID guid;
304 LPCWSTR pProgrammaticName;
307 struct UIAutomationMethodInfo {
308 LPCWSTR pProgrammaticName;
309 BOOL doSetFocus;
310 UINT cInParameters;
311 UINT cOutParameters;
312 [size_is(cInParameters + cOutParameters)]enum UIAutomationType *pParameterTypes;
313 [size_is(cInParameters + cOutParameters)]LPCWSTR *pParameterNames;
317 object,
318 uuid(c03a7fe4-9431-409f-bed8-ae7c2299bc8d),
319 pointer_default(unique),
320 oleautomation
322 interface IUIAutomationPatternInstance : IUnknown
324 [local] HRESULT GetProperty(
325 [in] UINT index,
326 [in] BOOL cached,
327 [in] enum UIAutomationType type,
328 [out] void *pPtr);
330 [local] HRESULT CallMethod(
331 [in] UINT index,
332 [in] const struct UIAutomationParameter *pParams,
333 [in] UINT cParams);
337 object,
338 uuid(d97022f3-a947-465e-8b2a-ac4315fa54e8),
339 pointer_default(unique),
340 oleautomation
342 interface IUIAutomationPatternHandler : IUnknown
344 HRESULT CreateClientWrapper(
345 [in] IUIAutomationPatternInstance *pPatternInstance,
346 [out] IUnknown **pClientWrapper);
348 [local] HRESULT Dispatch(
349 [in] IUnknown *pTarget,
350 [in] UINT index,
351 [in] const struct UIAutomationParameter *pParams,
352 [in] UINT cParams);
355 struct UIAutomationPatternInfo {
356 GUID guid;
357 LPCWSTR pProgrammaticName;
358 GUID providerInterfaceId;
359 GUID clientInterfaceId;
360 UINT cProperties;
361 [size_is(cProperties)]struct UIAutomationPropertyInfo *pProperties;
362 UINT cMethods;
363 [size_is(cMethods)]struct UIAutomationMethodInfo *pMethods;
364 UINT cEvents;
365 [size_is(cEvents)]struct UIAutomationEventInfo *pEvents;
366 IUIAutomationPatternHandler *pPatternHandler;
370 object,
371 uuid(8609c4ec-4a1a-4d88-a357-5a66e060e1cf),
372 pointer_default(unique),
373 oleautomation
375 interface IUIAutomationRegistrar : IUnknown
377 HRESULT RegisterProperty(
378 [in] const struct UIAutomationPropertyInfo *property,
379 [out] PROPERTYID *propertyId);
381 HRESULT RegisterEvent(
382 [in] const struct UIAutomationEventInfo *event,
383 [out] EVENTID *eventId);
385 HRESULT RegisterPattern(
386 [in] const struct UIAutomationPatternInfo *pattern,
387 [out] PATTERNID *pPatternId,
388 [out] PROPERTYID *pPatternAvailablePropertyId,
389 [in] UINT propertyIdCount,
390 [out, size_is(propertyIdCount)] PROPERTYID *pPropertyIds,
391 [in] UINT eventIdCount,
392 [out, size_is(eventIdCount)] EVENTID *pEventIds);
396 uuid(6e29fabf-9977-42d1-8d0e-ca7e61ad87e6),
397 version(1.0),
398 threading(both)
400 coclass CUIAutomationRegistrar
402 [default] interface IUIAutomationRegistrar;