1 /*
2  * Copyright (C) 2020 Robin Gareus <robin@gareus.org>
3  *
4  * This program is free software; you can redistribute it and/or modify
5  * it under the terms of the GNU General Public License as published by
6  * the Free Software Foundation; either version 2 of the License, or
7  * (at your option) any later version.
8  *
9  * This program is distributed in the hope that it will be useful,
10  * but WITHOUT ANY WARRANTY; without even the implied warranty of
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
12  * GNU General Public License for more details.
13  *
14  * You should have received a copy of the GNU General Public License along
15  * with this program; if not, write to the Free Software Foundation, Inc.,
16  * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
17  */
18 
19 #ifndef __ardour_vst3_hwnd_plugin_ui_h__
20 #define __ardour_vst3_hwnd_plugin_ui_h__
21 
22 #ifdef VST3_SUPPORT
23 
24 #include <gtkmm/widget.h>
25 #include <gtkmm/eventbox.h>
26 
27 #include "vst3_plugin_ui.h"
28 
29 class VST3HWNDPluginUI : public VST3PluginUI
30 {
31 public:
32 	VST3HWNDPluginUI (boost::shared_ptr<ARDOUR::PluginInsert>, boost::shared_ptr<ARDOUR::VST3Plugin>);
33 	~VST3HWNDPluginUI ();
34 
35 	bool on_window_show(const std::string&);
36 	void on_window_hide ();
37 	void grab_focus();
38 
39 private:
40 	void view_realized ();
41 	void view_size_request (GtkRequisition*);
42 	void view_size_allocate (Gtk::Allocation&);
43 	void resize_callback (int, int);
44 
45 	Gtk::EventBox _gui_widget;
46 };
47 
48 #endif // VST3_SUPPORT
49 #endif
50