(* TAB = 3

*******************************************************************************
*****
***** Name      : ConLibL.def                   INTERFACE MODULE
*****
***** Made by   : Bjorn Reese (C) 1991
*****
***** Interface : Jesper B. Krogholt
*****
***** Version   : 2.0
*****
***** Compiler  : M2Modula 4.0d
*****
***** Purpose   : Making IO a lot easier
*****
*******************************************************************************
*****
***** History   : 27 AUG 91   Contruct of the interface
*****              5 NOV 91   2.0 update (-- BReese --)
*****
*******************************************************************************

*)

DEFINITION MODULE ConLibL {"con.library",1};
(*$ Implementation:=FALSE *)

FROM SYSTEM			IMPORT ADDRESS, BYTE;
FROM ExecD			IMPORT MsgPortPtr;
FROM IntuitionD	IMPORT WindowPtr, IDCMPFlagSet, IntuiMessagePtr;
FROM ConUnit		IMPORT ConUnit, ConUnitPtr;

IMPORT D:ConLibD;

(* --------------- PROCEDURE DECLARATIONS  ----------------- *)

PROCEDURE OpenCon(ConWindow{8}: WindowPtr; CursorMode{0} : CARDINAL)
		: D.ConHandleType;
	CODE -30;

	(* Open a new ConWindow *)


PROCEDURE CloseCon(ConHandle{8}: D.ConHandleType);
	CODE -36;

	(* Close a specific ConWindow *)


PROCEDURE DoFormat(ConHandle{8} : D.ConHandleType; String{9}, FormatArgs{10},
		TextBuffer{11} : ADDRESS; BufferSize{0} : LONGCARD)
		: ADDRESS;
	CODE -42;

	(* Format a Text String like the RawDoFmt in Exec library but with a lot
		of nice functions *)


PROCEDURE UserNotes(ConHandle{8} : D.ConHandleType; UserText{9} : ADDRESS;
		NoteNumber{0} : CARDINAL);
	CODE -48;

	(* Define a specific user text. *)


PROCEDURE DefineChars(Mode{0} : LONGCARD; BitTable{9} : D.BitTablePtrType;
		ArraryOfChars{10} : ADDRESS);
	CODE -54;

	(* Create or modify a table of allowed characters for Accept and AcceptString *)


PROCEDURE DisplayRaw(ConHandle{8} : D.ConHandleType; String{9} : ADDRESS;
		MaxLength{0} : LONGINT);
	CODE -60;

	(* Print an unformatted text [ without DoFormat ] in ConWindow *)


PROCEDURE Display(ConHandle{8} : D.ConHandleType; String{9},
		FormatArguments{10} : ADDRESS; MaxLength{0} : LONGCARD);
	CODE -66;

	(* Print a formatted text [ with DoFormat ] in ConWindow *)


PROCEDURE Accept(ConHandle{8} : D.ConHandleType; AcceptStructure{9} :
		D.AcceptType; Flags{0}: D.AcceptFlagSet)
		: LONGINT;
	CODE -72;

	(* Get an input [ key or message ] from the console *)


PROCEDURE AcceptString(ConHandle{8} : D.ConHandleType;
		AcceptStructure{9} : D.AcceptStringType; Flags{0}: D.AcceptFlagSet)
		: LONGINT;
	CODE -78;

	(* Get a string from the console *)


PROCEDURE SetMsgHandler(ConHandle{8} : D.ConHandleType; NewMsgHandler{9} :
		ADDRESS)
		: ADDRESS;
	CODE -84;

	(* Set a new User Message Handler *)


PROCEDURE GetInfo(ConHandle{8} : D.ConHandleType;
		ConInfo{9} : D.ConInfoType)
		: D.ConInfoType;
	CODE -90;

	(* Get information about the ConWindow *)


PROCEDURE SetGfx(ConHandle{8}: D.ConHandleType;
		Styles{0}, FgCol{1}, BgCol{2} : CARDINAL);
	CODE -96;

	(* Set Text Styles, Foreground and Background Colors *)


PROCEDURE GotoXY(ConHandle{8} : D.ConHandleType; X{0}, Y{1} : CARDINAL);
	CODE -102;

	(* Place the cursor at a specific position *)


PROCEDURE Cursor(ConHandle{8} : D.ConHandleType; Mode{0} : CARDINAL);
	CODE -108;

	(* Turn Cursor ON or OFF *)


PROCEDURE Scroll(ConHandle{8} : D.ConHandleType; Step{0} : INTEGER);
	CODE -114;

	(* Scroll the text in the ConWindow a specific amount of lines *)


PROCEDURE Convert(String{9}, ResultBuffer{10} : ADDRESS; Flags{0} : LONGCARD;
		MaxLength{1} : CARDINAL)
		: ADDRESS;
	CODE -120;

	(* Convert an ASCII string to a binary value [ DEC/HEX/OCT/BIN ] *)


END ConLibL.
