From db5d5464ae35cf164e6c966e31692261cf5ed6cc Mon Sep 17 00:00:00 2001 From: mattias Date: Sat, 6 Mar 2004 21:57:14 +0000 Subject: [PATCH] fixed compilation under fpc 1.9.3 git-svn-id: trunk@5278 - --- lcl/include/intfbasewinapi.inc | 15 ++++++++++++--- lcl/include/winapi.inc | 16 +++++++++++----- lcl/include/winapih.inc | 7 ++++++- lcl/interfaces/gtk/gtkobject.inc | 5 ++++- lcl/lclintf.pas | 15 ++++++++------- 5 files changed, 41 insertions(+), 17 deletions(-) diff --git a/lcl/include/intfbasewinapi.inc b/lcl/include/intfbasewinapi.inc index da00c34edd..b096a16e78 100644 --- a/lcl/include/intfbasewinapi.inc +++ b/lcl/include/intfbasewinapi.inc @@ -1,3 +1,5 @@ +// included by interfacebase.pp + { $Id$ } {****************************************************************************** TWidgetSet @@ -880,13 +882,17 @@ begin end; function TWidgetSet.GetTextExtentExPoint(DC: HDC; Str: PChar; - Count, p4: Integer; p5, p6: PInteger; var Size: TSize): BOOL; + Count, MaxWidth: Integer; MaxCount, PartialWidths: PInteger; + var Size: TSize): BOOL; begin + if MaxCount<>nil then MaxCount^:=Count; + if PartialWidths<>nil then + writeln('Warning: TWidgetSet.GetTextExtentExPoint PartialWidths not implemented yet'); Result := GetTextExtentPoint(DC,Str,Count,Size); end; -function TWidgetSet.GetTextExtentPoint(DC: HDC; Str: PChar; - Count: Integer; var Size: TSize): Boolean; +function TWidgetSet.GetTextExtentPoint(DC: HDC; Str: PChar; Count: Integer; + var Size: TSize): Boolean; begin Result := False; end; @@ -1398,6 +1404,9 @@ end; { ============================================================================= $Log$ + Revision 1.10 2004/03/06 21:57:14 mattias + fixed compilation under fpc 1.9.3 + Revision 1.9 2004/03/05 00:14:02 marc * Renamed TInterfaceBase to TWidgetSet diff --git a/lcl/include/winapi.inc b/lcl/include/winapi.inc index d0a72fe3d1..b23b8f3f23 100644 --- a/lcl/include/winapi.inc +++ b/lcl/include/winapi.inc @@ -1,3 +1,5 @@ +// included by lclintf.pp + (****************************************************************************** All Winapi related stuff goes here. This file is used by LCLIntf.pas @@ -404,20 +406,21 @@ begin Result := InterfaceObject.GetTextColor(DC); end; -function GetTextExtentExPoint(DC: HDC; Str: PChar; Count, p4: Integer; - p5, p6: PInteger; var Size: TSize): BOOL; +function GetTextExtentExPoint(DC: HDC; Str: PChar; Count, MaxWidth: Integer; + MaxCount, PartialWidths: PInteger; var Size: LCLType.TSize): Boolean; begin - Result := InterfaceObject.GetTextExtentExPoint(DC,Str,Count,p4,p5,p6,Size); + Result := InterfaceObject.GetTextExtentExPoint(DC,Str,Count,MaxWidth,MaxCount, + PartialWidths,Size); end; function GetTextExtentPoint(DC: HDC; Str: PChar; Count: Integer; - var Size: TSize): Boolean; + var Size: LCLType.TSize): Boolean; begin Result := InterfaceObject.GetTextExtentPoint(DC, Str, Count, Size); end; function GetTextExtentPoint32(DC: HDC; Str: PChar; Count: Integer; - var Size: TSize): Boolean; + var Size: LCLType.TSize): Boolean; begin Result := InterfaceObject.GetTextExtentPoint32(DC, Str, Count, Size); end; @@ -1296,6 +1299,9 @@ end; { ============================================================================= $Log$ + Revision 1.110 2004/03/06 21:57:14 mattias + fixed compilation under fpc 1.9.3 + Revision 1.109 2004/02/23 08:19:04 micha revert intf split diff --git a/lcl/include/winapih.inc b/lcl/include/winapih.inc index 7884289b23..8d89019bfb 100644 --- a/lcl/include/winapih.inc +++ b/lcl/include/winapih.inc @@ -1,3 +1,5 @@ +// included by interfacebase.pp and lclintf.pp + (****************************************************************************** All Winapi related stuff goes here. This file is used by both LCLIntf.pas and InterfaceBase.pp @@ -128,7 +130,7 @@ function GetSystemPaletteEntries(DC: HDC; StartIndex, NumEntries: UINT; var PaletteEntries): UINT; {$IFDEF IF_BASE_MEMBER}virtual;{$ENDIF} function GetSystemMetrics(nIndex: Integer): Integer; {$IFDEF IF_BASE_MEMBER}virtual;{$ENDIF} function GetTextColor(DC: HDC) : TColorRef; {$IFDEF IF_BASE_MEMBER}virtual;{$ENDIF} -function GetTextExtentExPoint(DC: HDC; Str: PChar; Count, p4: Integer; p5, p6: PInteger; var Size: TSize): BOOL; {$IFDEF IF_BASE_MEMBER}virtual;{$ENDIF} +function GetTextExtentExPoint(DC: HDC; Str: PChar; Count, MaxWidth: Integer; MaxCount, PartialWidths: PInteger; var Size: TSize): Boolean; {$IFDEF IF_BASE_MEMBER}virtual;{$ENDIF} function GetTextExtentPoint(DC: HDC; Str: PChar; Count: Integer; var Size: TSize): Boolean; {$IFDEF IF_BASE_MEMBER}virtual;{$ENDIF} function GetTextExtentPoint32(DC: HDC; Str: PChar; Count: Integer; var Size: TSize): Boolean; {$IFDEF IF_BASE_MEMBER}virtual;{$ENDIF} function GetTextMetrics(DC: HDC; var TM: TTextMetric): Boolean; {$IFDEF IF_BASE_MEMBER}virtual;{$ENDIF} @@ -292,6 +294,9 @@ function RGB(R, G, B : Byte) : TColorRef; { ============================================================================= $Log$ + Revision 1.98 2004/03/06 21:57:14 mattias + fixed compilation under fpc 1.9.3 + Revision 1.97 2004/02/23 08:19:04 micha revert intf split diff --git a/lcl/interfaces/gtk/gtkobject.inc b/lcl/interfaces/gtk/gtkobject.inc index 063ef4e9f7..eb7e4ed04b 100644 --- a/lcl/interfaces/gtk/gtkobject.inc +++ b/lcl/interfaces/gtk/gtkobject.inc @@ -1092,7 +1092,7 @@ begin if NewHeight<=0 then NewHeight:=1; {$IFDEF VerboseSizeMsg} - LCLObject:=GetParentLCLObject(Widget); + LCLObject:=GetNearestLCLObject(Widget); write('TGtkWidgetSet.RealizeWidgetSize Widget=',HexStr(Cardinal(Widget),8), ' New=',NewWidth,',',NewHeight); if (LCLObject<>nil) and (LCLObject is TControl) then begin @@ -9283,6 +9283,9 @@ end; { ============================================================================= $Log$ + Revision 1.478 2004/03/06 21:57:14 mattias + fixed compilation under fpc 1.9.3 + Revision 1.477 2004/03/06 17:12:19 mattias fixed CreateBrushIndirect diff --git a/lcl/lclintf.pas b/lcl/lclintf.pas index 215c1194cb..3b625f7f2a 100644 --- a/lcl/lclintf.pas +++ b/lcl/lclintf.pas @@ -41,8 +41,8 @@ unit LCLIntf; interface uses - Classes, SysUtils, LCLType, LCLProc, VCLGlobals, GraphType, InterfaceBase, - LResources; + Strings, Math, Classes, SysUtils, LCLType, LCLProc, VCLGlobals, GraphType, + InterfaceBase, LResources; {$ifdef Trace} {$ASSERTIONS ON} @@ -77,12 +77,10 @@ function GetTickStep: DWord; implementation +{$IFNDEF Win32} uses - Strings, Math - {$IFNDEF Win32} - , {$IFDEF Ver1_0}Linux{$ELSE}Unix{$ENDIF} - {$ENDIF} - ; + {$IFDEF Ver1_0}Linux{$ELSE}Unix{$ENDIF}; +{$ENDIF} var FPredefinedClipboardFormats: @@ -184,6 +182,9 @@ end. { $Log$ + Revision 1.14 2004/03/06 21:57:14 mattias + fixed compilation under fpc 1.9.3 + Revision 1.13 2004/02/23 08:19:04 micha revert intf split