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.

199 lines
6.4KB

  1. /*
  2. ==============================================================================
  3. This file is part of the JUCE library.
  4. Copyright (c) 2022 - Raw Material Software Limited
  5. JUCE is an open source library subject to commercial or open-source
  6. licensing.
  7. By using JUCE, you agree to the terms of both the JUCE 7 End-User License
  8. Agreement and JUCE Privacy Policy.
  9. End User License Agreement: www.juce.com/juce-7-licence
  10. Privacy Policy: www.juce.com/juce-privacy-policy
  11. Or: You may also use this code under the terms of the GPL v3 (see
  12. www.gnu.org/licenses).
  13. JUCE IS PROVIDED "AS IS" WITHOUT ANY WARRANTY, AND ALL WARRANTIES, WHETHER
  14. EXPRESSED OR IMPLIED, INCLUDING MERCHANTABILITY AND FITNESS FOR PURPOSE, ARE
  15. DISCLAIMED.
  16. ==============================================================================
  17. */
  18. #ifdef JUCE_GUI_EXTRA_H_INCLUDED
  19. /* When you add this cpp file to your project, you mustn't include it in a file where you've
  20. already included any other headers - just put it inside a file on its own, possibly with your config
  21. flags preceding it, but don't include anything else. That also includes avoiding any automatic prefix
  22. header files that the compiler may be using.
  23. */
  24. #error "Incorrect use of JUCE cpp file"
  25. #endif
  26. #define JUCE_CORE_INCLUDE_OBJC_HELPERS 1
  27. #define JUCE_CORE_INCLUDE_COM_SMART_PTR 1
  28. #define JUCE_CORE_INCLUDE_JNI_HELPERS 1
  29. #define JUCE_CORE_INCLUDE_NATIVE_HEADERS 1
  30. #define JUCE_EVENTS_INCLUDE_WIN32_MESSAGE_WINDOW 1
  31. #define JUCE_GRAPHICS_INCLUDE_COREGRAPHICS_HELPERS 1
  32. #define JUCE_GUI_BASICS_INCLUDE_XHEADERS 1
  33. #define JUCE_GUI_BASICS_INCLUDE_SCOPED_THREAD_DPI_AWARENESS_SETTER 1
  34. #ifndef JUCE_PUSH_NOTIFICATIONS
  35. #define JUCE_PUSH_NOTIFICATIONS 0
  36. #endif
  37. #include "juce_gui_extra.h"
  38. //==============================================================================
  39. #if JUCE_MAC
  40. #if JUCE_WEB_BROWSER
  41. #import <WebKit/WebKit.h>
  42. #endif
  43. #import <IOKit/IOKitLib.h>
  44. #import <IOKit/IOCFPlugIn.h>
  45. #import <IOKit/hid/IOHIDLib.h>
  46. #import <IOKit/hid/IOHIDKeys.h>
  47. #import <IOKit/pwr_mgt/IOPMLib.h>
  48. #if JUCE_PUSH_NOTIFICATIONS
  49. #import <Foundation/NSUserNotification.h>
  50. #include "native/juce_PushNotifications_mac.cpp"
  51. #endif
  52. //==============================================================================
  53. #elif JUCE_IOS
  54. #if JUCE_WEB_BROWSER
  55. #import <WebKit/WebKit.h>
  56. #endif
  57. #if JUCE_PUSH_NOTIFICATIONS
  58. #import <UserNotifications/UserNotifications.h>
  59. #include "native/juce_PushNotifications_ios.cpp"
  60. #endif
  61. //==============================================================================
  62. #elif JUCE_ANDROID
  63. #if JUCE_PUSH_NOTIFICATIONS
  64. #include "native/juce_PushNotifications_android.cpp"
  65. #endif
  66. //==============================================================================
  67. #elif JUCE_WINDOWS
  68. #include <windowsx.h>
  69. #include <vfw.h>
  70. #include <commdlg.h>
  71. #if JUCE_WEB_BROWSER
  72. #include <exdisp.h>
  73. #include <exdispid.h>
  74. #if JUCE_USE_WIN_WEBVIEW2
  75. #include <windows.foundation.h>
  76. #include <windows.foundation.collections.h>
  77. #include <winuser.h>
  78. JUCE_BEGIN_IGNORE_WARNINGS_MSVC (4265)
  79. #include <wrl.h>
  80. #include <wrl/wrappers/corewrappers.h>
  81. JUCE_END_IGNORE_WARNINGS_MSVC
  82. #include "WebView2.h"
  83. JUCE_BEGIN_IGNORE_WARNINGS_MSVC (4458)
  84. #include "WebView2EnvironmentOptions.h"
  85. JUCE_END_IGNORE_WARNINGS_MSVC
  86. #endif
  87. #endif
  88. //==============================================================================
  89. #elif (JUCE_LINUX || JUCE_BSD) && JUCE_WEB_BROWSER
  90. JUCE_BEGIN_IGNORE_WARNINGS_GCC_LIKE ("-Wzero-as-null-pointer-constant", "-Wparentheses", "-Wdeprecated-declarations")
  91. // If you're missing this header, you need to install the webkit2gtk-4.0 package
  92. #include <gtk/gtk.h>
  93. #include <gtk/gtkx.h>
  94. #include <glib-unix.h>
  95. #include <webkit2/webkit2.h>
  96. JUCE_END_IGNORE_WARNINGS_GCC_LIKE
  97. #endif
  98. //==============================================================================
  99. #include "documents/juce_FileBasedDocument.cpp"
  100. #include "code_editor/juce_CodeDocument.cpp"
  101. #include "code_editor/juce_CodeEditorComponent.cpp"
  102. #include "code_editor/juce_CPlusPlusCodeTokeniser.cpp"
  103. #include "code_editor/juce_XMLCodeTokeniser.cpp"
  104. #include "code_editor/juce_LuaCodeTokeniser.cpp"
  105. #include "misc/juce_BubbleMessageComponent.cpp"
  106. #include "misc/juce_ColourSelector.cpp"
  107. #include "misc/juce_KeyMappingEditorComponent.cpp"
  108. #include "misc/juce_PreferencesPanel.cpp"
  109. #include "misc/juce_PushNotifications.cpp"
  110. #include "misc/juce_RecentlyOpenedFilesList.cpp"
  111. #include "misc/juce_SplashScreen.cpp"
  112. #include "misc/juce_SystemTrayIconComponent.cpp"
  113. #include "misc/juce_LiveConstantEditor.cpp"
  114. #include "misc/juce_AnimatedAppComponent.cpp"
  115. #include "misc/juce_WebBrowserComponent.cpp"
  116. //==============================================================================
  117. #if JUCE_MAC || JUCE_IOS
  118. #if JUCE_MAC
  119. #include "native/juce_NSViewFrameWatcher_mac.h"
  120. #include "native/juce_NSViewComponent_mac.mm"
  121. #include "native/juce_AppleRemote_mac.mm"
  122. #include "native/juce_SystemTrayIcon_mac.cpp"
  123. #endif
  124. #if JUCE_IOS
  125. #include "native/juce_UIViewComponent_ios.mm"
  126. #endif
  127. #if JUCE_WEB_BROWSER
  128. #include "native/juce_WebBrowserComponent_mac.mm"
  129. #endif
  130. //==============================================================================
  131. #elif JUCE_WINDOWS
  132. #include "native/juce_ActiveXComponent_windows.cpp"
  133. #include "native/juce_HWNDComponent_windows.cpp"
  134. #if JUCE_WEB_BROWSER
  135. #include "native/juce_WebBrowserComponent_windows.cpp"
  136. #endif
  137. #include "native/juce_SystemTrayIcon_windows.cpp"
  138. //==============================================================================
  139. #elif JUCE_LINUX || JUCE_BSD
  140. JUCE_BEGIN_IGNORE_WARNINGS_GCC_LIKE ("-Wzero-as-null-pointer-constant")
  141. #include <juce_gui_basics/native/juce_ScopedWindowAssociation_linux.h>
  142. #include "native/juce_XEmbedComponent_linux.cpp"
  143. #if JUCE_WEB_BROWSER
  144. #if JUCE_USE_EXTERNAL_TEMPORARY_SUBPROCESS
  145. #include "juce_LinuxSubprocessHelperBinaryData.h"
  146. #endif
  147. #include "native/juce_WebBrowserComponent_linux.cpp"
  148. #endif
  149. JUCE_END_IGNORE_WARNINGS_GCC_LIKE
  150. #include "native/juce_SystemTrayIcon_linux.cpp"
  151. //==============================================================================
  152. #elif JUCE_ANDROID
  153. #include "native/juce_AndroidViewComponent.cpp"
  154. #if JUCE_WEB_BROWSER
  155. #include "native/juce_WebBrowserComponent_android.cpp"
  156. #endif
  157. #endif