2 Copyright (C) 2006 Paul Davis
4 This program is free software; you can redistribute it
5 and/or modify it under the terms of the GNU Lesser
6 General Public License as published by the Free Software
7 Foundation; either version 2 of the License, or (at your
8 option) any later version.
10 This program is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 GNU General Public License for more details.
15 You should have received a copy of the GNU General Public License
16 along with this program; if not, write to the Free Software
17 Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
21 #ifndef __ardour_basic_ui_h__
22 #define __ardour_basic_ui_h__
27 #include "pbd/signals.h"
29 #include "ardour/types.h"
31 #include <jack/types.h>
33 #include "timecode/time.h"
35 #include "ardour/visibility.h"
42 #ifdef ARDOURCP_DLL_EXPORTS // defined if we are building the ARDOUR Control Protocol DLL (instead of using it)
43 #define ARDOURCP_API LIBARDOUR_HELPER_DLL_EXPORT
45 #define ARDOURCP_API LIBARDOUR_HELPER_DLL_IMPORT
47 #define ARDOURCP_LOCAL LIBARDOUR_HELPER_DLL_LOCAL
49 class ARDOURCP_API BasicUI {
51 BasicUI (ARDOUR::Session&);
54 void add_marker (const std::string& = std::string());
56 void register_thread (std::string name);
58 /* transport control */
61 void access_action ( std::string action_path );
62 static PBD::Signal2<void,std::string,std::string> AccessAction;
67 void transport_stop ();
68 void transport_play (bool jump_back = true);
69 void set_transport_speed (double speed);
70 double get_transport_speed ();
72 ARDOUR::framepos_t transport_frame ();
73 void locate (ARDOUR::framepos_t frame, bool play = false);
82 void toggle_punch_in ();
83 void toggle_punch_out ();
85 void set_record_enable (bool yn);
86 bool get_record_enabled ();
88 void rec_enable_toggle ();
89 void toggle_all_rec_enables ();
91 ARDOUR::framecnt_t timecode_frames_per_hour ();
93 void timecode_time (framepos_t where, Timecode::Time&);
94 void timecode_to_sample (Timecode::Time& timecode, framepos_t & sample, bool use_offset, bool use_subframes) const;
95 void sample_to_timecode (framepos_t sample, Timecode::Time& timecode, bool use_offset, bool use_subframes) const;
99 ARDOUR::Session* session;
102 #endif /* __ardour_basic_ui_h__ */