Sunday, December 28, 2008

JS --> C++ call APIs polishing.

It has been around 2 weeks I am polishing the APIs of JavaScript to C++ calls. The main crux of the project is to provide a simple but very versatile and easy to use APIs for the plugin developers.

I have created MCruxJSObject class which is responsible for putting the first object in the global JavaScriptContext. This object (rather namespace) is named "mcrux". The Object will be the key-point to access various "MCrux" functionalities.

On the other side I started with the sample application "MChat". The "MChat" application is a separate Application which uses the MCrux.dll to create the WebView and only renders a "hello world " page. I will be implementing various features of IM Client one by one. "MChat" would be driving the development of MCrux in its initial phases.

Friday, December 12, 2008

start with JavaScript to C++ calls examples

WebKit takes decent amount of time to learn various APIs provided. lots of classes to understand. This is more of understanding the work flow along with learning the APIs.

There is a decent amount of documentation there on apple's website, but the problem with that documentation is that it only describes implementation on MAC port. All the other port differs slightly from that documentation. The APIs are same but the default behavior differs. Taking example, In mac port the "alert()" method pops a message box with the given content, but in windows(Cairo) port the default behavior is not display anything.

I got a start with the JavaScript to C++ calls working. I will be checking in the same example soon in the repository. I am able to call "mcrux.someFunction();" from within JavaScript and it calls my registered call back function "void SomeFunction()" in my c++ code. All the WebKit developers are very helpful. Thank you for your valuable support.