You've already forked CEF4Delphi
mirror of
https://github.com/salvadordf/CEF4Delphi.git
synced 2025-11-23 21:34:53 +02:00
Added support for Lazarus/FPC (windows 32bit)
This commit is contained in:
@@ -10,7 +10,7 @@
|
||||
// For more information about CEF4Delphi visit :
|
||||
// https://www.briskbard.com/index.php?lang=en&pageid=cef
|
||||
//
|
||||
// Copyright � 2018 Salvador D�az Fau. All rights reserved.
|
||||
// Copyright � 2018 Salvador Diaz Fau. All rights reserved.
|
||||
//
|
||||
// ************************************************************************
|
||||
// ************ vvvv Original license and comments below vvvv *************
|
||||
@@ -37,6 +37,10 @@
|
||||
|
||||
unit uCEFv8StackFrame;
|
||||
|
||||
{$IFDEF FPC}
|
||||
{$MODE OBJFPC}{$H+}
|
||||
{$ENDIF}
|
||||
|
||||
{$IFNDEF CPUX64}
|
||||
{$ALIGN ON}
|
||||
{$MINENUMSIZE 4}
|
||||
@@ -71,48 +75,49 @@ uses
|
||||
|
||||
function TCefV8StackFrameRef.GetColumn: Integer;
|
||||
begin
|
||||
Result := PCefV8StackFrame(FData).get_column(FData);
|
||||
Result := PCefV8StackFrame(FData)^.get_column(PCefV8StackFrame(FData));
|
||||
end;
|
||||
|
||||
function TCefV8StackFrameRef.GetFunctionName: ustring;
|
||||
begin
|
||||
Result := CefStringFreeAndGet(PCefV8StackFrame(FData).get_function_name(FData));
|
||||
Result := CefStringFreeAndGet(PCefV8StackFrame(FData)^.get_function_name(PCefV8StackFrame(FData)));
|
||||
end;
|
||||
|
||||
function TCefV8StackFrameRef.GetLineNumber: Integer;
|
||||
begin
|
||||
Result := PCefV8StackFrame(FData).get_line_number(FData);
|
||||
Result := PCefV8StackFrame(FData)^.get_line_number(PCefV8StackFrame(FData));
|
||||
end;
|
||||
|
||||
function TCefV8StackFrameRef.GetScriptName: ustring;
|
||||
begin
|
||||
Result := CefStringFreeAndGet(PCefV8StackFrame(FData).get_script_name(FData));
|
||||
Result := CefStringFreeAndGet(PCefV8StackFrame(FData)^.get_script_name(PCefV8StackFrame(FData)));
|
||||
end;
|
||||
|
||||
function TCefV8StackFrameRef.GetScriptNameOrSourceUrl: ustring;
|
||||
begin
|
||||
Result := CefStringFreeAndGet(PCefV8StackFrame(FData).get_script_name_or_source_url(FData));
|
||||
Result := CefStringFreeAndGet(PCefV8StackFrame(FData)^.get_script_name_or_source_url(PCefV8StackFrame(FData)));
|
||||
end;
|
||||
|
||||
function TCefV8StackFrameRef.IsConstructor: Boolean;
|
||||
begin
|
||||
Result := PCefV8StackFrame(FData).is_constructor(FData) <> 0;
|
||||
Result := PCefV8StackFrame(FData)^.is_constructor(PCefV8StackFrame(FData)) <> 0;
|
||||
end;
|
||||
|
||||
function TCefV8StackFrameRef.IsEval: Boolean;
|
||||
begin
|
||||
Result := PCefV8StackFrame(FData).is_eval(FData) <> 0;
|
||||
Result := PCefV8StackFrame(FData)^.is_eval(PCefV8StackFrame(FData)) <> 0;
|
||||
end;
|
||||
|
||||
function TCefV8StackFrameRef.IsValid: Boolean;
|
||||
begin
|
||||
Result := PCefV8StackFrame(FData).is_valid(FData) <> 0;
|
||||
Result := PCefV8StackFrame(FData)^.is_valid(PCefV8StackFrame(FData)) <> 0;
|
||||
end;
|
||||
|
||||
class function TCefV8StackFrameRef.UnWrap(data: Pointer): ICefV8StackFrame;
|
||||
begin
|
||||
if data <> nil then
|
||||
Result := Create(data) as ICefV8StackFrame else
|
||||
if (data <> nil) then
|
||||
Result := Create(data) as ICefV8StackFrame
|
||||
else
|
||||
Result := nil;
|
||||
end;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user