~ubuntu-branches/ubuntu/breezy/kdemultimedia/breezy

« back to all changes in this revision

Viewing changes to kmidi/controls.h

  • Committer: Bazaar Package Importer
  • Author(s): Jonathan Riddell
  • Date: 2005-03-24 04:48:58 UTC
  • mfrom: (1.2.1 upstream) (2.1.1 sarge)
  • Revision ID: james.westby@ubuntu.com-20050324044858-8ff88o9jxej6ii3d
Tags: 4:3.4.0-0ubuntu3
Add kubuntu_02_hide_arts_menu_entries.diff to hide artsbuilder and artscontrol k-menu entries

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
/*
2
 
 
3
 
    TiMidity -- Experimental MIDI to WAVE converter
4
 
    Copyright (C) 1995 Tuukka Toivonen <toivonen@clinet.fi>
5
 
 
6
 
    This program is free software; you can redistribute it and/or modify
7
 
    it under the terms of the GNU General Public License as published by
8
 
    the Free Software Foundation; either version 2 of the License, or
9
 
    (at your option) any later version.
10
 
 
11
 
    This program is distributed in the hope that it will be useful,
12
 
    but WITHOUT ANY WARRANTY; without even the implied warranty of
13
 
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14
 
    GNU General Public License for more details.
15
 
 
16
 
    You should have received a copy of the GNU General Public License
17
 
    along with this program; if not, write to the Free Software
18
 
    Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
19
 
 
20
 
    controls.h
21
 
*/
22
 
 
23
 
/* Return values for ControlMode.read */
24
 
 
25
 
#define RC_ERROR -1
26
 
#define RC_NONE 0
27
 
#define RC_QUIT 1
28
 
#define RC_NEXT 2
29
 
#define RC_PREVIOUS 3 /* Restart this song at beginning, or the previous
30
 
                         song if we're less than a second into this one. */
31
 
#define RC_FORWARD 4
32
 
#define RC_BACK 5
33
 
#define RC_JUMP 6
34
 
#define RC_TOGGLE_PAUSE 7 /* Pause/continue */
35
 
#define RC_RESTART 8 /* Restart song at beginning */
36
 
 
37
 
#define RC_PAUSE 9 /* Really pause playing */
38
 
#define RC_CONTINUE 10 /* Continue if paused */
39
 
#define RC_REALLY_PREVIOUS 11 /* Really go to the previous song */
40
 
#define RC_CHANGE_VOLUME 12
41
 
#define RC_LOAD_FILE 13         /* Load a new midifile */
42
 
#define RC_TUNE_END 14          /* The tune is over, play it again sam? */
43
 
#define RC_TRY_OPEN_DEVICE 15
44
 
#define RC_PATCHCHANGE 16
45
 
#define RC_CHANGE_VOICES 17
46
 
#define RC_STOP 18
47
 
 
48
 
#define CMSG_INFO       0
49
 
#define CMSG_WARNING    1
50
 
#define CMSG_ERROR      2
51
 
#define CMSG_FATAL      3
52
 
#define CMSG_TRACE      4
53
 
#define CMSG_TIME       5
54
 
#define CMSG_TOTAL      6
55
 
#define CMSG_FILE       7
56
 
#define CMSG_TEXT       8
57
 
#define CMSG_LYRIC      9
58
 
 
59
 
#define VERB_ALWAYS     -1
60
 
#define VERB_NORMAL     0
61
 
#define VERB_VERBOSE    1
62
 
#define VERB_NOISY      2
63
 
#define VERB_DEBUG      3
64
 
#define VERB_DEBUG_SILLY        4
65
 
 
66
 
/* 
67
 
 * MESSAGE FROM KERNEL TO MOTIF
68
 
 */
69
 
#define REFRESH_MESSAGE 1
70
 
#define HELPMODE_MESSAGE 2
71
 
#define TOTALTIME_MESSAGE 3
72
 
#define MASTERVOL_MESSAGE 4
73
 
#define FILENAME_MESSAGE 5
74
 
#define CURTIME_MESSAGE 6
75
 
