LMMS
Loading...
Searching...
No Matches
carla_juce.h
Go to the documentation of this file.
1/*
2 * Carla Plugin Host
3 * Copyright (C) 2011-2022 Filipe Coelho <falktx@falktx.com>
4 *
5 * This program is free software; you can redistribute it and/or
6 * modify it under the terms of the GNU General Public License as
7 * published by the Free Software Foundation; either version 2 of
8 * the License, or any later version.
9 *
10 * This program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
14 *
15 * For a full copy of the GNU General Public License see the doc/GPL.txt file.
16 */
17
18#ifndef CARLA_JUCE_HPP_INCLUDED
19#define CARLA_JUCE_HPP_INCLUDED
20
21#include "AppConfig.h"
22#include "CarlaDefines.h"
23
24#ifdef USING_JUCE
25# if defined(CARLA_OS_MAC) || defined(CARLA_OS_WIN)
26# define USE_STANDALONE_JUCE_APPLICATION
27# else
28# define USE_REFCOUNTER_JUCE_MESSAGE_MANAGER
29# endif
30#endif
31
32#ifdef USE_STANDALONE_JUCE_APPLICATION
33# include <functional>
34#endif
35
36namespace juce {
37class MessageManager;
38}
39
40namespace CarlaJUCE {
41
43void idleJuce_GUI();
44void shutdownJuce_GUI();
45const char* getVersion();
46
51
52#ifdef USE_REFCOUNTER_JUCE_MESSAGE_MANAGER
53struct ReferenceCountedJuceMessageMessager {
54 ReferenceCountedJuceMessageMessager();
55 ~ReferenceCountedJuceMessageMessager();
56 void incRef() const;
57 void decRef() const;
58};
59
60void setMessageManagerForThisThread();
61void dispatchMessageManagerMessages();
62#endif
63
64#ifdef USE_STANDALONE_JUCE_APPLICATION
65void setupAndUseMainApplication(std::function<void()> idleFn, volatile bool* closedSignalPtr);
66#endif
67
68} // namespace CarlaJUCE
69
70#endif // CARLA_JUCE_HPP_INCLUDED
Definition carla_juce.cpp:35
const char * getVersion()
Definition carla_juce.cpp:57
void initialiseJuce_GUI()
Definition carla_juce.cpp:37
void shutdownJuce_GUI()
Definition carla_juce.cpp:52
void idleJuce_GUI()
Definition carla_juce.cpp:45
Definition carla_juce.cpp:31
ScopedJuceInitialiser_GUI()
Definition carla_juce.cpp:65
~ScopedJuceInitialiser_GUI()
Definition carla_juce.cpp:71