4 * ROX-Filer, filer for the ROX desktop project
5 * By Thomas Leonard, <tal197@users.sourceforge.net>.
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_exec_file
;
22 extern MaskedPixmap
*im_appdir
;
24 extern MaskedPixmap
*im_dirs
;
26 /* Note: don't change these two - thumbnails saving assumes 96x96 */
27 /* If making the huge size larger, be sure to update SMALL_IMAGE_THRESHOLD! */
29 #define HUGE_HEIGHT 96
31 #define ICON_HEIGHT 48
34 #define SMALL_HEIGHT 18
35 #define SMALL_WIDTH 22
37 typedef struct _MaskedPixmapClass MaskedPixmapClass
;
39 struct _MaskedPixmapClass
{
43 /* When a MaskedPixmap is created we load the image from disk and
44 * scale the pixbuf down to the 'huge' size (if it's bigger).
45 * The 'normal' pixmap and mask are created automatically - you have
46 * to request the other sizes.
48 * Note that any of the masks be also be NULL if the image has no
55 GdkPixbuf
*src_pixbuf
; /* Limited to 'huge' size */
57 /* If huge_pixbuf is NULL then call pixmap_make_huge() */
58 GdkPixbuf
*huge_pixbuf
;
59 GdkPixbuf
*huge_pixbuf_lit
;
60 int huge_width
, huge_height
;
62 GdkPixbuf
*pixbuf
; /* Normal size image, always valid */
63 GdkPixbuf
*pixbuf_lit
;
66 /* If sm_pixbuf is NULL then call pixmap_make_small() */
68 GdkPixbuf
*sm_pixbuf_lit
;
69 int sm_width
, sm_height
;
72 void pixmaps_init(void);
73 void pixmap_make_huge(MaskedPixmap
*mp
);
74 void pixmap_make_small(MaskedPixmap
*mp
);
75 MaskedPixmap
*load_pixmap(const char *name
);
76 void pixmap_background_thumb(const gchar
*path
, GFunc callback
, gpointer data
);
77 MaskedPixmap
*masked_pixmap_new(GdkPixbuf
*full_size
);
79 #endif /* _PIXMAP_H */