#define	MAX_GADGET	50	/* Max number of gadget in a Window */

#define GD_ok                                  0
#define GD_test                                1
#define GD_cancel                              2
#define GD_info                                3

#define GD_first                               4

typedef	enum{
	END_LISTE,	/* This is to signal the end of the dark gadget list*/
	BUTTON,		/* A simple button gadget			    */
	SLIDER,
	CHECKBOX,
	MX,
	LISTVIEW,
	OWN_GADGET,
	CYCLE,
	STRING,
	INTEGER,
	SCREEN,			/* A button to choose screen resolution */
	DATA_STRING,		/* Data not show, only for saving	*/
	IMAGE,			/* It's to show an image structure 	*/
	FONT,			/* A button to choose a font		*/
	INV_CHECKBOX		/* Like a checkbox, but not show on screen */

}type_gadget;

#define	HORIZ	1
#define	VERT	2
	
typedef	struct	own_init{
	struct	Gadget	(*own_add)();
	void	(*own_press)();
	void	(*own_end)();
};

typedef	struct	tom_gadget{
	char	*GadgetText;
	type_gadget	type_gadg;
	short	int	LeftEdge,TopEdge;
	short	int	Width,Height;
	short	int	value;
	short	int	d1,d2,d3;
	char	*p_data;
	struct	Gadget	*p_gadg;

};

typedef	struct	contexe{
	struct	tom_gadget	*t_g;
	struct	Window	*Wnd;
	APTR		Visual;
	struct Gadget        *GList;
	int		flg_end;
	int		flg_save;
	char	*p_name;
};

int	find_res(USHORT flg_depth,SHORT *p_depth,SHORT *p_tx,SHORT *p_ty,ULONG *p_d_id);

