/* $Id: Icon.h,v 1.1 1997/04/15 10:04:09 archer Exp $
 *	ICON.H - Icons structures and prototypes
 *
 * Support for mono-chrome and color pixmaps. Also allows for programmatic
 * icons, and text fallbacks when everything else fails
 */
#ifndef _widget_icon_h_included
#define _widget_icon_h_included


/**
 ** Public types
 **/
typedef void (*x11_iconcall)(void *);

typedef struct {
	unsigned int	w,
			h;
	char		*mono_data;
	char		*mono_mask;
	char		**xpm_data;
	char		*text_fallback;
	x11_iconcall	on_redraw;
	Pixmap		color_pixmap;
	Pixmap		data_pixmap;
	Pixmap		mask_pixmap;
	int		referenced;
} X11_icon;


/**
 ** Global icons
 **/
extern X11_icon		X11_IconFatalError,
			X11_IconError,
			X11_IconWarning,
			X11_IconQuestion;


/**
 ** Quick'n easy macros
 **/
#define X11_IconMasked(w,h,b,m)	{ w,h,b,m,0,0,0,0,0,0,0 }
#define X11_IconMono(w,h,d)	{ w,h,d,0,0,0,0,0,0,0,0 }
#define X11_IconVoid(w,h)	{ w,h,0,0,0,0,0,0,0,0,0 }
#define X11_IconXpm(s)		{ 0,0,0,0,s,0,0,0,0,0,0 }
#define X11_IconXpmMask(w,h,s,b,m)	{ w,h,b,m,s,0,0,0,0,0,0 }
#define X11_IconXpmMono(w,h,s,b)	{ w,h,b,0,s,0,0,0,0,0,0 }

#define X11_NO_ICON	((X11_icon *)0)


/**
 ** Prototypes
 **/
extern void	X11_IconRelease(X11_icon *);
extern void	X11_IconUsed(X11_icon *);


#endif /*_widget_icon_h_included*/
