aboutsummaryrefslogtreecommitdiffstats
path: root/widgets/misc/e-cursors.h
blob: 79447247c81210d4da9ecaae5b54161f8175e314 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
#ifndef GNUMERIC_CURSORS_H
#define GNUMERIC_CURSORS_H

#include <gdk/gdk.h>

typedef enum {
    GNUMERIC_CURSOR_FAT_CROSS,
    GNUMERIC_CURSOR_THIN_CROSS,
    GNUMERIC_CURSOR_ARROW,
    GNUMERIC_CURSOR_MOVE,
    GNUMERIC_CURSOR_ZOOM_IN,
    GNUMERIC_CURSOR_ZOOM_OUT,
    GNUMERIC_CURSOR_SIZE_X,
    GNUMERIC_CURSOR_SIZE_Y,
    GNUMERIC_CURSOR_SIZE_TL,
    GNUMERIC_CURSOR_SIZE_TR,
    GNUMERIC_CURSOR_PRESS,
    GNUMERIC_CURSOR_HAND_OPEN,
    GNUMERIC_CURSOR_HAND_CLOSED,
    GNUMERIC_CURSOR_NUM_CURSORS
} CursorType;

void    cursors_init      (void);
void    cursors_shutdown  (void);

#define cursor_set(win, c)                     \
G_STMT_START {                             \
     if (win)                              \
         gdk_window_set_cursor (win, cursor_get (c)); \
} G_STMT_END

#define cursor_set_widget(w, c)                              \
G_STMT_START {                                       \
     if (GTK_WIDGET (w)->window)                             \
    gdk_window_set_cursor (GTK_WIDGET (w)->window, cursor_get (c)); \
} G_STMT_END

GdkCursor *cursor_get (CursorType type);

#endif /* GNUMERIC_CURSORS_H */