lcl: remove ver2_2_x defines

git-svn-id: trunk@36368 -
This commit is contained in:
paul 2012-03-27 07:16:11 +00:00
parent 283454d1f8
commit 880401dbb8
28 changed files with 22 additions and 129 deletions

View File

@ -546,10 +546,8 @@ procedure Register;
implementation
{$ifndef ver2_2}
{$R forms/finddlgunit.lfm}
{$R forms/replacedlgunit.lfm}
{$ENDIF}
uses
Math, WSDialogs;

View File

@ -1809,10 +1809,8 @@ begin
if Keys and MK_LButton <> 0 then Include(Result, ssLeft);
if Keys and MK_RButton <> 0 then Include(Result, ssRight);
if Keys and MK_MButton <> 0 then Include(Result, ssMiddle);
{$ifndef ver2_2_0}
if Keys and MK_XBUTTON1 <> 0 then Include(Result, ssExtra1);
if Keys and MK_XBUTTON2 <> 0 then Include(Result, ssExtra2);
{$endif}
if GetKeyState(VK_MENU) < 0 then Include(Result, ssAlt);
if (GetKeyState(VK_LWIN) < 0) or (GetKeyState(VK_RWIN) < 0) then Include(Result, ssMeta);
end;
@ -1830,10 +1828,8 @@ begin
if ssLeft in ShiftState then Result := Result or MK_LBUTTON;
if ssRight in ShiftState then Result := Result or MK_RBUTTON;
if ssMiddle in ShiftState then Result := Result or MK_MBUTTON;
{$ifndef ver2_2_0}
if ssExtra1 in ShiftState then Result := Result or MK_XBUTTON1;
if ssExtra2 in ShiftState then Result := Result or MK_XBUTTON2;
{$endif}
end;
function WindowStateToStr(const State: TWindowState): string;

View File

