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! */
28 /* XXX: Spec has changed... should be 128x128 now */
30 #define HUGE_HEIGHT 96
32 #define ICON_HEIGHT 48
35 #define SMALL_HEIGHT 18
36 #define SMALL_WIDTH 22
38 typedef struct _MaskedPixmapClass MaskedPixmapClass
;
40 struct _MaskedPixmapClass
{
44 /* When a MaskedPixmap is created we load the image from disk and
45 * scale the pixbuf down to the 'huge' size (if it's bigger).
46 * The 'normal' pixmap and mask are created automatically - you have
47 * to request the other sizes.
49 * Note that any of the masks be also be NULL if the image has no
56 GdkPixbuf
*src_pixbuf
; /* Limited to 'huge' size */
58 /* If huge_pixbuf is NULL then call pixmap_make_huge() */
59 GdkPixbuf
*huge_pixbuf
;
60 GdkPixbuf
*huge_pixbuf_lit
;
61 int huge_width
, huge_height
;
63 GdkPixbuf
*pixbuf
; /* Normal size image, always valid */
64 GdkPixbuf
*pixbuf_lit
;
67 /* If sm_pixbuf is NULL then call pixmap_make_small() */
69 GdkPixbuf
*sm_pixbuf_lit
;
70 int sm_width
, sm_height
;
73 void pixmaps_init(void);
74 void pixmap_make_huge(MaskedPixmap
*mp
);
75 void pixmap_make_small(MaskedPixmap
*mp
);
76 MaskedPixmap
*load_pixmap(const char *name
);
77 void pixmap_background_thumb(const gchar
*path
, GFunc callback
, gpointer data
);
78 MaskedPixmap
*masked_pixmap_new(GdkPixbuf
*full_size
);
80 #endif /* _PIXMAP_H */