aboutsummaryrefslogtreecommitdiffstats
path: root/widgets/misc/e-cursors.h
blob: 16de3abbefa3ed8b260f35b6b0f5cdd66fb538b0 (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
#ifndef GNUMERIC_CURSORS_H
#define GNUMERIC_CURSORS_H

typedef struct {
    GdkCursor *cursor;
    int       hot_x, hot_y;
    char      **xpm;
} GnumericCursorDef;

#define GNUMERIC_CURSOR_FAT_CROSS  0
#define GNUMERIC_CURSOR_THIN_CROSS 1
#define GNUMERIC_CURSOR_ARROW      2
#define GNUMERIC_CURSOR_MOVE       3
#define GNUMERIC_CURSOR_ZOOM_IN    4
#define GNUMERIC_CURSOR_ZOOM_OUT   5

extern GnumericCursorDef  gnumeric_cursors [];

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

#define cursor_set(win,c)                      \
G_STMT_START {                             \
     if (win)                              \
         gdk_window_set_cursor (win, gnumeric_cursors [c].cursor); \
} 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, gnumeric_cursors [c].cursor); \
} G_STMT_END
  

#endif /* GNUMERIC_CURSORS_H */