1/* GDK - The GIMP Drawing Kit
2 * Copyright (C) 1995-1997 Peter Mattis, Spencer Kimball and Josh MacDonald
3 *
4 * This library is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU Lesser General Public
6 * License as published by the Free Software Foundation; either
7 * version 2 of the License, or (at your option) any later version.
8 *
9 * This library is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 * Lesser General Public License for more details.
13 *
14 * You should have received a copy of the GNU Lesser General Public
15 * License along with this library; if not, write to the
16 * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
17 * Boston, MA 02111-1307, USA.
18 */
19
20/*
21 * Modified by the GTK+ Team and others 1997-2000. See the AUTHORS
22 * file for a list of people on the GTK+ Team. See the ChangeLog
23 * files for a list of changes. These files are distributed with
24 * GTK+ at ftp://ftp.gtk.org/pub/gtk/.
25 */
26
27#ifndef __GDK_CURSOR_H__
28#define __GDK_CURSOR_H__
29
30#if defined(GTK_DISABLE_SINGLE_INCLUDES) && !defined (__GDK_H_INSIDE__) && !defined (GDK_COMPILATION)
31#error "Only <gdk/gdk.h> can be included directly."
32#endif
33
34#include <gdk/gdktypes.h>
35#include <gdk-pixbuf/gdk-pixbuf.h>
36
37G_BEGIN_DECLS
38
39#define GDK_TYPE_CURSOR (gdk_cursor_get_type ())
40
41/* Cursor types.
42 */
43typedef enum
44{
45 GDK_X_CURSOR = 0,
46 GDK_ARROW = 2,
47 GDK_BASED_ARROW_DOWN = 4,
48 GDK_BASED_ARROW_UP = 6,
49 GDK_BOAT = 8,
50 GDK_BOGOSITY = 10,
51 GDK_BOTTOM_LEFT_CORNER = 12,
52 GDK_BOTTOM_RIGHT_CORNER = 14,
53 GDK_BOTTOM_SIDE = 16,
54 GDK_BOTTOM_TEE = 18,
55 GDK_BOX_SPIRAL = 20,
56 GDK_CENTER_PTR = 22,
57 GDK_CIRCLE = 24,
58 GDK_CLOCK = 26,
59 GDK_COFFEE_MUG = 28,
60 GDK_CROSS = 30,
61 GDK_CROSS_REVERSE = 32,
62 GDK_CROSSHAIR = 34,
63 GDK_DIAMOND_CROSS = 36,
64 GDK_DOT = 38,
65 GDK_DOTBOX = 40,
66 GDK_DOUBLE_ARROW = 42,
67 GDK_DRAFT_LARGE = 44,
68 GDK_DRAFT_SMALL = 46,
69 GDK_DRAPED_BOX = 48,
70 GDK_EXCHANGE = 50,
71 GDK_FLEUR = 52,
72 GDK_GOBBLER = 54,
73 GDK_GUMBY = 56,
74 GDK_HAND1 = 58,
75 GDK_HAND2 = 60,
76 GDK_HEART = 62,
77 GDK_ICON = 64,
78 GDK_IRON_CROSS = 66,
79 GDK_LEFT_PTR = 68,
80 GDK_LEFT_SIDE = 70,
81 GDK_LEFT_TEE = 72,
82 GDK_LEFTBUTTON = 74,
83 GDK_LL_ANGLE = 76,
84 GDK_LR_ANGLE = 78,
85 GDK_MAN = 80,
86 GDK_MIDDLEBUTTON = 82,
87 GDK_MOUSE = 84,
88 GDK_PENCIL = 86,
89 GDK_PIRATE = 88,
90 GDK_PLUS = 90,
91 GDK_QUESTION_ARROW = 92,
92 GDK_RIGHT_PTR = 94,
93 GDK_RIGHT_SIDE = 96,
94 GDK_RIGHT_TEE = 98,
95 GDK_RIGHTBUTTON = 100,
96 = 102,
97 GDK_SAILBOAT = 104,
98 GDK_SB_DOWN_ARROW = 106,
99 GDK_SB_H_DOUBLE_ARROW = 108,
100 GDK_SB_LEFT_ARROW = 110,
101 GDK_SB_RIGHT_ARROW = 112,
102 GDK_SB_UP_ARROW = 114,
103 GDK_SB_V_DOUBLE_ARROW = 116,
104 GDK_SHUTTLE = 118,
105 GDK_SIZING = 120,
106 GDK_SPIDER = 122,
107 GDK_SPRAYCAN = 124,
108 GDK_STAR = 126,
109 GDK_TARGET = 128,
110 GDK_TCROSS = 130,
111 GDK_TOP_LEFT_ARROW = 132,
112 GDK_TOP_LEFT_CORNER = 134,
113 GDK_TOP_RIGHT_CORNER = 136,
114 GDK_TOP_SIDE = 138,
115 GDK_TOP_TEE = 140,
116 GDK_TREK = 142,
117 GDK_UL_ANGLE = 144,
118 GDK_UMBRELLA = 146,
119 GDK_UR_ANGLE = 148,
120 GDK_WATCH = 150,
121 GDK_XTERM = 152,
122 GDK_LAST_CURSOR,
123 GDK_BLANK_CURSOR = -2,
124 GDK_CURSOR_IS_PIXMAP = -1
125} GdkCursorType;
126
127struct _GdkCursor
128{
129 GdkCursorType GSEAL (type);
130 /*< private >*/
131 guint GSEAL (ref_count);
132};
133
134/* Cursors
135 */
136
137GType gdk_cursor_get_type (void) G_GNUC_CONST;
138
139GdkCursor* gdk_cursor_new_for_display (GdkDisplay *display,
140 GdkCursorType cursor_type);
141#ifndef GDK_MULTIHEAD_SAFE
142GdkCursor* gdk_cursor_new (GdkCursorType cursor_type);
143#endif
144GdkCursor* gdk_cursor_new_from_pixmap (GdkPixmap *source,
145 GdkPixmap *mask,
146 const GdkColor *fg,
147 const GdkColor *bg,
148 gint x,
149 gint y);
150GdkCursor* gdk_cursor_new_from_pixbuf (GdkDisplay *display,
151 GdkPixbuf *pixbuf,
152 gint x,
153 gint y);
154GdkDisplay* gdk_cursor_get_display (GdkCursor *cursor);
155GdkCursor* gdk_cursor_ref (GdkCursor *cursor);
156void gdk_cursor_unref (GdkCursor *cursor);
157GdkCursor* gdk_cursor_new_from_name (GdkDisplay *display,
158 const gchar *name);
159GdkPixbuf* gdk_cursor_get_image (GdkCursor *cursor);
160GdkCursorType gdk_cursor_get_cursor_type (GdkCursor *cursor);
161
162#ifndef GDK_DISABLE_DEPRECATED
163#define gdk_cursor_destroy gdk_cursor_unref
164#endif /* GDK_DISABLE_DEPRECATED */
165
166G_END_DECLS
167
168#endif /* __GDK_CURSOR_H__ */
169