mirror of
https://github.com/salvadordf/CEF4Delphi.git
synced 2025-06-02 21:57:37 +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_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}
|
||||||
|
WM_TOUCH = $0240;
|
||||||
|
WM_POINTERUPDATE = $0245;
|
||||||
|
WM_POINTERDOWN = $0246;
|
||||||
|
WM_POINTERUP = $0247;
|
||||||
|
{$ENDIF}
|
||||||
|
|
||||||
CEF_TIMER_MINIMUM = $0000000A;
|
CEF_TIMER_MINIMUM = $0000000A;
|
||||||
CEF_TIMER_MAXIMUM = $7FFFFFFF;
|
CEF_TIMER_MAXIMUM = $7FFFFFFF;
|
||||||
CEF_TIMER_MAXDELAY = 1000 div 30; // 30fps
|
CEF_TIMER_MAXDELAY = 1000 div 30; // 30fps
|
||||||
|
@ -260,8 +260,10 @@ 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}
|
||||||
function TouchPointToPoint(aHandle : HWND; const TouchPoint: TTouchInput): TPoint;
|
function TouchPointToPoint(aHandle : HWND; const TouchPoint: TTouchInput): TPoint;
|
||||||
{$ENDIF}
|
{$ENDIF}
|
||||||
|
{$ENDIF}
|
||||||
|
|
||||||
function DeviceToLogical(aValue : integer; const aDeviceScaleFactor : double) : integer; overload;
|
function DeviceToLogical(aValue : integer; const aDeviceScaleFactor : double) : integer; overload;
|
||||||
function DeviceToLogical(aValue : single; const aDeviceScaleFactor : double) : single; overload;
|
function DeviceToLogical(aValue : single; const aDeviceScaleFactor : double) : single; overload;
|
||||||
@ -286,7 +288,7 @@ function CefGetDataURI(aData : pointer; aSize : integer; const aMimeType : ustri
|
|||||||
implementation
|
implementation
|
||||||
|
|
||||||
uses
|
uses
|
||||||
System.Types,
|
{$IFNDEF FPC}System.Types,{$ENDIF}
|
||||||
uCEFApplicationCore, uCEFSchemeHandlerFactory, uCEFValue,
|
uCEFApplicationCore, uCEFSchemeHandlerFactory, uCEFValue,
|
||||||
uCEFBinaryValue, uCEFStringList;
|
uCEFBinaryValue, uCEFStringList;
|
||||||
|
|
||||||
@ -2085,12 +2087,14 @@ begin
|
|||||||
'AppleWebKit/537.36 (KHTML, like Gecko) ' +
|
'AppleWebKit/537.36 (KHTML, like Gecko) ' +
|
||||||
'Chrome/' + TempChromiumVersion + ' Safari/537.36';
|
'Chrome/' + TempChromiumVersion + ' Safari/537.36';
|
||||||
end;
|
end;
|
||||||
|
|
||||||
function TouchPointToPoint(aHandle : HWND; const TouchPoint: TTouchInput): TPoint;
|
{$IFNDEF FPC}
|
||||||
|
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);
|
||||||
PhysicalToLogicalPoint(aHandle, Result);
|
PhysicalToLogicalPoint(aHandle, Result);
|
||||||
end;
|
end;
|
||||||
|
{$ENDIF}
|
||||||
{$ENDIF}
|
{$ENDIF}
|
||||||
|
|
||||||
function DeviceToLogical(aValue : integer; const aDeviceScaleFactor : double) : integer;
|
function DeviceToLogical(aValue : integer; const aDeviceScaleFactor : double) : integer;
|
||||||
@ -2286,5 +2290,5 @@ begin
|
|||||||
|
|
||||||
Result := Result + ';base64,' + CefURIEncode(CefBase64Encode(aData, aSize), false);
|
Result := Result + ';base64,' + CefURIEncode(CefBase64Encode(aData, aSize), false);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
end.
|
end.
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
"UpdateLazPackages" : [
|
"UpdateLazPackages" : [
|
||||||
{
|
{
|
||||||
"ForceNotify" : true,
|
"ForceNotify" : true,
|
||||||
"InternalVersion" : 89,
|
"InternalVersion" : 90,
|
||||||
"Name" : "cef4delphi_lazarus.lpk",
|
"Name" : "cef4delphi_lazarus.lpk",
|
||||||
"Version" : "79.1.36.0"
|
"Version" : "79.1.36.0"
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user