#ifndef __wind__H
#define __wind__H

#include <stdarg.h>

#include "bool.h"
#include "Coords.h"
#include "CIcon.h"
#include "Event.h"
#include "Sprites.h"

typedef enum
{
	EWind_Moveable		= 0x00000002,
	EWind_NoRedraw		= 0x00000010,
	EWind_Pane		= 0x00000020,
	EWind_NoLimits		= 0x00000040,
	EWind_Scroll_1		= 0x00000100,
	EWind_Scroll_2		= 0x00000200,
	EWind_StayonBackground	= 0x00000800,
	EWind_GrabHotKeys	= 0x00001000,
	EWind_ForceOnScreen	= 0x00002000,
	EWind_IgnoreRightExtent	= 0x00004000,
	EWind_IgnoreLeftExtent	= 0x00008000,
	EWind_IsOpen		= 0x00010000,
	EWind_IsOnTop		= 0x00020000,
	EWind_IsFullSize	= 0x00040000,
	EWind_ClickToggle	= 0x00080000,
	EWind_HasFocus		= 0x00100000,
	EWind_WillForceOnScreen	= 0x00200000,
	EWind_BackIcon		= 0x01000000,
	EWind_CloseIcon		= 0x02000000,
	EWind_TitleBar		= 0x04000000,
	EWind_ToggleSize	= 0x08000000,
	EWind_VScroll		= 0x10000000,
	EWind_Resize		= 0x20000000,
	EWind_HScroll		= 0x40000000,
	EWind_NewFormat		= ~0x7fffffff
} EWind_Flags;


typedef struct
{
	HWind		w;
	CWindCvt	cvt;
	HWind		behind;
} CWindOpen;

typedef struct
{
	CWindOpen	o;
	int		flags;
} CWindState;

typedef struct
{
	CWindState	o;
	char		title_fg;
	char		title_bg;
	char		work_fg;
	char		work_bg;
	char		scroll_inner;
	char		scroll_outer;
	char		highlight_bg;
	char		reserved;
	CRect		ex;
	int		title_flags;
	int		work_flags;
	CSpriteArea*	sprite_area;
	short		min_width;
	short		min_height;
	CIconData	title_data;
	int		nicons;
} CWind;

typedef struct
{
	HWind		w;
	CWindCvt	cvt;
	CRect		bounds;
} CWindRedraw;

#endif
