summaryrefslogtreecommitdiff
path: root/libs/ardour/test/test_ui.cc
blob: 60bc0e83c98d261f23515eafc31586562b342fef (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
/*
 * Copyright (C) 2015 Tim Mayberry <mojofunk@gmail.com>
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation; either version 2 of the License, or
 * (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License along
 * with this program; if not, write to the Free Software Foundation, Inc.,
 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
 */

#include "test_ui.h"

#include <glibmm/threads.h>

#include "pbd/error.h"

#include "ardour/session_event.h"
#include "ardour/rc_configuration.h"

#include "pbd/abstract_ui.cc" // instantiate template

using namespace ARDOUR;

template class AbstractUI<TestUIRequest>;

TestUI::TestUI ()
	: AbstractUI<TestUIRequest> ("test_ui")
{

	pthread_set_name ("test_ui_thread");

	run_loop_thread = Glib::Threads::Thread::self ();

	set_event_loop_for_thread (this);

	SessionEvent::create_per_thread_pool ("test", 512);

	m_test_receiver.listen_to (PBD::error);
	m_test_receiver.listen_to (PBD::info);
	m_test_receiver.listen_to (PBD::fatal);
	m_test_receiver.listen_to (PBD::warning);

	/* We can't use VSTs here as we have a stub instead of the
	   required bits in gtk2_ardour.
	*/
	Config->set_use_lxvst (false);
}

TestUI::~TestUI ()
{
	m_test_receiver.hangup ();
}

void
TestUI::do_request (TestUIRequest* req)
{

}