annotate audacious/widgets/svis.c @ 1653:a6e6d3500c13 trunk

[svn] - revert back to r2216
author nenolod
date Thu, 07 Sep 2006 22:26:54 -0700
parents
children 1d9c1026d9f8
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
1653
a6e6d3500c13 [svn] - revert back to r2216
nenolod
parents:
diff changeset
1 /* BMP - Cross-platform multimedia player
a6e6d3500c13 [svn] - revert back to r2216
nenolod
parents:
diff changeset
2 * Copyright (C) 2003-2004 BMP development team.
a6e6d3500c13 [svn] - revert back to r2216
nenolod
parents:
diff changeset
3 *
a6e6d3500c13 [svn] - revert back to r2216
nenolod
parents:
diff changeset
4 * Based on XMMS:
a6e6d3500c13 [svn] - revert back to r2216
nenolod
parents:
diff changeset
5 * Copyright (C) 1998-2003 XMMS development team.
a6e6d3500c13 [svn] - revert back to r2216
nenolod
parents:
diff changeset
6 *
a6e6d3500c13 [svn] - revert back to r2216
nenolod
parents:
diff changeset
7 * This program is free software; you can redistribute it and/or modify
a6e6d3500c13 [svn] - revert back to r2216
nenolod
parents:
diff changeset
8 * it under the terms of the GNU General Public License as published by
a6e6d3500c13 [svn] - revert back to r2216
nenolod
parents:
diff changeset
9 * the Free Software Foundation; either version 2 of the License, or
a6e6d3500c13 [svn] - revert back to r2216
nenolod
parents:
diff changeset
10 * (at your option) any later version.
a6e6d3500c13 [svn] - revert back to r2216
nenolod
parents:
diff changeset
11 *
a6e6d3500c13 [svn] - revert back to r2216
nenolod
parents:
diff changeset
12 * This program is distributed in the hope that it will be useful,
a6e6d3500c13 [svn] - revert back to r2216
nenolod
parents:
diff changeset
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
a6e6d3500c13 [svn] - revert back to r2216
nenolod
parents:
diff changeset
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
a6e6d3500c13 [svn] - revert back to r2216
nenolod
parents:
diff changeset
15 * GNU General Public License for more details.
a6e6d3500c13 [svn] - revert back to r2216
nenolod
parents:
diff changeset
16 *
a6e6d3500c13 [svn] - revert back to r2216
nenolod
parents:
diff changeset
17 * You should have received a copy of the GNU General Public License
a6e6d3500c13 [svn] - revert back to r2216
nenolod
parents:
diff changeset
18 * along with this program; if not, write to the Free Software
a6e6d3500c13 [svn] - revert back to r2216
nenolod
parents:
diff changeset
19 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
a6e6d3500c13 [svn] - revert back to r2216
nenolod
parents:
diff changeset
20 */
a6e6d3500c13 [svn] - revert back to r2216
nenolod
parents:
diff changeset
21
a6e6d3500c13 [svn] - revert back to r2216
nenolod
parents:
diff changeset
22 #include "widgetcore.h"
a6e6d3500c13 [svn] - revert back to r2216
nenolod
parents:
diff changeset
23
a6e6d3500c13 [svn] - revert back to r2216
nenolod
parents:
diff changeset
24 #include <glib.h>
a6e6d3500c13 [svn] - revert back to r2216
nenolod
parents:
diff changeset
25 #include <gdk/gdk.h>
a6e6d3500c13 [svn] - revert back to r2216
nenolod
parents:
diff changeset
26 #include <string.h>
a6e6d3500c13 [svn] - revert back to r2216
nenolod
parents:
diff changeset
27
a6e6d3500c13 [svn] - revert back to r2216
nenolod
parents:
diff changeset
28 #include "main.h"
a6e6d3500c13 [svn] - revert back to r2216
nenolod
parents:
diff changeset
29 #include "mainwin.h"
a6e6d3500c13 [svn] - revert back to r2216
nenolod
parents:
diff changeset
30 #include "plugin.h"
a6e6d3500c13 [svn] - revert back to r2216
nenolod
parents:
diff changeset
31 #include "widget.h"
a6e6d3500c13 [svn] - revert back to r2216
nenolod
parents:
diff changeset
32 #include "vis.h"
a6e6d3500c13 [svn] - revert back to r2216
nenolod
parents:
diff changeset
33
a6e6d3500c13 [svn] - revert back to r2216
nenolod
parents:
diff changeset
34 static gint svis_redraw_delays[] = { 1, 2, 4, 8 };
a6e6d3500c13 [svn] - revert back to r2216
nenolod
parents:
diff changeset
35
a6e6d3500c13 [svn] - revert back to r2216
nenolod
parents:
diff changeset
36 /* FIXME: Are the svis_scope_colors correct? */
a6e6d3500c13 [svn] - revert back to r2216
nenolod
parents:
diff changeset
37 static guint8 svis_scope_colors[] = { 20, 19, 18, 19, 20 };
a6e6d3500c13 [svn] - revert back to r2216
nenolod
parents:
diff changeset
38 static guint8 svis_vu_normal_colors[] = { 17, 17, 17, 12, 12, 12, 2, 2 };
a6e6d3500c13 [svn] - revert back to r2216
nenolod
parents:
diff changeset
39
a6e6d3500c13 [svn] - revert back to r2216
nenolod
parents:
diff changeset
40 #define DRAW_DS_PIXEL(ptr,value) \
a6e6d3500c13 [svn] - revert back to r2216
nenolod
parents:
diff changeset
41 *(ptr) = (value); \
a6e6d3500c13 [svn] - revert back to r2216
nenolod
parents:
diff changeset
42 *((ptr) + 1) = (value); \
a6e6d3500c13 [svn] - revert back to r2216
nenolod
parents:
diff changeset
43 *((ptr) + 76) = (value); \
a6e6d3500c13 [svn] - revert back to r2216
nenolod
parents:
diff changeset
44 *((ptr) + 77) = (value);
a6e6d3500c13 [svn] - revert back to r2216
nenolod
parents:
diff changeset
45
a6e6d3500c13 [svn] - revert back to r2216
nenolod
parents:
diff changeset
46 #define SVIS_HEIGHT 5
a6e6d3500c13 [svn] - revert back to r2216
nenolod
parents:
diff changeset
47 #define SVIS_WIDTH 38
a6e6d3500c13 [svn] - revert back to r2216
nenolod
parents:
diff changeset
48
a6e6d3500c13 [svn] - revert back to r2216
nenolod
parents:
diff changeset
49 void
a6e6d3500c13 [svn] - revert back to r2216
nenolod
parents:
diff changeset
50 svis_timeout_func(SVis * svis, guchar * data)
a6e6d3500c13 [svn] - revert back to r2216
nenolod
parents:
diff changeset
51 {
a6e6d3500c13 [svn] - revert back to r2216
nenolod
parents:
diff changeset
52 static GTimer *timer = NULL;
a6e6d3500c13 [svn] - revert back to r2216
nenolod
parents:
diff changeset
53 gulong micros = 9999999;
a6e6d3500c13 [svn] - revert back to r2216
nenolod
parents:
diff changeset
54 gboolean falloff = FALSE;
a6e6d3500c13 [svn] - revert back to r2216
nenolod
parents:
diff changeset
55 gint i;
a6e6d3500c13 [svn] - revert back to r2216
nenolod
parents:
diff changeset
56
a6e6d3500c13 [svn] - revert back to r2216
nenolod
parents:
diff changeset
57 if (!timer) {
a6e6d3500c13 [svn] - revert back to r2216
nenolod
parents:
diff changeset
58 timer = g_timer_new();
a6e6d3500c13 [svn] - revert back to r2216
nenolod
parents:
diff changeset
59 g_timer_start(timer);
a6e6d3500c13 [svn] - revert back to r2216
nenolod
parents:
diff changeset
60 }
a6e6d3500c13 [svn] - revert back to r2216
nenolod
parents:
diff changeset
61 else {
a6e6d3500c13 [svn] - revert back to r2216
nenolod
parents:
diff changeset
62 g_timer_elapsed(timer, &micros);
a6e6d3500c13 [svn] - revert back to r2216
nenolod
parents:
diff changeset
63 if (micros > 14000)
a6e6d3500c13 [svn] - revert back to r2216
nenolod
parents:
diff changeset
64 g_timer_reset(timer);
a6e6d3500c13 [svn] - revert back to r2216
nenolod
parents:
diff changeset
65
a6e6d3500c13 [svn] - revert back to r2216
nenolod
parents:
diff changeset
66 }
a6e6d3500c13 [svn] - revert back to r2216
nenolod
parents:
diff changeset
67
a6e6d3500c13 [svn] - revert back to r2216
nenolod
parents:
diff changeset
68 if (cfg.vis_type == INPUT_VIS_ANALYZER) {
a6e6d3500c13 [svn] - revert back to r2216
nenolod
parents:
diff changeset
69 if (micros > 14000)
a6e6d3500c13 [svn] - revert back to r2216
nenolod
parents:
diff changeset
70 falloff = TRUE;
a6e6d3500c13 [svn] - revert back to r2216
nenolod
parents:
diff changeset
71
a6e6d3500c13 [svn] - revert back to r2216
nenolod
parents:
diff changeset
72 for (i = 0; i < 2; i++) {
a6e6d3500c13 [svn] - revert back to r2216
nenolod
parents:
diff changeset
73 if (falloff || data) {
a6e6d3500c13 [svn] - revert back to r2216
nenolod
parents:
diff changeset
74 if (data && data[i] > svis->vs_data[i])
a6e6d3500c13 [svn] - revert back to r2216
nenolod
parents:
diff changeset
75 svis->vs_data[i] = data[i];
a6e6d3500c13 [svn] - revert back to r2216
nenolod
parents:
diff changeset
76 else if (falloff) {
a6e6d3500c13 [svn] - revert back to r2216
nenolod
parents:
diff changeset
77 if (svis->vs_data[i] >= 2)
a6e6d3500c13 [svn] - revert back to r2216
nenolod
parents:
diff changeset
78 svis->vs_data[i] -= 2;
a6e6d3500c13 [svn] - revert back to r2216
nenolod
parents:
diff changeset
79 else
a6e6d3500c13 [svn] - revert back to r2216
nenolod
parents:
diff changeset
80 svis->vs_data[i] = 0;
a6e6d3500c13 [svn] - revert back to r2216
nenolod
parents:
diff changeset
81 }
a6e6d3500c13 [svn] - revert back to r2216
nenolod
parents:
diff changeset
82 }
a6e6d3500c13 [svn] - revert back to r2216
nenolod
parents:
diff changeset
83
a6e6d3500c13 [svn] - revert back to r2216
nenolod
parents:
diff changeset
84 }
a6e6d3500c13 [svn] - revert back to r2216
nenolod
parents:
diff changeset
85 }
a6e6d3500c13 [svn] - revert back to r2216
nenolod
parents:
diff changeset
86 else if (data) {
a6e6d3500c13 [svn] - revert back to r2216
nenolod
parents:
diff changeset
87 for (i = 0; i < 75; i++)
a6e6d3500c13 [svn] - revert back to r2216
nenolod
parents:
diff changeset
88 svis->vs_data[i] = data[i];
a6e6d3500c13 [svn] - revert back to r2216
nenolod
parents:
diff changeset
89 }
a6e6d3500c13 [svn] - revert back to r2216
nenolod
parents:
diff changeset
90
a6e6d3500c13 [svn] - revert back to r2216
nenolod
parents:
diff changeset
91 if (micros > 14000) {
a6e6d3500c13 [svn] - revert back to r2216
nenolod
parents:
diff changeset
92 if (!svis->vs_refresh_delay) {
a6e6d3500c13 [svn] - revert back to r2216
nenolod
parents:
diff changeset
93 svis_draw((Widget *) svis);
a6e6d3500c13 [svn] - revert back to r2216
nenolod
parents:
diff changeset
94 svis->vs_refresh_delay = svis_redraw_delays[cfg.vis_refresh];
a6e6d3500c13 [svn] - revert back to r2216
nenolod
parents:
diff changeset
95
a6e6d3500c13 [svn] - revert back to r2216
nenolod
parents:
diff changeset
96 }
a6e6d3500c13 [svn] - revert back to r2216
nenolod
parents:
diff changeset
97 svis->vs_refresh_delay--;
a6e6d3500c13 [svn] - revert back to r2216
nenolod
parents:
diff changeset
98 }
a6e6d3500c13 [svn] - revert back to r2216
nenolod
parents:
diff changeset
99 }
a6e6d3500c13 [svn] - revert back to r2216
nenolod
parents:
diff changeset
100
a6e6d3500c13 [svn] - revert back to r2216
nenolod
parents:
diff changeset
101 void
a6e6d3500c13 [svn] - revert back to r2216
nenolod
parents:
diff changeset
102 svis_draw(Widget * w)
a6e6d3500c13 [svn] - revert back to r2216
nenolod
parents:
diff changeset
103 {
a6e6d3500c13 [svn] - revert back to r2216
nenolod
parents:
diff changeset
104 SVis *svis = (SVis *) w;
a6e6d3500c13 [svn] - revert back to r2216
nenolod
parents:
diff changeset
105 gint x, y, h;
a6e6d3500c13 [svn] - revert back to r2216
nenolod
parents:
diff changeset
106 guchar svis_color[24][3];
a6e6d3500c13 [svn] - revert back to r2216
nenolod
parents:
diff changeset
107 guchar rgb_data[SVIS_WIDTH * 2 * SVIS_HEIGHT * 2], *ptr, c;
a6e6d3500c13 [svn] - revert back to r2216
nenolod
parents:
diff changeset
108 guint32 colors[24];
a6e6d3500c13 [svn] - revert back to r2216
nenolod
parents:
diff changeset
109 GdkRgbCmap *cmap;
a6e6d3500c13 [svn] - revert back to r2216
nenolod
parents:
diff changeset
110
a6e6d3500c13 [svn] - revert back to r2216
nenolod
parents:
diff changeset
111 GDK_THREADS_ENTER();
a6e6d3500c13 [svn] - revert back to r2216
nenolod
parents:
diff changeset
112
a6e6d3500c13 [svn] - revert back to r2216
nenolod
parents:
diff changeset
113 skin_get_viscolor(bmp_active_skin, svis_color);
a6e6d3500c13 [svn] - revert back to r2216
nenolod
parents:
diff changeset
114 for (y = 0; y < 24; y++) {
a6e6d3500c13 [svn] - revert back to r2216
nenolod
parents:
diff changeset
115 colors[y] =
a6e6d3500c13 [svn] - revert back to r2216
nenolod
parents:
diff changeset
116 svis_color[y][0] << 16 | svis_color[y][1] << 8 | svis_color[y][2];
a6e6d3500c13 [svn] - revert back to r2216
nenolod
parents:
diff changeset
117 }
a6e6d3500c13 [svn] - revert back to r2216
nenolod
parents:
diff changeset
118 cmap = gdk_rgb_cmap_new(colors, 24);
a6e6d3500c13 [svn] - revert back to r2216
nenolod
parents:
diff changeset
119
a6e6d3500c13 [svn] - revert back to r2216
nenolod
parents:
diff changeset
120 memset(rgb_data, 0, SVIS_WIDTH * SVIS_HEIGHT);
a6e6d3500c13 [svn] - revert back to r2216
nenolod
parents:
diff changeset
121 if (cfg.vis_type == VIS_ANALYZER) {
a6e6d3500c13 [svn] - revert back to r2216
nenolod
parents:
diff changeset
122 switch (cfg.vu_mode) {
a6e6d3500c13 [svn] - revert back to r2216
nenolod
parents:
diff changeset
123 case VU_NORMAL:
a6e6d3500c13 [svn] - revert back to r2216
nenolod
parents:
diff changeset
124 for (y = 0; y < 2; y++) {
a6e6d3500c13 [svn] - revert back to r2216
nenolod
parents:
diff changeset
125 ptr = rgb_data + ((y * 3) * 38);
a6e6d3500c13 [svn] - revert back to r2216
nenolod
parents:
diff changeset
126 h = (svis->vs_data[y] * 7) / 37;
a6e6d3500c13 [svn] - revert back to r2216
nenolod
parents:
diff changeset
127 for (x = 0; x < h; x++, ptr += 5) {
a6e6d3500c13 [svn] - revert back to r2216
nenolod
parents:
diff changeset
128 c = svis_vu_normal_colors[x];
a6e6d3500c13 [svn] - revert back to r2216
nenolod
parents:
diff changeset
129 *(ptr) = c;
a6e6d3500c13 [svn] - revert back to r2216
nenolod
parents:
diff changeset
130 *(ptr + 1) = c;
a6e6d3500c13 [svn] - revert back to r2216
nenolod
parents:
diff changeset
131 *(ptr + 2) = c;
a6e6d3500c13 [svn] - revert back to r2216
nenolod
parents:
diff changeset
132 *(ptr + 38) = c;
a6e6d3500c13 [svn] - revert back to r2216
nenolod
parents:
diff changeset
133 *(ptr + 39) = c;
a6e6d3500c13 [svn] - revert back to r2216
nenolod
parents:
diff changeset
134 *(ptr + 40) = c;
a6e6d3500c13 [svn] - revert back to r2216
nenolod
parents:
diff changeset
135 }
a6e6d3500c13 [svn] - revert back to r2216
nenolod
parents:
diff changeset
136 }
a6e6d3500c13 [svn] - revert back to r2216
nenolod
parents:
diff changeset
137 break;
a6e6d3500c13 [svn] - revert back to r2216
nenolod
parents:
diff changeset
138 case VU_SMOOTH:
a6e6d3500c13 [svn] - revert back to r2216
nenolod
parents:
diff changeset
139 for (y = 0; y < 2; y++) {
a6e6d3500c13 [svn] - revert back to r2216
nenolod
parents:
diff changeset
140 ptr = rgb_data + ((y * 3) * SVIS_WIDTH);
a6e6d3500c13 [svn] - revert back to r2216
nenolod
parents:
diff changeset
141 for (x = 0; x < svis->vs_data[y]; x++, ptr++) {
a6e6d3500c13 [svn] - revert back to r2216
nenolod
parents:
diff changeset
142 c = 17 - ((x * 15) / 37);
a6e6d3500c13 [svn] - revert back to r2216
nenolod
parents:
diff changeset
143 *(ptr) = c;
a6e6d3500c13 [svn] - revert back to r2216
nenolod
parents:
diff changeset
144 *(ptr + 38) = c;
a6e6d3500c13 [svn] - revert back to r2216
nenolod
parents:
diff changeset
145 }
a6e6d3500c13 [svn] - revert back to r2216
nenolod
parents:
diff changeset
146 }
a6e6d3500c13 [svn] - revert back to r2216
nenolod
parents:
diff changeset
147 break;
a6e6d3500c13 [svn] - revert back to r2216
nenolod
parents:
diff changeset
148 }
a6e6d3500c13 [svn] - revert back to r2216
nenolod
parents:
diff changeset
149 }
a6e6d3500c13 [svn] - revert back to r2216
nenolod
parents:
diff changeset
150 else if (cfg.vis_type == VIS_SCOPE) {
a6e6d3500c13 [svn] - revert back to r2216
nenolod
parents:
diff changeset
151 for (x = 0; x < 38; x++) {
a6e6d3500c13 [svn] - revert back to r2216
nenolod
parents:
diff changeset
152 h = svis->vs_data[x << 1] / 3;
a6e6d3500c13 [svn] - revert back to r2216
nenolod
parents:
diff changeset
153 ptr = rgb_data + ((4 - h) * 38) + x;
a6e6d3500c13 [svn] - revert back to r2216
nenolod
parents:
diff changeset
154 *ptr = svis_scope_colors[h];
a6e6d3500c13 [svn] - revert back to r2216
nenolod
parents:
diff changeset
155 }
a6e6d3500c13 [svn] - revert back to r2216
nenolod
parents:
diff changeset
156 }
a6e6d3500c13 [svn] - revert back to r2216
nenolod
parents:
diff changeset
157
a6e6d3500c13 [svn] - revert back to r2216
nenolod
parents:
diff changeset
158 gdk_draw_indexed_image(mainwin->window, mainwin_gc,
a6e6d3500c13 [svn] - revert back to r2216
nenolod
parents:
diff changeset
159 svis->vs_widget.x, svis->vs_widget.y,
a6e6d3500c13 [svn] - revert back to r2216
nenolod
parents:
diff changeset
160 svis->vs_widget.width,
a6e6d3500c13 [svn] - revert back to r2216
nenolod
parents:
diff changeset
161 svis->vs_widget.height,
a6e6d3500c13 [svn] - revert back to r2216
nenolod
parents:
diff changeset
162 GDK_RGB_DITHER_NORMAL, (guchar *) rgb_data,
a6e6d3500c13 [svn] - revert back to r2216
nenolod
parents:
diff changeset
163 38, cmap);
a6e6d3500c13 [svn] - revert back to r2216
nenolod
parents:
diff changeset
164
a6e6d3500c13 [svn] - revert back to r2216
nenolod
parents:
diff changeset
165 gdk_rgb_cmap_free(cmap);
a6e6d3500c13 [svn] - revert back to r2216
nenolod
parents:
diff changeset
166 GDK_THREADS_LEAVE();
a6e6d3500c13 [svn] - revert back to r2216
nenolod
parents:
diff changeset
167 }
a6e6d3500c13 [svn] - revert back to r2216
nenolod
parents:
diff changeset
168
a6e6d3500c13 [svn] - revert back to r2216
nenolod
parents:
diff changeset
169 void
a6e6d3500c13 [svn] - revert back to r2216
nenolod
parents:
diff changeset
170 svis_clear_data(SVis * svis)
a6e6d3500c13 [svn] - revert back to r2216
nenolod
parents:
diff changeset
171 {
a6e6d3500c13 [svn] - revert back to r2216
nenolod
parents:
diff changeset
172 gint i;
a6e6d3500c13 [svn] - revert back to r2216
nenolod
parents:
diff changeset
173
a6e6d3500c13 [svn] - revert back to r2216
nenolod
parents:
diff changeset
174 if (!svis)
a6e6d3500c13 [svn] - revert back to r2216
nenolod
parents:
diff changeset
175 return;
a6e6d3500c13 [svn] - revert back to r2216
nenolod
parents:
diff changeset
176
a6e6d3500c13 [svn] - revert back to r2216
nenolod
parents:
diff changeset
177 for (i = 0; i < 75; i++) {
a6e6d3500c13 [svn] - revert back to r2216
nenolod
parents:
diff changeset
178 svis->vs_data[i] = (cfg.vis_type == VIS_SCOPE) ? 6 : 0;
a6e6d3500c13 [svn] - revert back to r2216
nenolod
parents:
diff changeset
179 }
a6e6d3500c13 [svn] - revert back to r2216
nenolod
parents:
diff changeset
180 }
a6e6d3500c13 [svn] - revert back to r2216
nenolod
parents:
diff changeset
181
a6e6d3500c13 [svn] - revert back to r2216
nenolod
parents:
diff changeset
182 void
a6e6d3500c13 [svn] - revert back to r2216
nenolod
parents:
diff changeset
183 svis_clear(SVis * svis)
a6e6d3500c13 [svn] - revert back to r2216
nenolod
parents:
diff changeset
184 {
a6e6d3500c13 [svn] - revert back to r2216
nenolod
parents:
diff changeset
185 gdk_window_clear_area(mainwin->window, svis->vs_widget.x,
a6e6d3500c13 [svn] - revert back to r2216
nenolod
parents:
diff changeset
186 svis->vs_widget.y, svis->vs_widget.width,
a6e6d3500c13 [svn] - revert back to r2216
nenolod
parents:
diff changeset
187 svis->vs_widget.height);
a6e6d3500c13 [svn] - revert back to r2216
nenolod
parents:
diff changeset
188 }
a6e6d3500c13 [svn] - revert back to r2216
nenolod
parents:
diff changeset
189
a6e6d3500c13 [svn] - revert back to r2216
nenolod
parents:
diff changeset
190 SVis *
a6e6d3500c13 [svn] - revert back to r2216
nenolod
parents:
diff changeset
191 create_svis(GList ** wlist,
a6e6d3500c13 [svn] - revert back to r2216
nenolod
parents:
diff changeset
192 GdkPixmap * parent,
a6e6d3500c13 [svn] - revert back to r2216
nenolod
parents:
diff changeset
193 GdkGC * gc,
a6e6d3500c13 [svn] - revert back to r2216
nenolod
parents:
diff changeset
194 gint x, gint y)
a6e6d3500c13 [svn] - revert back to r2216
nenolod
parents:
diff changeset
195 {
a6e6d3500c13 [svn] - revert back to r2216
nenolod
parents:
diff changeset
196 SVis *svis;
a6e6d3500c13 [svn] - revert back to r2216
nenolod
parents:
diff changeset
197
a6e6d3500c13 [svn] - revert back to r2216
nenolod
parents:
diff changeset
198 svis = g_new0(SVis, 1);
a6e6d3500c13 [svn] - revert back to r2216
nenolod
parents:
diff changeset
199 widget_init(&svis->vs_widget, parent, gc, x, y, SVIS_WIDTH, SVIS_HEIGHT,
a6e6d3500c13 [svn] - revert back to r2216
nenolod
parents:
diff changeset
200 1);
a6e6d3500c13 [svn] - revert back to r2216
nenolod
parents:
diff changeset
201
a6e6d3500c13 [svn] - revert back to r2216
nenolod
parents:
diff changeset
202 widget_list_add(wlist, WIDGET(svis));
a6e6d3500c13 [svn] - revert back to r2216
nenolod
parents:
diff changeset
203 return svis;
a6e6d3500c13 [svn] - revert back to r2216
nenolod
parents:
diff changeset
204 }