#ifndef	ICI_WIN_H
#define	ICI_WIN_H

#ifndef	ICI_OBJECT_H
#include "object.h"
#endif

typedef struct win	win_t;
struct win
{
    object_t	o_head;
    short	w_nlines;
    short	w_ncols;
    win_t	*w_up;		/* The window closer to the user. */
    win_t	*w_down;	/* The window further from the user. */
    short	w_cline;	/* Where the cursor is in this win. */
    short	w_ccol;		/* " */
    short	w_atline;	/* It's top left in screen space. */
    short	w_atcol;	/* " */
    short	w_mindirt;	/* Lowest effected line number. */
    short	w_maxdirt;	/* Greatest effected line number. */
    short	w_flags;
    char	*w_end;
    char	*w_image;
};
#define	winof(o)	((win_t *)(o))
#define	iswin(o)	((o)->o_type == &win_type)

#define	W_ISDIRTY	0x0001

#define	W_CENTRE	-1

extern type_t	win_type;
#endif
