File: user.h

package info (click to toggle)
midish 0.2.5-1
  • links: PTS
  • area: main
  • in suites: etch, etch-m68k
  • size: 760 kB
  • ctags: 1,294
  • sloc: ansic: 13,035; makefile: 119; sh: 114
file content (218 lines) | stat: -rw-r--r-- 11,417 bytes parent folder | download
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
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
/*
 * Copyright (c) 2003-2005 Alexandre Ratchov
 * All rights reserved.
 *
 * Redistribution and use in source and binary forms, with or without 
 * modification, are permitted provided that the following conditions 
 * are met:
 *
 * 	- Redistributions of source code must retain the above
 * 	  copyright notice, this list of conditions and the
 * 	  following disclaimer.
 *
 * 	- Redistributions in binary form must reproduce the above
 * 	  copyright notice, this list of conditions and the
 * 	  following disclaimer in the documentation and/or other
 * 	  materials provided with the distribution.
 *
 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
 * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 */

#ifndef MIDISH_USER_H
#define MIDISH_USER_H

struct song_s;
struct songtrk_s;
struct songchan_s;
struct songfilt_s;
struct songsx_s;

struct exec_s;
struct data_s;
struct ev_s;
struct evspec_s;
struct sysex_s;

extern struct song_s *user_song;
extern struct exec_s *user_exec;
extern struct textout_s *user_stdout;
extern unsigned user_flag_batch;
extern unsigned user_flag_verb;

void user_mainloop(void);
void user_printstr(char *);
void user_printlong(long);
void user_error(char *);
unsigned user_getopts(int *pargc, char ***pargv);

/* useful convertion functions */

unsigned exec_runfile(struct exec_s *exec, char *filename);
unsigned exec_runrcfile(struct exec_s *exec);

unsigned exec_lookuptrack(struct exec_s *o, char *var, struct songtrk_s **res);
unsigned exec_lookupchan_getnum(struct exec_s *o, char *var, unsigned *dev, unsigned *ch);
unsigned exec_lookupchan_getref(struct exec_s *o, char *var, struct songchan_s **res);
unsigned exec_lookupfilt(struct exec_s *o, char *var, struct songfilt_s **res);
unsigned exec_lookupsx(struct exec_s *o, char *var, struct songsx_s **res);
unsigned exec_lookupev(struct exec_s *o, char *name, struct ev_s *ev);
unsigned exec_lookupevspec(struct exec_s *o, char *name, struct evspec_s *e);

void	 data_print(struct data_s *d);
unsigned data_num2chan(struct data_s *o, unsigned *dev, unsigned *ch);
unsigned data_list2chan(struct data_s *o, unsigned *dev, unsigned *ch);
unsigned data_list2range(struct data_s *d, unsigned min, unsigned max, unsigned *lo, unsigned *hi);
unsigned data_matchsysex(struct data_s *d, struct sysex_s *sx, unsigned *res);

/* track functions */

unsigned user_func_tracklist(struct exec_s *o, struct data_s **r);
unsigned user_func_tracknew(struct exec_s *o, struct data_s **r);
unsigned user_func_trackdelete(struct exec_s *o, struct data_s **r);
unsigned user_func_trackrename(struct exec_s *o, struct data_s **r);
unsigned user_func_trackexists(struct exec_s *o, struct data_s **r);
unsigned user_func_trackinfo(struct exec_s *o, struct data_s **r);
unsigned user_func_trackaddev(struct exec_s *o, struct data_s **r);
unsigned user_func_tracksetcurfilt(struct exec_s *o, struct data_s **r);
unsigned user_func_trackgetcurfilt(struct exec_s *o, struct data_s **r);
unsigned user_func_trackcheck(struct exec_s *o, struct data_s **r);
unsigned user_func_trackcut(struct exec_s *o, struct data_s **r);
unsigned user_func_trackblank(struct exec_s *o, struct data_s **r);
unsigned user_func_trackcopy(struct exec_s *o, struct data_s **r);
unsigned user_func_trackinsert(struct exec_s *o, struct data_s **r);
unsigned user_func_trackquant(struct exec_s *o, struct data_s **r);
unsigned user_func_tracksetmute(struct exec_s *o, struct data_s **r);
unsigned user_func_trackgetmute(struct exec_s *o, struct data_s **r);
unsigned user_func_trackchanlist(struct exec_s *o, struct data_s **r);

