10bbfda8aSnia/* 20bbfda8aSnia * General image handling function bits 30bbfda8aSnia */ 40bbfda8aSnia#ifndef _CTWM_IMAGE_H 50bbfda8aSnia#define _CTWM_IMAGE_H 60bbfda8aSnia 70bbfda8aSnia 80bbfda8aSnia/* Widely used through the codebase */ 90bbfda8aSniastruct Image { 100bbfda8aSnia Pixmap pixmap; 110bbfda8aSnia Pixmap mask; 120bbfda8aSnia int width; 130bbfda8aSnia int height; 140bbfda8aSnia Image *next; 150bbfda8aSnia}; 160bbfda8aSnia 170bbfda8aSnia 180bbfda8aSniaImage *GetImage(const char *name, ColorPair cp); 190bbfda8aSniaImage *AllocImage(void); 200bbfda8aSniavoid FreeImage(Image *image); 210bbfda8aSnia 220bbfda8aSnia 230bbfda8aSnia/* Used internally in image*.c */ 240bbfda8aSniaextern bool reportfilenotfound; 250bbfda8aSniaextern Colormap AlternateCmap; 260bbfda8aSnia 270bbfda8aSniachar *ExpandPixmapPath(const char *name); 280bbfda8aSniaImage *get_image_anim_cp(const char *name, ColorPair cp, 290bbfda8aSnia Image * (*imgloader)(const char *, ColorPair)); 300bbfda8aSnia 310bbfda8aSnia 320bbfda8aSnia/* 330bbfda8aSnia * These are really image_bitmap_builtin stuff, but a few places in the 340bbfda8aSnia * codebase reference them, and there's no need for them to pull in a 350bbfda8aSnia * pretty deep internal header to do it. 360bbfda8aSnia */ 370bbfda8aSnia#define TBPM_DOT ":dot" /* name of titlebar pixmap for dot */ 380bbfda8aSnia#define TBPM_ICONIFY ":iconify" /* same image as dot */ 390bbfda8aSnia#define TBPM_RESIZE ":resize" /* name of titlebar pixmap for resize button */ 400bbfda8aSnia#define TBPM_XLOGO ":xlogo" /* name of titlebar pixmap for xlogo */ 410bbfda8aSnia#define TBPM_DELETE ":delete" /* same image as xlogo */ 420bbfda8aSnia#define TBPM_MENU ":menu" /* name of titlebar pixmap for menus */ 430bbfda8aSnia#define TBPM_QUESTION ":question" /* name of unknown titlebar pixmap */ 440bbfda8aSnia 450bbfda8aSnia#define TBPM_3DCROSS ":xpm:cross" 460bbfda8aSnia#define TBPM_3DICONIFY ":xpm:iconify" 470bbfda8aSnia#define TBPM_3DSUNKEN_RESIZE ":xpm:sunkresize" 480bbfda8aSnia#define TBPM_3DBOX ":xpm:box" 490bbfda8aSnia 500bbfda8aSnia#define TBPM_3DDOT ":xpm:dot" /* name of titlebar pixmap for dot */ 510bbfda8aSnia#define TBPM_3DRESIZE ":xpm:resize" /* name of titlebar pixmap for resize button */ 520bbfda8aSnia#define TBPM_3DMENU ":xpm:menu" /* name of titlebar pixmap for menus */ 530bbfda8aSnia#define TBPM_3DZOOM ":xpm:zoom" 540bbfda8aSnia#define TBPM_3DBAR ":xpm:bar" 550bbfda8aSnia#define TBPM_3DVBAR ":xpm:vbar" 560bbfda8aSnia 570bbfda8aSnia/* Ditto for a few funcs */ 580bbfda8aSniaPixmap mk_blackgray_pixmap(const char *which, Drawable dw, 590bbfda8aSnia unsigned long fg, unsigned long bg); 600bbfda8aSniavoid get_blackgray_size(int *width, int *height); 610bbfda8aSnia 620bbfda8aSnia#endif /* _CTWM_IMAGE_H */ 63