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 bool on_map_event (GdkEventAny*);
41 bool on_focus_in_event (GdkEventFocus*);
42 bool on_focus_out_event (GdkEventFocus*);
44 OSStatus carbon_event (EventHandlerCallRef nextHandlerRef, EventRef event);
47 boost::shared_ptr<ARDOUR::AUPlugin> au;
53 NSWindow* cocoa_window;
54 NSScrollView* scroll_view;
59 NSWindow* cocoa_parent;
60 ComponentDescription carbon_descriptor;
61 AudioUnitCarbonView editView;
62 WindowRef carbon_window;
63 EventHandlerRef carbon_event_handler;
66 bool _activating_from_app;
68 void test_view_support (bool&, bool&);
69 bool test_cocoa_view_support ();
70 bool test_carbon_view_support ();
71 int create_carbon_view (bool generic);
72 int create_cocoa_view ();
74 int parent_carbon_window ();
75 int parent_cocoa_window ();
76 NSWindow* get_nswindow();
78 bool plugin_class_valid (Class pluginClass);
81 #endif /* __gtk2_ardour_auplugin_ui_h__ */