Update CI version
[carla.git] / source / bridges-ui / CarlaBridgeToolkit.hpp
blobf7ebd563d1537a24c6cfe2834122e30f2566fa0f
1 /*
2 * Carla Bridge UI
3 * Copyright (C) 2011-2021 Filipe Coelho <falktx@falktx.com>
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.
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.
15 * For a full copy of the GNU General Public License see the doc/GPL.txt file.
18 #ifndef CARLA_BRIDGE_TOOLKIT_HPP_INCLUDED
19 #define CARLA_BRIDGE_TOOLKIT_HPP_INCLUDED
21 #include "CarlaBridgeUI.hpp"
23 #include "CarlaJuceUtils.hpp"
25 CARLA_BRIDGE_UI_START_NAMESPACE
27 // -----------------------------------------------------------------------
29 class CarlaBridgeToolkit
31 public:
32 virtual ~CarlaBridgeToolkit() {}
34 virtual bool init(int argc, const char* argv[]) = 0;
35 virtual void exec(bool showUI) = 0;
36 virtual void quit() = 0;
38 virtual void show() = 0;
39 virtual void focus() = 0;
40 virtual void hide() = 0;
41 virtual void setChildWindow(void* ptr) = 0;
42 virtual void setSize(uint width, uint height) = 0;
43 virtual void setTitle(const char* title) = 0;
45 virtual void* getContainerId() const { return nullptr; }
46 virtual void* getContainerId2() const { return nullptr; }
48 static CarlaBridgeToolkit* createNew(CarlaBridgeFormat* format);
50 protected:
51 CarlaBridgeFormat* const fPlugin;
53 CarlaBridgeToolkit(CarlaBridgeFormat* const format)
54 : fPlugin(format) {}
56 CARLA_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR(CarlaBridgeToolkit)
59 // -----------------------------------------------------------------------
61 CARLA_BRIDGE_UI_END_NAMESPACE
63 #endif // CARLA_BRIDGE_TOOLKIT_HPP_INCLUDED