-
Notifications
You must be signed in to change notification settings - Fork 77
/
Copy pathSRLLape.simba
73 lines (63 loc) · 1.69 KB
/
SRLLape.simba
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
{$IFNDECL NPCChars}{$DEFINE NPCChars}{$ENDIF}
function iAbs(i: Integer): Integer;
begin
if (i < 0) then
Result := -i
else
Result := i;
end;
function ReplaceWrap(Text, FindStr, ReplaceStr: string; Flags: TReplaceFlags): string;
begin
Result := StringReplace(Text, FindStr, ReplaceStr, Flags);
end;
function GetTextAtExWrap(const xs, ys, xe, ye, minvspacing, maxvspacing, hspacing, color, tol: Integer; const font: string): string;
begin
Result := GetTextAtEx(xs, ys, xe, ye, minvspacing, maxvspacing, hspacing, color, tol, font);
end;
function InitializeHTTPClientWrap(HandleCookies: Boolean): Integer;
begin
Result := InitializeHTTPClient(HandleCookies);
end;
function ThreadSafeCall(s: string; params: TVariantArray): Variant;
begin
WriteLn('ThreadSafeCall "', s, '" (not supported in Lape)');
Result := NULL;
end;
function CallProc(s: string; params: TVariantArray): Variant;
begin
{$IFDEF Lape_ExposeGlobals}
Result := VariantInvoke(s, Params);
{$ELSE}
WriteLn('CallProc "', s, '" (not supported in Lape)');
Result := NULL;
{$ENDIF}
end;
function ExceptionType: TIFException;
begin
WriteLn('ExceptionType is not supported in Lape');
Result := erCustomError;
end;
function ExceptionParam: string;
begin
WriteLn('ExceptionParam is not supported in Lape');
Result := '';
end;
const
clWhite = 16777215;
clBlack = 0;
clRed = 255;
clGreen = 32768;
clBlue = 16711680;
clPurple = 8388736;
clYellow = 65535;
clAqua = 16776960;
clOrange = 26367;
clFuchsia = 16711935;
clTeal = 8421376;
clNavy = 8388608;
clGray = 8421504;
clLime = 65280;
clMaroon = 128;
clSilver = 12632256;
clPink = 11772650;
MaxInt = High(Integer);