r287: Removed the DEFAULT_PIXMAP array - the new type system makes in unnecessary
[rox-filer.git] / ROX-Filer / src / pixmaps.h
blob89b16fe91cfc7a15fb89a787f8d6562f78efa5a4
1 /*
2 * $Id$
4 * ROX-Filer, filer for the ROX desktop project
5 * By Thomas Leonard, <tal197@ecs.soton.ac.uk>.
6 */
8 #ifndef _PIXMAP_H
9 #define _PIXMAP_H
11 #include <gtk/gtk.h>
12 #include "fscache.h"
14 extern GFSCache *pixmap_cache;
16 enum
18 /* Base types */
19 TYPE_ERROR,
20 TYPE_UNKNOWN,
21 TYPE_SYMLINK,
22 TYPE_FILE,
23 TYPE_DIRECTORY,
24 TYPE_CHAR_DEVICE,
25 TYPE_BLOCK_DEVICE,
26 TYPE_PIPE,
27 TYPE_SOCKET,
29 /* Extended types */
30 TYPE_UNMOUNTED,
31 TYPE_MOUNTED,
32 TYPE_EXEC_FILE,
33 TYPE_MULTIPLE,
34 TYPE_APPDIR,
37 typedef struct _MaskedPixmap MaskedPixmap;
39 extern MaskedPixmap *im_error;
40 extern MaskedPixmap *im_unknown;
41 extern MaskedPixmap *im_symlink;
43 extern MaskedPixmap *im_unmounted;
44 extern MaskedPixmap *im_mounted;
45 extern MaskedPixmap *im_multiple;
46 extern MaskedPixmap *im_exec_file;
47 extern MaskedPixmap *im_appdir;
49 extern MaskedPixmap *im_up_icon;
50 extern MaskedPixmap *im_home_icon;
51 extern MaskedPixmap *im_refresh_icon;
52 extern MaskedPixmap *im_help;
54 #ifdef HAVE_IMLIB
55 # ifdef PIXMAPS_C
56 # define IMLIB_T GdkImlibImage
57 # else
58 # define IMLIB_T gpointer
59 # endif
60 #endif
62 struct _MaskedPixmap
64 int ref;
65 #ifdef HAVE_IMLIB
66 IMLIB_T *image;
67 #endif
68 GdkPixmap *pixmap; /* Full size image */
69 GdkBitmap *mask;
70 int width;
71 int height;
73 /* If sm_pixmap is NULL then call pixmap_make_small() */
74 GdkPixmap *sm_pixmap; /* Half-size (hopefully!) image */
75 GdkBitmap *sm_mask;
76 int sm_width;
77 int sm_height;
80 void pixmaps_init(void);
81 void pixmap_ref(MaskedPixmap *mp);
82 void pixmap_unref(MaskedPixmap *mp);
83 void pixmap_make_small(MaskedPixmap *mp);
85 #endif /* _PIXMAP_H */