home *** CD-ROM | disk | FTP | other *** search
/ Amiga ISO Collection / AmigaUtilCD2.iso / Programming / Misc / M2V11-1.LHA / modula / amiga / ConUnit.def < prev    next >
Encoding:
Text File  |  1993-11-01  |  2.7 KB  |  85 lines

  1. DEFINITION FOR C MODULE ConUnit ;
  2.  
  3. FROM SYSTEM    IMPORT ADDRESS, SHORTSET ;
  4. FROM Console    IMPORT M_LNM ;
  5. FROM Exec    IMPORT MsgPort ;
  6. FROM InputEvent IMPORT IECLASS_MAX ;
  7. FROM KeyMap    IMPORT KeyMap ;
  8. FROM Intuition    IMPORT WindowPtr ;
  9. FROM Graphics    IMPORT TextFontPtr ;
  10.  
  11. CONST
  12. (* ----    console unit numbers for OpenDevice() *)
  13.   CONU_LIBRARY    = -1 ;    (* no unit, just fill in IO_DEVICE field *)
  14.   CONU_STANDARD    =  0 ;    (* standard unmapped console         *)
  15.  
  16. (* ---- New unit numbers for OpenDevice() - (V36) *)
  17.  
  18.   CONU_CHARMAP = 1 ; (* bind character map to console          *)
  19.   CONU_SNIPMAP = 3 ; (* bind character map w/ snip to console *)
  20.  
  21. (* ---- New flag defines for OpenDevice() - (V37) *)
  22.  
  23.   CONFLAG_DEFAULT = 0 ;
  24.   CONFLAG_NODRAW_ON_NEWSIZE = 1 ;
  25.  
  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.  
  30.  
  31. TYPE
  32.   ConUnit = RECORD
  33.     cu_MP      : MsgPort ;
  34.     (* ---- read only variables *)
  35.     cu_Window      : WindowPtr ;    (* intuition window bound to this unit *)
  36.  
  37.     cu_XCP      : INTEGER ; (* character position *)
  38.     cu_YCP      : INTEGER ;
  39.     cu_XMax      : INTEGER ; (* max character position *)
  40.     cu_YMax      : INTEGER ;
  41.     cu_XRSize      : INTEGER ; (* character raster size *)
  42.     cu_YRSize      : INTEGER ;
  43.     cu_XROrigin   : INTEGER ; (* raster origin *)
  44.     cu_YROrigin   : INTEGER ;
  45.     cu_XRExtant   : INTEGER ; (* raster maxima *)
  46.     cu_YRExtant   : INTEGER ;
  47.     cu_XMinShrink : INTEGER ; (* smallest area intact from resize process *)
  48.     cu_YMinShrink : INTEGER ;
  49.     cu_XCCP      : INTEGER ; (* cursor position *)
  50.     cu_YCCP      : INTEGER ;
  51.  
  52.     (* ---- read/write variables (writes must must be protected) *)
  53.     (* ---- storage for AskKeyMap and SetKeyMap *)
  54.  
  55.     cu_KeyMapStruct : KeyMap ;
  56.  
  57.     (* ---- tab stops *)
  58.  
  59.     cu_TabStops   : ARRAY [0..MAXTABS-1] OF CARDINAL ;
  60.                 (* 0 at start, 0FFFF at end of list *)
  61.  
  62.     (* ---- console rastport attributes *)
  63.     cu_Mask       : SHORTINT ;
  64.     cu_FgPen      : SHORTINT ;
  65.     cu_BgPen      : SHORTINT ;
  66.     cu_AOLPen     : SHORTINT ;
  67.     cu_DrawMode   : SHORTSET ;
  68.     cu_Obsolete1  : SHORTINT ; (* was cu_AreaPtSz -- not used in V36 *)
  69.     cu_Obsolete2  : ADDRESS  ; (* was cu_AreaPtrn -- not used in V36 *)
  70.     cu_Minterms   : ARRAY [0..7] OF SHORTINT ;    (* console minterms *)
  71.     cu_Font      : TextFontPtr ;
  72.     cu_AlgoStyle  : SHORTINT ;
  73.     cu_TxFlags    : SHORTSET ;
  74.     cu_TxHeight   : CARDINAL ;
  75.     cu_TxWidth    : CARDINAL ;
  76.     cu_TxBaseline : CARDINAL ;
  77.     cu_TxSpacing  : CARDINAL ;
  78.  
  79.     (* ---- console MODES and RAW EVENTS switches *)
  80.     cu_Modes      : ARRAY [0..((PMB_AWM+7)/8)-1] OF SHORTSET ;(* 1bit per mode*)
  81.     cu_RawEvents  : ARRAY [0..((IECLASS_MAX+8)/8)-1] OF SHORTCARD  ;
  82.   END ;
  83.  
  84. END ConUnit.
  85.