home *** CD-ROM | disk | FTP | other *** search
- {*******************************************************}
- { }
- { MiTeC System Information Component }
- { Display Detection Part }
- { version 8.3.1 for Delphi 5,6,7 }
- { }
- { Copyright ⌐ 1997,2003 Michal Mutl }
- { }
- {*******************************************************}
-
- {$INCLUDE MITEC_DEF.INC}
-
- unit MSI_Display;
-
- interface
-
- uses
- SysUtils, Windows, Classes;
-
- type
- TDisplayInfo = record
- DAC,
- Chipset,
- BIOS: string;
- Memory: integer;
- end;
-
- const
- _SHADEBLENDCAPS = 120; // Shading and blending caps
- {$EXTERNALSYM _SHADEBLENDCAPS}
- _COLORMGMTCAPS = 121; // Color Management caps
- {$EXTERNALSYM _COLORMGMTCAPS}
-
- // Shading and blending caps
-
- SB_NONE = $00000000;
- {$EXTERNALSYM SB_NONE}
- SB_CONST_ALPHA = $00000001;
- {$EXTERNALSYM SB_CONST_ALPHA}
- SB_PIXEL_ALPHA = $00000002;
- {$EXTERNALSYM SB_PIXEL_ALPHA}
- SB_PREMULT_ALPHA = $00000004;
- {$EXTERNALSYM SB_PREMULT_ALPHA}
-
- SB_GRAD_RECT = $00000010;
- {$EXTERNALSYM SB_GRAD_RECT}
- SB_GRAD_TRI = $00000020;
- {$EXTERNALSYM SB_GRAD_TRI}
-
- // Color Management caps
-
- CM_NONE = $00000000;
- {$EXTERNALSYM CM_NONE}
- CM_DEVICE_ICM = $00000001;
- {$EXTERNALSYM CM_DEVICE_ICM}
- CM_GAMMA_RAMP = $00000002;
- {$EXTERNALSYM CM_GAMMA_RAMP}
- CM_CMYK_COLOR = $00000004;
- {$EXTERNALSYM CM_CMYK_COLOR}
-
- type
- TCurveCap = (ccCircles,ccPieWedges,ccChords,ccEllipses,ccWideBorders,ccStyledBorders,
- ccWideStyledBorders,ccInteriors,ccRoundedRects);
- TLineCap = (lcPolylines,lcMarkers,lcMultipleMarkers,lcWideLines,lcStyledLines,
- lcWideStyledLines,lcInteriors);
- TPolygonCap = (pcAltFillPolygons,pcRectangles,pcWindingFillPolygons,pcSingleScanlines,
- pcWideBorders,pcStyledBorders,pcWideStyledBorders,pcInteriors);
- TRasterCap = (rcRequiresBanding,rcTransferBitmaps,rcBitmaps64K,rcSetGetDIBits,
- rcSetDIBitsToDevice,rcFloodfills,rcWindows2xFeatures,rcPaletteBased,
- rcScaling,rcStretchBlt,rcStretchDIBits);
- TTextCap = (tcCharOutPrec,tcStrokeOutPrec,tcStrokeClipPrec,tcCharRotation90,
- tcCharRotationAny,tcScaleIndependent,tcDoubledCharScaling,tcIntMultiScaling,
- tcAnyMultiExactScaling,tcDoubleWeightChars,tcItalics,tcUnderlines,
- tcStrikeouts,tcRasterFonts,tcVectorFonts,tcNoScrollUsingBlts);
-
- TShadeBlendCap = (sbcConstAlpha,sbcGradRect,sbcGradTri, sbcPixelAlpha,sbcPremultAlpha);
-
- TColorMgmtCap = (cmcCMYKColor, cmcDeviceICM, cmcGammaRamp);
-
- TCurveCaps = set of TCurveCap;
- TLineCaps = set of TLineCap;
- TPolygonCaps = set of TPolygonCap;
- TRasterCaps = set of TRasterCap;
- TTextCaps = set of TTextCap;
- TShadeBlendCaps = set of TShadeBlendCap;
- TColorMgmtCaps = set of TColorMgmtCap;
-
- TDisplay = class(TPersistent)
- private
- FVertRes: integer;
- FColorDepth: integer;
- FHorzRes: integer;
- FBIOSDate: string;
- FBIOSVersion: string;
- FPixelDiagonal: integer;
- FPixelHeight: integer;
- FVertSize: integer;
- FPixelWidth: integer;
- FHorzSize: integer;
- FTechnology: string;
- FCurveCaps: TCurveCaps;
- FLineCaps: TLineCaps;
- FPolygonCaps: TPolygonCaps;
- FRasterCaps: TRasterCaps;
- FTextCaps: TTextCaps;
- FMemory: integer;
- FChipset: string;
- FAdapter: string;
- FDAC: string;
- FModes: TStrings;
- FFontSize: DWORD;
- FVideoService, FVideoDriver, FVideoDevPar: string;
- FVRR: DWORD;
- FBIOSString: string;
- FDDV: integer;
- FShadeBlendCaps: TShadeBlendCaps;
- FColorMgmtCaps: TColorMgmtCaps;
- public
- constructor Create;
- destructor Destroy; override;
- procedure GetInfo;
- procedure Report(var sl :TStringList; Standalone: Boolean = True); virtual;
- published
- property Adapter :string read FAdapter {$IFNDEF D6PLUS} write FAdapter {$ENDIF} stored false;
- property DAC :string read FDAC {$IFNDEF D6PLUS} write FDAC {$ENDIF} stored false;
- property Chipset :string read FChipset {$IFNDEF D6PLUS} write FChipset {$ENDIF} stored false;
- property Memory :Integer read FMemory {$IFNDEF D6PLUS} write FMemory {$ENDIF} stored false;
- property HorzRes :integer read FHorzRes {$IFNDEF D6PLUS} write FHorzRes {$ENDIF} stored false;
- property VertRes :integer read FVertRes {$IFNDEF D6PLUS} write FVertRes {$ENDIF} stored false;
- property HorzSize :integer read FHorzSize {$IFNDEF D6PLUS} write FHorzSize {$ENDIF} stored false;
- property VertSize :integer read FVertSize {$IFNDEF D6PLUS} write FVertSize {$ENDIF} stored false;
- property ColorDepth :integer read FColorDepth {$IFNDEF D6PLUS} write FColorDepth {$ENDIF} stored false;
- property DeviceDriverVersion :integer read FDDV {$IFNDEF D6PLUS} write FDDV {$ENDIF} stored false;
- // BIOS info is available only under NT
- property BIOSVersion :string read FBIOSVersion {$IFNDEF D6PLUS} write FBIOSVersion {$ENDIF} stored false;
- property BIOSDate :string read FBIOSDate {$IFNDEF D6PLUS} write FBIOSDate {$ENDIF} stored false;
- property BIOSString :string read FBIOSString {$IFNDEF D6PLUS} write FBIOSString {$ENDIF} stored false;
-
- property Technology :string read FTechnology {$IFNDEF D6PLUS} write FTechnology {$ENDIF} stored false;
- property PixelWidth :integer read FPixelWidth {$IFNDEF D6PLUS} write FPixelWidth {$ENDIF} stored false;
- property PixelHeight :integer read FPixelHeight {$IFNDEF D6PLUS} write FPixelHeight {$ENDIF} stored false;
- property PixelDiagonal :integer read FPixelDiagonal {$IFNDEF D6PLUS} write FPixelDiagonal {$ENDIF} stored false;
- property RasterCaps :TRasterCaps read FRasterCaps {$IFNDEF D6PLUS} write FRasterCaps {$ENDIF} stored false;
- property CurveCaps :TCurveCaps read FCurveCaps {$IFNDEF D6PLUS} write FCurveCaps {$ENDIF} stored false;
- property LineCaps :TLineCaps read FLineCaps {$IFNDEF D6PLUS} write FLineCaps {$ENDIF} stored false;
- property PolygonCaps :TPolygonCaps read FPolygonCaps {$IFNDEF D6PLUS} write FPolygonCaps {$ENDIF} stored false;
- property TextCaps :TTextCaps read FTextCaps {$IFNDEF D6PLUS} write FTextCaps {$ENDIF} stored false;
- property ShadeBlendCaps :TShadeBlendCaps read FShadeBlendCaps {$IFNDEF D6PLUS} write FShadeBlendCaps {$ENDIF} stored false;
- property ColorMgmtCaps :TColorMgmtCaps read FColorMgmtCaps {$IFNDEF D6PLUS} write FColorMgmtCaps {$ENDIF} stored false;
- property Modes :TStrings read FModes {$IFNDEF D6PLUS} write FModes {$ENDIF} stored False;
- property FontResolution: DWORD read FFontSize {$IFNDEF D6PLUS} write FFontSize {$ENDIF} stored False;
- property VerticalRefreshRate: DWORD read FVRR {$IFNDEF D6PLUS} write FVRR {$ENDIF} stored False;
- end;
-
- procedure GetCurveCapsStr(CurveCaps :TCurveCaps; ACaps :TStringList);
- procedure GetLineCapsStr(LineCaps :TLineCaps; ACaps :TStringList);
- procedure GetPolygonCapsStr(PolygonCaps :TPolygonCaps; ACaps :TStringList);
- procedure GetRasterCapsStr(RasterCaps :TRasterCaps; ACaps :TStringList);
- procedure GetTextCapsStr(TextCaps :TTextCaps; ACaps :TStringList);
- procedure GetShadeBlendCapsStr(ShadeBlendCaps :TShadeBlendCaps; ACaps :TStringList);
- procedure GetColorMgmtCapsStr(ColorMgmtCaps :TColorMgmtCaps; ACaps :TStringList);
-
- implementation
-
-