r4255: Make Path optional in PanelRemove SOAP call, allowing removal of items based
[rox-filer/translations.git] / ROX-Filer / src / pixmaps.h
blob440e9fe26a1a8c3c440bb0c09862154e2e4fc669
1 /*
2 * ROX-Filer, filer for the ROX desktop project
3 * By Thomas Leonard, <tal197@users.sourceforge.net>.
4 */
6 #ifndef _PIXMAP_H
7 #define _PIXMAP_H
9 #include <gtk/gtk.h>
11 extern GFSCache *pixmap_cache;
12 extern GFSCache *desktop_icon_cache;
14 extern MaskedPixmap *im_error;
15 extern MaskedPixmap *im_unknown;
16 extern MaskedPixmap *im_symlink;
18 extern MaskedPixmap *im_unmounted;
19 extern MaskedPixmap *im_mounted;
20 extern MaskedPixmap *im_exec_file;
21 extern MaskedPixmap *im_appdir;
22 extern MaskedPixmap *im_xattr;
24 extern MaskedPixmap *im_dirs;
26 /* If making the huge size larger, be sure to update SMALL_IMAGE_THRESHOLD! */
27 #define HUGE_WIDTH 96
28 #define HUGE_HEIGHT 96
30 #define ICON_HEIGHT 52
31 #define ICON_WIDTH 48
33 #define SMALL_HEIGHT 18
34 #define SMALL_WIDTH 22
36 typedef struct _MaskedPixmapClass MaskedPixmapClass;
38 struct _MaskedPixmapClass {
39 GObjectClass parent;
42 /* When a MaskedPixmap is created we load the image from disk and
43 * scale the pixbuf down to the 'huge' size (if it's bigger).
44 * The 'normal' pixmap and mask are created automatically - you have
45 * to request the other sizes.
47 * Note that any of the masks be also be NULL if the image has no
48 * mask.
50 struct _MaskedPixmap
52 GObject object;
54 GdkPixbuf *src_pixbuf; /* Limited to 'huge' size */
56 /* If huge_pixbuf is NULL then call pixmap_make_huge() */
57 GdkPixbuf *huge_pixbuf;
58 GdkPixbuf *huge_pixbuf_lit;
59 int huge_width, huge_height;
61 GdkPixbuf *pixbuf; /* Normal size image, always valid */
62 GdkPixbuf *pixbuf_lit;
63 int width, height;
65 /* If sm_pixbuf is NULL then call pixmap_make_small() */
66 GdkPixbuf *sm_pixbuf;
67 GdkPixbuf *sm_pixbuf_lit;
68 int sm_width, sm_height;
71 void pixmaps_init(void);
72 void pixmap_make_huge(MaskedPixmap *mp);
73 void pixmap_make_small(MaskedPixmap *mp);
74 MaskedPixmap *load_pixmap(const char *name);
75 void pixmap_background_thumb(const gchar *path, GFunc callback, gpointer data);
76 MaskedPixmap *masked_pixmap_new(GdkPixbuf *full_size);
77 GdkPixbuf *scale_pixbuf(GdkPixbuf *src, int max_w, int max_h);
79 #endif /* _PIXMAP_H */