Ardour  9.0-pre0-582-g084a23a80d
mac_vst_plugin_ui.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2016 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 #include <AppKit/AppKit.h>
20 #include <Carbon/Carbon.h>
21 
22 /* fix up stupid apple macros */
23 #undef check
24 #undef require
25 #undef verify
26 
27 #ifdef YES
28 #undef YES
29 #endif
30 #ifdef NO
31 #undef NO
32 #endif
33 
34 #include "vst_plugin_ui.h"
35 
36 class MacVSTPluginUI;
37 
38 @interface ResizeNotificationObject : NSObject {
39  @private
41 }
42 @end
43 
45 {
46 public:
47  MacVSTPluginUI (std::shared_ptr<ARDOUR::PlugInsertBase>, std::shared_ptr<ARDOUR::VSTPlugin>);
49 
50  bool start_updating (GdkEventAny*) { return false; }
51  bool stop_updating (GdkEventAny*) { return false; }
52 
54 
56  void view_resized ();
57 
58 protected:
61  void lower_box_map ();
62  void lower_box_unmap ();
65 
66 private:
67  int get_XID ();
68  bool idle ();
69  void set_program ();
70  NSWindow* get_nswindow();
71 
73  NSView* _ns_view;
74  sigc::connection _idle_connection;
77 };
void view_resized()
void lower_box_map()
void lower_box_unmap()
bool start_updating(GdkEventAny *)
void forward_key_event(GdkEventKey *)
PBD::ScopedConnection _program_connection
void lower_box_size_allocate(Gtk::Allocation &)
NSWindow * get_nswindow()
ResizeNotificationObject * _resize_notifier
bool lower_box_visibility_notify(GdkEventVisibility *)
sigc::connection _idle_connection
Gtk::EventBox low_box
int package(Gtk::Window &)
void lower_box_realized()
void set_program()
MacVSTPluginUI(std::shared_ptr< ARDOUR::PlugInsertBase >, std::shared_ptr< ARDOUR::VSTPlugin >)
void lower_box_size_request(GtkRequisition *)
bool stop_updating(GdkEventAny *)
MacVSTPluginUI * plugin_ui