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.

156 lines
4.9KB

  1. /*
  2. ==============================================================================
  3. This file is part of the JUCE library.
  4. Copyright (c) 2015 - ROLI Ltd.
  5. Permission is granted to use this software under the terms of either:
  6. a) the GPL v2 (or any later version)
  7. b) the Affero GPL v3
  8. Details of these licenses can be found at: www.gnu.org/licenses
  9. JUCE is distributed in the hope that it will be useful, but WITHOUT ANY
  10. WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
  11. A PARTICULAR PURPOSE. See the GNU General Public License for more details.
  12. ------------------------------------------------------------------------------
  13. To release a closed-source product which uses JUCE, commercial licenses are
  14. available: visit www.juce.com for more information.
  15. ==============================================================================
  16. */
  17. #ifdef JUCE_GUI_EXTRA_H_INCLUDED
  18. /* When you add this cpp file to your project, you mustn't include it in a file where you've
  19. already included any other headers - just put it inside a file on its own, possibly with your config
  20. flags preceding it, but don't include anything else. That also includes avoiding any automatic prefix
  21. header files that the compiler may be using.
  22. */
  23. #error "Incorrect use of JUCE cpp file"
  24. #endif
  25. #define JUCE_CORE_INCLUDE_OBJC_HELPERS 1
  26. #define JUCE_CORE_INCLUDE_COM_SMART_PTR 1
  27. #define JUCE_CORE_INCLUDE_NATIVE_HEADERS 1
  28. #define JUCE_EVENTS_INCLUDE_WIN32_MESSAGE_WINDOW 1
  29. #define JUCE_GRAPHICS_INCLUDE_COREGRAPHICS_HELPERS 1
  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. #elif JUCE_IOS
  40. //==============================================================================
  41. #elif JUCE_WINDOWS
  42. #include <windowsx.h>
  43. #include <vfw.h>
  44. #include <commdlg.h>
  45. #if JUCE_WEB_BROWSER
  46. #include <exdisp.h>
  47. #include <exdispid.h>
  48. #endif
  49. //==============================================================================
  50. #elif JUCE_LINUX
  51. #include <X11/Xlib.h>
  52. #include <X11/Xatom.h>
  53. #include <X11/Xutil.h>
  54. #undef SIZEOF
  55. #undef KeyPress
  56. #if JUCE_WEB_BROWSER
  57. #include <unistd.h>
  58. #include <fcntl.h>
  59. #include <sys/wait.h>
  60. #include <gtk/gtk.h>
  61. #include <gtk/gtkx.h>
  62. #include <glib-unix.h>
  63. #include <webkit2/webkit2.h>
  64. #endif
  65. #endif
  66. //==============================================================================
  67. namespace juce
  68. {
  69. #include "documents/juce_FileBasedDocument.cpp"
  70. #include "code_editor/juce_CodeDocument.cpp"
  71. #include "code_editor/juce_CodeEditorComponent.cpp"
  72. #include "code_editor/juce_CPlusPlusCodeTokeniser.cpp"
  73. #include "code_editor/juce_XMLCodeTokeniser.cpp"
  74. #include "code_editor/juce_LuaCodeTokeniser.cpp"
  75. #include "misc/juce_BubbleMessageComponent.cpp"
  76. #include "misc/juce_ColourSelector.cpp"
  77. #include "misc/juce_KeyMappingEditorComponent.cpp"
  78. #include "misc/juce_PreferencesPanel.cpp"
  79. #include "misc/juce_RecentlyOpenedFilesList.cpp"
  80. #include "misc/juce_SplashScreen.cpp"
  81. #include "misc/juce_SystemTrayIconComponent.cpp"
  82. #include "misc/juce_LiveConstantEditor.cpp"
  83. #include "misc/juce_AnimatedAppComponent.cpp"
  84. }
  85. using namespace juce;
  86. namespace juce
  87. {
  88. //==============================================================================
  89. #if JUCE_MAC || JUCE_IOS
  90. #if JUCE_MAC
  91. #include "native/juce_mac_NSViewComponent.mm"
  92. #include "native/juce_mac_AppleRemote.mm"
  93. #include "native/juce_mac_SystemTrayIcon.cpp"
  94. #endif
  95. #if JUCE_IOS
  96. #include "native/juce_ios_UIViewComponent.mm"
  97. #endif
  98. #if JUCE_WEB_BROWSER
  99. #include "native/juce_mac_WebBrowserComponent.mm"
  100. #endif
  101. //==============================================================================
  102. #elif JUCE_WINDOWS
  103. #include "native/juce_win32_ActiveXComponent.cpp"
  104. #if JUCE_WEB_BROWSER
  105. #include "native/juce_win32_WebBrowserComponent.cpp"
  106. #endif
  107. #include "native/juce_win32_SystemTrayIcon.cpp"
  108. //==============================================================================
  109. #elif JUCE_LINUX
  110. #include "native/juce_linux_XEmbedComponent.cpp"
  111. #if JUCE_WEB_BROWSER
  112. #include "native/juce_linux_X11_WebBrowserComponent.cpp"
  113. #endif
  114. #include "native/juce_linux_X11_SystemTrayIcon.cpp"
  115. //==============================================================================
  116. #elif JUCE_ANDROID
  117. #if JUCE_WEB_BROWSER
  118. #include "native/juce_android_WebBrowserComponent.cpp"
  119. #endif
  120. #endif
  121. #if JUCE_WEB_BROWSER
  122. bool WebBrowserComponent::pageAboutToLoad (const String&) { return true; }
  123. void WebBrowserComponent::pageFinishedLoading (const String&) {}
  124. void WebBrowserComponent::windowCloseRequest() {}
  125. void WebBrowserComponent::newWindowAttemptingToLoad (const String&) {}
  126. #endif
  127. }