You've already forked CEF4Delphi
mirror of
https://github.com/salvadordf/CEF4Delphi.git
synced 2025-06-12 22:07:39 +02:00
Fix Lazarus/FPC compatibility issues
This commit is contained in:
@ -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.
|
||||
|
Reference in New Issue
Block a user