[Pas2js] webidl2pas + webgl + webaudio committed
Michael Van Canneyt
michael at freepascal.org
Sat Jun 23 16:15:53 CEST 2018
Hello,
I've created a pascal tool that converts a webidl IDL definition to a pascal unit.
I've used it to convert the webgl unit in an automated manner.
As a result, you may need to check your code, since the definitions
may differ slightly from the previous (semi-) manual conversions.
I have also added a webaudio.pas unit, which contains import definitions
from the Web Audio specs. I'm still planning to convert the web bluetooth
spec (currently only supported by Chrome) and add that to the distribution.
If you think additional APIs should be converted and added to the
distribution, please let me know, and I will do my best to add them.
Natually, the webidl2pas tool is distributed with FPC, and will be in the
next pas2js release. The default settings mimic the manner in which the web
API imports have been done till now, but it is highly configurable.
The tool is not 100% complete (namespace missing currently) but webIDL v1
and v2 are supported. It is not guaranteed to give a 100% correct
conversion, but it comes pretty close. All corner cases I encountered while
converting webgl and webaudio have been dealt with.
Michael.
More information about the Pas2js
mailing list