DEFINITION MODULE MyWindow;

(**********************************************************************
***************           Written by Ed Bartz           ***************
***************           Copyright  5/21/87            ***************
***************    This program may be redistributed    ***************
***************    or modified as long as these         ***************
***************    notices and all other references     ***************
***************    to the author remain intack.         ***************
***************    Also this may not be used for        ***************
***************    profit by anyone without the         ***************
***************    express permission of the author.    ***************
**********************************************************************)

FROM Intuition  IMPORT WindowPtr, ScreenPtr, Menu, MenuItem, IntuitionText;
FROM Console   IMPORT Conport;

TYPE 
  MenuData = RECORD
     menu: ARRAY [0..5] OF Menu;
     Items: ARRAY [0..40] OF MenuItem;
     Itemtext : ARRAY [0..40] OF IntuitionText;
     Text : ARRAY [0..40],[0..80] OF CHAR;
     menuname : ARRAY [0..5],[0..80] OF CHAR;
  END;

PROCEDURE OpenLibraries () : BOOLEAN;

PROCEDURE InitScreen () : ScreenPtr;

PROCEDURE InitWindow (screen : ScreenPtr) : WindowPtr;

PROCEDURE OpenIOWin(VAR W : Conport; VAR w :WindowPtr;scn: ScreenPtr): BOOLEAN;

PROCEDURE CloseIOWin (VAR W : Conport;w :WindowPtr );

PROCEDURE InitMenu (VAR GravityWarsmenu: MenuData);

PROCEDURE SetColors (sp : ScreenPtr);

PROCEDURE ReadMenu(wp : WindowPtr): INTEGER;

PROCEDURE QueueMenu(wp : WindowPtr): BOOLEAN;

PROCEDURE ReadMouse(wp: WindowPtr;VAR x,y: CARDINAL);

END MyWindow.
