/*
 * $VER: DisplayInfo.ma 1.0 (8.11.94)
 *
 * Output Display Module Information to the Text Buffer Window
 *
 */

OPTIONS RESULTS

ADDRESS MABROADCAST

PrintText BUFFER 'Display Settings Information :'
PrintText BUFFER '------------------------------'

GETPROJECTPORT                                     /* Test if there is a loaded */
IF rc ~= 0 THEN DO                                 /* project */

  GETDISPLAYSETTINGS MODULE LOCK                   /* No : Just output the module */
  PARSE VAR RESULT MODULE LOCK                     /* and the display lock status */

  PrintText BUFFER 'Display Module :' MODULE
  PrintText BUFFER 'Display Lock Status :'LOCK

END; ELSE DO                                       /* There is a project, get all infos */
  
  GETDISPLAYSETTINGS MODULE LOCK TYPE MODE WIDTH HEIGHT DEPTH MAXDEPTH
  PARSE VAR RESULT MODULE LOCK TYPE MODE WIDTH HEIGHT DEPTH MAXDEPTH .

  PrintText BUFFER 'Display Module : 'MODULE       /* and output them */
  PrintText BUFFER 'Display Lock Status: 'LOCK
  GETDISPLAYSTRINGS 'T 'TYPE                       /* Get the string for the display type */
  PrintText BUFFER 'Display Type : 'RESULT
  IF UPPER(MODULE) = "AMIGA" THEN DO
    GETDISPLAYSTRINGS 'MODE 'MODE                  /* If Amiga module: Get the string for */
    PrintText BUFFER 'ModeID of Display: 'RESULT   /* the ModeID */
  END
  PrintText BUFFER 'Width, Height of Display: 'WIDTH', 'HEIGHT
  GETDISPLAYSETTINGS SPECIAL
  IF rc = 0 THEN DO                                /* If a special color mode is enabled */
    SPECIAL=RESULT                                 /* get the string and display it */
    GETDISPLAYSTRINGS 'SPECIAL 'SPECIAL
    PrintText BUFFER 'Color Mode: 'RESULT
  END
  PrintText BUFFER 'Depth of Display: 'DEPTH
  PrintText BUFFER 'Max Depth of Display: 'MAXDEPTH
END

PrintText BUFFER '------------------------------'
