diff --git a/lcl/alllclunits.pp b/lcl/alllclunits.pp index eefe69eff7..c41e4aaf2f 100644 --- a/lcl/alllclunits.pp +++ b/lcl/alllclunits.pp @@ -20,9 +20,15 @@ } unit AllLCLUnits; -{ At least 2.4.0 is required } -{$if defined(ver1) or (defined(ver2) and (fpc_release<4))} - {$fatal Lazarus requires at least FPC 2.4.0} +{ At least 2.4.0 is required, except for wince which supports fpc 2.2.4 too } +{$ifdef Wince} + {$if defined(ver1) or (defined(ver2) and (fpc_patch<4))} + {$fatal Lazarus for WinCE requires at least FPC 2.2.4} + {$endif} +{$else} + {$if defined(ver1) or (defined(ver2) and (fpc_release<4))} + {$fatal Lazarus requires at least FPC 2.4.0} + {$endif} {$endif} {$mode objfpc}{$H+} diff --git a/lcl/dialogs.pp b/lcl/dialogs.pp index 6bc4c041ed..59e68b92bb 100644 --- a/lcl/dialogs.pp +++ b/lcl/dialogs.pp @@ -538,8 +538,10 @@ procedure Register; implementation +{$if not defined(ver2_2)} {$R forms/finddlgunit.lfm} {$R forms/replacedlgunit.lfm} +{$ENDIF} uses Math, WSDialogs; diff --git a/lcl/forms/calendarpopup.pas b/lcl/forms/calendarpopup.pas index 168b22791f..675b0e1675 100644 --- a/lcl/forms/calendarpopup.pas +++ b/lcl/forms/calendarpopup.pas @@ -55,7 +55,9 @@ procedure ShowCalendarPopup(const Position: TPoint; ADate: TDateTime; implementation +{$if not defined(ver2_2)} {$R *.lfm} +{$ENDIF} procedure ShowCalendarPopup(const Position: TPoint; ADate: TDateTime; OnReturnDate: TReturnDateEvent; OnShowHide: TNotifyEvent = nil); diff --git a/lcl/graphics.pp b/lcl/graphics.pp index 5f3b52a656..821fed730f 100644 --- a/lcl/graphics.pp +++ b/lcl/graphics.pp @@ -1039,8 +1039,8 @@ type protected function GetClipRect: TRect; override; procedure SetClipRect(const ARect: TRect); override; - function GetClipping: Boolean; override; - procedure SetClipping(const AValue: boolean); override; + function GetClipping: Boolean; {$if not defined(ver2_2)}override;{$endif} + procedure SetClipping(const AValue: boolean); {$if not defined(ver2_2)}override;{$endif} function GetPixel(X,Y: Integer): TColor; virtual; procedure CreateBrush; virtual; procedure CreateFont; virtual; diff --git a/lcl/imglist.pp b/lcl/imglist.pp index 799c42827a..e8409ecfef 100644 --- a/lcl/imglist.pp +++ b/lcl/imglist.pp @@ -157,7 +157,8 @@ type procedure Assign(Source: TPersistent); override; procedure WriteData(AStream: TStream); virtual; procedure ReadData(AStream: TStream); virtual; - function Equals(Obj: TObject): boolean; {$IF FPC_FULLVERSION>20500}override;{$ENDIF} + function Equals(Obj: TObject): boolean; + {$IF FPC_FULLVERSION>20500}override;{$ENDIF} procedure BeginUpdate; procedure EndUpdate; diff --git a/lcl/include/canvas.inc b/lcl/include/canvas.inc index 73bf1d439b..40048ea9b1 100644 --- a/lcl/include/canvas.inc +++ b/lcl/include/canvas.inc @@ -70,13 +70,17 @@ var RGN: HRGN; begin inherited SetClipRect(ARect); + {$if not defined(ver2_2)} if inherited GetClipping then begin + {$endif} with ARect do RGN := CreateRectRGN(Left, Top, Right, Bottom); SelectClipRGN(Handle, RGN); DeleteObject(RGN); + {$if not defined(ver2_2)} end; + {$endif} end; function TCanvas.GetClipping: Boolean; @@ -88,7 +92,9 @@ end; procedure TCanvas.SetClipping(const AValue: boolean); begin + {$if not defined(ver2_2)} inherited SetClipping(AValue); + {$endif} if AValue then SetClipRect(inherited GetClipRect) else diff --git a/lcl/lcltype.pp b/lcl/lcltype.pp index bcbe677bb7..484f61bcf3 100644 --- a/lcl/lcltype.pp +++ b/lcl/lcltype.pp @@ -60,6 +60,13 @@ uses {$define extdecl := stdcall} {$endif} +// Types for FPC 2.2.4 support for WinCE +{$if defined(ver2_2)} +type + TFPResourceHandle = THandle; + TFPResourceHGlobal = THandle; +{$endif} + type {$IFDEF USE_UTF8BIDI_LCL} TUTF8Char = UTF8BIDI.TUTF8Char; @@ -75,8 +82,8 @@ type PCriticalSection = ^TCriticalSection; TDockImageOperation = (disShow, disMove, disHide); - -{$ifndef WINDOWS} + + {$ifndef WINDOWS} {$IFDEF CPU64} // temp solution for 32bit system.Thandle THandle = type PtrUInt; diff --git a/lcl/ldockctrledit.pas b/lcl/ldockctrledit.pas index 5f91ed7543..540172adc3 100644 --- a/lcl/ldockctrledit.pas +++ b/lcl/ldockctrledit.pas @@ -93,7 +93,9 @@ type implementation +{$if not defined(ver2_2)} {$R *.lfm} +{$ENDIF} { TLazDockControlEditorDlg } diff --git a/lcl/lresources.pp b/lcl/lresources.pp index 1452a23f6b..025b38c57f 100644 --- a/lcl/lresources.pp +++ b/lcl/lresources.pp @@ -40,7 +40,9 @@ uses FPCAdds, TypInfo, DynQueue, LCLType, LCLProc, LCLStrConsts, LazConfigStorage; {$DEFINE UseLRS} +{$if not defined(ver2_2)} {$DEFINE UseRES} +{$endif} const LRSComment = // do not translate this! diff --git a/lcl/postscriptcanvas.pas b/lcl/postscriptcanvas.pas index afb51671e9..43c8d23b27 100644 --- a/lcl/postscriptcanvas.pas +++ b/lcl/postscriptcanvas.pas @@ -126,8 +126,8 @@ Type function GetClipRect: TRect; override; procedure SetClipRect(const ARect: TRect); override; - function GetClipping: Boolean; override; - procedure SetClipping(const AValue: boolean); override; + function GetClipping: Boolean; {$if not defined(ver2_2)}override;{$endif} + procedure SetClipping(const AValue: boolean); {$if not defined(ver2_2)}override;{$endif} procedure BeginDoc; override; procedure EndDoc; override;