
/* Include file generated by Toolmaker V1.1.22 */

/* Includes */
 
#include <stdlib.h>
#include <exec/types.h>
#include <intuition/intuition.h>
#include <intuition/gadgetclass.h>
#include <libraries/gadtools.h>
 
/* TMScreenInfo structure */
 
struct TMScreenInfo
  {
  struct Screen *Screen;	/* pointer to Screen structure */
  struct TagItem *MoreTags;	/* pointer to additional tag array */
  struct VisualInfo *VisualInfo;	/* pointer to VisualInfo structure */
  APTR UserData;
  };

/* TMWindowInfo structure */
 
struct TMWindowInfo
  {
  struct Window *Window;	/* pointer to Window structure */
  struct TagItem *MoreTags;	/* pointer to additional tag array */
  struct Menu *Menu;	/* pointer to Menu structure */
  struct Requester Requester;	/* Requester structure for DISABLE/ENABLE */
  UBYTE DisableCount;	/* Count for nested DISABLE/ENABLEs */
  ULONG Flags;	/* TMWF_ flags */
  struct Gadget *FirstGadget;	/* pointer to first gadget */
  struct Gadget *ContextGadget;	/* pointer to context gadget */
  APTR UserData;
  };

/* TMGadgetInfo structure */
 
struct TMGadgetInfo
  {
  struct Gadget *Gadget;
  struct TagItem *MoreTags;
  APTR UserData;
  };

/* TMData structure */
 
struct TMData
  {
  ULONG Size;	/* Size of TMData structure */
  struct MsgPort *WindowMsgPort;	/* pointer to window message port */
  LONG ReturnCode;	/* Return code for exit() */
  struct TMScreenInfo TMScreenInfo[1];	/* TMScreenInfo structure array */
  struct TMGadgetInfo TMGadgetInfo_ERRWINDO[9];	/* TMGadgetInfo structure array */
  struct TMWindowInfo TMWindowInfo[1];	/* TMWindowInfo structure array */
  APTR UserData;
  };

/* Function Prototypes */
 
#include <clib/exec_protos.h>
#include <clib/intuition_protos.h>
#include <clib/gadtools_protos.h>
 
struct TMData *TM_Open(ULONG *);
VOID TM_Close(struct TMData *);
LONG TM_Request(struct Window *, char *, char *, char *, ULONG *, APTR, ...);
VOID TM_EventLoop(struct TMData *);
BOOL OpenScreen_TESTMANA(struct TMData *);
VOID CloseScreen_TESTMANA(struct TMData *);
BOOL OpenWindow_ERRWINDO(struct TMData *);
VOID CloseWindow_ERRWINDO(struct TMData *);
VOID DisableWindow_ERRWINDO(struct TMData *);
VOID EnableWindow_ERRWINDO(struct TMData *);
BOOL Window_ERRWINDO_GADGETUP(struct TMData *, struct IntuiMessage *);
BOOL Window_ERRWINDO_CLOSEWINDOW(struct TMData *, struct IntuiMessage *);

/* Library pointers */
 
extern struct Library *IntuitionBase;
extern struct Library *GadToolsBase;

/* Constants */
 
#define TMWF_OPENED   0x00000001	/* Window opened */
#define TMWF_DISABLED 0x00000002	/* Window disabled */

#define TMERR_OK	0
#define TMERR_MEMORY	1

/* Screen pointer */
 
#define screen_TESTMANA	TMData->TMScreenInfo[0].Screen	/* Custom screen pointer */

/* Window, Menu, and Gadget pointers */
 
#define window_ERRWINDO	TMData->TMWindowInfo[0].Window	/* Window pointer */
#define gadget_LASTERRO	TMData->TMGadgetInfo_ERRWINDO[0].Gadget	/* Gadget pointer */
#define gadget_LMFrom	TMData->TMGadgetInfo_ERRWINDO[1].Gadget	/* Gadget pointer */
#define gadget_ECnt	TMData->TMGadgetInfo_ERRWINDO[2].Gadget	/* Gadget pointer */
#define gadget_LErr	TMData->TMGadgetInfo_ERRWINDO[3].Gadget	/* Gadget pointer */
#define gadget_LTime	TMData->TMGadgetInfo_ERRWINDO[4].Gadget	/* Gadget pointer */
#define gadget_PASSFAIL	TMData->TMGadgetInfo_ERRWINDO[5].Gadget	/* Gadget pointer */
#define gadget_TESTING	TMData->TMGadgetInfo_ERRWINDO[6].Gadget	/* Gadget pointer */
#define gadget_ABORTTES	TMData->TMGadgetInfo_ERRWINDO[7].Gadget	/* Gadget pointer */
#define gadget_BYEBYE	TMData->TMGadgetInfo_ERRWINDO[8].Gadget	/* Gadget pointer */

/* Gadget IDs */
 
#define ID_LASTERRO	1	/* Gadget ID */
#define ID_LMFrom	2	/* Gadget ID */
#define ID_ECnt	3	/* Gadget ID */
#define ID_LErr	4	/* Gadget ID */
#define ID_LTime	5	/* Gadget ID */
#define ID_PASSFAIL	6	/* Gadget ID */
#define ID_TESTING	7	/* Gadget ID */
#define ID_ABORTTES	8	/* Gadget ID */
#define ID_BYEBYE	9	/* Gadget ID */

/* Menu, item, and subitem IDs */
 

/* ScreenInfo pointers */
 
#define ScreenInfo_TESTMANA	TMData->TMScreenInfo[0]	/* TMScreenInfo structure pointer */

/* WindowInfo pointers */
 
#define WindowInfo_ERRWINDO	TMData->TMWindowInfo[0]	/* TMWindowInfo structure pointer */

/* GadgetInfo pointers */
 
#define GadgetInfo_LASTERRO	TMData->TMGadgetInfo_ERRWINDO[0]	/* TMGadgetInfo structure pointer */
#define GadgetInfo_LMFrom	TMData->TMGadgetInfo_ERRWINDO[1]	/* TMGadgetInfo structure pointer */
#define GadgetInfo_ECnt	TMData->TMGadgetInfo_ERRWINDO[2]	/* TMGadgetInfo structure pointer */
#define GadgetInfo_LErr	TMData->TMGadgetInfo_ERRWINDO[3]	/* TMGadgetInfo structure pointer */
#define GadgetInfo_LTime	TMData->TMGadgetInfo_ERRWINDO[4]	/* TMGadgetInfo structure pointer */
#define GadgetInfo_PASSFAIL	TMData->TMGadgetInfo_ERRWINDO[5]	/* TMGadgetInfo structure pointer */
#define GadgetInfo_TESTING	TMData->TMGadgetInfo_ERRWINDO[6]	/* TMGadgetInfo structure pointer */
#define GadgetInfo_ABORTTES	TMData->TMGadgetInfo_ERRWINDO[7]	/* TMGadgetInfo structure pointer */
#define GadgetInfo_BYEBYE	TMData->TMGadgetInfo_ERRWINDO[8]	/* TMGadgetInfo structure pointer */

