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.

196 lines
6.6KB

  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. #import <WebKit/WebKit.h>
  41. #import <IOKit/IOKitLib.h>
  42. #import <IOKit/IOCFPlugIn.h>
  43. #import <IOKit/hid/IOHIDLib.h>
  44. #import <IOKit/hid/IOHIDKeys.h>
  45. #import <IOKit/pwr_mgt/IOPMLib.h>
  46. #if JUCE_PUSH_NOTIFICATIONS
  47. #import <Foundation/NSUserNotification.h>
  48. #include "native/juce_mac_PushNotifications.cpp"
  49. #endif
  50. //==============================================================================
  51. #elif JUCE_IOS
  52. #import <WebKit/WebKit.h>
  53. #if JUCE_PUSH_NOTIFICATIONS
  54. #import <UserNotifications/UserNotifications.h>
  55. #include "native/juce_ios_PushNotifications.cpp"
  56. #endif
  57. //==============================================================================
  58. #elif JUCE_ANDROID
  59. #if JUCE_PUSH_NOTIFICATIONS
  60. #include "native/juce_android_PushNotifications.cpp"
  61. #endif
  62. //==============================================================================
  63. #elif JUCE_WINDOWS
  64. #include <windowsx.h>
  65. #include <vfw.h>
  66. #include <commdlg.h>
  67. #if JUCE_WEB_BROWSER
  68. #include <exdisp.h>
  69. #include <exdispid.h>
  70. #if JUCE_USE_WIN_WEBVIEW2
  71. #include <windows.foundation.h>
  72. #include <windows.foundation.collections.h>
  73. JUCE_BEGIN_IGNORE_WARNINGS_MSVC (4265)
  74. #include <wrl.h>
  75. #include <wrl/wrappers/corewrappers.h>
  76. JUCE_END_IGNORE_WARNINGS_MSVC
  77. #include "WebView2.h"
  78. JUCE_BEGIN_IGNORE_WARNINGS_MSVC (4458)
  79. #include "WebView2EnvironmentOptions.h"
  80. JUCE_END_IGNORE_WARNINGS_MSVC
  81. #endif
  82. #endif
  83. //==============================================================================
  84. #elif (JUCE_LINUX || JUCE_BSD) && JUCE_WEB_BROWSER
  85. JUCE_BEGIN_IGNORE_WARNINGS_GCC_LIKE ("-Wzero-as-null-pointer-constant", "-Wparentheses", "-Wdeprecated-declarations")
  86. // If you're missing this header, you need to install the webkit2gtk-4.0 package
  87. #include <gtk/gtk.h>
  88. #include <gtk/gtkx.h>
  89. #include <glib-unix.h>
  90. #include <webkit2/webkit2.h>
  91. JUCE_END_IGNORE_WARNINGS_GCC_LIKE
  92. #endif
  93. //==============================================================================
  94. #include "documents/juce_FileBasedDocument.cpp"
  95. #include "code_editor/juce_CodeDocument.cpp"
  96. #include "code_editor/juce_CodeEditorComponent.cpp"
  97. #include "code_editor/juce_CPlusPlusCodeTokeniser.cpp"
  98. #include "code_editor/juce_XMLCodeTokeniser.cpp"
  99. #include "code_editor/juce_LuaCodeTokeniser.cpp"
  100. #include "misc/juce_BubbleMessageComponent.cpp"
  101. #include "misc/juce_ColourSelector.cpp"
  102. #include "misc/juce_KeyMappingEditorComponent.cpp"
  103. #include "misc/juce_PreferencesPanel.cpp"
  104. #include "misc/juce_PushNotifications.cpp"
  105. #include "misc/juce_RecentlyOpenedFilesList.cpp"
  106. #include "misc/juce_SplashScreen.cpp"
  107. #include "misc/juce_SystemTrayIconComponent.cpp"
  108. #include "misc/juce_LiveConstantEditor.cpp"
  109. #include "misc/juce_AnimatedAppComponent.cpp"
  110. //==============================================================================
  111. #if JUCE_MAC || JUCE_IOS
  112. #if JUCE_MAC
  113. #include "native/juce_mac_NSViewFrameWatcher.h"
  114. #include "native/juce_mac_NSViewComponent.mm"
  115. #include "native/juce_mac_AppleRemote.mm"
  116. #include "native/juce_mac_SystemTrayIcon.cpp"
  117. #endif
  118. #if JUCE_IOS
  119. #include "native/juce_ios_UIViewComponent.mm"
  120. #endif
  121. #if JUCE_WEB_BROWSER
  122. #include "native/juce_mac_WebBrowserComponent.mm"
  123. #endif
  124. //==============================================================================
  125. #elif JUCE_WINDOWS
  126. #include "native/juce_win32_ActiveXComponent.cpp"
  127. #include "native/juce_win32_HWNDComponent.cpp"
  128. #if JUCE_WEB_BROWSER
  129. #include "native/juce_win32_WebBrowserComponent.cpp"
  130. #endif
  131. #include "native/juce_win32_SystemTrayIcon.cpp"
  132. //==============================================================================
  133. #elif JUCE_LINUX || JUCE_BSD
  134. JUCE_BEGIN_IGNORE_WARNINGS_GCC_LIKE ("-Wzero-as-null-pointer-constant")
  135. #include "native/juce_linux_XEmbedComponent.cpp"
  136. #if JUCE_WEB_BROWSER
  137. #include "native/juce_linux_X11_WebBrowserComponent.cpp"
  138. #endif
  139. JUCE_END_IGNORE_WARNINGS_GCC_LIKE
  140. #include "native/juce_linux_X11_SystemTrayIcon.cpp"
  141. //==============================================================================
  142. #elif JUCE_ANDROID
  143. #include "native/juce_AndroidViewComponent.cpp"
  144. #if JUCE_WEB_BROWSER
  145. #include "native/juce_android_WebBrowserComponent.cpp"
  146. #endif
  147. #endif
  148. //==============================================================================
  149. #if ! JUCE_WINDOWS && JUCE_WEB_BROWSER
  150. juce::WebBrowserComponent::WebBrowserComponent (ConstructWithoutPimpl) {}
  151. juce::WindowsWebView2WebBrowserComponent::WindowsWebView2WebBrowserComponent (bool unloadWhenHidden,
  152. const WebView2Preferences&)
  153. : WebBrowserComponent (unloadWhenHidden) {}
  154. #endif