1 /*
2  * General image handling function bits
3  */
4 #ifndef _CTWM_IMAGE_H
5 #define _CTWM_IMAGE_H
6 
7 
8 /* Widely used through the codebase */
9 struct Image {
10 	Pixmap pixmap;
11 	Pixmap mask;
12 	int    width;
13 	int    height;
14 	Image *next;
15 };
16 
17 
18 Image *GetImage(const char *name, ColorPair cp);
19 Image *AllocImage(void);
20 void FreeImage(Image *image);
21 
22 
23 /* Used internally in image*.c */
24 extern bool reportfilenotfound;
25 extern Colormap AlternateCmap;
26 
27 char *ExpandPixmapPath(const char *name);
28 Image *get_image_anim_cp(const char *name, ColorPair cp,
29                          Image * (*imgloader)(const char *, ColorPair));
30 
31 
32 /*
33  * These are really image_bitmap_builtin stuff, but a few places in the
34  * codebase reference them, and there's no need for them to pull in a
35  * pretty deep internal header to do it.
36  */
37 #define TBPM_DOT ":dot"         /* name of titlebar pixmap for dot */
38 #define TBPM_ICONIFY ":iconify" /* same image as dot */
39 #define TBPM_RESIZE ":resize"   /* name of titlebar pixmap for resize button */
40 #define TBPM_XLOGO ":xlogo"     /* name of titlebar pixmap for xlogo */
41 #define TBPM_DELETE ":delete"   /* same image as xlogo */
42 #define TBPM_MENU ":menu"       /* name of titlebar pixmap for menus */
43 #define TBPM_QUESTION ":question"       /* name of unknown titlebar pixmap */
44 
45 #define TBPM_3DCROSS ":xpm:cross"
46 #define TBPM_3DICONIFY ":xpm:iconify"
47 #define TBPM_3DSUNKEN_RESIZE ":xpm:sunkresize"
48 #define TBPM_3DBOX ":xpm:box"
49 
50 #define TBPM_3DDOT ":xpm:dot"           /* name of titlebar pixmap for dot */
51 #define TBPM_3DRESIZE ":xpm:resize"     /* name of titlebar pixmap for resize button */
52 #define TBPM_3DMENU ":xpm:menu" /* name of titlebar pixmap for menus */
53 #define TBPM_3DZOOM ":xpm:zoom"
54 #define TBPM_3DBAR ":xpm:bar"
55 #define TBPM_3DVBAR ":xpm:vbar"
56 
57 /* Ditto for a few funcs */
58 Pixmap mk_blackgray_pixmap(const char *which, Drawable dw,
59                            unsigned long fg, unsigned long bg);
60 void get_blackgray_size(int *width, int *height);
61 
62 #endif /* _CTWM_IMAGE_H */
63