Source code of Windows XP (NT5)
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

675 lines
30 KiB

  1. //+-------------------------------------------------------------------------
  2. //
  3. // Microsoft Windows
  4. // Copyright (c) Microsoft Corporation. All rights reserved.
  5. // Microsoft Confidential
  6. //
  7. // File: oleacc.idl
  8. //
  9. // Notes:
  10. // (1) OPTIONAL parameters must be the last parameters, excepting the single
  11. // "RETVAL" output parameter.
  12. // (2) The methods must be in the same order as the interface!
  13. //
  14. // To make a type library that is compatible with Visual Basic,
  15. // (That is, allows a VB app to be an Accessible SERVER) several changes
  16. // had to be made to this file:
  17. // There is a file called "oleacc for vb.idl" that has those changes.
  18. //
  19. //+-------------------------------------------------------------------------
  20. cpp_quote("//=--------------------------------------------------------------------------=")
  21. cpp_quote("// OLEACC.H")
  22. cpp_quote("//=--------------------------------------------------------------------------=")
  23. cpp_quote("// (C) Copyright (c) Microsoft Corporation. All rights reserved.")
  24. cpp_quote("//")
  25. cpp_quote("// THIS CODE AND INFORMATION IS PROVIDED \"AS IS\" WITHOUT WARRANTY OF")
  26. cpp_quote("// ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO")
  27. cpp_quote("// THE IMPLIED WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A")
  28. cpp_quote("// PARTICULAR PURPOSE.")
  29. cpp_quote("//=--------------------------------------------------------------------------=")
  30. cpp_quote("")
  31. cpp_quote("//=--------------------------------------------------------------------------=")
  32. cpp_quote("// Typedefs")
  33. cpp_quote("//=--------------------------------------------------------------------------=")
  34. cpp_quote("")
  35. cpp_quote("typedef LRESULT (STDAPICALLTYPE *LPFNLRESULTFROMOBJECT)(REFIID riid, WPARAM wParam, LPUNKNOWN punk);")
  36. cpp_quote("typedef HRESULT (STDAPICALLTYPE *LPFNOBJECTFROMLRESULT)(LRESULT lResult, REFIID riid, WPARAM wParam, void** ppvObject);")
  37. cpp_quote("typedef HRESULT (STDAPICALLTYPE *LPFNACCESSIBLEOBJECTFROMWINDOW)(HWND hwnd, DWORD dwId, REFIID riid, void** ppvObject);")
  38. cpp_quote("typedef HRESULT (STDAPICALLTYPE *LPFNACCESSIBLEOBJECTFROMPOINT)(POINT ptScreen, IAccessible** ppacc, VARIANT* pvarChild);")
  39. cpp_quote("typedef HRESULT (STDAPICALLTYPE *LPFNCREATESTDACCESSIBLEOBJECT)(HWND hwnd, LONG idObject, REFIID riid, void** ppvObject);")
  40. cpp_quote("typedef HRESULT (STDAPICALLTYPE *LPFNACCESSIBLECHILDREN)(IAccessible* paccContainer, LONG iChildStart,LONG cChildren,VARIANT* rgvarChildren,LONG* pcObtained);")
  41. //----------------------------------------------------------------------------
  42. // GUIDs are defined here so that clients and servers that #include "oleacc.h"
  43. // can get them from there by also doing #include <initguid.h> in one and only
  44. // one of their source modules. The way the oleacc.dll actually gets the GUIDs
  45. // is slightly different though - it has copies of the line below in the file
  46. // guids.c, with the prefix __declspec(dllexport), so that the GUIDs are also
  47. // exported from OLEACC.DLL. Then clients and servers have the option of linking
  48. // to oleacc.dll to get them.
  49. //
  50. // So if you add any more GUIDs, make sure to add them here AND in guids.c
  51. //----------------------------------------------------------------------------
  52. cpp_quote("")
  53. cpp_quote("//=--------------------------------------------------------------------------=")
  54. cpp_quote("// GUIDs")
  55. cpp_quote("//=--------------------------------------------------------------------------=")
  56. cpp_quote("")
  57. cpp_quote("DEFINE_GUID(LIBID_Accessibility, 0x1ea4dbf0, 0x3c3b, 0x11cf, 0x81, 0x0c, 0x00, 0xaa, 0x00, 0x38, 0x9b, 0x71);")
  58. cpp_quote("DEFINE_GUID(IID_IAccessible, 0x618736e0, 0x3c3d, 0x11cf, 0x81, 0x0c, 0x00, 0xaa, 0x00, 0x38, 0x9b, 0x71);")
  59. cpp_quote("DEFINE_GUID(IID_IAccessibleHandler, 0x03022430, 0xABC4, 0x11d0, 0xBD, 0xE2, 0x00, 0xAA, 0x00, 0x1A, 0x19, 0x53);")
  60. cpp_quote("DEFINE_GUID(IID_IAccIdentity, 0x7852b78d, 0x1cfd, 0x41c1, 0xa6, 0x15, 0x9c, 0x0c, 0x85, 0x96, 0x0b, 0x5f);")
  61. cpp_quote("DEFINE_GUID(IID_IAccPropServer, 0x76c0dbbb, 0x15e0, 0x4e7b, 0xb6, 0x1b, 0x20, 0xee, 0xea, 0x20, 0x01, 0xe0);")
  62. cpp_quote("DEFINE_GUID(IID_IAccPropServices, 0x6e26e776, 0x04f0, 0x495d, 0x80, 0xe4, 0x33, 0x30, 0x35, 0x2e, 0x31, 0x69);")
  63. cpp_quote("DEFINE_GUID(IID_IAccPropMgrInternal, 0x2bd370a9, 0x3e7f, 0x4edd, 0x8a, 0x85, 0xf8, 0xfe, 0xd1, 0xf8, 0xe5, 0x1f);")
  64. cpp_quote("DEFINE_GUID(CLSID_AccPropServices, 0xb5f8350b, 0x0548, 0x48b1, 0xa6, 0xee, 0x88, 0xbd, 0x00, 0xb4, 0xa5, 0xe7);")
  65. cpp_quote("DEFINE_GUID(IIS_IsOleaccProxy, 0x902697fa, 0x80e4, 0x4560, 0x80, 0x2a, 0xa1, 0x3f, 0x22, 0xa6, 0x47, 0x09);")
  66. cpp_quote("")
  67. cpp_quote("//=--------------------------------------------------------------------------=")
  68. cpp_quote("// MSAA API Prototypes")
  69. cpp_quote("//=--------------------------------------------------------------------------=")
  70. cpp_quote("")
  71. cpp_quote("STDAPI_(LRESULT) LresultFromObject(REFIID riid, WPARAM wParam, LPUNKNOWN punk);")
  72. cpp_quote("STDAPI ObjectFromLresult(LRESULT lResult, REFIID riid, WPARAM wParam, void** ppvObject);")
  73. cpp_quote("STDAPI WindowFromAccessibleObject(IAccessible*, HWND* phwnd);")
  74. cpp_quote("STDAPI AccessibleObjectFromWindow(HWND hwnd, DWORD dwId, REFIID riid, void **ppvObject);")
  75. cpp_quote("STDAPI AccessibleObjectFromEvent(HWND hwnd, DWORD dwId, DWORD dwChildId, IAccessible** ppacc, VARIANT* pvarChild);")
  76. cpp_quote("STDAPI AccessibleObjectFromPoint(POINT ptScreen, IAccessible ** ppacc, VARIANT* pvarChild);")
  77. cpp_quote("STDAPI AccessibleChildren (IAccessible* paccContainer, LONG iChildStart,LONG cChildren, VARIANT* rgvarChildren,LONG* pcObtained);")
  78. cpp_quote("")
  79. cpp_quote("STDAPI_(UINT) GetRoleTextA(DWORD lRole, LPSTR lpszRole, UINT cchRoleMax);")
  80. cpp_quote("STDAPI_(UINT) GetRoleTextW(DWORD lRole, LPWSTR lpszRole, UINT cchRoleMax);")
  81. cpp_quote("")
  82. cpp_quote("#ifdef UNICODE")
  83. cpp_quote("#define GetRoleText GetRoleTextW")
  84. cpp_quote("#else")
  85. cpp_quote("#define GetRoleText GetRoleTextA")
  86. cpp_quote("#endif // UNICODE")
  87. cpp_quote("")
  88. cpp_quote("STDAPI_(UINT) GetStateTextA(DWORD lStateBit, LPSTR lpszState, UINT cchState);")
  89. cpp_quote("STDAPI_(UINT) GetStateTextW(DWORD lStateBit, LPWSTR lpszState, UINT cchState);")
  90. cpp_quote("#ifdef UNICODE")
  91. cpp_quote("#define GetStateText GetStateTextW")
  92. cpp_quote("#else")
  93. cpp_quote("#define GetStateText GetStateTextA")
  94. cpp_quote("#endif // UNICODE")
  95. cpp_quote("")
  96. cpp_quote("STDAPI_(VOID) GetOleaccVersionInfo(DWORD* pVer, DWORD* pBuild);")
  97. cpp_quote("")
  98. cpp_quote("STDAPI CreateStdAccessibleObject(HWND hwnd, LONG idObject, REFIID riid, void** ppvObject);")
  99. cpp_quote("")
  100. cpp_quote("STDAPI CreateStdAccessibleProxyA(HWND hwnd, LPCSTR pClassName, LONG idObject, REFIID riid, void** ppvObject);")
  101. cpp_quote("STDAPI CreateStdAccessibleProxyW(HWND hwnd, LPCWSTR pClassName, LONG idObject, REFIID riid, void** ppvObject);")
  102. cpp_quote("")
  103. cpp_quote("#ifdef UNICODE")
  104. cpp_quote("#define CreateStdAccessibleProxy CreateStdAccessibleProxyW")
  105. cpp_quote("#else")
  106. cpp_quote("#define CreateStdAccessibleProxy CreateStdAccessibleProxyA")
  107. cpp_quote("#endif // UNICODE")
  108. cpp_quote("")
  109. cpp_quote("")
  110. cpp_quote("// Simple Owner-Drawn Menu support...")
  111. cpp_quote("")
  112. cpp_quote("#define MSAA_MENU_SIG 0xAA0DF00DL")
  113. cpp_quote("")
  114. cpp_quote("// Menu's dwItemData should point to one of these structs:")
  115. cpp_quote("// (or can point to an app-defined struct containing this as the first member)")
  116. cpp_quote("typedef struct tagMSAAMENUINFO {")
  117. cpp_quote(" DWORD dwMSAASignature; // Must be MSAA_MENU_SIG")
  118. cpp_quote(" DWORD cchWText; // Length of text, in Unicode characters, excluding terminating NUL")
  119. cpp_quote(" LPWSTR pszWText; // NUL-terminated text, in Unicode")
  120. cpp_quote("} MSAAMENUINFO, *LPMSAAMENUINFO;")
  121. cpp_quote("")
  122. cpp_quote("")
  123. cpp_quote("//=--------------------------------------------------------------------------=")
  124. cpp_quote("// Property GUIDs (used by annotation interfaces)")
  125. cpp_quote("//=--------------------------------------------------------------------------=")
  126. cpp_quote("")
  127. cpp_quote("DEFINE_GUID( PROPID_ACC_NAME , 0x608d3df8, 0x8128, 0x4aa7, 0xa4, 0x28, 0xf5, 0x5e, 0x49, 0x26, 0x72, 0x91);")
  128. cpp_quote("DEFINE_GUID( PROPID_ACC_VALUE , 0x123fe443, 0x211a, 0x4615, 0x95, 0x27, 0xc4, 0x5a, 0x7e, 0x93, 0x71, 0x7a);")
  129. cpp_quote("DEFINE_GUID( PROPID_ACC_DESCRIPTION , 0x4d48dfe4, 0xbd3f, 0x491f, 0xa6, 0x48, 0x49, 0x2d, 0x6f, 0x20, 0xc5, 0x88);")
  130. cpp_quote("DEFINE_GUID( PROPID_ACC_ROLE , 0xcb905ff2, 0x7bd1, 0x4c05, 0xb3, 0xc8, 0xe6, 0xc2, 0x41, 0x36, 0x4d, 0x70);")
  131. cpp_quote("DEFINE_GUID( PROPID_ACC_STATE , 0xa8d4d5b0, 0x0a21, 0x42d0, 0xa5, 0xc0, 0x51, 0x4e, 0x98, 0x4f, 0x45, 0x7b);")
  132. cpp_quote("DEFINE_GUID( PROPID_ACC_HELP , 0xc831e11f, 0x44db, 0x4a99, 0x97, 0x68, 0xcb, 0x8f, 0x97, 0x8b, 0x72, 0x31);")
  133. cpp_quote("DEFINE_GUID( PROPID_ACC_KEYBOARDSHORTCUT , 0x7d9bceee, 0x7d1e, 0x4979, 0x93, 0x82, 0x51, 0x80, 0xf4, 0x17, 0x2c, 0x34);")
  134. cpp_quote("DEFINE_GUID( PROPID_ACC_DEFAULTACTION , 0x180c072b, 0xc27f, 0x43c7, 0x99, 0x22, 0xf6, 0x35, 0x62, 0xa4, 0x63, 0x2b);")
  135. cpp_quote("")
  136. cpp_quote("DEFINE_GUID( PROPID_ACC_HELPTOPIC , 0x787d1379, 0x8ede, 0x440b, 0x8a, 0xec, 0x11, 0xf7, 0xbf, 0x90, 0x30, 0xb3);")
  137. cpp_quote("DEFINE_GUID( PROPID_ACC_FOCUS , 0x6eb335df, 0x1c29, 0x4127, 0xb1, 0x2c, 0xde, 0xe9, 0xfd, 0x15, 0x7f, 0x2b);")
  138. cpp_quote("DEFINE_GUID( PROPID_ACC_SELECTION , 0xb99d073c, 0xd731, 0x405b, 0x90, 0x61, 0xd9, 0x5e, 0x8f, 0x84, 0x29, 0x84);")
  139. cpp_quote("DEFINE_GUID( PROPID_ACC_PARENT , 0x474c22b6, 0xffc2, 0x467a, 0xb1, 0xb5, 0xe9, 0x58, 0xb4, 0x65, 0x73, 0x30);")
  140. cpp_quote("")
  141. cpp_quote("DEFINE_GUID( PROPID_ACC_NAV_UP , 0x016e1a2b, 0x1a4e, 0x4767, 0x86, 0x12, 0x33, 0x86, 0xf6, 0x69, 0x35, 0xec);")
  142. cpp_quote("DEFINE_GUID( PROPID_ACC_NAV_DOWN , 0x031670ed, 0x3cdf, 0x48d2, 0x96, 0x13, 0x13, 0x8f, 0x2d, 0xd8, 0xa6, 0x68);")
  143. cpp_quote("DEFINE_GUID( PROPID_ACC_NAV_LEFT , 0x228086cb, 0x82f1, 0x4a39, 0x87, 0x05, 0xdc, 0xdc, 0x0f, 0xff, 0x92, 0xf5);")
  144. cpp_quote("DEFINE_GUID( PROPID_ACC_NAV_RIGHT , 0xcd211d9f, 0xe1cb, 0x4fe5, 0xa7, 0x7c, 0x92, 0x0b, 0x88, 0x4d, 0x09, 0x5b);")
  145. cpp_quote("DEFINE_GUID( PROPID_ACC_NAV_PREV , 0x776d3891, 0xc73b, 0x4480, 0xb3, 0xf6, 0x07, 0x6a, 0x16, 0xa1, 0x5a, 0xf6);")
  146. cpp_quote("DEFINE_GUID( PROPID_ACC_NAV_NEXT , 0x1cdc5455, 0x8cd9, 0x4c92, 0xa3, 0x71, 0x39, 0x39, 0xa2, 0xfe, 0x3e, 0xee);")
  147. cpp_quote("DEFINE_GUID( PROPID_ACC_NAV_FIRSTCHILD , 0xcfd02558, 0x557b, 0x4c67, 0x84, 0xf9, 0x2a, 0x09, 0xfc, 0xe4, 0x07, 0x49);")
  148. cpp_quote("DEFINE_GUID( PROPID_ACC_NAV_LASTCHILD , 0x302ecaa5, 0x48d5, 0x4f8d, 0xb6, 0x71, 0x1a, 0x8d, 0x20, 0xa7, 0x78, 0x32);")
  149. cpp_quote("")
  150. cpp_quote("// Value map, used by sliders and other controls...")
  151. cpp_quote("DEFINE_GUID( PROPID_ACC_ROLEMAP , 0xf79acda2, 0x140d, 0x4fe6, 0x89, 0x14, 0x20, 0x84, 0x76, 0x32, 0x82, 0x69);")
  152. cpp_quote("DEFINE_GUID( PROPID_ACC_VALUEMAP , 0xda1c3d79, 0xfc5c, 0x420e, 0xb3, 0x99, 0x9d, 0x15, 0x33, 0x54, 0x9e, 0x75);")
  153. cpp_quote("DEFINE_GUID( PROPID_ACC_STATEMAP , 0x43946c5e, 0x0ac0, 0x4042, 0xb5, 0x25, 0x07, 0xbb, 0xdb, 0xe1, 0x7f, 0xa7);")
  154. cpp_quote("DEFINE_GUID( PROPID_ACC_DESCRIPTIONMAP , 0x1ff1435f, 0x8a14, 0x477b, 0xb2, 0x26, 0xa0, 0xab, 0xe2, 0x79, 0x97, 0x5d);")
  155. cpp_quote("")
  156. cpp_quote("DEFINE_GUID( PROPID_ACC_DODEFAULTACTION , 0x1ba09523, 0x2e3b, 0x49a6, 0xa0, 0x59, 0x59, 0x68, 0x2a, 0x3c, 0x48, 0xfd);")
  157. cpp_quote("")
  158. cpp_quote("//=--------------------------------------------------------------------------=")
  159. cpp_quote("// Interface Definitions")
  160. cpp_quote("//=--------------------------------------------------------------------------=")
  161. cpp_quote("")
  162. //
  163. // IAccessible
  164. //
  165. #define DO_NO_IMPORTS
  166. import "oaidl.idl";
  167. [
  168. object,
  169. uuid(618736e0-3c3d-11cf-810c-00aa00389b71),
  170. hidden,
  171. dual,
  172. pointer_default(unique)
  173. ]
  174. interface IAccessible : IDispatch
  175. {
  176. // PROPERTIES: Hierarchical
  177. const long DISPID_ACC_PARENT = -5000;
  178. const long DISPID_ACC_CHILDCOUNT = -5001;
  179. const long DISPID_ACC_CHILD = -5002;
  180. // PROPERTIES: Descriptional
  181. const long DISPID_ACC_NAME = -5003;
  182. const long DISPID_ACC_VALUE = -5004;
  183. const long DISPID_ACC_DESCRIPTION = -5005;
  184. const long DISPID_ACC_ROLE = -5006;
  185. const long DISPID_ACC_STATE = -5007;
  186. const long DISPID_ACC_HELP = -5008;
  187. const long DISPID_ACC_HELPTOPIC = -5009;
  188. const long DISPID_ACC_KEYBOARDSHORTCUT = -5010;
  189. const long DISPID_ACC_FOCUS = -5011;
  190. const long DISPID_ACC_SELECTION = -5012;
  191. const long DISPID_ACC_DEFAULTACTION = -5013;
  192. // METHODS
  193. const long DISPID_ACC_SELECT = -5014;
  194. const long DISPID_ACC_LOCATION = -5015;
  195. const long DISPID_ACC_NAVIGATE = -5016;
  196. const long DISPID_ACC_HITTEST = -5017;
  197. const long DISPID_ACC_DODEFAULTACTION = -5018;
  198. typedef [unique] IAccessible *LPACCESSIBLE;
  199. //
  200. // Input to DISPID_ACC_NAVIGATE
  201. //
  202. const long NAVDIR_MIN = 0x00000000;
  203. const long NAVDIR_UP = 0x00000001;
  204. const long NAVDIR_DOWN = 0x00000002;
  205. const long NAVDIR_LEFT = 0x00000003;
  206. const long NAVDIR_RIGHT = 0x00000004;
  207. const long NAVDIR_NEXT = 0x00000005;
  208. const long NAVDIR_PREVIOUS = 0x00000006;
  209. const long NAVDIR_FIRSTCHILD = 0x00000007;
  210. const long NAVDIR_LASTCHILD = 0x00000008;
  211. const long NAVDIR_MAX = 0x00000009;
  212. // Input to DISPID_ACC_SELECT
  213. const long SELFLAG_NONE = 0x00000000;
  214. const long SELFLAG_TAKEFOCUS = 0x00000001;
  215. const long SELFLAG_TAKESELECTION = 0x00000002;
  216. const long SELFLAG_EXTENDSELECTION = 0x00000004;
  217. const long SELFLAG_ADDSELECTION = 0x00000008;
  218. const long SELFLAG_REMOVESELECTION = 0x00000010;
  219. const long SELFLAG_VALID = 0x0000001F;
  220. cpp_quote("#ifndef STATE_SYSTEM_UNAVAILABLE")
  221. // Output from DISPID_ACC_STATE
  222. const long STATE_SYSTEM_NORMAL = 0x00000000;
  223. const long STATE_SYSTEM_UNAVAILABLE = 0x00000001; // Disabled
  224. const long STATE_SYSTEM_SELECTED = 0x00000002;
  225. const long STATE_SYSTEM_FOCUSED = 0x00000004;
  226. const long STATE_SYSTEM_PRESSED = 0x00000008;
  227. const long STATE_SYSTEM_CHECKED = 0x00000010;
  228. const long STATE_SYSTEM_MIXED = 0x00000020; // 3-state checkbox or toolbar button
  229. const long STATE_SYSTEM_INDETERMINATE = STATE_SYSTEM_MIXED;
  230. const long STATE_SYSTEM_READONLY = 0x00000040;
  231. const long STATE_SYSTEM_HOTTRACKED = 0x00000080;
  232. const long STATE_SYSTEM_DEFAULT = 0x00000100;
  233. const long STATE_SYSTEM_EXPANDED = 0x00000200;
  234. const long STATE_SYSTEM_COLLAPSED = 0x00000400;
  235. const long STATE_SYSTEM_BUSY = 0x00000800;
  236. const long STATE_SYSTEM_FLOATING = 0x00001000; // Children "owned" not "contained" by parent
  237. const long STATE_SYSTEM_MARQUEED = 0x00002000;
  238. const long STATE_SYSTEM_ANIMATED = 0x00004000;
  239. const long STATE_SYSTEM_INVISIBLE = 0x00008000;
  240. const long STATE_SYSTEM_OFFSCREEN = 0x00010000;
  241. const long STATE_SYSTEM_SIZEABLE = 0x00020000;
  242. const long STATE_SYSTEM_MOVEABLE = 0x00040000;
  243. const long STATE_SYSTEM_SELFVOICING = 0x00080000;
  244. const long STATE_SYSTEM_FOCUSABLE = 0x00100000;
  245. const long STATE_SYSTEM_SELECTABLE = 0x00200000;
  246. const long STATE_SYSTEM_LINKED = 0x00400000;
  247. const long STATE_SYSTEM_TRAVERSED = 0x00800000;
  248. const long STATE_SYSTEM_MULTISELECTABLE = 0x01000000; // Supports multiple selection
  249. const long STATE_SYSTEM_EXTSELECTABLE = 0x02000000; // Supports extended selection
  250. const long STATE_SYSTEM_ALERT_LOW = 0x04000000; // This information is of low priority
  251. const long STATE_SYSTEM_ALERT_MEDIUM = 0x08000000; // This information is of medium priority
  252. const long STATE_SYSTEM_ALERT_HIGH = 0x10000000; // This information is of high priority
  253. const long STATE_SYSTEM_PROTECTED = 0x20000000;
  254. const long STATE_SYSTEM_VALID = 0x7FFFFFFF;
  255. cpp_quote("#endif //STATE_SYSTEM_UNAVAILABLE")
  256. // winuser.h already defines the above, so anything within the
  257. // above ifdefs will be pulled from winuser.h, not oleacc.h.
  258. // New stuff has to be added outside those ifdefs, otherwise
  259. // anything that includes winuser won't see it.
  260. cpp_quote("#ifndef STATE_SYSTEM_HASPOPUP")
  261. const long STATE_SYSTEM_HASPOPUP = 0x40000000;
  262. cpp_quote("#endif //STATE_SYSTEM_HASPOPUP")
  263. // Output from DISPID_ACC_ROLE
  264. const long ROLE_SYSTEM_TITLEBAR = 0x00000001;
  265. const long ROLE_SYSTEM_MENUBAR = 0x00000002;
  266. const long ROLE_SYSTEM_SCROLLBAR = 0x00000003;
  267. const long ROLE_SYSTEM_GRIP = 0x00000004;
  268. const long ROLE_SYSTEM_SOUND = 0x00000005;
  269. const long ROLE_SYSTEM_CURSOR = 0x00000006;
  270. const long ROLE_SYSTEM_CARET = 0x00000007;
  271. const long ROLE_SYSTEM_ALERT = 0x00000008;
  272. const long ROLE_SYSTEM_WINDOW = 0x00000009;
  273. const long ROLE_SYSTEM_CLIENT = 0x0000000A;
  274. const long ROLE_SYSTEM_MENUPOPUP = 0x0000000B;
  275. const long ROLE_SYSTEM_MENUITEM = 0x0000000C;
  276. const long ROLE_SYSTEM_TOOLTIP = 0x0000000D;
  277. const long ROLE_SYSTEM_APPLICATION = 0x0000000E;
  278. const long ROLE_SYSTEM_DOCUMENT = 0x0000000F;
  279. const long ROLE_SYSTEM_PANE = 0x00000010;
  280. const long ROLE_SYSTEM_CHART = 0x00000011;
  281. const long ROLE_SYSTEM_DIALOG = 0x00000012;
  282. const long ROLE_SYSTEM_BORDER = 0x00000013;
  283. const long ROLE_SYSTEM_GROUPING = 0x00000014;
  284. const long ROLE_SYSTEM_SEPARATOR = 0x00000015;
  285. const long ROLE_SYSTEM_TOOLBAR = 0x00000016;
  286. const long ROLE_SYSTEM_STATUSBAR = 0x00000017;
  287. const long ROLE_SYSTEM_TABLE = 0x00000018;
  288. const long ROLE_SYSTEM_COLUMNHEADER = 0x00000019;
  289. const long ROLE_SYSTEM_ROWHEADER = 0x0000001A;
  290. const long ROLE_SYSTEM_COLUMN = 0x0000001B;
  291. const long ROLE_SYSTEM_ROW = 0x0000001C;
  292. const long ROLE_SYSTEM_CELL = 0x0000001D;
  293. const long ROLE_SYSTEM_LINK = 0x0000001E;
  294. const long ROLE_SYSTEM_HELPBALLOON = 0x0000001F;
  295. const long ROLE_SYSTEM_CHARACTER = 0x00000020;
  296. const long ROLE_SYSTEM_LIST = 0x00000021;
  297. const long ROLE_SYSTEM_LISTITEM = 0x00000022;
  298. const long ROLE_SYSTEM_OUTLINE = 0x00000023;
  299. const long ROLE_SYSTEM_OUTLINEITEM = 0x00000024;
  300. const long ROLE_SYSTEM_PAGETAB = 0x00000025;
  301. const long ROLE_SYSTEM_PROPERTYPAGE = 0x00000026;
  302. const long ROLE_SYSTEM_INDICATOR = 0x00000027;
  303. const long ROLE_SYSTEM_GRAPHIC = 0x00000028;
  304. const long ROLE_SYSTEM_STATICTEXT = 0x00000029;
  305. const long ROLE_SYSTEM_TEXT = 0x0000002A; // Editable, selectable, etc.
  306. const long ROLE_SYSTEM_PUSHBUTTON = 0x0000002B;
  307. const long ROLE_SYSTEM_CHECKBUTTON = 0x0000002C;
  308. const long ROLE_SYSTEM_RADIOBUTTON = 0x0000002D;
  309. const long ROLE_SYSTEM_COMBOBOX = 0x0000002E;
  310. const long ROLE_SYSTEM_DROPLIST = 0x0000002F;
  311. const long ROLE_SYSTEM_PROGRESSBAR = 0x00000030;
  312. const long ROLE_SYSTEM_DIAL = 0x00000031;
  313. const long ROLE_SYSTEM_HOTKEYFIELD = 0x00000032;
  314. const long ROLE_SYSTEM_SLIDER = 0x00000033;
  315. const long ROLE_SYSTEM_SPINBUTTON = 0x00000034;
  316. const long ROLE_SYSTEM_DIAGRAM = 0x00000035;
  317. const long ROLE_SYSTEM_ANIMATION = 0x00000036;
  318. const long ROLE_SYSTEM_EQUATION = 0x00000037;
  319. const long ROLE_SYSTEM_BUTTONDROPDOWN = 0x00000038;
  320. const long ROLE_SYSTEM_BUTTONMENU = 0x00000039;
  321. const long ROLE_SYSTEM_BUTTONDROPDOWNGRID = 0x0000003A;
  322. const long ROLE_SYSTEM_WHITESPACE = 0x0000003B;
  323. const long ROLE_SYSTEM_PAGETABLIST = 0x0000003C;
  324. const long ROLE_SYSTEM_CLOCK = 0x0000003D;
  325. const long ROLE_SYSTEM_SPLITBUTTON = 0x0000003E;
  326. const long ROLE_SYSTEM_IPADDRESS = 0x0000003F;
  327. const long ROLE_SYSTEM_OUTLINEBUTTON = 0x00000040;
  328. // Hierarchy Properties
  329. [hidden, propget, id(DISPID_ACC_PARENT)] HRESULT accParent([out, retval] IDispatch** ppdispParent);
  330. [hidden, propget, id(DISPID_ACC_CHILDCOUNT)] HRESULT accChildCount([out, retval] long* pcountChildren);
  331. [hidden, propget, id(DISPID_ACC_CHILD)] HRESULT accChild([in] VARIANT varChild, [out, retval] IDispatch** ppdispChild);
  332. // Description Properties
  333. [hidden, propget, id(DISPID_ACC_NAME)] HRESULT accName([in, optional] VARIANT varChild,[out, retval] BSTR* pszName);
  334. [hidden, propget, id(DISPID_ACC_VALUE)] HRESULT accValue([in, optional] VARIANT varChild,[out, retval] BSTR* pszValue);
  335. [hidden, propget, id(DISPID_ACC_DESCRIPTION)] HRESULT accDescription([in, optional] VARIANT varChild,[out, retval] BSTR* pszDescription);
  336. [hidden, propget, id(DISPID_ACC_ROLE)] HRESULT accRole([in, optional] VARIANT varChild,[out, retval] VARIANT * pvarRole);
  337. [hidden, propget, id(DISPID_ACC_STATE)] HRESULT accState([in, optional] VARIANT varChild,[out, retval] VARIANT * pvarState);
  338. [hidden, propget, id(DISPID_ACC_HELP)] HRESULT accHelp([in, optional] VARIANT varChild,[out, retval] BSTR * pszHelp);
  339. [hidden, propget, id(DISPID_ACC_HELPTOPIC)] HRESULT accHelpTopic([out] BSTR * pszHelpFile,[in, optional] VARIANT varChild,[out, retval] long * pidTopic);
  340. [hidden, propget, id(DISPID_ACC_KEYBOARDSHORTCUT)] HRESULT accKeyboardShortcut([in, optional] VARIANT varChild,[out, retval] BSTR * pszKeyboardShortcut);
  341. [hidden, propget, id(DISPID_ACC_FOCUS)] HRESULT accFocus([out, retval] VARIANT * pvarChild);
  342. [hidden, propget, id(DISPID_ACC_SELECTION)] HRESULT accSelection([out, retval] VARIANT * pvarChildren);
  343. [hidden, propget, id(DISPID_ACC_DEFAULTACTION)] HRESULT accDefaultAction([in, optional] VARIANT varChild,[out, retval] BSTR * pszDefaultAction);
  344. // Methods
  345. [hidden, id(DISPID_ACC_SELECT)] HRESULT accSelect([in] long flagsSelect,[in, optional] VARIANT varChild);
  346. [hidden, id(DISPID_ACC_LOCATION)] HRESULT accLocation([out] long * pxLeft,[out] long * pyTop,[out] long * pcxWidth,[out] long * pcyHeight, [in, optional] VARIANT varChild);
  347. [hidden, id(DISPID_ACC_NAVIGATE)] HRESULT accNavigate([in] long navDir,[in, optional] VARIANT varStart,[out, retval] VARIANT * pvarEndUpAt);
  348. [hidden, id(DISPID_ACC_HITTEST)] HRESULT accHitTest([in] long xLeft, [in] long yTop,[out, retval] VARIANT * pvarChild);
  349. [hidden, id(DISPID_ACC_DODEFAULTACTION)] HRESULT accDoDefaultAction([in, optional] VARIANT varChild);
  350. // Description Properties, puts
  351. [hidden, propput, id(DISPID_ACC_NAME)] HRESULT accName([in, optional] VARIANT varChild,[in] BSTR szName);
  352. [hidden, propput, id(DISPID_ACC_VALUE)] HRESULT accValue([in, optional] VARIANT varChild,[in] BSTR szValue);
  353. }
  354. [
  355. object,
  356. uuid(03022430-ABC4-11d0-BDE2-00AA001A1953),
  357. hidden,
  358. oleautomation,
  359. pointer_default(unique)
  360. ]
  361. interface IAccessibleHandler : IUnknown
  362. {
  363. typedef [unique] IAccessibleHandler *LPACCESSIBLEHANDLER;
  364. HRESULT AccessibleObjectFromID( [in] long hwnd, [in] long lObjectID, [out] LPACCESSIBLE *pIAccessible );
  365. }
  366. //
  367. //
  368. // Annotation interfaces
  369. //
  370. //
  371. typedef enum AnnoScope
  372. {
  373. ANNO_THIS = 0, // Just this object
  374. ANNO_CONTAINER = 1, // This object, plus immediate children
  375. } AnnoScope;
  376. typedef GUID MSAAPROPID;
  377. // This interface is used to expose an identity string that is used as a key
  378. // into the annotation database.
  379. [
  380. object,
  381. uuid(7852b78d-1cfd-41c1-a615-9c0c85960b5f),
  382. pointer_default(unique)
  383. ]
  384. interface IAccIdentity: IUnknown
  385. {
  386. HRESULT GetIdentityString (
  387. [in] DWORD dwIDChild,
  388. [out, size_is(, *pdwIDStringLen )] BYTE ** ppIDString,
  389. [out] DWORD * pdwIDStringLen
  390. );
  391. };
  392. [
  393. object,
  394. uuid(76c0dbbb-15e0-4e7b-b61b-20eeea2001e0),
  395. pointer_default(unique)
  396. ]
  397. interface IAccPropServer: IUnknown
  398. {
  399. HRESULT GetPropValue (
  400. [in, size_is(dwIDStringLen)] const BYTE * pIDString,
  401. [in] DWORD dwIDStringLen,
  402. [in] MSAAPROPID idProp,
  403. [out] VARIANT * pvarValue,
  404. [out] BOOL * pfHasProp );
  405. };
  406. [
  407. object,
  408. uuid(6e26e776-04f0-495d-80e4-3330352e3169),
  409. pointer_default(unique)
  410. ]
  411. interface IAccPropServices: IUnknown
  412. {
  413. HRESULT SetPropValue (
  414. [in, size_is(dwIDStringLen)] const BYTE * pIDString,
  415. [in] DWORD dwIDStringLen,
  416. [in] MSAAPROPID idProp,
  417. [in] VARIANT var
  418. );
  419. HRESULT SetPropServer (
  420. [in, size_is(dwIDStringLen)] const BYTE * pIDString,
  421. [in] DWORD dwIDStringLen,
  422. [in, size_is(cProps)] const MSAAPROPID * paProps,
  423. [in] int cProps,
  424. [in] IAccPropServer * pServer,
  425. [in] AnnoScope annoScope
  426. );
  427. HRESULT ClearProps (
  428. [in, size_is(dwIDStringLen)] const BYTE * pIDString,
  429. [in] DWORD dwIDStringLen,
  430. [in, size_is(cProps)] const MSAAPROPID * paProps,
  431. [in] int cProps
  432. );
  433. // Quick OLEACC/HWND-based functionality
  434. HRESULT SetHwndProp (
  435. [in] HWND hwnd,
  436. [in] DWORD idObject,
  437. [in] DWORD idChild,
  438. [in] MSAAPROPID idProp,
  439. [in] VARIANT var
  440. );
  441. HRESULT SetHwndPropStr (
  442. [in] HWND hwnd,
  443. [in] DWORD idObject,
  444. [in] DWORD idChild,
  445. [in] MSAAPROPID idProp,
  446. [in, string] LPCWSTR str
  447. );
  448. HRESULT SetHwndPropServer (
  449. [in] HWND hwnd,
  450. [in] DWORD idObject,
  451. [in] DWORD idChild,
  452. [in, size_is(cProps)] const MSAAPROPID * paProps,
  453. [in] int cProps,
  454. [in] IAccPropServer * pServer,
  455. [in] AnnoScope annoScope
  456. );
  457. HRESULT ClearHwndProps (
  458. [in] HWND hwnd,
  459. [in] DWORD idObject,
  460. [in] DWORD idChild,
  461. [in, size_is(cProps)] const MSAAPROPID * paProps,
  462. [in] int cProps
  463. );
  464. // Methods for composing/decomposing HWND based identity strings...
  465. HRESULT ComposeHwndIdentityString (
  466. [in] HWND hwnd,
  467. [in] DWORD idObject,
  468. [in] DWORD idChild,
  469. [out, size_is(, *pdwIDStringLen )] BYTE ** ppIDString,
  470. [out] DWORD * pdwIDStringLen
  471. );
  472. HRESULT DecomposeHwndIdentityString (
  473. [in, size_is(dwIDStringLen)] const BYTE * pIDString,
  474. [in] DWORD dwIDStringLen,
  475. [out] HWND * phwnd,
  476. [out] DWORD * pidObject,
  477. [out] DWORD * pidChild
  478. );
  479. // Quick OLEACC/HMENU-based functionality
  480. HRESULT SetHmenuProp (
  481. [in] HMENU hmenu,
  482. [in] DWORD idChild,
  483. [in] MSAAPROPID idProp,
  484. [in] VARIANT var
  485. );
  486. HRESULT SetHmenuPropStr (
  487. [in] HMENU hmenu,
  488. [in] DWORD idChild,
  489. [in] MSAAPROPID idProp,
  490. [in, string] LPCWSTR str
  491. );
  492. HRESULT SetHmenuPropServer (
  493. [in] HMENU hmenu,
  494. [in] DWORD idChild,
  495. [in, size_is(cProps)] const MSAAPROPID * paProps,
  496. [in] int cProps,
  497. [in] IAccPropServer * pServer,
  498. [in] AnnoScope annoScope
  499. );
  500. HRESULT ClearHmenuProps (
  501. [in] HMENU hmenu,
  502. [in] DWORD idChild,
  503. [in, size_is(cProps)] const MSAAPROPID * paProps,
  504. [in] int cProps
  505. );
  506. // Methods for composing/decomposing HMENU based identity strings...
  507. HRESULT ComposeHmenuIdentityString (
  508. [in] HMENU hmenu,
  509. [in] DWORD idChild,
  510. [out, size_is(, *pdwIDStringLen )] BYTE ** ppIDString,
  511. [out] DWORD * pdwIDStringLen
  512. );
  513. HRESULT DecomposeHmenuIdentityString (
  514. [in, size_is(dwIDStringLen)] const BYTE * pIDString,
  515. [in] DWORD dwIDStringLen,
  516. [out] HMENU * phmenu,
  517. [out] DWORD * pidChild
  518. );
  519. };
  520. cpp_quote("")
  521. cpp_quote("//=--------------------------------------------------------------------------=")
  522. cpp_quote("// Type Library Definitions")
  523. cpp_quote("//=--------------------------------------------------------------------------=")
  524. cpp_quote("")
  525. [
  526. uuid(1ea4dbf0-3c3b-11cf-810c-00aa00389b71),
  527. lcid(0),
  528. version(1.1),
  529. hidden
  530. ]
  531. library Accessibility
  532. {
  533. importlib ("stdole2.tlb");
  534. interface IAccessible;
  535. interface IAccessibleHandler;
  536. interface IAccIdentity;
  537. interface IAccPropServer;
  538. interface IAccPropServices;
  539. [
  540. uuid(b5f8350b-0548-48b1-a6ee-88bd00b4a5e7)
  541. ]
  542. coclass CAccPropServices
  543. {
  544. interface IAccPropServices;
  545. }
  546. }