From 40328b5724567be099828a512d27aba62df344f7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Salvador=20D=C3=ADaz=20Fau?= Date: Tue, 4 Feb 2020 11:50:38 +0100 Subject: [PATCH] Fixed backwards compatibility issues in Delphi and Linux build issues in Lazarus --- source/uCEFBufferPanel.pas | 2 ++ source/uCEFConstants.pas | 3 +-- source/uCEFMiscFunctions.pas | 6 +++--- update_CEF4Delphi.json | 2 +- 4 files changed, 7 insertions(+), 6 deletions(-) diff --git a/source/uCEFBufferPanel.pas b/source/uCEFBufferPanel.pas index 017b1043..64149d69 100644 --- a/source/uCEFBufferPanel.pas +++ b/source/uCEFBufferPanel.pas @@ -63,7 +63,9 @@ uses type TOnIMECommitTextEvent = procedure(Sender: TObject; const aText : ustring; const replacement_range : PCefRange; relative_cursor_pos : integer) of object; TOnIMESetCompositionEvent = procedure(Sender: TObject; const aText : ustring; const underlines : TCefCompositionUnderlineDynArray; const replacement_range, selection_range : TCefRange) of object; + {$IFDEF MSWINDOWS} TOnHandledMessageEvent = procedure(Sender: TObject; var aMessage: TMessage; var aHandled : boolean) of object; + {$ENDIF} {$IFNDEF FPC}{$IFDEF DELPHI16_UP}[ComponentPlatformsAttribute(pidWin32 or pidWin64)]{$ENDIF}{$ENDIF} TBufferPanel = class(TCustomPanel) diff --git a/source/uCEFConstants.pas b/source/uCEFConstants.pas index 7f906ca1..e390dc5d 100644 --- a/source/uCEFConstants.pas +++ b/source/uCEFConstants.pas @@ -592,12 +592,11 @@ const CEF_SENTINEL_DOCLOSE = {$IFDEF MSWINDOWS}WM_APP +{$ENDIF} $A0B; CEF_BEFORECLOSE = {$IFDEF MSWINDOWS}WM_APP +{$ENDIF} $A0C; - {$IFDEF FPC} + // Lazarus and some old Delphi versions don't have these message contants WM_TOUCH = $0240; WM_POINTERUPDATE = $0245; WM_POINTERDOWN = $0246; WM_POINTERUP = $0247; - {$ENDIF} CEF_TIMER_MINIMUM = $0000000A; CEF_TIMER_MAXIMUM = $7FFFFFFF; diff --git a/source/uCEFMiscFunctions.pas b/source/uCEFMiscFunctions.pas index 27d01869..aa6bbb15 100644 --- a/source/uCEFMiscFunctions.pas +++ b/source/uCEFMiscFunctions.pas @@ -260,7 +260,7 @@ procedure DragOperationToDropEffect(const aDragOperations : TCefDragOperations; function GetWindowsMajorMinorVersion(var wMajorVersion, wMinorVersion : DWORD) : boolean; function GetDefaultCEFUserAgent : string; -{$IFNDEF FPC} +{$IFDEF DELPHI14_UP} function TouchPointToPoint(aHandle : HWND; const TouchPoint: TTouchInput): TPoint; {$ENDIF} {$ENDIF} @@ -288,7 +288,7 @@ function CefGetDataURI(aData : pointer; aSize : integer; const aMimeType : ustri implementation uses - {$IFNDEF FPC}System.Types,{$ENDIF} + {$IFDEF DELPHI14_UP}System.Types,{$ENDIF} uCEFApplicationCore, uCEFSchemeHandlerFactory, uCEFValue, uCEFBinaryValue, uCEFStringList; @@ -2088,7 +2088,7 @@ begin 'Chrome/' + TempChromiumVersion + ' Safari/537.36'; end; -{$IFNDEF FPC} +{$IFDEF DELPHI14_UP} function TouchPointToPoint(aHandle : HWND; const TouchPoint: TTouchInput): TPoint; begin Result := Point(TouchPoint.X div 100, TouchPoint.Y div 100); diff --git a/update_CEF4Delphi.json b/update_CEF4Delphi.json index 7b0a9042..73c63f46 100644 --- a/update_CEF4Delphi.json +++ b/update_CEF4Delphi.json @@ -2,7 +2,7 @@ "UpdateLazPackages" : [ { "ForceNotify" : true, - "InternalVersion" : 91, + "InternalVersion" : 92, "Name" : "cef4delphi_lazarus.lpk", "Version" : "79.1.36.0" }