Fixed backwards compatibility issues in Delphi and Linux build issues in Lazarus

This commit is contained in:
Salvador Díaz Fau 2020-02-04 11:50:38 +01:00
parent 99efd21094
commit 40328b5724
4 changed files with 7 additions and 6 deletions

View File

@ -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)

View File

@ -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;

View File

@ -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);

View File

@ -2,7 +2,7 @@
"UpdateLazPackages" : [
{
"ForceNotify" : true,
"InternalVersion" : 91,
"InternalVersion" : 92,
"Name" : "cef4delphi_lazarus.lpk",
"Version" : "79.1.36.0"
}