mirror of
https://github.com/salvadordf/CEF4Delphi.git
synced 2024-11-15 15:55:56 +01:00
Fixed building errors and warnings on FMX for MacOS and Linux thanks to Christoph Schneider
This commit is contained in:
parent
739b510526
commit
b4a2cee7f5
@ -617,7 +617,9 @@ implementation
|
||||
|
||||
uses
|
||||
{$IFDEF DELPHI16_UP}
|
||||
System.Math, System.IOUtils, System.SysUtils, {$IFDEF MSWINDOWS}WinApi.TlHelp32, WinApi.PSAPI,{$ENDIF}
|
||||
System.Math, System.IOUtils, System.SysUtils,
|
||||
{$IFDEF MSWINDOWS}WinApi.TlHelp32, WinApi.PSAPI,{$ENDIF}
|
||||
{$IFDEF LINUX}{$IFDEF FMX}Posix.Unistd, Posix.Stdio,{$ENDIF}{$ENDIF}
|
||||
{$ELSE}
|
||||
Math, {$IFDEF DELPHI14_UP}IOUtils,{$ENDIF} SysUtils,
|
||||
{$IFDEF FPC}
|
||||
@ -1227,6 +1229,7 @@ begin
|
||||
try
|
||||
if (aApp <> nil) then
|
||||
begin
|
||||
{$WARN SYMBOL_PLATFORM OFF}
|
||||
{$IFDEF MSWINDOWS}
|
||||
TempArgs.instance := HINSTANCE{$IFDEF FPC}(){$ENDIF};
|
||||
{$ELSE}
|
||||
@ -1249,7 +1252,7 @@ begin
|
||||
{$ENDIF}
|
||||
{$ENDIF}
|
||||
{$ENDIF}
|
||||
|
||||
{$WARN SYMBOL_PLATFORM ON}
|
||||
Result := cef_execute_process(@TempArgs, aApp.Wrap, FWindowsSandboxInfo);
|
||||
end;
|
||||
except
|
||||
@ -1321,6 +1324,7 @@ begin
|
||||
{$IFDEF MSWINDOWS}
|
||||
TempArgs.instance := HINSTANCE{$IFDEF FPC}(){$ENDIF};
|
||||
{$ELSE}
|
||||
{$WARN SYMBOL_PLATFORM OFF}
|
||||
{$IFDEF LINUX}
|
||||
{$IFDEF FPC}
|
||||
TempArgs.argc := argc;
|
||||
@ -1339,6 +1343,7 @@ begin
|
||||
TempArgs.argv := 0;
|
||||
{$ENDIF}
|
||||
{$ENDIF}
|
||||
{$WARN SYMBOL_PLATFORM ON}
|
||||
{$ENDIF}
|
||||
|
||||
if (cef_initialize(@TempArgs, @FAppSettings, aApp.Wrap, FWindowsSandboxInfo) <> 0) then
|
||||
|
@ -385,15 +385,15 @@ begin
|
||||
end;
|
||||
|
||||
function TFMXBufferPanel.GetRealScreenScale(var aResultScale : single) : boolean;
|
||||
{$IFDEF DELPHI24_UP}
|
||||
{$IFDEF DELPHI24_UP}{$IFDEF MSWINDOWS}
|
||||
var
|
||||
TempHandle : TCefWindowHandle;
|
||||
{$ENDIF}
|
||||
{$ENDIF}{$ENDIF}
|
||||
begin
|
||||
Result := False;
|
||||
aResultScale := 1;
|
||||
|
||||
{$IFDEF DELPHI24_UP}
|
||||
{$IFDEF DELPHI24_UP}{$IFDEF MSWINDOWS}
|
||||
TempHandle := GetParentFormHandle;
|
||||
|
||||
if (TempHandle <> 0) then
|
||||
@ -401,7 +401,7 @@ begin
|
||||
Result := True;
|
||||
aResultScale := GetWndScale(TempHandle);
|
||||
end;
|
||||
{$ENDIF}
|
||||
{$ENDIF}{$ENDIF}
|
||||
end;
|
||||
|
||||
function TFMXBufferPanel.GetScreenScale : single;
|
||||
|
@ -164,18 +164,18 @@ begin
|
||||
end;
|
||||
|
||||
function TFMXChromium.GetScreenScale : Single;
|
||||
{$IFDEF DELPHI24_UP}
|
||||
{$IFDEF DELPHI24_UP}{$IFDEF MSWINDOWS}
|
||||
var
|
||||
TempHandle : TCefWindowHandle;
|
||||
{$ENDIF}
|
||||
{$ENDIF}{$ENDIF}
|
||||
begin
|
||||
{$IFDEF DELPHI24_UP}
|
||||
{$IFDEF DELPHI24_UP}{$IFDEF MSWINDOWS}
|
||||
TempHandle := GetParentFormHandle;
|
||||
|
||||
if (TempHandle <> 0) then
|
||||
Result := GetWndScale(TempHandle)
|
||||
else
|
||||
{$ENDIF}
|
||||
{$ENDIF}{$ENDIF}
|
||||
if (GlobalCEFApp <> nil) then
|
||||
Result := GlobalCEFApp.DeviceScaleFactor
|
||||
else
|
||||
|
@ -328,6 +328,7 @@ procedure ShowX11Message(const aMessage : string);
|
||||
implementation
|
||||
|
||||
uses
|
||||
{$IFDEF LINUX}{$IFDEF FMX}Posix.Unistd, Posix.Stdio,{$ENDIF}{$ENDIF}
|
||||
uCEFApplicationCore, uCEFSchemeHandlerFactory, uCEFValue,
|
||||
uCEFBinaryValue, uCEFStringList;
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
// ************************************************************************
|
||||
// ************************************************************************
|
||||
// ***************************** CEF4Delphi *******************************
|
||||
// ************************************************************************
|
||||
//
|
||||
@ -10,7 +10,7 @@
|
||||
// For more information about CEF4Delphi visit :
|
||||
// https://www.briskbard.com/index.php?lang=en&pageid=cef
|
||||
//
|
||||
// Copyright © 2021 Salvador Diaz Fau. All rights reserved.
|
||||
// Copyright © 2021 Salvador Diaz Fau. All rights reserved.
|
||||
//
|
||||
// ************************************************************************
|
||||
// ************ vvvv Original license and comments below vvvv *************
|
||||
|
@ -2,7 +2,7 @@
|
||||
"UpdateLazPackages" : [
|
||||
{
|
||||
"ForceNotify" : true,
|
||||
"InternalVersion" : 230,
|
||||
"InternalVersion" : 231,
|
||||
"Name" : "cef4delphi_lazarus.lpk",
|
||||
"Version" : "87.1.13.0"
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user