@ -56,9 +56,7 @@ procedure ShowCalendarPopup(const Position: TPoint; ADate: TDateTime;
implementation
{$ifndef ver2_2}
{$R *.lfm}
{$ENDIF}
procedure ShowCalendarPopup(const Position: TPoint; ADate: TDateTime;
const CalendarDisplaySettings: TDisplaySettings;

View File

@ -1075,8 +1075,8 @@ type
protected
function GetClipRect: TRect; override;
procedure SetClipRect(const ARect: TRect); override;
function GetClipping: Boolean; {$ifndef ver2_2}override;{$endif}
procedure SetClipping(const AValue: boolean); {$ifndef ver2_2}override;{$endif}
function GetClipping: Boolean; override;
procedure SetClipping(const AValue: boolean); override;
function GetPixel(X,Y: Integer): TColor; virtual;
procedure CreateBrush; virtual;
procedure CreateFont; virtual;

View File

@ -159,7 +159,7 @@ type
procedure WriteData(AStream: TStream); virtual;
procedure ReadData(AStream: TStream); virtual;
function Equals(Obj: TObject): boolean;
{$if not (defined(ver2_2_2) or defined(ver2_2_0))}{$IF FPC_FULLVERSION>=20402}override;{$ENDIF}{$ENDIF}
{$IF FPC_FULLVERSION>=20402}override;{$ENDIF}
procedure BeginUpdate;
procedure EndUpdate;

View File

@ -71,10 +71,8 @@ var
LogicalRect: TRect;
begin
inherited SetClipRect(ARect);
{$ifndef ver2_2}
if inherited GetClipping then
begin
{$endif}
// ARect is in logical coords. CreateRectRGN accepts device coords.
// So we need to translate them
LogicalRect := ARect;
@ -83,9 +81,7 @@ begin
RGN := CreateRectRGN(Left, Top, Right, Bottom);
SelectClipRGN(Handle, RGN);
DeleteObject(RGN);
{$ifndef ver2_2}
end;
{$endif}
end;
function TCanvas.GetClipping: Boolean;
@ -97,9 +93,7 @@ end;
procedure TCanvas.SetClipping(const AValue: boolean);
begin
{$ifndef ver2_2}
inherited SetClipping(AValue);
{$endif}
if AValue then
SetClipRect(inherited GetClipRect)
else

View File

@ -1267,15 +1267,11 @@ begin
CurStream.Free;
end;
end else
{$if not (defined(ver2_2_2) or defined(ver2_2_0))}
{$IF FPC_FULLVERSION>20402}
Result:=inherited Equals(Obj);
{$ELSE}
Result:=false;
{$ENDIF}
{$ELSE}
Result:=false;
{$ENDIF}
end;
{------------------------------------------------------------------------------

View File

@ -22,11 +22,8 @@
{$ifndef CarbonDontUseCocoa}
{$define CarbonUseCocoa}
{$endif}
{$ifndef VER2_2}{$ifndef VER2_4}{$ifndef CarbonDontUseCocoa}
{$define CarbonUseCocoaAll}
{$endif}{$endif}{$endif}
{$endif}
// Show debug info when tracing:

View File

@ -30,11 +30,7 @@ interface
uses
// Libs
CocoaAll,
{$ifdef ver2_2_0}
FPCMacOSAll,
{$else}
MacOSAll,
{$endif}
// LCL
Controls, Forms, Menus, Graphics, LCLType, LMessages, LCLProc, Classes,
// Widgetset

View File

@ -3274,11 +3274,7 @@ begin
FillChar(XKeyEvent, SizeOf(XKeyEvent), 0);
XKeyEvent._Type := GDK_KEY_PRESS;
XKeyEvent.Display := XDisplay;
{$ifdef ver2_2}
XKeyEvent.Same_Screen := True;
{$else}
XKeyEvent.Same_Screen := 1;
{$endif}
// Retrieve the KeyCode bounds
XDisplayKeyCodes(XDisplay, @LoKey, @HiKey);

View File

@ -124,10 +124,6 @@ function pango_attr_gravity_new(gravity: TPangoGravity): PPangoAttribute; cdecl;
function pango_version_check(required_major, required_minor, required_micro: integer): PChar; cdecl; external pangolib;
{$if defined(VER2_2_0)}
function pango_layout_get_font_description(layout:PPangoLayout):PPangoFontDescription; cdecl; external pangolib;
{$ifend}
{$IF FPC_FULLVERSION<20501}
function pango_font_family_is_monospace(family:PPangoFontFamily):gboolean; cdecl; external pangolib;
{$ENDIF}
@ -261,11 +257,4 @@ var
// since 2.10
gtk_tree_view_set_grid_lines: procedure(tree_view: PGtkTreeView; grid_lines: TGtkTreeViewGridLines); cdecl;
gtk_tree_view_get_grid_lines: function(tree_view: PGtkTreeView): TGtkTreeViewGridLines; cdecl;
{$ifdef ver2_2}
{$ifdef darwin}
// this linklib statement is not present in gtk2.pas
{$linklib gthread-2.0}
{$endif}
{$endif}
gtk_tree_view_get_grid_lines: function(tree_view: PGtkTreeView): TGtkTreeViewGridLines; cdecl;

View File

@ -29,17 +29,7 @@
{$IFNDEF DisableWindowsUnicodeSupport}
// Enable WindowsUnicodeSupport for fpc 2.2.1 and higher
{$IFNDEF VER2_2_0}
{$DEFINE WindowsUnicodeSupport}
{$ENDIF VER2_2_0}
{$ENDIF DisableWindowsUnicodeSupport}
{$IFDEF WindowsUnicodeSupport}
{$IFDEF VER2_2_0}
// A check to prevent that WindowsUnicodeSupport is enabled for fpc 2.2.0
{$FATAL Use fpc 2.2.1 or later, if you want to enable Windows Unicode Support}
{$ENDIF}
{$ENDIF}
{$DEFINE UseVistaDialogs}
{.$DEFINE RedirectDestroyMessages}

View File

@ -28,14 +28,6 @@ unit WinCEInt;
interface
{ At least FPC 2.2.1 is required if the architecture is ARM
FPC 2.0 or inferior isn't checked because it can't compile for wince }
{$ifdef CPUARM}
{$if defined(ver2_2) and (fpc_patch<1)}
// {$fatal The Lazarus WinCE Interface in Lazarus 0.9.25+ requires at least FPC 2.2.1}
{$endif}
{$endif}
{$IFDEF Trace}
{$ASSERTIONS ON}
{$ENDIF}
@ -53,7 +45,7 @@ uses
{$ifdef Win32}
win32compat,
{$else}
{$ifndef ver2_2_0}aygshell,{$endif}
aygshell,
{$endif}
// Libs
Windows,

View File

@ -111,9 +111,7 @@ begin
QuoteChar := S.QuoteChar;
Delimiter := S.Delimiter;
NameValueSeparator := S.NameValueSeparator;
{$ifndef ver2_2_0}
TextLineBreakStyle := S.TextLineBreakStyle;
{$endif}
Text := S.Text;
end
else

View File

@ -10,7 +10,7 @@ uses
{$ifdef win32}
win32compat,
{$else}
{$ifndef ver2_2_0}oleauto, aygshell,{$endif}
oleauto, aygshell,
{$endif}
// compatibility
// RTL, LCL

View File

@ -28,7 +28,7 @@ interface
uses
// Libs
{$ifndef ver2_2_0}commctrl,{$endif}
commctrl,
Windows,
// LCL
Calendar, SysUtils, Controls, LCLType,

View File

@ -27,7 +27,7 @@ interface
uses
// RTL, FCL
Windows, Classes, SysUtils, WinExt, Forms,
{$ifndef ver2_2_0}commctrl,{$endif}
commctrl,
// Compatibility
{$ifdef Win32}win32compat,{$endif}
// LCL

View File

@ -29,7 +29,7 @@ interface
uses
// Libs
Windows,
{$ifndef ver2_2_0}commctrl,{$endif}
commctrl,
// RTL, LCL
Classes, LCLProc,
LCLType, Controls, Forms, Graphics,

View File

@ -28,7 +28,7 @@ interface
uses
// RTL, FCL
Windows, SysUtils,
{$ifndef ver2_2_0}commctrl,{$endif}
commctrl,
// Compatibility
{$ifdef Win32}win32compat,{$endif}
// LCL

View File

@ -29,7 +29,7 @@ interface
uses
// Libs
Windows,
{$ifndef ver2_2_0}commctrl,{$endif}
commctrl,
// RTL, LCL
SysUtils, Classes, ImgList, GraphType, Graphics, LCLType,
// Widgetset

View File

@ -31,8 +31,8 @@ uses
Controls, InterfaceBase, LCLProc,
// RTL, FCL
Windows, Classes, SysUtils,
{$ifndef ver2_2_0}commctrl,
{$ifndef win32}aygshell,{$endif}{$endif}
commctrl,
{$ifndef win32}aygshell,{$endif}
// widgetset
WinceInt, WinceProc, WinCEWSImgList,
WSMenus, WSLCLClasses;
@ -111,11 +111,7 @@ implementation
uses strutils;
{$ifndef ver2_2_0}
{$R wincemenures.rc}
{$else}
{$R wincemenures.res}
{$endif}
{ helper routines }

View File

@ -27,7 +27,7 @@ interface
uses
// Libs
{$ifndef ver2_2_0}commctrl,{$endif}
commctrl,
Windows,
// LCL
Spin, Controls, StdCtrls, LCLType, LCLProc,

View File

@ -29,7 +29,7 @@ interface
uses
// Libs
Windows,
{$ifndef ver2_2_0}{$ifndef win32}oleauto,{$endif}{$endif}
{$ifndef win32}oleauto,{$endif}
// Compatibility
{$ifdef Win32}win32compat,{$endif}
// RTL, FCL, LCL

View File

@ -6,7 +6,7 @@
* *
* This file is part of the Lazarus Component Library (LCL) *
* *
* See the file COPYING.modifiedLGPL.txt, included in this distribution, *
* See the file COPYING.modifiedLGPL.txt, included in this distribution, *
* for details about the copyright. *
* *
* This program is distributed in the hope that it will be useful, *

View File

@ -49,7 +49,7 @@ unit LCLIntf;
interface
uses
{$IFDEF Windows}Windows, {$ifndef ver2_2_0}ShellApi, {$ENDIF}{$ENDIF}
{$IFDEF Windows}Windows, ShellApi,{$ENDIF}
{$IFDEF UNIX}Unix, {$ENDIF}
{$IFDEF Darwin}MacOSAll, {$ENDIF}
Types, Math, Classes, SysUtils, LCLType, LCLProc, GraphType, InterfaceBase,

View File

@ -60,17 +60,6 @@ uses
{$define extdecl := stdcall}
{$endif}
// Types for FPC 2.2.x support for WinCE
{$ifdef ver2_2}
type
TFPResourceHandle = THandle;
TFPResourceHGlobal = THandle;
{$endif}
{$ifdef ver2_2_0}
const
AllFilesMask = '*.*';
{$endif}
type
{$IFDEF USE_UTF8BIDI_LCL}
TUTF8Char = UTF8BIDI.TUTF8Char;

View File

@ -40,9 +40,7 @@ uses
FPCAdds, TypInfo, DynQueue, LCLProc, LCLStrConsts, LazConfigStorage;
{$DEFINE UseLRS}
{$ifndef ver2_2}
{$DEFINE UseRES}
{$endif}
const
LRSComment = // do not translate this!
@ -180,9 +178,7 @@ type
function ReadStr: String; override;
function ReadString(StringType: TValueType): String; override;
function ReadWideString: WideString; override;
{$ifndef VER2_2}
function ReadUnicodeString: UnicodeString; override;
{$endif}
procedure SkipComponent(SkipComponentInfos: Boolean); override;
procedure SkipValue; override;
public
@ -295,9 +291,7 @@ type
procedure WriteSet(Value: LongInt; SetType: Pointer); override;
procedure WriteString(const Value: String); override;
procedure WriteWideString(const Value: WideString); override;
{$ifndef VER2_2}
procedure WriteUnicodeString(const Value: UnicodeString); override;
{$endif}
property WriteEmptyInheritedChilds: boolean read FWriteEmptyInheritedChilds write FWriteEmptyInheritedChilds;
property Writer: TWriter read FWriter write FWriter;
@ -2331,10 +2325,8 @@ procedure LRSObjectBinaryToText(Input, Output: TStream);
vaWString: Result:='vaWString';
vaInt64: Result:='vaInt64';
vaUTF8String: Result:='vaUTF8String';
{$IFNDEF VER2_2}
vaUString: Result:='vaUString';
vaQWord : Result:='vaQWord';
{$ENDIF}
else Result:='Unknown ValueType='+dbgs(Ord(ValueType));
end;
end;
@ -2491,7 +2483,7 @@ procedure LRSObjectBinaryToText(Input, Output: TStream);
ACurrency:=ReadLRSCurrency(Input);
OutLn(FloatToStr(ACurrency));
end;
vaWString{$IFNDEF VER2_2},vaUString{$ENDIF}: begin
vaWString,vaUString: begin
AWideString:=ReadLRSWideString(Input);
OutWideString(AWideString);
OutLn('');
@ -4156,11 +4148,7 @@ begin
Value := GetEnumValue(PTypeInfo(EnumType), Name);
if Value = -1 then
PropValueError;
{$IFNDEF VER2_2_0}
include(tset(result),Value);
{$ELSE}
Result := Result or (1 shl Value);
{$ENDIF}
end;
except
SkipSetBody;
@ -4210,7 +4198,6 @@ begin
//debugln('TLRSObjectReader.ReadWideString ',Result);
end;
{$ifndef VER2_2}
function TLRSObjectReader.ReadUnicodeString: UnicodeString;
var
i: Integer;
@ -4221,7 +4208,6 @@ begin
Read(Pointer(@Result[1])^, i*2);
//debugln('TLRSObjectReader.ReadWideString ',Result);
end;
{$endif}
procedure TLRSObjectReader.SkipComponent(SkipComponentInfos: Boolean);
var
@ -4288,7 +4274,7 @@ begin
Count:=ReadIntegerContent;
SkipBytes(Count);
end;
vaWString{$IFNDEF VER2_2}, vaUString{$ENDIF}:
vaWString, vaUString:
begin
Count:=ReadIntegerContent;
SkipBytes(Count*2);
@ -4861,24 +4847,12 @@ type
tset = set of 0..31;
var
i: Integer;
{$IFDEF VER2_2_0}
Mask: LongInt;
{$ENDIF}
begin
WriteValue(vaSet);
{$IFDEF VER2_2_0}
Mask := 1;
{$ENDIF}
for i := 0 to 31 do
begin
{$IFNDEF VER2_2_0}
if (i in tset(Value)) then
WriteStr(GetEnumName(PTypeInfo(SetType), i));
{$ELSE}
if (Value and Mask) <> 0 then
WriteStr(GetEnumName(PTypeInfo(SetType), i));
Mask := Mask shl 1;
{$ENDIF}
end;
WriteStr('');
end;
@ -4913,7 +4887,6 @@ begin
WriteWideStringContent(Value);
end;
{$ifndef VER2_2}
procedure TLRSObjectWriter.WriteUnicodeString(const Value: UnicodeString);
var
i: Integer;
@ -4923,7 +4896,6 @@ begin
WriteIntegerContent(i);
WriteWideStringContent(Value);
end;
{$endif}
{ TLRPositionLinks }
@ -5565,11 +5537,7 @@ begin
if ascii then
fToken:=Classes.toString
else
{$ifdef ver2_2_0}
fToken:=Classes.toString
{$else}
fToken:=toWString;
{$endif}
end;
procedure TUTF8Parser.HandleMinus;

View File

@ -125,8 +125,8 @@ Type
function GetClipRect: TRect; override;
procedure SetClipRect(const ARect: TRect); override;
function GetClipping: Boolean; {$ifndef ver2_2}override;{$endif}
procedure SetClipping(const AValue: boolean); {$ifndef ver2_2}override;{$endif}
function GetClipping: Boolean; override;
procedure SetClipping(const AValue: boolean); override;
procedure BeginDoc; override;
procedure EndDoc; override;