(*****************************************
 * Name : Intuition.DEF                  *
 * Purpose : interface to intuition      *
 * Author : JSG                          *
 *****************************************)

DEFINITION MODULE Intuition;

FROM SYSTEM IMPORT ADDRESS,BYTE;

CONST CLOSEWINDOW   =    512D;
      WINDOWCLOSE   =      8D;
      ACTIVATE      =   4096D;
      WINDOWDRAG    =      2D;
      WINDOWDEPTH   =      4D;
      WINDOWSIZING  =      1D;
      BORDERLESS    =   2048D;
      BACKDROP      =    256D;
      NOCAREREFRESH = 131072D;
      CUSTOMSCREEN  =     0FH;
      WBSCREEN      =     01H;
      HIRES         =   8000H;
      INTERLACE     =     04H;

TYPE NewWindow = RECORD
                   leftEdge,
                   topEdge,
                   width,
                   height: CARDINAL;
                   detailPen,
                   blockPen: BYTE;
                   IDCMPFlags,
                   flags: LONGINT;
                   firstGadget,
                   checkMark: LONGINT;
                   title,
                   screen,
                   bitMap: ADDRESS;
                   minWidth,
                   minHeight,
                   maxWidth,
                   maxHeight: CARDINAL;
                   type: CARDINAL;
                 END;

    NewScreen = RECORD
                  leftEdge,
                  topEdge,
                  width,
                  height,
                  depth: CARDINAL;
                  detailPen,
                  blockPen: BYTE;
                  viewModes,
                  type: CARDINAL;
                  font,
                  title,
                  gadget,
                  bitMap: ADDRESS;
                END;

    MsgPort = RECORD
                mpNode: ARRAY[0..13] OF BYTE;
                mpFlags,
                mpSigBit: BYTE;
                mpSigTask : ADDRESS;
                mpMsgList: ARRAY[0..13] OF BYTE;
              END;

    Window = RECORD
               NextWindow : ADDRESS;
               LeftEdge,TopEdge,Width,Height : CARDINAL;
               MouseY,MouseX : CARDINAL;
               minWidth,minHeight,maxWidth,maxHeight : CARDINAL;
               Flags : LONGINT;
               MenuStrip : ADDRESS;
               Title : ADDRESS;
               FirstRequest,
               DMRequest : ADDRESS;
               ReqCount : CARDINAL;
               WScreen  : ADDRESS;
               Rport    : ADDRESS;
               BorderLeft,BorderRight,
               BorderTop,BorderBottom : BYTE;
               BorderRport : ADDRESS;
               FirstGadget : ADDRESS;
               Parent,Descendent : ADDRESS;
               Pointer : ADDRESS;
               PtrHeight,PtrWidth : BYTE;
               XoffSet,Yoffset : BYTE;
               IDCMPflags  : LONGINT;
               UserPort,WindowPort : ADDRESS;
               MessageKey : ADDRESS;
               DetailPen,BlockPen : BYTE;
               CheckMark : ADDRESS;
               ScreenTitle : ADDRESS;
               GZZMouseX,GZZMouseY,
               GZZWidth,GZZHeight : CARDINAL;
               ExtData,UserData : ADDRESS;
             END; (* Window RECORD *)


    WindowPtr = POINTER TO Window;

PROCEDURE OpenWindow(VAR nw: NewWindow): WindowPtr;
PROCEDURE CloseWindow(w: WindowPtr);
PROCEDURE OpenScreen(VAR ns: NewScreen): LONGINT;
PROCEDURE CloseScreen(s: LONGINT);
PROCEDURE ViewPortAddress(w: WindowPtr): ADDRESS;
PROCEDURE ShowTitle(scrn:LONGINT;OnOff:BOOLEAN);

END Intuition.





        
