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

#include "trans_tm_text.h"

struct TMScreenInfo
  {
  struct Screen *Screen;
  struct TagItem *MoreTags;
  struct VisualInfo *VisualInfo;
  APTR UserData;
  };

struct TMWindowInfo
  {
  struct Window *Window;
  struct TagItem *MoreTags;
  struct IntuiMessage *GT_IMsg;
  struct Menu *Menu;
  struct Requester Requester;
  UBYTE DisableCount;
  ULONG Flags;
  struct Gadget *FirstGadget;
  struct Gadget *ContextGadget;
  APTR UserData;
  };

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

  /* for BOOPSI images */

struct TMData
  {
  ULONG Size;
  struct MsgPort *WindowMsgPort;
  LONG ReturnCode;
  struct FileRequester *FileRequester;
  struct FontRequester *FontRequester;
  struct TMScreenInfo TMScreenInfo[1];
  struct TMGadgetInfo TMGadgetInfo_TRANSP[7];
  struct TMGadgetInfo TMGadgetInfo_SELECTCO[4];
  struct TMWindowInfo TMWindowInfo[2];
  APTR UserData;
  struct Image			*Images[6];
  BOOL					checked_menu;
  struct List			conductor_list;
  };

struct TMData *TM_Open(ULONG *);
VOID TM_Close(struct TMData *);
LONG TM_Request(struct Window *, UBYTE *, UBYTE *, UBYTE *, ULONG *, APTR, ...);
VOID TM_EventLoop(struct TMData *);
BOOL OpenScreen_Workbench(struct TMData *);
VOID CloseScreen_Workbench(struct TMData *);
BOOL OpenWindow_TRANSP(struct TMData *);
VOID CloseWindow_TRANSP(struct TMData *);
VOID DisableWindow_TRANSP(struct TMData *);
VOID EnableWindow_TRANSP(struct TMData *);
BOOL Window_TRANSP_MENUPICK(struct TMData *, struct IntuiMessage *);
BOOL Window_TRANSP_GADGETDOWN(struct TMData *, struct IntuiMessage *);
BOOL Window_TRANSP_GADGETUP(struct TMData *, struct IntuiMessage *);
BOOL Window_TRANSP_CLOSEWINDOW(struct TMData *, struct IntuiMessage *);
BOOL Window_TRANSP_MOUSEMOVE(struct TMData *, struct IntuiMessage *);
BOOL Window_TRANSP_INTUITICKS(struct TMData *, struct IntuiMessage *);
BOOL Window_TRANSP_IDCMPUPDATE(struct TMData *, struct IntuiMessage *);
BOOL Window_TRANSP_MOUSEUP(struct TMData *TMData, struct IntuiMessage *imsg);
BOOL OpenWindow_SELECTCO(struct TMData *);
VOID CloseWindow_SELECTCO(struct TMData *);
VOID DisableWindow_SELECTCO(struct TMData *);
VOID EnableWindow_SELECTCO(struct TMData *);
BOOL Window_SELECTCO_GADGETDOWN(struct TMData *, struct IntuiMessage *);
BOOL Window_SELECTCO_GADGETUP(struct TMData *, struct IntuiMessage *);
BOOL Window_SELECTCO_CLOSEWINDOW(struct TMData *, struct IntuiMessage *);

extern struct Library *SysBase;
extern struct Library *DOSBase;
extern struct Library *IntuitionBase;
extern struct Library *GadToolsBase;
extern struct Library *UtilityBase;

#define OPENFILE	0
#define SAVEFILE	1

#define TMWF_OPENED	0x00000001
#define TMWF_DISABLED	0x00000002

#define TMERR_OK	0
#define TMERR_MEMORY	1
#define TMERR_MSGPORT	2

#define screen_Workbench	TMData->TMScreenInfo[0].Screen

#define window_TRANSP	TMData->TMWindowInfo[0].Window
#define menu_TRANSP	TMData->TMWindowInfo[0].Menu
#define gadget_REW	TMData->TMGadgetInfo_TRANSP[0].Gadget
#define gadget_CLOCK	TMData->TMGadgetInfo_TRANSP[1].Gadget
#define gadget_PLAY	TMData->TMGadgetInfo_TRANSP[2].Gadget
#define gadget_FF	TMData->TMGadgetInfo_TRANSP[3].Gadget
#define gadget_STOP	TMData->TMGadgetInfo_TRANSP[4].Gadget
#define gadget_STATUS	TMData->TMGadgetInfo_TRANSP[5].Gadget
#define gadget_PAUSE	TMData->TMGadgetInfo_TRANSP[6].Gadget
#define window_SELECTCO	TMData->TMWindowInfo[1].Window
#define gadget_CLIST	TMData->TMGadgetInfo_SELECTCO[0].Gadget
#define gadget_NEWCON	TMData->TMGadgetInfo_SELECTCO[1].Gadget
#define gadget_SELECT	TMData->TMGadgetInfo_SELECTCO[2].Gadget
#define gadget_CANCEL	TMData->TMGadgetInfo_SELECTCO[3].Gadget

