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/AudioUnitCarbonView.h>
7 #include <AudioUnit/AudioUnit.h>
9 /* fix up stupid apple macros */
15 #include <gtkmm/box.h>
16 #include "plugin_ui.h"
24 class AUPluginUI : public PlugUIBase, public Gtk::VBox
27 AUPluginUI (boost::shared_ptr<ARDOUR::PluginInsert>);
30 gint get_preferred_height () { return prefheight; }
31 gint get_preferred_width () { return prefwidth; }
32 bool start_updating(GdkEventAny*);
33 bool stop_updating(GdkEventAny*);
35 virtual void activate ();
36 virtual void deactivate ();
41 bool on_map_event (GdkEventAny*);
42 bool on_focus_in_event (GdkEventFocus*);
43 bool on_focus_out_event (GdkEventFocus*);
45 OSStatus carbon_event (EventHandlerCallRef nextHandlerRef, EventRef event);
48 boost::shared_ptr<ARDOUR::AUPlugin> au;
54 NSWindow* cocoa_window;
55 NSScrollView* scroll_view;
60 NSWindow* cocoa_parent;
61 ComponentDescription carbon_descriptor;
62 AudioUnitCarbonView editView;
63 WindowRef carbon_window;
64 EventHandlerRef carbon_event_handler;
67 bool _activating_from_app;
69 void test_view_support (bool&, bool&);
70 bool test_cocoa_view_support ();
71 bool test_carbon_view_support ();
72 int create_carbon_view (bool generic);
73 int create_cocoa_view ();
75 int parent_carbon_window ();
76 int parent_cocoa_window ();
77 NSWindow* get_nswindow();
79 bool plugin_class_valid (Class pluginClass);
82 #endif /* __gtk2_ardour_auplugin_ui_h__ */