use tri-state text-less LED for error-log button.
[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 "export_video_dialog.h"
77 #include "meterbridge.h"
78 #include "ui_config.h"
79 #include "enums.h"
80 #include "visibility_group.h"
81 #include "window_manager.h"
82
83 #include "add_route_dialog.h"
84 #include "add_video_dialog.h"
85 #include "big_clock_window.h"
86 #include "bundle_manager.h"
87 #include "global_port_matrix.h"
88 #include "keyeditor.h"
89 #include "location_ui.h"
90 #include "rc_option_editor.h"
91 #include "route_params_ui.h"
92 #include "session_option_editor.h"
93 #include "speaker_dialog.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     private:
132         /* This must be the first data element because constructor ordering
133            relies on it.
134         */
135         UIConfiguration*     ui_config;
136
137     public:
138         ARDOUR_UI (int *argcp, char **argvp[], const char* localedir);
139         ~ARDOUR_UI();
140
141         bool run_startup (bool should_be_new, std::string load_template);
142
143         void show_splash ();
144         void hide_splash ();
145
146         void launch_chat ();
147         void launch_manual ();
148         void launch_reference ();
149         void launch_tracker ();
150         void launch_cheat_sheet ();
151         void launch_website ();
152         void launch_website_dev ();
153         void launch_forums ();
154         void launch_howto_report ();
155         void show_about ();
156         void hide_about ();
157
158         void load_from_application_api (const std::string& path);
159         void finish();
160
161         int load_session (const std::string& path, const std::string& snapshot, std::string mix_template = std::string());
162         bool session_loaded;
163         int build_session (const std::string& path, const std::string& snapshot, ARDOUR::BusProfile&);
164         bool session_is_new() const { return _session_is_new; }
165
166         ARDOUR::Session* the_session() { return _session; }
167
168         bool get_smart_mode () const;
169         
170         int get_session_parameters (bool quit_on_cancel, bool should_be_new = false, std::string load_template = "");
171         int  build_session_from_dialog (SessionDialog&, const std::string& session_name, const std::string& session_path);
172         bool ask_about_loading_existing_session (const std::string& session_path);
173
174         /// @return true if session was successfully unloaded.
175         int unload_session (bool hide_stuff = false);
176         void close_session();
177
178         int  save_state_canfail (std::string state_name = "", bool switch_to_it = false);
179         void save_state (const std::string & state_name = "", bool switch_to_it = false);
180
181         static ARDOUR_UI *instance () { return theArdourUI; }
182         static UIConfiguration *config () { return theArdourUI->ui_config; }
183         
184         PublicEditor&     the_editor(){return *editor;}
185         Mixer_UI* the_mixer() { return mixer; }
186
187         void new_midi_tracer_window ();
188         void toggle_editing_space();
189         void toggle_mixer_space();
190         void toggle_keep_tearoffs();
191
192         Gtk::Tooltips& tooltips() { return _tooltips; }
193
194         Gtk::HBox& editor_transport_box() { return _editor_transport_box; }
195
196         static PublicEditor* _instance;
197
198         /** Emitted frequently with the audible frame, false, and the edit point as
199          *  parameters respectively.
200          *
201          *  (either RapidScreenUpdate || SuperRapidScreenUpdate - user-config)
202          */
203         static sigc::signal<void, framepos_t, bool, framepos_t> Clock;
204
205         static void close_all_dialogs () { CloseAllDialogs(); }
206         static sigc::signal<void> CloseAllDialogs;
207
208         XMLNode* editor_settings() const;
209         XMLNode* mixer_settings () const;
210         XMLNode* keyboard_settings () const;
211         XMLNode* tearoff_settings (const char*) const;
212
213         void save_ardour_state ();
214         gboolean configure_handler (GdkEventConfigure* conf);
215
216         void halt_on_xrun_message ();
217         void xrun_handler (framepos_t);
218         void create_xrun_marker (framepos_t);
219
220         GUIObjectState* gui_object_state;
221         
222         MainClock* primary_clock;
223         MainClock* secondary_clock;
224         void focus_on_clock ();
225         AudioClock*   big_clock;
226
227         TimeInfoBox* time_info_box;
228
229         VideoTimeLine *video_timeline;
230
231         void store_clock_modes ();
232         void restore_clock_modes ();
233         void reset_main_clocks ();
234
235         void synchronize_sync_source_and_video_pullup ();
236
237         void add_route (Gtk::Window* float_window);
238         void add_routes_part_two ();
239         void add_routes_thread ();
240
241         void add_video (Gtk::Window* float_window);
242         void remove_video ();
243         void start_video_server_menu (Gtk::Window* float_window);
244         bool start_video_server (Gtk::Window* float_window, bool popup_msg);
245         void stop_video_server (bool ask_confirm=false);
246         void flush_videotimeline_cache (bool localcacheonly=false);
247         void export_video (bool range = false);
248
249         void session_add_audio_track (
250                 int input_channels,
251                 int32_t output_channels,
252                 ARDOUR::TrackMode mode,
253                 ARDOUR::RouteGroup* route_group,
254                 uint32_t how_many,
255                 std::string const & name_template
256                 ) {
257
258                 session_add_audio_route (true, input_channels, output_channels, mode, route_group, how_many, name_template);
259         }
260
261         void session_add_audio_bus (int input_channels, int32_t output_channels, ARDOUR::RouteGroup* route_group,
262                                     uint32_t how_many, std::string const & name_template) {
263                 session_add_audio_route (false, input_channels, output_channels, ARDOUR::Normal, route_group, how_many, name_template);
264         }
265
266         void session_add_midi_track (ARDOUR::RouteGroup* route_group, uint32_t how_many, std::string const & name_template,
267                                      ARDOUR::PluginInfoPtr instrument) {
268                 session_add_midi_route (true, route_group, how_many, name_template, instrument);
269         }
270
271         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,
272                                       ARDOUR::PluginInfoPtr instrument);
273
274         /*void session_add_midi_bus () {
275                 session_add_midi_route (false);
276         }*/
277
278         void attach_to_engine ();
279         void post_engine ();
280
281         gint exit_on_main_window_close (GdkEventAny *);
282
283         void maximise_editing_space ();
284         void restore_editing_space ();
285
286         void show_ui_prefs ();
287
288         void update_tearoff_visibility ();
289
290         void setup_profile ();
291         void setup_tooltips ();
292
293         void set_shuttle_fract (double);
294
295         void get_process_buffers ();
296         void drop_process_buffers ();
297
298         void reset_peak_display ();
299         void reset_route_peak_display (ARDOUR::Route*);
300         void reset_group_peak_display (ARDOUR::RouteGroup*);
301
302         const std::string& announce_string() const { return _announce_string; }
303
304         int disconnect_from_engine ();
305         int reconnect_to_engine ();
306
307   protected:
308         friend class PublicEditor;
309
310         void toggle_auto_play ();
311         void toggle_auto_input ();
312         void toggle_punch ();
313         void unset_dual_punch ();
314         bool ignore_dual_punch;
315         void toggle_punch_in ();
316         void toggle_punch_out ();
317         void show_loop_punch_ruler_and_disallow_hide ();
318         void reenable_hide_loop_punch_ruler_if_appropriate ();
319         void toggle_auto_return ();
320         void toggle_click ();
321         void toggle_audio_midi_setup ();
322         void toggle_session_auto_loop ();
323         void toggle_rc_options_window ();
324         void toggle_session_options_window ();
325
326   private:
327         PublicEditor*        editor;
328         Mixer_UI*            mixer;
329         Gtk::Tooltips       _tooltips;
330         NSM_Client*          nsm;
331         bool                _was_dirty;
332         bool                _mixer_on_top;
333         bool first_time_engine_run;
334
335         void goto_editor_window ();
336         void goto_mixer_window ();
337         void toggle_mixer_window ();
338         void toggle_meterbridge ();
339         void toggle_editor_mixer ();
340
341         int  setup_windows ();
342         void setup_transport ();
343         void setup_clock ();
344
345         static ARDOUR_UI *theArdourUI;
346
347         int starting ();
348
349         int  ask_about_saving_session (const std::vector<std::string>& actions);
350
351         void save_session_at_its_request (std::string);
352         /* periodic safety backup, to be precise */
353         gint autosave_session();
354         void update_autosave();
355         sigc::connection _autosave_connection;
356
357         void map_transport_state ();
358         int32_t do_engine_start ();
359
360         void engine_halted (const char* reason, bool free_reason);
361         void engine_stopped ();
362         void engine_running ();
363
364         void use_config ();
365
366         void about_signal_response(int response);
367
368         Gtk::VBox     top_packer;
369
370         sigc::connection clock_signal_connection;
371         void         update_clocks ();
372         void         start_clocking ();
373         void         stop_clocking ();
374
375         bool main_window_state_event_handler (GdkEventWindowState*, bool window_was_editor);
376
377         void update_transport_clocks (framepos_t pos);
378         void record_state_changed ();
379
380         std::list<MidiTracer*> _midi_tracer_windows;
381
382         void detach_tearoff (Gtk::Box* parent, Gtk::Widget* contents);
383         void reattach_tearoff (Gtk::Box* parent, Gtk::Widget* contents, int32_t order);
384         void reattach_all_tearoffs ();
385
386         /* Transport Control */
387
388         Gtkmm2ext::TearOff*      transport_tearoff;
389         Gtk::Frame               transport_frame;
390         Gtk::HBox                transport_tearoff_hbox;
391         Gtk::HBox               _editor_transport_box;
392         Gtk::HBox                transport_hbox;
393         Gtk::Fixed               transport_base;
394         Gtk::Fixed               transport_button_base;
395         Gtk::Frame               transport_button_frame;
396         Gtk::HBox                transport_button_hbox;
397         Gtk::VBox                transport_button_vbox;
398         Gtk::HBox                transport_option_button_hbox;
399         Gtk::VBox                transport_option_button_vbox;
400         Gtk::HBox                transport_clock_hbox;
401         Gtk::VBox                transport_clock_vbox;
402         Gtk::HBox                primary_clock_hbox;
403         Gtk::HBox                secondary_clock_hbox;
404
405         struct TransportControllable : public PBD::Controllable {
406             enum ToggleType {
407                     Roll = 0,
408                     Stop,
409                     RecordEnable,
410                     GotoStart,
411                     GotoEnd,
412                     AutoLoop,
413                     PlaySelection,
414             };
415
416             TransportControllable (std::string name, ARDOUR_UI&, ToggleType);
417             void set_value (double);
418             double get_value (void) const;
419
420             ARDOUR_UI& ui;
421             ToggleType type;
422         };
423
424         boost::shared_ptr<TransportControllable> roll_controllable;
425         boost::shared_ptr<TransportControllable> stop_controllable;
426         boost::shared_ptr<TransportControllable> goto_start_controllable;
427         boost::shared_ptr<TransportControllable> goto_end_controllable;
428         boost::shared_ptr<TransportControllable> auto_loop_controllable;
429         boost::shared_ptr<TransportControllable> play_selection_controllable;
430         boost::shared_ptr<TransportControllable> rec_controllable;
431
432         void toggle_follow_edits ();
433
434         void set_transport_controllable_state (const XMLNode&);
435         XMLNode& get_transport_controllable_state ();
436
437         ArdourButton roll_button;
438         ArdourButton stop_button;
439         ArdourButton goto_start_button;
440         ArdourButton goto_end_button;
441         ArdourButton auto_loop_button;
442         ArdourButton play_selection_button;
443         ArdourButton rec_button;
444
445         void toggle_external_sync ();
446         void toggle_time_master ();
447         void toggle_video_sync ();
448
449         ShuttleControl* shuttle_box;
450
451         ArdourButton auto_return_button;
452         ArdourButton follow_edits_button;
453         ArdourButton auto_input_button;
454         ArdourButton click_button;
455         ArdourButton sync_button;
456
457         ArdourButton auditioning_alert_button;
458         ArdourButton solo_alert_button;
459         ArdourButton feedback_alert_button;
460         ArdourButton error_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 blink_handler (bool);
470         sigc::connection blink_connection;
471
472         void solo_blink (bool);
473         void sync_blink (bool);
474         void audition_blink (bool);
475         void feedback_blink (bool);
476         void error_blink (bool);
477         
478         void set_flat_buttons();
479
480         void soloing_changed (bool);
481         void auditioning_changed (bool);
482         void _auditioning_changed (bool);
483         
484         bool solo_alert_press (GdkEventButton* ev);
485         bool audition_alert_press (GdkEventButton* ev);
486         bool feedback_alert_press (GdkEventButton *);
487         bool error_alert_press (GdkEventButton *);
488
489         void big_clock_value_changed ();
490         void primary_clock_value_changed ();
491         void secondary_clock_value_changed ();
492
493         /* called by Blink signal */
494
495         void transport_rec_enable_blink (bool onoff);
496
497         Gtk::Menu*        session_popup_menu;
498
499         struct RecentSessionModelColumns : public Gtk::TreeModel::ColumnRecord {
500             RecentSessionModelColumns() {
501                     add (visible_name);
502                     add (tip);
503                     add (fullpath);
504             }
505             Gtk::TreeModelColumn<std::string> visible_name;
506             Gtk::TreeModelColumn<std::string> tip;
507             Gtk::TreeModelColumn<std::string> fullpath;
508         };
509
510         RecentSessionModelColumns    recent_session_columns;
511         Gtk::TreeView                recent_session_display;
512         Glib::RefPtr<Gtk::TreeStore> recent_session_model;
513
514         ArdourDialog*     session_selector_window;
515         Gtk::FileChooserDialog* open_session_selector;
516
517         void build_session_selector();
518         void redisplay_recent_sessions();
519         void recent_session_row_activated (const Gtk::TreePath& path, Gtk::TreeViewColumn* col);
520
521         struct RecentSessionsSorter {
522                 bool operator() (std::pair<std::string,std::string> a, std::pair<std::string,std::string> b) const {
523                     return ARDOUR::cmp_nocase(a.first, b.first) == -1;
524             }
525         };
526
527         /* menu bar and associated stuff */
528
529         Gtk::MenuBar* menu_bar;
530         Gtk::EventBox menu_bar_base;
531         Gtk::HBox     menu_hbox;
532
533         void use_menubar_as_top_menubar ();
534         void build_menu_bar ();
535
536         Gtk::Label   wall_clock_label;
537         gint update_wall_clock ();
538
539         Gtk::Label   disk_space_label;
540         void update_disk_space ();
541
542         Gtk::Label   timecode_format_label;
543         void update_timecode_format ();
544
545         Gtk::Label   cpu_load_label;
546         void update_cpu_load ();
547
548         Gtk::Label   buffer_load_label;
549         void update_buffer_load ();
550
551         Gtk::Label   sample_rate_label;
552         void update_sample_rate (ARDOUR::framecnt_t);
553
554         Gtk::Label    format_label;
555         void update_format ();
556         
557         void every_second ();
558         void every_point_one_seconds ();
559         void every_point_zero_something_seconds ();
560
561         sigc::connection second_connection;
562         sigc::connection point_one_second_connection;
563         sigc::connection point_zero_something_second_connection;
564         sigc::connection fps_connection;
565
566         void set_fps_timeout_connection ();
567
568         void open_session ();
569         void open_recent_session ();
570         void save_template ();
571
572         void edit_metadata ();
573         void import_metadata ();
574
575         void session_add_audio_route (bool, int32_t, int32_t, ARDOUR::TrackMode, ARDOUR::RouteGroup *, uint32_t, std::string const &);
576         void session_add_midi_route (bool, ARDOUR::RouteGroup *, uint32_t, std::string const &, ARDOUR::PluginInfoPtr);
577
578         void set_transport_sensitivity (bool);
579
580         //stuff for ProTools-style numpad
581         void transport_numpad_event (int num);
582         void transport_numpad_decimal ();
583         bool _numpad_locate_happening;
584         int _pending_locate_num;
585         gint transport_numpad_timeout ();
586         sigc::connection _numpad_timeout_connection;
587
588         void transport_goto_nth_marker (int nth);
589         void transport_goto_zero ();
590         void transport_goto_start ();
591         void transport_goto_end ();
592         void transport_goto_wallclock ();
593         void transport_stop ();
594         void transport_record (bool roll);
595         void transport_roll ();
596         void transport_play_selection();
597         void transport_play_preroll(); 
598         void transport_forward (int option);
599         void transport_rewind (int option);
600         void transport_loop ();
601         void toggle_roll (bool with_abort, bool roll_out_of_bounded_mode);
602         bool trx_record_enable_all_tracks ();
603
604         bool _session_is_new;
605         void set_session (ARDOUR::Session *);
606         void connect_dependents_to_session (ARDOUR::Session *);
607         void we_have_dependents ();
608
609         void setup_session_options ();
610
611         guint32  last_key_press_time;
612
613         void snapshot_session (bool switch_to_it);
614         void rename_session ();
615         void setup_order_hint (AddRouteDialog::InsertAt);
616
617         int         create_mixer ();
618         int         create_editor ();
619
620         Meterbridge  *meterbridge;
621         int         create_meterbridge ();
622         /* Dialogs that can be created via new<T> */
623
624         WM::Proxy<SpeakerDialog> speaker_config_window;
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         WM::Proxy<ExportVideoDialog> export_video_dialog;
633
634         /* Windows/Dialogs that require a creator method */
635
636         WM::ProxyWithConstructor<SessionOptionEditor> session_option_editor;
637         WM::ProxyWithConstructor<AddVideoDialog> add_video_dialog;
638         WM::ProxyWithConstructor<BundleManager> bundle_manager;
639         WM::ProxyWithConstructor<BigClockWindow> big_clock_window;
640         WM::ProxyWithConstructor<GlobalPortMatrixWindow> audio_port_matrix;
641         WM::ProxyWithConstructor<GlobalPortMatrixWindow> midi_port_matrix;
642
643         /* creator methods */
644
645         SessionOptionEditor*    create_session_option_editor ();
646         BundleManager*          create_bundle_manager ();
647         AddVideoDialog*         create_add_video_dialog ();
648         BigClockWindow*         create_big_clock_window(); 
649         GlobalPortMatrixWindow* create_global_port_matrix (ARDOUR::DataType);
650
651         ARDOUR::SystemExec *video_server_process;
652
653         void handle_locations_change (ARDOUR::Location*);
654
655         /* Keyboard Handling */
656
657         ArdourKeyboard* keyboard;
658
659         /* Keymap handling */
660
661         void install_actions ();
662
663         void toggle_record_enable (uint32_t);
664
665         uint32_t rec_enabled_streams;
666         void count_recenabled_streams (ARDOUR::Route&);
667
668         Splash* splash;
669
670         void pop_back_splash (Gtk::Window&);
671
672         /* cleanup */
673
674         Gtk::MenuItem *cleanup_item;
675
676         void display_cleanup_results (ARDOUR::CleanupReport& rep, const gchar* list_title, const bool msg_delete);
677         void cleanup ();
678         void flush_trash ();
679
680         bool have_configure_timeout;
681         ARDOUR::microseconds_t last_configure_time;
682         gint configure_timeout ();
683
684         ARDOUR::microseconds_t last_peak_grab;
685         ARDOUR::microseconds_t last_shuttle_request;
686
687         bool have_disk_speed_dialog_displayed;
688         void disk_speed_dialog_gone (int ignored_response, Gtk::MessageDialog*);
689         void disk_overrun_handler ();
690         void disk_underrun_handler ();
691         void gui_idle_handler ();
692
693         void cancel_plugin_scan ();
694         void cancel_plugin_timeout ();
695         void plugin_scan_dialog (std::string type, std::string plugin, bool);
696         void plugin_scan_timeout (int);
697
698         void session_format_mismatch (std::string, std::string);
699
700         void session_dialog (std::string);
701         int pending_state_dialog ();
702         int sr_mismatch_dialog (ARDOUR::framecnt_t, ARDOUR::framecnt_t);
703
704         Gtk::MenuItem* jack_disconnect_item;
705         Gtk::MenuItem* jack_reconnect_item;
706         Gtk::Menu*     jack_bufsize_menu;
707
708         Glib::RefPtr<Gtk::ActionGroup> common_actions;
709
710         void editor_realized ();
711
712         std::vector<std::string> positional_sync_strings;
713
714         void toggle_send_midi_feedback ();
715         void toggle_use_mmc ();
716         void toggle_send_mmc ();
717         void toggle_send_mtc ();
718         void toggle_send_midi_clock ();
719
720         void toggle_use_osc ();
721
722         void parameter_changed (std::string);
723         void session_parameter_changed (std::string);
724
725         bool first_idle ();
726
727         void check_memory_locking ();
728
729         bool check_audioengine();
730         void audioengine_setup ();
731
732         void display_message (const char *prefix, gint prefix_len,
733                         Glib::RefPtr<Gtk::TextBuffer::Tag> ptag, Glib::RefPtr<Gtk::TextBuffer::Tag> mtag,
734                         const char *msg);
735         Gtk::Label status_bar_label;
736         bool status_bar_button_press (GdkEventButton*);
737
738         void loading_message (const std::string& msg);
739
740         PBD::ScopedConnectionList forever_connections;
741         PBD::ScopedConnection halt_connection; 
742
743         void step_edit_status_change (bool);
744
745         void platform_specific ();
746         void platform_setup ();
747
748         /* these are used only in response to a platform-specific "ShouldQuit" signal
749          */
750         bool idle_finish ();
751         void queue_finish ();
752         void fontconfig_dialog ();
753
754         int missing_file (ARDOUR::Session*s, std::string str, ARDOUR::DataType type);
755         int ambiguous_file (std::string file, std::vector<std::string> hits);
756
757         bool click_button_clicked (GdkEventButton *);
758
759         VisibilityGroup _status_bar_visibility;
760
761         /** A ProcessThread so that we have some thread-local buffers for use by
762          *  PluginEqGui::impulse_analysis ().
763          */
764         ARDOUR::ProcessThread* _process_thread;
765
766         void feedback_detected ();
767
768         ArdourButton             midi_panic_button;
769         void                     midi_panic ();
770
771         void successful_graph_sort ();
772         bool _feedback_exists;
773
774         enum ArdourLogLevel {
775                 LogLevelNone = 0,
776                 LogLevelInfo,
777                 LogLevelWarning,
778                 LogLevelError
779         };
780
781         ArdourLogLevel _log_not_acknowledged;
782
783         void resize_text_widgets ();
784
785         std::string _announce_string;
786         void check_announcements ();
787
788         int do_audio_midi_setup (uint32_t);
789 };
790
791 #endif /* __ardour_gui_h__ */
792