Feb 13, 2014, 12:17:11 PM2/13/14
we are using XULRunner 24 embedded in a Java application through Eclipse SWT. We need extended functionality only available through the XPCOM API, and since the old JavaXPCOM binding has vanished, we are migrating all code to C++, which we access from Java through a narrow JNI API. So far, so good.
// create a canvas
var canvas = cwin.document.createElement("canvas");
// get the 2D context and draw everythiong on it
var ctx = canvas.getContext("2d");
ctx.clearRect(0, 0, width, height);
ctx.drawWindow(cwin, 0, position, width, height, "rgb(255,255,255)");
//and then to disk..
Now I would like to rewrite this in C++, and am mighty stuck. Can someone give a hint how to proceed? I have spent a full day browsing the APIs and the web, but am not able to figure out how to get to the 2D context thingy and do the rest. I have found an old post from 2008 regarding a similar issue, but that would not even compile.
I'd be REALLY grateful for hints!