conunit.pas 3.2 KB

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