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.

194 lines
6.3KB

  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. JUCE_BEGIN_IGNORE_WARNINGS_MSVC (4265)
  78. #include <wrl.h>
  79. #include <wrl/wrappers/corewrappers.h>
  80. JUCE_END_IGNORE_WARNINGS_MSVC
  81. #include "WebView2.h"
  82. JUCE_BEGIN_IGNORE_WARNINGS_MSVC (4458)
  83. #include "WebView2EnvironmentOptions.h"
  84. JUCE_END_IGNORE_WARNINGS_MSVC
  85. #endif
  86. #endif
  87. //==============================================================================
  88. #elif (JUCE_LINUX || JUCE_BSD) && JUCE_WEB_BROWSER
  89. JUCE_BEGIN_IGNORE_WARNINGS_GCC_LIKE ("-Wzero-as-null-pointer-constant", "-Wparentheses", "-Wdeprecated-declarations")
  90. // If you're missing this header, you need to install the webkit2gtk-4.0 package
  91. #include <gtk/gtk.h>
  92. #include <gtk/gtkx.h>
  93. #include <glib-unix.h>
  94. #include <webkit2/webkit2.h>
  95. JUCE_END_IGNORE_WARNINGS_GCC_LIKE
  96. #endif
  97. //==============================================================================
  98. #include "documents/juce_FileBasedDocument.cpp"
  99. #include "code_editor/juce_CodeDocument.cpp"
  100. #include "code_editor/juce_CodeEditorComponent.cpp"
  101. #include "code_editor/juce_CPlusPlusCodeTokeniser.cpp"
  102. #include "code_editor/juce_XMLCodeTokeniser.cpp"
  103. #include "code_editor/juce_LuaCodeTokeniser.cpp"
  104. #include "misc/juce_BubbleMessageComponent.cpp"
  105. #include "misc/juce_ColourSelector.cpp"
  106. #include "misc/juce_KeyMappingEditorComponent.cpp"
  107. #include "misc/juce_PreferencesPanel.cpp"
  108. #include "misc/juce_PushNotifications.cpp"
  109. #include "misc/juce_RecentlyOpenedFilesList.cpp"
  110. #include "misc/juce_SplashScreen.cpp"
  111. #include "misc/juce_SystemTrayIconComponent.cpp"
  112. #include "misc/juce_LiveConstantEditor.cpp"
  113. #include "misc/juce_AnimatedAppComponent.cpp"
  114. #include "misc/juce_WebBrowserComponent.cpp"
  115. //==============================================================================
  116. #if JUCE_MAC || JUCE_IOS
  117. #if JUCE_MAC
  118. #include "native/juce_NSViewFrameWatcher_mac.h"
  119. #include "native/juce_NSViewComponent_mac.mm"
  120. #include "native/juce_AppleRemote_mac.mm"
  121. #include "native/juce_SystemTrayIcon_mac.cpp"
  122. #endif
  123. #if JUCE_IOS
  124. #include "native/juce_UIViewComponent_ios.mm"
  125. #endif
  126. #if JUCE_WEB_BROWSER
  127. #include "native/juce_WebBrowserComponent_mac.mm"
  128. #endif
  129. //==============================================================================
  130. #elif JUCE_WINDOWS
  131. #include "native/juce_ActiveXComponent_windows.cpp"
  132. #include "native/juce_HWNDComponent_windows.cpp"
  133. #if JUCE_WEB_BROWSER
  134. #include "native/juce_WebBrowserComponent_windows.cpp"
  135. #endif
  136. #include "native/juce_SystemTrayIcon_windows.cpp"
  137. //==============================================================================
  138. #elif JUCE_LINUX || JUCE_BSD
  139. JUCE_BEGIN_IGNORE_WARNINGS_GCC_LIKE ("-Wzero-as-null-pointer-constant")
  140. #include <juce_gui_basics/native/juce_ScopedWindowAssociation_linux.h>
  141. #include "native/juce_XEmbedComponent_linux.cpp"
  142. #if JUCE_WEB_BROWSER
  143. #include "native/juce_WebBrowserComponent_linux.cpp"
  144. #endif
  145. JUCE_END_IGNORE_WARNINGS_GCC_LIKE
  146. #include "native/juce_SystemTrayIcon_linux.cpp"
  147. //==============================================================================
  148. #elif JUCE_ANDROID
  149. #include "native/juce_AndroidViewComponent.cpp"
  150. #if JUCE_WEB_BROWSER
  151. #include "native/juce_WebBrowserComponent_android.cpp"
  152. #endif
  153. #endif