LMMS
Loading...
Searching...
No Matches
juce_ARA_utils.h
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#if JucePlugin_Enable_ARA
27
28// Include ARA SDK headers
29JUCE_BEGIN_IGNORE_WARNINGS_GCC_LIKE ("-Wgnu-zero-variadic-macro-arguments",
30 "-Wunused-parameter")
32
33#include <ARA_Library/PlugIn/ARAPlug.h>
34
37
38namespace juce
39{
40
41using ARAViewSelection = ARA::PlugIn::ViewSelection;
42using ARAContentUpdateScopes = ARA::ContentUpdateScopes;
43using ARARestoreObjectsFilter = ARA::PlugIn::RestoreObjectsFilter;
44using ARAStoreObjectsFilter = ARA::PlugIn::StoreObjectsFilter;
45
47inline String convertARAString (ARA::ARAUtf8String str)
48{
49 return String (CharPointer_UTF8 (str));
50}
51
57inline String convertOptionalARAString (ARA::ARAUtf8String str, const String& fallbackString = String())
58{
59 return (str != nullptr) ? convertARAString (str) : fallbackString;
60}
61
63inline Colour convertARAColour (const ARA::ARAColor* colour)
64{
65 return Colour::fromFloatRGBA (colour->r, colour->g, colour->b, 1.0f);
66}
67
73inline Colour convertOptionalARAColour (const ARA::ARAColor* colour, const Colour& fallbackColour = Colour())
74{
75 return (colour != nullptr) ? convertARAColour (colour) : fallbackColour;
76}
77
78} // namespace juce
79
84
85#endif
#define JUCE_BEGIN_IGNORE_WARNINGS_GCC_LIKE(...)
Definition juce_CompilerWarnings.h:181
#define JUCE_END_IGNORE_WARNINGS_GCC_LIKE
Definition juce_CompilerWarnings.h:182
#define JUCE_BEGIN_IGNORE_WARNINGS_MSVC(warnings)
Definition juce_CompilerWarnings.h:198
#define JUCE_END_IGNORE_WARNINGS_MSVC
Definition juce_CompilerWarnings.h:199
Definition carla_juce.cpp:31