Help: how can I capture offscreen images?

jsn

Registered
Hi all

I got this request:
"The first thing we'll need in order to make it work is to create a way for offscreen images of widgets to be captured. This will most likely involve writing native (non-Java) code using OS X's system APIs (in this case Carbon - http://developer.apple.com/documentation/Carbon/index.html ). What we're looking for is someone to write a program using Carbon that is capable of capturing offscreen images of widgets. Such a program would be very useful as a first step to getting VE working for SWT development on OS X"

Here is the link:

http://dev.eclipse.org/newslists/news.eclipse.tools.ve/msg04361.html

How can I write something like that?

please help!!!.
jsn
 
I guess what you want to do is load the widget internally and grab a shot of that. Since widgets are JavaScript-based, you should be able to open and render them with WebKit, right? So make an invisible window with a WebView, load it, and then grab a snapshot of that window.

Or do you mean that you want to get a shot of a widget that IS loaded in Dashboard, but just not entirely on the screen? If that's the case, I'm not sure how to go about it.

Come to think of it, I'm also not sure if WebKit is even accessible through Carbon (I haven't done much Carbon work ever), so maybe my first suggestion is no good. I'm not clear on why they say you should use Carbon; is there a specific reason Cocoa is out of the question?
 
Back
Top