-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathCEF_LCL_BinaryValue.inc
81 lines (71 loc) · 2.18 KB
/
CEF_LCL_BinaryValue.inc
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
//----------------------------------------
// Copyright © yanghy. All Rights Reserved.
//
// Licensed under Lazarus.modifiedLGPL
//----------------------------------------
{== TCefBinaryValueArray ==}
procedure CefBinaryValueArray_Get(const BinaryValueArray: PTCefBinaryValueArray; index: NativeUint; var Result: ICefBinaryValue); extdecl;
begin
handleExceptionBegin
Result := BinaryValueArray^[index];
handleExceptionEnd
end;
{== ICefBinaryValue ==}
procedure CefBinaryValueRef_New(const data: Pointer; dataSize: NativeUInt; var Result: ICefBinaryValue); extdecl;
begin
handleExceptionBegin
Result := TCefBinaryValueRef.New(data, dataSize);
handleExceptionEnd
end;
procedure CefBinaryValueRef_Create(var Result: ICefBinaryValue); extdecl;
begin
handleExceptionBegin
Result := TCefBinaryValueOwn.Create;
handleExceptionEnd
end;
procedure CefBinaryValueRef_UnWrap(const data: ICefBinaryValue; var Result: ICefBinaryValue); extdecl;
begin
handleExceptionBegin
Result := TCefBinaryValueRef.UnWrap(data.Wrap);
handleExceptionEnd
end;
function CefBinaryValue_IsValid(const TObj: ICefBinaryValue): LongBool; extdecl;
begin
handleExceptionBegin
Result := TObj.IsValid();
handleExceptionEnd
end;
function CefBinaryValue_IsOwned(const TObj: ICefBinaryValue): LongBool; extdecl;
begin
handleExceptionBegin
Result := TObj.IsOwned();
handleExceptionEnd
end;
procedure CefBinaryValue_Copy(const TObj: ICefBinaryValue; var Result: ICefBinaryValue); extdecl;
begin
handleExceptionBegin
Result := TObj.Copy();
handleExceptionEnd
end;
function CefBinaryValue_GetSize(const TObj: ICefBinaryValue): NativeUInt; extdecl;
begin
handleExceptionBegin
Result := TObj.GetSize();
handleExceptionEnd
end;
function CefBinaryValue_GetData(const TObj: ICefBinaryValue; buffer: Pointer; bufferSize, dataOffset: NativeUInt): NativeUInt; extdecl;
begin
handleExceptionBegin
Result := TObj.GetData(buffer, bufferSize, dataOffset);
handleExceptionEnd
end;
exports
CefBinaryValueArray_Get,
CefBinaryValueRef_New,
CefBinaryValueRef_Create,
CefBinaryValueRef_UnWrap,
CefBinaryValue_IsValid,
CefBinaryValue_IsOwned,
CefBinaryValue_Copy,
CefBinaryValue_GetSize,
CefBinaryValue_GetData;