r126: Added better ref counting for file icons.
[rox-filer.git] / ROX-Filer / src / pixmaps.h
blob765f8e277acd29cd754878af1e3581ed57f9767f
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>
13 enum
15 /* Base types */
16 TYPE_ERROR,
17 TYPE_UNKNOWN,
18 TYPE_SYMLINK,
19 TYPE_FILE,
20 TYPE_DIRECTORY,
21 TYPE_CHAR_DEVICE,
22 TYPE_BLOCK_DEVICE,
23 TYPE_PIPE,
24 TYPE_SOCKET,
26 /* Extended types */
27 TYPE_UNMOUNTED,
28 TYPE_MOUNTED,
29 TYPE_EXEC_FILE,
30 TYPE_MULTIPLE,
31 TYPE_APPDIR,
32 LAST_DEFAULT_PIXMAP,
36 typedef struct _MaskedPixmap MaskedPixmap;
38 struct _MaskedPixmap
40 GdkPixmap *pixmap;
41 GdkBitmap *mask;
42 int ref;
46 extern MaskedPixmap default_pixmap[LAST_DEFAULT_PIXMAP];
49 void pixmaps_init(void);
50 void load_default_pixmaps(GdkWindow *window);
51 void load_pixmap(GdkWindow *window, char *name, MaskedPixmap *image);
52 MaskedPixmap *load_pixmap_from(GtkWidget *window, char *path);
53 void pixmap_ref(MaskedPixmap *mp);
54 void pixmap_unref(MaskedPixmap *mp);
56 #endif /* _PIXMAP_H */