2313
|
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_VOICEPRINT, 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 typedef enum {
|
|
50 VOICEPRINT_NORMAL, VOICEPRINT_FIRE, VOICEPRINT_ICE
|
|
51 } VoiceprintMode;
|
|
52
|
|
53
|
|
54 typedef enum {
|
|
55 VU_NORMAL, VU_SMOOTH
|
|
56 } VUMode;
|
|
57
|
|
58 typedef enum {
|
|
59 REFRESH_FULL, REFRESH_HALF, REFRESH_QUARTER, REFRESH_EIGTH
|
|
60 } RefreshRate;
|
|
61
|
|
62 typedef enum {
|
|
63 FALLOFF_SLOWEST, FALLOFF_SLOW, FALLOFF_MEDIUM, FALLOFF_FAST,
|
|
64 FALLOFF_FASTEST
|
|
65 } FalloffSpeed;
|
|
66
|
|
67 #define VIS(x) ((Vis *)(x))
|
|
68 struct _Vis {
|
|
69 Widget vs_widget;
|
|
70 GdkWindow *vs_window;
|
|
71 gfloat vs_data[75], vs_peak[75], vs_peak_speed[75];
|
|
72 gint vs_refresh_delay;
|
|
73 gboolean vs_doublesize;
|
|
74 };
|
|
75
|
|
76
|
|
77 typedef struct _Vis Vis;
|
|
78
|
|
79 void vis_draw(Widget * w);
|
|
80 void vis_draw_pixel(Vis * vis, guchar *texture, gint x, gint y, guint8 colour);
|
|
81
|
|
82 Vis *create_vis(GList ** wlist, GdkPixmap * parent, GdkWindow * window,
|
|
83 GdkGC * gc, gint x, gint y, gint width, gboolean doublesize);
|
|
84 void vis_timeout_func(Vis * vis, guchar * data);
|
|
85 void vis_clear_data(Vis * vis);
|
|
86 void vis_clear(Vis * vis);
|
|
87 void vis_set_doublesize(Vis * vis, gboolean doublesize);
|
|
88 void vis_set_window(Vis * vis, GdkWindow * window);
|
|
89
|
|
90 #endif
|