|
@@ -5,10 +5,23 @@ unit tcwebidl2wasmjob;
|
|
|
interface
|
|
|
|
|
|
uses
|
|
|
- Classes, SysUtils, fpcunit, testregistry, webidlscanner, webidltopas, webidltowasmjob, pascodegen;
|
|
|
+ Classes, SysUtils, fpcunit, testregistry, webidldefs, webidlscanner, webidltopas, webidltowasmjob, pascodegen;
|
|
|
+
|
|
|
+const
|
|
|
+ FixedGUID = '{1B6D2766-7DA6-40FA-9B4E-93FFB805B83A}';
|
|
|
|
|
|
type
|
|
|
|
|
|
+ { TTestWebIDLToPasWasmJob }
|
|
|
+
|
|
|
+ TTestWebIDLToPasWasmJob = class(TWebIDLToPasWasmJob)
|
|
|
+ private
|
|
|
+ FRealGUID: Boolean;
|
|
|
+ Public
|
|
|
+ function ComputeGUID(const Prefix: TIDLString; aList: TIDLDefinitionList): TIDLString; override;
|
|
|
+ Property RealGUID : Boolean Read FRealGUID Write FRealGUID;
|
|
|
+ end;
|
|
|
+
|
|
|
{ TCustomTestWebIDL2WasmJob }
|
|
|
|
|
|
TCustomTestWebIDL2WasmJob = Class(TTestCase)
|
|
@@ -319,6 +332,16 @@ begin
|
|
|
until false;
|
|
|
end;
|
|
|
|
|
|
+{ TTestWebIDLToPasWasmJob }
|
|
|
+
|
|
|
+function TTestWebIDLToPasWasmJob.ComputeGUID(const Prefix: TIDLString; aList: TIDLDefinitionList): TIDLString;
|
|
|
+begin
|
|
|
+ if RealGUID then
|
|
|
+ Result:=inherited ComputeGUID(Prefix, aList)
|
|
|
+ else
|
|
|
+ Result:=FixedGUID;
|
|
|
+end;
|
|
|
+
|
|
|
{ TCustomTestWebIDL2WasmJob }
|
|
|
|
|
|
procedure TCustomTestWebIDL2WasmJob.OnLog(Sender: TObject;
|
|
@@ -332,7 +355,7 @@ end;
|
|
|
procedure TCustomTestWebIDL2WasmJob.Setup;
|
|
|
begin
|
|
|
inherited Setup;
|
|
|
- FWebIDLToPas:=TWebIDLToPasWasmJob.Create(nil);
|
|
|
+ FWebIDLToPas:=TTestWebIDLToPasWasmJob.Create(nil);
|
|
|
WebIDLToPas.OnLog:=@OnLog;
|
|
|
WebIDLToPas.InputFileName:='test1.webidl';
|
|
|
WebIDLToPas.OutputFileName:='test1.pas';
|
|
@@ -444,7 +467,7 @@ begin
|
|
|
['Type',
|
|
|
' // Forward class definitions',
|
|
|
' TPerformanceEntry = Boolean;',
|
|
|
- ' TPerformanceEntryDynArray = IJSArray; // array of TPerformanceEntry',
|
|
|
+ ' TPerformanceEntryListDynArray = IJSArray; // array of PerformanceEntry',
|
|
|
'implementation',
|
|
|
'end.',
|
|
|
'']);
|
|
@@ -482,7 +505,7 @@ begin
|
|
|
' --------------------------------------------------------------------}',
|
|
|
'',
|
|
|
' IJSAttr = interface(IJSObject)',
|
|
|
- ' [''{AA94F48A-7955-3EBA-B086-85B24440AF2A}'']',
|
|
|
+ ' ['''+FixedGUID+''']',
|
|
|
' function _GetaBoolean: Boolean;',
|
|
|
' procedure _SetaBoolean(const aValue: Boolean);',
|
|
|
' property aBoolean: Boolean read _GetaBoolean write _SetaBoolean;',
|
|
@@ -534,7 +557,7 @@ begin
|
|
|
' --------------------------------------------------------------------}',
|
|
|
'',
|
|
|
' IJSAttr = interface(IJSObject)',
|
|
|
- ' [''{AA94F45E-60F0-381A-A2A6-208CA4B2AF2A}'']',
|
|
|
+ ' ['''+FixedGUID+''']',
|
|
|
' end;',
|
|
|
'',
|
|
|
' TJSAttr = class(TJSObject,IJSAttr)',
|
|
@@ -572,7 +595,7 @@ begin
|
|
|
' --------------------------------------------------------------------}',
|
|
|
'',
|
|
|
' IJSAttr = interface(IJSObject)',
|
|
|
- ' [''{2D39068A-1305-3879-B4DC-37563664D5F5}'']',
|
|
|
+ ' ['''+FixedGUID+''']',
|
|
|
' function _Getsignature: IJSArrayBuffer;',
|
|
|
' property signature: IJSArrayBuffer read _Getsignature;',
|
|
|
' end;',
|
|
@@ -621,7 +644,7 @@ begin
|
|
|
' --------------------------------------------------------------------}',
|
|
|
'',
|
|
|
' IJSAttr = interface(IJSObject)',
|
|
|
- ' [''{2D390654-2475-3879-B4DC-37563664D5F5}'']',
|
|
|
+ ' ['''+FixedGUID+''']',
|
|
|
' function _Getsignature: IJSArrayBufferView;',
|
|
|
' property signature: IJSArrayBufferView read _Getsignature;',
|
|
|
' end;',
|
|
@@ -669,7 +692,7 @@ begin
|
|
|
' --------------------------------------------------------------------}',
|
|
|
'',
|
|
|
' IJSAttr = interface(IJSObject)',
|
|
|
- ' [''{AA94F48A-149D-354C-96E7-B1ACA4B2AF2A}'']',
|
|
|
+ ' ['''+FixedGUID+''']',
|
|
|
' end;',
|
|
|
'',
|
|
|
' TJSAttr = class(TJSObject,IJSAttr)',
|
|
@@ -704,11 +727,11 @@ begin
|
|
|
'',
|
|
|
'implementation',
|
|
|
'',
|
|
|
- 'function JOBCallTAudioWorkletProcessorConstructor(const aMethod: TMethod; var H: TJOBCallbackHelper): PByte;',
|
|
|
+ 'function JOBCallAudioWorkletProcessorConstructor(const aMethod: TMethod; var H: TJOBCallbackHelper): PByte;',
|
|
|
' var',
|
|
|
' options: IJSObject;',
|
|
|
'begin',
|
|
|
- ' options:=H.GetObject;',
|
|
|
+ ' options:=H.GetObject(TJSObject) as IJSObject;',
|
|
|
' Result:=H.AllocIntf(TAudioWorkletProcessorConstructor(aMethod)(options));',
|
|
|
'end;',
|
|
|
'',
|
|
@@ -729,16 +752,16 @@ begin
|
|
|
'Type',
|
|
|
'// Forward class definitions',
|
|
|
' TE = UnicodeString;',
|
|
|
- ' Tgetit = function (a: TE): Integer of object;',
|
|
|
+ ' Tgetit = function (a: TE): LongInt of object;',
|
|
|
'',
|
|
|
'implementation',
|
|
|
'',
|
|
|
- 'function JOBCallTgetit(const aMethod: TMethod; var H: TJOBCallbackHelper): PByte; ',
|
|
|
+ 'function JOBCallgetit(const aMethod: TMethod; var H: TJOBCallbackHelper): PByte; ',
|
|
|
'var',
|
|
|
' a: TE;',
|
|
|
'begin',
|
|
|
' a:=H.GetString;',
|
|
|
- ' Result:=H.AllocLongint(Tgetit(aMethod)(a));',
|
|
|
+ ' Result:=H.AllocLongInt(Tgetit(aMethod)(a));',
|
|
|
'end;',
|
|
|
'',
|
|
|
'end.'
|
|
@@ -754,17 +777,17 @@ begin
|
|
|
],[
|
|
|
'Type',
|
|
|
'// Forward class definitions',
|
|
|
- ' TIntegerDynArray = IJSArray; // array of Integer',
|
|
|
- ' Tgetit = function (const a: TIntegerDynArray): Integer of object;',
|
|
|
+ ' TEDynArray = IJSArray; // array of long',
|
|
|
+ ' Tgetit = function (const a: TEDynArray): LongInt of object;',
|
|
|
'',
|
|
|
'implementation',
|
|
|
'',
|
|
|
- 'function JOBCallTgetit(const aMethod: TMethod; var H: TJOBCallbackHelper): PByte; ',
|
|
|
+ 'function JOBCallgetit(const aMethod: TMethod; var H: TJOBCallbackHelper): PByte; ',
|
|
|
'var',
|
|
|
- ' a: TIntegerDynArray;',
|
|
|
+ ' a: TEDynArray;',
|
|
|
'begin',
|
|
|
- ' a:=H.GetArray;',
|
|
|
- ' Result:=H.AllocLongint(Tgetit(aMethod)(a));',
|
|
|
+ ' a:=H.GetObject(TJSArray) as IJSArray;',
|
|
|
+ ' Result:=H.AllocLongInt(Tgetit(aMethod)(a));',
|
|
|
'end;',
|
|
|
'',
|
|
|
'end.'
|
|
@@ -787,7 +810,7 @@ begin
|
|
|
' --------------------------------------------------------------------}',
|
|
|
'',
|
|
|
' IJSAttr = interface(IJSObject)',
|
|
|
- ' [''{AA94F48A-84D7-3FAA-A2A6-208CA4B2AF2A}'']',
|
|
|
+ ' ['''+FixedGUID+''']',
|
|
|
' procedure append(aNode: IJSAttr);',
|
|
|
' end;',
|
|
|
'',
|
|
@@ -829,7 +852,7 @@ begin
|
|
|
' // Forward class definitions',
|
|
|
' IJSAttr = interface;',
|
|
|
' TJSAttr = class;',
|
|
|
- ' TEventHandlerNonNull = function (event: Integer): Variant of object;',
|
|
|
+ ' TEventHandlerNonNull = function (event: LongInt): Variant of object;',
|
|
|
' TEventHandler = TEventHandlerNonNull;',
|
|
|
'',
|
|
|
' { --------------------------------------------------------------------',
|
|
@@ -837,7 +860,7 @@ begin
|
|
|
' --------------------------------------------------------------------}',
|
|
|
'',
|
|
|
' IJSAttr = interface(IJSObject)',
|
|
|
- ' [''{AA94F48A-121D-33BC-96FE-420246F2AF2A}'']',
|
|
|
+ ' ['''+FixedGUID+''']',
|
|
|
' procedure setEventHandler(const aHandler: TEventHandler);',
|
|
|
' end;',
|
|
|
'',
|
|
@@ -850,9 +873,9 @@ begin
|
|
|
'',
|
|
|
'implementation',
|
|
|
'',
|
|
|
- 'function JOBCallTEventHandlerNonNull(const aMethod: TMethod; var H: TJOBCallbackHelper): PByte;',
|
|
|
+ 'function JOBCallEventHandlerNonNull(const aMethod: TMethod; var H: TJOBCallbackHelper): PByte;',
|
|
|
'var',
|
|
|
- ' event: Integer;',
|
|
|
+ ' event: LongInt;',
|
|
|
'begin',
|
|
|
' event:=H.GetLongInt;',
|
|
|
' Result:=H.AllocVariant(TEventHandlerNonNull(aMethod)(event));',
|
|
@@ -862,7 +885,7 @@ begin
|
|
|
'var',
|
|
|
' m: TJOB_Method;',
|
|
|
'begin',
|
|
|
- ' m:=TJOB_Method.Create(TMethod(aHandler),@JOBCallTEventHandlerNonNull);',
|
|
|
+ ' m:=TJOB_Method.Create(TMethod(aHandler),@JOBCallEventHandlerNonNull);',
|
|
|
' try',
|
|
|
' InvokeJSNoResult(''setEventHandler'',[m]);',
|
|
|
' finally',
|
|
@@ -898,7 +921,7 @@ begin
|
|
|
' --------------------------------------------------------------------}',
|
|
|
'',
|
|
|
' IJSAttr = interface(IJSObject)',
|
|
|
- ' [''{74BB0007-0E0F-3C5D-B270-B1C656002861}'']',
|
|
|
+ ' ['''+FixedGUID+''']',
|
|
|
' function exitFullscreen: IJSPromise; // Promise<void>',
|
|
|
' function addCertException(aIsTemporary: Boolean): IJSPromise; // Promise<any>',
|
|
|
' function fly: IJSPromise; // Promise<Attr>',
|
|
@@ -955,7 +978,7 @@ begin
|
|
|
' --------------------------------------------------------------------}',
|
|
|
'',
|
|
|
' IJSAttr = interface(IJSObject)',
|
|
|
- ' [''{AA94F48A-84D7-3FAA-A2A6-208CA4B2AF2A}'']',
|
|
|
+ ' ['''+FixedGUID+''']',
|
|
|
' procedure append(const aNode: Variant);',
|
|
|
' end;',
|
|
|
'',
|
|
@@ -1002,22 +1025,22 @@ begin
|
|
|
' TJSIE',
|
|
|
' --------------------------------------------------------------------}',
|
|
|
' IJSIE = interface(IJSObject)',
|
|
|
- ' [''{04D06E4C-6063-3E89-A483-3296C9C8AA41}'']',
|
|
|
- ' function get(a: Integer) : TE;',
|
|
|
+ ' ['''+FixedGUID+''']',
|
|
|
+ ' function get(aA: LongInt) : TE;',
|
|
|
' end;',
|
|
|
'',
|
|
|
' TJSIE = class(TJSObject,IJSIE)',
|
|
|
' Private',
|
|
|
' Public',
|
|
|
- ' function get(a: Integer) : TE;',
|
|
|
+ ' function get(aA: LongInt) : TE;',
|
|
|
' class function Cast(const Intf: IJSObject): IJSIE;',
|
|
|
' end;',
|
|
|
'',
|
|
|
'implementation',
|
|
|
'',
|
|
|
- 'function TJSIE.get(a: Integer) : TE;',
|
|
|
+ 'function TJSIE.get(aA: LongInt) : TE;',
|
|
|
'begin',
|
|
|
- ' Result:=InvokeJSUnicodeStringResult(''get'',[a]);',
|
|
|
+ ' Result:=InvokeJSUnicodeStringResult(''get'',[aA]);',
|
|
|
'end;',
|
|
|
'',
|
|
|
'class function TJSIE.Cast(const Intf: IJSObject): IJSIE;',
|
|
@@ -1047,23 +1070,23 @@ begin
|
|
|
' TJSAttr',
|
|
|
' --------------------------------------------------------------------}',
|
|
|
'',
|
|
|
- ' TIntegerDynArray = IJSArray; // array of Integer',
|
|
|
+ ' TLongIntDynArray = IJSArray; // array of long',
|
|
|
'',
|
|
|
' IJSAttr = interface(IJSObject)',
|
|
|
- ' [''{AA94F48A-2BFB-3877-82A6-208CA4B2AF2A}'']',
|
|
|
- ' function vibrate(const aPattern: TIntegerDynArray): Boolean;',
|
|
|
+ ' ['''+FixedGUID+''']',
|
|
|
+ ' function vibrate(const aPattern: TLongIntDynArray): Boolean;',
|
|
|
' end;',
|
|
|
'',
|
|
|
' TJSAttr = class(TJSObject,IJSAttr)',
|
|
|
' Private',
|
|
|
' Public',
|
|
|
- ' function vibrate(const aPattern: TIntegerDynArray): Boolean;',
|
|
|
+ ' function vibrate(const aPattern: TLongIntDynArray): Boolean;',
|
|
|
' class function Cast(const Intf: IJSObject): IJSAttr;',
|
|
|
' end;',
|
|
|
'',
|
|
|
'implementation',
|
|
|
'',
|
|
|
- 'function TJSAttr.vibrate(const aPattern: TIntegerDynArray): Boolean;',
|
|
|
+ 'function TJSAttr.vibrate(const aPattern: TLongIntDynArray): Boolean;',
|
|
|
'begin',
|
|
|
' Result:=InvokeJSBooleanResult(''vibrate'',[aPattern]);',
|
|
|
'end;',
|
|
@@ -1096,30 +1119,30 @@ begin
|
|
|
' TJSAttr',
|
|
|
' --------------------------------------------------------------------}',
|
|
|
'',
|
|
|
- ' TIntegerDynArray = IJSArray; // array of Integer',
|
|
|
+ ' TLongIntDynArray = IJSArray; // array of long',
|
|
|
'',
|
|
|
' IJSAttr = interface(IJSObject)',
|
|
|
- ' [''{AA94F48A-8A01-3EFF-A44E-4EDCA4B2AF2A}'']',
|
|
|
- ' function vibrate(const aPattern: TIntegerDynArray): Boolean;',
|
|
|
- ' function beep(const aPattern: TIntegerDynArray): Boolean;',
|
|
|
+ ' ['''+FixedGUID+''']',
|
|
|
+ ' function vibrate(const aPattern: TLongIntDynArray): Boolean;',
|
|
|
+ ' function beep(const aPattern: TLongIntDynArray): Boolean;',
|
|
|
' end;',
|
|
|
'',
|
|
|
' TJSAttr = class(TJSObject,IJSAttr)',
|
|
|
' Private',
|
|
|
' Public',
|
|
|
- ' function vibrate(const aPattern: TIntegerDynArray): Boolean;',
|
|
|
- ' function beep(const aPattern: TIntegerDynArray): Boolean;',
|
|
|
+ ' function vibrate(const aPattern: TLongIntDynArray): Boolean;',
|
|
|
+ ' function beep(const aPattern: TLongIntDynArray): Boolean;',
|
|
|
' class function Cast(const Intf: IJSObject): IJSAttr;',
|
|
|
' end;',
|
|
|
'',
|
|
|
'implementation',
|
|
|
'',
|
|
|
- 'function TJSAttr.vibrate(const aPattern: TIntegerDynArray): Boolean;',
|
|
|
+ 'function TJSAttr.vibrate(const aPattern: TLongIntDynArray): Boolean;',
|
|
|
'begin',
|
|
|
' Result:=InvokeJSBooleanResult(''vibrate'',[aPattern]);',
|
|
|
'end;',
|
|
|
'',
|
|
|
- 'function TJSAttr.beep(const aPattern: TIntegerDynArray): Boolean;',
|
|
|
+ 'function TJSAttr.beep(const aPattern: TLongIntDynArray): Boolean;',
|
|
|
'begin',
|
|
|
' Result:=InvokeJSBooleanResult(''beep'',[aPattern]);',
|
|
|
'end;',
|
|
@@ -1149,19 +1172,19 @@ begin
|
|
|
' --------------------------------------------------------------------}',
|
|
|
'',
|
|
|
' IJSAttr = interface(IJSObject)',
|
|
|
- ' [''{AA94F48A-EA1E-381A-A2A6-208CA4B2AF2A}'']',
|
|
|
+ ' ['''+FixedGUID+''']',
|
|
|
' end;',
|
|
|
'',
|
|
|
' TJSAttr = class(TJSObject,IJSAttr)',
|
|
|
' Private',
|
|
|
' Public',
|
|
|
- ' class function Create(aOptions : Integer) : TJSAttr;',
|
|
|
+ ' class function Create(aOptions: LongInt) : TJSAttr;',
|
|
|
' class function Cast(const Intf: IJSObject): IJSAttr;',
|
|
|
' end;',
|
|
|
'',
|
|
|
'implementation',
|
|
|
'',
|
|
|
- 'class function TJSAttr.Create(aOptions: Integer) : TJSAttr;',
|
|
|
+ 'class function TJSAttr.Create(aOptions: LongInt) : TJSAttr;',
|
|
|
'begin',
|
|
|
' Result:=InvokeJSObjectResult(''Attr'',[aOptions],TJSAttr) as TJSAttr;',
|
|
|
'end;',
|
|
@@ -1191,7 +1214,7 @@ begin
|
|
|
' --------------------------------------------------------------------}',
|
|
|
'',
|
|
|
' IJSAttr = interface(IJSObject)',
|
|
|
- ' [''{AA94F48A-84D7-3FB2-97EF-71ACA4B2AF2A}'']',
|
|
|
+ ' ['''+FixedGUID+''']',
|
|
|
' procedure appendBuffer(aData: IJSArrayBuffer);',
|
|
|
' end;',
|
|
|
'',
|
|
@@ -1235,7 +1258,7 @@ begin
|
|
|
' --------------------------------------------------------------------}',
|
|
|
'',
|
|
|
' IJSAttr = interface(IJSObject)',
|
|
|
- ' [''{AA94F48A-84D7-3FB2-97EF-71ACA4B2AF2A}'']',
|
|
|
+ ' ['''+FixedGUID+''']',
|
|
|
' procedure appendBuffer(aData: IJSArrayBufferView);',
|
|
|
' end;',
|
|
|
'',
|
|
@@ -1280,25 +1303,25 @@ begin
|
|
|
' TJSAttr',
|
|
|
' --------------------------------------------------------------------}',
|
|
|
'',
|
|
|
- ' TIntegerDynArray = IJSArray; // array of Integer',
|
|
|
+ ' TLongIntDynArray = IJSArray; // array of long',
|
|
|
'',
|
|
|
' IJSAttr = interface(IJSObject)',
|
|
|
- ' [''{AA94F48A-2BFB-3877-82A6-208CA4B2AF2A}'']',
|
|
|
- ' function vibrate: TIntegerDynArray;',
|
|
|
+ ' ['''+FixedGUID+''']',
|
|
|
+ ' function vibrate: TLongIntDynArray;',
|
|
|
' end;',
|
|
|
'',
|
|
|
' TJSAttr = class(TJSObject,IJSAttr)',
|
|
|
' Private',
|
|
|
' Public',
|
|
|
- ' function vibrate: TIntegerDynArray;',
|
|
|
+ ' function vibrate: TLongIntDynArray;',
|
|
|
' class function Cast(const Intf: IJSObject): IJSAttr;',
|
|
|
' end;',
|
|
|
'',
|
|
|
'implementation',
|
|
|
'',
|
|
|
- 'function TJSAttr.vibrate: TIntegerDynArray;',
|
|
|
+ 'function TJSAttr.vibrate: TLongIntDynArray;',
|
|
|
'begin',
|
|
|
- ' Result:=InvokeJSObjectResult(''vibrate'',[],TJSArray) as TIntegerDynArray;',
|
|
|
+ ' Result:=InvokeJSObjectResult(''vibrate'',[],TJSArray) as TLongIntDynArray;',
|
|
|
'end;',
|
|
|
'',
|
|
|
'class function TJSAttr.Cast(const Intf: IJSObject): IJSAttr;',
|
|
@@ -1324,29 +1347,29 @@ begin
|
|
|
' // Forward class definitions',
|
|
|
' IJSAttr = interface;',
|
|
|
' TJSAttr = class;',
|
|
|
- ' TIntegerDynArray = IJSArray; // array of Integer',
|
|
|
+ ' TLongSeqDynArray = IJSArray; // array of long',
|
|
|
'',
|
|
|
' { --------------------------------------------------------------------',
|
|
|
' TJSAttr',
|
|
|
' --------------------------------------------------------------------}',
|
|
|
'',
|
|
|
' IJSAttr = interface(IJSObject)',
|
|
|
- ' [''{AA94F48A-2BFB-3877-82A6-208CA4B2AF2A}'']',
|
|
|
- ' function vibrate: TIntegerDynArray;',
|
|
|
+ ' ['''+FixedGUID+''']',
|
|
|
+ ' function vibrate: TLongSeqDynArray;',
|
|
|
' end;',
|
|
|
'',
|
|
|
' TJSAttr = class(TJSObject,IJSAttr)',
|
|
|
' Private',
|
|
|
' Public',
|
|
|
- ' function vibrate: TIntegerDynArray;',
|
|
|
+ ' function vibrate: TLongSeqDynArray;',
|
|
|
' class function Cast(const Intf: IJSObject): IJSAttr;',
|
|
|
' end;',
|
|
|
'',
|
|
|
'implementation',
|
|
|
'',
|
|
|
- 'function TJSAttr.vibrate: TIntegerDynArray;',
|
|
|
+ 'function TJSAttr.vibrate: TLongSeqDynArray;',
|
|
|
'begin',
|
|
|
- ' Result:=InvokeJSObjectResult(''vibrate'',[],TJSArray) as TIntegerDynArray;',
|
|
|
+ ' Result:=InvokeJSObjectResult(''vibrate'',[],TJSArray) as TLongSeqDynArray;',
|
|
|
'end;',
|
|
|
'',
|
|
|
'class function TJSAttr.Cast(const Intf: IJSObject): IJSAttr;',
|
|
@@ -1376,7 +1399,7 @@ begin
|
|
|
' --------------------------------------------------------------------}',
|
|
|
'',
|
|
|
' IJSAttr = interface(IJSObject)',
|
|
|
- ' [''{AA94F48A-149D-381A-A2A6-208CA4B2AF2A}'']',
|
|
|
+ ' ['''+FixedGUID+''']',
|
|
|
' end;',
|
|
|
'',
|
|
|
' TJSAttr = class(TJSObject,IJSAttr)',
|
|
@@ -1416,7 +1439,7 @@ begin
|
|
|
' --------------------------------------------------------------------}',
|
|
|
'',
|
|
|
' IJSAttr = interface(IJSObject)',
|
|
|
- ' [''{AA94F48A-9540-32B7-B05B-E99EB8B2AF2A}'']',
|
|
|
+ ' ['''+FixedGUID+''']',
|
|
|
' end;',
|
|
|
'',
|
|
|
' TJSAttr = class(TJSObject,IJSAttr)',
|
|
@@ -1468,7 +1491,7 @@ begin
|
|
|
'',
|
|
|
'',
|
|
|
' IJSAttr = interface(IJSObject)',
|
|
|
- ' [''{AA94F48A-B218-381A-A2A6-208CA4B2AF2A}'']',
|
|
|
+ ' ['''+FixedGUID+''']',
|
|
|
' function get: TJSMyDict;',
|
|
|
' end;',
|
|
|
'',
|
|
@@ -1516,7 +1539,7 @@ begin
|
|
|
' --------------------------------------------------------------------}',
|
|
|
'',
|
|
|
' IJSAttr = interface(IJSObject)',
|
|
|
- ' [''{AA94F48A-2BFB-3877-82A6-208CA4B2AF2A}'']',
|
|
|
+ ' ['''+FixedGUID+''']',
|
|
|
' function vibrate: IJSFloat32Array;',
|
|
|
' end;',
|
|
|
'',
|
|
@@ -1561,29 +1584,31 @@ begin
|
|
|
' TJSAttr',
|
|
|
' --------------------------------------------------------------------}',
|
|
|
'',
|
|
|
- ' TVariantDynArray = IJSArray; // array of Variant',
|
|
|
+ ' // Union of double, sequence',
|
|
|
+ ' TAttr_roundRect_radii_Type = Variant;',
|
|
|
+ ' TunionDynArray = IJSArray; // array of union',
|
|
|
' IJSAttr = interface(IJSObject)',
|
|
|
- ' [''{AA94F48A-0CA1-3A6F-A546-208CA4B2AF2A}'']',
|
|
|
- ' function roundRect(aRadii: Double): Integer; overload;',
|
|
|
- ' function roundRect(const aRadii: TVariantDynArray): Integer; overload;',
|
|
|
+ ' ['''+FixedGUID+''']',
|
|
|
+ ' function roundRect(aRadii: Double): LongInt; overload;',
|
|
|
+ ' function roundRect(const aRadii: TunionDynArray): LongInt; overload;',
|
|
|
' end;',
|
|
|
'',
|
|
|
' TJSAttr = class(TJSObject,IJSAttr)',
|
|
|
' Private',
|
|
|
' Public',
|
|
|
- ' function roundRect(aRadii: Double): Integer; overload;',
|
|
|
- ' function roundRect(const aRadii: TVariantDynArray): Integer; overload;',
|
|
|
+ ' function roundRect(aRadii: Double): LongInt; overload;',
|
|
|
+ ' function roundRect(const aRadii: TunionDynArray): LongInt; overload;',
|
|
|
' class function Cast(const Intf: IJSObject): IJSAttr;',
|
|
|
' end;',
|
|
|
'',
|
|
|
'implementation',
|
|
|
'',
|
|
|
- 'function TJSAttr.roundRect(aRadii: Double): Integer; overload;',
|
|
|
+ 'function TJSAttr.roundRect(aRadii: Double): LongInt; overload;',
|
|
|
'begin',
|
|
|
' Result:=InvokeJSLongIntResult(''roundRect'',[aRadii]);',
|
|
|
'end;',
|
|
|
'',
|
|
|
- 'function TJSAttr.roundRect(const aRadii: TVariantDynArray): Integer; overload;',
|
|
|
+ 'function TJSAttr.roundRect(const aRadii: TunionDynArray): LongInt; overload;',
|
|
|
'begin',
|
|
|
' Result:=InvokeJSLongIntResult(''roundRect'',[aRadii]);',
|
|
|
'end;',
|
|
@@ -1613,45 +1638,47 @@ begin
|
|
|
' { --------------------------------------------------------------------',
|
|
|
' TJSAttr',
|
|
|
' --------------------------------------------------------------------}',
|
|
|
- ' TUnicodeStringDynArray = IJSArray; // array of UnicodeString',
|
|
|
+ ' // Union of DOMString, sequence',
|
|
|
+ ' TAttr_roundRect_a_Type = Variant;',
|
|
|
+ ' TUnicodeStringDynArray = IJSArray; // array of DOMString',
|
|
|
' IJSAttr = interface(IJSObject)',
|
|
|
- ' [''{AA94F48A-0CA1-3A6F-A546-208CA4B2AF2A}'']',
|
|
|
- ' procedure roundRect(const a: UnicodeString; aB: Integer); overload;',
|
|
|
- ' procedure roundRect(const a: TUnicodeStringDynArray; aB: Integer); overload;',
|
|
|
- ' procedure roundRect(const a: TUnicodeStringDynArray); overload;',
|
|
|
- ' procedure roundRect(const a: UnicodeString); overload;',
|
|
|
+ ' ['''+FixedGUID+''']',
|
|
|
+ ' procedure roundRect(const aA: UnicodeString; aB: LongInt); overload;',
|
|
|
+ ' procedure roundRect(const aA: TUnicodeStringDynArray; aB: LongInt); overload;',
|
|
|
+ ' procedure roundRect(const aA: TUnicodeStringDynArray); overload;',
|
|
|
+ ' procedure roundRect(const aA: UnicodeString); overload;',
|
|
|
' end;',
|
|
|
'',
|
|
|
' TJSAttr = class(TJSObject,IJSAttr)',
|
|
|
' Private',
|
|
|
' Public',
|
|
|
- ' procedure roundRect(const a: UnicodeString; aB: Integer); overload;',
|
|
|
- ' procedure roundRect(const a: TUnicodeStringDynArray; aB: Integer); overload;',
|
|
|
- ' procedure roundRect(const a: TUnicodeStringDynArray); overload;',
|
|
|
- ' procedure roundRect(const a: UnicodeString); overload;',
|
|
|
+ ' procedure roundRect(const aA: UnicodeString; aB: LongInt); overload;',
|
|
|
+ ' procedure roundRect(const aA: TUnicodeStringDynArray; aB: LongInt); overload;',
|
|
|
+ ' procedure roundRect(const aA: TUnicodeStringDynArray); overload;',
|
|
|
+ ' procedure roundRect(const aA: UnicodeString); overload;',
|
|
|
' class function Cast(const Intf: IJSObject): IJSAttr;',
|
|
|
' end;',
|
|
|
'',
|
|
|
'implementation',
|
|
|
'',
|
|
|
- 'procedure TJSAttr.roundRect(const a: UnicodeString; aB: Integer); overload;',
|
|
|
+ 'procedure TJSAttr.roundRect(const aA: UnicodeString; aB: LongInt); overload;',
|
|
|
'begin',
|
|
|
- ' InvokeJSNoResult(''roundRect'',[a,aB]);',
|
|
|
+ ' InvokeJSNoResult(''roundRect'',[aA,aB]);',
|
|
|
'end;',
|
|
|
'',
|
|
|
- 'procedure TJSAttr.roundRect(const a: TUnicodeStringDynArray; aB: Integer); overload;',
|
|
|
+ 'procedure TJSAttr.roundRect(const aA: TUnicodeStringDynArray; aB: LongInt); overload;',
|
|
|
'begin',
|
|
|
- ' InvokeJSNoResult(''roundRect'',[a,aB]);',
|
|
|
+ ' InvokeJSNoResult(''roundRect'',[aA,aB]);',
|
|
|
'end;',
|
|
|
'',
|
|
|
- 'procedure TJSAttr.roundRect(const a: TUnicodeStringDynArray); overload;',
|
|
|
+ 'procedure TJSAttr.roundRect(const aA: TUnicodeStringDynArray); overload;',
|
|
|
'begin',
|
|
|
- ' InvokeJSNoResult(''roundRect'',[a]);',
|
|
|
+ ' InvokeJSNoResult(''roundRect'',[aA]);',
|
|
|
'end;',
|
|
|
'',
|
|
|
- 'procedure TJSAttr.roundRect(const a: UnicodeString); overload;',
|
|
|
+ 'procedure TJSAttr.roundRect(const aA: UnicodeString); overload;',
|
|
|
'begin',
|
|
|
- ' InvokeJSNoResult(''roundRect'',[a]);',
|
|
|
+ ' InvokeJSNoResult(''roundRect'',[aA]);',
|
|
|
'end;',
|
|
|
'',
|
|
|
'class function TJSAttr.Cast(const Intf: IJSObject): IJSAttr;',
|
|
@@ -1680,7 +1707,7 @@ begin
|
|
|
' --------------------------------------------------------------------}',
|
|
|
'',
|
|
|
' IJSAttr = interface(IJSObject)',
|
|
|
- ' [''{AA94F48A-7955-3EBA-B086-85B24440AF2A}'']',
|
|
|
+ ' ['''+FixedGUID+''']',
|
|
|
' function _GetaBoolean: Boolean;',
|
|
|
' property aBoolean: Boolean read _GetaBoolean;',
|
|
|
' end;',
|
|
@@ -1735,7 +1762,7 @@ begin
|
|
|
' --------------------------------------------------------------------}',
|
|
|
'',
|
|
|
' IJSPM = interface(IJSObject)',
|
|
|
- ' [''{04D12607-C063-3E89-A483-3296C9C8AA41}'']',
|
|
|
+ ' ['''+FixedGUID+''']',
|
|
|
' function _Getsize: LongInt;',
|
|
|
' function get(key: UnicodeString) : Boolean;',
|
|
|
' function has(key: UnicodeString) : Boolean;',
|