11

Possible Duplicate:
How to embed WebKit into my C/C++/Win32 application?

I am trying to embed the WebKit project into my solution. At first I'd like to just render the Webkit inside a typical window and make it load some pseudorandom URI.

I tried checkouting the sources from http://svn.webkit.org/repository/webkit/trunk/Source/ and I got immediately confused on what headers to include. I begin with webkit/win/WebView.h and it threw an error saying could not include Webkit.h Fair enough, there's no such file... then I begin reading official documentation, but found out there is none except for Objective-C which doesn't even state what to include for what functionality.

I'm working on Visual Studio 2010 and Windows 7. Eventually I'd like the project run on Linux, but that requirement is off the table right now.

I tried googling for help which did not really show up any results with code samples or information on what I should actually do.

I am not interested in Qt, nor Gecko.

I guess I want to use WebView, but I have really no idea how and my C++ skills are rusty and all I know are concepts, I haven't done much anything with the language.

Community
  • 1
  • 1
Tower
  • 98,741
  • 129
  • 357
  • 507
  • 3
    You should check out the Chromium source and see how they do it. http://code.google.com/chromium/ – i_am_jorf Sep 05 '11 at 18:13
  • 1
    @jeffamaphone: I can't really find anything useful out of this http://src.chromium.org/svn/trunk/src/ – Tower Sep 05 '11 at 18:27
  • Well, I know for a fact that they embed webkit in their Windows Program. It's in there somewhere. Good luck! – i_am_jorf Sep 05 '11 at 18:37
  • The most useful place to look in the Chrome source is probably some of the test shells. If you do a normal Windows build (using the special build tools required, plus DirectX SDK etc) you'll end up with a VS solution and a few hundred projects. Some of these are test shells that are used by automated tests and have a minimal UI. It is probably better to use Chromium Embedded Framework though to get better support. – Brian Lyttle Sep 05 '11 at 18:52

2 Answers2

7

I maintain a Windows port of WebKit (in the WebKit repository) that replaces the various Apple-specific libraries so that it can be freely redistributed.

I posted some example code that shows how to embed WebKit in a pure WinAPI program. The repository also includes a version of the WebKit DLLs, header files, and link libraries needed to use it.

bfulgham
  • 159
  • 2
  • 3
6

There is an accepted answer for "How to embed WebKit into my C/C++/Win32 application?". I think it might be the best place to start. IIRC WebKit provides various interfaces for different features and you need to make sure that you have implementations for all the ones that you require in your application.

ChromiumEmbedded might be worth a look, but there could be variations in the WebKit implementations.

Community
  • 1
  • 1
Brian Lyttle
  • 14,558
  • 15
  • 68
  • 104