1 #ifndef __gtk2_ardour_auplugin_ui_h__
2 #define __gtk2_ardour_auplugin_ui_h__
4 #include <AppKit/AppKit.h>
5 #include <Carbon/Carbon.h>
6 #include <AudioUnit/AudioUnit.h>
8 /* fix up stupid apple macros */
14 #include <gtkmm/box.h>
15 #include "plugin_ui.h"
23 class AUPluginUI : public PlugUIBase, public Gtk::VBox
26 AUPluginUI (boost::shared_ptr<ARDOUR::PluginInsert>);
29 gint get_preferred_height () { return prefheight; }
30 gint get_preferred_width () { return prefwidth; }
31 bool start_updating(GdkEventAny*);
32 bool stop_updating(GdkEventAny*);
34 virtual void activate ();
35 virtual void deactivate ();
40 OSStatus carbon_event (EventHandlerCallRef nextHandlerRef, EventRef event);
43 boost::shared_ptr<ARDOUR::AUPlugin> au;
49 NSWindow* cocoa_window;
50 NSScrollView* scroll_view;
55 NSWindow* cocoa_parent;
56 ComponentDescription carbon_descriptor;
57 AudioUnitCarbonView editView;
58 WindowRef carbon_window;
59 EventHandlerRef carbon_event_handler;
63 void test_view_support (bool&, bool&);
64 bool test_cocoa_view_support ();
65 bool test_carbon_view_support ();
66 int create_carbon_view (bool generic);
67 int create_cocoa_view ();
69 int parent_carbon_window ();
70 int parent_cocoa_window ();
71 NSWindow* get_nswindow();
73 bool plugin_class_valid (Class pluginClass);
76 #endif /* __gtk2_ardour_auplugin_ui_h__ */