/*
 *                          DiskSpeed v2.0
 *                                by
 *                           Michael Sinz
 *
 *             Copyright (c) 1989 by MKSoft Development
 *
 *
 * Yes, this is yet another disk speed testing program, but with a few
 * differences.  It was designed to give the most accurate results of the
 * true disk performance in the system.  For this reason many of
 * DiskSpeed's results may look either lower or higher than current disk
 * performance tests.
 *
 * This program was thrown together in a few hours because I needed more
 * accurate and consistent results for disk performance as seen from the
 * application's standpoint.  This program has now served its purpose and
 * I am now giving it to the rest of the Amiga world to play with as long
 * as all of the files remain together in unmodified form.  (That is, the
 * files DiskSpeed, DiskSpeed.info, DiskSpeed.c, DiskSpeedWindow.c,
 * DiskSpeedWindow.h, MakeBoxes.c, MakeBoxes.h, StandardGadgets.c,
 * StandardGadgets.h, RenderInfo.c, RenderInfo.h, DiskSpeed.doc, and
 * MakeFile)
 *
 * Version 2.0 of this program added a few features and cleaned up the
 * user interface.  I hope you like this...
 *
 ******************************************************************************
 *									      *
 *	Reading legal mush can turn your bain into guacamole!		      *
 *									      *
 *		So here is some of that legal mush:			      *
 *									      *
 * Permission is hereby granted to distribute this program's source	      *
 * executable, and documentation for non-commercial purposes, so long as the  *
 * copyright notices are not removed from the sources, executable or	      *
 * documentation.  This program may not be distributed for a profit without   *
 * the express written consent of the author Michael Sinz.		      *
 *									      *
 * This program is not in the public domain.				      *
 *									      *
 * Fred Fish is expressly granted permission to distribute this program's     *
 * source and executable as part of the "Fred Fish freely redistributable     *
 * Amiga software library."						      *
 *									      *
 * Permission is expressly granted for this program and it's source to be     *
 * distributed as part of the Amicus Amiga software disks, and the	      *
 * First Amiga User Group's Hot Mix disks.				      *
 *									      *
 ******************************************************************************
 *
 * My DiskSpeedWindow definitions...
 */

#define	GADGET_LOW	1
#define	GADGET_MED	2
#define	GADGET_HIGH	4

#define	GADGET_START	5
#define	GADGET_SAVE	6
#define	GADGET_PRINT	7

#define	GADGET_STRING	8

#define	GADGET_REQ	9

#define	NUM_BOXES	12
#define	NUM_TEXT	16
#define	NUM_GADGETS	6
#define	NUM_RESULTS	17

#define	RESULTS_512_CREATE	0
#define	RESULTS_512_WRITE	1
#define	RESULTS_512_READ	2

#define	RESULTS_4096_CREATE	3
#define	RESULTS_4096_WRITE	4
#define	RESULTS_4096_READ	5

#define	RESULTS_32768_CREATE	6
#define	RESULTS_32768_WRITE	7
#define	RESULTS_32768_READ	8

#define	RESULTS_262144_CREATE	9
#define	RESULTS_262144_WRITE	10
#define	RESULTS_262144_READ	11

#define	RESULTS_CREATE		12
#define	RESULTS_OPEN_CLOSE	13
#define	RESULTS_DIR_SCAN	14
#define	RESULTS_DELETE		15

#define	RESULTS_SEEK_READ	16

struct MyBox
{
struct	Border	Border;
	SHORT	Vectors[5*2];
};

struct MyGadget
{
struct	Gadget		Gadget;
struct	IntuiText	IntuiText;
struct	Border		Borders[4];
	USHORT		Vectors1[16];
	USHORT		Vectors2[16];
};

struct MyResult
{
struct	IntuiText	IntuiText;
	char		text[10];
};

struct MyWindow
{
struct	Window		*Window;
struct	Gadget		*CloseGadget;
struct	Gadget		*FrontBackGadget;
struct	Gadget		*DragGadget;
struct	timeval		StartTime;
struct	timeval		StopTime;
struct	timerequest	TimeReq;
struct	Gadget		Background;
struct	Image		Image_Background;
struct	Gadget		Detail;
struct	MyBox		Details[NUM_BOXES*2];
struct	IntuiText	TextDetails[NUM_TEXT];
struct	MyGadget	MyGadgets[NUM_GADGETS];
struct	MyResult	MyResults[NUM_RESULTS];
struct	Gadget		DeviceGadget;
struct	StringInfo	DeviceGadgetInfo;
	char		DeviceName[32];
struct	Gadget		CommentGadget;
struct	StringInfo	CommentGadgetInfo;
	char		Comment[80];

/* For the requester... */
struct	Requester	Req;
struct	Border		ReqBorders[4];
struct	Gadget		ReqGadget;
struct	IntuiText	ReqIText;
	SHORT		ReqVector1[16];
	SHORT		ReqVector2[16];

/* Flag for which type of testing... */
	USHORT		TestFlag;
};

VOID Write_Results(struct MyWindow *,BPTR);

struct MyWindow *OpenMyWindow(struct RenderInfo *);
VOID CloseMyWindow(struct MyWindow *);
