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);
44 boost::shared_ptr<ARDOUR::AUPlugin> au;
50 NSWindow* cocoa_window;
51 NSScrollView* scroll_view;
56 NSWindow* cocoa_parent;
57 ComponentDescription carbon_descriptor;
58 AudioUnitCarbonView editView;
59 WindowRef carbon_window;
60 EventHandlerRef carbon_event_handler;
64 void test_view_support (bool&, bool&);
65 bool test_cocoa_view_support ();
66 bool test_carbon_view_support ();
67 int create_carbon_view (bool generic);
68 int create_cocoa_view ();
70 int parent_carbon_window ();
71 int parent_cocoa_window ();
72 NSWindow* get_nswindow();
74 bool plugin_class_valid (Class pluginClass);
77 #endif /* __gtk2_ardour_auplugin_ui_h__ */