conunit.pas 2.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394
  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. unit conunit;
  13. interface
  14. uses
  15. exec, console, keymap, inputevent, intuition, agraphics;
  16. const
  17. { ---- console unit numbers for OpenDevice() }
  18. CONU_LIBRARY = -1; // no unit, just fill in IO_DEVICE field
  19. CONU_STANDARD = 0; // standard unmapped console
  20. { ---- New unit numbers for OpenDevice() - (V36) }
  21. CONU_CHARMAP = 1; // bind character map to console
  22. CONU_SNIPMAP = 3; // bind character map w/ snip to console
  23. { ---- New flag defines for OpenDevice() - (V37) }
  24. CONFLAG_DEFAULT = 0;
  25. CONFLAG_NODRAW_ON_NEWSIZE = 1;
  26. PMB_ASM = M_LNM + 1; // internal storage bit for AS flag
  27. PMB_AWM = PMB_ASM + 1; // internal storage bit for AW flag
  28. MAXTABS = 80;
  29. type
  30. {$PACKRECORDS 2}
  31. PConUnit = ^TConUnit;
  32. TConUnit = record
  33. cu_MP: TMsgPort;
  34. { ---- read only variables }
  35. cu_Window: PWindow; // Intuition window bound to this unit
  36. cu_XCP: SmallInt; // character position
  37. cu_YCP: SmallInt;
  38. cu_XMax: SmallInt; // max character position
  39. cu_YMax: SmallInt;
  40. cu_XRSize: SmallInt; // character raster size
  41. cu_YRSize: SmallInt;
  42. cu_XROrigin: SmallInt; // raster origin
  43. cu_YROrigin: SmallInt;
  44. cu_XRExtant: SmallInt; // raster maxima
  45. cu_YRExtant: SmallInt;
  46. cu_XMinShrink: SmallInt; // smallest area intact from resize process
  47. cu_YMinShrink: SmallInt;
  48. cu_XCCP: SmallInt; // cursor position
  49. cu_YCCP: SmallInt;
  50. { ---- read/write variables (writes must must be protected) }
  51. { ---- storage for AskKeyMap and SetKeyMap }
  52. cu_KeyMapStruct: TKeyMap;
  53. { ---- tab stops }
  54. cu_TabStops: array[0..MAXTABS - 1] of Word; // 0 at start, 0xFFFF at end of list
  55. // ---- console rastport attributes
  56. cu_Mask: ShortInt;
  57. cu_FgPen: ShortInt;
  58. cu_BgPen: ShortInt;
  59. cu_AOLPen: ShortInt;
  60. cu_DrawMode: ShortInt;
  61. cu_Obsolete1: ShortInt; // was cu_AreaPtSz -- not used in V36
  62. cu_Obsolete2: APTR; // was cu_AreaPtrn -- not used in V36
  63. cu_Minterms: array[0..7] of Byte; // console minterms
  64. cu_Font: PTextFont;
  65. cu_AlgoStyle: Byte;
  66. cu_TxFlags: Byte;
  67. cu_TxHeight: Word;
  68. cu_TxWidth: Word;
  69. cu_TxBaseline: Word;
  70. cu_TxSpacing: Word;
  71. { ---- console MODES and RAW EVENTS switches }
  72. cu_Modes: array[0..(PMB_AWM + 7) div 8 - 1] of Byte; // one bit per mode
  73. cu_RawEvents: array[0..(IECLASS_MAX + 7) div 8 - 1] of Byte;
  74. end;
  75. implementation
  76. end.