1653
|
1 /* BMP - Cross-platform multimedia player
|
|
2 * Copyright (C) 2003-2004 BMP development team.
|
|
3 *
|
|
4 * Based on XMMS:
|
|
5 * Copyright (C) 1998-2003 XMMS development team.
|
|
6 *
|
|
7 * This program is free software; you can redistribute it and/or modify
|
|
8 * it under the terms of the GNU General Public License as published by
|
|
9 * the Free Software Foundation; either version 2 of the License, or
|
|
10 * (at your option) any later version.
|
|
11 *
|
|
12 * This program is distributed in the hope that it will be useful,
|
|
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
15 * GNU General Public License for more details.
|
|
16 *
|
|
17 * You should have received a copy of the GNU General Public License
|
|
18 * along with this program; if not, write to the Free Software
|
|
19 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
|
20 */
|
|
21
|
|
22 #ifndef _WIDGETCORE_H_
|
|
23 #error Please do not include me directly! Use widgetcore.h instead!
|
|
24 #endif
|
|
25
|
|
26 #ifndef VIS_H
|
|
27 #define VIS_H
|
|
28
|
|
29 #include <glib.h>
|
|
30 #include <gdk/gdk.h>
|
|
31
|
|
32 #include "widget.h"
|
|
33
|
|
34 typedef enum {
|
|
35 VIS_ANALYZER, VIS_SCOPE, VIS_OFF
|
|
36 } VisType;
|
|
37
|
|
38 typedef enum {
|
|
39 ANALYZER_NORMAL, ANALYZER_FIRE, ANALYZER_VLINES
|
|
40 } AnalyzerMode;
|
|
41
|
|
42 typedef enum {
|
|
43 ANALYZER_LINES, ANALYZER_BARS
|
|
44 } AnalyzerType;
|
|
45
|
|
46 typedef enum {
|
|
47 SCOPE_DOT, SCOPE_LINE, SCOPE_SOLID
|
|
48 } ScopeMode;
|
|
49
|
|
50 typedef enum {
|
|
51 VU_NORMAL, VU_SMOOTH
|
|
52 } VUMode;
|
|
53
|
|
54 typedef enum {
|
|
55 REFRESH_FULL, REFRESH_HALF, REFRESH_QUARTER, REFRESH_EIGTH
|
|
56 } RefreshRate;
|
|
57
|
|
58 typedef enum {
|
|
59 FALLOFF_SLOWEST, FALLOFF_SLOW, FALLOFF_MEDIUM, FALLOFF_FAST,
|
|
60 FALLOFF_FASTEST
|
|
61 } FalloffSpeed;
|
|
62
|
|
63 #define VIS(x) ((Vis *)(x))
|
|
64 struct _Vis {
|
|
65 Widget vs_widget;
|
|
66 GdkWindow *vs_window;
|
|
67 gfloat vs_data[75], vs_peak[75], vs_peak_speed[75];
|
|
68 gint vs_refresh_delay;
|
|
69 };
|
|
70
|
|
71 typedef struct _Vis Vis;
|
|
72
|
|
73 void vis_draw(Widget * w);
|
|
74
|
|
75 Vis *create_vis(GList ** wlist, GdkPixmap * parent, GdkWindow * window,
|
|
76 GdkGC * gc, gint x, gint y, gint width);
|
|
77 void vis_timeout_func(Vis * vis, guchar * data);
|
|
78 void vis_clear_data(Vis * vis);
|
|
79 void vis_clear(Vis * vis);
|
|
80 void vis_set_window(Vis * vis, GdkWindow * window);
|
|
81
|
|
82 #endif
|