Mercurial > audlegacy
annotate src/audacious/ui_skinned_cursor.c @ 4164:2a6d9dd09ec1
More prettying.
author | William Pitcock <nenolod@atheme.org> |
---|---|
date | Thu, 10 Jan 2008 05:44:38 -0600 |
parents | f1c756f39e6c |
children | d4c5719d30d1 |
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:
2494
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:
2494
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" |
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 void |
59661bd074b4
[svn] Try to put some skinned window code in a common place.
nenolod
parents:
diff
changeset
|
35 ui_skinned_cursor_set(GtkWidget * window) |
59661bd074b4
[svn] Try to put some skinned window code in a common place.
nenolod
parents:
diff
changeset
|
36 { |
59661bd074b4
[svn] Try to put some skinned window code in a common place.
nenolod
parents:
diff
changeset
|
37 static GdkCursor *cursor = NULL; |
59661bd074b4
[svn] Try to put some skinned window code in a common place.
nenolod
parents:
diff
changeset
|
38 |
59661bd074b4
[svn] Try to put some skinned window code in a common place.
nenolod
parents:
diff
changeset
|
39 if (window == NULL) |
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 if (cursor != NULL) |
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 gdk_cursor_unref(cursor); |
59661bd074b4
[svn] Try to put some skinned window code in a common place.
nenolod
parents:
diff
changeset
|
44 cursor = NULL; |
59661bd074b4
[svn] Try to put some skinned window code in a common place.
nenolod
parents:
diff
changeset
|
45 } |
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 return; |
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 |
59661bd074b4
[svn] Try to put some skinned window code in a common place.
nenolod
parents:
diff
changeset
|
50 if (cursor == NULL) |
59661bd074b4
[svn] Try to put some skinned window code in a common place.
nenolod
parents:
diff
changeset
|
51 cursor = gdk_cursor_new(GDK_LEFT_PTR); |
59661bd074b4
[svn] Try to put some skinned window code in a common place.
nenolod
parents:
diff
changeset
|
52 |
59661bd074b4
[svn] Try to put some skinned window code in a common place.
nenolod
parents:
diff
changeset
|
53 gdk_window_set_cursor(window->window, cursor); |
59661bd074b4
[svn] Try to put some skinned window code in a common place.
nenolod
parents:
diff
changeset
|
54 } |
59661bd074b4
[svn] Try to put some skinned window code in a common place.
nenolod
parents:
diff
changeset
|
55 |