6 #include "PictureBase.h"
7 #include "PictureImageLoader.h"
9 /** Manipulating FvwmPictures **/
12 * For PGetFvwmPicture() and PCacheFvwmPicture(), setting
13 * ImagePath to NULL means "search the default image path".
16 /* <pubfunc>PGetFvwmPicture
18 * Return an FvwmPicture loaded from the file pictureName found in the
19 * ImagePath.. If ImagePath is NULL the default image path is used.
22 FvwmPicture
* PGetFvwmPicture(
23 Display
* dpy
, Window win
, char* ImagePath
, const char* pictureName
,
24 FvwmPictureAttributes fpa
);
26 /* <pubfunc>PFreeFvwmPictureData
28 * Just free the data allocated by PGetFvwmPicture. This function does not
29 * Free the pixmaps for example.
32 void PFreeFvwmPictureData(FvwmPicture
*p
);
34 /* <pubfunc>PCacheFvwmPicture
36 * Return the FvwmPicture loaded from the file pictureName found in the
37 * ImagePath. Fisrt the picture is searched in the FvwmPicture cache (so
38 * if this picture has been already loaded it is not loaded again and a
39 * weight is added to the found picture). If the picture is not in the cache
40 * it is loaded from the file and added to the FvwmPicture cache.
41 * If ImagePath is NULL the default image path is used.
44 FvwmPicture
* PCacheFvwmPicture(
45 Display
*dpy
, Window win
, char* ImagePath
, const char* pictureName
,
46 FvwmPictureAttributes fpa
);
48 /* <pubfunc>PLoadFvwmPictureFromPixmap
50 * Return a FvwmPicture from the given data.
53 FvwmPicture
*PLoadFvwmPictureFromPixmap(
54 Display
*dpy
, Window win
, char *name
, Pixmap pixmap
, Pixmap mask
,
55 Pixmap alpha
, int width
, int height
, int nalloc_pixels
,
56 Pixel
*alloc_pixels
, int no_limit
);
58 /* <pubfunc>PDestroyFvwmPicture
60 * Return a FvwmPicture from the given data. The picture is added to the
61 * FvwmPicture cache. This is not really useful as it is not possible
62 * to really cache a picture from the given data.
65 FvwmPicture
*PCacheFvwmPictureFromPixmap(
66 Display
*dpy
, Window win
, char *name
, Pixmap pixmap
,
67 Pixmap mask
, Pixmap alpha
, int width
, int height
, int nalloc_pixels
,
68 Pixel
*alloc_pixels
, int no_limit
);
70 /* <pubfunc>PDestroyFvwmPicture
72 * Remove a weight to the FvwmPicture p from the FvwmPicture cache.
73 * If the weight is zero the allocated datas from p are freed
76 void PDestroyFvwmPicture(Display
*dpy
, FvwmPicture
*p
);
78 /* <pubfunc>PCloneFvwmPicture
80 * Duplicate an already allocated FvwmPicture in the FvwmPicture cache
81 * (a weight is added to the picture).
84 FvwmPicture
*PCloneFvwmPicture(FvwmPicture
*pic
);
87 void PicturePrintImageCache(int verbose
);