#define ID_REW	1
#define ID_CLOCK	2
#define ID_PLAY	3
#define ID_FF	4
#define ID_STOP	5
#define ID_STATUS	6
#define ID_PAUSE	7
#define ID_CLIST	8
#define ID_NEWCON	9
#define ID_SELECT	10
#define ID_CANCEL	11

#define MENU_CONTROL	0
#define ITEM_SETCONDU	0
#define ITEM_ABOUT	1
#define ITEM_QUIT	3

#define MENU_PROJECT	1
#define ITEM_RESETTOZ	0
#define ITEM_CLOCKTYP	1
#define SUBITEM_NTSCNOND	0
#define SUBITEM_NTSCDROP	1
#define SUBITEM_PAL25FPS	2
#define SUBITEM_FILM24FP	3
#define ITEM_POSITIVE	3
#define ITEM_WAIT		4

#define ScreenInfo_Workbench	TMData->TMScreenInfo[0]

#define WindowInfo_TRANSP	TMData->TMWindowInfo[0]
#define WindowInfo_SELECTCO	TMData->TMWindowInfo[1]

#define GadgetInfo_REW	TMData->TMGadgetInfo_TRANSP[0]
#define GadgetInfo_CLOCK	TMData->TMGadgetInfo_TRANSP[1]
#define GadgetInfo_PLAY	TMData->TMGadgetInfo_TRANSP[2]
#define GadgetInfo_FF	TMData->TMGadgetInfo_TRANSP[3]
#define GadgetInfo_STOP	TMData->TMGadgetInfo_TRANSP[4]
#define GadgetInfo_STATUS	TMData->TMGadgetInfo_TRANSP[5]
#define GadgetInfo_PAUSE	TMData->TMGadgetInfo_TRANSP[6]
#define GadgetInfo_CLIST	TMData->TMGadgetInfo_SELECTCO[0]
#define GadgetInfo_NEWCON	TMData->TMGadgetInfo_SELECTCO[1]
#define GadgetInfo_SELECT	TMData->TMGadgetInfo_SELECTCO[2]
#define GadgetInfo_CANCEL	TMData->TMGadgetInfo_SELECTCO[3]

extern TMOBJECTDATA tmobjectdata_SETCONDU;
extern TMOBJECTDATA tmobjectdata_ABOUT;
extern TMOBJECTDATA tmobjectdata_QUIT;

extern TMOBJECTDATA tmobjectdata_REW;
extern TMOBJECTDATA tmobjectdata_CLOCK;
extern TMOBJECTDATA tmobjectdata_PLAY;
extern TMOBJECTDATA tmobjectdata_FF;
extern TMOBJECTDATA tmobjectdata_STOP;
extern TMOBJECTDATA tmobjectdata_STATUS;
extern TMOBJECTDATA tmobjectdata_PAUSE;
extern TMOBJECTDATA tmobjectdata_CLIST;
extern TMOBJECTDATA tmobjectdata_NEWCON;
extern TMOBJECTDATA tmobjectdata_SELECT;
extern TMOBJECTDATA tmobjectdata_CANCEL;

extern TMOBJECTDATA tmobjectdata_RESETTOZ;
extern TMOBJECTDATA tmobjectdata_CLOCKTYP;
extern TMOBJECTDATA tmobjectdata_NTSCNOND;
extern TMOBJECTDATA tmobjectdata_NTSCDROP;
extern TMOBJECTDATA tmobjectdata_PAL25FPS;
extern TMOBJECTDATA tmobjectdata_FILM24FP;
extern TMOBJECTDATA tmobjectdata_POSITIVE;
extern TMOBJECTDATA tmobjectdata_WAIT;

#define Image_REW	TMData->Images[0]
#define Image_CLOCK	TMData->Images[1]
#define Image_PLAY	TMData->Images[2]
#define Image_FF	TMData->Images[3]
#define Image_STOP	TMData->Images[4]
#define Image_PAUSE	TMData->Images[5]

#define CDTList		TMData->conductor_list
