Mercurial > audlegacy
annotate src/audacious/ui_skinned_window.c @ 2500:04642d2d0941 trunk
[svn] - split out jump to track
author | nenolod |
---|---|
date | Sat, 10 Feb 2007 20:47:46 -0800 |
parents | 71bee08db1c6 |
children | 319b10203d7c |
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 |
59661bd074b4
[svn] Try to put some skinned window code in a common place.
nenolod
parents:
diff
changeset
|
7 * the Free Software Foundation; under version 2 of the License. |
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 |
59661bd074b4
[svn] Try to put some skinned window code in a common place.
nenolod
parents:
diff
changeset
|
15 * along with this program; if not, write to the Free Software |
59661bd074b4
[svn] Try to put some skinned window code in a common place.
nenolod
parents:
diff
changeset
|
16 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA |
59661bd074b4
[svn] Try to put some skinned window code in a common place.
nenolod
parents:
diff
changeset
|
17 * 02110-1301, USA. |
59661bd074b4
[svn] Try to put some skinned window code in a common place.
nenolod
parents:
diff
changeset
|
18 */ |
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 #include "platform/smartinclude.h" |
2496
71bee08db1c6
[svn] - widgetlist -> SkinnedWindow class + basic conversion in ui_main, other skinned windows remain
nenolod
parents:
2494
diff
changeset
|
21 #include "widgets/widgetcore.h" |
2494
59661bd074b4
[svn] Try to put some skinned window code in a common place.
nenolod
parents:
diff
changeset
|
22 |
59661bd074b4
[svn] Try to put some skinned window code in a common place.
nenolod
parents:
diff
changeset
|
23 #include <gtk/gtkmain.h> |
59661bd074b4
[svn] Try to put some skinned window code in a common place.
nenolod
parents:
diff
changeset
|
24 #include <glib-object.h> |
59661bd074b4
[svn] Try to put some skinned window code in a common place.
nenolod
parents:
diff
changeset
|
25 #include <glib/gmacros.h> |
59661bd074b4
[svn] Try to put some skinned window code in a common place.
nenolod
parents:
diff
changeset
|
26 #include <gtk/gtkmarshal.h> |
59661bd074b4
[svn] Try to put some skinned window code in a common place.
nenolod
parents:
diff
changeset
|
27 #include <gtk/gtkwindow.h> |
59661bd074b4
[svn] Try to put some skinned window code in a common place.
nenolod
parents:
diff
changeset
|
28 |
59661bd074b4
[svn] Try to put some skinned window code in a common place.
nenolod
parents:
diff
changeset
|
29 #include "main.h" |
59661bd074b4
[svn] Try to put some skinned window code in a common place.
nenolod
parents:
diff
changeset
|
30 #include "dock.h" |
59661bd074b4
[svn] Try to put some skinned window code in a common place.
nenolod
parents:
diff
changeset
|
31 #include "ui_skinned_window.h" |
59661bd074b4
[svn] Try to put some skinned window code in a common place.
nenolod
parents:
diff
changeset
|
32 #include "ui_skinned_cursor.h" |
59661bd074b4
[svn] Try to put some skinned window code in a common place.
nenolod
parents:
diff
changeset
|
33 |
59661bd074b4
[svn] Try to put some skinned window code in a common place.
nenolod
parents:
diff
changeset
|
34 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
|
35 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
|
36 static GtkWindowClass *parent = NULL; |
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 GType |
59661bd074b4
[svn] Try to put some skinned window code in a common place.
nenolod
parents:
diff
changeset
|
39 ui_skinned_window_get_type(void) |
59661bd074b4
[svn] Try to put some skinned window code in a common place.
nenolod
parents:
diff
changeset
|
40 { |
59661bd074b4
[svn] Try to put some skinned window code in a common place.
nenolod
parents:
diff
changeset
|
41 static GType window_type = 0; |
59661bd074b4
[svn] Try to put some skinned window code in a common place.
nenolod
parents:
diff
changeset
|
42 |
59661bd074b4
[svn] Try to put some skinned window code in a common place.
nenolod
parents:
diff
changeset
|
43 if (!window_type) |
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 const GTypeInfo window_info = |
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 sizeof (SkinnedWindowClass), |
59661bd074b4
[svn] Try to put some skinned window code in a common place.
nenolod
parents:
diff
changeset
|
48 NULL, /* base_init */ |
59661bd074b4
[svn] Try to put some skinned window code in a common place.
nenolod
parents:
diff
changeset
|
49 NULL, /* base_finalize */ |
59661bd074b4
[svn] Try to put some skinned window code in a common place.
nenolod
parents:
diff
changeset
|
50 (GClassInitFunc) ui_skinned_window_class_init, |
59661bd074b4
[svn] Try to put some skinned window code in a common place.
nenolod
parents:
diff
changeset
|
51 NULL, /* class_finalize */ |
59661bd074b4
[svn] Try to put some skinned window code in a common place.
nenolod
parents:
diff
changeset
|
52 NULL, /* class_data */ |
59661bd074b4
[svn] Try to put some skinned window code in a common place.
nenolod
parents:
diff
changeset
|
53 sizeof (SkinnedWindow), |
59661bd074b4
[svn] Try to put some skinned window code in a common place.
nenolod
parents:
diff
changeset
|
54 0, /* n_preallocs */ |
59661bd074b4
[svn] Try to put some skinned window code in a common place.
nenolod
parents:
diff
changeset
|
55 (GInstanceInitFunc) ui_skinned_window_init |
59661bd074b4
[svn] Try to put some skinned window code in a common place.
nenolod
parents:
diff
changeset
|
56 }; |
59661bd074b4
[svn] Try to put some skinned window code in a common place.
nenolod
parents:
diff
changeset
|
57 |
59661bd074b4
[svn] Try to put some skinned window code in a common place.
nenolod
parents:
diff
changeset
|
58 window_type = |
59661bd074b4
[svn] Try to put some skinned window code in a common place.
nenolod
parents:
diff
changeset
|
59 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
|
60 &window_info, 0); |
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 |
59661bd074b4
[svn] Try to put some skinned window code in a common place.
nenolod
parents:
diff
changeset
|
63 return window_type; |
59661bd074b4
[svn] Try to put some skinned window code in a common place.
nenolod
parents:
diff
changeset
|
64 } |
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 static gboolean |
59661bd074b4
[svn] Try to put some skinned window code in a common place.
nenolod
parents:
diff
changeset
|
67 ui_skinned_window_configure(GtkWidget *widget, |
59661bd074b4
[svn] Try to put some skinned window code in a common place.
nenolod
parents:
diff
changeset
|
68 GdkEventConfigure *event) |
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 GtkWidgetClass *widget_class; |
59661bd074b4
[svn] Try to put some skinned window code in a common place.
nenolod
parents:
diff
changeset
|
71 SkinnedWindow *window = SKINNED_WINDOW(widget); |
59661bd074b4
[svn] Try to put some skinned window code in a common place.
nenolod
parents:
diff
changeset
|
72 |
59661bd074b4
[svn] Try to put some skinned window code in a common place.
nenolod
parents:
diff
changeset
|
73 widget_class = (GtkWidgetClass*) parent; |
59661bd074b4
[svn] Try to put some skinned window code in a common place.
nenolod
parents:
diff
changeset
|
74 |
59661bd074b4
[svn] Try to put some skinned window code in a common place.
nenolod
parents:
diff
changeset
|
75 if (widget_class->configure_event != NULL) |
59661bd074b4
[svn] Try to put some skinned window code in a common place.
nenolod
parents:
diff
changeset
|
76 widget_class->configure_event(widget, event); |
59661bd074b4
[svn] Try to put some skinned window code in a common place.
nenolod
parents:
diff
changeset
|
77 |
59661bd074b4
[svn] Try to put some skinned window code in a common place.
nenolod
parents:
diff
changeset
|
78 window->x = event->x; |
59661bd074b4
[svn] Try to put some skinned window code in a common place.
nenolod
parents:
diff
changeset
|
79 window->y = event->y; |
59661bd074b4
[svn] Try to put some skinned window code in a common place.
nenolod
parents:
diff
changeset
|
80 |
59661bd074b4
[svn] Try to put some skinned window code in a common place.
nenolod
parents:
diff
changeset
|
81 return FALSE; |
59661bd074b4
[svn] Try to put some skinned window code in a common place.
nenolod
parents:
diff
changeset
|
82 } |
59661bd074b4
[svn] Try to put some skinned window code in a common place.
nenolod
parents:
diff
changeset
|
83 |
59661bd074b4
[svn] Try to put some skinned window code in a common place.
nenolod
parents:
diff
changeset
|
84 static gboolean |
59661bd074b4
[svn] Try to put some skinned window code in a common place.
nenolod
parents:
diff
changeset
|
85 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
|
86 GdkEventMotion *event) |
59661bd074b4
[svn] Try to put some skinned window code in a common place.
nenolod
parents:
diff
changeset
|
87 { |
59661bd074b4
[svn] Try to put some skinned window code in a common place.
nenolod
parents:
diff
changeset
|
88 GtkWidgetClass *widget_class; |
59661bd074b4
[svn] Try to put some skinned window code in a common place.
nenolod
parents:
diff
changeset
|
89 |
59661bd074b4
[svn] Try to put some skinned window code in a common place.
nenolod
parents:
diff
changeset
|
90 widget_class = (GtkWidgetClass*) parent; |
59661bd074b4
[svn] Try to put some skinned window code in a common place.
nenolod
parents:
diff
changeset
|
91 |
59661bd074b4
[svn] Try to put some skinned window code in a common place.
nenolod
parents:
diff
changeset
|
92 if (widget_class->motion_notify_event != NULL) |
59661bd074b4
[svn] Try to put some skinned window code in a common place.
nenolod
parents:
diff
changeset
|
93 widget_class->motion_notify_event(widget, event); |
59661bd074b4
[svn] Try to put some skinned window code in a common place.
nenolod
parents:
diff
changeset
|
94 |
59661bd074b4
[svn] Try to put some skinned window code in a common place.
nenolod
parents:
diff
changeset
|
95 if (dock_is_moving(GTK_WINDOW(widget))) |
59661bd074b4
[svn] Try to put some skinned window code in a common place.
nenolod
parents:
diff
changeset
|
96 dock_move_motion(GTK_WINDOW(widget), event); |
59661bd074b4
[svn] Try to put some skinned window code in a common place.
nenolod
parents:
diff
changeset
|
97 |
59661bd074b4
[svn] Try to put some skinned window code in a common place.
nenolod
parents:
diff
changeset
|
98 return FALSE; |
59661bd074b4
[svn] Try to put some skinned window code in a common place.
nenolod
parents:
diff
changeset
|
99 } |
59661bd074b4
[svn] Try to put some skinned window code in a common place.
nenolod
parents:
diff
changeset
|
100 |
59661bd074b4
[svn] Try to put some skinned window code in a common place.
nenolod
parents:
diff
changeset
|
101 static void |
59661bd074b4
[svn] Try to put some skinned window code in a common place.
nenolod
parents:
diff
changeset
|
102 ui_skinned_window_class_init(SkinnedWindowClass *klass) |
59661bd074b4
[svn] Try to put some skinned window code in a common place.
nenolod
parents:
diff
changeset
|
103 { |
59661bd074b4
[svn] Try to put some skinned window code in a common place.
nenolod
parents:
diff
changeset
|
104 GtkWidgetClass *widget_class; |
59661bd074b4
[svn] Try to put some skinned window code in a common place.
nenolod
parents:
diff
changeset
|
105 |
59661bd074b4
[svn] Try to put some skinned window code in a common place.
nenolod
parents:
diff
changeset
|
106 widget_class = (GtkWidgetClass*) klass; |
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 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
|
109 |
59661bd074b4
[svn] Try to put some skinned window code in a common place.
nenolod
parents:
diff
changeset
|
110 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
|
111 widget_class->motion_notify_event = ui_skinned_window_motion_notify_event; |
59661bd074b4
[svn] Try to put some skinned window code in a common place.
nenolod
parents:
diff
changeset
|
112 } |
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 void |
59661bd074b4
[svn] Try to put some skinned window code in a common place.
nenolod
parents:
diff
changeset
|
115 ui_skinned_window_hide(SkinnedWindow *window) |
59661bd074b4
[svn] Try to put some skinned window code in a common place.
nenolod
parents:
diff
changeset
|
116 { |
59661bd074b4
[svn] Try to put some skinned window code in a common place.
nenolod
parents:
diff
changeset
|
117 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
|
118 |
59661bd074b4
[svn] Try to put some skinned window code in a common place.
nenolod
parents:
diff
changeset
|
119 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
|
120 gtk_widget_hide(GTK_WIDGET(window)); |
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 |
59661bd074b4
[svn] Try to put some skinned window code in a common place.
nenolod
parents:
diff
changeset
|
123 void |
59661bd074b4
[svn] Try to put some skinned window code in a common place.
nenolod
parents:
diff
changeset
|
124 ui_skinned_window_show(SkinnedWindow *window) |
59661bd074b4
[svn] Try to put some skinned window code in a common place.
nenolod
parents:
diff
changeset
|
125 { |
59661bd074b4
[svn] Try to put some skinned window code in a common place.
nenolod
parents:
diff
changeset
|
126 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
|
127 |
59661bd074b4
[svn] Try to put some skinned window code in a common place.
nenolod
parents:
diff
changeset
|
128 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
|
129 gtk_widget_show_all(GTK_WIDGET(window)); |
59661bd074b4
[svn] Try to put some skinned window code in a common place.
nenolod
parents:
diff
changeset
|
130 } |
59661bd074b4
[svn] Try to put some skinned window code in a common place.
nenolod
parents:
diff
changeset
|
131 |
59661bd074b4
[svn] Try to put some skinned window code in a common place.
nenolod
parents:
diff
changeset
|
132 static void |
59661bd074b4
[svn] Try to put some skinned window code in a common place.
nenolod
parents:
diff
changeset
|
133 ui_skinned_window_init(GtkWidget *widget) |
59661bd074b4
[svn] Try to put some skinned window code in a common place.
nenolod
parents:
diff
changeset
|
134 { |
59661bd074b4
[svn] Try to put some skinned window code in a common place.
nenolod
parents:
diff
changeset
|
135 SkinnedWindow *window; |
59661bd074b4
[svn] Try to put some skinned window code in a common place.
nenolod
parents:
diff
changeset
|
136 window = SKINNED_WINDOW(widget); |
59661bd074b4
[svn] Try to put some skinned window code in a common place.
nenolod
parents:
diff
changeset
|
137 } |
59661bd074b4
[svn] Try to put some skinned window code in a common place.
nenolod
parents:
diff
changeset
|
138 |
59661bd074b4
[svn] Try to put some skinned window code in a common place.
nenolod
parents:
diff
changeset
|
139 GtkWidget * |
59661bd074b4
[svn] Try to put some skinned window code in a common place.
nenolod
parents:
diff
changeset
|
140 ui_skinned_window_new(GtkWindowType type) |
59661bd074b4
[svn] Try to put some skinned window code in a common place.
nenolod
parents:
diff
changeset
|
141 { |
59661bd074b4
[svn] Try to put some skinned window code in a common place.
nenolod
parents:
diff
changeset
|
142 GtkWidget *widget = g_object_new(ui_skinned_window_get_type(), NULL); |
59661bd074b4
[svn] Try to put some skinned window code in a common place.
nenolod
parents:
diff
changeset
|
143 |
59661bd074b4
[svn] Try to put some skinned window code in a common place.
nenolod
parents:
diff
changeset
|
144 gtk_widget_add_events(GTK_WIDGET(widget), |
59661bd074b4
[svn] Try to put some skinned window code in a common place.
nenolod
parents:
diff
changeset
|
145 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
|
146 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
|
147 GDK_SCROLL_MASK | GDK_KEY_PRESS_MASK | |
59661bd074b4
[svn] Try to put some skinned window code in a common place.
nenolod
parents:
diff
changeset
|
148 GDK_VISIBILITY_NOTIFY_MASK); |
59661bd074b4
[svn] Try to put some skinned window code in a common place.
nenolod
parents:
diff
changeset
|
149 gtk_widget_realize(GTK_WIDGET(widget)); |
59661bd074b4
[svn] Try to put some skinned window code in a common place.
nenolod
parents:
diff
changeset
|
150 |
59661bd074b4
[svn] Try to put some skinned window code in a common place.
nenolod
parents:
diff
changeset
|
151 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
|
152 GTK_WINDOW(widget), cfg.show_wm_decorations); |
59661bd074b4
[svn] Try to put some skinned window code in a common place.
nenolod
parents:
diff
changeset
|
153 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
|
154 |
59661bd074b4
[svn] Try to put some skinned window code in a common place.
nenolod
parents:
diff
changeset
|
155 ui_skinned_cursor_set(GTK_WIDGET(widget)); |
59661bd074b4
[svn] Try to put some skinned window code in a common place.
nenolod
parents:
diff
changeset
|
156 |
59661bd074b4
[svn] Try to put some skinned window code in a common place.
nenolod
parents:
diff
changeset
|
157 return widget; |
59661bd074b4
[svn] Try to put some skinned window code in a common place.
nenolod
parents:
diff
changeset
|
158 } |
2496
71bee08db1c6
[svn] - widgetlist -> SkinnedWindow class + basic conversion in ui_main, other skinned windows remain
nenolod
parents:
2494
diff
changeset
|
159 |
71bee08db1c6
[svn] - widgetlist -> SkinnedWindow class + basic conversion in ui_main, other skinned windows remain
nenolod
parents:
2494
diff
changeset
|
160 void |
71bee08db1c6
[svn] - widgetlist -> SkinnedWindow class + basic conversion in ui_main, other skinned windows remain
nenolod
parents:
2494
diff
changeset
|
161 ui_skinned_window_widgetlist_associate(GtkWidget * widget, Widget * w) |
71bee08db1c6
[svn] - widgetlist -> SkinnedWindow class + basic conversion in ui_main, other skinned windows remain
nenolod
parents:
2494
diff
changeset
|
162 { |
71bee08db1c6
[svn] - widgetlist -> SkinnedWindow class + basic conversion in ui_main, other skinned windows remain
nenolod
parents:
2494
diff
changeset
|
163 SkinnedWindow *sw; |
71bee08db1c6
[svn] - widgetlist -> SkinnedWindow class + basic conversion in ui_main, other skinned windows remain
nenolod
parents:
2494
diff
changeset
|
164 |
71bee08db1c6
[svn] - widgetlist -> SkinnedWindow class + basic conversion in ui_main, other skinned windows remain
nenolod
parents:
2494
diff
changeset
|
165 g_return_if_fail(widget != NULL); |
71bee08db1c6
[svn] - widgetlist -> SkinnedWindow class + basic conversion in ui_main, other skinned windows remain
nenolod
parents:
2494
diff
changeset
|
166 g_return_if_fail(w != NULL); |
71bee08db1c6
[svn] - widgetlist -> SkinnedWindow class + basic conversion in ui_main, other skinned windows remain
nenolod
parents:
2494
diff
changeset
|
167 |
71bee08db1c6
[svn] - widgetlist -> SkinnedWindow class + basic conversion in ui_main, other skinned windows remain
nenolod
parents:
2494
diff
changeset
|
168 sw = SKINNED_WINDOW(widget); |
71bee08db1c6
[svn] - widgetlist -> SkinnedWindow class + basic conversion in ui_main, other skinned windows remain
nenolod
parents:
2494
diff
changeset
|
169 |
71bee08db1c6
[svn] - widgetlist -> SkinnedWindow class + basic conversion in ui_main, other skinned windows remain
nenolod
parents:
2494
diff
changeset
|
170 sw->widget_list = g_list_append(sw->widget_list, w); |
71bee08db1c6
[svn] - widgetlist -> SkinnedWindow class + basic conversion in ui_main, other skinned windows remain
nenolod
parents:
2494
diff
changeset
|
171 } |
71bee08db1c6
[svn] - widgetlist -> SkinnedWindow class + basic conversion in ui_main, other skinned windows remain
nenolod
parents:
2494
diff
changeset
|
172 |
71bee08db1c6
[svn] - widgetlist -> SkinnedWindow class + basic conversion in ui_main, other skinned windows remain
nenolod
parents:
2494
diff
changeset
|
173 void |
71bee08db1c6
[svn] - widgetlist -> SkinnedWindow class + basic conversion in ui_main, other skinned windows remain
nenolod
parents:
2494
diff
changeset
|
174 ui_skinned_window_widgetlist_dissociate(GtkWidget * widget, Widget * w) |
71bee08db1c6
[svn] - widgetlist -> SkinnedWindow class + basic conversion in ui_main, other skinned windows remain
nenolod
parents:
2494
diff
changeset
|
175 { |
71bee08db1c6
[svn] - widgetlist -> SkinnedWindow class + basic conversion in ui_main, other skinned windows remain
nenolod
parents:
2494
diff
changeset
|
176 SkinnedWindow *sw; |
71bee08db1c6
[svn] - widgetlist -> SkinnedWindow class + basic conversion in ui_main, other skinned windows remain
nenolod
parents:
2494
diff
changeset
|
177 |
71bee08db1c6
[svn] - widgetlist -> SkinnedWindow class + basic conversion in ui_main, other skinned windows remain
nenolod
parents:
2494
diff
changeset
|
178 g_return_if_fail(widget != NULL); |
71bee08db1c6
[svn] - widgetlist -> SkinnedWindow class + basic conversion in ui_main, other skinned windows remain
nenolod
parents:
2494
diff
changeset
|
179 g_return_if_fail(w != NULL); |
71bee08db1c6
[svn] - widgetlist -> SkinnedWindow class + basic conversion in ui_main, other skinned windows remain
nenolod
parents:
2494
diff
changeset
|
180 |
71bee08db1c6
[svn] - widgetlist -> SkinnedWindow class + basic conversion in ui_main, other skinned windows remain
nenolod
parents:
2494
diff
changeset
|
181 sw = SKINNED_WINDOW(widget); |
71bee08db1c6
[svn] - widgetlist -> SkinnedWindow class + basic conversion in ui_main, other skinned windows remain
nenolod
parents:
2494
diff
changeset
|
182 |
71bee08db1c6
[svn] - widgetlist -> SkinnedWindow class + basic conversion in ui_main, other skinned windows remain
nenolod
parents:
2494
diff
changeset
|
183 sw->widget_list = g_list_remove(sw->widget_list, w); |
71bee08db1c6
[svn] - widgetlist -> SkinnedWindow class + basic conversion in ui_main, other skinned windows remain
nenolod
parents:
2494
diff
changeset
|
184 } |
71bee08db1c6
[svn] - widgetlist -> SkinnedWindow class + basic conversion in ui_main, other skinned windows remain
nenolod
parents:
2494
diff
changeset
|
185 |
71bee08db1c6
[svn] - widgetlist -> SkinnedWindow class + basic conversion in ui_main, other skinned windows remain
nenolod
parents:
2494
diff
changeset
|
186 gboolean |
71bee08db1c6
[svn] - widgetlist -> SkinnedWindow class + basic conversion in ui_main, other skinned windows remain
nenolod
parents:
2494
diff
changeset
|
187 ui_skinned_window_widgetlist_contained(GtkWidget * widget, gint x, gint y) |
71bee08db1c6
[svn] - widgetlist -> SkinnedWindow class + basic conversion in ui_main, other skinned windows remain
nenolod
parents:
2494
diff
changeset
|
188 { |
71bee08db1c6
[svn] - widgetlist -> SkinnedWindow class + basic conversion in ui_main, other skinned windows remain
nenolod
parents:
2494
diff
changeset
|
189 SkinnedWindow *sw; |
71bee08db1c6
[svn] - widgetlist -> SkinnedWindow class + basic conversion in ui_main, other skinned windows remain
nenolod
parents:
2494
diff
changeset
|
190 GList *l; |
71bee08db1c6
[svn] - widgetlist -> SkinnedWindow class + basic conversion in ui_main, other skinned windows remain
nenolod
parents:
2494
diff
changeset
|
191 |
71bee08db1c6
[svn] - widgetlist -> SkinnedWindow class + basic conversion in ui_main, other skinned windows remain
nenolod
parents:
2494
diff
changeset
|
192 g_return_val_if_fail(widget != NULL, FALSE); |
71bee08db1c6
[svn] - widgetlist -> SkinnedWindow class + basic conversion in ui_main, other skinned windows remain
nenolod
parents:
2494
diff
changeset
|
193 |
71bee08db1c6
[svn] - widgetlist -> SkinnedWindow class + basic conversion in ui_main, other skinned windows remain
nenolod
parents:
2494
diff
changeset
|
194 sw = SKINNED_WINDOW(widget); |
71bee08db1c6
[svn] - widgetlist -> SkinnedWindow class + basic conversion in ui_main, other skinned windows remain
nenolod
parents:
2494
diff
changeset
|
195 |
71bee08db1c6
[svn] - widgetlist -> SkinnedWindow class + basic conversion in ui_main, other skinned windows remain
nenolod
parents:
2494
diff
changeset
|
196 for (l = sw->widget_list; l != NULL; l = g_list_next(l)) |
71bee08db1c6
[svn] - widgetlist -> SkinnedWindow class + basic conversion in ui_main, other skinned windows remain
nenolod
parents:
2494
diff
changeset
|
197 { |
71bee08db1c6
[svn] - widgetlist -> SkinnedWindow class + basic conversion in ui_main, other skinned windows remain
nenolod
parents:
2494
diff
changeset
|
198 Widget *w = WIDGET(l->data); |
71bee08db1c6
[svn] - widgetlist -> SkinnedWindow class + basic conversion in ui_main, other skinned windows remain
nenolod
parents:
2494
diff
changeset
|
199 |
71bee08db1c6
[svn] - widgetlist -> SkinnedWindow class + basic conversion in ui_main, other skinned windows remain
nenolod
parents:
2494
diff
changeset
|
200 if (widget_contains(WIDGET(w), x, y) == TRUE) |
71bee08db1c6
[svn] - widgetlist -> SkinnedWindow class + basic conversion in ui_main, other skinned windows remain
nenolod
parents:
2494
diff
changeset
|
201 return TRUE; |
71bee08db1c6
[svn] - widgetlist -> SkinnedWindow class + basic conversion in ui_main, other skinned windows remain
nenolod
parents:
2494
diff
changeset
|
202 } |
71bee08db1c6
[svn] - widgetlist -> SkinnedWindow class + basic conversion in ui_main, other skinned windows remain
nenolod
parents:
2494
diff
changeset
|
203 |
71bee08db1c6
[svn] - widgetlist -> SkinnedWindow class + basic conversion in ui_main, other skinned windows remain
nenolod
parents:
2494
diff
changeset
|
204 return FALSE; |
71bee08db1c6
[svn] - widgetlist -> SkinnedWindow class + basic conversion in ui_main, other skinned windows remain
nenolod
parents:
2494
diff
changeset
|
205 } |
71bee08db1c6
[svn] - widgetlist -> SkinnedWindow class + basic conversion in ui_main, other skinned windows remain
nenolod
parents:
2494
diff
changeset
|
206 |