-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathvkb.h
79 lines (68 loc) · 2.09 KB
/
vkb.h
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
67
68
69
70
71
72
73
74
75
76
77
78
79
/*
* Virtual Tiny Keyboard
*
* Copyright (c) 1997-2000 by Takashi Iwai
*
* 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., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
#ifndef VKB_H_DEF
#define VKB_H_DEF
#include <tcl.h>
#ifdef HAVE_LASH
#include <lash/lash.h>
#endif
#ifndef VKB_TCLFILE
#define VKB_TCLFILE "/usr/local/bin/vkeybd.tcl"
#endif
/*
* device operator
*/
typedef struct vkb_oper_t {
int (*open)(Tcl_Interp *ip, void **private_return);
void (*close)(Tcl_Interp *ip, void *private);
void (*program)(Tcl_Interp *ip, void *private, int bank, int prg); /* bank=128: drum */
void (*noteon)(Tcl_Interp *ip, void *private, int note, int vel);
void (*noteoff)(Tcl_Interp *ip, void *private, int note, int vel);
void (*control)(Tcl_Interp *ip, void *private, int type, int val);
void (*bender)(Tcl_Interp *ip, void *private, int bend); /* -8192 to 8192 */
void (*chorus_mode)(Tcl_Interp *ip, void *private, int mode);
void (*reverb_mode)(Tcl_Interp *ip, void *private, int mode);
} vkb_oper_t;
/*
* Tcl global option variables
*/
typedef struct vkb_optarg_t {
char *name;
char *defval;
char *desc;
} vkb_optarg_t;
/*
* device information
*/
typedef struct vkb_devinfo_t {
char *name;
char *desc;
int delayed_open;
vkb_oper_t *oper;
vkb_optarg_t *opts;
} vkb_devinfo_t;
extern int vkb_num_devices;
extern vkb_devinfo_t *vkb_device[];
void vkb_error(Tcl_Interp *ip, char *fmt, ...);
int vkb_get_int(Tcl_Interp *ip, char *opt, int *ret);
#ifdef HAVE_LASH
extern lash_args_t *lash_args;
#endif
#endif