VST3: fetch midi mappings all at once, use it for note/sound-off
[carla.git] / source / modules / juce_graphics / juce_graphics.cpp
blobd852554be1b40c951d11a438f698b687d318bfac
1 /*
2 ==============================================================================
4 This file is part of the JUCE library.
5 Copyright (c) 2022 - Raw Material Software Limited
7 JUCE is an open source library subject to commercial or open-source
8 licensing.
10 By using JUCE, you agree to the terms of both the JUCE 7 End-User License
11 Agreement and JUCE Privacy Policy.
13 End User License Agreement: www.juce.com/juce-7-licence
14 Privacy Policy: www.juce.com/juce-privacy-policy
16 Or: You may also use this code under the terms of the GPL v3 (see
17 www.gnu.org/licenses).
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.
23 ==============================================================================
26 #ifdef JUCE_GRAPHICS_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.
32 #error "Incorrect use of JUCE cpp file"
33 #endif
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_GRAPHICS_INCLUDE_COREGRAPHICS_HELPERS 1
41 #include "juce_graphics.h"
43 //==============================================================================
44 #if JUCE_MAC
45 #import <QuartzCore/QuartzCore.h>
47 #elif JUCE_WINDOWS
48 // get rid of some warnings in Window's own headers
49 JUCE_BEGIN_IGNORE_WARNINGS_MSVC (4458)
51 #if JUCE_MINGW && JUCE_USE_DIRECTWRITE
52 #warning "DirectWrite not currently implemented with mingw..."
53 #undef JUCE_USE_DIRECTWRITE
54 #endif
56 #if JUCE_USE_DIRECTWRITE || JUCE_DIRECT2D
57 /* This is a workaround for broken-by-default function definitions
58 in the MinGW headers. If you're using a newer distribution of MinGW,
59 then your headers may substitute the broken definitions with working definitions
60 when this flag is enabled. Unfortunately, not all MinGW headers contain this
61 workaround, so Direct2D remains disabled by default when building with MinGW.
63 #define WIDL_EXPLICIT_AGGREGATE_RETURNS 1
65 /* If you hit a compile error trying to include these files, you may need to update
66 your version of the Windows SDK to the latest one. The DirectWrite and Direct2D
67 headers are in the version 7 SDKs.
69 #include <d2d1.h>
70 #include <dwrite.h>
71 #endif
73 #if JUCE_MINGW
74 #include <malloc.h>
75 #include <cstdio>
76 #endif
78 JUCE_END_IGNORE_WARNINGS_MSVC
80 #elif JUCE_IOS
81 #import <QuartzCore/QuartzCore.h>
82 #import <CoreText/CoreText.h>
84 #elif JUCE_LINUX || JUCE_BSD
85 #ifndef JUCE_USE_FREETYPE
86 #define JUCE_USE_FREETYPE 1
87 #endif
88 #endif
90 #if JUCE_USE_FREETYPE
91 #if JUCE_USE_FREETYPE_AMALGAMATED
92 #include "native/freetype/FreeTypeAmalgam.h"
93 #else
94 #include <ft2build.h>
95 #include FT_FREETYPE_H
96 #endif
97 #endif
99 #undef SIZEOF
101 #if (JUCE_MAC || JUCE_IOS) && USE_COREGRAPHICS_RENDERING && JUCE_USE_COREIMAGE_LOADER
102 #define JUCE_USING_COREIMAGE_LOADER 1
103 #else
104 #define JUCE_USING_COREIMAGE_LOADER 0
105 #endif
107 //==============================================================================
108 #include "colour/juce_Colour.cpp"
109 #include "colour/juce_ColourGradient.cpp"
110 #include "colour/juce_Colours.cpp"
111 #include "colour/juce_FillType.cpp"
112 #include "geometry/juce_AffineTransform.cpp"
113 #include "geometry/juce_EdgeTable.cpp"
114 #include "geometry/juce_Path.cpp"
115 #include "geometry/juce_PathIterator.cpp"
116 #include "geometry/juce_PathStrokeType.cpp"
117 #include "placement/juce_RectanglePlacement.cpp"
118 #include "contexts/juce_GraphicsContext.cpp"
119 #include "contexts/juce_LowLevelGraphicsPostScriptRenderer.cpp"
120 #include "contexts/juce_LowLevelGraphicsSoftwareRenderer.cpp"
121 #include "images/juce_Image.cpp"
122 #include "images/juce_ImageCache.cpp"
123 #include "images/juce_ImageConvolutionKernel.cpp"
124 #include "images/juce_ImageFileFormat.cpp"
125 #include "image_formats/juce_GIFLoader.cpp"
126 #include "image_formats/juce_JPEGLoader.cpp"
127 #include "image_formats/juce_PNGLoader.cpp"
128 #include "fonts/juce_AttributedString.cpp"
129 #include "fonts/juce_Typeface.cpp"
130 #include "fonts/juce_CustomTypeface.cpp"
131 #include "fonts/juce_Font.cpp"
132 #include "fonts/juce_GlyphArrangement.cpp"
133 #include "fonts/juce_TextLayout.cpp"
134 #include "effects/juce_DropShadowEffect.cpp"
135 #include "effects/juce_GlowEffect.cpp"
137 #if JUCE_UNIT_TESTS
138 #include "geometry/juce_Rectangle_test.cpp"
139 #endif
141 #if JUCE_USE_FREETYPE
142 #include "native/juce_freetype_Fonts.cpp"
143 #endif
145 //==============================================================================
146 #if JUCE_MAC || JUCE_IOS
147 #include "native/juce_mac_Fonts.mm"
148 #include "native/juce_mac_CoreGraphicsContext.mm"
149 #include "native/juce_mac_IconHelpers.cpp"
151 #elif JUCE_WINDOWS
152 #include "native/juce_win32_DirectWriteTypeface.cpp"
153 #include "native/juce_win32_DirectWriteTypeLayout.cpp"
154 #include "native/juce_win32_Fonts.cpp"
155 #include "native/juce_win32_IconHelpers.cpp"
156 #if JUCE_DIRECT2D
157 #include "native/juce_win32_Direct2DGraphicsContext.cpp"
158 #endif
160 #elif JUCE_LINUX || JUCE_BSD
161 #include "native/juce_linux_Fonts.cpp"
162 #include "native/juce_linux_IconHelpers.cpp"
164 #elif JUCE_ANDROID
165 #include "native/juce_android_GraphicsContext.cpp"
166 #include "native/juce_android_Fonts.cpp"
167 #include "native/juce_android_IconHelpers.cpp"
169 #endif
171 //==============================================================================
172 #if JUCE_USE_FREETYPE && JUCE_USE_FREETYPE_AMALGAMATED
173 #undef PIXEL_MASK
174 #undef ZLIB_VERSION
175 #undef Z_ASCII
176 #undef ZEXTERN
177 #undef ZEXPORT
179 extern "C"
181 #include "native/freetype/FreeTypeAmalgam.c"
183 #endif