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_basics.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_BASICS_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 NS_FORMAT_FUNCTION(F,A) // To avoid spurious warnings from GCC
36
37#define JUCE_CORE_INCLUDE_OBJC_HELPERS 1
38#define JUCE_CORE_INCLUDE_COM_SMART_PTR 1
39#define JUCE_CORE_INCLUDE_JNI_HELPERS 1
40#define JUCE_CORE_INCLUDE_NATIVE_HEADERS 1
41#define JUCE_EVENTS_INCLUDE_WIN32_MESSAGE_WINDOW 1
42#define JUCE_GRAPHICS_INCLUDE_COREGRAPHICS_HELPERS 1
43#define JUCE_GUI_BASICS_INCLUDE_XHEADERS 1
44#define JUCE_GUI_BASICS_INCLUDE_SCOPED_THREAD_DPI_AWARENESS_SETTER 1
45
46#include "juce_gui_basics.h"
47
48#include <cctype>
49
50//==============================================================================
51#if JUCE_MAC
52 #import <IOKit/pwr_mgt/IOPMLib.h>
53 #import <MetalKit/MetalKit.h>
54
55#elif JUCE_IOS
56 #if JUCE_PUSH_NOTIFICATIONS
57 #import <UserNotifications/UserNotifications.h>
58 #endif
59
60 #import <MetalKit/MetalKit.h>
61 #import <UIKit/UIActivityViewController.h>
62
63//==============================================================================
64#elif JUCE_WINDOWS
65 #include <windowsx.h>
66 #include <vfw.h>
67 #include <commdlg.h>
68 #include <commctrl.h>
69 #include <sapi.h>
70 #include <dxgi.h>
71
72 #if JUCE_MINGW
73 // Some MinGW headers use 'new' as a parameter name
74 JUCE_BEGIN_IGNORE_WARNINGS_GCC_LIKE ("-Wkeyword-macro")
75 #define new new_
76 JUCE_END_IGNORE_WARNINGS_GCC_LIKE
77 #endif
78
79 #include <uiautomation.h>
80
81 #undef new
82
83 #if JUCE_WEB_BROWSER
84 #include <exdisp.h>
85 #include <exdispid.h>
86 #endif
87
88 #if JUCE_MINGW
89 #include <imm.h>
90 #elif ! JUCE_DONT_AUTOLINK_TO_WIN32_LIBRARIES
91 #pragma comment(lib, "vfw32.lib")
92 #pragma comment(lib, "imm32.lib")
93 #pragma comment(lib, "comctl32.lib")
94 #pragma comment(lib, "dxgi.lib")
95
96 #if JUCE_OPENGL
97 #pragma comment(lib, "OpenGL32.Lib")
98 #pragma comment(lib, "GlU32.Lib")
99 #endif
100
101 #if JUCE_DIRECT2D
102 #pragma comment (lib, "Dwrite.lib")
103 #pragma comment (lib, "D2d1.lib")
104 #endif
105 #endif
106#endif
107
108//==============================================================================
129
130//==============================================================================
131#if JUCE_IOS || JUCE_WINDOWS
132 #include "native/juce_MultiTouchMapper.h"
133#endif
134
135#if JUCE_ANDROID || JUCE_WINDOWS || JUCE_IOS || JUCE_UNIT_TESTS
136 #include "native/accessibility/juce_AccessibilityTextHelpers.h"
137#endif
138
139#if JUCE_MAC || JUCE_IOS
140 #include "native/accessibility/juce_AccessibilitySharedCode_mac.mm"
141 #include "native/juce_CGMetalLayerRenderer_mac.h"
142
143 #if JUCE_IOS
144 #include "native/juce_UIViewComponentPeer_ios.mm"
145 #include "native/accessibility/juce_Accessibility_ios.mm"
146 #include "native/juce_WindowUtils_ios.mm"
147 #include "native/juce_Windowing_ios.mm"
148 #include "native/juce_NativeMessageBox_ios.mm"
149 #include "native/juce_NativeModalWrapperComponent_ios.h"
150 #include "native/juce_FileChooser_ios.mm"
151
152 #if JUCE_CONTENT_SHARING
153 #include "native/juce_ContentSharer_ios.cpp"
154 #endif
155
156 #else
157 #include "native/accessibility/juce_Accessibility_mac.mm"
158 #include "native/juce_PerScreenDisplayLinks_mac.h"
159 #include "native/juce_NSViewComponentPeer_mac.mm"
160 #include "native/juce_WindowUtils_mac.mm"
161 #include "native/juce_Windowing_mac.mm"
162 #include "native/juce_NativeMessageBox_mac.mm"
163 #include "native/juce_MainMenu_mac.mm"
164 #include "native/juce_FileChooser_mac.mm"
165 #endif
166
167 #include "native/juce_MouseCursor_mac.mm"
168
169#elif JUCE_WINDOWS
170 #if JUCE_MODULE_AVAILABLE_juce_audio_plugin_client
171 #include <juce_audio_plugin_client/AAX/juce_AAX_Modifier_Injector.h>
172 #endif
173 #include "native/accessibility/juce_ComInterfaces_windows.h"
174 #include "native/accessibility/juce_WindowsUIAWrapper_windows.h"
175 #include "native/accessibility/juce_AccessibilityElement_windows.h"
176 #include "native/accessibility/juce_UIAHelpers_windows.h"
177 #include "native/accessibility/juce_UIAProviders_windows.h"
178 #include "native/accessibility/juce_AccessibilityElement_windows.cpp"
179 #include "native/accessibility/juce_Accessibility_windows.cpp"
180 #include "native/juce_WindowsHooks_windows.h"
181 #include "native/juce_WindowUtils_windows.cpp"
182 #include "native/juce_Windowing_windows.cpp"
183 #include "native/juce_WindowsHooks_windows.cpp"
184 #include "native/juce_NativeMessageBox_windows.cpp"
185 #include "native/juce_DragAndDrop_windows.cpp"
186 #include "native/juce_FileChooser_windows.cpp"
187
188#elif JUCE_LINUX || JUCE_BSD
191
192 JUCE_BEGIN_IGNORE_WARNINGS_GCC_LIKE ("-Wzero-as-null-pointer-constant")
193
194 #include "native/juce_ScopedWindowAssociation_linux.h"
199
200 JUCE_END_IGNORE_WARNINGS_GCC_LIKE
201
203
204#elif JUCE_ANDROID
205
207 #include "native/accessibility/juce_Accessibility_android.cpp"
208 #include "native/juce_WindowUtils_android.cpp"
209 #include "native/juce_Windowing_android.cpp"
210 #include "native/juce_NativeMessageBox_android.cpp"
211 #include "native/juce_FileChooser_android.cpp"
212
213 #if JUCE_CONTENT_SHARING
214 #include "native/juce_ContentSharer_android.cpp"
215 #endif
216
217#endif
218
219//==============================================================================
220// Depends on types defined in platform-specific windowing files
222
223#if JUCE_UNIT_TESTS
224 #include "native/accessibility/juce_AccessibilityTextHelpers_test.cpp"
225#endif
226
227//==============================================================================
282#include "layout/juce_Grid.cpp"
334#include "widgets/juce_Label.cpp"