From: Kevin W. <kw...@co...> - 2009-09-07 01:29:17
|
After doing more work with this, I've gotten a Cocoa window to draw from inside Tk with a webkit view embedded. It was easy. Draw the window, call [window setContentView: webKitstuff], and it works fine. However, I can't seem to find any way to get a handle on an actual Tk window from Cocoa for purposes of embedding a content view. As others on the mailing list have noted, it's possible to get a WindowRef from a Carbon window, but that's not an option with Cocoa. Looking more closely at the Tk-Cocoa source code, I see all kinds of ways to get at a Tk window, and even a few calls to [window setContentView], so I know this can be done, but I'm not sure it can be easily done from an extension. There don't appear to be any easily-used public API's for this purpose. I've tried to include "tkMacOSXInt.h" in my code, but gcc complains about syntax errors in that file (?). And I'm not sure that that adding webkit to the Tk-Cocoa core is such a good idea... As a result, I'm going to set this aside for a while. I've gotten a working build of TkHTML thanks to Georgios Petsasis, so webkit is not essential. Would be nice, however. --Kevin -- Kevin Walzer Code by Kevin http://www.codebykevin.com |