JUCE-7.0.12-0-g4f43011b96 JUCE-7.0.12-0-g4f43011b96
JUCE — C++ application framework with suport for VST, VST3, LV2 audio plug-ins

« « « Anklang Documentation
Loading...
Searching...
No Matches
juce_gui_extra.cpp
Go to the documentation of this file.
1 /*
2 ==============================================================================
3
4 This file is part of the JUCE library.
5 Copyright (c) 2022 - Raw Material Software Limited
6
7 JUCE is an open source library subject to commercial or open-source
8 licensing.
9
10 By using JUCE, you agree to the terms of both the JUCE 7 End-User License
11 Agreement and JUCE Privacy Policy.
12
13 End User License Agreement: www.juce.com/juce-7-licence
14 Privacy Policy: www.juce.com/juce-privacy-policy
15
16 Or: You may also use this code under the terms of the GPL v3 (see
17 www.gnu.org/licenses).
18
19 JUCE IS PROVIDED "AS IS" WITHOUT ANY WARRANTY, AND ALL WARRANTIES, WHETHER
20 EXPRESSED OR IMPLIED, INCLUDING MERCHANTABILITY AND FITNESS FOR PURPOSE, ARE
21 DISCLAIMED.
22
23 ==============================================================================
24*/
25
26#ifdef JUCE_GUI_EXTRA_H_INCLUDED
27 /* When you add this cpp file to your project, you mustn't include it in a file where you've
28 already included any other headers - just put it inside a file on its own, possibly with your config
29 flags preceding it, but don't include anything else. That also includes avoiding any automatic prefix
30 header files that the compiler may be using.
31 */
32 #error "Incorrect use of JUCE cpp file"
33#endif
34
35#define JUCE_CORE_INCLUDE_OBJC_HELPERS 1
36#define JUCE_CORE_INCLUDE_COM_SMART_PTR 1
37#define JUCE_CORE_INCLUDE_JNI_HELPERS 1
38#define JUCE_CORE_INCLUDE_NATIVE_HEADERS 1
39#define JUCE_EVENTS_INCLUDE_WIN32_MESSAGE_WINDOW 1
40#define JUCE_GRAPHICS_INCLUDE_COREGRAPHICS_HELPERS 1
41#define JUCE_GUI_BASICS_INCLUDE_XHEADERS 1
42#define JUCE_GUI_BASICS_INCLUDE_SCOPED_THREAD_DPI_AWARENESS_SETTER 1
43
44#ifndef JUCE_PUSH_NOTIFICATIONS
45 #define JUCE_PUSH_NOTIFICATIONS 0
46#endif
47
48#include "juce_gui_extra.h"
49
50//==============================================================================
51#if JUCE_MAC
52 #if JUCE_WEB_BROWSER
53 #import <WebKit/WebKit.h>
54 #endif
55 #import <IOKit/IOKitLib.h>
56 #import <IOKit/IOCFPlugIn.h>
57 #import <IOKit/hid/IOHIDLib.h>
58 #import <IOKit/hid/IOHIDKeys.h>
59 #import <IOKit/pwr_mgt/IOPMLib.h>
60
61 #if JUCE_PUSH_NOTIFICATIONS
62 #import <Foundation/NSUserNotification.h>
63
64 #include "native/juce_PushNotifications_mac.cpp"
65 #endif
66
67//==============================================================================
68#elif JUCE_IOS
69 #if JUCE_WEB_BROWSER
70 #import <WebKit/WebKit.h>
71 #endif
72
73 #if JUCE_PUSH_NOTIFICATIONS
74 #import <UserNotifications/UserNotifications.h>
75 #include "native/juce_PushNotifications_ios.cpp"
76 #endif
77
78//==============================================================================
79#elif JUCE_ANDROID
80 #if JUCE_PUSH_NOTIFICATIONS
81 #include "native/juce_PushNotifications_android.cpp"
82 #endif
83
84//==============================================================================
85#elif JUCE_WINDOWS
86 #include <windowsx.h>
87 #include <vfw.h>
88 #include <commdlg.h>
89
90 #if JUCE_WEB_BROWSER
91 #include <exdisp.h>
92 #include <exdispid.h>
93
94 #if JUCE_USE_WIN_WEBVIEW2
95 #include <windows.foundation.h>
96 #include <windows.foundation.collections.h>
97 #include <winuser.h>
98
99 JUCE_BEGIN_IGNORE_WARNINGS_MSVC (4265)
100 #include <wrl.h>
101 #include <wrl/wrappers/corewrappers.h>
102 JUCE_END_IGNORE_WARNINGS_MSVC
103
104 #include "WebView2.h"
105
106 JUCE_BEGIN_IGNORE_WARNINGS_MSVC (4458)
107 #include "WebView2EnvironmentOptions.h"
108 JUCE_END_IGNORE_WARNINGS_MSVC
109 #endif
110
111 #endif
112
113//==============================================================================
114#elif (JUCE_LINUX || JUCE_BSD) && JUCE_WEB_BROWSER
115 JUCE_BEGIN_IGNORE_WARNINGS_GCC_LIKE ("-Wzero-as-null-pointer-constant", "-Wparentheses", "-Wdeprecated-declarations")
116
117 // If you're missing this header, you need to install the webkit2gtk-4.0 package
118 #include <gtk/gtk.h>
119 #include <gtk/gtkx.h>
120 #include <glib-unix.h>
121 #include <webkit2/webkit2.h>
122
123 JUCE_END_IGNORE_WARNINGS_GCC_LIKE
124#endif
125
126//==============================================================================
143
144//==============================================================================
145#if JUCE_MAC || JUCE_IOS
146
147 #if JUCE_MAC
148 #include "native/juce_NSViewFrameWatcher_mac.h"
149 #include "native/juce_NSViewComponent_mac.mm"
150 #include "native/juce_AppleRemote_mac.mm"
151 #include "native/juce_SystemTrayIcon_mac.cpp"
152 #endif
153
154 #if JUCE_IOS
155 #include "native/juce_UIViewComponent_ios.mm"
156 #endif
157
158 #if JUCE_WEB_BROWSER
159 #include "native/juce_WebBrowserComponent_mac.mm"
160 #endif
161
162//==============================================================================
163#elif JUCE_WINDOWS
164 #include "native/juce_ActiveXComponent_windows.cpp"
165 #include "native/juce_HWNDComponent_windows.cpp"
166 #if JUCE_WEB_BROWSER
167 #include "native/juce_WebBrowserComponent_windows.cpp"
168 #endif
169 #include "native/juce_SystemTrayIcon_windows.cpp"
170
171//==============================================================================
172#elif JUCE_LINUX || JUCE_BSD
173 JUCE_BEGIN_IGNORE_WARNINGS_GCC_LIKE ("-Wzero-as-null-pointer-constant")
174
175 #include <juce_gui_basics/native/juce_ScopedWindowAssociation_linux.h>
177
178 #if JUCE_WEB_BROWSER
179 #if JUCE_USE_EXTERNAL_TEMPORARY_SUBPROCESS
180 #include "juce_LinuxSubprocessHelperBinaryData.h"
181 #endif
182
183 #include "native/juce_WebBrowserComponent_linux.cpp"
184 #endif
185
186 JUCE_END_IGNORE_WARNINGS_GCC_LIKE
187
189
190//==============================================================================
191#elif JUCE_ANDROID
192 #include "native/juce_AndroidViewComponent.cpp"
193
194 #if JUCE_WEB_BROWSER
195 #include "native/juce_WebBrowserComponent_android.cpp"
196 #endif
197#endif
198
199//==============================================================================