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.

202 lines
6.6KB

  1. /*
  2. ==============================================================================
  3. This file is part of the JUCE library.
  4. Copyright (c) 2020 - 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 6 End-User License
  8. Agreement and JUCE Privacy Policy (both effective as of the 16th June 2020).
  9. End User License Agreement: www.juce.com/juce-6-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. #if defined (__IPHONE_10_0) && __IPHONE_OS_VERSION_MAX_ALLOWED >= __IPHONE_10_0
  55. #import <UserNotifications/UserNotifications.h>
  56. #endif
  57. #include "native/juce_ios_PushNotifications.cpp"
  58. #endif
  59. //==============================================================================
  60. #elif JUCE_ANDROID
  61. #if JUCE_PUSH_NOTIFICATIONS
  62. #include "native/juce_android_PushNotifications.cpp"
  63. #endif
  64. //==============================================================================
  65. #elif JUCE_WINDOWS
  66. #include <windowsx.h>
  67. #include <vfw.h>
  68. #include <commdlg.h>
  69. #if JUCE_WEB_BROWSER
  70. #include <exdisp.h>
  71. #include <exdispid.h>
  72. #if JUCE_USE_WIN_WEBVIEW2
  73. #include <windows.foundation.h>
  74. #include <windows.foundation.collections.h>
  75. JUCE_BEGIN_IGNORE_WARNINGS_MSVC (4265)
  76. #include <wrl.h>
  77. #include <wrl/wrappers/corewrappers.h>
  78. JUCE_END_IGNORE_WARNINGS_MSVC
  79. #include "WebView2.h"
  80. JUCE_BEGIN_IGNORE_WARNINGS_MSVC (4458)
  81. #include "WebView2EnvironmentOptions.h"
  82. JUCE_END_IGNORE_WARNINGS_MSVC
  83. #endif
  84. #endif
  85. //==============================================================================
  86. #elif JUCE_LINUX && JUCE_WEB_BROWSER
  87. JUCE_BEGIN_IGNORE_WARNINGS_GCC_LIKE ("-Wzero-as-null-pointer-constant", "-Wparentheses")
  88. // If you're missing this header, you need to install the webkit2gtk-4.0 package
  89. #include <gtk/gtk.h>
  90. JUCE_END_IGNORE_WARNINGS_GCC_LIKE
  91. // If you're missing these headers, you need to install the webkit2gtk-4.0 package
  92. #include <gtk/gtkx.h>
  93. #include <glib-unix.h>
  94. #include <webkit2/webkit2.h>
  95. #endif
  96. //==============================================================================
  97. #include "documents/juce_FileBasedDocument.cpp"
  98. #include "code_editor/juce_CodeDocument.cpp"
  99. #include "code_editor/juce_CodeEditorComponent.cpp"
  100. #include "code_editor/juce_CPlusPlusCodeTokeniser.cpp"
  101. #include "code_editor/juce_XMLCodeTokeniser.cpp"
  102. #include "code_editor/juce_LuaCodeTokeniser.cpp"
  103. #include "misc/juce_BubbleMessageComponent.cpp"
  104. #include "misc/juce_ColourSelector.cpp"
  105. #include "misc/juce_KeyMappingEditorComponent.cpp"
  106. #include "misc/juce_PreferencesPanel.cpp"
  107. #include "misc/juce_PushNotifications.cpp"
  108. #include "misc/juce_RecentlyOpenedFilesList.cpp"
  109. #include "misc/juce_SplashScreen.cpp"
  110. #if !JUCE_MAC || MAC_OS_X_VERSION_MIN_REQUIRED > MAC_OS_X_VERSION_10_8
  111. #include "misc/juce_SystemTrayIconComponent.cpp"
  112. #endif
  113. #include "misc/juce_LiveConstantEditor.cpp"
  114. #include "misc/juce_AnimatedAppComponent.cpp"
  115. //==============================================================================
  116. #if JUCE_MAC || JUCE_IOS
  117. #if JUCE_MAC
  118. #include "native/juce_mac_NSViewComponent.mm"
  119. #include "native/juce_mac_AppleRemote.mm"
  120. #if MAC_OS_X_VERSION_MIN_REQUIRED > MAC_OS_X_VERSION_10_8
  121. #include "native/juce_mac_SystemTrayIcon.cpp"
  122. #endif
  123. #endif
  124. #if JUCE_IOS
  125. #include "native/juce_ios_UIViewComponent.mm"
  126. #endif
  127. #if JUCE_WEB_BROWSER
  128. #include "native/juce_mac_WebBrowserComponent.mm"
  129. #endif
  130. //==============================================================================
  131. #elif JUCE_WINDOWS
  132. #include "native/juce_win32_ActiveXComponent.cpp"
  133. #include "native/juce_win32_HWNDComponent.cpp"
  134. #if JUCE_WEB_BROWSER
  135. #include "native/juce_win32_WebBrowserComponent.cpp"
  136. #endif
  137. #include "native/juce_win32_SystemTrayIcon.cpp"
  138. //==============================================================================
  139. #elif JUCE_LINUX
  140. JUCE_BEGIN_IGNORE_WARNINGS_GCC_LIKE ("-Wzero-as-null-pointer-constant")
  141. #include "native/juce_linux_XEmbedComponent.cpp"
  142. #if JUCE_WEB_BROWSER
  143. #include "native/juce_linux_X11_WebBrowserComponent.cpp"
  144. #endif
  145. JUCE_END_IGNORE_WARNINGS_GCC_LIKE
  146. #include "native/juce_linux_X11_SystemTrayIcon.cpp"
  147. //==============================================================================
  148. #elif JUCE_ANDROID
  149. #include "native/juce_AndroidViewComponent.cpp"
  150. #if JUCE_WEB_BROWSER
  151. #include "native/juce_android_WebBrowserComponent.cpp"
  152. #endif
  153. #endif
  154. //==============================================================================
  155. #if ! JUCE_WINDOWS
  156. juce::ScopedDPIAwarenessDisabler::ScopedDPIAwarenessDisabler() { ignoreUnused (previousContext); }
  157. juce::ScopedDPIAwarenessDisabler::~ScopedDPIAwarenessDisabler() {}
  158. #endif