use -r argument with JACK if realtime is not requested in engine dialog (also applied...
[ArdourMidi.git] / gtk2_ardour / au_pluginui.h
blob445ab27ec5097cb61fd03517f71f2b70a6c001ad
1 #ifndef __gtk2_ardour_auplugin_ui_h__
2 #define __gtk2_ardour_auplugin_ui_h__
4 #include <vector>
5 #include <string>
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 */
14 #undef check
15 #undef require
16 #undef verify
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"
25 namespace ARDOUR {
26 class AUPlugin;
27 class PluginInsert;
28 class IOProcessor;
31 class AUPluginUI : public PlugUIBase, public Gtk::VBox
33 public:
34 AUPluginUI (boost::shared_ptr<ARDOUR::PluginInsert>);
35 ~AUPluginUI ();
37 gint get_preferred_height () { return prefheight; }
38 gint get_preferred_width () { return prefwidth; }
39 bool start_updating(GdkEventAny*);
40 bool stop_updating(GdkEventAny*);
42 void activate ();
43 void deactivate ();
45 void lower_box_realized ();
46 void on_realize ();
47 void on_show ();
48 void on_hide ();
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);
55 private:
56 WindowRef wr;
57 boost::shared_ptr<ARDOUR::AUPlugin> au;
58 int prefheight;
59 int prefwidth;
61 Gtk::HBox top_box;
62 Gtk::EventBox low_box;
63 Gtk::VBox vpacker;
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;
70 /* Cocoa */
72 NSWindow* cocoa_window;
73 NSView* au_view;
75 /* Carbon */
77 NSWindow* cocoa_parent;
78 ComponentDescription carbon_descriptor;
79 AudioUnitCarbonView editView;
80 WindowRef carbon_window;
81 EventHandlerRef carbon_event_handler;
82 bool _activating_from_app;
83 NSView* packView;
85 bool test_cocoa_view_support ();
86 bool test_carbon_view_support ();
87 int create_carbon_view ();
88 int create_cocoa_view ();
90 int parent_carbon_window ();
91 int parent_cocoa_window ();
92 NSWindow* get_nswindow();
94 bool plugin_class_valid (Class pluginClass);
97 #endif /* __gtk2_ardour_auplugin_ui_h__ */