Mercurial > audlegacy
annotate src/audacious/ui_skinned_window.c @ 3636:65b750891387
Possibly fix a lockup problem.
author | Matti Hamalainen <ccr@tnsp.org> |
---|---|
date | Tue, 25 Sep 2007 23:09:09 +0300 |
parents | 8560d99e36be |
children | 6c85469949af |
rev | line source |
---|---|
2494
59661bd074b4
[svn] Try to put some skinned window code in a common place.
nenolod
parents:
diff
changeset
|
1 /* |
59661bd074b4
[svn] Try to put some skinned window code in a common place.
nenolod
parents:
diff
changeset
|
2 * Audacious: A cross-platform multimedia player |
59661bd074b4
[svn] Try to put some skinned window code in a common place.
nenolod
parents:
diff
changeset
|
3 * Copyright (c) 2007 William Pitcock <nenolod -at- sacredspiral.co.uk> |
59661bd074b4
[svn] Try to put some skinned window code in a common place.
nenolod
parents:
diff
changeset
|
4 * |
59661bd074b4
[svn] Try to put some skinned window code in a common place.
nenolod
parents:
diff
changeset
|
5 * This program is free software; you can redistribute it and/or modify |
59661bd074b4
[svn] Try to put some skinned window code in a common place.
nenolod
parents:
diff
changeset
|
6 * it under the terms of the GNU General Public License as published by |
3121
3b6d316f8b09
GPL3 relicensing.
William Pitcock <nenolod@atheme-project.org>
parents:
3068
diff
changeset
|
7 * the Free Software Foundation; under version 3 of the License. |
2494
59661bd074b4
[svn] Try to put some skinned window code in a common place.
nenolod
parents:
diff
changeset
|
8 * |
59661bd074b4
[svn] Try to put some skinned window code in a common place.
nenolod
parents:
diff
changeset
|
9 * This program is distributed in the hope that it will be useful, |
59661bd074b4
[svn] Try to put some skinned window code in a common place.
nenolod
parents:
diff
changeset
|
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of |
59661bd074b4
[svn] Try to put some skinned window code in a common place.
nenolod
parents:
diff
changeset
|
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
59661bd074b4
[svn] Try to put some skinned window code in a common place.
nenolod
parents:
diff
changeset
|
12 * GNU General Public License for more details. |
59661bd074b4
[svn] Try to put some skinned window code in a common place.
nenolod
parents:
diff
changeset
|
13 * |
59661bd074b4
[svn] Try to put some skinned window code in a common place.
nenolod
parents:
diff
changeset
|
14 * You should have received a copy of the GNU General Public License |
3121
3b6d316f8b09
GPL3 relicensing.
William Pitcock <nenolod@atheme-project.org>
parents:
3068
diff
changeset
|
15 * 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
|
16 * |
f1c756f39e6c
Invoke "Plugins are not derived work" clause provided by GPL3.
William Pitcock <nenolod@atheme-project.org>
parents:
3121
diff
changeset
|
17 * 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
|
18 * Audacious or using our public API to be a derived work. |
2494
59661bd074b4
[svn] Try to put some skinned window code in a common place.
nenolod
parents:
diff
changeset
|
19 */ |
59661bd074b4
[svn] Try to put some skinned window code in a common place.
nenolod
parents:
diff
changeset
|
20 |
59661bd074b4
[svn] Try to put some skinned window code in a common place.
nenolod
parents:
diff
changeset
|
21 #include "platform/smartinclude.h" |
3251 | 22 #include "skin.h" |
2494
59661bd074b4
[svn] Try to put some skinned window code in a common place.
nenolod
parents:
diff
changeset
|
23 |
59661bd074b4
[svn] Try to put some skinned window code in a common place.
nenolod
parents:
diff
changeset
|
24 #include <gtk/gtkmain.h> |
59661bd074b4
[svn] Try to put some skinned window code in a common place.
nenolod
parents:
diff
changeset
|
25 #include <glib-object.h> |
59661bd074b4
[svn] Try to put some skinned window code in a common place.
nenolod
parents:
diff
changeset
|
26 #include <glib/gmacros.h> |
59661bd074b4
[svn] Try to put some skinned window code in a common place.
nenolod
parents:
diff
changeset
|
27 #include <gtk/gtkmarshal.h> |
59661bd074b4
[svn] Try to put some skinned window code in a common place.
nenolod
parents:
diff
changeset
|
28 #include <gtk/gtkwindow.h> |
3221
9583cd62231f
implement ui_skinned_window_expose
Tomasz Mon <desowin@gmail.com>
parents:
3218
diff
changeset
|
29 #include <string.h> |
2494
59661bd074b4
[svn] Try to put some skinned window code in a common place.
nenolod
parents:
diff
changeset
|
30 |
59661bd074b4
[svn] Try to put some skinned window code in a common place.
nenolod
parents:
diff
changeset
|
31 #include "main.h" |
59661bd074b4
[svn] Try to put some skinned window code in a common place.
nenolod
parents:
diff
changeset
|
32 #include "dock.h" |
59661bd074b4
[svn] Try to put some skinned window code in a common place.
nenolod
parents:
diff
changeset
|
33 #include "ui_skinned_window.h" |
59661bd074b4
[svn] Try to put some skinned window code in a common place.
nenolod
parents:
diff
changeset
|
34 #include "ui_skinned_cursor.h" |
3221
9583cd62231f
implement ui_skinned_window_expose
Tomasz Mon <desowin@gmail.com>
parents:
3218
diff
changeset
|
35 #include "util.h" |
9583cd62231f
implement ui_skinned_window_expose
Tomasz Mon <desowin@gmail.com>
parents:
3218
diff
changeset
|
36 #include "ui_playlist.h" |
2494
59661bd074b4
[svn] Try to put some skinned window code in a common place.
nenolod
parents:
diff
changeset
|
37 |
59661bd074b4
[svn] Try to put some skinned window code in a common place.
nenolod
parents:
diff
changeset
|
38 static void ui_skinned_window_class_init(SkinnedWindowClass *klass); |
59661bd074b4
[svn] Try to put some skinned window code in a common place.
nenolod
parents:
diff
changeset
|
39 static void ui_skinned_window_init(GtkWidget *widget); |
59661bd074b4
[svn] Try to put some skinned window code in a common place.
nenolod
parents:
diff
changeset
|
40 static GtkWindowClass *parent = NULL; |
59661bd074b4
[svn] Try to put some skinned window code in a common place.
nenolod
parents:
diff
changeset
|
41 |
59661bd074b4
[svn] Try to put some skinned window code in a common place.
nenolod
parents:
diff
changeset
|
42 GType |
59661bd074b4
[svn] Try to put some skinned window code in a common place.
nenolod
parents:
diff
changeset
|
43 ui_skinned_window_get_type(void) |
59661bd074b4
[svn] Try to put some skinned window code in a common place.
nenolod
parents:
diff
changeset
|
44 { |
59661bd074b4
[svn] Try to put some skinned window code in a common place.
nenolod
parents:
diff
changeset
|
45 static GType window_type = 0; |
59661bd074b4
[svn] Try to put some skinned window code in a common place.
nenolod
parents:
diff
changeset
|
46 |
59661bd074b4
[svn] Try to put some skinned window code in a common place.
nenolod
parents:
diff
changeset
|
47 if (!window_type) |
59661bd074b4
[svn] Try to put some skinned window code in a common place.
nenolod
parents:
diff
changeset
|
48 { |
59661bd074b4
[svn] Try to put some skinned window code in a common place.
nenolod
parents:
diff
changeset
|
49 static const GTypeInfo window_info = |
59661bd074b4
[svn] Try to put some skinned window code in a common place.
nenolod
parents:
diff
changeset
|
50 { |
59661bd074b4
[svn] Try to put some skinned window code in a common place.
nenolod
parents:
diff
changeset
|
51 sizeof (SkinnedWindowClass), |
59661bd074b4
[svn] Try to put some skinned window code in a common place.
nenolod
parents:
diff
changeset
|
52 NULL, /* base_init */ |
59661bd074b4
[svn] Try to put some skinned window code in a common place.
nenolod
parents:
diff
changeset
|
53 NULL, /* base_finalize */ |
59661bd074b4
[svn] Try to put some skinned window code in a common place.
nenolod
parents:
diff
changeset
|
54 (GClassInitFunc) ui_skinned_window_class_init, |
59661bd074b4
[svn] Try to put some skinned window code in a common place.
nenolod
parents:
diff
changeset
|
55 NULL, /* class_finalize */ |
59661bd074b4
[svn] Try to put some skinned window code in a common place.
nenolod
parents:
diff
changeset
|
56 NULL, /* class_data */ |
59661bd074b4
[svn] Try to put some skinned window code in a common place.
nenolod
parents:
diff
changeset
|
57 sizeof (SkinnedWindow), |
59661bd074b4
[svn] Try to put some skinned window code in a common place.
nenolod
parents:
diff
changeset
|
58 0, /* n_preallocs */ |
59661bd074b4
[svn] Try to put some skinned window code in a common place.
nenolod
parents:
diff
changeset
|
59 (GInstanceInitFunc) ui_skinned_window_init |
59661bd074b4
[svn] Try to put some skinned window code in a common place.
nenolod
parents:
diff
changeset
|
60 }; |
59661bd074b4
[svn] Try to put some skinned window code in a common place.
nenolod
parents:
diff
changeset
|
61 |
59661bd074b4
[svn] Try to put some skinned window code in a common place.
nenolod
parents:
diff
changeset
|
62 window_type = |
59661bd074b4
[svn] Try to put some skinned window code in a common place.
nenolod
parents:
diff
changeset
|
63 g_type_register_static (GTK_TYPE_WINDOW, "SkinnedWindow", |
59661bd074b4
[svn] Try to put some skinned window code in a common place.
nenolod
parents:
diff
changeset
|
64 &window_info, 0); |
59661bd074b4
[svn] Try to put some skinned window code in a common place.
nenolod
parents:
diff
changeset
|
65 } |
59661bd074b4
[svn] Try to put some skinned window code in a common place.
nenolod
parents:
diff
changeset
|
66 |
59661bd074b4
[svn] Try to put some skinned window code in a common place.
nenolod
parents:
diff
changeset
|
67 return window_type; |
59661bd074b4
[svn] Try to put some skinned window code in a common place.
nenolod
parents:
diff
changeset
|
68 } |
59661bd074b4
[svn] Try to put some skinned window code in a common place.
nenolod
parents:
diff
changeset
|
69 |
59661bd074b4
[svn] Try to put some skinned window code in a common place.
nenolod
parents:
diff
changeset
|
70 static gboolean |
59661bd074b4
[svn] Try to put some skinned window code in a common place.
nenolod
parents:
diff
changeset
|
71 ui_skinned_window_configure(GtkWidget *widget, |
59661bd074b4
[svn] Try to put some skinned window code in a common place.
nenolod
parents:
diff
changeset
|
72 GdkEventConfigure *event) |
59661bd074b4
[svn] Try to put some skinned window code in a common place.
nenolod
parents:
diff
changeset
|
73 { |
59661bd074b4
[svn] Try to put some skinned window code in a common place.
nenolod
parents:
diff
changeset
|
74 GtkWidgetClass *widget_class; |
59661bd074b4
[svn] Try to put some skinned window code in a common place.
nenolod
parents:
diff
changeset
|
75 SkinnedWindow *window = SKINNED_WINDOW(widget); |
59661bd074b4
[svn] Try to put some skinned window code in a common place.
nenolod
parents:
diff
changeset
|
76 |
59661bd074b4
[svn] Try to put some skinned window code in a common place.
nenolod
parents:
diff
changeset
|
77 widget_class = (GtkWidgetClass*) parent; |
59661bd074b4
[svn] Try to put some skinned window code in a common place.
nenolod
parents:
diff
changeset
|
78 |
59661bd074b4
[svn] Try to put some skinned window code in a common place.
nenolod
parents:
diff
changeset
|
79 if (widget_class->configure_event != NULL) |
59661bd074b4
[svn] Try to put some skinned window code in a common place.
nenolod
parents:
diff
changeset
|
80 widget_class->configure_event(widget, event); |
59661bd074b4
[svn] Try to put some skinned window code in a common place.
nenolod
parents:
diff
changeset
|
81 |
3311
8560d99e36be
revise ui_skinned_window_configure
Tomasz Mon <desowin@gmail.com>
parents:
3251
diff
changeset
|
82 if (!GTK_WIDGET_VISIBLE(widget)) |
8560d99e36be
revise ui_skinned_window_configure
Tomasz Mon <desowin@gmail.com>
parents:
3251
diff
changeset
|
83 return FALSE; |
8560d99e36be
revise ui_skinned_window_configure
Tomasz Mon <desowin@gmail.com>
parents:
3251
diff
changeset
|
84 |
8560d99e36be
revise ui_skinned_window_configure
Tomasz Mon <desowin@gmail.com>
parents:
3251
diff
changeset
|
85 switch(window->type) { |
8560d99e36be
revise ui_skinned_window_configure
Tomasz Mon <desowin@gmail.com>
parents:
3251
diff
changeset
|
86 case WINDOW_MAIN: |
8560d99e36be
revise ui_skinned_window_configure
Tomasz Mon <desowin@gmail.com>
parents:
3251
diff
changeset
|
87 if (cfg.show_wm_decorations) |
8560d99e36be
revise ui_skinned_window_configure
Tomasz Mon <desowin@gmail.com>
parents:
3251
diff
changeset
|
88 gdk_window_get_root_origin(widget->window, &cfg.player_x, &cfg.player_y); |
8560d99e36be
revise ui_skinned_window_configure
Tomasz Mon <desowin@gmail.com>
parents:
3251
diff
changeset
|
89 else |
8560d99e36be
revise ui_skinned_window_configure
Tomasz Mon <desowin@gmail.com>
parents:
3251
diff
changeset
|
90 gdk_window_get_deskrelative_origin(widget->window, &cfg.player_x, &cfg.player_y); |
8560d99e36be
revise ui_skinned_window_configure
Tomasz Mon <desowin@gmail.com>
parents:
3251
diff
changeset
|
91 break; |
8560d99e36be
revise ui_skinned_window_configure
Tomasz Mon <desowin@gmail.com>
parents:
3251
diff
changeset
|
92 case WINDOW_EQ: |
8560d99e36be
revise ui_skinned_window_configure
Tomasz Mon <desowin@gmail.com>
parents:
3251
diff
changeset
|
93 cfg.equalizer_x = event->x; |
8560d99e36be
revise ui_skinned_window_configure
Tomasz Mon <desowin@gmail.com>
parents:
3251
diff
changeset
|
94 cfg.equalizer_y = event->y; |
8560d99e36be
revise ui_skinned_window_configure
Tomasz Mon <desowin@gmail.com>
parents:
3251
diff
changeset
|
95 break; |
8560d99e36be
revise ui_skinned_window_configure
Tomasz Mon <desowin@gmail.com>
parents:
3251
diff
changeset
|
96 case WINDOW_PLAYLIST: |
8560d99e36be
revise ui_skinned_window_configure
Tomasz Mon <desowin@gmail.com>
parents:
3251
diff
changeset
|
97 cfg.playlist_x = event->x; |
8560d99e36be
revise ui_skinned_window_configure
Tomasz Mon <desowin@gmail.com>
parents:
3251
diff
changeset
|
98 cfg.playlist_y = event->y; |
8560d99e36be
revise ui_skinned_window_configure
Tomasz Mon <desowin@gmail.com>
parents:
3251
diff
changeset
|
99 break; |
8560d99e36be
revise ui_skinned_window_configure
Tomasz Mon <desowin@gmail.com>
parents:
3251
diff
changeset
|
100 } |
8560d99e36be
revise ui_skinned_window_configure
Tomasz Mon <desowin@gmail.com>
parents:
3251
diff
changeset
|
101 |
2494
59661bd074b4
[svn] Try to put some skinned window code in a common place.
nenolod
parents:
diff
changeset
|
102 window->x = event->x; |
59661bd074b4
[svn] Try to put some skinned window code in a common place.
nenolod
parents:
diff
changeset
|
103 window->y = event->y; |
59661bd074b4
[svn] Try to put some skinned window code in a common place.
nenolod
parents:
diff
changeset
|
104 |
59661bd074b4
[svn] Try to put some skinned window code in a common place.
nenolod
parents:
diff
changeset
|
105 return FALSE; |
59661bd074b4
[svn] Try to put some skinned window code in a common place.
nenolod
parents:
diff
changeset
|
106 } |
59661bd074b4
[svn] Try to put some skinned window code in a common place.
nenolod
parents:
diff
changeset
|
107 |
59661bd074b4
[svn] Try to put some skinned window code in a common place.
nenolod
parents:
diff
changeset
|
108 static gboolean |
59661bd074b4
[svn] Try to put some skinned window code in a common place.
nenolod
parents:
diff
changeset
|
109 ui_skinned_window_motion_notify_event(GtkWidget *widget, |
59661bd074b4
[svn] Try to put some skinned window code in a common place.
nenolod
parents:
diff
changeset
|
110 GdkEventMotion *event) |
59661bd074b4
[svn] Try to put some skinned window code in a common place.
nenolod
parents:
diff
changeset
|
111 { |
59661bd074b4
[svn] Try to put some skinned window code in a common place.
nenolod
parents:
diff
changeset
|
112 GtkWidgetClass *widget_class; |
59661bd074b4
[svn] Try to put some skinned window code in a common place.
nenolod
parents:
diff
changeset
|
113 |
59661bd074b4
[svn] Try to put some skinned window code in a common place.
nenolod
parents:
diff
changeset
|
114 widget_class = (GtkWidgetClass*) parent; |
59661bd074b4
[svn] Try to put some skinned window code in a common place.
nenolod
parents:
diff
changeset
|
115 |
59661bd074b4
[svn] Try to put some skinned window code in a common place.
nenolod
parents:
diff
changeset
|
116 if (widget_class->motion_notify_event != NULL) |
59661bd074b4
[svn] Try to put some skinned window code in a common place.
nenolod
parents:
diff
changeset
|
117 widget_class->motion_notify_event(widget, event); |
59661bd074b4
[svn] Try to put some skinned window code in a common place.
nenolod
parents:
diff
changeset
|
118 |
59661bd074b4
[svn] Try to put some skinned window code in a common place.
nenolod
parents:
diff
changeset
|
119 if (dock_is_moving(GTK_WINDOW(widget))) |
59661bd074b4
[svn] Try to put some skinned window code in a common place.
nenolod
parents:
diff
changeset
|
120 dock_move_motion(GTK_WINDOW(widget), event); |
59661bd074b4
[svn] Try to put some skinned window code in a common place.
nenolod
parents:
diff
changeset
|
121 |
59661bd074b4
[svn] Try to put some skinned window code in a common place.
nenolod
parents:
diff
changeset
|
122 return FALSE; |
59661bd074b4
[svn] Try to put some skinned window code in a common place.
nenolod
parents:
diff
changeset
|
123 } |
59661bd074b4
[svn] Try to put some skinned window code in a common place.
nenolod
parents:
diff
changeset
|
124 |
3249
eff2e785e3b4
add focus_in and focus_out events
Tomasz Mon <desowin@gmail.com>
parents:
3223
diff
changeset
|
125 static gboolean ui_skinned_window_focus_in(GtkWidget *widget, GdkEventFocus *focus) { |
eff2e785e3b4
add focus_in and focus_out events
Tomasz Mon <desowin@gmail.com>
parents:
3223
diff
changeset
|
126 gboolean val = GTK_WIDGET_CLASS (parent)->focus_in_event (widget, focus); |
eff2e785e3b4
add focus_in and focus_out events
Tomasz Mon <desowin@gmail.com>
parents:
3223
diff
changeset
|
127 gtk_widget_queue_draw(widget); |
eff2e785e3b4
add focus_in and focus_out events
Tomasz Mon <desowin@gmail.com>
parents:
3223
diff
changeset
|
128 return val; |
eff2e785e3b4
add focus_in and focus_out events
Tomasz Mon <desowin@gmail.com>
parents:
3223
diff
changeset
|
129 } |
eff2e785e3b4
add focus_in and focus_out events
Tomasz Mon <desowin@gmail.com>
parents:
3223
diff
changeset
|
130 |
eff2e785e3b4
add focus_in and focus_out events
Tomasz Mon <desowin@gmail.com>
parents:
3223
diff
changeset
|
131 static gboolean ui_skinned_window_focus_out(GtkWidget *widget, GdkEventFocus *focus) { |
eff2e785e3b4
add focus_in and focus_out events
Tomasz Mon <desowin@gmail.com>
parents:
3223
diff
changeset
|
132 gboolean val = GTK_WIDGET_CLASS (parent)->focus_out_event (widget, focus); |
eff2e785e3b4
add focus_in and focus_out events
Tomasz Mon <desowin@gmail.com>
parents:
3223
diff
changeset
|
133 gtk_widget_queue_draw(widget); |
eff2e785e3b4
add focus_in and focus_out events
Tomasz Mon <desowin@gmail.com>
parents:
3223
diff
changeset
|
134 return val; |
eff2e785e3b4
add focus_in and focus_out events
Tomasz Mon <desowin@gmail.com>
parents:
3223
diff
changeset
|
135 } |
eff2e785e3b4
add focus_in and focus_out events
Tomasz Mon <desowin@gmail.com>
parents:
3223
diff
changeset
|
136 |
3221
9583cd62231f
implement ui_skinned_window_expose
Tomasz Mon <desowin@gmail.com>
parents:
3218
diff
changeset
|
137 static gboolean ui_skinned_window_expose(GtkWidget *widget, GdkEventExpose *event) { |
9583cd62231f
implement ui_skinned_window_expose
Tomasz Mon <desowin@gmail.com>
parents:
3218
diff
changeset
|
138 SkinnedWindow *window = SKINNED_WINDOW(widget); |
9583cd62231f
implement ui_skinned_window_expose
Tomasz Mon <desowin@gmail.com>
parents:
3218
diff
changeset
|
139 |
9583cd62231f
implement ui_skinned_window_expose
Tomasz Mon <desowin@gmail.com>
parents:
3218
diff
changeset
|
140 GdkPixmap *obj = NULL; |
9583cd62231f
implement ui_skinned_window_expose
Tomasz Mon <desowin@gmail.com>
parents:
3218
diff
changeset
|
141 GdkGC *gc; |
9583cd62231f
implement ui_skinned_window_expose
Tomasz Mon <desowin@gmail.com>
parents:
3218
diff
changeset
|
142 |
9583cd62231f
implement ui_skinned_window_expose
Tomasz Mon <desowin@gmail.com>
parents:
3218
diff
changeset
|
143 gint width = 0, height = 0; |
9583cd62231f
implement ui_skinned_window_expose
Tomasz Mon <desowin@gmail.com>
parents:
3218
diff
changeset
|
144 switch (window->type) { |
9583cd62231f
implement ui_skinned_window_expose
Tomasz Mon <desowin@gmail.com>
parents:
3218
diff
changeset
|
145 case WINDOW_MAIN: |
9583cd62231f
implement ui_skinned_window_expose
Tomasz Mon <desowin@gmail.com>
parents:
3218
diff
changeset
|
146 width = bmp_active_skin->properties.mainwin_width; |
9583cd62231f
implement ui_skinned_window_expose
Tomasz Mon <desowin@gmail.com>
parents:
3218
diff
changeset
|
147 height = bmp_active_skin->properties.mainwin_height; |
9583cd62231f
implement ui_skinned_window_expose
Tomasz Mon <desowin@gmail.com>
parents:
3218
diff
changeset
|
148 break; |
9583cd62231f
implement ui_skinned_window_expose
Tomasz Mon <desowin@gmail.com>
parents:
3218
diff
changeset
|
149 case WINDOW_EQ: |
9583cd62231f
implement ui_skinned_window_expose
Tomasz Mon <desowin@gmail.com>
parents:
3218
diff
changeset
|
150 width = 275; |
9583cd62231f
implement ui_skinned_window_expose
Tomasz Mon <desowin@gmail.com>
parents:
3218
diff
changeset
|
151 height = 116; |
9583cd62231f
implement ui_skinned_window_expose
Tomasz Mon <desowin@gmail.com>
parents:
3218
diff
changeset
|
152 break; |
9583cd62231f
implement ui_skinned_window_expose
Tomasz Mon <desowin@gmail.com>
parents:
3218
diff
changeset
|
153 case WINDOW_PLAYLIST: |
9583cd62231f
implement ui_skinned_window_expose
Tomasz Mon <desowin@gmail.com>
parents:
3218
diff
changeset
|
154 width = playlistwin_get_width(); |
9583cd62231f
implement ui_skinned_window_expose
Tomasz Mon <desowin@gmail.com>
parents:
3218
diff
changeset
|
155 height = cfg.playlist_height; |
9583cd62231f
implement ui_skinned_window_expose
Tomasz Mon <desowin@gmail.com>
parents:
3218
diff
changeset
|
156 break; |
9583cd62231f
implement ui_skinned_window_expose
Tomasz Mon <desowin@gmail.com>
parents:
3218
diff
changeset
|
157 default: |
9583cd62231f
implement ui_skinned_window_expose
Tomasz Mon <desowin@gmail.com>
parents:
3218
diff
changeset
|
158 return FALSE; |
9583cd62231f
implement ui_skinned_window_expose
Tomasz Mon <desowin@gmail.com>
parents:
3218
diff
changeset
|
159 } |
9583cd62231f
implement ui_skinned_window_expose
Tomasz Mon <desowin@gmail.com>
parents:
3218
diff
changeset
|
160 obj = gdk_pixmap_new(NULL, width, height, gdk_rgb_get_visual()->depth); |
9583cd62231f
implement ui_skinned_window_expose
Tomasz Mon <desowin@gmail.com>
parents:
3218
diff
changeset
|
161 gc = gdk_gc_new(obj); |
9583cd62231f
implement ui_skinned_window_expose
Tomasz Mon <desowin@gmail.com>
parents:
3218
diff
changeset
|
162 |
9583cd62231f
implement ui_skinned_window_expose
Tomasz Mon <desowin@gmail.com>
parents:
3218
diff
changeset
|
163 gboolean focus = gtk_window_has_toplevel_focus(GTK_WINDOW(widget)); |
9583cd62231f
implement ui_skinned_window_expose
Tomasz Mon <desowin@gmail.com>
parents:
3218
diff
changeset
|
164 |
9583cd62231f
implement ui_skinned_window_expose
Tomasz Mon <desowin@gmail.com>
parents:
3218
diff
changeset
|
165 switch (window->type) { |
9583cd62231f
implement ui_skinned_window_expose
Tomasz Mon <desowin@gmail.com>
parents:
3218
diff
changeset
|
166 case WINDOW_MAIN: |
9583cd62231f
implement ui_skinned_window_expose
Tomasz Mon <desowin@gmail.com>
parents:
3218
diff
changeset
|
167 skin_draw_pixmap(bmp_active_skin, obj, gc, SKIN_MAIN, 0, 0, 0, 0, width, height); |
9583cd62231f
implement ui_skinned_window_expose
Tomasz Mon <desowin@gmail.com>
parents:
3218
diff
changeset
|
168 skin_draw_mainwin_titlebar(bmp_active_skin, obj, gc, cfg.player_shaded, focus || !cfg.dim_titlebar); |
9583cd62231f
implement ui_skinned_window_expose
Tomasz Mon <desowin@gmail.com>
parents:
3218
diff
changeset
|
169 break; |
9583cd62231f
implement ui_skinned_window_expose
Tomasz Mon <desowin@gmail.com>
parents:
3218
diff
changeset
|
170 case WINDOW_EQ: |
9583cd62231f
implement ui_skinned_window_expose
Tomasz Mon <desowin@gmail.com>
parents:
3218
diff
changeset
|
171 skin_draw_pixmap(bmp_active_skin, obj, gc, SKIN_EQMAIN, 0, 0, 0, 0, width, height); |
9583cd62231f
implement ui_skinned_window_expose
Tomasz Mon <desowin@gmail.com>
parents:
3218
diff
changeset
|
172 if (focus || !cfg.dim_titlebar) { |
9583cd62231f
implement ui_skinned_window_expose
Tomasz Mon <desowin@gmail.com>
parents:
3218
diff
changeset
|
173 if (!cfg.equalizer_shaded) |
9583cd62231f
implement ui_skinned_window_expose
Tomasz Mon <desowin@gmail.com>
parents:
3218
diff
changeset
|
174 skin_draw_pixmap(bmp_active_skin, obj, gc, SKIN_EQMAIN, 0, 134, 0, 0, width, 14); |
9583cd62231f
implement ui_skinned_window_expose
Tomasz Mon <desowin@gmail.com>
parents:
3218
diff
changeset
|
175 else |
9583cd62231f
implement ui_skinned_window_expose
Tomasz Mon <desowin@gmail.com>
parents:
3218
diff
changeset
|
176 skin_draw_pixmap(bmp_active_skin, obj, gc, SKIN_EQ_EX, 0, 0, 0, 0, width, 14); |
9583cd62231f
implement ui_skinned_window_expose
Tomasz Mon <desowin@gmail.com>
parents:
3218
diff
changeset
|
177 } else { |
9583cd62231f
implement ui_skinned_window_expose
Tomasz Mon <desowin@gmail.com>
parents:
3218
diff
changeset
|
178 if (!cfg.equalizer_shaded) |
9583cd62231f
implement ui_skinned_window_expose
Tomasz Mon <desowin@gmail.com>
parents:
3218
diff
changeset
|
179 skin_draw_pixmap(bmp_active_skin, obj, gc, SKIN_EQMAIN, 0, 149, 0, 0, width, 14); |
9583cd62231f
implement ui_skinned_window_expose
Tomasz Mon <desowin@gmail.com>
parents:
3218
diff
changeset
|
180 else |
9583cd62231f
implement ui_skinned_window_expose
Tomasz Mon <desowin@gmail.com>
parents:
3218
diff
changeset
|
181 skin_draw_pixmap(bmp_active_skin, obj, gc, SKIN_EQ_EX, 0, 15, 0, 0, width, 14); |
9583cd62231f
implement ui_skinned_window_expose
Tomasz Mon <desowin@gmail.com>
parents:
3218
diff
changeset
|
182 } |
9583cd62231f
implement ui_skinned_window_expose
Tomasz Mon <desowin@gmail.com>
parents:
3218
diff
changeset
|
183 break; |
9583cd62231f
implement ui_skinned_window_expose
Tomasz Mon <desowin@gmail.com>
parents:
3218
diff
changeset
|
184 case WINDOW_PLAYLIST: |
9583cd62231f
implement ui_skinned_window_expose
Tomasz Mon <desowin@gmail.com>
parents:
3218
diff
changeset
|
185 focus |= !cfg.dim_titlebar; |
9583cd62231f
implement ui_skinned_window_expose
Tomasz Mon <desowin@gmail.com>
parents:
3218
diff
changeset
|
186 if (cfg.playlist_shaded) { |
9583cd62231f
implement ui_skinned_window_expose
Tomasz Mon <desowin@gmail.com>
parents:
3218
diff
changeset
|
187 skin_draw_playlistwin_shaded(bmp_active_skin, obj, gc, playlistwin_get_width(), focus); |
9583cd62231f
implement ui_skinned_window_expose
Tomasz Mon <desowin@gmail.com>
parents:
3218
diff
changeset
|
188 } else { |
9583cd62231f
implement ui_skinned_window_expose
Tomasz Mon <desowin@gmail.com>
parents:
3218
diff
changeset
|
189 skin_draw_playlistwin_frame(bmp_active_skin, obj, gc, playlistwin_get_width(), cfg.playlist_height, focus); |
9583cd62231f
implement ui_skinned_window_expose
Tomasz Mon <desowin@gmail.com>
parents:
3218
diff
changeset
|
190 } |
9583cd62231f
implement ui_skinned_window_expose
Tomasz Mon <desowin@gmail.com>
parents:
3218
diff
changeset
|
191 break; |
9583cd62231f
implement ui_skinned_window_expose
Tomasz Mon <desowin@gmail.com>
parents:
3218
diff
changeset
|
192 } |
9583cd62231f
implement ui_skinned_window_expose
Tomasz Mon <desowin@gmail.com>
parents:
3218
diff
changeset
|
193 |
9583cd62231f
implement ui_skinned_window_expose
Tomasz Mon <desowin@gmail.com>
parents:
3218
diff
changeset
|
194 GdkPixmap *image = NULL; |
9583cd62231f
implement ui_skinned_window_expose
Tomasz Mon <desowin@gmail.com>
parents:
3218
diff
changeset
|
195 |
9583cd62231f
implement ui_skinned_window_expose
Tomasz Mon <desowin@gmail.com>
parents:
3218
diff
changeset
|
196 if (window->type != WINDOW_PLAYLIST && cfg.doublesize) { |
9583cd62231f
implement ui_skinned_window_expose
Tomasz Mon <desowin@gmail.com>
parents:
3218
diff
changeset
|
197 image = create_dblsize_pixmap(obj); |
9583cd62231f
implement ui_skinned_window_expose
Tomasz Mon <desowin@gmail.com>
parents:
3218
diff
changeset
|
198 } else { |
9583cd62231f
implement ui_skinned_window_expose
Tomasz Mon <desowin@gmail.com>
parents:
3218
diff
changeset
|
199 image = gdk_pixmap_new(NULL, width, height, gdk_rgb_get_visual()->depth); |
9583cd62231f
implement ui_skinned_window_expose
Tomasz Mon <desowin@gmail.com>
parents:
3218
diff
changeset
|
200 gdk_draw_drawable (image, gc, obj, 0, 0, 0, 0, width, height); |
9583cd62231f
implement ui_skinned_window_expose
Tomasz Mon <desowin@gmail.com>
parents:
3218
diff
changeset
|
201 } |
9583cd62231f
implement ui_skinned_window_expose
Tomasz Mon <desowin@gmail.com>
parents:
3218
diff
changeset
|
202 g_object_unref(obj); |
9583cd62231f
implement ui_skinned_window_expose
Tomasz Mon <desowin@gmail.com>
parents:
3218
diff
changeset
|
203 gdk_draw_drawable (widget->window, gc, image, 0, 0, 0, 0, width*(1+cfg.doublesize), height*(1+cfg.doublesize)); |
9583cd62231f
implement ui_skinned_window_expose
Tomasz Mon <desowin@gmail.com>
parents:
3218
diff
changeset
|
204 g_object_unref(gc); |
9583cd62231f
implement ui_skinned_window_expose
Tomasz Mon <desowin@gmail.com>
parents:
3218
diff
changeset
|
205 g_object_unref(image); |
9583cd62231f
implement ui_skinned_window_expose
Tomasz Mon <desowin@gmail.com>
parents:
3218
diff
changeset
|
206 |
9583cd62231f
implement ui_skinned_window_expose
Tomasz Mon <desowin@gmail.com>
parents:
3218
diff
changeset
|
207 return FALSE; |
9583cd62231f
implement ui_skinned_window_expose
Tomasz Mon <desowin@gmail.com>
parents:
3218
diff
changeset
|
208 } |
9583cd62231f
implement ui_skinned_window_expose
Tomasz Mon <desowin@gmail.com>
parents:
3218
diff
changeset
|
209 |
2494
59661bd074b4
[svn] Try to put some skinned window code in a common place.
nenolod
parents:
diff
changeset
|
210 static void |
59661bd074b4
[svn] Try to put some skinned window code in a common place.
nenolod
parents:
diff
changeset
|
211 ui_skinned_window_class_init(SkinnedWindowClass *klass) |
59661bd074b4
[svn] Try to put some skinned window code in a common place.
nenolod
parents:
diff
changeset
|
212 { |
59661bd074b4
[svn] Try to put some skinned window code in a common place.
nenolod
parents:
diff
changeset
|
213 GtkWidgetClass *widget_class; |
59661bd074b4
[svn] Try to put some skinned window code in a common place.
nenolod
parents:
diff
changeset
|
214 |
59661bd074b4
[svn] Try to put some skinned window code in a common place.
nenolod
parents:
diff
changeset
|
215 widget_class = (GtkWidgetClass*) klass; |
59661bd074b4
[svn] Try to put some skinned window code in a common place.
nenolod
parents:
diff
changeset
|
216 |
59661bd074b4
[svn] Try to put some skinned window code in a common place.
nenolod
parents:
diff
changeset
|
217 parent = gtk_type_class(gtk_window_get_type()); |
59661bd074b4
[svn] Try to put some skinned window code in a common place.
nenolod
parents:
diff
changeset
|
218 |
59661bd074b4
[svn] Try to put some skinned window code in a common place.
nenolod
parents:
diff
changeset
|
219 widget_class->configure_event = ui_skinned_window_configure; |
59661bd074b4
[svn] Try to put some skinned window code in a common place.
nenolod
parents:
diff
changeset
|
220 widget_class->motion_notify_event = ui_skinned_window_motion_notify_event; |
3221
9583cd62231f
implement ui_skinned_window_expose
Tomasz Mon <desowin@gmail.com>
parents:
3218
diff
changeset
|
221 widget_class->expose_event = ui_skinned_window_expose; |
3249
eff2e785e3b4
add focus_in and focus_out events
Tomasz Mon <desowin@gmail.com>
parents:
3223
diff
changeset
|
222 widget_class->focus_in_event = ui_skinned_window_focus_in; |
eff2e785e3b4
add focus_in and focus_out events
Tomasz Mon <desowin@gmail.com>
parents:
3223
diff
changeset
|
223 widget_class->focus_out_event = ui_skinned_window_focus_out; |
2494
59661bd074b4
[svn] Try to put some skinned window code in a common place.
nenolod
parents:
diff
changeset
|
224 } |
59661bd074b4
[svn] Try to put some skinned window code in a common place.
nenolod
parents:
diff
changeset
|
225 |
59661bd074b4
[svn] Try to put some skinned window code in a common place.
nenolod
parents:
diff
changeset
|
226 void |
59661bd074b4
[svn] Try to put some skinned window code in a common place.
nenolod
parents:
diff
changeset
|
227 ui_skinned_window_hide(SkinnedWindow *window) |
59661bd074b4
[svn] Try to put some skinned window code in a common place.
nenolod
parents:
diff
changeset
|
228 { |
59661bd074b4
[svn] Try to put some skinned window code in a common place.
nenolod
parents:
diff
changeset
|
229 g_return_if_fail(SKINNED_CHECK_WINDOW(window)); |
59661bd074b4
[svn] Try to put some skinned window code in a common place.
nenolod
parents:
diff
changeset
|
230 |
59661bd074b4
[svn] Try to put some skinned window code in a common place.
nenolod
parents:
diff
changeset
|
231 gtk_window_get_position(GTK_WINDOW(window), &window->x, &window->y); |
59661bd074b4
[svn] Try to put some skinned window code in a common place.
nenolod
parents:
diff
changeset
|
232 gtk_widget_hide(GTK_WIDGET(window)); |
59661bd074b4
[svn] Try to put some skinned window code in a common place.
nenolod
parents:
diff
changeset
|
233 } |
59661bd074b4
[svn] Try to put some skinned window code in a common place.
nenolod
parents:
diff
changeset
|
234 |
59661bd074b4
[svn] Try to put some skinned window code in a common place.
nenolod
parents:
diff
changeset
|
235 void |
59661bd074b4
[svn] Try to put some skinned window code in a common place.
nenolod
parents:
diff
changeset
|
236 ui_skinned_window_show(SkinnedWindow *window) |
59661bd074b4
[svn] Try to put some skinned window code in a common place.
nenolod
parents:
diff
changeset
|
237 { |
59661bd074b4
[svn] Try to put some skinned window code in a common place.
nenolod
parents:
diff
changeset
|
238 g_return_if_fail(SKINNED_CHECK_WINDOW(window)); |
59661bd074b4
[svn] Try to put some skinned window code in a common place.
nenolod
parents:
diff
changeset
|
239 |
59661bd074b4
[svn] Try to put some skinned window code in a common place.
nenolod
parents:
diff
changeset
|
240 gtk_window_move(GTK_WINDOW(window), window->x, window->y); |
59661bd074b4
[svn] Try to put some skinned window code in a common place.
nenolod
parents:
diff
changeset
|
241 gtk_widget_show_all(GTK_WIDGET(window)); |
59661bd074b4
[svn] Try to put some skinned window code in a common place.
nenolod
parents:
diff
changeset
|
242 } |
59661bd074b4
[svn] Try to put some skinned window code in a common place.
nenolod
parents:
diff
changeset
|
243 |
59661bd074b4
[svn] Try to put some skinned window code in a common place.
nenolod
parents:
diff
changeset
|
244 static void |
59661bd074b4
[svn] Try to put some skinned window code in a common place.
nenolod
parents:
diff
changeset
|
245 ui_skinned_window_init(GtkWidget *widget) |
59661bd074b4
[svn] Try to put some skinned window code in a common place.
nenolod
parents:
diff
changeset
|
246 { |
59661bd074b4
[svn] Try to put some skinned window code in a common place.
nenolod
parents:
diff
changeset
|
247 SkinnedWindow *window; |
59661bd074b4
[svn] Try to put some skinned window code in a common place.
nenolod
parents:
diff
changeset
|
248 window = SKINNED_WINDOW(widget); |
2651
4d5e6a8717dd
[svn] - allow the player to start with all of its windows hidden (but give a warning to the user, whose display can be disabled); also, try to remember player windows positions when they stay hidden between sessions
giacomo
parents:
2530
diff
changeset
|
249 window->x = -1; |
4d5e6a8717dd
[svn] - allow the player to start with all of its windows hidden (but give a warning to the user, whose display can be disabled); also, try to remember player windows positions when they stay hidden between sessions
giacomo
parents:
2530
diff
changeset
|
250 window->y = -1; |
2494
59661bd074b4
[svn] Try to put some skinned window code in a common place.
nenolod
parents:
diff
changeset
|
251 } |
59661bd074b4
[svn] Try to put some skinned window code in a common place.
nenolod
parents:
diff
changeset
|
252 |
59661bd074b4
[svn] Try to put some skinned window code in a common place.
nenolod
parents:
diff
changeset
|
253 GtkWidget * |
3068
c5189bc4100b
Refactor skinned window code.
William Pitcock <nenolod@atheme-project.org>
parents:
3067
diff
changeset
|
254 ui_skinned_window_new(const gchar *wmclass_name) |
2494
59661bd074b4
[svn] Try to put some skinned window code in a common place.
nenolod
parents:
diff
changeset
|
255 { |
59661bd074b4
[svn] Try to put some skinned window code in a common place.
nenolod
parents:
diff
changeset
|
256 GtkWidget *widget = g_object_new(ui_skinned_window_get_type(), NULL); |
3063
0ac3c3bc5d4a
Set GTK+ window types.
William Pitcock <nenolod@atheme-project.org>
parents:
2840
diff
changeset
|
257 GtkWindow *window = GTK_WINDOW(widget); |
0ac3c3bc5d4a
Set GTK+ window types.
William Pitcock <nenolod@atheme-project.org>
parents:
2840
diff
changeset
|
258 |
3068
c5189bc4100b
Refactor skinned window code.
William Pitcock <nenolod@atheme-project.org>
parents:
3067
diff
changeset
|
259 window->type = SKINNED_WINDOW_TYPE; |
2494
59661bd074b4
[svn] Try to put some skinned window code in a common place.
nenolod
parents:
diff
changeset
|
260 |
2515
319b10203d7c
[svn] gtk_window_set_wmclass() has to be called before gtk_widget_realize(). Patched by Christian "Joker" Birchinger from Gentoo.
chainsaw
parents:
2496
diff
changeset
|
261 if (wmclass_name) |
319b10203d7c
[svn] gtk_window_set_wmclass() has to be called before gtk_widget_realize(). Patched by Christian "Joker" Birchinger from Gentoo.
chainsaw
parents:
2496
diff
changeset
|
262 gtk_window_set_wmclass(GTK_WINDOW(widget), wmclass_name, "Audacious"); |
319b10203d7c
[svn] gtk_window_set_wmclass() has to be called before gtk_widget_realize(). Patched by Christian "Joker" Birchinger from Gentoo.
chainsaw
parents:
2496
diff
changeset
|
263 |
2494
59661bd074b4
[svn] Try to put some skinned window code in a common place.
nenolod
parents:
diff
changeset
|
264 gtk_widget_add_events(GTK_WIDGET(widget), |
59661bd074b4
[svn] Try to put some skinned window code in a common place.
nenolod
parents:
diff
changeset
|
265 GDK_FOCUS_CHANGE_MASK | GDK_BUTTON_MOTION_MASK | |
59661bd074b4
[svn] Try to put some skinned window code in a common place.
nenolod
parents:
diff
changeset
|
266 GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK | |
59661bd074b4
[svn] Try to put some skinned window code in a common place.
nenolod
parents:
diff
changeset
|
267 GDK_SCROLL_MASK | GDK_KEY_PRESS_MASK | |
3221
9583cd62231f
implement ui_skinned_window_expose
Tomasz Mon <desowin@gmail.com>
parents:
3218
diff
changeset
|
268 GDK_VISIBILITY_NOTIFY_MASK | GDK_EXPOSURE_MASK); |
2494
59661bd074b4
[svn] Try to put some skinned window code in a common place.
nenolod
parents:
diff
changeset
|
269 gtk_widget_realize(GTK_WIDGET(widget)); |
59661bd074b4
[svn] Try to put some skinned window code in a common place.
nenolod
parents:
diff
changeset
|
270 |
59661bd074b4
[svn] Try to put some skinned window code in a common place.
nenolod
parents:
diff
changeset
|
271 dock_window_list = dock_window_set_decorated(dock_window_list, |
59661bd074b4
[svn] Try to put some skinned window code in a common place.
nenolod
parents:
diff
changeset
|
272 GTK_WINDOW(widget), cfg.show_wm_decorations); |
59661bd074b4
[svn] Try to put some skinned window code in a common place.
nenolod
parents:
diff
changeset
|
273 gtk_widget_set_app_paintable(GTK_WIDGET(widget), TRUE); |
59661bd074b4
[svn] Try to put some skinned window code in a common place.
nenolod
parents:
diff
changeset
|
274 |
59661bd074b4
[svn] Try to put some skinned window code in a common place.
nenolod
parents:
diff
changeset
|
275 ui_skinned_cursor_set(GTK_WIDGET(widget)); |
59661bd074b4
[svn] Try to put some skinned window code in a common place.
nenolod
parents:
diff
changeset
|
276 |
3221
9583cd62231f
implement ui_skinned_window_expose
Tomasz Mon <desowin@gmail.com>
parents:
3218
diff
changeset
|
277 if (!strcmp(wmclass_name, "player")) |
9583cd62231f
implement ui_skinned_window_expose
Tomasz Mon <desowin@gmail.com>
parents:
3218
diff
changeset
|
278 SKINNED_WINDOW(widget)->type = WINDOW_MAIN; |
9583cd62231f
implement ui_skinned_window_expose
Tomasz Mon <desowin@gmail.com>
parents:
3218
diff
changeset
|
279 if (!strcmp(wmclass_name, "equalizer")) |
9583cd62231f
implement ui_skinned_window_expose
Tomasz Mon <desowin@gmail.com>
parents:
3218
diff
changeset
|
280 SKINNED_WINDOW(widget)->type = WINDOW_EQ; |
9583cd62231f
implement ui_skinned_window_expose
Tomasz Mon <desowin@gmail.com>
parents:
3218
diff
changeset
|
281 if (!strcmp(wmclass_name, "playlist")) |
9583cd62231f
implement ui_skinned_window_expose
Tomasz Mon <desowin@gmail.com>
parents:
3218
diff
changeset
|
282 SKINNED_WINDOW(widget)->type = WINDOW_PLAYLIST; |
2525 | 283 |
2821 | 284 /* GtkFixed hasn't got its GdkWindow, this means that it can be used to |
285 display widgets while the logo below will be displayed anyway; | |
286 however fixed positions are not that great, cause the button sizes may (will) | |
287 vary depending on the gtk style used, so it's not possible to center | |
288 them unless a fixed width and heigth is forced (and this may bring to cutted | |
289 text if someone, i.e., uses a big font for gtk widgets); | |
290 other types of container most likely have their GdkWindow, this simply | |
291 means that the logo must be drawn on the container widget, instead of the | |
292 window; otherwise, it won't be displayed correctly */ | |
293 SKINNED_WINDOW(widget)->fixed = gtk_fixed_new(); | |
2840 | 294 gtk_container_add(GTK_CONTAINER(widget), GTK_WIDGET(SKINNED_WINDOW(widget)->fixed)); |
2494
59661bd074b4
[svn] Try to put some skinned window code in a common place.
nenolod
parents:
diff
changeset
|
295 return widget; |
59661bd074b4
[svn] Try to put some skinned window code in a common place.
nenolod
parents:
diff
changeset
|
296 } |
3221
9583cd62231f
implement ui_skinned_window_expose
Tomasz Mon <desowin@gmail.com>
parents:
3218
diff
changeset
|
297 |
9583cd62231f
implement ui_skinned_window_expose
Tomasz Mon <desowin@gmail.com>
parents:
3218
diff
changeset
|
298 void ui_skinned_window_draw_all(GtkWidget *widget) { |
9583cd62231f
implement ui_skinned_window_expose
Tomasz Mon <desowin@gmail.com>
parents:
3218
diff
changeset
|
299 if (SKINNED_WINDOW(widget)->type == WINDOW_MAIN) |
9583cd62231f
implement ui_skinned_window_expose
Tomasz Mon <desowin@gmail.com>
parents:
3218
diff
changeset
|
300 mainwin_refresh_hints(); |
9583cd62231f
implement ui_skinned_window_expose
Tomasz Mon <desowin@gmail.com>
parents:
3218
diff
changeset
|
301 |
9583cd62231f
implement ui_skinned_window_expose
Tomasz Mon <desowin@gmail.com>
parents:
3218
diff
changeset
|
302 gtk_widget_queue_draw(widget); |
9583cd62231f
implement ui_skinned_window_expose
Tomasz Mon <desowin@gmail.com>
parents:
3218
diff
changeset
|
303 GList *iter; |
9583cd62231f
implement ui_skinned_window_expose
Tomasz Mon <desowin@gmail.com>
parents:
3218
diff
changeset
|
304 for (iter = GTK_FIXED (SKINNED_WINDOW(widget)->fixed)->children; iter; iter = g_list_next (iter)) { |
9583cd62231f
implement ui_skinned_window_expose
Tomasz Mon <desowin@gmail.com>
parents:
3218
diff
changeset
|
305 GtkFixedChild *child_data = (GtkFixedChild *) iter->data; |
9583cd62231f
implement ui_skinned_window_expose
Tomasz Mon <desowin@gmail.com>
parents:
3218
diff
changeset
|
306 GtkWidget *child = child_data->widget; |
9583cd62231f
implement ui_skinned_window_expose
Tomasz Mon <desowin@gmail.com>
parents:
3218
diff
changeset
|
307 gtk_widget_queue_draw(child); |
9583cd62231f
implement ui_skinned_window_expose
Tomasz Mon <desowin@gmail.com>
parents:
3218
diff
changeset
|
308 } |
9583cd62231f
implement ui_skinned_window_expose
Tomasz Mon <desowin@gmail.com>
parents:
3218
diff
changeset
|
309 } |