File: x_trace.h

package info (click to toggle)
timidity 2.14.0-8.3
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 11,556 kB
  • sloc: ansic: 168,736; sh: 3,730; makefile: 1,405; tcl: 1,048; perl: 285; ruby: 126
file content (85 lines) | stat: -rw-r--r-- 2,791 bytes parent folder | download | duplicates (4)
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
/*
    TiMidity++ -- MIDI to WAVE converter and player
    Copyright (C) 1999-2002 Masanao Izumo <mo@goice.co.jp>
    Copyright (C) 1995 Tuukka Toivonen <tt@cgs.fi>

    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, USA
 
    x_trace.h: 
        based on code by Yoshishige Arai (ryo2@on.rim.or.jp)
        modified by Yair Kalvariski <cesium2@gmail.com>
*/

#ifndef _X_TRACE_H
#define _X_TRACE_H

#include <X11/Intrinsic.h>
#include "timidity.h"
#include "common.h"
#include "instrum.h"
#include "playmidi.h"
#include "xaw_p.h"

#define MAX_TRACE_CHANNELS MAX_CHANNELS
#if MAX_TRACE_CHANNELS > 16
#define D_VISIBLE_CHANNELS 16
#else
#define D_VISIBLE_CHANNELS MAX_TRACE_CHANNELS
#endif /* MAX_TRACE_CHANNELS > 16 */

#define TRACE_UPDATE_TIME 0.1
#define DELTA_VEL	32

#define TRACE_WIDTH	627	/* default width of trace_vport */
#define TRACE_HEADER	22
#define TRACE_FOOT	22
#define TRACE_HOFS	0
#define FOOT_HOFS	2
#define BAR_SPACE	20
#define BAR_HEIGHT	16	/* BAR_SPACE without border lines */
#define INST_NAME_SIZE	16

#define CHANNEL_HEIGHT(ch) BAR_SPACE*(ch)+TRACE_HEADER
#define TRACE_HEIGHT CHANNEL_HEIGHT(D_VISIBLE_CHANNELS)
#define TRACE_HEIGHT_WITH_FOOTER (TRACE_HEIGHT+TRACE_FOOT)

typedef struct {
  int Red_depth, Green_depth, Blue_depth;
  int Red_sft, Green_sft, Blue_sft;
} RGBInfo;

typedef struct _tconfig {
  Boolean gradient_bar;
  Dimension trace_width, trace_height;
  XFontSet c_trace_font, c_title_font;
  Pixel common_fgcolor, text_bgcolor,
        velocity_color, drumvelocity_color, volume_color, expr_color, pan_color,
        trace_bgcolor, rim_color, box_color, caption_color, sus_color,
        white_key_color, black_key_color, play_color, rev_color, cho_color;
  String untitled;
} tconfig;

extern int getLowestVisibleChan(void);
extern int getVisibleChanNum(void);
extern int handleTraceinput(char *);
extern void initStatus(void);
extern void initTrace(Display *, Window, char *, tconfig *);
extern void redrawCaption(Boolean);
extern void redrawTrace(Boolean);
extern void scrollTrace(int);
extern void toggleTracePlane(Boolean);
extern void uninitTrace(void);

#endif /* _X_TRACE_I_H */