uiautomationcore.idl 6.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185
  1. /*
  2. * Copyright 2012 Jacek Caban for CodeWeavers
  3. *
  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.
  8. *
  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.
  13. *
  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
  17. */
  18. #define DO_NO_IMPORTS
  19. import "oaidl.idl";
  20. import "oleacc.idl";
  21. enum NavigateDirection {
  22. NavigateDirection_Parent = 0x0000,
  23. NavigateDirection_NextSibling = 0x0001,
  24. NavigateDirection_PreviousSibling = 0x0002,
  25. NavigateDirection_FirstChild = 0x0003,
  26. NavigateDirection_LastChild = 0x0004,
  27. };
  28. enum ProviderOptions {
  29. ProviderOptions_ClientSideProvider = 0x0001,
  30. ProviderOptions_ServerSideProvider = 0x0002,
  31. ProviderOptions_NonClientAreaProvider = 0x0004,
  32. ProviderOptions_OverrideProvider = 0x0008,
  33. ProviderOptions_ProviderOwnsSetFocus = 0x0010,
  34. ProviderOptions_UseComThreading = 0x0020,
  35. ProviderOptions_RefuseNonClientSupport = 0x0040,
  36. ProviderOptions_HasNativeIAccessible = 0x0080,
  37. ProviderOptions_UseClientCoordinates = 0x0100,
  38. };
  39. typedef int PROPERTYID;
  40. typedef int PATTERNID;
  41. typedef int EVENTID;
  42. typedef int TEXTATTRIBUTEID;
  43. typedef int CONTROLTYPEID;
  44. struct UiaRect {
  45. double left;
  46. double top;
  47. double width;
  48. double height;
  49. };
  50. [
  51. version(1.0),
  52. uuid(930299ce-9965-4dec-b0f4-a54848d4b667),
  53. lcid(0),
  54. hidden
  55. ]
  56. library UIA
  57. {
  58. importlib("stdole2.tlb");
  59. [
  60. object,
  61. uuid(d6dd68d1-86fd-4332-8666-9abedea2d24c),
  62. pointer_default(unique),
  63. oleautomation
  64. ]
  65. interface IRawElementProviderSimple : IUnknown
  66. {
  67. [propget] HRESULT ProviderOptions([out, retval] enum ProviderOptions *pRetVal);
  68. HRESULT GetPatternProvider(
  69. [in] PATTERNID patternId,
  70. [out, retval] IUnknown **pRetVal);
  71. HRESULT GetPropertyValue(
  72. [in] PROPERTYID propertyId,
  73. [out, retval] VARIANT *pRetVal);
  74. [propget] HRESULT HostRawElementProvider([out, retval] IRawElementProviderSimple **pRetVal);
  75. }
  76. [
  77. object,
  78. uuid(f8b80ada-2c44-48d0-89be-5ff23c9cd875),
  79. pointer_default(unique),
  80. oleautomation
  81. ]
  82. interface IAccessibleEx : IUnknown
  83. {
  84. HRESULT GetObjectForChild(
  85. [in] long idChild,
  86. [out, retval] IAccessibleEx **pRetVal);
  87. HRESULT GetIAccessiblePair(
  88. [out] IAccessible **ppAcc,
  89. [out] long *pidChild);
  90. HRESULT GetRuntimeId(
  91. [out, retval] SAFEARRAY(int) *pRetVal);
  92. HRESULT ConvertReturnedElement(
  93. [in] IRawElementProviderSimple *pIn,
  94. [out] IAccessibleEx **ppRetValOut);
  95. }
  96. interface IRawElementProviderFragmentRoot;
  97. [
  98. object,
  99. uuid(f7063da8-8359-439c-9297-bbc5299a7d87),
  100. pointer_default(unique),
  101. oleautomation
  102. ]
  103. interface IRawElementProviderFragment : IUnknown
  104. {
  105. HRESULT Navigate(
  106. [in] enum NavigateDirection direction,
  107. [out, retval] IRawElementProviderFragment **pRetVal);
  108. HRESULT GetRuntimeId([out, retval] SAFEARRAY(int) *pRetVal);
  109. HRESULT get_BoundingRectangle([out, retval] struct UiaRect *pRetVal);
  110. /*
  111. * FIXME: Current versions of Windows SDK use
  112. * SAFEARRAY(IRawElementProviderFragmentRoot *) instead of
  113. * SAFEARRAY(VARIANT). The new type is currently unsupported
  114. * in widl, we should switch to it when it is.
  115. */
  116. HRESULT GetEmbeddedFragmentRoots([out, retval] SAFEARRAY(VARIANT) *pRetVal);
  117. HRESULT SetFocus();
  118. [propget] HRESULT FragmentRoot([out, retval] IRawElementProviderFragmentRoot **pRetVal);
  119. }
  120. [
  121. object,
  122. uuid(620ce2a5-ab8f-40a9-86cb-de3c75599b58),
  123. pointer_default(unique),
  124. oleautomation
  125. ]
  126. interface IRawElementProviderFragmentRoot : IUnknown
  127. {
  128. HRESULT ElementProviderFromPoint(
  129. [in] double x,
  130. [in] double y,
  131. [out, retval] IRawElementProviderFragment **pRetVal);
  132. HRESULT GetFocus([out, retval] IRawElementProviderFragment **pRetVal);
  133. }
  134. [
  135. object,
  136. uuid(e44c3566-915d-4070-99c6-047bff5a08f5),
  137. pointer_default(unique),
  138. oleautomation
  139. ]
  140. interface ILegacyIAccessibleProvider : IUnknown
  141. {
  142. HRESULT Select(long flagsSelect);
  143. HRESULT DoDefaultAction();
  144. HRESULT SetValue(LPCWSTR szValue);
  145. HRESULT GetIAccessible([out, retval] IAccessible **ppAccessible);
  146. [propget] HRESULT ChildId([out, retval] int *pRetVal);
  147. [propget] HRESULT Name([out, retval] BSTR *pszName);
  148. [propget] HRESULT Value([out, retval] BSTR *pszValue);
  149. [propget] HRESULT Description([out, retval] BSTR *pszDescription);
  150. [propget] HRESULT Role([out, retval] DWORD *pdwRole);
  151. [propget] HRESULT State([out, retval] DWORD *pdwState);
  152. [propget] HRESULT Help([out, retval] BSTR *pszHelp);
  153. [propget] HRESULT KeyboardShortcut([out, retval] BSTR *pszKeyboardShortcut);
  154. /*
  155. * FIXME: Current versions of Windows SDK use
  156. * SAFEARRAY(IRawElementProviderSimple *) instead of
  157. * SAFEARRAY(VARIANT). The new type is currently unsupported
  158. * in widl, we should switch to it when it is.
  159. */
  160. HRESULT GetSelection([out, retval] SAFEARRAY(VARIANT) *pvarSelectedChildren);
  161. [propget] HRESULT DefaultAction([out, retval] BSTR *pszDefaultAction);
  162. }
  163. }