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.1KB

  1. /*
  2. ==============================================================================
  3. This file is part of the JUCE 6 technical preview.
  4. Copyright (c) 2020 - 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 this technical preview, this file is not subject to commercial licensing.
  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. #ifdef JUCE_GUI_EXTRA_H_INCLUDED
  14. /* When you add this cpp file to your project, you mustn't include it in a file where you've
  15. already included any other headers - just put it inside a file on its own, possibly with your config
  16. flags preceding it, but don't include anything else. That also includes avoiding any automatic prefix
  17. header files that the compiler may be using.
  18. */
  19. #error "Incorrect use of JUCE cpp file"
  20. #endif
  21. #define JUCE_CORE_INCLUDE_OBJC_HELPERS 1
  22. #define JUCE_CORE_INCLUDE_COM_SMART_PTR 1
  23. #define JUCE_CORE_INCLUDE_JNI_HELPERS 1
  24. #define JUCE_CORE_INCLUDE_NATIVE_HEADERS 1
  25. #define JUCE_EVENTS_INCLUDE_WIN32_MESSAGE_WINDOW 1
  26. #define JUCE_GRAPHICS_INCLUDE_COREGRAPHICS_HELPERS 1
  27. #define JUCE_GUI_BASICS_INCLUDE_XHEADERS 1
  28. #if JUCE_USE_WIN_WEBVIEW2
  29. #define JUCE_EVENTS_INCLUDE_WINRT_WRAPPER 1
  30. #endif
  31. #ifndef JUCE_PUSH_NOTIFICATIONS
  32. #define JUCE_PUSH_NOTIFICATIONS 0
  33. #endif
  34. #include "juce_gui_extra.h"
  35. //==============================================================================
  36. #if JUCE_MAC
  37. #import <WebKit/WebKit.h>
  38. #import <IOKit/IOKitLib.h>
  39. #import <IOKit/IOCFPlugIn.h>
  40. #import <IOKit/hid/IOHIDLib.h>
  41. #import <IOKit/hid/IOHIDKeys.h>
  42. #import <IOKit/pwr_mgt/IOPMLib.h>
  43. #if JUCE_PUSH_NOTIFICATIONS
  44. #import <Foundation/NSUserNotification.h>
  45. #include "native/juce_mac_PushNotifications.cpp"
  46. #endif
  47. //==============================================================================
  48. #elif JUCE_IOS
  49. #import <WebKit/WebKit.h>
  50. #if JUCE_PUSH_NOTIFICATIONS
  51. #if defined (__IPHONE_10_0) && __IPHONE_OS_VERSION_MAX_ALLOWED >= __IPHONE_10_0
  52. #import <UserNotifications/UserNotifications.h>
  53. #endif
  54. #include "native/juce_ios_PushNotifications.cpp"
  55. #endif
  56. //==============================================================================
  57. #elif JUCE_ANDROID
  58. #if JUCE_PUSH_NOTIFICATIONS
  59. #include "native/juce_android_PushNotifications.cpp"
  60. #endif
  61. //==============================================================================
  62. #elif JUCE_WINDOWS
  63. #include <windowsx.h>
  64. #include <vfw.h>
  65. #include <commdlg.h>
  66. #if JUCE_WEB_BROWSER
  67. #include <exdisp.h>
  68. #include <exdispid.h>
  69. #if JUCE_USE_WIN_WEBVIEW2
  70. #include <windows.foundation.h>
  71. #include <windows.foundation.collections.h>
  72. #pragma warning (push)
  73. #pragma warning (disable: 4265)
  74. #include <wrl.h>
  75. #include <wrl/wrappers/corewrappers.h>
  76. #pragma warning (pop)
  77. #include "WebView2.h"
  78. #pragma warning (push)
  79. #pragma warning (disable: 4458)
  80. #include "WebView2EnvironmentOptions.h"
  81. #pragma warning (pop)
  82. #endif
  83. #endif
  84. //==============================================================================
  85. #elif JUCE_LINUX && JUCE_WEB_BROWSER
  86. JUCE_BEGIN_IGNORE_WARNINGS_GCC_LIKE ("-Wzero-as-null-pointer-constant", "-Wparentheses")
  87. // If you're missing this header, you need to install the webkit2gtk-4.0 package
  88. #include <gtk/gtk.h>
  89. JUCE_END_IGNORE_WARNINGS_GCC_LIKE
  90. // If you're missing these headers, you need to install the webkit2gtk-4.0 package
  91. #include <gtk/gtkx.h>
  92. #include <glib-unix.h>
  93. #include <webkit2/webkit2.h>
  94. #endif
  95. //==============================================================================
  96. #include "documents/juce_FileBasedDocument.cpp"
  97. #include "code_editor/juce_CodeDocument.cpp"
  98. #include "code_editor/juce_CodeEditorComponent.cpp"
  99. #include "code_editor/juce_CPlusPlusCodeTokeniser.cpp"
  100. #include "code_editor/juce_XMLCodeTokeniser.cpp"
  101. #include "code_editor/juce_LuaCodeTokeniser.cpp"
  102. #include "misc/juce_BubbleMessageComponent.cpp"
  103. #include "misc/juce_ColourSelector.cpp"
  104. #include "misc/juce_KeyMappingEditorComponent.cpp"
  105. #include "misc/juce_PreferencesPanel.cpp"
  106. #include "misc/juce_PushNotifications.cpp"
  107. #include "misc/juce_RecentlyOpenedFilesList.cpp"
  108. #include "misc/juce_SplashScreen.cpp"
  109. #include "misc/juce_SystemTrayIconComponent.cpp"
  110. #include "misc/juce_LiveConstantEditor.cpp"
  111. #include "misc/juce_AnimatedAppComponent.cpp"
  112. //==============================================================================
  113. #if JUCE_MAC || JUCE_IOS
  114. JUCE_BEGIN_IGNORE_WARNINGS_GCC_LIKE ("-Wundeclared-selector")
  115. #if JUCE_MAC
  116. #include "native/juce_mac_NSViewComponent.mm"
  117. #include "native/juce_mac_AppleRemote.mm"
  118. #include "native/juce_mac_SystemTrayIcon.cpp"
  119. #endif
  120. #if JUCE_IOS
  121. #include "native/juce_ios_UIViewComponent.mm"
  122. #endif
  123. #if JUCE_WEB_BROWSER
  124. #include "native/juce_mac_WebBrowserComponent.mm"
  125. #endif
  126. JUCE_END_IGNORE_WARNINGS_GCC_LIKE
  127. //==============================================================================
  128. #elif JUCE_WINDOWS
  129. #include "native/juce_win32_ActiveXComponent.cpp"
  130. #include "native/juce_win32_HWNDComponent.cpp"
  131. #if JUCE_WEB_BROWSER
  132. #include "native/juce_win32_WebBrowserComponent.cpp"
  133. #endif
  134. #include "native/juce_win32_SystemTrayIcon.cpp"
  135. //==============================================================================
  136. #elif JUCE_LINUX
  137. JUCE_BEGIN_IGNORE_WARNINGS_GCC_LIKE ("-Wzero-as-null-pointer-constant")
  138. #include "native/juce_linux_XEmbedComponent.cpp"
  139. #if JUCE_WEB_BROWSER
  140. #include "native/juce_linux_X11_WebBrowserComponent.cpp"
  141. #endif
  142. JUCE_END_IGNORE_WARNINGS_GCC_LIKE
  143. #include "native/juce_linux_X11_SystemTrayIcon.cpp"
  144. //==============================================================================
  145. #elif JUCE_ANDROID
  146. #include "native/juce_AndroidViewComponent.cpp"
  147. #if JUCE_WEB_BROWSER
  148. #include "native/juce_android_WebBrowserComponent.cpp"
  149. #endif
  150. #endif