| 1 |
/* gdkcursor-quartz.c |
| 2 |
* |
| 3 |
* Copyright (C) 2005-2007 Imendio AB |
| 4 |
* |
| 5 |
* This library is free software; you can redistribute it and/or |
| 6 |
* modify it under the terms of the GNU Lesser General Public |
| 7 |
* License as published by the Free Software Foundation; either |
| 8 |
* version 2 of the License, or (at your option) any later version. |
| 9 |
* |
| 10 |
* This library is distributed in the hope that it will be useful, |
| 11 |
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 12 |
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
| 13 |
* Lesser General Public License for more details. |
| 14 |
* |
| 15 |
* You should have received a copy of the GNU Lesser General Public |
| 16 |
* License along with this library. If not, see <http://www.gnu.org/licenses/>. |
| 17 |
*/ |
| 18 |
|
| 19 |
#include "config.h" |
| 20 |
|
| 21 |
#include "gdkdisplay.h" |
| 22 |
#include "gdkcursor.h" |
| 23 |
#include "gdkcursorprivate.h" |
| 24 |
#include "gdkquartzcursor.h" |
| 25 |
#include "gdkprivate-quartz.h" |
| 26 |
#include "gdkinternal-quartz.h" |
| 27 |
#include "gdkquartz-gtk-only.h" |
| 28 |
|
| 29 |
#include "xcursors.h" |
| 30 |
|
| 31 |
struct _GdkQuartzCursor |
| 32 |
{ |
| 33 |
GdkCursor cursor; |
| 34 |
|
| 35 |
NSCursor *nscursor; |
| 36 |
}; |
| 37 |
|
| 38 |
struct _GdkQuartzCursorClass |
| 39 |
{ |
| 40 |
GdkCursorClass cursor_class; |
| 41 |
}; |
| 42 |
|
| 43 |
|
| 44 |
static GdkCursor *cached_xcursors[G_N_ELEMENTS (xcursors)]; |
| 45 |
|
| 46 |
static GdkCursor * |
| 47 |
gdk_quartz_cursor_new_from_nscursor (NSCursor *nscursor, |
| 48 |
GdkCursorType cursor_type) |
| 49 |
{ |
| 50 |
GdkQuartzCursor *private; |
| 51 |
|
| 52 |
private = g_object_new (GDK_TYPE_QUARTZ_CURSOR, |
| 53 |
"cursor-type", cursor_type, |
| 54 |
"display", _gdk_display, |
| 55 |
NULL); |
| 56 |
private->nscursor = nscursor; |
| 57 |
|
| 58 |
return GDK_CURSOR (private); |
| 59 |
} |
| 60 |
|
| 61 |
static GdkCursor * |
| 62 |
create_blank_cursor (void) |
| 63 |
{ |
| 64 |
NSCursor *nscursor; |
| 65 |
NSImage *nsimage; |
| 66 |
NSSize size = { 1.0, 1.0 }; |
| 67 |
|
| 68 |
nsimage = [[NSImage alloc] initWithSize:size]; |
| 69 |
nscursor = [[NSCursor alloc] initWithImage:nsimage |
| 70 |
hotSpot:NSMakePoint(0.0, 0.0)]; |
| 71 |
[nsimage release]; |
| 72 |
|
| 73 |
return gdk_quartz_cursor_new_from_nscursor (nscursor, GDK_BLANK_CURSOR); |
| 74 |
} |
| 75 |
|
| 76 |
static gboolean |
| 77 |
get_bit (const guchar *data, |
| 78 |
gint width, |
| 79 |
gint height, |
| 80 |
gint x, |
| 81 |
gint y) |
| 82 |
{ |
| 83 |
gint bytes_per_line; |
| 84 |
const guchar *src; |
| 85 |
|
| 86 |
if (x < 0 || y < 0 || x >= width || y >= height) |
| 87 |
return FALSE; |
| 88 |
|
| 89 |
bytes_per_line = (width + 7) / 8; |
| 90 |
|
| 91 |
src = &data[y * bytes_per_line]; |
| 92 |
return ((src[x / 8] >> x % 8) & 1); |
| 93 |
} |
| 94 |
|
| 95 |
static GdkCursor * |
| 96 |
create_builtin_cursor (GdkCursorType cursor_type) |
| 97 |
{ |
| 98 |
GdkCursor *cursor; |
| 99 |
NSBitmapImageRep *bitmap_rep; |
| 100 |
NSInteger mask_width, mask_height; |
| 101 |
gint src_width, src_height; |
| 102 |
gint dst_stride; |
| 103 |
const guchar *mask_start, *src_start; |
| 104 |
gint dx, dy; |
| 105 |
gint x, y; |
| 106 |
NSPoint hotspot; |
| 107 |
NSImage *image; |
| 108 |
NSCursor *nscursor; |
| 109 |
|
| 110 |
if (cursor_type >= G_N_ELEMENTS (xcursors) || cursor_type < 0) |
| 111 |
return NULL; |
| 112 |
|
| 113 |
cursor = cached_xcursors[cursor_type]; |
| 114 |
if (cursor) |
| 115 |
return cursor; |
| 116 |
|
| 117 |
GDK_QUARTZ_ALLOC_POOL; |
| 118 |
|
| 119 |
src_width = xcursors[cursor_type].width; |
| 120 |
src_height = xcursors[cursor_type].height; |
| 121 |
mask_width = xcursors[cursor_type+1].width; |
| 122 |
mask_height = xcursors[cursor_type+1].height; |
| 123 |
|
| 124 |
bitmap_rep = [[NSBitmapImageRep alloc] initWithBitmapDataPlanes:NULL |
| 125 |
pixelsWide:mask_width pixelsHigh:mask_height |
| 126 |
bitsPerSample:8 samplesPerPixel:4 |
| 127 |
hasAlpha:YES isPlanar:NO colorSpaceName:NSDeviceRGBColorSpace |
| 128 |
bytesPerRow:0 bitsPerPixel:0]; |
| 129 |
|
| 130 |
dst_stride = [bitmap_rep bytesPerRow]; |
| 131 |
|
| 132 |
src_start = xcursors[cursor_type].bits; |
| 133 |
mask_start = xcursors[cursor_type+1].bits; |
| 134 |
|
| 135 |
dx = xcursors[cursor_type+1].hotx - xcursors[cursor_type].hotx; |
| 136 |
dy = xcursors[cursor_type+1].hoty - xcursors[cursor_type].hoty; |
| 137 |
|
| 138 |
for (y = 0; y < mask_height; y++) |
| 139 |
{ |
| 140 |
guchar *dst = [bitmap_rep bitmapData] + y * dst_stride; |
| 141 |
|
| 142 |
for (x = 0; x < mask_width; x++) |
| 143 |
{ |
| 144 |
if (get_bit (mask_start, mask_width, mask_height, x, y)) |
| 145 |
{ |
| 146 |
if (get_bit (src_start, src_width, src_height, x - dx, y - dy)) |
| 147 |
{ |
| 148 |
*dst++ = 0; |
| 149 |
*dst++ = 0; |
| 150 |
*dst++ = 0; |
| 151 |
} |
| 152 |
else |
| 153 |
{ |
| 154 |
*dst++ = 0xff; |
| 155 |
*dst++ = 0xff; |
| 156 |
*dst++ = 0xff; |
| 157 |
} |
| 158 |
|
| 159 |
*dst++ = 0xff; |
| 160 |
} |
| 161 |
else |
| 162 |
{ |
| 163 |
*dst++ = 0; |
| 164 |
*dst++ = 0; |
| 165 |
*dst++ = 0; |
| 166 |
*dst++ = 0; |
| 167 |
} |
| 168 |
} |
| 169 |
} |
| 170 |
|
| 171 |
image = [[NSImage alloc] init]; |
| 172 |
[image addRepresentation:bitmap_rep]; |
| 173 |
[bitmap_rep release]; |
| 174 |
|
| 175 |
hotspot = NSMakePoint (xcursors[cursor_type+1].hotx, |
| 176 |
xcursors[cursor_type+1].hoty); |
| 177 |
|
| 178 |
nscursor = [[NSCursor alloc] initWithImage:image hotSpot:hotspot]; |
| 179 |
[image release]; |
| 180 |
|
| 181 |
cursor = gdk_quartz_cursor_new_from_nscursor (nscursor, GDK_CURSOR_IS_PIXMAP); |
| 182 |
|
| 183 |
cached_xcursors[cursor_type] = g_object_ref (cursor); |
| 184 |
|
| 185 |
GDK_QUARTZ_RELEASE_POOL; |
| 186 |
|
| 187 |
return cursor; |
| 188 |
} |
| 189 |
|
| 190 |
GdkCursor* |
| 191 |
_gdk_quartz_display_get_cursor_for_type (GdkDisplay *display, |
| 192 |
GdkCursorType cursor_type) |
| 193 |
{ |
| 194 |
NSCursor *nscursor; |
| 195 |
|
| 196 |
g_return_val_if_fail (display == gdk_display_get_default (), NULL); |
| 197 |
|
| 198 |
switch (cursor_type) |
| 199 |
{ |
| 200 |
case GDK_XTERM: |
| 201 |
nscursor = [NSCursor IBeamCursor]; |
| 202 |
break; |
| 203 |
case GDK_SB_H_DOUBLE_ARROW: |
| 204 |
nscursor = [NSCursor resizeLeftRightCursor]; |
| 205 |
break; |
| 206 |
case GDK_SB_V_DOUBLE_ARROW: |
| 207 |
nscursor = [NSCursor resizeUpDownCursor]; |
| 208 |
break; |
| 209 |
case GDK_SB_UP_ARROW: |
| 210 |
case GDK_BASED_ARROW_UP: |
| 211 |
case GDK_BOTTOM_TEE: |
| 212 |
case GDK_TOP_SIDE: |
| 213 |
nscursor = [NSCursor resizeUpCursor]; |
| 214 |
break; |
| 215 |
case GDK_SB_DOWN_ARROW: |
| 216 |
case GDK_BASED_ARROW_DOWN: |
| 217 |
case GDK_TOP_TEE: |
| 218 |
case GDK_BOTTOM_SIDE: |
| 219 |
nscursor = [NSCursor resizeDownCursor]; |
| 220 |
break; |
| 221 |
case GDK_SB_LEFT_ARROW: |
| 222 |
case GDK_RIGHT_TEE: |
| 223 |
case GDK_LEFT_SIDE: |
| 224 |
nscursor = [NSCursor resizeLeftCursor]; |
| 225 |
break; |
| 226 |
case GDK_SB_RIGHT_ARROW: |
| 227 |
case GDK_LEFT_TEE: |
| 228 |
case GDK_RIGHT_SIDE: |
| 229 |
nscursor = [NSCursor resizeRightCursor]; |
| 230 |
break; |
| 231 |
case GDK_TCROSS: |
| 232 |
case GDK_CROSS: |
| 233 |
case GDK_CROSSHAIR: |
| 234 |
case GDK_DIAMOND_CROSS: |
| 235 |
nscursor = [NSCursor crosshairCursor]; |
| 236 |
break; |
| 237 |
case GDK_HAND1: |
| 238 |
case GDK_HAND2: |
| 239 |
nscursor = [NSCursor pointingHandCursor]; |
| 240 |
break; |
| 241 |
case GDK_CURSOR_IS_PIXMAP: |
| 242 |
return NULL; |
| 243 |
case GDK_BLANK_CURSOR: |
| 244 |
return create_blank_cursor (); |
| 245 |
default: |
| 246 |
return g_object_ref (create_builtin_cursor (cursor_type)); |
| 247 |
} |
| 248 |
|
| 249 |
[nscursor retain]; |
| 250 |
return gdk_quartz_cursor_new_from_nscursor (nscursor, cursor_type); |
| 251 |
} |
| 252 |
|
| 253 |
|
| 254 |
GdkCursor * |
| 255 |
_gdk_quartz_display_get_cursor_for_surface (GdkDisplay *display, |
| 256 |
cairo_surface_t *surface, |
| 257 |
gdouble x, |
| 258 |
gdouble y) |
| 259 |
{ |
| 260 |
NSImage *image; |
| 261 |
NSCursor *nscursor; |
| 262 |
GdkCursor *cursor; |
| 263 |
GdkPixbuf *pixbuf; |
| 264 |
double x_scale; |
| 265 |
double y_scale; |
| 266 |
|
| 267 |
GDK_QUARTZ_ALLOC_POOL; |
| 268 |
|
| 269 |
pixbuf = gdk_pixbuf_get_from_surface (surface, 0, 0, |
| 270 |
cairo_image_surface_get_width (surface), |
| 271 |
cairo_image_surface_get_height (surface)); |
| 272 |
cairo_surface_get_device_scale (surface, |
| 273 |
&x_scale, |
| 274 |
&y_scale); |
| 275 |
image = gdk_quartz_pixbuf_to_ns_image_libgtk_only (pixbuf); |
| 276 |
NSImageRep *rep = [[image representations] objectAtIndex:0]; |
| 277 |
[image setSize:NSMakeSize(rep.pixelsWide / x_scale, rep.pixelsHigh / y_scale)]; |
| 278 |
nscursor = [[NSCursor alloc] initWithImage:image hotSpot:NSMakePoint(x / x_scale, y / y_scale)]; |
| 279 |
|
| 280 |
cursor = gdk_quartz_cursor_new_from_nscursor (nscursor, GDK_CURSOR_IS_PIXMAP); |
| 281 |
|
| 282 |
g_object_unref (pixbuf); |
| 283 |
|
| 284 |
GDK_QUARTZ_RELEASE_POOL; |
| 285 |
|
| 286 |
return cursor; |
| 287 |
} |
| 288 |
|
| 289 |
/* OS X only exports a number of cursor types in its public NSCursor interface. |
| 290 |
* By overriding the private _coreCursorType method, we can tell OS X to load |
| 291 |
* one of its internal cursors instead (since cursor images are loaded on demand |
| 292 |
* instead of in advance). WebKit does this too. |
| 293 |
*/ |
| 294 |
|
| 295 |
@interface gdkCoreCursor : NSCursor { |
| 296 |
@private |
| 297 |
int type; |
| 298 |
BOOL override; |
| 299 |
} |
| 300 |
@end |
| 301 |
|
| 302 |
@implementation gdkCoreCursor |
| 303 |
|
| 304 |
- (int)_coreCursorType |
| 305 |
{ |
| 306 |
if (self->override) |
| 307 |
return self->type; |
| 308 |
return [super _coreCursorType]; |
| 309 |
} |
| 310 |
|
| 311 |
#define CUSTOM_CURSOR_CTOR(name, id) \ |
| 312 |
+ (gdkCoreCursor *)name \ |
| 313 |
{ \ |
| 314 |
gdkCoreCursor *obj; \ |
| 315 |
obj = [self new]; \ |
| 316 |
if (obj) { \ |
| 317 |
obj->override = YES; \ |
| 318 |
obj->type = id; \ |
| 319 |
} \ |
| 320 |
return obj; \ |
| 321 |
} |
| 322 |
CUSTOM_CURSOR_CTOR(gdkHelpCursor, 40) |
| 323 |
CUSTOM_CURSOR_CTOR(gdkProgressCursor, 4) |
| 324 |
/* TODO OS X doesn't seem to have a way to get this. There is an undocumented |
| 325 |
* method +[NSCursor _waitCursor], but it doesn't actually return this cursor, |
| 326 |
* but rather some odd low-quality non-animating version of this cursor. Use |
| 327 |
* the progress cursor instead for now. |
| 328 |
*/ |
| 329 |
CUSTOM_CURSOR_CTOR(gdkWaitCursor, 4) |
| 330 |
CUSTOM_CURSOR_CTOR(gdkAliasCursor, 2) |
| 331 |
CUSTOM_CURSOR_CTOR(gdkMoveCursor, 39) |
| 332 |
/* TODO OS X doesn't seem to provide one; copy the move cursor for now |
| 333 |
* since it looks similar to what we want. */ |
| 334 |
CUSTOM_CURSOR_CTOR(gdkAllScrollCursor, 39) |
| 335 |
CUSTOM_CURSOR_CTOR(gdkNEResizeCursor, 29) |
| 336 |
CUSTOM_CURSOR_CTOR(gdkNWResizeCursor, 33) |
| 337 |
CUSTOM_CURSOR_CTOR(gdkSEResizeCursor, 35) |
| 338 |
CUSTOM_CURSOR_CTOR(gdkSWResizeCursor, 37) |
| 339 |
CUSTOM_CURSOR_CTOR(gdkEWResizeCursor, 28) |
| 340 |
CUSTOM_CURSOR_CTOR(gdkNSResizeCursor, 32) |
| 341 |
CUSTOM_CURSOR_CTOR(gdkNESWResizeCursor, 30) |
| 342 |
CUSTOM_CURSOR_CTOR(gdkNWSEResizeCursor, 34) |
| 343 |
CUSTOM_CURSOR_CTOR(gdkZoomInCursor, 42) |
| 344 |
CUSTOM_CURSOR_CTOR(gdkZoomOutCursor, 43) |
| 345 |
|
| 346 |
@end |
| 347 |
|
| 348 |
struct CursorsByName { |
| 349 |
const gchar *name; |
| 350 |
NSString *selector; |
| 351 |
}; |
| 352 |
|
| 353 |
static const struct CursorsByName cursors_by_name[] = { |
| 354 |
/* Link & Status */ |
| 355 |
{ "context-menu", @"contextualMenuCursor" }, |
| 356 |
{ "help", @"gdkHelpCursor" }, |
| 357 |
{ "pointer", @"pointingHandCursor" }, |
| 358 |
{ "progress", @"gdkProgressCursor" }, |
| 359 |
{ "wait", @"gdkWaitCursor" }, |
| 360 |
/* Selection */ |
| 361 |
{ "cell", @"crosshairCursor" }, |
| 362 |
{ "crosshair", @"crosshairCursor" }, |
| 363 |
{ "text", @"IBeamCursor" }, |
| 364 |
{ "vertical-text", @"IBeamCursorForVerticalLayout" }, |
| 365 |
/* Drag & Drop */ |
| 366 |
{ "alias", @"gdkAliasCursor" }, |
| 367 |
{ "copy", @"dragCopyCursor" }, |
| 368 |
{ "move", @"gdkMoveCursor" }, |
| 369 |
{ "no-drop", @"operationNotAllowedCursor" }, |
| 370 |
{ "not-allowed", @"operationNotAllowedCursor" }, |
| 371 |
{ "grab", @"openHandCursor" }, |
| 372 |
{ "grabbing", @"closedHandCursor" }, |
| 373 |
/* Resize & Scrolling */ |
| 374 |
{ "all-scroll", @"gdkAllScrollCursor" }, |
| 375 |
{ "col-resize", @"resizeLeftRightCursor" }, |
| 376 |
{ "row-resize", @"resizeUpDownCursor" }, |
| 377 |
{ "n-resize", @"resizeUpCursor" }, |
| 378 |
{ "e-resize", @"resizeRightCursor" }, |
| 379 |
{ "s-resize", @"resizeDownCursor" }, |
| 380 |
{ "w-resize", @"resizeLeftCursor" }, |
| 381 |
{ "ne-resize", @"gdkNEResizeCursor" }, |
| 382 |
{ "nw-resize", @"gdkNWResizeCursor" }, |
| 383 |
{ "se-resize", @"gdkSEResizeCursor" }, |
| 384 |
{ "sw-resize", @"gdkSWResizeCursor" }, |
| 385 |
{ "ew-resize", @"gdkEWResizeCursor" }, |
| 386 |
{ "ns-resize", @"gdkNSResizeCursor" }, |
| 387 |
{ "nesw-resize", @"gdkNESWResizeCursor" }, |
| 388 |
{ "nwse-resize", @"gdkNWSEResizeCursor" }, |
| 389 |
/* Zoom */ |
| 390 |
{ "zoom-in", @"gdkZoomInCursor" }, |
| 391 |
{ "zoom-out", @"gdkZoomOutCursor" }, |
| 392 |
{ NULL, NULL }, |
| 393 |
}; |
| 394 |
|
| 395 |
GdkCursor* |
| 396 |
_gdk_quartz_display_get_cursor_for_name (GdkDisplay *display, |
| 397 |
const gchar *name) |
| 398 |
{ |
| 399 |
NSCursor *nscursor; |
| 400 |
const struct CursorsByName *test; |
| 401 |
SEL selector; |
| 402 |
|
| 403 |
if (name == NULL || g_str_equal (name, "none")) |
| 404 |
return create_blank_cursor (); |
| 405 |
|
| 406 |
// use this selector if nothing found |
| 407 |
selector = @selector(arrowCursor); |
| 408 |
for (test = cursors_by_name; test->name != NULL; test++) |
| 409 |
if (g_str_equal (name, test->name)) |
| 410 |
{ |
| 411 |
selector = NSSelectorFromString(test->selector); |
| 412 |
break; |
| 413 |
} |
| 414 |
nscursor = [[gdkCoreCursor class] performSelector:selector]; |
| 415 |
|
| 416 |
[nscursor retain]; |
| 417 |
return gdk_quartz_cursor_new_from_nscursor (nscursor, GDK_CURSOR_IS_PIXMAP); |
| 418 |
} |
| 419 |
|
| 420 |
G_DEFINE_TYPE (GdkQuartzCursor, gdk_quartz_cursor, GDK_TYPE_CURSOR) |
| 421 |
|
| 422 |
static cairo_surface_t *gdk_quartz_cursor_get_surface (GdkCursor *cursor, |
| 423 |
gdouble *x_hot, |
| 424 |
gdouble *y_hot); |
| 425 |
|
| 426 |
static void |
| 427 |
gdk_quartz_cursor_finalize (GObject *object) |
| 428 |
{ |
| 429 |
GdkQuartzCursor *private = GDK_QUARTZ_CURSOR (object); |
| 430 |
|
| 431 |
if (private->nscursor) |
| 432 |
[private->nscursor release]; |
| 433 |
private->nscursor = NULL; |
| 434 |
} |
| 435 |
|
| 436 |
static void |
| 437 |
gdk_quartz_cursor_class_init (GdkQuartzCursorClass *quartz_cursor_class) |
| 438 |
{ |
| 439 |
GdkCursorClass *cursor_class = GDK_CURSOR_CLASS (quartz_cursor_class); |
| 440 |
GObjectClass *object_class = G_OBJECT_CLASS (quartz_cursor_class); |
| 441 |
|
| 442 |
object_class->finalize = gdk_quartz_cursor_finalize; |
| 443 |
|
| 444 |
cursor_class->get_surface = gdk_quartz_cursor_get_surface; |
| 445 |
} |
| 446 |
|
| 447 |
static void |
| 448 |
gdk_quartz_cursor_init (GdkQuartzCursor *cursor) |
| 449 |
{ |
| 450 |
} |
| 451 |
|
| 452 |
|
| 453 |
gboolean |
| 454 |
_gdk_quartz_display_supports_cursor_alpha (GdkDisplay *display) |
| 455 |
{ |
| 456 |
return TRUE; |
| 457 |
} |
| 458 |
|
| 459 |
gboolean |
| 460 |
_gdk_quartz_display_supports_cursor_color (GdkDisplay *display) |
| 461 |
{ |
| 462 |
return TRUE; |
| 463 |
} |
| 464 |
|
| 465 |
void |
| 466 |
_gdk_quartz_display_get_default_cursor_size (GdkDisplay *display, |
| 467 |
guint *width, |
| 468 |
guint *height) |
| 469 |
{ |
| 470 |
/* Mac OS X doesn't have the notion of a default size */ |
| 471 |
*width = 32; |
| 472 |
*height = 32; |
| 473 |
} |
| 474 |
|
| 475 |
void |
| 476 |
_gdk_quartz_display_get_maximal_cursor_size (GdkDisplay *display, |
| 477 |
guint *width, |
| 478 |
guint *height) |
| 479 |
{ |
| 480 |
/* Cursor sizes in Mac OS X can be arbitrarily large */ |
| 481 |
*width = 65536; |
| 482 |
*height = 65536; |
| 483 |
} |
| 484 |
|
| 485 |
NSCursor * |
| 486 |
_gdk_quartz_cursor_get_ns_cursor (GdkCursor *cursor) |
| 487 |
{ |
| 488 |
GdkQuartzCursor *cursor_private; |
| 489 |
|
| 490 |
if (!cursor) |
| 491 |
return [NSCursor arrowCursor]; |
| 492 |
|
| 493 |
g_return_val_if_fail (GDK_IS_QUARTZ_CURSOR (cursor), NULL); |
| 494 |
|
| 495 |
cursor_private = GDK_QUARTZ_CURSOR (cursor); |
| 496 |
|
| 497 |
return cursor_private->nscursor; |
| 498 |
} |
| 499 |
|
| 500 |
static cairo_surface_t * |
| 501 |
gdk_quartz_cursor_get_surface (GdkCursor *cursor, |
| 502 |
gdouble *x_hot, |
| 503 |
gdouble *y_hot) |
| 504 |
{ |
| 505 |
/* FIXME: Implement */ |
| 506 |
return NULL; |
| 507 |
} |