Mercurial > audlegacy
annotate audacious/monostereo.c @ 1143:f1761af62385 trunk
[svn] - some audio preferences stuff, incomplete
author | nenolod |
---|---|
date | Sun, 04 Jun 2006 20:03:13 -0700 |
parents | 0ee0b9b6db7e |
children | f12d7e208b43 |
rev | line source |
---|---|
0 | 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. | |
20 */ | |
21 | |
22 #include "monostereo.h" | |
23 | |
24 #include <glib.h> | |
25 #include <gdk/gdk.h> | |
26 | |
27 #include "skin.h" | |
28 #include "widget.h" | |
29 | |
30 void | |
31 monostereo_draw(Widget * widget) | |
32 { | |
33 MonoStereo *ms = (MonoStereo *) widget; | |
34 GdkPixmap *obj; | |
35 | |
36 obj = ms->ms_widget.parent; | |
37 | |
38 switch (ms->ms_num_channels) { | |
39 case 0: | |
40 skin_draw_pixmap(bmp_active_skin, obj, ms->ms_widget.gc, | |
41 ms->ms_skin_index, 29, 12, | |
42 ms->ms_widget.x, ms->ms_widget.y, 27, 12); | |
43 skin_draw_pixmap(bmp_active_skin, obj, ms->ms_widget.gc, | |
44 ms->ms_skin_index, 0, 12, | |
45 ms->ms_widget.x + 27, ms->ms_widget.y, 29, 12); | |
46 break; | |
47 case 1: | |
48 skin_draw_pixmap(bmp_active_skin, obj, ms->ms_widget.gc, | |
49 ms->ms_skin_index, 29, 0, | |
50 ms->ms_widget.x, ms->ms_widget.y, 27, 12); | |
51 skin_draw_pixmap(bmp_active_skin, obj, ms->ms_widget.gc, | |
52 ms->ms_skin_index, 0, 12, | |
53 ms->ms_widget.x + 27, ms->ms_widget.y, 29, 12); | |
54 break; | |
55 case 2: | |
56 skin_draw_pixmap(bmp_active_skin, obj, ms->ms_widget.gc, | |
57 ms->ms_skin_index, 29, 12, | |
58 ms->ms_widget.x, ms->ms_widget.y, 27, 12); | |
59 skin_draw_pixmap(bmp_active_skin, obj, ms->ms_widget.gc, | |
60 ms->ms_skin_index, 0, 0, | |
61 ms->ms_widget.x + 27, ms->ms_widget.y, 29, 12); | |
62 break; | |
63 } | |
64 } | |
65 | |
66 void | |
67 monostereo_set_num_channels(MonoStereo * ms, | |
68 gint nch) | |
69 { | |
192
0ee0b9b6db7e
[svn] headless now working, use --headless if you wish to experiment.
nenolod
parents:
0
diff
changeset
|
70 if (!ms) |
0ee0b9b6db7e
[svn] headless now working, use --headless if you wish to experiment.
nenolod
parents:
0
diff
changeset
|
71 return; |
0ee0b9b6db7e
[svn] headless now working, use --headless if you wish to experiment.
nenolod
parents:
0
diff
changeset
|
72 |
0 | 73 ms->ms_num_channels = nch; |
74 widget_draw(WIDGET(ms)); | |
75 } | |
76 | |
77 MonoStereo * | |
78 create_monostereo(GList ** wlist, | |
79 GdkPixmap * parent, | |
80 GdkGC * gc, | |
81 gint x, gint y, | |
82 SkinPixmapId si) | |
83 { | |
84 MonoStereo *ms; | |
85 | |
86 ms = g_new0(MonoStereo, 1); | |
87 widget_init(&ms->ms_widget, parent, gc, x, y, 56, 12, 1); | |
88 ms->ms_widget.draw = monostereo_draw; | |
89 ms->ms_skin_index = si; | |
90 | |
91 widget_list_add(wlist, WIDGET(ms)); | |
92 return ms; | |
93 } |