1
0
mirror of https://github.com/salvadordf/CEF4Delphi.git synced 2025-06-12 22:07:39 +02:00

Added support for Lazarus/FPC (windows 32bit)

This commit is contained in:
Salvador Díaz Fau
2018-05-12 14:50:54 +02:00
parent 294a245250
commit dd5f7f42c4
220 changed files with 6385 additions and 4281 deletions

View File

@ -10,7 +10,7 @@
// For more information about CEF4Delphi visit :
// https://www.briskbard.com/index.php?lang=en&pageid=cef
//
// Copyright � 2018 Salvador Daz Fau. All rights reserved.
// Copyright � 2018 Salvador Diaz Fau. All rights reserved.
//
// ************************************************************************
// ************ vvvv Original license and comments below vvvv *************
@ -37,6 +37,10 @@
unit uCEFResourceBundle;
{$IFDEF FPC}
{$MODE OBJFPC}{$H+}
{$ENDIF}
{$IFNDEF CPUX64}
{$ALIGN ON}
{$MINENUMSIZE 4}
@ -66,24 +70,31 @@ uses
uCEFMiscFunctions, uCEFLibFunctions;
function TCefResourceBundleRef.GetDataResource(resourceId : Integer;
var data : Pointer;
var dataSize : NativeUInt): Boolean;
function TCefResourceBundleRef.GetDataResource( resourceId : Integer;
var data : Pointer;
var dataSize : NativeUInt): Boolean;
begin
Result := PCefResourceBundle(FData).get_data_resource(FData, resourceId, data, dataSize) <> 0;
Result := PCefResourceBundle(FData)^.get_data_resource(PCefResourceBundle(FData),
resourceId,
data,
dataSize) <> 0;
end;
function TCefResourceBundleRef.GetDataResourceForScale(resourceId : Integer;
function TCefResourceBundleRef.GetDataResourceForScale( resourceId : Integer;
scaleFactor : TCefScaleFactor;
var data : Pointer;
var dataSize : NativeUInt): Boolean;
begin
Result := PCefResourceBundle(FData).get_data_resource_for_scale(FData, resourceId, scaleFactor, data, dataSize) <> 0;
Result := PCefResourceBundle(FData)^.get_data_resource_for_scale(PCefResourceBundle(FData),
resourceId,
scaleFactor,
data,
dataSize) <> 0;
end;
function TCefResourceBundleRef.GetLocalizedString(stringId: Integer): ustring;
begin
Result := CefStringFreeAndGet(PCefResourceBundle(FData).get_localized_string(FData, stringId));
Result := CefStringFreeAndGet(PCefResourceBundle(FData)^.get_localized_string(PCefResourceBundle(FData), stringId));
end;
class function TCefResourceBundleRef.Global: ICefResourceBundle;