/* chan functions */

unsigned user_func_chanlist(struct exec_s *o, struct data_s **r);
unsigned user_func_channew(struct exec_s *o, struct data_s **r);
unsigned user_func_chanset(struct exec_s *o, struct data_s **r);
unsigned user_func_chandelete(struct exec_s *o, struct data_s **r);
unsigned user_func_chanrename(struct exec_s *o, struct data_s **r);
unsigned user_func_chanexists(struct exec_s *o, struct data_s **r);
unsigned user_func_changetch(struct exec_s *o, struct data_s **r);
unsigned user_func_changetdev(struct exec_s *o, struct data_s **r);
unsigned user_func_chanconfev(struct exec_s *o, struct data_s **r);
unsigned user_func_chaninfo(struct exec_s *o, struct data_s **r);
unsigned user_func_changetcurinput(struct exec_s *o, struct data_s **r);
unsigned user_func_chansetcurinput(struct exec_s *o, struct data_s **r);
 
/* sysex */

unsigned user_func_sysexlist(struct exec_s *o, struct data_s **r);
unsigned user_func_sysexnew(struct exec_s *o, struct data_s **r);
unsigned user_func_sysexdelete(struct exec_s *o, struct data_s **r);
unsigned user_func_sysexrename(struct exec_s *o, struct data_s **r);
unsigned user_func_sysexexists(struct exec_s *o, struct data_s **r);
unsigned user_func_sysexinfo(struct exec_s *o, struct data_s **r);
unsigned user_func_sysexclear(struct exec_s *o, struct data_s **r);
unsigned user_func_sysexsetunit(struct exec_s *o, struct data_s **r);
unsigned user_func_sysexadd(struct exec_s *o, struct data_s **r);

/* filt functions  */

unsigned user_func_filtlist(struct exec_s *o, struct data_s **r);
unsigned user_func_filtnew(struct exec_s *o, struct data_s **r);
unsigned user_func_filtdelete(struct exec_s *o, struct data_s **r);
unsigned user_func_filtrename(struct exec_s *o, struct data_s **r);
unsigned user_func_filtexists(struct exec_s *o, struct data_s **r);
unsigned user_func_filtinfo(struct exec_s *o, struct data_s **r);
unsigned user_func_filtdevdrop(struct exec_s *o, struct data_s **r);
unsigned user_func_filtnodevdrop(struct exec_s *o, struct data_s **r);
unsigned user_func_filtdevmap(struct exec_s *o, struct data_s **r);
unsigned user_func_filtnodevmap(struct exec_s *o, struct data_s **r);
unsigned user_func_filtchandrop(struct exec_s *o, struct data_s **r);
unsigned user_func_filtnochandrop(struct exec_s *o, struct data_s **r);
unsigned user_func_filtchanmap(struct exec_s *o, struct data_s **r);
unsigned user_func_filtnochanmap(struct exec_s *o, struct data_s **r);
unsigned user_func_filtctldrop(struct exec_s *o, struct data_s **r);
unsigned user_func_filtnoctldrop(struct exec_s *o, struct data_s **r);
unsigned user_func_filtctlmap(struct exec_s *o, struct data_s **r);
unsigned user_func_filtnoctlmap(struct exec_s *o, struct data_s **r);
unsigned user_func_filtkeydrop(struct exec_s *o, struct data_s **r);
unsigned user_func_filtnokeydrop(struct exec_s *o, struct data_s **r);
unsigned user_func_filtkeymap(struct exec_s *o, struct data_s **r);
unsigned user_func_filtnokeymap(struct exec_s *o, struct data_s **r);
unsigned user_func_filtreset(struct exec_s *o, struct data_s **r);
unsigned user_func_filtchgich(struct exec_s *o, struct data_s **r);
unsigned user_func_filtchgidev(struct exec_s *o, struct data_s **r);
unsigned user_func_filtswapich(struct exec_s *o, struct data_s **r);
unsigned user_func_filtswapidev(struct exec_s *o, struct data_s **r);
unsigned user_func_filtchgoch(struct exec_s *o, struct data_s **r);
unsigned user_func_filtchgodev(struct exec_s *o, struct data_s **r);
unsigned user_func_filtswapoch(struct exec_s *o, struct data_s **r);
unsigned user_func_filtswapodev(struct exec_s *o, struct data_s **r);
unsigned user_func_filtsetcurchan(struct exec_s *o, struct data_s **r);
unsigned user_func_filtgetcurchan(struct exec_s *o, struct data_s **r);

