1 #ifndef __gtk2_ardour_auplugin_ui_h__
2 #define __gtk2_ardour_auplugin_ui_h__
7 #include <AppKit/AppKit.h>
8 #include <Carbon/Carbon.h>
9 #include <AudioUnit/AudioUnitCarbonView.h>
10 #include <AudioUnit/AudioUnit.h>
12 /* fix up stupid apple macros */
18 #include <gtkmm/box.h>
19 #include <gtkmm/combobox.h>
20 #include <gtkmm/button.h>
21 #include <gtkmm/label.h>
23 #include "plugin_ui.h"
31 class AUPluginUI : public PlugUIBase, public Gtk::VBox
34 AUPluginUI (boost::shared_ptr<ARDOUR::PluginInsert>);
37 gint get_preferred_height () { return prefheight; }
38 gint get_preferred_width () { return prefwidth; }
39 bool start_updating(GdkEventAny*);
40 bool stop_updating(GdkEventAny*);
45 void lower_box_realized ();
49 bool on_map_event (GdkEventAny*);
50 bool on_focus_in_event (GdkEventFocus*);
51 bool on_focus_out_event (GdkEventFocus*);
53 OSStatus carbon_event (EventHandlerCallRef nextHandlerRef, EventRef event);
57 boost::shared_ptr<ARDOUR::AUPlugin> au;
62 Gtk::EventBox low_box;
64 Gtk::Label automation_mode_label;
65 Gtk::ComboBoxText automation_mode_selector;
66 Gtk::Label preset_label;
68 static std::vector<std::string> automation_mode_strings;
72 NSWindow* cocoa_window;
73 NSScrollView* scroll_view;
78 NSWindow* cocoa_parent;
79 ComponentDescription carbon_descriptor;
80 AudioUnitCarbonView editView;
81 WindowRef carbon_window;
82 EventHandlerRef carbon_event_handler;
83 bool _activating_from_app;
86 bool test_cocoa_view_support ();
87 bool test_carbon_view_support ();
88 int create_carbon_view ();
89 int create_cocoa_view ();
91 int parent_carbon_window ();
92 int parent_cocoa_window ();
93 NSWindow* get_nswindow();
95 bool plugin_class_valid (Class pluginClass);
98 #endif /* __gtk2_ardour_auplugin_ui_h__ */