Re: Notes about WebCore
Re: Notes about WebCore
- Subject: Re: Notes about WebCore
- From: Buzz Andersen <email@hidden>
- Date: Sat, 11 Jan 2003 00:25:04 -0700
The code below is as far as I've gotten :-). I have WebCore and
JavaScriptCore built and successfully embedded within an application
bundle (a la Safari), and I have experimented a bit with WebCoreBridge.
It is clear that WebCoreBridge is what is would be called an abstract
class in Java--that is, it is both a normal class that is meant to be
subclassed and a protocol which specifies WebCoreBridge's interface to
the WebCore client.
My current theory is that "installInFrame:" may be the primary way to
link up the renderer in the bowels of the KHTML/KWQ stuff with an
actual Cocoa NSView. The following code tests this theory, but
produces a rather disappointing result: installInFrame: calls the lower
level QWidget::setView (love that Obj-C++ :-) and then promptly
produces an EXC_BAD_ACCESS. Obviously there is more to setting up and
using WebCore than is obvious through casual hacking :-(...
I'd love to hear about results anyone else has had. And, if Apple is
listening: some documentation (or even off the record hints) would be
appreciated :-)...
---
@interface HTMLViewBridge : WebCoreBridge {
NSView *view;
}
- (id) initWithView: (NSView *) view;
@implementation HTMLViewBridge
const int CACHE_SIZE = 10;
- (id) initWithView: (NSView *) aView {
if (self = [super init]) {
view = aView;
[self openURL: @"
http://www.scifihifi.com/" reload: NO headers:
nil lastModified: nil pageCache: nil];
[self installInFrame: view];
}
return self;
}
- (WebCoreBridge *) mainFrame {
return self;
}
- (int) getObjectCacheSize {
return CACHE_SIZE;
}
--
Buzz Andersen
email: email@hidden
web:
http://www.scifihifi.com
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.