summaryrefslogtreecommitdiff
path: root/packages/amunits/src/coreunits/conunit.pas
blob: cd271d1d6be295a3ea6c31891195149dccd77b51 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
{
    This file is part of the Free Pascal run time library.

    A file in Amiga system run time library.
    Copyright (c) 1998 by Nils Sjoholm
    member of the Amiga RTL development team.

    See the file COPYING.FPC, included in this distribution,
    for details about the copyright.

    This program is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

 **********************************************************************}
{
    History:

    Changed integer > smallint.
    09 Feb 2003.
}

unit conunit;

INTERFACE

uses exec, console, keymap, inputevent;

const
{ ---- console unit numbers for OpenDevice() }
 CONU_LIBRARY   = -1;      { no unit, just fill in IO_DEVICE field }
 CONU_STANDARD  = 0;       { standard unmapped console }

{ ---- New unit numbers for OpenDevice() - (V36) }

 CONU_CHARMAP   = 1;       { bind character map to console }
 CONU_SNIPMAP   = 3;       { bind character map w/ snip to console }

{ ---- New flag defines for OpenDevice() - (V37) }

 CONFLAG_DEFAULT               =  0;
 CONFLAG_NODRAW_ON_NEWSIZE     =  1;


    PMB_ASM     = M_LNM + 1;    { internal storage bit for AS flag }
    PMB_AWM     = PMB_ASM + 1;  { internal storage bit for AW flag }
    MAXTABS     = 80;


type

    pConUnit = ^tConUnit;
    tConUnit = record
        cu_MP   : tMsgPort;
        { ---- read only variables }
        cu_Window       : Pointer;      { (WindowPtr) intuition window bound to this unit }
        cu_XCP          : smallint;        { character position }
        cu_YCP          : smallint;
        cu_XMax         : smallint;        { max character position }
        cu_YMax         : smallint;
        cu_XRSize       : smallint;        { character raster size }
        cu_YRSize       : smallint;
        cu_XROrigin     : smallint;        { raster origin }
        cu_YROrigin     : smallint;
        cu_XRExtant     : smallint;        { raster maxima }
        cu_YRExtant     : smallint;
        cu_XMinShrink   : smallint;        { smallest area intact from resize process }
        cu_YMinShrink   : smallint;
        cu_XCCP         : smallint;        { cursor position }
        cu_YCCP         : smallint;

   { ---- read/write variables (writes must must be protected) }
   { ---- storage for AskKeyMap and SetKeyMap }

        cu_KeyMapStruct : tKeyMap;

   { ---- tab stops }

        cu_TabStops     : Array [0..MAXTABS-1] of Word;
                                { 0 at start, -1 at end of list }

   { ---- console rastport attributes }

        cu_Mask         : Shortint;
        cu_FgPen        : Shortint;
        cu_BgPen        : Shortint;
        cu_AOLPen       : Shortint;
        cu_DrawMode     : Shortint;
        cu_AreaPtSz     : Shortint;
        cu_AreaPtrn     : Pointer;      { cursor area pattern }
        cu_Minterms     : Array [0..7] of Byte; { console minterms }
        cu_Font         : Pointer;      { (TextFontPtr) }
        cu_AlgoStyle    : Byte;
        cu_TxFlags      : Byte;
        cu_TxHeight     : Word;
        cu_TxWidth      : Word;
        cu_TxBaseline   : Word;
        cu_TxSpacing    : Word;

   { ---- console MODES and RAW EVENTS switches }

        cu_Modes        : Array [0..(PMB_AWM+7) div 8 - 1] of Byte;
                                { one bit per mode }
        cu_RawEvents    : Array [0..(IECLASS_MAX+7) div 8 - 1] of Byte;
    end;

IMPLEMENTATION

end.