[webkit-help] Writing programs against Win32 WebKit & WinCE WebKit

Philip Sharpe phil at ikanosconsulting.com
Fri Feb 17 09:18:52 PST 2012


Hi Adam,

I wanted to clarify that for the Win32 port you have to use the 'COM' interface via WebKitCreateInstance and for the WinCE port you simply create an object of type WebView and go from there.

The reason I wanted to clarify this is I'm having WinCE build issues and while the Win32 build completes it could have failed to copy necessary headers.  I don't want to get stuck into using the library only to find out I'll have to change it all later.

Regards,

Philip Sharpe

From: Adam Roben [mailto:aroben at apple.com]
Sent: 17 February 2012 16:38
To: Philip Sharpe
Cc: webkit-help at lists.webkit.org
Subject: Re: [webkit-help] Writing programs against Win32 WebKit & WinCE WebKit

On Feb 17, 2012, at 11:34 AM, Philip Sharpe <phil at ikanosconsulting.com<mailto:phil at ikanosconsulting.com>> wrote:


I've been looking into using WebKit but I'm slightly confused on exactly how to use the WebKit libraries.  The Apple docs (the only ones according to the web-site) suggest you create a WebView object as the 'master' object.  However the WebView header file (WebView.h) seems to be missing from the Win32 build.  Looking at the example applications I believe the following is true:

Win32:
Create an instance of the IWebView interface with the WebKitCreateInstance function (found in WebKit/WebKitCOMAPI.h) and use the interface as if it were the WebView object.
WinCE:
Create an instance of the WebView object and use as appropriate.

I presume there is no easy way to use the WebView class on Win32?  This would help with cross platform code :)

The documentation on developer.apple.com<http://developer.apple.com> is referring to the Cocoa WebKit API that is exposed by WebKit.framework on OS X. There is no Cocoa on Windows, so the API is not going to be identical between the two platforms.

However, the Windows COM API is meant to mimic the Cocoa API as much as possible. You'll find lots of similarities between IWebView on Windows and WebView on OS X. It shouldn't be too hard to write a wrapper around the two that exposes a single interface.

-Adam


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-help/attachments/20120217/ac03071f/attachment-0001.html>


More information about the webkit-help mailing list