annotate src/audacious/ui_skinned_cursor.c @ 3059:f58cbfe8df1b

use create_dblsize_image for doueblesizing
author Tomasz Mon <desowin@gmail.com>
date Fri, 13 Jul 2007 12:52:36 +0200
parents 59661bd074b4
children bb41a2e8ecbe 3b6d316f8b09
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
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"
59661bd074b4 [svn] Try to put some skinned window code in a common place.
nenolod
parents:
diff changeset
21
59661bd074b4 [svn] Try to put some skinned window code in a common place.
nenolod
parents:
diff changeset
22 #include <gtk/gtkmain.h>
59661bd074b4 [svn] Try to put some skinned window code in a common place.
nenolod
parents:
diff changeset
23 #include <glib-object.h>
59661bd074b4 [svn] Try to put some skinned window code in a common place.
nenolod
parents:
diff changeset
24 #include <glib/gmacros.h>
59661bd074b4 [svn] Try to put some skinned window code in a common place.
nenolod
parents:
diff changeset
25 #include <gtk/gtkmarshal.h>
59661bd074b4 [svn] Try to put some skinned window code in a common place.
nenolod
parents:
diff changeset
26 #include <gtk/gtkwindow.h>
59661bd074b4 [svn] Try to put some skinned window code in a common place.
nenolod
parents:
diff changeset
27
59661bd074b4 [svn] Try to put some skinned window code in a common place.
nenolod
parents:
diff changeset
28 #include "main.h"
59661bd074b4 [svn] Try to put some skinned window code in a common place.
nenolod
parents:
diff changeset
29 #include "dock.h"
59661bd074b4 [svn] Try to put some skinned window code in a common place.
nenolod
parents:
diff changeset
30 #include "ui_skinned_window.h"
59661bd074b4 [svn] Try to put some skinned window code in a common place.
nenolod
parents:
diff changeset
31 #include "ui_skinned_cursor.h"
59661bd074b4 [svn] Try to put some skinned window code in a common place.
nenolod
parents:
diff changeset
32
59661bd074b4 [svn] Try to put some skinned window code in a common place.
nenolod
parents:
diff changeset
33 void
59661bd074b4 [svn] Try to put some skinned window code in a common place.
nenolod
parents:
diff changeset
34 ui_skinned_cursor_set(GtkWidget * window)
59661bd074b4 [svn] Try to put some skinned window code in a common place.
nenolod
parents:
diff changeset
35 {
59661bd074b4 [svn] Try to put some skinned window code in a common place.
nenolod
parents:
diff changeset
36 static GdkCursor *cursor = 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 if (window == NULL)
59661bd074b4 [svn] Try to put some skinned window code in a common place.
nenolod
parents:
diff changeset
39 {
59661bd074b4 [svn] Try to put some skinned window code in a common place.
nenolod
parents:
diff changeset
40 if (cursor != 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 gdk_cursor_unref(cursor);
59661bd074b4 [svn] Try to put some skinned window code in a common place.
nenolod
parents:
diff changeset
43 cursor = NULL;
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
59661bd074b4 [svn] Try to put some skinned window code in a common place.
nenolod
parents:
diff changeset
46 return;
59661bd074b4 [svn] Try to put some skinned window code in a common place.
nenolod
parents:
diff changeset
47 }
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 if (cursor == NULL)
59661bd074b4 [svn] Try to put some skinned window code in a common place.
nenolod
parents:
diff changeset
50 cursor = gdk_cursor_new(GDK_LEFT_PTR);
59661bd074b4 [svn] Try to put some skinned window code in a common place.
nenolod
parents:
diff changeset
51
59661bd074b4 [svn] Try to put some skinned window code in a common place.
nenolod
parents:
diff changeset
52 gdk_window_set_cursor(window->window, cursor);
59661bd074b4 [svn] Try to put some skinned window code in a common place.
nenolod
parents:
diff changeset
53 }
59661bd074b4 [svn] Try to put some skinned window code in a common place.
nenolod
parents:
diff changeset
54