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.

219 lines
6.5KB

  1. /*
  2. ==============================================================================
  3. This file is part of the JUCE 6 technical preview.
  4. Copyright (c) 2017 - ROLI Ltd.
  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. #ifndef JUCE_PUSH_NOTIFICATIONS
  28. #define JUCE_PUSH_NOTIFICATIONS 0
  29. #endif
  30. #include "juce_gui_extra.h"
  31. //==============================================================================
  32. #if JUCE_MAC
  33. #import <WebKit/WebKit.h>
  34. #import <IOKit/IOKitLib.h>
  35. #import <IOKit/IOCFPlugIn.h>
  36. #import <IOKit/hid/IOHIDLib.h>
  37. #import <IOKit/hid/IOHIDKeys.h>
  38. #import <IOKit/pwr_mgt/IOPMLib.h>
  39. #if JUCE_PUSH_NOTIFICATIONS
  40. #import <Foundation/NSUserNotification.h>
  41. #include "native/juce_mac_PushNotifications.cpp"
  42. #endif
  43. //==============================================================================
  44. #elif JUCE_IOS
  45. #if JUCE_PUSH_NOTIFICATIONS
  46. #if defined (__IPHONE_10_0) && __IPHONE_OS_VERSION_MAX_ALLOWED >= __IPHONE_10_0
  47. #import <UserNotifications/UserNotifications.h>
  48. #endif
  49. #include "native/juce_ios_PushNotifications.cpp"
  50. #endif
  51. //==============================================================================
  52. #elif JUCE_ANDROID
  53. #if JUCE_PUSH_NOTIFICATIONS
  54. #include "native/juce_android_PushNotifications.cpp"
  55. #endif
  56. //==============================================================================
  57. #elif JUCE_WINDOWS
  58. #include <windowsx.h>
  59. #include <vfw.h>
  60. #include <commdlg.h>
  61. #if JUCE_WEB_BROWSER
  62. #include <exdisp.h>
  63. #include <exdispid.h>
  64. #endif
  65. //==============================================================================
  66. #elif JUCE_LINUX
  67. #include <X11/Xlib.h>
  68. #include <X11/Xatom.h>
  69. #include <X11/Xutil.h>
  70. #undef SIZEOF
  71. #undef KeyPress
  72. #if JUCE_WEB_BROWSER
  73. #include <unistd.h>
  74. #include <fcntl.h>
  75. #include <sys/wait.h>
  76. #if JUCE_GCC
  77. #pragma GCC diagnostic push
  78. #pragma GCC diagnostic ignored "-Wzero-as-null-pointer-constant"
  79. #if __GNUC__ > 7
  80. #pragma GCC diagnostic ignored "-Wparentheses"
  81. #endif
  82. #endif
  83. #if JUCE_CLANG
  84. #if __has_warning("-Wzero-as-null-pointer-constant")
  85. #pragma clang diagnostic push
  86. #pragma clang diagnostic ignored "-Wzero-as-null-pointer-constant"
  87. #endif
  88. #endif
  89. #include <gtk/gtk.h>
  90. #if JUCE_GCC
  91. #pragma GCC diagnostic pop
  92. #endif
  93. #if JUCE_CLANG
  94. #if __has_warning("-Wzero-as-null-pointer-constant")
  95. #pragma clang diagnostic pop
  96. #endif
  97. #endif
  98. #include <gtk/gtkx.h>
  99. #include <glib-unix.h>
  100. #include <webkit2/webkit2.h>
  101. #endif
  102. #endif
  103. //==============================================================================
  104. #include "documents/juce_FileBasedDocument.cpp"
  105. #include "code_editor/juce_CodeDocument.cpp"
  106. #include "code_editor/juce_CodeEditorComponent.cpp"
  107. #include "code_editor/juce_CPlusPlusCodeTokeniser.cpp"
  108. #include "code_editor/juce_XMLCodeTokeniser.cpp"
  109. #include "code_editor/juce_LuaCodeTokeniser.cpp"
  110. #include "misc/juce_BubbleMessageComponent.cpp"
  111. #include "misc/juce_ColourSelector.cpp"
  112. #include "misc/juce_KeyMappingEditorComponent.cpp"
  113. #include "misc/juce_PreferencesPanel.cpp"
  114. #include "misc/juce_PushNotifications.cpp"
  115. #include "misc/juce_RecentlyOpenedFilesList.cpp"
  116. #include "misc/juce_SplashScreen.cpp"
  117. #include "misc/juce_SystemTrayIconComponent.cpp"
  118. #include "misc/juce_LiveConstantEditor.cpp"
  119. #include "misc/juce_AnimatedAppComponent.cpp"
  120. //==============================================================================
  121. #if JUCE_MAC || JUCE_IOS
  122. #if JUCE_CLANG
  123. #pragma clang diagnostic push
  124. #pragma clang diagnostic ignored "-Wundeclared-selector"
  125. #endif
  126. #if JUCE_MAC
  127. #include "native/juce_mac_NSViewComponent.mm"
  128. #include "native/juce_mac_AppleRemote.mm"
  129. #include "native/juce_mac_SystemTrayIcon.cpp"
  130. #endif
  131. #if JUCE_IOS
  132. #include "native/juce_ios_UIViewComponent.mm"
  133. #endif
  134. #if JUCE_WEB_BROWSER
  135. #include "native/juce_mac_WebBrowserComponent.mm"
  136. #endif
  137. #if JUCE_CLANG
  138. #pragma clang diagnostic pop
  139. #endif
  140. //==============================================================================
  141. #elif JUCE_WINDOWS
  142. #include "native/juce_win32_ActiveXComponent.cpp"
  143. #if JUCE_WEB_BROWSER
  144. #include "native/juce_win32_WebBrowserComponent.cpp"
  145. #endif
  146. #include "native/juce_win32_SystemTrayIcon.cpp"
  147. //==============================================================================
  148. #elif JUCE_LINUX
  149. #if JUCE_GCC
  150. #pragma GCC diagnostic push
  151. #pragma GCC diagnostic ignored "-Wzero-as-null-pointer-constant"
  152. #endif
  153. #include "native/juce_linux_XEmbedComponent.cpp"
  154. #if JUCE_WEB_BROWSER
  155. #include "native/juce_linux_X11_WebBrowserComponent.cpp"
  156. #endif
  157. #if JUCE_GCC
  158. #pragma GCC diagnostic pop
  159. #endif
  160. #include "native/juce_linux_X11_SystemTrayIcon.cpp"
  161. //==============================================================================
  162. #elif JUCE_ANDROID
  163. #include "native/juce_AndroidViewComponent.cpp"
  164. #if JUCE_WEB_BROWSER
  165. #include "native/juce_android_WebBrowserComponent.cpp"
  166. #endif
  167. #endif
  168. #if JUCE_WEB_BROWSER
  169. namespace juce
  170. {
  171. bool WebBrowserComponent::pageAboutToLoad (const String&) { return true; }
  172. void WebBrowserComponent::pageFinishedLoading (const String&) {}
  173. bool WebBrowserComponent::pageLoadHadNetworkError (const String&) { return true; }
  174. void WebBrowserComponent::windowCloseRequest() {}
  175. void WebBrowserComponent::newWindowAttemptingToLoad (const String&) {}
  176. }
  177. #endif