aboutsummaryrefslogtreecommitdiff
path: root/plugins/synthpod_lv2_ui.c
blob: 1df7ed888111dbf3efc70c838ef12724c2bb115c (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
/*
 * Copyright (c) 2015-2016 Hanspeter Portner (dev@open-music-kontrollers.ch)
 *
 * This is free software: you can redistribute it and/or modify
 * it under the terms of the Artistic License 2.0 as published by
 * The Perl Foundation.
 *
 * This source 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
 * Artistic License 2.0 for more details.
 *
 * You should have received a copy of the Artistic License 2.0
 * along the source as a COPYING file. If not, obtain it from
 * http://www.perlfoundation.org/artistic_license_2_0.
 */

#include <synthpod_lv2.h>
#include <sandbox_ui.h>

const LV2UI_Descriptor synthpod_common_1_ui = {
	.URI						= SYNTHPOD_COMMON_UI_URI,
	.instantiate		= sandbox_ui_instantiate,
	.cleanup				= sandbox_ui_cleanup,
	.port_event			= sandbox_ui_port_event,
	.extension_data	= sandbox_ui_extension_data
};

const LV2UI_Descriptor synthpod_common_2_kx = {
	.URI						= SYNTHPOD_COMMON_KX_URI,
	.instantiate		= sandbox_ui_instantiate,
	.cleanup				= sandbox_ui_cleanup,
	.port_event			= sandbox_ui_port_event,
	.extension_data	= NULL
};

#ifdef _WIN32
__declspec(dllexport)
#else
__attribute__((visibility("default")))
#endif
const LV2UI_Descriptor*
lv2ui_descriptor(uint32_t index)
{
	switch(index)
	{
		case 0:
			return &synthpod_common_1_ui;
		case 1:
			return &synthpod_common_2_kx;

		default:
			return NULL;
	}
}