/* song functions  */

unsigned user_func_songsetunit(struct exec_s *o, struct data_s **r);
unsigned user_func_songgetunit(struct exec_s *o, struct data_s **r);
unsigned user_func_songsetcurpos(struct exec_s *o, struct data_s **r);
unsigned user_func_songgetcurpos(struct exec_s *o, struct data_s **r);
unsigned user_func_songsetcurlen(struct exec_s *o, struct data_s **r);
unsigned user_func_songgetcurlen(struct exec_s *o, struct data_s **r);
unsigned user_func_songsetcurquant(struct exec_s *o, struct data_s **r);
unsigned user_func_songgetcurquant(struct exec_s *o, struct data_s **r);
unsigned user_func_songsetcurtrack(struct exec_s *o, struct data_s **r);
unsigned user_func_songgetcurtrack(struct exec_s *o, struct data_s **r);
unsigned user_func_songsetcurfilt(struct exec_s *o, struct data_s **r);
unsigned user_func_songgetcurfilt(struct exec_s *o, struct data_s **r);
unsigned user_func_songinfo(struct exec_s *o, struct data_s **r);
unsigned user_func_songsave(struct exec_s *o, struct data_s **r);
unsigned user_func_songload(struct exec_s *o, struct data_s **r);
unsigned user_func_songreset(struct exec_s *o, struct data_s **r);
unsigned user_func_songexportsmf(struct exec_s *o, struct data_s **r);
unsigned user_func_songimportsmf(struct exec_s *o, struct data_s **r);
unsigned user_func_songidle(struct exec_s *o, struct data_s **r);
unsigned user_func_songplay(struct exec_s *o, struct data_s **r);
unsigned user_func_songrecord(struct exec_s *o, struct data_s **r);
unsigned user_func_songsettempo(struct exec_s *o, struct data_s **r);
unsigned user_func_songtimeins(struct exec_s *o, struct data_s **r);
unsigned user_func_songtimerm(struct exec_s *o, struct data_s **r);
unsigned user_func_songtimeinfo(struct exec_s *o, struct data_s **r);
unsigned user_func_songsetcursysex(struct exec_s *o, struct data_s **r);
unsigned user_func_songgetcursysex(struct exec_s *o, struct data_s **r);
unsigned user_func_songsetcurchan(struct exec_s *o, struct data_s **r);
unsigned user_func_songgetcurchan(struct exec_s *o, struct data_s **r);
unsigned user_func_songsetcurinput(struct exec_s *o, struct data_s **r);
unsigned user_func_songgetcurinput(struct exec_s *o, struct data_s **r);

/* device functions */

unsigned user_func_devlist(struct exec_s *o, struct data_s **r);
unsigned user_func_devattach(struct exec_s *o, struct data_s **r);
unsigned user_func_devdetach(struct exec_s *o, struct data_s **r);
unsigned user_func_devsetmaster(struct exec_s *o, struct data_s **r);
unsigned user_func_devgetmaster(struct exec_s *o, struct data_s **r);
unsigned user_func_devsendrt(struct exec_s *o, struct data_s **r);
unsigned user_func_devticrate(struct exec_s *o, struct data_s **r);
unsigned user_func_devinfo(struct exec_s *o, struct data_s **r);
 
/* misc */

unsigned user_func_metroswitch(struct exec_s *o, struct data_s **r);
unsigned user_func_metroconf(struct exec_s *o, struct data_s **r);
unsigned user_func_shut(struct exec_s *o, struct data_s **r);
unsigned user_func_sendraw(struct exec_s *o, struct data_s **r);
unsigned user_func_panic(struct exec_s *o, struct data_s **r);
unsigned user_func_debug(struct exec_s *o, struct data_s **r);
unsigned user_func_exec(struct exec_s *o, struct data_s **r);
unsigned user_func_print(struct exec_s *o, struct data_s **r);
unsigned user_func_info(struct exec_s *o, struct data_s **r);

#endif /* MIDISH_USER_H */