WebKit On Mac OS X server?
WebKit On Mac OS X server?
- Subject: WebKit On Mac OS X server?
- From: Brian Gilman <email@hidden>
- Date: Mon, 23 Jun 2003 21:45:32 -0400
On 6/23/03 8:38 PM, "Matt Gough" <email@hidden> wrote:
Hello everyone,
Are there prerequisites that make it impossible to install webkit on Mac
OS X server? I just tried and it won't let me!!
-B
>
Having just downloaded the WebKit SDK I thought I'd have a go at updating
>
some old code that uses the much lamented HTMLRenderingLib.
>
>
I have read through the documentation, set up a private bundle to allow me
>
to use it, loaded all the function pointers from it and gave it a whirl.
>
Alas, nothing happened. It didn't crash (which implied my bundle set-up and
>
loading was good), and the control manager didn't complain about the HIView
>
that was created - just nothing got drawn).
>
>
>
Here are some snippets:
>
>
From the private bundle:
>
>
#include <Carbon/Carbon.h>
>
#include <Cocoa/Cocoa.h>
>
#include <WebKit/CarbonUtils.h>
>
#include <WebKit/HIWebView.h>
>
>
Boolean CWKInitialize()
>
{
>
WebInitForCarbon();
>
return true;
>
}
>
>
OSStatus CWKHIWebViewCreate(HIViewRef* outControl)
>
{
>
return HIWebViewCreate(outControl);
>
}
>
>
void CWKLoadPage(HIViewRef hiView, CFURLRef url)
>
{
>
NSAutoreleasePool *localPool = [[NSAutoreleasePool alloc] init];
>
>
WebView* wv = HIWebViewGetWebView(hiView);
>
>
if (wv)
>
{
>
>
[[wv mainFrame] loadRequest:[NSURLRequest requestWithURL:
>
(NSURL*)url]];
>
}
>
>
[localPool release];
>
}
>
>
From my main application:
>
>
>
Rect r = {50, 50, 500, 500};
>
WindowRef w;
>
ThrowIfErr(CreateNewWindow(kDocumentWindowClass,
>
kWindowStandardHandlerAttribute | kWindowCompositingAttribute , &r, &w));
>
>
::ShowWindow(w);
>
static const bool cwkInited = CWKInitialize();
>
if (cwkInited)
>
{
>
HIViewRef hiv;
>
ThrowIfErr(CWKHIWebViewCreate(&hiv));
>
WControlFoster asControl(hiv);
>
ThrowIfErr(::EmbedControl(hiv, HIViewGetRoot(w)));
>
SetControlBounds(hiv, &r);
>
CWKLoadPage(hiv, fso_i.GetURL());
>
::Draw1Control(asControl);
>
}
>
>
>
Has anyone else tried getting WebKit working from within a Carbon app (I
>
know its only been out a few hours, but I guess those of us not at WWDC have
>
nothing better to do)
>
>
All I want to do is draw the page, no interaction is needed with it.
>
>
Matt Gough
>
_______________________________________________
>
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.
>
--
Brian Gilman <email@hidden>
Group Leader Medical & Population Genetics Dept.
MIT/Whitehead Inst. Center for Genome Research
One Kendall Square, Bldg. 300 / Cambridge, MA 02139-1561 USA
phone +1 617 252 1069 / fax +1 617 252 1902
_______________________________________________
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.