home *** CD-ROM | disk | FTP | other *** search
/ AMIGA PD 1 / AMIGA-PD-1.iso / Programme_zum_Heft / Programmieren / Kurztests / PascalPCQ / Include / Devices / Console.i < prev    next >
Text File  |  1990-08-28  |  2KB  |  113 lines

  1. {
  2.     Console.i for PCQ Pascal
  3.  
  4.     Console device command definitions.  Also see Utils/ConsoleUtils.i,
  5.     Utils/CRT.i, and Utils/ConsoleIO.i for more console.device
  6.     routines.
  7.  
  8.     To call the two routines defined below, you'll need to set
  9.     ConsoleBase to an appropriate value.  ConsoleUtils.i has a couple
  10.     of functions for doing just that.
  11. }
  12.  
  13.  
  14. {$I "Include:Exec/IO.i"}
  15. {$I "Include:Devices/InputEvent.i"}
  16.  
  17.  
  18. const
  19.  
  20. {***** Console commands *****}
  21.  
  22.      CD_ASKKEYMAP        = CMD_NONSTD + 0;
  23.      CD_SETKEYMAP        = CMD_NONSTD + 1;
  24.      CD_ASKDEFAULTKEYMAP    = CMD_NONSTD + 2;
  25.      CD_SETDEFAULTKEYMAP    = CMD_NONSTD + 3;
  26.  
  27.  
  28. {***** SGR parameters *****}
  29.  
  30.     SGR_PRIMARY        = 0;
  31.     SGR_BOLD        = 1;
  32.     SGR_ITALIC        = 3;
  33.     SGR_UNDERSCORE    = 4;
  34.     SGR_NEGATIVE    = 7;
  35.  
  36. { these names refer to the ANSI standard, not the implementation }
  37.  
  38.     SGR_BLACK        = 30;
  39.     SGR_RED        = 31;
  40.     SGR_GREEN        = 32;
  41.     SGR_YELLOW        = 33;
  42.     SGR_BLUE        = 34;
  43.     SGR_MAGENTA        = 35;
  44.     SGR_CYAN        = 36;
  45.     SGR_WHITE        = 37;
  46.     SGR_DEFAULT        = 39;
  47.  
  48.     SGR_BLACKBG        = 40;
  49.     SGR_REDBG        = 41;
  50.     SGR_GREENBG        = 42;
  51.     SGR_YELLOWBG    = 43;
  52.     SGR_BLUEBG        = 44;
  53.     SGR_MAGENTABG    = 45;
  54.     SGR_CYANBG        = 46;
  55.     SGR_WHITEBG        = 47;
  56.     SGR_DEFAULTBG    = 49;
  57.  
  58. { these names refer to the implementation, they are the preferred   }
  59. { names for use with the Amiga console device.          }
  60.  
  61.     SGR_CLR0        = 30;
  62.     SGR_CLR1        = 31;
  63.     SGR_CLR2        = 32;
  64.     SGR_CLR3        = 33;
  65.     SGR_CLR4        = 34;
  66.     SGR_CLR5        = 35;
  67.     SGR_CLR6        = 36;
  68.     SGR_CLR7        = 37;
  69.  
  70.     SGR_CLR0BG        = 40;
  71.     SGR_CLR1BG        = 41;
  72.     SGR_CLR2BG        = 42;
  73.     SGR_CLR3BG        = 43;
  74.     SGR_CLR4BG        = 44;
  75.     SGR_CLR5BG        = 45;
  76.     SGR_CLR6BG        = 46;
  77.     SGR_CLR7BG        = 47;
  78.  
  79.  
  80. {***** DSR parameters *****}
  81.  
  82.     DSR_CPR        = 6;
  83.  
  84. {***** CTC parameters *****}
  85.  
  86.     CTC_HSETTAB        = 0;
  87.     CTC_HCLRTAB        = 2;
  88.     CTC_HCLRTABSALL    = 5;
  89.  
  90. {*****     TBC parameters *****}
  91.  
  92.     TBC_HCLRTAB        = 0;
  93.     TBC_HCLRTABSALL    = 3;
  94.  
  95. {*****     SM and RM parameters *****}
  96.  
  97.     M_LNM        = 20;        { linefeed newline mode }
  98.     M_ASM        = '>1';        { auto scroll mode }
  99.     M_AWM        = '?7';        { auto wrap mode }
  100.  
  101. var
  102.     ConsoleBase : Address;
  103.  
  104. Function RawKeyConvert(event : InputEventPtr; Buffer : String;
  105.             Length : Integer; KeyMap : Address) : Integer;
  106.     External;
  107.       {    Converts a raw input key using the current keymap.  Also see
  108.     Include/Utils/DeadKeyConvert, which is more powerful and often
  109.     easier to use. }
  110.  
  111. Function CDInputHandler(events : InputEventPtr; con : Address) : InputEventPtr;
  112.     External;
  113.