#define NOTE_MESSAGE 7
76
 
#define PROGRAM_MESSAGE 8
77
 
#define VOLUME_MESSAGE 9
78
 
#define EXPRESSION_MESSAGE 10
79
 
#define PANNING_MESSAGE 11
80
 
#define SUSTAIN_MESSAGE 12
81
 
#define PITCH_MESSAGE 13
82
 
#define RESET_MESSAGE 14
83
 
#define CLOSE_MESSAGE 15
84
 
#define CMSG_MESSAGE 16
85
 
#define FILE_LIST_MESSAGE 17
86
 
#define NEXT_FILE_MESSAGE 18
87
 
#define PREV_FILE_MESSAGE 19
88
 
#define TUNE_END_MESSAGE 20
89
 
#define DEVICE_OPEN 21
90
 
#define DEVICE_NOT_OPEN 22
91
 
#define PATCH_CHANGED_MESSAGE 23
92
 
#define JUMP_MESSAGE 24
93
 
/* 
94
 
 * MESSAGE ON THE PIPE FROM MOTIF TOWARD KERNEL
95
 
 */
96
 
#define MOTIF_CHANGE_VOLUME 1
97
 
#define MOTIF_CHANGE_LOCATOR 2
98
 
#define MOTIF_QUIT 3
99
 
#define MOTIF_PLAY_FILE 4
100
 
#define MOTIF_NEXT 5
101
 
#define MOTIF_PREV 6
102
 
#define MOTIF_RESTART 7
103
 
#define MOTIF_FWD 8
104
 
#define MOTIF_RWD 9
105
 
#define MOTIF_PAUSE 10
106
 
#define TRY_OPEN_DEVICE 11
107
 
#define MOTIF_PATCHSET 12
108
 
#define MOTIF_EFFECTS 13
109
 
#define MOTIF_CHANGE_VOICES 14
110
 
#define MOTIF_CHECK_STATE 15
111
 
#define MOTIF_FILTER 16
112
 
#define MOTIF_INTERPOLATION 17
113
 
#define MOTIF_REVERB 18
114
 
#define MOTIF_CHORUS 19
115
 
#define MOTIF_DRY 20
116
 
#define MOTIF_STOP 21
117
 
#define MOTIF_EVS 22
118
 
 
119
 
/* from TiMidity++, but not implemented */
120
 
#define MOTIF_KEYUP 23
121
 
#define MOTIF_KEYDOWN 24
122
 
#define MOTIF_SLOWER 25
123
 
#define MOTIF_FASTER 26
124
 
#define MOTIF_TOGGLE_DRUMS 27
125
 
 
126
 
 
127
 
typedef struct {
128
 
  const char *id_name;
129
 
  char id_character;
130
 
  int verbosity, trace_playing, opened;
131
 
 
132
 
  int (*open)(int using_stdin, int using_stdout);
133
 
  void (*pass_playing_list)(int number_of_files, const char *list_of_files[]);
134
 
  void (*close)(void);
135
 
  int (*read)(int32 *valp);
136
 
  int (*cmsg)(int type, int verbosity_level, const char *fmt, ...);
137
 
 
138
 
  void (*refresh)(void);
139
 
  void (*reset)(void);
140
 
  void (*file_name)(char *name);
141
 
  void (*total_time)(uint32 tt);
142
 
  void (*current_time)(uint32 ct);
143
 
 
144
 
  void (*note)(int v);
145
 
  void (*master_volume)(int mv);
146
 
  void (*program)(int channel, int val, const char *name);
147
 
  void (*volume)(int channel, int val);
148
 
  void (*expression)(int channel, int val);
149
 
  void (*panning)(int channel, int val);
150
 
  void (*sustain)(int channel, int val);
151
 
  void (*pitch_bend)(int channel, int val);
152
 
  
153
 
} ControlMode;
154
 
 
155
 
extern int last_rc_command;
156
 
extern int last_rc_arg;
157
 
extern ControlMode *ctl_list[], *ctl; 
158
 
extern int check_for_rc(void);