51bc6dd11736f771d1f1844cd090ae8e52dc9715
[ardour.git] / gtk2_ardour / ardour_ui.h
1 /*
2     Copyright (C) 1999-2002 Paul Davis
3
4     This program is free software; you can redistribute it and/or modify
5     it under the terms of the GNU General Public License as published by
6     the Free Software Foundation; either version 2 of the License, or
7     (at your option) any later version.
8
9     This program is distributed in the hope that it will be useful,
10     but WITHOUT ANY WARRANTY; without even the implied warranty of
11     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
12     GNU General Public License for more details.
13
14     You should have received a copy of the GNU General Public License
15     along with this program; if not, write to the Free Software
16     Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
17
18 */
19
20 #ifndef __ardour_gui_h__
21 #define __ardour_gui_h__
22
23 #include <time.h>
24
25 /* need _BSD_SOURCE to get timersub macros */
26
27 #ifdef _BSD_SOURCE
28 #include <sys/time.h>
29 #else
30 #define _BSD_SOURCE
31 #include <sys/time.h>
32 #undef _BSD_SOURCE
33 #endif
34
35 #include <list>
36 #include <cmath>
37
38
39 #include "pbd/xml++.h"
40 #include "pbd/controllable.h"
41 #include <gtkmm/box.h>
42 #include <gtkmm/frame.h>
43 #include <gtkmm/label.h>
44 #include <gtkmm/table.h>
45 #include <gtkmm/fixed.h>
46 #include <gtkmm/drawingarea.h>
47 #include <gtkmm/eventbox.h>
48 #include <gtkmm/menu.h>
49 #include <gtkmm/menuitem.h>
50 #include <gtkmm/button.h>
51 #include <gtkmm/togglebutton.h>
52 #include <gtkmm/treeview.h>
53 #include <gtkmm/menubar.h>
54 #include <gtkmm/textbuffer.h>
55 #include <gtkmm/adjustment.h>
56 #include <gtkmm2ext/gtk_ui.h>
57 #include <gtkmm2ext/click_box.h>
58 #include <gtkmm2ext/stateful_button.h>
59 #include <gtkmm2ext/bindable_button.h>
60
61 #include "ardour/ardour.h"
62 #include "ardour/types.h"
63 #include "ardour/utils.h"
64 #include "ardour/plugin.h"
65 #include "ardour/session_handle.h"
66 #include "ardour/system_exec.h"
67
68 #include "video_timeline.h"
69
70 #include "about.h"
71 #include "ardour_button.h"
72 #include "ardour_dialog.h"
73 #include "ardour_window.h"
74 #include "editing.h"
75 #include "engine_dialog.h"
76 #include "meterbridge.h"
77 #include "ui_config.h"
78 #include "enums.h"
79 #include "visibility_group.h"
80 #include "window_manager.h"
81
82 #include "add_route_dialog.h"
83 #include "add_video_dialog.h"
84 #include "big_clock_window.h"
85 #include "bundle_manager.h"
86 #include "global_port_matrix.h"
87 #include "keyeditor.h"
88 #include "location_ui.h"
89 #include "rc_option_editor.h"
90 #include "route_params_ui.h"
91 #include "session_option_editor.h"
92 #include "speaker_dialog.h"
93 #include "theme_manager.h"
94
95 class VideoTimeLine;
96 class ArdourKeyboard;
97 class AudioClock;
98 class ButtonJoiner;
99 class ConnectionEditor;
100 class MainClock;
101 class Mixer_UI;
102 class PublicEditor;
103 class RCOptionEditor;
104 class RouteParams_UI;
105 class SessionDialog;
106 class SessionOptionEditor;
107 class ShuttleControl;
108 class Splash;
109 class TimeInfoBox;
110 class MidiTracer;
111 class NSM_Client;
112 class LevelMeterHBox;
113 class GUIObjectState;
114
115 namespace ARDOUR {
116         class ControlProtocolInfo;
117         class IO;
118         class Port;
119         class Route;
120         class RouteGroup;
121         class Location;
122         class ProcessThread;
123 }
124
125 namespace Gtkmm2ext {
126         class TearOff;
127 }
128
129 class ARDOUR_UI : public Gtkmm2ext::UI, public ARDOUR::SessionHandlePtr
130 {
131   public:
132         ARDOUR_UI (int *argcp, char **argvp[], const char* localedir);
133         ~ARDOUR_UI();
134
135         bool run_startup (bool should_be_new, std::string load_template);
136
137         void show_splash ();
138         void hide_splash ();
139
140         void launch_chat ();
141         void launch_manual ();
142         void launch_reference ();
143         void show_about ();
144         void hide_about ();
145
146         void idle_load (const std::string& path);
147         void finish();
148
149         int load_session (const std::string& path, const std::string& snapshot, std::string mix_template = std::string());
150         bool session_loaded;
151         int build_session (const std::string& path, const std::string& snapshot, ARDOUR::BusProfile&);
152         bool session_is_new() const { return _session_is_new; }
153
154         ARDOUR::Session* the_session() { return _session; }
155
156         bool get_smart_mode () const;
157         
158         int get_session_parameters (bool quit_on_cancel, bool should_be_new = false, std::string load_template = "");
159         int  build_session_from_dialog (SessionDialog&, const std::string& session_name, const std::string& session_path);
160         bool ask_about_loading_existing_session (const std::string& session_path);
161
162         /// @return true if session was successfully unloaded.
163         int unload_session (bool hide_stuff = false);
164         void close_session();
165
166         int  save_state_canfail (std::string state_name = "", bool switch_to_it = false);
167         void save_state (const std::string & state_name = "", bool switch_to_it = false);
168
169         static ARDOUR_UI *instance () { return theArdourUI; }
170         static UIConfiguration *config () { return ui_config; }
171
172         PublicEditor&     the_editor(){return *editor;}
173         Mixer_UI* the_mixer() { return mixer; }
174
175         void new_midi_tracer_window ();
176         void toggle_editing_space();
177         void toggle_mixer_space();
178         void toggle_keep_tearoffs();
179
180         Gtk::Tooltips& tooltips() { return _tooltips; }
181
182         Gtk::HBox& editor_transport_box() { return _editor_transport_box; }
183
184         static PublicEditor* _instance;
185         static sigc::signal<void,bool> Blink;
186
187         /** point_zero_one_seconds -- 10Hz ^= 100ms */
188         static sigc::signal<void>      RapidScreenUpdate;
189
190         /** point_zero_something_seconds -- currently 25Hz ^= 40ms */
191         static sigc::signal<void>      SuperRapidScreenUpdate;
192
193         /** every_fps -- see set_fps_timeout_connection() 25Hz < x < 120Hz */
194         static sigc::signal<void>      FPSUpdate;
195
196         /** Emitted frequently with the audible frame, false, and the edit point as
197          *  parameters respectively.
198          *
199          *  (either RapidScreenUpdate || SuperRapidScreenUpdate - user-config)
200          */
201         static sigc::signal<void, framepos_t, bool, framepos_t> Clock;
202
203         static void close_all_dialogs () { CloseAllDialogs(); }
204         static sigc::signal<void> CloseAllDialogs;
205
206         XMLNode* editor_settings() const;
207         XMLNode* mixer_settings () const;
208         XMLNode* keyboard_settings () const;
209         XMLNode* tearoff_settings (const char*) const;
210
211         void save_ardour_state ();
212         gboolean configure_handler (GdkEventConfigure* conf);
213
214         void halt_on_xrun_message ();
215         void xrun_handler (framepos_t);
216         void create_xrun_marker (framepos_t);
217
218         GUIObjectState* gui_object_state;
219
220         MainClock* primary_clock;
221         MainClock* secondary_clock;
222         void focus_on_clock ();
223         AudioClock*   big_clock;
224
225         TimeInfoBox* time_info_box;
226
227         VideoTimeLine *video_timeline;
228
229         void store_clock_modes ();
230         void restore_clock_modes ();
231         void reset_main_clocks ();
232
233         void synchronize_sync_source_and_video_pullup ();
234
235         void add_route (Gtk::Window* float_window);
236         void add_routes_part_two ();
237         void add_routes_thread ();
238
239         void add_video (Gtk::Window* float_window);
240         void remove_video ();
241         void start_video_server_menu (Gtk::Window* float_window);
242         bool start_video_server (Gtk::Window* float_window, bool popup_msg);
243         void stop_video_server (bool ask_confirm=false);
244         void flush_videotimeline_cache (bool localcacheonly=false);
245
246         void session_add_audio_track (
247                 int input_channels,
248                 int32_t output_channels,
249                 ARDOUR::TrackMode mode,
250                 ARDOUR::RouteGroup* route_group,
251                 uint32_t how_many,
252                 std::string const & name_template
253                 ) {
254
255                 session_add_audio_route (true, input_channels, output_channels, mode, route_group, how_many, name_template);
256         }
257
258         void session_add_audio_bus (int input_channels, int32_t output_channels, ARDOUR::RouteGroup* route_group,
259                                     uint32_t how_many, std::string const & name_template) {
260                 session_add_audio_route (false, input_channels, output_channels, ARDOUR::Normal, route_group, how_many, name_template);
261         }
262
263         void session_add_midi_track (ARDOUR::RouteGroup* route_group, uint32_t how_many, std::string const & name_template,
264                                      ARDOUR::PluginInfoPtr instrument) {
265                 session_add_midi_route (true, route_group, how_many, name_template, instrument);
266         }
267
268         void session_add_mixed_track (const ARDOUR::ChanCount& input, const ARDOUR::ChanCount& output, ARDOUR::RouteGroup* route_group, uint32_t how_many, std::string const & name_template,
269                                       ARDOUR::PluginInfoPtr instrument);
270
271         /*void session_add_midi_bus () {
272                 session_add_midi_route (false);
273         }*/
274
275         void attach_to_engine ();
276         void post_engine ();
277
278         gint exit_on_main_window_close (GdkEventAny *);
279
280         void maximise_editing_space ();
281         void restore_editing_space ();
282
283         void show_ui_prefs ();
284
285         void update_tearoff_visibility ();
286
287         void setup_profile ();
288         void setup_tooltips ();
289
290         void set_shuttle_fract (double);
291
292         void get_process_buffers ();
293         void drop_process_buffers ();
294
295         void reset_peak_display ();
296         void reset_route_peak_display (ARDOUR::Route*);
297         void reset_group_peak_display (ARDOUR::RouteGroup*);
298
299         const std::string& announce_string() const { return _announce_string; }
300
301         int disconnect_from_engine ();
302         int reconnect_to_engine ();
303
304   protected:
305         friend class PublicEditor;
306
307         void toggle_auto_play ();
308         void toggle_auto_input ();
309         void toggle_punch ();
310         void unset_dual_punch ();
311         bool ignore_dual_punch;
312         void toggle_punch_in ();
313         void toggle_punch_out ();
314         void show_loop_punch_ruler_and_disallow_hide ();
315         void reenable_hide_loop_punch_ruler_if_appropriate ();
316         void toggle_auto_return ();
317         void toggle_click ();
318         void toggle_audio_midi_setup ();
319         void toggle_session_auto_loop ();
320         void toggle_rc_options_window ();
321         void toggle_session_options_window ();
322
323   private:
324         Gtk::Tooltips       _tooltips;
325         NSM_Client          *nsm;
326         bool                _was_dirty;
327         bool                _mixer_on_top;
328         bool first_time_engine_run;
329
330         void goto_editor_window ();
331         void goto_mixer_window ();
332         void toggle_mixer_window ();
333         void toggle_meterbridge ();
334         void toggle_editor_mixer ();
335
336         int  setup_windows ();
337         void setup_transport ();
338         void setup_clock ();
339
340         static ARDOUR_UI *theArdourUI;
341
342         int starting ();
343
344         int  ask_about_saving_session (const std::vector<std::string>& actions);
345
346         /* periodic safety backup, to be precise */
347         gint autosave_session();
348         void update_autosave();
349         sigc::connection _autosave_connection;
350
351         void map_transport_state ();
352         int32_t do_engine_start ();
353
354         void engine_halted (const char* reason, bool free_reason);
355         void engine_stopped ();
356         void engine_running ();
357
358         void use_config ();
359
360         static gint _blink  (void *);
361         void blink ();
362         gint blink_timeout_tag;
363         bool blink_on;
364         void start_blinking ();
365         void stop_blinking ();
366
367         void about_signal_response(int response);
368
369         Gtk::VBox     top_packer;
370
371         sigc::connection clock_signal_connection;
372         void         update_clocks ();
373         void         start_clocking ();
374         void         stop_clocking ();
375
376         bool main_window_state_event_handler (GdkEventWindowState*, bool window_was_editor);
377
378         void update_transport_clocks (framepos_t pos);
379         void record_state_changed ();
380
381         std::list<MidiTracer*> _midi_tracer_windows;
382
383         void detach_tearoff (Gtk::Box* parent, Gtk::Widget* contents);
384         void reattach_tearoff (Gtk::Box* parent, Gtk::Widget* contents, int32_t order);
385         void reattach_all_tearoffs ();
386
387         /* Transport Control */
388
389         Gtkmm2ext::TearOff*      transport_tearoff;
390         Gtk::Frame               transport_frame;
391         Gtk::HBox                transport_tearoff_hbox;
392         Gtk::HBox               _editor_transport_box;
393         Gtk::HBox                transport_hbox;
394         Gtk::Fixed               transport_base;
395         Gtk::Fixed               transport_button_base;
396         Gtk::Frame               transport_button_frame;
397         Gtk::HBox                transport_button_hbox;
398         Gtk::VBox                transport_button_vbox;
399         Gtk::HBox                transport_option_button_hbox;
400         Gtk::VBox                transport_option_button_vbox;
401         Gtk::HBox                transport_clock_hbox;
402         Gtk::VBox                transport_clock_vbox;
403         Gtk::HBox                primary_clock_hbox;
404         Gtk::HBox                secondary_clock_hbox;
405
406         struct TransportControllable : public PBD::Controllable {
407             enum ToggleType {
408                     Roll = 0,
409                     Stop,
410                     RecordEnable,
411                     GotoStart,
412                     GotoEnd,
413                     AutoLoop,
414                     PlaySelection,
415             };
416
417             TransportControllable (std::string name, ARDOUR_UI&, ToggleType);
418             void set_value (double);
419             double get_value (void) const;
420
421             ARDOUR_UI& ui;
422             ToggleType type;
423         };
424
425         boost::shared_ptr<TransportControllable> roll_controllable;
426         boost::shared_ptr<TransportControllable> stop_controllable;
427         boost::shared_ptr<TransportControllable> goto_start_controllable;
428         boost::shared_ptr<TransportControllable> goto_end_controllable;
429         boost::shared_ptr<TransportControllable> auto_loop_controllable;
430         boost::shared_ptr<TransportControllable> play_selection_controllable;
431         boost::shared_ptr<TransportControllable> rec_controllable;
432
433         void toggle_follow_edits ();
434
435         void set_transport_controllable_state (const XMLNode&);
436         XMLNode& get_transport_controllable_state ();
437
438         ArdourButton roll_button;
439         ArdourButton stop_button;
440         ArdourButton goto_start_button;
441         ArdourButton goto_end_button;
442         ArdourButton auto_loop_button;
443         ArdourButton play_selection_button;
444         ArdourButton rec_button;
445
446         void toggle_external_sync ();
447         void toggle_time_master ();
448         void toggle_video_sync ();
449
450         ShuttleControl* shuttle_box;
451
452         ArdourButton auto_return_button;
453         ArdourButton follow_edits_button;
454         ArdourButton auto_input_button;
455         ArdourButton click_button;
456         ArdourButton sync_button;
457
458         ArdourButton auditioning_alert_button;
459         ArdourButton solo_alert_button;
460         ArdourButton feedback_alert_button;
461
462         Gtk::VBox alert_box;
463         Gtk::VBox meter_box;
464         LevelMeterHBox * editor_meter;
465         float            editor_meter_max_peak;
466         ArdourButton     editor_meter_peak_display;
467         bool             editor_meter_peak_button_release (GdkEventButton*);
468
469         void solo_blink (bool);
470         void sync_blink (bool);
471         void audition_blink (bool);
472         void feedback_blink (bool);
473         
474         void set_flat_buttons();
475
476         void soloing_changed (bool);
477         void auditioning_changed (bool);
478         void _auditioning_changed (bool);
479         
480         bool solo_alert_press (GdkEventButton* ev);
481         bool audition_alert_press (GdkEventButton* ev);
482         bool feedback_alert_press (GdkEventButton *);
483
484         void big_clock_value_changed ();
485         void primary_clock_value_changed ();
486         void secondary_clock_value_changed ();
487
488         /* called by Blink signal */
489
490         void transport_rec_enable_blink (bool onoff);
491
492         Gtk::Menu*        session_popup_menu;
493
494         struct RecentSessionModelColumns : public Gtk::TreeModel::ColumnRecord {
495             RecentSessionModelColumns() {
496                     add (visible_name);
497                     add (tip);
498                     add (fullpath);
499             }
500             Gtk::TreeModelColumn<std::string> visible_name;
501             Gtk::TreeModelColumn<std::string> tip;
502             Gtk::TreeModelColumn<std::string> fullpath;
503         };
504
505         RecentSessionModelColumns    recent_session_columns;
506         Gtk::TreeView                recent_session_display;
507         Glib::RefPtr<Gtk::TreeStore> recent_session_model;
508
509         ArdourDialog*     session_selector_window;
510         Gtk::FileChooserDialog* open_session_selector;
511
512         void build_session_selector();
513         void redisplay_recent_sessions();
514         void recent_session_row_activated (const Gtk::TreePath& path, Gtk::TreeViewColumn* col);
515
516         struct RecentSessionsSorter {
517                 bool operator() (std::pair<std::string,std::string> a, std::pair<std::string,std::string> b) const {
518                     return ARDOUR::cmp_nocase(a.first, b.first) == -1;
519             }
520         };
521
522         /* menu bar and associated stuff */
523
524         Gtk::MenuBar* menu_bar;
525         Gtk::EventBox menu_bar_base;
526         Gtk::HBox     menu_hbox;
527
528         void use_menubar_as_top_menubar ();
529         void build_menu_bar ();
530
531         Gtk::Label   wall_clock_label;
532         gint update_wall_clock ();
533
534         Gtk::Label   disk_space_label;
535         void update_disk_space ();
536
537         Gtk::Label   timecode_format_label;
538         void update_timecode_format ();
539
540         Gtk::Label   cpu_load_label;
541         void update_cpu_load ();
542
543         Gtk::Label   buffer_load_label;
544         void update_buffer_load ();
545
546         Gtk::Label   sample_rate_label;
547         void update_sample_rate (ARDOUR::framecnt_t);
548
549         Gtk::Label    format_label;
550         void update_format ();
551         
552         gint every_second ();
553         gint every_point_one_seconds ();
554         gint every_point_zero_something_seconds ();
555         gint every_fps ();
556
557         sigc::connection second_connection;
558         sigc::connection point_one_second_connection;
559         sigc::connection point_zero_something_second_connection;
560         sigc::connection fps_connection;
561
562         void set_fps_timeout_connection ();
563
564         void open_session ();
565         void open_recent_session ();
566         void save_template ();
567
568         void edit_metadata ();
569         void import_metadata ();
570
571         void session_add_audio_route (bool, int32_t, int32_t, ARDOUR::TrackMode, ARDOUR::RouteGroup *, uint32_t, std::string const &);
572         void session_add_midi_route (bool, ARDOUR::RouteGroup *, uint32_t, std::string const &, ARDOUR::PluginInfoPtr);
573
574         void set_transport_sensitivity (bool);
575
576         //stuff for ProTools-style numpad
577         void transport_numpad_event (int num);
578         void transport_numpad_decimal ();
579         bool _numpad_locate_happening;
580         int _pending_locate_num;
581         gint transport_numpad_timeout ();
582         sigc::connection _numpad_timeout_connection;
583
584         void transport_goto_nth_marker (int nth);
585         void transport_goto_zero ();
586         void transport_goto_start ();
587         void transport_goto_end ();
588         void transport_goto_wallclock ();
589         void transport_stop ();
590         void transport_record (bool roll);
591         void transport_roll ();
592         void transport_play_selection();
593         void transport_play_preroll(); 
594         void transport_forward (int option);
595         void transport_rewind (int option);
596         void transport_loop ();
597         void toggle_roll (bool with_abort, bool roll_out_of_bounded_mode);
598         bool trx_record_enable_all_tracks ();
599
600         bool _session_is_new;
601         void set_session (ARDOUR::Session *);
602         void connect_dependents_to_session (ARDOUR::Session *);
603         void we_have_dependents ();
604
605         void setup_session_options ();
606
607         guint32  last_key_press_time;
608
609         void snapshot_session (bool switch_to_it);
610         void rename_session ();
611         void setup_order_hint ();
612
613         Mixer_UI   *mixer;
614         int         create_mixer ();
615
616         PublicEditor     *editor;
617         int         create_editor ();
618
619         Meterbridge  *meterbridge;
620         int         create_meterbridge ();
621         /* Dialogs that can be created via new<T> */
622
623         WM::Proxy<SpeakerDialog> speaker_config_window;
624         WM::Proxy<ThemeManager> theme_manager;
625         WM::Proxy<KeyEditor> key_editor;
626         WM::Proxy<RCOptionEditor> rc_option_editor;
627         WM::Proxy<AddRouteDialog> add_route_dialog;
628         WM::Proxy<About> about;
629         WM::Proxy<LocationUIWindow> location_ui;
630         WM::Proxy<RouteParams_UI> route_params;
631         WM::Proxy<EngineControl> audio_midi_setup;
632
633         /* Windows/Dialogs that require a creator method */
634
635         WM::ProxyWithConstructor<SessionOptionEditor> session_option_editor;
636         WM::ProxyWithConstructor<AddVideoDialog> add_video_dialog;
637         WM::ProxyWithConstructor<BundleManager> bundle_manager;
638         WM::ProxyWithConstructor<BigClockWindow> big_clock_window;
639         WM::ProxyWithConstructor<GlobalPortMatrixWindow> audio_port_matrix;
640         WM::ProxyWithConstructor<GlobalPortMatrixWindow> midi_port_matrix;
641
642         /* creator methods */
643
644         SessionOptionEditor*    create_session_option_editor ();
645         BundleManager*          create_bundle_manager ();
646         AddVideoDialog*         create_add_video_dialog ();
647         BigClockWindow*         create_big_clock_window(); 
648         GlobalPortMatrixWindow* create_global_port_matrix (ARDOUR::DataType);
649
650         static UIConfiguration *ui_config;
651
652         ARDOUR::SystemExec *video_server_process;
653
654         void handle_locations_change (ARDOUR::Location*);
655
656         /* Keyboard Handling */
657
658         ArdourKeyboard* keyboard;
659
660         /* Keymap handling */
661
662         void install_actions ();
663
664         void toggle_record_enable (uint32_t);
665
666         uint32_t rec_enabled_streams;
667         void count_recenabled_streams (ARDOUR::Route&);
668
669         Splash* splash;
670
671         void pop_back_splash (Gtk::Window&);
672
673         /* cleanup */
674
675         Gtk::MenuItem *cleanup_item;
676
677         void display_cleanup_results (ARDOUR::CleanupReport& rep, const gchar* list_title, const bool msg_delete);
678         void cleanup ();
679         void flush_trash ();
680
681         bool have_configure_timeout;
682         ARDOUR::microseconds_t last_configure_time;
683         gint configure_timeout ();
684
685         ARDOUR::microseconds_t last_peak_grab;
686         ARDOUR::microseconds_t last_shuttle_request;
687
688         bool have_disk_speed_dialog_displayed;
689         void disk_speed_dialog_gone (int ignored_response, Gtk::MessageDialog*);
690         void disk_overrun_handler ();
691         void disk_underrun_handler ();
692         void gui_idle_handler ();
693
694         void cancel_plugin_scan ();
695         void cancel_plugin_timeout ();
696         void plugin_scan_dialog (std::string type, std::string plugin, bool);
697         void plugin_scan_timeout (int);
698
699         void session_format_mismatch (std::string, std::string);
700
701         void session_dialog (std::string);
702         int pending_state_dialog ();
703         int sr_mismatch_dialog (ARDOUR::framecnt_t, ARDOUR::framecnt_t);
704
705         Gtk::MenuItem* jack_disconnect_item;
706         Gtk::MenuItem* jack_reconnect_item;
707         Gtk::Menu*     jack_bufsize_menu;
708
709         Glib::RefPtr<Gtk::ActionGroup> common_actions;
710
711         void editor_realized ();
712
713         std::vector<std::string> positional_sync_strings;
714
715         void toggle_send_midi_feedback ();
716         void toggle_use_mmc ();
717         void toggle_send_mmc ();
718         void toggle_send_mtc ();
719         void toggle_send_midi_clock ();
720
721         void toggle_use_osc ();
722
723         void parameter_changed (std::string);
724         void session_parameter_changed (std::string);
725
726         bool first_idle ();
727
728         void check_memory_locking ();
729
730         bool check_audioengine();
731         void audioengine_setup ();
732
733         void display_message (const char *prefix, gint prefix_len,
734                         Glib::RefPtr<Gtk::TextBuffer::Tag> ptag, Glib::RefPtr<Gtk::TextBuffer::Tag> mtag,
735                         const char *msg);
736         Gtk::Label status_bar_label;
737         bool status_bar_button_press (GdkEventButton*);
738         Gtk::ToggleButton error_log_button;
739
740         void loading_message (const std::string& msg);
741
742         PBD::ScopedConnectionList forever_connections;
743         PBD::ScopedConnection halt_connection; 
744
745         void step_edit_status_change (bool);
746
747         void platform_specific ();
748         void platform_setup ();
749
750         /* these are used only in response to a platform-specific "ShouldQuit" signal
751          */
752         bool idle_finish ();
753         void queue_finish ();
754         void fontconfig_dialog ();
755
756         int missing_file (ARDOUR::Session*s, std::string str, ARDOUR::DataType type);
757         int ambiguous_file (std::string file, std::vector<std::string> hits);
758
759         bool click_button_clicked (GdkEventButton *);
760
761         VisibilityGroup _status_bar_visibility;
762
763         /** A ProcessThread so that we have some thread-local buffers for use by
764          *  PluginEqGui::impulse_analysis ().
765          */
766         ARDOUR::ProcessThread* _process_thread;
767
768         void feedback_detected ();
769
770         ArdourButton             midi_panic_button;
771         void                     midi_panic ();
772
773         void successful_graph_sort ();
774         bool _feedback_exists;
775
776         void resize_text_widgets ();
777
778         std::string _announce_string;
779         void check_announcements ();
780
781         int do_audio_midi_setup (uint32_t);
782 };
783
784 #endif /* __ardour_gui_h__ */
785