#ifndef TB_MESSAGE_DFE_H
#define TB_MESSAGE_DEF_H
/*
** tbmessage_def.h
**
** By Stuart Kelly
** Copyright 1996 ©
** FREEWARE
**
** Functions in C.
**
** Tested using Matthew Dillon`s Dice C Compiler. 12/December/1995
**
**  Do Not Alter The Function defines in this file.
**  You may not add to, delete from or change (edit) this file.
*/

/*
**
** Contains:- TBMessage structure.
**       TB_Wait(number);
**       SendTheMessage(struct Message *msg, STRPTR portname);
**       TB_GetTBScreen();
**       TB_FinishNow(); - Must tell TB when you are done using its
**                         Screen (at End of Program ).
**
*/

/*
**  Functions for TBPort are below
*/

#include <stdio.h>
#include <dos/dos.h>

#include <exec/ports.h>
#include <exec/memory.h>
#include <clib/dos_protos.h>
#include <clib/exec_protos.h>
#include <intuition/intuition.h>
#include <clib/intuition_protos.h>


#define PORT "TBMsgPort"

/* TBPort Commands
** only 3 will be more later
** For use by TB_GetTBScreen(); , TB_FinishNow(); and TB_SayM();
*/

#define TB_GetScreen 1 /* gets TB`s screen address */
#define TB_Finish    2 /* returns TB_OK */
#define TB_OK        3 /* not a command */
#define TB_Say       4 /* returns TB_OK */
/*
**
** TBMessge Structure
**
*/

extern struct TBMessage
{
 struct Message SystemMsg;
 int TB_Command;   /* Tell TB what Command to do */
 char *TB_Text;          /* TB_SayM */
 struct Screen *TB_Screen;    /* TB Screen Address */
};

/*
** Function defines
*/

extern BOOL SendTheMessage(struct Message *msg, STRPTR portname);
extern BOOL TB_FinishNow(void);
extern struct Screen *TB_GetTBScreen(void);
extern void TB_Wait(long number);
extern BOOL TB_SayM(char *tb_text);

#endif
