mirror of
https://github.com/salvadordf/CEF4Delphi.git
synced 2024-11-24 08:02:15 +02:00
Fix Lazarus/FPC compatibility issues
This commit is contained in:
parent
1ca9ebf179
commit
dc841d6199
@ -592,6 +592,13 @@ const
|
||||
CEF_SENTINEL_DOCLOSE = {$IFDEF MSWINDOWS}WM_APP +{$ENDIF} $A0B;
|
||||
CEF_BEFORECLOSE = {$IFDEF MSWINDOWS}WM_APP +{$ENDIF} $A0C;
|
||||
|
||||
{$IFDEF FPC}
|
||||
WM_TOUCH = $0240;
|
||||
WM_POINTERUPDATE = $0245;
|
||||
WM_POINTERDOWN = $0246;
|
||||
WM_POINTERUP = $0247;
|
||||
{$ENDIF}
|
||||
|
||||
CEF_TIMER_MINIMUM = $0000000A;
|
||||
CEF_TIMER_MAXIMUM = $7FFFFFFF;
|
||||
CEF_TIMER_MAXDELAY = 1000 div 30; // 30fps
|
||||
|
@ -260,8 +260,10 @@ procedure DragOperationToDropEffect(const aDragOperations : TCefDragOperations;
|
||||
|
||||
function GetWindowsMajorMinorVersion(var wMajorVersion, wMinorVersion : DWORD) : boolean;
|
||||
function GetDefaultCEFUserAgent : string;
|
||||
{$IFNDEF FPC}
|
||||
function TouchPointToPoint(aHandle : HWND; const TouchPoint: TTouchInput): TPoint;
|
||||
{$ENDIF}
|
||||
{$ENDIF}
|
||||
|
||||
function DeviceToLogical(aValue : integer; const aDeviceScaleFactor : double) : integer; overload;
|
||||
function DeviceToLogical(aValue : single; const aDeviceScaleFactor : double) : single; overload;
|
||||
@ -286,7 +288,7 @@ function CefGetDataURI(aData : pointer; aSize : integer; const aMimeType : ustri
|
||||
implementation
|
||||
|
||||
uses
|
||||
System.Types,
|
||||
{$IFNDEF FPC}System.Types,{$ENDIF}
|
||||
uCEFApplicationCore, uCEFSchemeHandlerFactory, uCEFValue,
|
||||
uCEFBinaryValue, uCEFStringList;
|
||||
|
||||
@ -2085,12 +2087,14 @@ begin
|
||||
'AppleWebKit/537.36 (KHTML, like Gecko) ' +
|
||||
'Chrome/' + TempChromiumVersion + ' Safari/537.36';
|
||||
end;
|
||||
|
||||
function TouchPointToPoint(aHandle : HWND; const TouchPoint: TTouchInput): TPoint;
|
||||
|
||||
{$IFNDEF FPC}
|
||||
function TouchPointToPoint(aHandle : HWND; const TouchPoint: TTouchInput): TPoint;
|
||||
begin
|
||||
Result := Point(TouchPoint.X div 100, TouchPoint.Y div 100);
|
||||
PhysicalToLogicalPoint(aHandle, Result);
|
||||
end;
|
||||
{$ENDIF}
|
||||
{$ENDIF}
|
||||
|
||||
function DeviceToLogical(aValue : integer; const aDeviceScaleFactor : double) : integer;
|
||||
@ -2286,5 +2290,5 @@ begin
|
||||
|
||||
Result := Result + ';base64,' + CefURIEncode(CefBase64Encode(aData, aSize), false);
|
||||
end;
|
||||
|
||||
end.
|
||||
|
||||
end.
|
||||
|
@ -2,7 +2,7 @@
|
||||
"UpdateLazPackages" : [
|
||||
{
|
||||
"ForceNotify" : true,
|
||||
"InternalVersion" : 89,
|
||||
"InternalVersion" : 90,
|
||||
"Name" : "cef4delphi_lazarus.lpk",
|
||||
"Version" : "79.1.36.0"
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user