Fixed issue #110 : Correct NativeInt and NativeUInt declaration in FPC

This commit is contained in:
Salvador Díaz Fau 2018-05-14 16:12:21 +02:00
parent 1353ccb7af
commit dae14bed08
5 changed files with 30 additions and 17 deletions

View File

@ -4,6 +4,7 @@
<PathDelim Value="\"/>
<Name Value="CEF4Delphi_Lazarus"/>
<Type Value="RunAndDesignTime"/>
<Author Value="Salvador Diaz Fau"/>
<CompilerOptions>
<Version Value="11"/>
<PathDelim Value="\"/>
@ -12,7 +13,14 @@
<OtherUnitFiles Value="..\source"/>
<UnitOutputDirectory Value="lib\$(TargetCPU)-$(TargetOS)"/>
</SearchPaths>
<Parsing>
<SyntaxOptions>
<AllowLabel Value="False"/>
</SyntaxOptions>
</Parsing>
</CompilerOptions>
<Description Value="CEF4Delphi"/>
<Version Major="1"/>
<Files Count="133">
<Item1>
<Filename Value="..\source\uCEFAccessibilityHandler.pas"/>

View File

@ -144,7 +144,7 @@
{$DEFINE DELPHI15_UP}
{$ENDIF}
// Delphi XE2
// Delphi XE2 (First 64bit compiler)
{$IFDEF VER230}
{$UNDEF DELPHI_VERSION_UNKNOW}
{$DEFINE DELPHI5_UP}

View File

@ -500,8 +500,8 @@ begin
UpdateDeviceScaleFactor;
FillChar(FAppSettings, SizeOf(TCefSettings), 0);
FAppSettings.size := SizeOf(TCefSettings);
FillChar(FAppSettings, FAppSettings.size, 0);
FChromeVersionInfo.MajorVer := CEF_CHROMEELF_VERSION_MAJOR;
FChromeVersionInfo.MinorVer := CEF_CHROMEELF_VERSION_MINOR;
@ -952,7 +952,7 @@ begin
InitializeSettings(FAppSettings);
TempArgs.instance := HINSTANCE;
TempArgs.instance := HINSTANCE{$IFDEF FPC}(){$ENDIF};
if (cef_initialize(@TempArgs, @FAppSettings, aApp.Wrap, FWindowsSandboxInfo) <> 0) then
begin

View File

@ -1007,7 +1007,7 @@ end;
function GetModulePath : string;
begin
Result := IncludeTrailingPathDelimiter(ExtractFileDir(GetModuleName(HInstance)));
Result := IncludeTrailingPathDelimiter(ExtractFileDir(GetModuleName(HINSTANCE{$IFDEF FPC}(){$ENDIF})));
end;
function CefParseUrl(const url: ustring; var parts: TUrlParts): Boolean;

View File

@ -234,23 +234,28 @@ type
TCefSSLContentStatus = Cardinal; // /include/internal/cef_types.h (cef_ssl_content_status_t)
TCefLogSeverity = Cardinal; // /include/internal/cef_types.h (cef_log_severity_t)
{$IFNDEF DELPHI12_UP}
NativeUInt = Cardinal;
{$IFDEF FPC}
NativeInt = PtrInt;
NativeUInt = PtrUInt;
PNativeInt = ^NativeInt;
PNativeUInt = ^NativeUInt;
NativeInt = Integer;
uint16 = Word;
{$IFDEF FPC}
ustring = type UnicodeString;
{$ELSE}
ustring = type WideString;
{$ENDIF}
rbstring = type AnsiString;
{$ELSE}
ustring = type string;
rbstring = type RawByteString;
{$IFNDEF DELPHI15_UP}
NativeUInt = Cardinal;
PNativeUInt = ^NativeUInt;
{$IFNDEF DELPHI12_UP}
NativeUInt = Cardinal;
PNativeUInt = ^NativeUInt;
NativeInt = Integer;
uint16 = Word;
ustring = type WideString;
rbstring = type AnsiString;
{$ELSE}
ustring = type string;
rbstring = type RawByteString;
{$IFNDEF DELPHI15_UP}
NativeUInt = Cardinal;
PNativeUInt = ^NativeUInt;
{$ENDIF}
{$ENDIF}
{$ENDIF}