1 /* this file is part of evince, a gnome document viewer
3 * Copyright (C) 2004 Red Hat, Inc
5 * Evince is free software; you can redistribute it and/or modify it
6 * under the terms of the GNU General Public License as published by
7 * the Free Software Foundation; either version 2 of the License, or
8 * (at your option) any later version.
10 * Evince is distributed in the hope that it will be useful, but
11 * WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 * General Public License for more details.
15 * You should have received a copy of the GNU General Public License
16 * along with this program; if not, write to the Free Software
17 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
20 #include "ev-view-cursor.h"
23 ev_view_create_invisible_cursor (void)
26 GdkColor black = { 0, 0, 0, 0 };
27 static char bits[] = { 0x00 };
29 empty = gdk_bitmap_create_from_data (NULL, bits, 1, 1);
31 return gdk_cursor_new_from_pixmap (empty, empty, &black, &black, 0, 0);
35 ev_view_cursor_new (GdkDisplay *display,
36 EvViewCursor new_cursor)
38 GdkCursor *cursor = NULL;
41 case EV_VIEW_CURSOR_NORMAL:
43 case EV_VIEW_CURSOR_IBEAM:
44 cursor = gdk_cursor_new_for_display (display, GDK_XTERM);
46 case EV_VIEW_CURSOR_LINK:
47 cursor = gdk_cursor_new_for_display (display, GDK_HAND2);
49 case EV_VIEW_CURSOR_WAIT:
50 cursor = gdk_cursor_new_for_display (display, GDK_WATCH);
52 case EV_VIEW_CURSOR_HIDDEN:
53 cursor = ev_view_create_invisible_cursor ();
55 case EV_VIEW_CURSOR_DRAG:
56 cursor = gdk_cursor_new_for_display (display, GDK_FLEUR);
58 case EV_VIEW_CURSOR_AUTOSCROLL:
59 cursor = gdk_cursor_new_for_display (display, GDK_DOUBLE_ARROW);