1 { 2 This file is part of the Free Pascal run time library. 3 4 A file in Amiga system run time library. 5 Copyright (c) 1998 by Nils Sjoholm 6 member of the Amiga RTL development team. 7 8 See the file COPYING.FPC, included in this distribution, 9 for details about the copyright. 10 11 This program is distributed in the hope that it will be useful, 12 but WITHOUT ANY WARRANTY; without even the implied warranty of 13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 14 15 **********************************************************************} 16 17 unit conunit; 18 19 interface 20 21 uses 22 exec, console, keymap, inputevent, intuition, agraphics; 23 24 const 25 { ---- console unit numbers for OpenDevice() } 26 CONU_LIBRARY = -1; // no unit, just fill in IO_DEVICE field 27 CONU_STANDARD = 0; // standard unmapped console 28 29 { ---- New unit numbers for OpenDevice() - (V36) } 30 CONU_CHARMAP = 1; // bind character map to console 31 CONU_SNIPMAP = 3; // bind character map w/ snip to console 32 33 { ---- New flag defines for OpenDevice() - (V37) } 34 CONFLAG_DEFAULT = 0; 35 CONFLAG_NODRAW_ON_NEWSIZE = 1; 36 37 PMB_ASM = M_LNM + 1; // internal storage bit for AS flag 38 PMB_AWM = PMB_ASM + 1; // internal storage bit for AW flag 39 MAXTABS = 80; 40 41 42 type 43 {$PACKRECORDS 2} 44 PConUnit = ^TConUnit; 45 TConUnit = record 46 cu_MP: TMsgPort; 47 { ---- read only variables } 48 cu_Window: PWindow; // Intuition window bound to this unit 49 cu_XCP: SmallInt; // character position 50 cu_YCP: SmallInt; 51 cu_XMax: SmallInt; // max character position 52 cu_YMax: SmallInt; 53 cu_XRSize: SmallInt; // character raster size 54 cu_YRSize: SmallInt; 55 cu_XROrigin: SmallInt; // raster origin 56 cu_YROrigin: SmallInt; 57 cu_XRExtant: SmallInt; // raster maxima 58 cu_YRExtant: SmallInt; 59 cu_XMinShrink: SmallInt; // smallest area intact from resize process 60 cu_YMinShrink: SmallInt; 61 cu_XCCP: SmallInt; // cursor position 62 cu_YCCP: SmallInt; 63 64 { ---- read/write variables (writes must must be protected) } 65 { ---- storage for AskKeyMap and SetKeyMap } 66 cu_KeyMapStruct: TKeyMap; 67 { ---- tab stops } 68 cu_TabStops: array[0..MAXTABS - 1] of Word; // 0 at start, 0xFFFF at end of list 69 70 // ---- console rastport attributes 71 cu_Mask: ShortInt; 72 cu_FgPen: ShortInt; 73 cu_BgPen: ShortInt; 74 cu_AOLPen: ShortInt; 75 cu_DrawMode: ShortInt; 76 cu_Obsolete1: ShortInt; // was cu_AreaPtSz -- not used in V36 77 cu_Obsolete2: APTR; // was cu_AreaPtrn -- not used in V36 78 cu_Minterms: array[0..7] of Byte; // console minterms 79 cu_Font: PTextFont; 80 cu_AlgoStyle: Byte; 81 cu_TxFlags: Byte; 82 cu_TxHeight: Word; 83 cu_TxWidth: Word; 84 cu_TxBaseline: Word; 85 cu_TxSpacing: Word; 86 87 { ---- console MODES and RAW EVENTS switches } 88 cu_Modes: array[0..(PMB_AWM + 7) div 8 - 1] of Byte; // one bit per mode 89 cu_RawEvents: array[0..(IECLASS_MAX + 7) div 8 - 1] of Byte; 90 end; 91 92 implementation 93 94 end. 95