home *** CD-ROM | disk | FTP | other *** search
/ Chip 2004 February / Chip_2004-02_cd1.bin / zkuste / konfig / download / msic / Help / Int / MSI_Display.int < prev    next >
Text File  |  2003-08-26  |  8KB  |  165 lines

  1. {*******************************************************}
  2. {                                                       }
  3. {       MiTeC System Information Component              }
  4. {               Display Detection Part                  }
  5. {           version 8.3.1 for Delphi 5,6,7                }
  6. {                                                       }
  7. {       Copyright ⌐ 1997,2003 Michal Mutl               }
  8. {                                                       }
  9. {*******************************************************}
  10.  
  11. {$INCLUDE MITEC_DEF.INC}
  12.  
  13. unit MSI_Display;
  14.  
  15. interface
  16.  
  17. uses
  18.   SysUtils, Windows, Classes;
  19.  
  20. type
  21.   TDisplayInfo = record
  22.     DAC,
  23.     Chipset,
  24.     BIOS: string;
  25.     Memory: integer;
  26.   end;
  27.  
  28. const
  29.   _SHADEBLENDCAPS = 120; // Shading and blending caps
  30.   {$EXTERNALSYM _SHADEBLENDCAPS}
  31.   _COLORMGMTCAPS  = 121; // Color Management caps
  32.   {$EXTERNALSYM _COLORMGMTCAPS}
  33.  
  34.   // Shading and blending caps
  35.  
  36.   SB_NONE          = $00000000;
  37.   {$EXTERNALSYM SB_NONE}
  38.   SB_CONST_ALPHA   = $00000001;
  39.   {$EXTERNALSYM SB_CONST_ALPHA}
  40.   SB_PIXEL_ALPHA   = $00000002;
  41.   {$EXTERNALSYM SB_PIXEL_ALPHA}
  42.   SB_PREMULT_ALPHA = $00000004;
  43.   {$EXTERNALSYM SB_PREMULT_ALPHA}
  44.  
  45.   SB_GRAD_RECT = $00000010;
  46.   {$EXTERNALSYM SB_GRAD_RECT}
  47.   SB_GRAD_TRI  = $00000020;
  48.   {$EXTERNALSYM SB_GRAD_TRI}
  49.  
  50. // Color Management caps
  51.  
  52.   CM_NONE       = $00000000;
  53.   {$EXTERNALSYM CM_NONE}
  54.   CM_DEVICE_ICM = $00000001;
  55.   {$EXTERNALSYM CM_DEVICE_ICM}
  56.   CM_GAMMA_RAMP = $00000002;
  57.   {$EXTERNALSYM CM_GAMMA_RAMP}
  58.   CM_CMYK_COLOR = $00000004;
  59.   {$EXTERNALSYM CM_CMYK_COLOR}
  60.  
  61. type
  62.   TCurveCap = (ccCircles,ccPieWedges,ccChords,ccEllipses,ccWideBorders,ccStyledBorders,
  63.                ccWideStyledBorders,ccInteriors,ccRoundedRects);
  64.   TLineCap = (lcPolylines,lcMarkers,lcMultipleMarkers,lcWideLines,lcStyledLines,
  65.                lcWideStyledLines,lcInteriors);
  66.   TPolygonCap = (pcAltFillPolygons,pcRectangles,pcWindingFillPolygons,pcSingleScanlines,
  67.                  pcWideBorders,pcStyledBorders,pcWideStyledBorders,pcInteriors);
  68.   TRasterCap = (rcRequiresBanding,rcTransferBitmaps,rcBitmaps64K,rcSetGetDIBits,
  69.                 rcSetDIBitsToDevice,rcFloodfills,rcWindows2xFeatures,rcPaletteBased,
  70.                 rcScaling,rcStretchBlt,rcStretchDIBits);
  71.   TTextCap = (tcCharOutPrec,tcStrokeOutPrec,tcStrokeClipPrec,tcCharRotation90,
  72.               tcCharRotationAny,tcScaleIndependent,tcDoubledCharScaling,tcIntMultiScaling,
  73.               tcAnyMultiExactScaling,tcDoubleWeightChars,tcItalics,tcUnderlines,
  74.               tcStrikeouts,tcRasterFonts,tcVectorFonts,tcNoScrollUsingBlts);
  75.  
  76.   TShadeBlendCap = (sbcConstAlpha,sbcGradRect,sbcGradTri, sbcPixelAlpha,sbcPremultAlpha);
  77.  
  78.   TColorMgmtCap = (cmcCMYKColor, cmcDeviceICM, cmcGammaRamp);
  79.  
  80.   TCurveCaps = set of TCurveCap;
  81.   TLineCaps = set of TLineCap;
  82.   TPolygonCaps = set of TPolygonCap;
  83.   TRasterCaps = set of TRasterCap;
  84.   TTextCaps = set of TTextCap;
  85.   TShadeBlendCaps = set of TShadeBlendCap;
  86.   TColorMgmtCaps = set of TColorMgmtCap;
  87.  
  88.   TDisplay = class(TPersistent)
  89.   private
  90.     FVertRes: integer;
  91.     FColorDepth: integer;
  92.     FHorzRes: integer;
  93.     FBIOSDate: string;
  94.     FBIOSVersion: string;
  95.     FPixelDiagonal: integer;
  96.     FPixelHeight: integer;
  97.     FVertSize: integer;
  98.     FPixelWidth: integer;
  99.     FHorzSize: integer;
  100.     FTechnology: string;
  101.     FCurveCaps: TCurveCaps;
  102.     FLineCaps: TLineCaps;
  103.     FPolygonCaps: TPolygonCaps;
  104.     FRasterCaps: TRasterCaps;
  105.     FTextCaps: TTextCaps;
  106.     FMemory: integer;
  107.     FChipset: string;
  108.     FAdapter: string;
  109.     FDAC: string;
  110.     FModes: TStrings;
  111.     FFontSize: DWORD;
  112.     FVideoService, FVideoDriver, FVideoDevPar: string;
  113.     FVRR: DWORD;
  114.     FBIOSString: string;
  115.     FDDV: integer;
  116.     FShadeBlendCaps: TShadeBlendCaps;
  117.     FColorMgmtCaps: TColorMgmtCaps;
  118.   public
  119.     constructor Create;
  120.     destructor Destroy; override;
  121.     procedure GetInfo;
  122.     procedure Report(var sl :TStringList; Standalone: Boolean = True); virtual;
  123.   published
  124.     property Adapter :string read FAdapter {$IFNDEF D6PLUS} write FAdapter {$ENDIF} stored false;
  125.     property DAC :string read FDAC {$IFNDEF D6PLUS} write FDAC {$ENDIF} stored false;
  126.     property Chipset :string read FChipset {$IFNDEF D6PLUS} write FChipset {$ENDIF} stored false;
  127.     property Memory :Integer read FMemory {$IFNDEF D6PLUS} write FMemory {$ENDIF} stored false;
  128.     property HorzRes :integer read FHorzRes {$IFNDEF D6PLUS} write FHorzRes {$ENDIF} stored false;
  129.     property VertRes :integer read FVertRes {$IFNDEF D6PLUS} write FVertRes {$ENDIF} stored false;
  130.     property HorzSize :integer read FHorzSize {$IFNDEF D6PLUS} write FHorzSize {$ENDIF} stored false;
  131.     property VertSize :integer read FVertSize {$IFNDEF D6PLUS} write FVertSize {$ENDIF} stored false;
  132.     property ColorDepth :integer read FColorDepth {$IFNDEF D6PLUS} write FColorDepth {$ENDIF} stored false;
  133.     property DeviceDriverVersion :integer read FDDV {$IFNDEF D6PLUS} write FDDV {$ENDIF} stored false;
  134.     // BIOS info is available only under NT
  135.     property BIOSVersion :string read FBIOSVersion {$IFNDEF D6PLUS} write FBIOSVersion {$ENDIF} stored false;
  136.     property BIOSDate :string read FBIOSDate {$IFNDEF D6PLUS} write FBIOSDate {$ENDIF} stored false;
  137.     property BIOSString :string read FBIOSString {$IFNDEF D6PLUS} write FBIOSString {$ENDIF} stored false;
  138.  
  139.     property Technology :string read FTechnology {$IFNDEF D6PLUS} write FTechnology {$ENDIF} stored false;
  140.     property PixelWidth :integer read FPixelWidth {$IFNDEF D6PLUS} write FPixelWidth {$ENDIF} stored false;
  141.     property PixelHeight :integer read FPixelHeight {$IFNDEF D6PLUS} write FPixelHeight {$ENDIF} stored false;
  142.     property PixelDiagonal :integer read FPixelDiagonal {$IFNDEF D6PLUS} write FPixelDiagonal {$ENDIF} stored false;
  143.     property RasterCaps :TRasterCaps read FRasterCaps {$IFNDEF D6PLUS} write FRasterCaps {$ENDIF} stored false;
  144.     property CurveCaps :TCurveCaps read FCurveCaps {$IFNDEF D6PLUS} write FCurveCaps {$ENDIF} stored false;
  145.     property LineCaps :TLineCaps read FLineCaps {$IFNDEF D6PLUS} write FLineCaps {$ENDIF} stored false;
  146.     property PolygonCaps :TPolygonCaps read FPolygonCaps {$IFNDEF D6PLUS} write FPolygonCaps {$ENDIF} stored false;
  147.     property TextCaps :TTextCaps read FTextCaps {$IFNDEF D6PLUS} write FTextCaps {$ENDIF} stored false;
  148.     property ShadeBlendCaps :TShadeBlendCaps read FShadeBlendCaps {$IFNDEF D6PLUS} write FShadeBlendCaps {$ENDIF} stored false;
  149.     property ColorMgmtCaps :TColorMgmtCaps read FColorMgmtCaps {$IFNDEF D6PLUS} write FColorMgmtCaps {$ENDIF} stored false;
  150.     property Modes :TStrings read FModes {$IFNDEF D6PLUS} write FModes {$ENDIF} stored False;
  151.     property FontResolution: DWORD read FFontSize {$IFNDEF D6PLUS} write FFontSize {$ENDIF} stored False;
  152.     property VerticalRefreshRate: DWORD read FVRR {$IFNDEF D6PLUS} write FVRR {$ENDIF} stored False;
  153.   end;
  154.  
  155. procedure GetCurveCapsStr(CurveCaps :TCurveCaps; ACaps :TStringList);
  156. procedure GetLineCapsStr(LineCaps :TLineCaps; ACaps :TStringList);
  157. procedure GetPolygonCapsStr(PolygonCaps :TPolygonCaps; ACaps :TStringList);
  158. procedure GetRasterCapsStr(RasterCaps :TRasterCaps; ACaps :TStringList);
  159. procedure GetTextCapsStr(TextCaps :TTextCaps; ACaps :TStringList);
  160. procedure GetShadeBlendCapsStr(ShadeBlendCaps :TShadeBlendCaps; ACaps :TStringList);
  161. procedure GetColorMgmtCapsStr(ColorMgmtCaps :TColorMgmtCaps; ACaps :TStringList);
  162.  
  163. implementation
  164.  
  165.