r1616: Security fix: Set Run Action to a shell command would make the executable
[rox-filer.git] / ROX-Filer / src / pixmaps.h
blob4aaf7b1038dc9b408609fe4afe817c3c3a869157
1 /*
2 * $Id$
4 * ROX-Filer, filer for the ROX desktop project
5 * By Thomas Leonard, <tal197@users.sourceforge.net>.
6 */
8 #ifndef _PIXMAP_H
9 #define _PIXMAP_H
11 #include <gtk/gtk.h>
13 extern GFSCache *pixmap_cache;
15 extern MaskedPixmap *im_error;
16 extern MaskedPixmap *im_unknown;
17 extern MaskedPixmap *im_symlink;
19 extern MaskedPixmap *im_unmounted;
20 extern MaskedPixmap *im_mounted;
21 extern MaskedPixmap *im_multiple;
22 extern MaskedPixmap *im_exec_file;
23 extern MaskedPixmap *im_appdir;
25 extern MaskedPixmap *im_help;
26 extern MaskedPixmap *im_dirs;
28 /* Note: don't change these two - thumbnails saving assumes 96x96 */
29 /* If making the huge size larger, be sure to update SMALL_IMAGE_THRESHOLD! */
30 #define HUGE_WIDTH 96
31 #define HUGE_HEIGHT 96
33 #define ICON_HEIGHT 48
34 #define ICON_WIDTH 48
36 #define SMALL_HEIGHT 18
37 #define SMALL_WIDTH 22
39 typedef struct _MaskedPixmapClass MaskedPixmapClass;
41 struct _MaskedPixmapClass {
42 GObjectClass parent;
45 /* When a MaskedPixmap is created we load the image from disk and
46 * scale the pixbuf down to the 'huge' size (if it's bigger).
47 * The 'normal' pixmap and mask are created automatically - you have
48 * to request the other sizes.
50 * Note that any of the masks be also be NULL if the image has no
51 * mask.
53 struct _MaskedPixmap
55 GObject object;
57 GdkPixbuf *src_pixbuf; /* Limited to 'huge' size */
59 /* If huge_pixbuf is NULL then call pixmap_make_huge() */
60 GdkPixbuf *huge_pixbuf;
61 GdkPixbuf *huge_pixbuf_lit;
62 int huge_width, huge_height;
64 GdkPixbuf *pixbuf; /* Normal size image, always valid */
65 GdkPixbuf *pixbuf_lit;
66 int width, height;
68 /* If sm_pixbuf is NULL then call pixmap_make_small() */
69 GdkPixbuf *sm_pixbuf;
70 GdkPixbuf *sm_pixbuf_lit;
71 int sm_width, sm_height;
74 void pixmaps_init(void);
75 void pixmap_make_huge(MaskedPixmap *mp);
76 void pixmap_make_small(MaskedPixmap *mp);
77 MaskedPixmap *load_pixmap(const char *name);
78 void pixmap_background_thumb(const gchar *path, GFunc callback, gpointer data);
79 MaskedPixmap *masked_pixmap_new(GdkPixbuf *full_size);
81 #endif /* _PIXMAP_H */