Wadii,
You can see good working examples of this by examining the inspector
code in the WebKit tree.
Basically, the JSC engine only knows about C calls, so you have to
write C functions that in turn call your C++ constructor, methods,
etc. You then populate the JavaScript structure used by JSC with
function pointers to these methods.
I think if you look over the inspector code most of your questions
will be answered.
-Brent
Sent from my iPhone
On Jun 10, 2010, at 1:43 AM, Wadii Guedria <[email protected]> wrote:
Hi,
I have a question about javascript/C++ bindings in webkit.
For example, I have an extern C++ class (attributes+methodes)
My objective is to access to this class from javascript like this:
var object = new mycpluplusclass();
object.getattribute;
object.mycplusplusfunction;
....
I know that I need to use JSClassDefinition and set the
JSStaticFunction. But I dont know how to define my C++ constructor
in JSObjectCallAsConstructorCallback
Same thing for get/set Property(C++ attribute).
Any suggestions are welcome.
Regards,
Wadii
_______________________________________________
webkit-help mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-help
_______________________________________________
webkit-help mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-help