aboutsummaryrefslogtreecommitdiffstats
path: root/widgets/e-cursors.h
blob: 771e5f6d4d2d153bccaa0359227f71b6fcdae7f6 (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
#ifndef E_CURSORS_H
#define E_CURSORS_H

/* Copied from Gnumeric */

typedef enum {
    E_CURSOR_THIN_CROSS,
    E_CURSOR_ARROW,
    E_CURSOR_MOVE,
    E_CURSOR_SIZE_X,
    E_CURSOR_SIZE_Y,
    E_NUM_CURSORS
} ECursorType;

void    e_cursors_init      (void);
void    e_cursors_shutdown  (void);

#define e_cursor_set(win, c)                       \
G_STMT_START {                             \
     if (win)                              \
         gdk_window_set_cursor (win, e_cursor_get (c)); \
} G_STMT_END

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

GdkCursor *e_cursor_get (ECursorType type);

#endif /* E_CURSORS_H */