/*** imageclass.h ***********************************************************
 *
 *  imageclass.h -- constants for the image class
 *
 *  $Header: /home/amiga/V36/src/kickstart/intuition/RCS/imageclass.h,v 1.9 90/04/06 22:25:38 jimm Exp $
 *
 *  Confidential Information: Commodore-Amiga, Inc.
 *  Copyright (C) 1989, Commodore-Amiga, Inc.
 *  All Rights Reserved
 *
 ****************************************************************************/

#ifndef UTILITY_TAGITEM_H
#include <utility/tagitem.h>
#endif

#define CUSTOMIMAGEDEPTH	(-1)
/* if image.Depth is this, it's a new Image class object */

#define GADGET_BOX( g )	( (struct IBox *) &((struct Gadget *)(g))->LeftEdge )
#define IM_BOX( im )	( (struct IBox *) &((struct Image *)(im))->LeftEdge )
#define IM_FGPEN( im )	( (im)->PlanePick )
#define IM_BGPEN( im )	( (im)->PlaneOnOff )

/* image attributes	*/
enum { IA_Dummy = TAG_USER + 0x20000,
    IA_LEFT,
    IA_TOP,
    IA_WIDTH,
    IA_HEIGHT,
    IA_FGPEN,		/* also means "PlanePick"	*/
    IA_BGPEN,		/* also means "PlaneOnOff"	*/
    IA_DATA,		/* bitplanes, in classic case	*/

    IA_LINEWIDTH,
    IA_SHADOWPEN,
    IA_HIGHLIGHTPEN,

    /* some attributes meaningful to "sysiclass", the
     * class which creates system gadget images
     */
    SYSIA_Size, 	/* #define's below	*/
    SYSIA_Depth, 	/* 1- monochrome, >1- color	*/
    SYSIA_Which,	/* see #define's below	*/
    SYSIA_Pens,		/* pointer to UWORD pens[],
			 * ala DrawInfo.Pens, MUST be
			 * terminated by ~0
			 */
};

/* data values for SYSIA_Size	*/
#define SYSISIZE_MEDRES	(0)
#define SYSISIZE_LOWRES	(1)
#define SYSISIZE_HIRES	(2)

/*
 * SYSIA_Which tag data values:
 * Specifies which system gadget you want an image for.
 * Some numbers correspond to internal Intuition #defines
 */
#define DEPTHIMAGE	(0)
#define ZOOMIMAGE	(1)
#define SIZEIMAGE	(2)
#define CLOSEIMAGE	(3)
#define SDEPTHIMAGE	(5)	/* screen depth gadget */
#define LEFTIMAGE	(10)
#define UPIMAGE		(11)
#define RIGHTIMAGE	(12)
#define DOWNIMAGE	(13)
#define CHECKIMAGE	(14)
#define MXIMAGE		(15)	/* mutual exclude "button" */


/* image message id's	*/
enum {	IM_Dummy = 0x201,
    IM_DRAW,			/* draw yourself, with "state"		*/
    IM_HITTEST,			/* return TRUE if click hits image	*/
    IM_ERASE,			/* erase yourself			*/
    IM_MOVE,			/* draw new and erase old, smoothly	*/
};

/* image draw states or styles, for IM_DRAW */
enum {
    IDS_NORMAL,
    IDS_SELECTED,
    IDS_DISABLED,
    IDS_BUSY,
    IDS_INDETERMINATE,
};

/* oops, forgive spelling error by jimm */
#define IDS_INDETERMINANT IDS_INDETERMINATE

/* IM_DRAW	*/
struct impDraw {
    ULONG		MethodID;
    struct RastPort	*imp_RPort;
    struct {
	WORD	X;
	WORD	Y;
    }			imp_Offset;

    ULONG		imp_State;
    struct DrawInfo	*imp_DrInfo;
};

/* IM_ERASE	*/
/* NOTE: This is a subset of impDraw	*/
struct impErase {
    ULONG		MethodID;
    struct RastPort	*imp_RPort;
    struct {
	WORD	X;
	WORD	Y;
    }			imp_Offset;
};

struct impHitTest {
    ULONG		MethodID;
    struct {
	WORD	X;
	WORD	Y;
    }			imp_Point;
};
