The JUCE cross-platform C++ framework, with DISTRHO/KXStudio specific changes
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.

365 lines
16KB

  1. /*
  2. ==============================================================================
  3. This file is part of the JUCE 7 technical preview.
  4. Copyright (c) 2022 - Raw Material Software Limited
  5. You may use this code under the terms of the GPL v3
  6. (see www.gnu.org/licenses).
  7. For the technical preview this file cannot be licensed commercially.
  8. JUCE IS PROVIDED "AS IS" WITHOUT ANY WARRANTY, AND ALL WARRANTIES, WHETHER
  9. EXPRESSED OR IMPLIED, INCLUDING MERCHANTABILITY AND FITNESS FOR PURPOSE, ARE
  10. DISCLAIMED.
  11. ==============================================================================
  12. */
  13. namespace juce
  14. {
  15. namespace ComTypes
  16. {
  17. /*
  18. These interfaces would normally be included in the system platform headers.
  19. However, those headers are likely to be incomplete when building with
  20. MinGW. In order to allow building accessible applications under MinGW,
  21. we reproduce all necessary definitions here.
  22. */
  23. struct UiaPoint
  24. {
  25. double x;
  26. double y;
  27. };
  28. struct UiaRect
  29. {
  30. double left;
  31. double top;
  32. double width;
  33. double height;
  34. };
  35. enum NavigateDirection
  36. {
  37. NavigateDirection_Parent = 0,
  38. NavigateDirection_NextSibling = 1,
  39. NavigateDirection_PreviousSibling = 2,
  40. NavigateDirection_FirstChild = 3,
  41. NavigateDirection_LastChild = 4
  42. };
  43. enum ExpandCollapseState
  44. {
  45. ExpandCollapseState_Collapsed = 0,
  46. ExpandCollapseState_Expanded = 1,
  47. ExpandCollapseState_PartiallyExpanded = 2,
  48. ExpandCollapseState_LeafNode = 3
  49. };
  50. enum TextPatternRangeEndpoint
  51. {
  52. TextPatternRangeEndpoint_Start = 0,
  53. TextPatternRangeEndpoint_End = 1
  54. };
  55. enum TextUnit
  56. {
  57. TextUnit_Character = 0,
  58. TextUnit_Format = 1,
  59. TextUnit_Word = 2,
  60. TextUnit_Line = 3,
  61. TextUnit_Paragraph = 4,
  62. TextUnit_Page = 5,
  63. TextUnit_Document = 6
  64. };
  65. enum SupportedTextSelection
  66. {
  67. SupportedTextSelection_None = 0,
  68. SupportedTextSelection_Single = 1,
  69. SupportedTextSelection_Multiple = 2
  70. };
  71. enum CaretPosition
  72. {
  73. CaretPosition_Unknown = 0,
  74. CaretPosition_EndOfLine = 1,
  75. CaretPosition_BeginningOfLine = 2
  76. };
  77. enum ToggleState
  78. {
  79. ToggleState_Off = 0,
  80. ToggleState_On = 1,
  81. ToggleState_Indeterminate = 2
  82. };
  83. enum WindowVisualState
  84. {
  85. WindowVisualState_Normal = 0,
  86. WindowVisualState_Maximized = 1,
  87. WindowVisualState_Minimized = 2
  88. };
  89. enum WindowInteractionState
  90. {
  91. WindowInteractionState_Running = 0,
  92. WindowInteractionState_Closing = 1,
  93. WindowInteractionState_ReadyForUserInteraction = 2,
  94. WindowInteractionState_BlockedByModalWindow = 3,
  95. WindowInteractionState_NotResponding = 4
  96. };
  97. const long UIA_InvokePatternId = 10000;
  98. const long UIA_SelectionPatternId = 10001;
  99. const long UIA_ValuePatternId = 10002;
  100. const long UIA_RangeValuePatternId = 10003;
  101. const long UIA_ExpandCollapsePatternId = 10005;
  102. const long UIA_GridPatternId = 10006;
  103. const long UIA_GridItemPatternId = 10007;
  104. const long UIA_WindowPatternId = 10009;
  105. const long UIA_SelectionItemPatternId = 10010;
  106. const long UIA_TextPatternId = 10014;
  107. const long UIA_TogglePatternId = 10015;
  108. const long UIA_TransformPatternId = 10016;
  109. const long UIA_TextPattern2Id = 10024;
  110. const long UIA_StructureChangedEventId = 20002;
  111. const long UIA_MenuOpenedEventId = 20003;
  112. const long UIA_AutomationFocusChangedEventId = 20005;
  113. const long UIA_MenuClosedEventId = 20007;
  114. const long UIA_LayoutInvalidatedEventId = 20008;
  115. const long UIA_Invoke_InvokedEventId = 20009;
  116. const long UIA_SelectionItem_ElementSelectedEventId = 20012;
  117. const long UIA_Text_TextSelectionChangedEventId = 20014;
  118. const long UIA_Text_TextChangedEventId = 20015;
  119. const long UIA_Window_WindowOpenedEventId = 20016;
  120. const long UIA_Window_WindowClosedEventId = 20017;
  121. const long UIA_IsPeripheralPropertyId = 30150;
  122. const long UIA_IsReadOnlyAttributeId = 40015;
  123. const long UIA_CaretPositionAttributeId = 40038;
  124. const long UIA_ButtonControlTypeId = 50000;
  125. const long UIA_CheckBoxControlTypeId = 50002;
  126. const long UIA_ComboBoxControlTypeId = 50003;
  127. const long UIA_EditControlTypeId = 50004;
  128. const long UIA_HyperlinkControlTypeId = 50005;
  129. const long UIA_ImageControlTypeId = 50006;
  130. const long UIA_ListItemControlTypeId = 50007;
  131. const long UIA_ListControlTypeId = 50008;
  132. const long UIA_MenuBarControlTypeId = 50010;
  133. const long UIA_MenuItemControlTypeId = 50011;
  134. const long UIA_ProgressBarControlTypeId = 50012;
  135. const long UIA_RadioButtonControlTypeId = 50013;
  136. const long UIA_ScrollBarControlTypeId = 50014;
  137. const long UIA_SliderControlTypeId = 50015;
  138. const long UIA_TextControlTypeId = 50020;
  139. const long UIA_ToolTipControlTypeId = 50022;
  140. const long UIA_TreeControlTypeId = 50023;
  141. const long UIA_TreeItemControlTypeId = 50024;
  142. const long UIA_CustomControlTypeId = 50025;
  143. const long UIA_GroupControlTypeId = 50026;
  144. const long UIA_DataItemControlTypeId = 50029;
  145. const long UIA_WindowControlTypeId = 50032;
  146. const long UIA_HeaderControlTypeId = 50034;
  147. const long UIA_HeaderItemControlTypeId = 50035;
  148. const long UIA_TableControlTypeId = 50036;
  149. interface IRawElementProviderFragmentRoot;
  150. interface IRawElementProviderFragment;
  151. JUCE_COMCLASS (IRawElementProviderFragmentRoot, "620ce2a5-ab8f-40a9-86cb-de3c75599b58") : public IUnknown
  152. {
  153. public:
  154. JUCE_COMCALL ElementProviderFromPoint (double x, double y, __RPC__deref_out_opt IRawElementProviderFragment** pRetVal) = 0;
  155. JUCE_COMCALL GetFocus (__RPC__deref_out_opt IRawElementProviderFragment * *pRetVal) = 0;
  156. };
  157. JUCE_COMCLASS (IRawElementProviderFragment, "f7063da8-8359-439c-9297-bbc5299a7d87") : public IUnknown
  158. {
  159. public:
  160. JUCE_COMCALL Navigate (NavigateDirection direction, __RPC__deref_out_opt IRawElementProviderFragment** pRetVal) = 0;
  161. JUCE_COMCALL GetRuntimeId (__RPC__deref_out_opt SAFEARRAY * *pRetVal) = 0;
  162. JUCE_COMCALL get_BoundingRectangle (__RPC__out UiaRect * pRetVal) = 0;
  163. JUCE_COMCALL GetEmbeddedFragmentRoots (__RPC__deref_out_opt SAFEARRAY * *pRetVal) = 0;
  164. JUCE_COMCALL SetFocus() = 0;
  165. JUCE_COMCALL get_FragmentRoot (__RPC__deref_out_opt IRawElementProviderFragmentRoot * *pRetVal) = 0;
  166. };
  167. JUCE_COMCLASS (IExpandCollapseProvider, "d847d3a5-cab0-4a98-8c32-ecb45c59ad24") : public IUnknown
  168. {
  169. public:
  170. JUCE_COMCALL Expand() = 0;
  171. JUCE_COMCALL Collapse() = 0;
  172. JUCE_COMCALL get_ExpandCollapseState (__RPC__out ExpandCollapseState * pRetVal) = 0;
  173. };
  174. JUCE_COMCLASS (IGridItemProvider, "d02541f1-fb81-4d64-ae32-f520f8a6dbd1") : public IUnknown
  175. {
  176. public:
  177. JUCE_COMCALL get_Row (__RPC__out int* pRetVal) = 0;
  178. JUCE_COMCALL get_Column (__RPC__out int* pRetVal) = 0;
  179. JUCE_COMCALL get_RowSpan (__RPC__out int* pRetVal) = 0;
  180. JUCE_COMCALL get_ColumnSpan (__RPC__out int* pRetVal) = 0;
  181. JUCE_COMCALL get_ContainingGrid (__RPC__deref_out_opt IRawElementProviderSimple * *pRetVal) = 0;
  182. };
  183. JUCE_COMCLASS (IGridProvider, "b17d6187-0907-464b-a168-0ef17a1572b1") : public IUnknown
  184. {
  185. public:
  186. JUCE_COMCALL GetItem (int row, int column, __RPC__deref_out_opt IRawElementProviderSimple** pRetVal) = 0;
  187. JUCE_COMCALL get_RowCount (__RPC__out int* pRetVal) = 0;
  188. JUCE_COMCALL get_ColumnCount (__RPC__out int* pRetVal) = 0;
  189. };
  190. JUCE_COMCLASS (IInvokeProvider, "54fcb24b-e18e-47a2-b4d3-eccbe77599a2") : public IUnknown
  191. {
  192. public:
  193. JUCE_COMCALL Invoke() = 0;
  194. };
  195. JUCE_COMCLASS (IRangeValueProvider, "36dc7aef-33e6-4691-afe1-2be7274b3d33") : public IUnknown
  196. {
  197. public:
  198. JUCE_COMCALL SetValue (double val) = 0;
  199. JUCE_COMCALL get_Value (__RPC__out double* pRetVal) = 0;
  200. JUCE_COMCALL get_IsReadOnly (__RPC__out BOOL * pRetVal) = 0;
  201. JUCE_COMCALL get_Maximum (__RPC__out double* pRetVal) = 0;
  202. JUCE_COMCALL get_Minimum (__RPC__out double* pRetVal) = 0;
  203. JUCE_COMCALL get_LargeChange (__RPC__out double* pRetVal) = 0;
  204. JUCE_COMCALL get_SmallChange (__RPC__out double* pRetVal) = 0;
  205. };
  206. JUCE_COMCLASS (ISelectionProvider, "fb8b03af-3bdf-48d4-bd36-1a65793be168") : public IUnknown
  207. {
  208. public:
  209. JUCE_COMCALL GetSelection (__RPC__deref_out_opt SAFEARRAY * *pRetVal) = 0;
  210. JUCE_COMCALL get_CanSelectMultiple (__RPC__out BOOL * pRetVal) = 0;
  211. JUCE_COMCALL get_IsSelectionRequired (__RPC__out BOOL * pRetVal) = 0;
  212. };
  213. JUCE_COMCLASS (ISelectionProvider2, "14f68475-ee1c-44f6-a869-d239381f0fe7") : public ISelectionProvider
  214. {
  215. JUCE_COMCALL get_FirstSelectedItem (IRawElementProviderSimple * *retVal) = 0;
  216. JUCE_COMCALL get_LastSelectedItem (IRawElementProviderSimple * *retVal) = 0;
  217. JUCE_COMCALL get_CurrentSelectedItem (IRawElementProviderSimple * *retVal) = 0;
  218. JUCE_COMCALL get_ItemCount (int* retVal) = 0;
  219. };
  220. JUCE_COMCLASS (ISelectionItemProvider, "2acad808-b2d4-452d-a407-91ff1ad167b2") : public IUnknown
  221. {
  222. public:
  223. JUCE_COMCALL Select() = 0;
  224. JUCE_COMCALL AddToSelection() = 0;
  225. JUCE_COMCALL RemoveFromSelection() = 0;
  226. JUCE_COMCALL get_IsSelected (__RPC__out BOOL * pRetVal) = 0;
  227. JUCE_COMCALL get_SelectionContainer (__RPC__deref_out_opt IRawElementProviderSimple * *pRetVal) = 0;
  228. };
  229. JUCE_COMCLASS (ITextRangeProvider, "5347ad7b-c355-46f8-aff5-909033582f63") : public IUnknown
  230. {
  231. public:
  232. JUCE_COMCALL Clone (__RPC__deref_out_opt ITextRangeProvider * *pRetVal) = 0;
  233. JUCE_COMCALL Compare (__RPC__in_opt ITextRangeProvider * range, __RPC__out BOOL * pRetVal) = 0;
  234. JUCE_COMCALL CompareEndpoints (TextPatternRangeEndpoint endpoint, __RPC__in_opt ITextRangeProvider * targetRange, TextPatternRangeEndpoint targetEndpoint, __RPC__out int* pRetVal) = 0;
  235. JUCE_COMCALL ExpandToEnclosingUnit (TextUnit unit) = 0;
  236. JUCE_COMCALL FindAttribute (TEXTATTRIBUTEID attributeId, VARIANT val, BOOL backward, __RPC__deref_out_opt ITextRangeProvider * *pRetVal) = 0;
  237. JUCE_COMCALL FindText (__RPC__in BSTR text, BOOL backward, BOOL ignoreCase, __RPC__deref_out_opt ITextRangeProvider * *pRetVal) = 0;
  238. JUCE_COMCALL GetAttributeValue (TEXTATTRIBUTEID attributeId, __RPC__out VARIANT * pRetVal) = 0;
  239. JUCE_COMCALL GetBoundingRectangles (__RPC__deref_out_opt SAFEARRAY * *pRetVal) = 0;
  240. JUCE_COMCALL GetEnclosingElement (__RPC__deref_out_opt IRawElementProviderSimple * *pRetVal) = 0;
  241. JUCE_COMCALL GetText (int maxLength, __RPC__deref_out_opt BSTR* pRetVal) = 0;
  242. JUCE_COMCALL Move (TextUnit unit, int count, __RPC__out int* pRetVal) = 0;
  243. JUCE_COMCALL MoveEndpointByUnit (TextPatternRangeEndpoint endpoint, TextUnit unit, int count, __RPC__out int* pRetVal) = 0;
  244. JUCE_COMCALL MoveEndpointByRange (TextPatternRangeEndpoint endpoint, __RPC__in_opt ITextRangeProvider * targetRange, TextPatternRangeEndpoint targetEndpoint) = 0;
  245. JUCE_COMCALL Select() = 0;
  246. JUCE_COMCALL AddToSelection() = 0;
  247. JUCE_COMCALL RemoveFromSelection() = 0;
  248. JUCE_COMCALL ScrollIntoView (BOOL alignToTop) = 0;
  249. JUCE_COMCALL GetChildren (__RPC__deref_out_opt SAFEARRAY * *pRetVal) = 0;
  250. };
  251. JUCE_COMCLASS (ITextProvider, "3589c92c-63f3-4367-99bb-ada653b77cf2") : public IUnknown
  252. {
  253. public:
  254. JUCE_COMCALL GetSelection (__RPC__deref_out_opt SAFEARRAY * *pRetVal) = 0;
  255. JUCE_COMCALL GetVisibleRanges (__RPC__deref_out_opt SAFEARRAY * *pRetVal) = 0;
  256. JUCE_COMCALL RangeFromChild (__RPC__in_opt IRawElementProviderSimple * childElement, __RPC__deref_out_opt ITextRangeProvider * *pRetVal) = 0;
  257. JUCE_COMCALL RangeFromPoint (UiaPoint point, __RPC__deref_out_opt ITextRangeProvider * *pRetVal) = 0;
  258. JUCE_COMCALL get_DocumentRange (__RPC__deref_out_opt ITextRangeProvider * *pRetVal) = 0;
  259. JUCE_COMCALL get_SupportedTextSelection (__RPC__out SupportedTextSelection * pRetVal) = 0;
  260. };
  261. JUCE_COMCLASS (ITextProvider2, "0dc5e6ed-3e16-4bf1-8f9a-a979878bc195") : public ITextProvider
  262. {
  263. public:
  264. JUCE_COMCALL RangeFromAnnotation (__RPC__in_opt IRawElementProviderSimple * annotationElement, __RPC__deref_out_opt ITextRangeProvider * *pRetVal) = 0;
  265. JUCE_COMCALL GetCaretRange (__RPC__out BOOL * isActive, __RPC__deref_out_opt ITextRangeProvider * *pRetVal) = 0;
  266. };
  267. JUCE_COMCLASS (IToggleProvider, "56d00bd0-c4f4-433c-a836-1a52a57e0892") : public IUnknown
  268. {
  269. public:
  270. JUCE_COMCALL Toggle() = 0;
  271. JUCE_COMCALL get_ToggleState (__RPC__out ToggleState * pRetVal) = 0;
  272. };
  273. JUCE_COMCLASS (ITransformProvider, "6829ddc4-4f91-4ffa-b86f-bd3e2987cb4c") : public IUnknown
  274. {
  275. public:
  276. JUCE_COMCALL Move (double x, double y) = 0;
  277. JUCE_COMCALL Resize (double width, double height) = 0;
  278. JUCE_COMCALL Rotate (double degrees) = 0;
  279. JUCE_COMCALL get_CanMove (__RPC__out BOOL * pRetVal) = 0;
  280. JUCE_COMCALL get_CanResize (__RPC__out BOOL * pRetVal) = 0;
  281. JUCE_COMCALL get_CanRotate (__RPC__out BOOL * pRetVal) = 0;
  282. };
  283. JUCE_COMCLASS (IValueProvider, "c7935180-6fb3-4201-b174-7df73adbf64a") : public IUnknown
  284. {
  285. public:
  286. JUCE_COMCALL SetValue (__RPC__in LPCWSTR val) = 0;
  287. JUCE_COMCALL get_Value (__RPC__deref_out_opt BSTR * pRetVal) = 0;
  288. JUCE_COMCALL get_IsReadOnly (__RPC__out BOOL * pRetVal) = 0;
  289. };
  290. JUCE_COMCLASS (IWindowProvider, "987df77b-db06-4d77-8f8a-86a9c3bb90b9") : public IUnknown
  291. {
  292. public:
  293. JUCE_COMCALL SetVisualState (WindowVisualState state) = 0;
  294. JUCE_COMCALL Close() = 0;
  295. JUCE_COMCALL WaitForInputIdle (int milliseconds, __RPC__out BOOL* pRetVal) = 0;
  296. JUCE_COMCALL get_CanMaximize (__RPC__out BOOL * pRetVal) = 0;
  297. JUCE_COMCALL get_CanMinimize (__RPC__out BOOL * pRetVal) = 0;
  298. JUCE_COMCALL get_IsModal (__RPC__out BOOL * pRetVal) = 0;
  299. JUCE_COMCALL get_WindowVisualState (__RPC__out WindowVisualState * pRetVal) = 0;
  300. JUCE_COMCALL get_WindowInteractionState (__RPC__out WindowInteractionState * pRetVal) = 0;
  301. JUCE_COMCALL get_IsTopmost (__RPC__out BOOL * pRetVal) = 0;
  302. };
  303. constexpr CLSID CLSID_SpVoice { 0x96749377, 0x3391, 0x11D2, { 0x9E, 0xE3, 0x00, 0xC0, 0x4F, 0x79, 0x73, 0x96 } };
  304. } // namespace ComTypes
  305. } // namespace juce
  306. #ifdef __CRT_UUID_DECL
  307. __CRT_UUID_DECL (juce::ComTypes::IRawElementProviderFragmentRoot, 0x620ce2a5, 0xab8f, 0x40a9, 0x86, 0xcb, 0xde, 0x3c, 0x75, 0x59, 0x9b, 0x58)
  308. __CRT_UUID_DECL (juce::ComTypes::IRawElementProviderFragment, 0xf7063da8, 0x8359, 0x439c, 0x92, 0x97, 0xbb, 0xc5, 0x29, 0x9a, 0x7d, 0x87)
  309. __CRT_UUID_DECL (juce::ComTypes::IExpandCollapseProvider, 0xd847d3a5, 0xcab0, 0x4a98, 0x8c, 0x32, 0xec, 0xb4, 0x5c, 0x59, 0xad, 0x24)
  310. __CRT_UUID_DECL (juce::ComTypes::IGridItemProvider, 0xd02541f1, 0xfb81, 0x4d64, 0xae, 0x32, 0xf5, 0x20, 0xf8, 0xa6, 0xdb, 0xd1)
  311. __CRT_UUID_DECL (juce::ComTypes::IGridProvider, 0xb17d6187, 0x0907, 0x464b, 0xa1, 0x68, 0x0e, 0xf1, 0x7a, 0x15, 0x72, 0xb1)
  312. __CRT_UUID_DECL (juce::ComTypes::IInvokeProvider, 0x54fcb24b, 0xe18e, 0x47a2, 0xb4, 0xd3, 0xec, 0xcb, 0xe7, 0x75, 0x99, 0xa2)
  313. __CRT_UUID_DECL (juce::ComTypes::IRangeValueProvider, 0x36dc7aef, 0x33e6, 0x4691, 0xaf, 0xe1, 0x2b, 0xe7, 0x27, 0x4b, 0x3d, 0x33)
  314. __CRT_UUID_DECL (juce::ComTypes::ISelectionProvider, 0xfb8b03af, 0x3bdf, 0x48d4, 0xbd, 0x36, 0x1a, 0x65, 0x79, 0x3b, 0xe1, 0x68)
  315. __CRT_UUID_DECL (juce::ComTypes::ISelectionProvider2, 0x14f68475, 0xee1c, 0x44f6, 0xa8, 0x69, 0xd2, 0x39, 0x38, 0x1f, 0x0f, 0xe7)
  316. __CRT_UUID_DECL (juce::ComTypes::ISelectionItemProvider, 0x2acad808, 0xb2d4, 0x452d, 0xa4, 0x07, 0x91, 0xff, 0x1a, 0xd1, 0x67, 0xb2)
  317. __CRT_UUID_DECL (juce::ComTypes::ITextRangeProvider, 0x5347ad7b, 0xc355, 0x46f8, 0xaf, 0xf5, 0x90, 0x90, 0x33, 0x58, 0x2f, 0x63)
  318. __CRT_UUID_DECL (juce::ComTypes::ITextProvider, 0x3589c92c, 0x63f3, 0x4367, 0x99, 0xbb, 0xad, 0xa6, 0x53, 0xb7, 0x7c, 0xf2)
  319. __CRT_UUID_DECL (juce::ComTypes::ITextProvider2, 0x0dc5e6ed, 0x3e16, 0x4bf1, 0x8f, 0x9a, 0xa9, 0x79, 0x87, 0x8b, 0xc1, 0x95)
  320. __CRT_UUID_DECL (juce::ComTypes::IToggleProvider, 0x56d00bd0, 0xc4f4, 0x433c, 0xa8, 0x36, 0x1a, 0x52, 0xa5, 0x7e, 0x08, 0x92)
  321. __CRT_UUID_DECL (juce::ComTypes::ITransformProvider, 0x6829ddc4, 0x4f91, 0x4ffa, 0xb8, 0x6f, 0xbd, 0x3e, 0x29, 0x87, 0xcb, 0x4c)
  322. __CRT_UUID_DECL (juce::ComTypes::IValueProvider, 0xc7935180, 0x6fb3, 0x4201, 0xb1, 0x74, 0x7d, 0xf7, 0x3a, 0xdb, 0xf6, 0x4a)
  323. __CRT_UUID_DECL (juce::ComTypes::IWindowProvider, 0x987df77b, 0xdb06, 0x4d77, 0x8f, 0x8a, 0x86, 0xa9, 0xc3, 0xbb, 0x90, 0xb9)
  324. #endif