1
0
mirror of https://github.com/salvadordf/CEF4Delphi.git synced 2025-04-27 07:02:21 +02:00

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 type
TOnIMECommitTextEvent = procedure(Sender: TObject; const aText : ustring; const replacement_range : PCefRange; relative_cursor_pos : integer) of object; 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; 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; TOnHandledMessageEvent = procedure(Sender: TObject; var aMessage: TMessage; var aHandled : boolean) of object;
{$ENDIF}
{$IFNDEF FPC}{$IFDEF DELPHI16_UP}[ComponentPlatformsAttribute(pidWin32 or pidWin64)]{$ENDIF}{$ENDIF} {$IFNDEF FPC}{$IFDEF DELPHI16_UP}[ComponentPlatformsAttribute(pidWin32 or pidWin64)]{$ENDIF}{$ENDIF}
TBufferPanel = class(TCustomPanel) TBufferPanel = class(TCustomPanel)

View File

@ -592,12 +592,11 @@ const
CEF_SENTINEL_DOCLOSE = {$IFDEF MSWINDOWS}WM_APP +{$ENDIF} $A0B; CEF_SENTINEL_DOCLOSE = {$IFDEF MSWINDOWS}WM_APP +{$ENDIF} $A0B;
CEF_BEFORECLOSE = {$IFDEF MSWINDOWS}WM_APP +{$ENDIF} $A0C; 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_TOUCH = $0240;
WM_POINTERUPDATE = $0245; WM_POINTERUPDATE = $0245;
WM_POINTERDOWN = $0246; WM_POINTERDOWN = $0246;
WM_POINTERUP = $0247; WM_POINTERUP = $0247;
{$ENDIF}
CEF_TIMER_MINIMUM = $0000000A; CEF_TIMER_MINIMUM = $0000000A;
CEF_TIMER_MAXIMUM = $7FFFFFFF; CEF_TIMER_MAXIMUM = $7FFFFFFF;

View File

@ -260,7 +260,7 @@ procedure DragOperationToDropEffect(const aDragOperations : TCefDragOperations;
function GetWindowsMajorMinorVersion(var wMajorVersion, wMinorVersion : DWORD) : boolean; function GetWindowsMajorMinorVersion(var wMajorVersion, wMinorVersion : DWORD) : boolean;
function GetDefaultCEFUserAgent : string; function GetDefaultCEFUserAgent : string;
{$IFNDEF FPC} {$IFDEF DELPHI14_UP}
function TouchPointToPoint(aHandle : HWND; const TouchPoint: TTouchInput): TPoint; function TouchPointToPoint(aHandle : HWND; const TouchPoint: TTouchInput): TPoint;
{$ENDIF} {$ENDIF}
{$ENDIF} {$ENDIF}
@ -288,7 +288,7 @@ function CefGetDataURI(aData : pointer; aSize : integer; const aMimeType : ustri
implementation implementation
uses uses
{$IFNDEF FPC}System.Types,{$ENDIF} {$IFDEF DELPHI14_UP}System.Types,{$ENDIF}
uCEFApplicationCore, uCEFSchemeHandlerFactory, uCEFValue, uCEFApplicationCore, uCEFSchemeHandlerFactory, uCEFValue,
uCEFBinaryValue, uCEFStringList; uCEFBinaryValue, uCEFStringList;
@ -2088,7 +2088,7 @@ begin
'Chrome/' + TempChromiumVersion + ' Safari/537.36'; 'Chrome/' + TempChromiumVersion + ' Safari/537.36';
end; end;
{$IFNDEF FPC} {$IFDEF DELPHI14_UP}
function TouchPointToPoint(aHandle : HWND; const TouchPoint: TTouchInput): TPoint; function TouchPointToPoint(aHandle : HWND; const TouchPoint: TTouchInput): TPoint;
begin begin
Result := Point(TouchPoint.X div 100, TouchPoint.Y div 100); Result := Point(TouchPoint.X div 100, TouchPoint.Y div 100);

View File

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