(* TAB = 3 ******************************************************************************* ***** ***** Name : ConLibD.def INTERFACE MODULE ***** ***** Made by : Bjorn Reese (C) 1991 ***** ***** Interface : Jesper B. Krogholt ***** ***** Version : 2.0 ***** ***** Compiler : M2Make 4.0d ***** ***** Purpose : Making IO a lot easier ***** ******************************************************************************* ***** ***** History : 19 JUN 91 Contruct of the interface ***** 27 AUG 91 Update to new version (still pre-version) ***** 5 NOV 91 2.0 update (-- BReese --) ***** ******************************************************************************* *) DEFINITION MODULE ConLibD; (*$ Implementation:=FALSE *) FROM SYSTEM IMPORT ADDRESS, BYTE; FROM ExecD IMPORT MsgPortPtr, Library; FROM IntuitionD IMPORT WindowPtr, IDCMPFlagSet, IntuiMessagePtr; FROM ConUnit IMPORT ConUnit, ConUnitPtr; FROM InputEvent IMPORT QualifierSet; CONST CHARDEFSIZE = 32; IGNOREVALUE = FFFFH; TYPE BitTableType = ARRAY [1..CHARDEFSIZE] OF CHAR; BitTablePtrType = POINTER TO BitTableType; ConHandleType = POINTER TO cnh; (* Conhandle *) AcceptType = POINTER TO acc; (* Accept structure *) AcceptStringType = POINTER TO accs; (* Accept string structure *) ConInfoType = POINTER TO cin; (* ConInfo structure *) (* --------------------- ConBase ----------------- *) con = RECORD LibNode : Library; (* Library Node Record *) SegList : ADDRESS; (* Segment List [From LoadSeg()] *) IntBase : ADDRESS; (* IntuitionBase *) MathBase : ADDRESS; (* MathFFP Base *) END; (* --------------------- ConHandle ----------------- *) cnh = RECORD CDBase : ADDRESS; (* Base of Console Device *) Window : WindowPtr; (* Our Intuition Window *) UserPort : MsgPortPtr; (* UserPort for Window *) Unit : ConUnitPtr; (* ConUnit *) WriteIO : ADDRESS; (* Our Write IO Port *) Signal : LONGCARD; (* SignalSet [for Wait()] *) ExLength : CARDINAL; (* Extra space for string format *) CursorStatus : CARDINAL; (* Current Cursor Status [on|off] *) PadSpace : CHAR; (* Char for Leading Spaces *) PadZero : CHAR; (* Char for Leading Zeros *) PadGroup : CHAR; (* Char for Group Classifying *) PadString : CHAR; (* Char for Unused String pos. *) DecimalPoint  : CHAR; (* Char for Decimal Point *) FloatE : CHAR; (* Char for Floaint Point Expo. *) EchoTable : BitTableType;(* Echo chars *) UserNotes : ARRAY [0..7] OF ADDRESS; (* User note defin. *) MsgHandler : ADDRESS; (* Pointer to User Message Handler *) Reserved : ARRAY [0..3] OF LONGCARD; (* FUTURE USE *) END; (* --------------------- ConInfo ----------------- *) cin = RECORD XPos : CARDINAL; (* Cursor X Position *) YPos : CARDINAL; (* Cursor Y Position *) XSize : CARDINAL; (* Chars per Line *) YSize : CARDINAL; (* Lines in Window *) Styles : CARDINAL; (* Text styles *) FgCol : CARDINAL; (* Foreground color *) BgCol : CARDINAL; (* Background color *) Reserved : ARRAY [0..3] OF LONGCARD; (* FUTURE USE *) END; (* --------------------- AcceptStructure ----------------- *) acc = RECORD XStart : CARDINAL; (* Start X position *) YStart : CARDINAL; (* Start Y position *) Styles : CARDINAL; (* Text style *) FgCol : CARDINAL; (* Foreground color *) BgCol : CARDINAL; (* Background color *) ExitFlags : IDCMPFlagSet; (* IDCMP Exit Flags *) Class : IDCMPFlagSet; (* Copy of im_Class *) Code : CARDINAL; (* Copy of im_Code *) Qualifier : QualifierSet; (* Copy of im_Qualifier *) IAddress : ADDRESS; (* Copy of im_IAdress *) MouseX : INTEGER; (* Copy of im_MouseX *) MouseY : INTEGER; (* Copy of im_MouseY *) Seconds : LONGCARD; (* Copy of im_Seconds *) Micros : LONGCARD; (* Copy of im_Micros *) IDCMPWindow : WindowPtr; (* Copy of im_IDCMPWindow *) Char : CHAR; (* ASCII char *) Pad001 : BYTE; (* Nothing serious *) ValidTable : BitTableType; (* BitTable of Valid Chars *) ExitTable : BitTableType; (* BitTable of Exit Chars *) Reserved : ARRAY [0..3] OF LONGCARD; (* FUTURE USE *) END; (* ---------------Extended AcceptStructure ----------------- *) accs = RECORD (* EQUAL TO ACC RECORD *) XStart : CARDINAL; (* Start X position *) YStart : CARDINAL; (* Start Y position *) Styles : CARDINAL; (* Text style *) FgCol : CARDINAL; (* Foreground color *) BgCol : CARDINAL; (* Background color *) ExitFlags : IDCMPFlagSet; (* IDCMP Exit Flags *) Class : IDCMPFlagSet; (* Copy of im_Class *) Code : CARDINAL; (* Copy of im_Code *) Qualifier : QualifierSet; (* Copy of im_Qualifier *) IAddress : ADDRESS; (* Copy of im_IAdress *) MouseX : INTEGER; (* Copy of im_MouseX *) MouseY : INTEGER; (* Copy of im_MouseY *) Seconds : LONGCARD; (* Copy of im_Seconds *) Micros : LONGCARD; (* Copy of im_Micros *) IDCMPWindow : WindowPtr; (* Copy of im_IDCMPWindow *) Char : CHAR; (* ASCII char *) Pad001 : BYTE; (* Nothing serious *) ValidTable : BitTableType; (* BitTable of Valid Chars *) ExitTable : BitTableType; (* BitTable of Exit Chars *) Reserved : ARRAY [0..3] OF LONGCARD; (* FUTURE USE *) (* EXTENDED ACCEPT STRING RECORD *) InputBuffer : ADDRESS; (* Pointer to Input Buffer *) WorkBuffer : ADDRESS; (* Pointer to Work Buffer *) MaxLength : CARDINAL; (* Maximum Length of Text [incl. NULL] *) FieldLen : CARDINAL; (* Length of Input Field [incl. NULL] *) Length : CARDINAL; (* Current Length of Text [excl. NULL] *) Position : CARDINAL; (* Current Position in Text *) DispPos : CARDINAL; (* First displayed pos. in Text *) Reserved2 : ARRAY [0..1] OF LONGCARD; (* FUTURE USE *) END; TYPE (* --------------- Accept Flags ----------------- *) AcceptFlags = (b0,b1,b2,b3,b4,b5,b6,b7,b8,b9,b10,b11,b12,b13,b14, NOSCROLL,NOSTDAMIGA,NOAMIGA,FULLSTOP,LASTEXIT,OVERWRITE, CONTINUE,JUSTIFIED,b23,WAIT,ECHO,UPKEY,DUALKEY,RAWKEY, b29,b30,ERASE); AcceptFlagSet = SET OF AcceptFlags; (* --------------- Codes for Convert() ----------------- *) ConvertCodes = (DECIMAL,HEX,OCTAL,BINARY); ConvertCodeSet = SET OF ConvertCodes; CONST (* --------------- DefineChar() Values ----------------- *) DEFMODEALL = 0000H; DEFMODENEW = 0001H; DEFMODEADD = 0002H; DEFMODEREM = 0003H; DEFMODEGET = 0004H; DEFALL = 00000000H; DEFNONE = 00020000H; DEFALFANUM = 00040000H; DEFALFA = 00060000H; DEFNUMERIC = 00080000H; DEFDECIMAL = 000A0000H; DEFHEX = 000C0000H; DEFOCTAL = 000E0000H; DEFBINARY = 00100000H; DEFFLOAT = 00120000H; (* --------------- Cursor Types ----------------- *) CURSOROFF = 0; CURSORON = 1; (* --------------- SetGfx Styles ---------------- *) SGFPLAIN = 0001H; SGFBOLD = 0002H; SGFITALIC = 0004H; SGFUNDERLINED = 0008H; (* --------------- Convert Modes ----------------- *) CNVDECIMAL = 1; CNVHEX = 2; CNVOCTAL = 3; CNVBINARY = 4; CNVSIGNED = 00010000H; CNVLEADSPACE = 00020000H; (* --------------- Codes for Special Keys ----------------- *) AKEYNONE = 0; AKEYHELP = 5; AKEYBS = 8; AKEYTAB = 9; AKEYLF = 10; AKEYRETURN = 13; AKEYARROWRG = 17; AKEYARROWLF = 18; AKEYARROWUP = 19; AKEYARROWDN = 20; AKEYESC = 27; AKEYDEL = 127; AKEYF1 = 129; AKEYF2 = 130; AKEYF3 = 131; AKEYF4 = 132; AKEYF5 = 133; AKEYF6 = 134; AKEYF7 = 135; AKEYF8 = 136; AKEYF9 = 137; AKEYF10 = 138; AKEYCSI = 155; END ConLibD.