Mercurial > audlegacy
annotate src/audacious/ui_skinned_playstatus.c @ 3236:74a999f3f4d2
Unbreak XMMS/GTK1 file selector.
Pointed out by ccr.
author | William Pitcock <nenolod@atheme-project.org> |
---|---|
date | Fri, 03 Aug 2007 22:17:41 -0500 |
parents | f1c756f39e6c |
children | f02623377013 |
rev | line source |
---|---|
3072
84de3244aeaa
replace Playstatus with UiSkinnedPlaystatus
Tomasz Mon <desowin@gmail.com>
parents:
diff
changeset
|
1 /* |
84de3244aeaa
replace Playstatus with UiSkinnedPlaystatus
Tomasz Mon <desowin@gmail.com>
parents:
diff
changeset
|
2 * Audacious - a cross-platform multimedia player |
84de3244aeaa
replace Playstatus with UiSkinnedPlaystatus
Tomasz Mon <desowin@gmail.com>
parents:
diff
changeset
|
3 * Copyright (c) 2007 Audacious development team. |
84de3244aeaa
replace Playstatus with UiSkinnedPlaystatus
Tomasz Mon <desowin@gmail.com>
parents:
diff
changeset
|
4 * |
84de3244aeaa
replace Playstatus with UiSkinnedPlaystatus
Tomasz Mon <desowin@gmail.com>
parents:
diff
changeset
|
5 * Based on: |
84de3244aeaa
replace Playstatus with UiSkinnedPlaystatus
Tomasz Mon <desowin@gmail.com>
parents:
diff
changeset
|
6 * BMP - Cross-platform multimedia player |
84de3244aeaa
replace Playstatus with UiSkinnedPlaystatus
Tomasz Mon <desowin@gmail.com>
parents:
diff
changeset
|
7 * Copyright (C) 2003-2004 BMP development team. |
84de3244aeaa
replace Playstatus with UiSkinnedPlaystatus
Tomasz Mon <desowin@gmail.com>
parents:
diff
changeset
|
8 * XMMS: |
84de3244aeaa
replace Playstatus with UiSkinnedPlaystatus
Tomasz Mon <desowin@gmail.com>
parents:
diff
changeset
|
9 * Copyright (C) 1998-2003 XMMS development team. |
84de3244aeaa
replace Playstatus with UiSkinnedPlaystatus
Tomasz Mon <desowin@gmail.com>
parents:
diff
changeset
|
10 * |
84de3244aeaa
replace Playstatus with UiSkinnedPlaystatus
Tomasz Mon <desowin@gmail.com>
parents:
diff
changeset
|
11 * This program is free software; you can redistribute it and/or modify |
84de3244aeaa
replace Playstatus with UiSkinnedPlaystatus
Tomasz Mon <desowin@gmail.com>
parents:
diff
changeset
|
12 * it under the terms of the GNU General Public License as published by |
3121
3b6d316f8b09
GPL3 relicensing.
William Pitcock <nenolod@atheme-project.org>
parents:
3103
diff
changeset
|
13 * the Free Software Foundation; under version 3 of the License. |
3072
84de3244aeaa
replace Playstatus with UiSkinnedPlaystatus
Tomasz Mon <desowin@gmail.com>
parents:
diff
changeset
|
14 * |
84de3244aeaa
replace Playstatus with UiSkinnedPlaystatus
Tomasz Mon <desowin@gmail.com>
parents:
diff
changeset
|
15 * This program is distributed in the hope that it will be useful, |
84de3244aeaa
replace Playstatus with UiSkinnedPlaystatus
Tomasz Mon <desowin@gmail.com>
parents:
diff
changeset
|
16 * but WITHOUT ANY WARRANTY; without even the implied warranty of |
84de3244aeaa
replace Playstatus with UiSkinnedPlaystatus
Tomasz Mon <desowin@gmail.com>
parents:
diff
changeset
|
17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
84de3244aeaa
replace Playstatus with UiSkinnedPlaystatus
Tomasz Mon <desowin@gmail.com>
parents:
diff
changeset
|
18 * GNU General Public License for more details. |
84de3244aeaa
replace Playstatus with UiSkinnedPlaystatus
Tomasz Mon <desowin@gmail.com>
parents:
diff
changeset
|
19 * |
84de3244aeaa
replace Playstatus with UiSkinnedPlaystatus
Tomasz Mon <desowin@gmail.com>
parents:
diff
changeset
|
20 * You should have received a copy of the GNU General Public License |
3121
3b6d316f8b09
GPL3 relicensing.
William Pitcock <nenolod@atheme-project.org>
parents:
3103
diff
changeset
|
21 * along with this program. If not, see <http://www.gnu.org/licenses>. |
3123
f1c756f39e6c
Invoke "Plugins are not derived work" clause provided by GPL3.
William Pitcock <nenolod@atheme-project.org>
parents:
3121
diff
changeset
|
22 * |
f1c756f39e6c
Invoke "Plugins are not derived work" clause provided by GPL3.
William Pitcock <nenolod@atheme-project.org>
parents:
3121
diff
changeset
|
23 * The Audacious team does not consider modular code linking to |
f1c756f39e6c
Invoke "Plugins are not derived work" clause provided by GPL3.
William Pitcock <nenolod@atheme-project.org>
parents:
3121
diff
changeset
|
24 * Audacious or using our public API to be a derived work. |
3072
84de3244aeaa
replace Playstatus with UiSkinnedPlaystatus
Tomasz Mon <desowin@gmail.com>
parents:
diff
changeset
|
25 */ |
84de3244aeaa
replace Playstatus with UiSkinnedPlaystatus
Tomasz Mon <desowin@gmail.com>
parents:
diff
changeset
|
26 |
84de3244aeaa
replace Playstatus with UiSkinnedPlaystatus
Tomasz Mon <desowin@gmail.com>
parents:
diff
changeset
|
27 #include "widgets/widgetcore.h" |
84de3244aeaa
replace Playstatus with UiSkinnedPlaystatus
Tomasz Mon <desowin@gmail.com>
parents:
diff
changeset
|
28 #include "ui_skinned_playstatus.h" |
84de3244aeaa
replace Playstatus with UiSkinnedPlaystatus
Tomasz Mon <desowin@gmail.com>
parents:
diff
changeset
|
29 #include "main.h" |
84de3244aeaa
replace Playstatus with UiSkinnedPlaystatus
Tomasz Mon <desowin@gmail.com>
parents:
diff
changeset
|
30 #include "util.h" |
84de3244aeaa
replace Playstatus with UiSkinnedPlaystatus
Tomasz Mon <desowin@gmail.com>
parents:
diff
changeset
|
31 #include <gtk/gtkmain.h> |
84de3244aeaa
replace Playstatus with UiSkinnedPlaystatus
Tomasz Mon <desowin@gmail.com>
parents:
diff
changeset
|
32 #include <gtk/gtkmarshal.h> |
84de3244aeaa
replace Playstatus with UiSkinnedPlaystatus
Tomasz Mon <desowin@gmail.com>
parents:
diff
changeset
|
33 |
84de3244aeaa
replace Playstatus with UiSkinnedPlaystatus
Tomasz Mon <desowin@gmail.com>
parents:
diff
changeset
|
34 #define UI_TYPE_SKINNED_PLAYSTATUS (ui_skinned_playstatus_get_type()) |
84de3244aeaa
replace Playstatus with UiSkinnedPlaystatus
Tomasz Mon <desowin@gmail.com>
parents:
diff
changeset
|
35 |
84de3244aeaa
replace Playstatus with UiSkinnedPlaystatus
Tomasz Mon <desowin@gmail.com>
parents:
diff
changeset
|
36 enum { |
84de3244aeaa
replace Playstatus with UiSkinnedPlaystatus
Tomasz Mon <desowin@gmail.com>
parents:
diff
changeset
|
37 DOUBLED, |
84de3244aeaa
replace Playstatus with UiSkinnedPlaystatus
Tomasz Mon <desowin@gmail.com>
parents:
diff
changeset
|
38 LAST_SIGNAL |
84de3244aeaa
replace Playstatus with UiSkinnedPlaystatus
Tomasz Mon <desowin@gmail.com>
parents:
diff
changeset
|
39 }; |
84de3244aeaa
replace Playstatus with UiSkinnedPlaystatus
Tomasz Mon <desowin@gmail.com>
parents:
diff
changeset
|
40 |
84de3244aeaa
replace Playstatus with UiSkinnedPlaystatus
Tomasz Mon <desowin@gmail.com>
parents:
diff
changeset
|
41 static void ui_skinned_playstatus_class_init (UiSkinnedPlaystatusClass *klass); |
84de3244aeaa
replace Playstatus with UiSkinnedPlaystatus
Tomasz Mon <desowin@gmail.com>
parents:
diff
changeset
|
42 static void ui_skinned_playstatus_init (UiSkinnedPlaystatus *playstatus); |
84de3244aeaa
replace Playstatus with UiSkinnedPlaystatus
Tomasz Mon <desowin@gmail.com>
parents:
diff
changeset
|
43 static void ui_skinned_playstatus_destroy (GtkObject *object); |
84de3244aeaa
replace Playstatus with UiSkinnedPlaystatus
Tomasz Mon <desowin@gmail.com>
parents:
diff
changeset
|
44 static void ui_skinned_playstatus_realize (GtkWidget *widget); |
84de3244aeaa
replace Playstatus with UiSkinnedPlaystatus
Tomasz Mon <desowin@gmail.com>
parents:
diff
changeset
|
45 static void ui_skinned_playstatus_size_request (GtkWidget *widget, GtkRequisition *requisition); |
84de3244aeaa
replace Playstatus with UiSkinnedPlaystatus
Tomasz Mon <desowin@gmail.com>
parents:
diff
changeset
|
46 static void ui_skinned_playstatus_size_allocate (GtkWidget *widget, GtkAllocation *allocation); |
84de3244aeaa
replace Playstatus with UiSkinnedPlaystatus
Tomasz Mon <desowin@gmail.com>
parents:
diff
changeset
|
47 static gboolean ui_skinned_playstatus_expose (GtkWidget *widget, GdkEventExpose *event); |
84de3244aeaa
replace Playstatus with UiSkinnedPlaystatus
Tomasz Mon <desowin@gmail.com>
parents:
diff
changeset
|
48 static void ui_skinned_playstatus_toggle_doublesize (UiSkinnedPlaystatus *playstatus); |
84de3244aeaa
replace Playstatus with UiSkinnedPlaystatus
Tomasz Mon <desowin@gmail.com>
parents:
diff
changeset
|
49 |
84de3244aeaa
replace Playstatus with UiSkinnedPlaystatus
Tomasz Mon <desowin@gmail.com>
parents:
diff
changeset
|
50 static GtkWidgetClass *parent_class = NULL; |
84de3244aeaa
replace Playstatus with UiSkinnedPlaystatus
Tomasz Mon <desowin@gmail.com>
parents:
diff
changeset
|
51 static guint playstatus_signals[LAST_SIGNAL] = { 0 }; |
84de3244aeaa
replace Playstatus with UiSkinnedPlaystatus
Tomasz Mon <desowin@gmail.com>
parents:
diff
changeset
|
52 |
84de3244aeaa
replace Playstatus with UiSkinnedPlaystatus
Tomasz Mon <desowin@gmail.com>
parents:
diff
changeset
|
53 GType ui_skinned_playstatus_get_type() { |
84de3244aeaa
replace Playstatus with UiSkinnedPlaystatus
Tomasz Mon <desowin@gmail.com>
parents:
diff
changeset
|
54 static GType playstatus_type = 0; |
84de3244aeaa
replace Playstatus with UiSkinnedPlaystatus
Tomasz Mon <desowin@gmail.com>
parents:
diff
changeset
|
55 if (!playstatus_type) { |
84de3244aeaa
replace Playstatus with UiSkinnedPlaystatus
Tomasz Mon <desowin@gmail.com>
parents:
diff
changeset
|
56 static const GTypeInfo playstatus_info = { |
84de3244aeaa
replace Playstatus with UiSkinnedPlaystatus
Tomasz Mon <desowin@gmail.com>
parents:
diff
changeset
|
57 sizeof (UiSkinnedPlaystatusClass), |
84de3244aeaa
replace Playstatus with UiSkinnedPlaystatus
Tomasz Mon <desowin@gmail.com>
parents:
diff
changeset
|
58 NULL, |
84de3244aeaa
replace Playstatus with UiSkinnedPlaystatus
Tomasz Mon <desowin@gmail.com>
parents:
diff
changeset
|
59 NULL, |
84de3244aeaa
replace Playstatus with UiSkinnedPlaystatus
Tomasz Mon <desowin@gmail.com>
parents:
diff
changeset
|
60 (GClassInitFunc) ui_skinned_playstatus_class_init, |
84de3244aeaa
replace Playstatus with UiSkinnedPlaystatus
Tomasz Mon <desowin@gmail.com>
parents:
diff
changeset
|
61 NULL, |
84de3244aeaa
replace Playstatus with UiSkinnedPlaystatus
Tomasz Mon <desowin@gmail.com>
parents:
diff
changeset
|
62 NULL, |
84de3244aeaa
replace Playstatus with UiSkinnedPlaystatus
Tomasz Mon <desowin@gmail.com>
parents:
diff
changeset
|
63 sizeof (UiSkinnedPlaystatus), |
84de3244aeaa
replace Playstatus with UiSkinnedPlaystatus
Tomasz Mon <desowin@gmail.com>
parents:
diff
changeset
|
64 0, |
84de3244aeaa
replace Playstatus with UiSkinnedPlaystatus
Tomasz Mon <desowin@gmail.com>
parents:
diff
changeset
|
65 (GInstanceInitFunc) ui_skinned_playstatus_init, |
84de3244aeaa
replace Playstatus with UiSkinnedPlaystatus
Tomasz Mon <desowin@gmail.com>
parents:
diff
changeset
|
66 }; |
84de3244aeaa
replace Playstatus with UiSkinnedPlaystatus
Tomasz Mon <desowin@gmail.com>
parents:
diff
changeset
|
67 playstatus_type = g_type_register_static (GTK_TYPE_WIDGET, "UiSkinnedPlaystatus", &playstatus_info, 0); |
84de3244aeaa
replace Playstatus with UiSkinnedPlaystatus
Tomasz Mon <desowin@gmail.com>
parents:
diff
changeset
|
68 } |
84de3244aeaa
replace Playstatus with UiSkinnedPlaystatus
Tomasz Mon <desowin@gmail.com>
parents:
diff
changeset
|
69 |
84de3244aeaa
replace Playstatus with UiSkinnedPlaystatus
Tomasz Mon <desowin@gmail.com>
parents:
diff
changeset
|
70 return playstatus_type; |
84de3244aeaa
replace Playstatus with UiSkinnedPlaystatus
Tomasz Mon <desowin@gmail.com>
parents:
diff
changeset
|
71 } |
84de3244aeaa
replace Playstatus with UiSkinnedPlaystatus
Tomasz Mon <desowin@gmail.com>
parents:
diff
changeset
|
72 |
84de3244aeaa
replace Playstatus with UiSkinnedPlaystatus
Tomasz Mon <desowin@gmail.com>
parents:
diff
changeset
|
73 static void ui_skinned_playstatus_class_init(UiSkinnedPlaystatusClass *klass) { |
84de3244aeaa
replace Playstatus with UiSkinnedPlaystatus
Tomasz Mon <desowin@gmail.com>
parents:
diff
changeset
|
74 GObjectClass *gobject_class; |
84de3244aeaa
replace Playstatus with UiSkinnedPlaystatus
Tomasz Mon <desowin@gmail.com>
parents:
diff
changeset
|
75 GtkObjectClass *object_class; |
84de3244aeaa
replace Playstatus with UiSkinnedPlaystatus
Tomasz Mon <desowin@gmail.com>
parents:
diff
changeset
|
76 GtkWidgetClass *widget_class; |
84de3244aeaa
replace Playstatus with UiSkinnedPlaystatus
Tomasz Mon <desowin@gmail.com>
parents:
diff
changeset
|
77 |
84de3244aeaa
replace Playstatus with UiSkinnedPlaystatus
Tomasz Mon <desowin@gmail.com>
parents:
diff
changeset
|
78 gobject_class = G_OBJECT_CLASS(klass); |
84de3244aeaa
replace Playstatus with UiSkinnedPlaystatus
Tomasz Mon <desowin@gmail.com>
parents:
diff
changeset
|
79 object_class = (GtkObjectClass*) klass; |
84de3244aeaa
replace Playstatus with UiSkinnedPlaystatus
Tomasz Mon <desowin@gmail.com>
parents:
diff
changeset
|
80 widget_class = (GtkWidgetClass*) klass; |
84de3244aeaa
replace Playstatus with UiSkinnedPlaystatus
Tomasz Mon <desowin@gmail.com>
parents:
diff
changeset
|
81 parent_class = gtk_type_class (gtk_widget_get_type ()); |
84de3244aeaa
replace Playstatus with UiSkinnedPlaystatus
Tomasz Mon <desowin@gmail.com>
parents:
diff
changeset
|
82 |
84de3244aeaa
replace Playstatus with UiSkinnedPlaystatus
Tomasz Mon <desowin@gmail.com>
parents:
diff
changeset
|
83 object_class->destroy = ui_skinned_playstatus_destroy; |
84de3244aeaa
replace Playstatus with UiSkinnedPlaystatus
Tomasz Mon <desowin@gmail.com>
parents:
diff
changeset
|
84 |
84de3244aeaa
replace Playstatus with UiSkinnedPlaystatus
Tomasz Mon <desowin@gmail.com>
parents:
diff
changeset
|
85 widget_class->realize = ui_skinned_playstatus_realize; |
84de3244aeaa
replace Playstatus with UiSkinnedPlaystatus
Tomasz Mon <desowin@gmail.com>
parents:
diff
changeset
|
86 widget_class->expose_event = ui_skinned_playstatus_expose; |
84de3244aeaa
replace Playstatus with UiSkinnedPlaystatus
Tomasz Mon <desowin@gmail.com>
parents:
diff
changeset
|
87 widget_class->size_request = ui_skinned_playstatus_size_request; |
84de3244aeaa
replace Playstatus with UiSkinnedPlaystatus
Tomasz Mon <desowin@gmail.com>
parents:
diff
changeset
|
88 widget_class->size_allocate = ui_skinned_playstatus_size_allocate; |
84de3244aeaa
replace Playstatus with UiSkinnedPlaystatus
Tomasz Mon <desowin@gmail.com>
parents:
diff
changeset
|
89 |
84de3244aeaa
replace Playstatus with UiSkinnedPlaystatus
Tomasz Mon <desowin@gmail.com>
parents:
diff
changeset
|
90 klass->doubled = ui_skinned_playstatus_toggle_doublesize; |
84de3244aeaa
replace Playstatus with UiSkinnedPlaystatus
Tomasz Mon <desowin@gmail.com>
parents:
diff
changeset
|
91 |
84de3244aeaa
replace Playstatus with UiSkinnedPlaystatus
Tomasz Mon <desowin@gmail.com>
parents:
diff
changeset
|
92 playstatus_signals[DOUBLED] = |
84de3244aeaa
replace Playstatus with UiSkinnedPlaystatus
Tomasz Mon <desowin@gmail.com>
parents:
diff
changeset
|
93 g_signal_new ("toggle-double-size", G_OBJECT_CLASS_TYPE (object_class), G_SIGNAL_RUN_FIRST | G_SIGNAL_ACTION, |
84de3244aeaa
replace Playstatus with UiSkinnedPlaystatus
Tomasz Mon <desowin@gmail.com>
parents:
diff
changeset
|
94 G_STRUCT_OFFSET (UiSkinnedPlaystatusClass, doubled), NULL, NULL, |
84de3244aeaa
replace Playstatus with UiSkinnedPlaystatus
Tomasz Mon <desowin@gmail.com>
parents:
diff
changeset
|
95 gtk_marshal_VOID__VOID, G_TYPE_NONE, 0); |
84de3244aeaa
replace Playstatus with UiSkinnedPlaystatus
Tomasz Mon <desowin@gmail.com>
parents:
diff
changeset
|
96 } |
84de3244aeaa
replace Playstatus with UiSkinnedPlaystatus
Tomasz Mon <desowin@gmail.com>
parents:
diff
changeset
|
97 |
84de3244aeaa
replace Playstatus with UiSkinnedPlaystatus
Tomasz Mon <desowin@gmail.com>
parents:
diff
changeset
|
98 static void ui_skinned_playstatus_init(UiSkinnedPlaystatus *playstatus) { |
84de3244aeaa
replace Playstatus with UiSkinnedPlaystatus
Tomasz Mon <desowin@gmail.com>
parents:
diff
changeset
|
99 playstatus->width = 11; |
84de3244aeaa
replace Playstatus with UiSkinnedPlaystatus
Tomasz Mon <desowin@gmail.com>
parents:
diff
changeset
|
100 playstatus->height = 9; |
84de3244aeaa
replace Playstatus with UiSkinnedPlaystatus
Tomasz Mon <desowin@gmail.com>
parents:
diff
changeset
|
101 } |
84de3244aeaa
replace Playstatus with UiSkinnedPlaystatus
Tomasz Mon <desowin@gmail.com>
parents:
diff
changeset
|
102 |
84de3244aeaa
replace Playstatus with UiSkinnedPlaystatus
Tomasz Mon <desowin@gmail.com>
parents:
diff
changeset
|
103 GtkWidget* ui_skinned_playstatus_new(GtkWidget *fixed, gint x, gint y) { |
84de3244aeaa
replace Playstatus with UiSkinnedPlaystatus
Tomasz Mon <desowin@gmail.com>
parents:
diff
changeset
|
104 UiSkinnedPlaystatus *playstatus = g_object_new (ui_skinned_playstatus_get_type (), NULL); |
84de3244aeaa
replace Playstatus with UiSkinnedPlaystatus
Tomasz Mon <desowin@gmail.com>
parents:
diff
changeset
|
105 |
84de3244aeaa
replace Playstatus with UiSkinnedPlaystatus
Tomasz Mon <desowin@gmail.com>
parents:
diff
changeset
|
106 playstatus->x = x; |
84de3244aeaa
replace Playstatus with UiSkinnedPlaystatus
Tomasz Mon <desowin@gmail.com>
parents:
diff
changeset
|
107 playstatus->y = y; |
84de3244aeaa
replace Playstatus with UiSkinnedPlaystatus
Tomasz Mon <desowin@gmail.com>
parents:
diff
changeset
|
108 |
84de3244aeaa
replace Playstatus with UiSkinnedPlaystatus
Tomasz Mon <desowin@gmail.com>
parents:
diff
changeset
|
109 playstatus->fixed = fixed; |
84de3244aeaa
replace Playstatus with UiSkinnedPlaystatus
Tomasz Mon <desowin@gmail.com>
parents:
diff
changeset
|
110 playstatus->double_size = FALSE; |
84de3244aeaa
replace Playstatus with UiSkinnedPlaystatus
Tomasz Mon <desowin@gmail.com>
parents:
diff
changeset
|
111 |
84de3244aeaa
replace Playstatus with UiSkinnedPlaystatus
Tomasz Mon <desowin@gmail.com>
parents:
diff
changeset
|
112 gtk_fixed_put(GTK_FIXED(playstatus->fixed), GTK_WIDGET(playstatus), playstatus->x, playstatus->y); |
84de3244aeaa
replace Playstatus with UiSkinnedPlaystatus
Tomasz Mon <desowin@gmail.com>
parents:
diff
changeset
|
113 |
84de3244aeaa
replace Playstatus with UiSkinnedPlaystatus
Tomasz Mon <desowin@gmail.com>
parents:
diff
changeset
|
114 return GTK_WIDGET(playstatus); |
84de3244aeaa
replace Playstatus with UiSkinnedPlaystatus
Tomasz Mon <desowin@gmail.com>
parents:
diff
changeset
|
115 } |
84de3244aeaa
replace Playstatus with UiSkinnedPlaystatus
Tomasz Mon <desowin@gmail.com>
parents:
diff
changeset
|
116 |
84de3244aeaa
replace Playstatus with UiSkinnedPlaystatus
Tomasz Mon <desowin@gmail.com>
parents:
diff
changeset
|
117 static void ui_skinned_playstatus_destroy(GtkObject *object) { |
84de3244aeaa
replace Playstatus with UiSkinnedPlaystatus
Tomasz Mon <desowin@gmail.com>
parents:
diff
changeset
|
118 UiSkinnedPlaystatus *playstatus; |
84de3244aeaa
replace Playstatus with UiSkinnedPlaystatus
Tomasz Mon <desowin@gmail.com>
parents:
diff
changeset
|
119 |
84de3244aeaa
replace Playstatus with UiSkinnedPlaystatus
Tomasz Mon <desowin@gmail.com>
parents:
diff
changeset
|
120 g_return_if_fail (object != NULL); |
84de3244aeaa
replace Playstatus with UiSkinnedPlaystatus
Tomasz Mon <desowin@gmail.com>
parents:
diff
changeset
|
121 g_return_if_fail (UI_SKINNED_IS_PLAYSTATUS (object)); |
84de3244aeaa
replace Playstatus with UiSkinnedPlaystatus
Tomasz Mon <desowin@gmail.com>
parents:
diff
changeset
|
122 |
84de3244aeaa
replace Playstatus with UiSkinnedPlaystatus
Tomasz Mon <desowin@gmail.com>
parents:
diff
changeset
|
123 playstatus = UI_SKINNED_PLAYSTATUS (object); |
84de3244aeaa
replace Playstatus with UiSkinnedPlaystatus
Tomasz Mon <desowin@gmail.com>
parents:
diff
changeset
|
124 |
84de3244aeaa
replace Playstatus with UiSkinnedPlaystatus
Tomasz Mon <desowin@gmail.com>
parents:
diff
changeset
|
125 if (GTK_OBJECT_CLASS (parent_class)->destroy) |
84de3244aeaa
replace Playstatus with UiSkinnedPlaystatus
Tomasz Mon <desowin@gmail.com>
parents:
diff
changeset
|
126 (* GTK_OBJECT_CLASS (parent_class)->destroy) (object); |
84de3244aeaa
replace Playstatus with UiSkinnedPlaystatus
Tomasz Mon <desowin@gmail.com>
parents:
diff
changeset
|
127 } |
84de3244aeaa
replace Playstatus with UiSkinnedPlaystatus
Tomasz Mon <desowin@gmail.com>
parents:
diff
changeset
|
128 |
84de3244aeaa
replace Playstatus with UiSkinnedPlaystatus
Tomasz Mon <desowin@gmail.com>
parents:
diff
changeset
|
129 static void ui_skinned_playstatus_realize(GtkWidget *widget) { |
84de3244aeaa
replace Playstatus with UiSkinnedPlaystatus
Tomasz Mon <desowin@gmail.com>
parents:
diff
changeset
|
130 UiSkinnedPlaystatus *playstatus; |
84de3244aeaa
replace Playstatus with UiSkinnedPlaystatus
Tomasz Mon <desowin@gmail.com>
parents:
diff
changeset
|
131 GdkWindowAttr attributes; |
84de3244aeaa
replace Playstatus with UiSkinnedPlaystatus
Tomasz Mon <desowin@gmail.com>
parents:
diff
changeset
|
132 gint attributes_mask; |
84de3244aeaa
replace Playstatus with UiSkinnedPlaystatus
Tomasz Mon <desowin@gmail.com>
parents:
diff
changeset
|
133 |
84de3244aeaa
replace Playstatus with UiSkinnedPlaystatus
Tomasz Mon <desowin@gmail.com>
parents:
diff
changeset
|
134 g_return_if_fail (widget != NULL); |
84de3244aeaa
replace Playstatus with UiSkinnedPlaystatus
Tomasz Mon <desowin@gmail.com>
parents:
diff
changeset
|
135 g_return_if_fail (UI_SKINNED_IS_PLAYSTATUS(widget)); |
84de3244aeaa
replace Playstatus with UiSkinnedPlaystatus
Tomasz Mon <desowin@gmail.com>
parents:
diff
changeset
|
136 |
84de3244aeaa
replace Playstatus with UiSkinnedPlaystatus
Tomasz Mon <desowin@gmail.com>
parents:
diff
changeset
|
137 GTK_WIDGET_SET_FLAGS(widget, GTK_REALIZED); |
84de3244aeaa
replace Playstatus with UiSkinnedPlaystatus
Tomasz Mon <desowin@gmail.com>
parents:
diff
changeset
|
138 playstatus = UI_SKINNED_PLAYSTATUS(widget); |
84de3244aeaa
replace Playstatus with UiSkinnedPlaystatus
Tomasz Mon <desowin@gmail.com>
parents:
diff
changeset
|
139 |
84de3244aeaa
replace Playstatus with UiSkinnedPlaystatus
Tomasz Mon <desowin@gmail.com>
parents:
diff
changeset
|
140 attributes.x = widget->allocation.x; |
84de3244aeaa
replace Playstatus with UiSkinnedPlaystatus
Tomasz Mon <desowin@gmail.com>
parents:
diff
changeset
|
141 attributes.y = widget->allocation.y; |
84de3244aeaa
replace Playstatus with UiSkinnedPlaystatus
Tomasz Mon <desowin@gmail.com>
parents:
diff
changeset
|
142 attributes.width = widget->allocation.width; |
84de3244aeaa
replace Playstatus with UiSkinnedPlaystatus
Tomasz Mon <desowin@gmail.com>
parents:
diff
changeset
|
143 attributes.height = widget->allocation.height; |
84de3244aeaa
replace Playstatus with UiSkinnedPlaystatus
Tomasz Mon <desowin@gmail.com>
parents:
diff
changeset
|
144 attributes.wclass = GDK_INPUT_OUTPUT; |
84de3244aeaa
replace Playstatus with UiSkinnedPlaystatus
Tomasz Mon <desowin@gmail.com>
parents:
diff
changeset
|
145 attributes.window_type = GDK_WINDOW_CHILD; |
84de3244aeaa
replace Playstatus with UiSkinnedPlaystatus
Tomasz Mon <desowin@gmail.com>
parents:
diff
changeset
|
146 attributes.event_mask = gtk_widget_get_events(widget); |
84de3244aeaa
replace Playstatus with UiSkinnedPlaystatus
Tomasz Mon <desowin@gmail.com>
parents:
diff
changeset
|
147 attributes.event_mask |= GDK_EXPOSURE_MASK; |
84de3244aeaa
replace Playstatus with UiSkinnedPlaystatus
Tomasz Mon <desowin@gmail.com>
parents:
diff
changeset
|
148 attributes.visual = gtk_widget_get_visual(widget); |
84de3244aeaa
replace Playstatus with UiSkinnedPlaystatus
Tomasz Mon <desowin@gmail.com>
parents:
diff
changeset
|
149 attributes.colormap = gtk_widget_get_colormap(widget); |
84de3244aeaa
replace Playstatus with UiSkinnedPlaystatus
Tomasz Mon <desowin@gmail.com>
parents:
diff
changeset
|
150 |
84de3244aeaa
replace Playstatus with UiSkinnedPlaystatus
Tomasz Mon <desowin@gmail.com>
parents:
diff
changeset
|
151 attributes_mask = GDK_WA_X | GDK_WA_Y | GDK_WA_VISUAL | GDK_WA_COLORMAP; |
84de3244aeaa
replace Playstatus with UiSkinnedPlaystatus
Tomasz Mon <desowin@gmail.com>
parents:
diff
changeset
|
152 widget->window = gdk_window_new(widget->parent->window, &attributes, attributes_mask); |
84de3244aeaa
replace Playstatus with UiSkinnedPlaystatus
Tomasz Mon <desowin@gmail.com>
parents:
diff
changeset
|
153 |
84de3244aeaa
replace Playstatus with UiSkinnedPlaystatus
Tomasz Mon <desowin@gmail.com>
parents:
diff
changeset
|
154 widget->style = gtk_style_attach(widget->style, widget->window); |
84de3244aeaa
replace Playstatus with UiSkinnedPlaystatus
Tomasz Mon <desowin@gmail.com>
parents:
diff
changeset
|
155 |
84de3244aeaa
replace Playstatus with UiSkinnedPlaystatus
Tomasz Mon <desowin@gmail.com>
parents:
diff
changeset
|
156 gdk_window_set_user_data(widget->window, widget); |
84de3244aeaa
replace Playstatus with UiSkinnedPlaystatus
Tomasz Mon <desowin@gmail.com>
parents:
diff
changeset
|
157 } |
84de3244aeaa
replace Playstatus with UiSkinnedPlaystatus
Tomasz Mon <desowin@gmail.com>
parents:
diff
changeset
|
158 |
84de3244aeaa
replace Playstatus with UiSkinnedPlaystatus
Tomasz Mon <desowin@gmail.com>
parents:
diff
changeset
|
159 static void ui_skinned_playstatus_size_request(GtkWidget *widget, GtkRequisition *requisition) { |
84de3244aeaa
replace Playstatus with UiSkinnedPlaystatus
Tomasz Mon <desowin@gmail.com>
parents:
diff
changeset
|
160 UiSkinnedPlaystatus *playstatus = UI_SKINNED_PLAYSTATUS(widget); |
84de3244aeaa
replace Playstatus with UiSkinnedPlaystatus
Tomasz Mon <desowin@gmail.com>
parents:
diff
changeset
|
161 |
84de3244aeaa
replace Playstatus with UiSkinnedPlaystatus
Tomasz Mon <desowin@gmail.com>
parents:
diff
changeset
|
162 requisition->width = playstatus->width*(1+playstatus->double_size); |
84de3244aeaa
replace Playstatus with UiSkinnedPlaystatus
Tomasz Mon <desowin@gmail.com>
parents:
diff
changeset
|
163 requisition->height = playstatus->height*(1+playstatus->double_size); |
84de3244aeaa
replace Playstatus with UiSkinnedPlaystatus
Tomasz Mon <desowin@gmail.com>
parents:
diff
changeset
|
164 } |
84de3244aeaa
replace Playstatus with UiSkinnedPlaystatus
Tomasz Mon <desowin@gmail.com>
parents:
diff
changeset
|
165 |
84de3244aeaa
replace Playstatus with UiSkinnedPlaystatus
Tomasz Mon <desowin@gmail.com>
parents:
diff
changeset
|
166 static void ui_skinned_playstatus_size_allocate(GtkWidget *widget, GtkAllocation *allocation) { |
84de3244aeaa
replace Playstatus with UiSkinnedPlaystatus
Tomasz Mon <desowin@gmail.com>
parents:
diff
changeset
|
167 UiSkinnedPlaystatus *playstatus = UI_SKINNED_PLAYSTATUS (widget); |
84de3244aeaa
replace Playstatus with UiSkinnedPlaystatus
Tomasz Mon <desowin@gmail.com>
parents:
diff
changeset
|
168 |
84de3244aeaa
replace Playstatus with UiSkinnedPlaystatus
Tomasz Mon <desowin@gmail.com>
parents:
diff
changeset
|
169 widget->allocation = *allocation; |
84de3244aeaa
replace Playstatus with UiSkinnedPlaystatus
Tomasz Mon <desowin@gmail.com>
parents:
diff
changeset
|
170 widget->allocation.x *= (1+playstatus->double_size); |
84de3244aeaa
replace Playstatus with UiSkinnedPlaystatus
Tomasz Mon <desowin@gmail.com>
parents:
diff
changeset
|
171 widget->allocation.y *= (1+playstatus->double_size); |
84de3244aeaa
replace Playstatus with UiSkinnedPlaystatus
Tomasz Mon <desowin@gmail.com>
parents:
diff
changeset
|
172 if (GTK_WIDGET_REALIZED (widget)) |
84de3244aeaa
replace Playstatus with UiSkinnedPlaystatus
Tomasz Mon <desowin@gmail.com>
parents:
diff
changeset
|
173 gdk_window_move_resize(widget->window, widget->allocation.x, widget->allocation.y, allocation->width, allocation->height); |
84de3244aeaa
replace Playstatus with UiSkinnedPlaystatus
Tomasz Mon <desowin@gmail.com>
parents:
diff
changeset
|
174 |
84de3244aeaa
replace Playstatus with UiSkinnedPlaystatus
Tomasz Mon <desowin@gmail.com>
parents:
diff
changeset
|
175 playstatus->x = widget->allocation.x/(playstatus->double_size ? 2 : 1); |
84de3244aeaa
replace Playstatus with UiSkinnedPlaystatus
Tomasz Mon <desowin@gmail.com>
parents:
diff
changeset
|
176 playstatus->y = widget->allocation.y/(playstatus->double_size ? 2 : 1); |
84de3244aeaa
replace Playstatus with UiSkinnedPlaystatus
Tomasz Mon <desowin@gmail.com>
parents:
diff
changeset
|
177 } |
84de3244aeaa
replace Playstatus with UiSkinnedPlaystatus
Tomasz Mon <desowin@gmail.com>
parents:
diff
changeset
|
178 |
84de3244aeaa
replace Playstatus with UiSkinnedPlaystatus
Tomasz Mon <desowin@gmail.com>
parents:
diff
changeset
|
179 static gboolean ui_skinned_playstatus_expose(GtkWidget *widget, GdkEventExpose *event) { |
84de3244aeaa
replace Playstatus with UiSkinnedPlaystatus
Tomasz Mon <desowin@gmail.com>
parents:
diff
changeset
|
180 g_return_val_if_fail (widget != NULL, FALSE); |
84de3244aeaa
replace Playstatus with UiSkinnedPlaystatus
Tomasz Mon <desowin@gmail.com>
parents:
diff
changeset
|
181 g_return_val_if_fail (UI_SKINNED_IS_PLAYSTATUS (widget), FALSE); |
84de3244aeaa
replace Playstatus with UiSkinnedPlaystatus
Tomasz Mon <desowin@gmail.com>
parents:
diff
changeset
|
182 g_return_val_if_fail (event != NULL, FALSE); |
84de3244aeaa
replace Playstatus with UiSkinnedPlaystatus
Tomasz Mon <desowin@gmail.com>
parents:
diff
changeset
|
183 |
84de3244aeaa
replace Playstatus with UiSkinnedPlaystatus
Tomasz Mon <desowin@gmail.com>
parents:
diff
changeset
|
184 UiSkinnedPlaystatus *playstatus = UI_SKINNED_PLAYSTATUS (widget); |
84de3244aeaa
replace Playstatus with UiSkinnedPlaystatus
Tomasz Mon <desowin@gmail.com>
parents:
diff
changeset
|
185 |
84de3244aeaa
replace Playstatus with UiSkinnedPlaystatus
Tomasz Mon <desowin@gmail.com>
parents:
diff
changeset
|
186 GdkPixmap *obj = NULL; |
84de3244aeaa
replace Playstatus with UiSkinnedPlaystatus
Tomasz Mon <desowin@gmail.com>
parents:
diff
changeset
|
187 GdkGC *gc; |
84de3244aeaa
replace Playstatus with UiSkinnedPlaystatus
Tomasz Mon <desowin@gmail.com>
parents:
diff
changeset
|
188 |
84de3244aeaa
replace Playstatus with UiSkinnedPlaystatus
Tomasz Mon <desowin@gmail.com>
parents:
diff
changeset
|
189 obj = gdk_pixmap_new(NULL, playstatus->width, playstatus->height, gdk_rgb_get_visual()->depth); |
84de3244aeaa
replace Playstatus with UiSkinnedPlaystatus
Tomasz Mon <desowin@gmail.com>
parents:
diff
changeset
|
190 gc = gdk_gc_new(obj); |
84de3244aeaa
replace Playstatus with UiSkinnedPlaystatus
Tomasz Mon <desowin@gmail.com>
parents:
diff
changeset
|
191 |
84de3244aeaa
replace Playstatus with UiSkinnedPlaystatus
Tomasz Mon <desowin@gmail.com>
parents:
diff
changeset
|
192 if (playstatus->status == STATUS_STOP && playstatus->buffering == TRUE) |
84de3244aeaa
replace Playstatus with UiSkinnedPlaystatus
Tomasz Mon <desowin@gmail.com>
parents:
diff
changeset
|
193 playstatus->buffering = FALSE; |
84de3244aeaa
replace Playstatus with UiSkinnedPlaystatus
Tomasz Mon <desowin@gmail.com>
parents:
diff
changeset
|
194 if (playstatus->status == STATUS_PLAY && playstatus->buffering == TRUE) |
84de3244aeaa
replace Playstatus with UiSkinnedPlaystatus
Tomasz Mon <desowin@gmail.com>
parents:
diff
changeset
|
195 skin_draw_pixmap(bmp_active_skin, obj, gc, SKIN_PLAYPAUSE, 39, 0, 0, 0, 3, 9); |
84de3244aeaa
replace Playstatus with UiSkinnedPlaystatus
Tomasz Mon <desowin@gmail.com>
parents:
diff
changeset
|
196 else if (playstatus->status == STATUS_PLAY) |
84de3244aeaa
replace Playstatus with UiSkinnedPlaystatus
Tomasz Mon <desowin@gmail.com>
parents:
diff
changeset
|
197 skin_draw_pixmap(bmp_active_skin, obj, gc, SKIN_PLAYPAUSE, 36, 0, 0, 0, 3, 9); |
84de3244aeaa
replace Playstatus with UiSkinnedPlaystatus
Tomasz Mon <desowin@gmail.com>
parents:
diff
changeset
|
198 else |
84de3244aeaa
replace Playstatus with UiSkinnedPlaystatus
Tomasz Mon <desowin@gmail.com>
parents:
diff
changeset
|
199 skin_draw_pixmap(bmp_active_skin, obj, gc, SKIN_PLAYPAUSE, 27, 0, 0, 0, 2, 9); |
84de3244aeaa
replace Playstatus with UiSkinnedPlaystatus
Tomasz Mon <desowin@gmail.com>
parents:
diff
changeset
|
200 switch (playstatus->status) { |
84de3244aeaa
replace Playstatus with UiSkinnedPlaystatus
Tomasz Mon <desowin@gmail.com>
parents:
diff
changeset
|
201 case STATUS_STOP: |
84de3244aeaa
replace Playstatus with UiSkinnedPlaystatus
Tomasz Mon <desowin@gmail.com>
parents:
diff
changeset
|
202 skin_draw_pixmap(bmp_active_skin, obj, gc, SKIN_PLAYPAUSE, 18, 0, 2, 0, 9, 9); |
84de3244aeaa
replace Playstatus with UiSkinnedPlaystatus
Tomasz Mon <desowin@gmail.com>
parents:
diff
changeset
|
203 break; |
84de3244aeaa
replace Playstatus with UiSkinnedPlaystatus
Tomasz Mon <desowin@gmail.com>
parents:
diff
changeset
|
204 case STATUS_PAUSE: |
84de3244aeaa
replace Playstatus with UiSkinnedPlaystatus
Tomasz Mon <desowin@gmail.com>
parents:
diff
changeset
|
205 skin_draw_pixmap(bmp_active_skin, obj, gc, SKIN_PLAYPAUSE, 9, 0, 2, 0, 9, 9); |
84de3244aeaa
replace Playstatus with UiSkinnedPlaystatus
Tomasz Mon <desowin@gmail.com>
parents:
diff
changeset
|
206 break; |
84de3244aeaa
replace Playstatus with UiSkinnedPlaystatus
Tomasz Mon <desowin@gmail.com>
parents:
diff
changeset
|
207 case STATUS_PLAY: |
84de3244aeaa
replace Playstatus with UiSkinnedPlaystatus
Tomasz Mon <desowin@gmail.com>
parents:
diff
changeset
|
208 skin_draw_pixmap(bmp_active_skin, obj, gc, SKIN_PLAYPAUSE, 1, 0, 3, 0, 8, 9); |
84de3244aeaa
replace Playstatus with UiSkinnedPlaystatus
Tomasz Mon <desowin@gmail.com>
parents:
diff
changeset
|
209 break; |
84de3244aeaa
replace Playstatus with UiSkinnedPlaystatus
Tomasz Mon <desowin@gmail.com>
parents:
diff
changeset
|
210 } |
84de3244aeaa
replace Playstatus with UiSkinnedPlaystatus
Tomasz Mon <desowin@gmail.com>
parents:
diff
changeset
|
211 |
3077
4b076ad636e6
use GdkPixmaps for doublesizing
Tomasz Mon <desowin@gmail.com>
parents:
3072
diff
changeset
|
212 GdkPixmap *image = NULL; |
3072
84de3244aeaa
replace Playstatus with UiSkinnedPlaystatus
Tomasz Mon <desowin@gmail.com>
parents:
diff
changeset
|
213 |
84de3244aeaa
replace Playstatus with UiSkinnedPlaystatus
Tomasz Mon <desowin@gmail.com>
parents:
diff
changeset
|
214 if (playstatus->double_size) { |
3077
4b076ad636e6
use GdkPixmaps for doublesizing
Tomasz Mon <desowin@gmail.com>
parents:
3072
diff
changeset
|
215 image = create_dblsize_pixmap(obj); |
4b076ad636e6
use GdkPixmaps for doublesizing
Tomasz Mon <desowin@gmail.com>
parents:
3072
diff
changeset
|
216 } else { |
4b076ad636e6
use GdkPixmaps for doublesizing
Tomasz Mon <desowin@gmail.com>
parents:
3072
diff
changeset
|
217 image = gdk_pixmap_new(NULL, playstatus->width, playstatus->height, gdk_rgb_get_visual()->depth); |
3072
84de3244aeaa
replace Playstatus with UiSkinnedPlaystatus
Tomasz Mon <desowin@gmail.com>
parents:
diff
changeset
|
218 gdk_draw_drawable (image, gc, obj, 0, 0, 0, 0, playstatus->width, playstatus->height); |
3077
4b076ad636e6
use GdkPixmaps for doublesizing
Tomasz Mon <desowin@gmail.com>
parents:
3072
diff
changeset
|
219 } |
3072
84de3244aeaa
replace Playstatus with UiSkinnedPlaystatus
Tomasz Mon <desowin@gmail.com>
parents:
diff
changeset
|
220 |
84de3244aeaa
replace Playstatus with UiSkinnedPlaystatus
Tomasz Mon <desowin@gmail.com>
parents:
diff
changeset
|
221 g_object_unref(obj); |
84de3244aeaa
replace Playstatus with UiSkinnedPlaystatus
Tomasz Mon <desowin@gmail.com>
parents:
diff
changeset
|
222 |
84de3244aeaa
replace Playstatus with UiSkinnedPlaystatus
Tomasz Mon <desowin@gmail.com>
parents:
diff
changeset
|
223 gdk_draw_drawable (widget->window, gc, image, 0, 0, 0, 0, |
84de3244aeaa
replace Playstatus with UiSkinnedPlaystatus
Tomasz Mon <desowin@gmail.com>
parents:
diff
changeset
|
224 playstatus->width*(1+playstatus->double_size), playstatus->height*(1+playstatus->double_size)); |
84de3244aeaa
replace Playstatus with UiSkinnedPlaystatus
Tomasz Mon <desowin@gmail.com>
parents:
diff
changeset
|
225 g_object_unref(gc); |
84de3244aeaa
replace Playstatus with UiSkinnedPlaystatus
Tomasz Mon <desowin@gmail.com>
parents:
diff
changeset
|
226 g_object_unref(image); |
84de3244aeaa
replace Playstatus with UiSkinnedPlaystatus
Tomasz Mon <desowin@gmail.com>
parents:
diff
changeset
|
227 |
84de3244aeaa
replace Playstatus with UiSkinnedPlaystatus
Tomasz Mon <desowin@gmail.com>
parents:
diff
changeset
|
228 return FALSE; |
84de3244aeaa
replace Playstatus with UiSkinnedPlaystatus
Tomasz Mon <desowin@gmail.com>
parents:
diff
changeset
|
229 } |
84de3244aeaa
replace Playstatus with UiSkinnedPlaystatus
Tomasz Mon <desowin@gmail.com>
parents:
diff
changeset
|
230 |
84de3244aeaa
replace Playstatus with UiSkinnedPlaystatus
Tomasz Mon <desowin@gmail.com>
parents:
diff
changeset
|
231 static void ui_skinned_playstatus_toggle_doublesize(UiSkinnedPlaystatus *playstatus) { |
84de3244aeaa
replace Playstatus with UiSkinnedPlaystatus
Tomasz Mon <desowin@gmail.com>
parents:
diff
changeset
|
232 GtkWidget *widget = GTK_WIDGET (playstatus); |
84de3244aeaa
replace Playstatus with UiSkinnedPlaystatus
Tomasz Mon <desowin@gmail.com>
parents:
diff
changeset
|
233 |
84de3244aeaa
replace Playstatus with UiSkinnedPlaystatus
Tomasz Mon <desowin@gmail.com>
parents:
diff
changeset
|
234 playstatus->double_size = !playstatus->double_size; |
84de3244aeaa
replace Playstatus with UiSkinnedPlaystatus
Tomasz Mon <desowin@gmail.com>
parents:
diff
changeset
|
235 gtk_widget_set_size_request(widget, playstatus->width*(1+playstatus->double_size), playstatus->height*(1+playstatus->double_size)); |
84de3244aeaa
replace Playstatus with UiSkinnedPlaystatus
Tomasz Mon <desowin@gmail.com>
parents:
diff
changeset
|
236 |
84de3244aeaa
replace Playstatus with UiSkinnedPlaystatus
Tomasz Mon <desowin@gmail.com>
parents:
diff
changeset
|
237 gtk_widget_queue_draw(GTK_WIDGET(playstatus)); |
84de3244aeaa
replace Playstatus with UiSkinnedPlaystatus
Tomasz Mon <desowin@gmail.com>
parents:
diff
changeset
|
238 } |
84de3244aeaa
replace Playstatus with UiSkinnedPlaystatus
Tomasz Mon <desowin@gmail.com>
parents:
diff
changeset
|
239 |
84de3244aeaa
replace Playstatus with UiSkinnedPlaystatus
Tomasz Mon <desowin@gmail.com>
parents:
diff
changeset
|
240 void ui_skinned_playstatus_set_status(GtkWidget *widget, PStatus status) { |
84de3244aeaa
replace Playstatus with UiSkinnedPlaystatus
Tomasz Mon <desowin@gmail.com>
parents:
diff
changeset
|
241 g_return_if_fail (UI_SKINNED_IS_PLAYSTATUS (widget)); |
84de3244aeaa
replace Playstatus with UiSkinnedPlaystatus
Tomasz Mon <desowin@gmail.com>
parents:
diff
changeset
|
242 UiSkinnedPlaystatus *playstatus = UI_SKINNED_PLAYSTATUS (widget); |
84de3244aeaa
replace Playstatus with UiSkinnedPlaystatus
Tomasz Mon <desowin@gmail.com>
parents:
diff
changeset
|
243 |
84de3244aeaa
replace Playstatus with UiSkinnedPlaystatus
Tomasz Mon <desowin@gmail.com>
parents:
diff
changeset
|
244 playstatus->status = status; |
84de3244aeaa
replace Playstatus with UiSkinnedPlaystatus
Tomasz Mon <desowin@gmail.com>
parents:
diff
changeset
|
245 gtk_widget_queue_draw(widget); |
84de3244aeaa
replace Playstatus with UiSkinnedPlaystatus
Tomasz Mon <desowin@gmail.com>
parents:
diff
changeset
|
246 } |
84de3244aeaa
replace Playstatus with UiSkinnedPlaystatus
Tomasz Mon <desowin@gmail.com>
parents:
diff
changeset
|
247 |
84de3244aeaa
replace Playstatus with UiSkinnedPlaystatus
Tomasz Mon <desowin@gmail.com>
parents:
diff
changeset
|
248 void ui_skinned_playstatus_set_buffering(GtkWidget *widget, gboolean status) { |
84de3244aeaa
replace Playstatus with UiSkinnedPlaystatus
Tomasz Mon <desowin@gmail.com>
parents:
diff
changeset
|
249 g_return_if_fail (UI_SKINNED_IS_PLAYSTATUS (widget)); |
84de3244aeaa
replace Playstatus with UiSkinnedPlaystatus
Tomasz Mon <desowin@gmail.com>
parents:
diff
changeset
|
250 UiSkinnedPlaystatus *playstatus = UI_SKINNED_PLAYSTATUS (widget); |
84de3244aeaa
replace Playstatus with UiSkinnedPlaystatus
Tomasz Mon <desowin@gmail.com>
parents:
diff
changeset
|
251 |
84de3244aeaa
replace Playstatus with UiSkinnedPlaystatus
Tomasz Mon <desowin@gmail.com>
parents:
diff
changeset
|
252 playstatus->buffering = status; |
84de3244aeaa
replace Playstatus with UiSkinnedPlaystatus
Tomasz Mon <desowin@gmail.com>
parents:
diff
changeset
|
253 gtk_widget_queue_draw(widget); |
84de3244aeaa
replace Playstatus with UiSkinnedPlaystatus
Tomasz Mon <desowin@gmail.com>
parents:
diff
changeset
|
254 } |