2 * ROX-Filer, filer for the ROX desktop project
3 * By Thomas Leonard, <tal197@users.sourceforge.net>.
11 extern GFSCache
*pixmap_cache
;
13 extern MaskedPixmap
*im_error
;
14 extern MaskedPixmap
*im_unknown
;
15 extern MaskedPixmap
*im_symlink
;
17 extern MaskedPixmap
*im_unmounted
;
18 extern MaskedPixmap
*im_mounted
;
19 extern MaskedPixmap
*im_exec_file
;
20 extern MaskedPixmap
*im_appdir
;
22 extern MaskedPixmap
*im_dirs
;
24 /* If making the huge size larger, be sure to update SMALL_IMAGE_THRESHOLD! */
26 #define HUGE_HEIGHT 96
28 #define ICON_HEIGHT 52
31 #define SMALL_HEIGHT 18
32 #define SMALL_WIDTH 22
34 typedef struct _MaskedPixmapClass MaskedPixmapClass
;
36 struct _MaskedPixmapClass
{
40 /* When a MaskedPixmap is created we load the image from disk and
41 * scale the pixbuf down to the 'huge' size (if it's bigger).
42 * The 'normal' pixmap and mask are created automatically - you have
43 * to request the other sizes.
45 * Note that any of the masks be also be NULL if the image has no
52 GdkPixbuf
*src_pixbuf
; /* Limited to 'huge' size */
54 /* If huge_pixbuf is NULL then call pixmap_make_huge() */
55 GdkPixbuf
*huge_pixbuf
;
56 GdkPixbuf
*huge_pixbuf_lit
;
57 int huge_width
, huge_height
;
59 GdkPixbuf
*pixbuf
; /* Normal size image, always valid */
60 GdkPixbuf
*pixbuf_lit
;
63 /* If sm_pixbuf is NULL then call pixmap_make_small() */
65 GdkPixbuf
*sm_pixbuf_lit
;
66 int sm_width
, sm_height
;
69 void pixmaps_init(void);
70 void pixmap_make_huge(MaskedPixmap
*mp
);
71 void pixmap_make_small(MaskedPixmap
*mp
);
72 MaskedPixmap
*load_pixmap(const char *name
);
73 void pixmap_background_thumb(const gchar
*path
, GFunc callback
, gpointer data
);
74 MaskedPixmap
*masked_pixmap_new(GdkPixbuf
*full_size
);
75 GdkPixbuf
*scale_pixbuf(GdkPixbuf
*src
, int max_w
, int max_h
);
77 #endif /* _PIXMAP_H */