Selaa lähdekoodia

Avoiding compiler warnings from PngComponents 1.9 (38c2b631)

Source commit: 4473a91cedd89ff0b3920bf0cfdd50b48cf92582
Martin Prikryl 3 vuotta sitten
vanhempi
sitoutus
daa77d2176

+ 1 - 0
source/PngComponents.cbproj

@@ -49,6 +49,7 @@
 		<DCC_CBuilderOutput>JPHNE</DCC_CBuilderOutput>
 		<DCC_Namespace>System;Xml;Data;Datasnap;Web;Soap;Vcl;Vcl.Imaging;Vcl.Touch;Vcl.Samples;Vcl.Shell;$(DCC_Namespace)</DCC_Namespace>
 		<DCC_UnitSearchPath>packages\png;packages\my;$(DCC_UnitSearchPath)</DCC_UnitSearchPath>
+		<Defines>WINSCP;$(Defines)</Defines>
 		<DynamicRTL>true</DynamicRTL>
 		<FinalOutputDir>$(INTERM_PATH)\$(Platform)\$(Config)</FinalOutputDir>
 		<ILINK_Description>Png Components</ILINK_Description>

+ 4 - 0
source/packages/png/PngBitBtn.pas

@@ -41,12 +41,14 @@ type
     property NumGlyphs stored False;
   end;
 
+{$IFNDEF WINSCP}
 {$IF RTLVersion >= 24.0 }
   TPngBitBtnStyleHook = class(TBitBtnStyleHook)
   strict protected
     procedure DrawButton(ACanvas: TCanvas; AMouseInControl: Boolean); override;
   end;
 {$IFEND}
+{$ENDIF}
 
 implementation
 
@@ -308,6 +310,7 @@ begin
   end;
 end;
 
+{$IFNDEF WINSCP}
 { TPngBitBtnStyleHook }
 {$IF RTLVersion >= 24.0 }
 procedure TPngBitBtnStyleHook.DrawButton(ACanvas: TCanvas;
@@ -385,5 +388,6 @@ begin
 
 end;
 {$IFEND}
+{$IFEND}
 
 end.

+ 8 - 0
source/packages/png/PngImageList.pas

@@ -11,6 +11,9 @@ uses
   {$IF CompilerVersion >= 34.0 Delphi 10.4 }
   System.UITypes,
   {$IFEND}
+  {$IFDEF WINSCP}
+  System.UITypes,
+  {$IFEND}
   PngImage, PngFunctions;
 
 {$IF CompilerVersion < 34.0 Delphi 10.4 }
@@ -18,6 +21,11 @@ type
   TImageName = type string;
 {$IFEND}
 
+{$IFDEF WINSCP}
+type
+  TImageIndex = System.UITypes.TImageIndex;
+{$IFEND}
+
 type
   INameMapping = interface
   ['{38EECDD8-7440-4EA2-BFD0-424E5BB2C1D5}']