WebKitGTK +, GTK2, GTK3

It’s hard for me to understand what WebKit, WebKitGTK, GTK with different versions are. Here is what I still have:

  • WebKit is a library that contains both WebKit1 and WebKit2. Which is called with this inclusion #include <webkit/webkit.h> ?

  • WebKitGTK 1.10.2 is the latest version dependent on GTK2. Is it supported / developed?

  • Do I always need to support GTK, Qt, or some other toolkit? Or could you use it alone?

+6
source share
2 answers

You must distinguish between version number and api level.

  • The version number is something like 1.10.2 or 2.2.1 - and that it, only the version number, has nothing to do with the GTK version or api level.
  • There are two different apis: webkit ( webkit/webkit.h ) and webkit2 ( webkit2/webkit2.h ). The main difference is that webkit2 uses a multi-process architecture for rendering, javascript and plugins instead of a single webkit technology architecture.

WebKitGTK + can be compiled with either GTK + 2 or GTK + 3. This will result in library names such as libwebkitgtk-1.0.so or libwebkitgtk-3.0.so , respectively. (This has nothing to do with the version of WebKit itself.) However, webkit2 api is GTK + 3 dependent, and the library file name is something like libwebkit2gtk-3.0.so .

WebKitGTK + and other ports implement things like:

  • drawing ui elements (checkbox, selectbox, ...)
  • (file selection, download, http authentication)
  • network communications (DNS and http processing)
  • ...

You will need to implement this yourself if you want to avoid accessing any available webkit port.

PS: WebKitGTK + 2.xx still supports GTK + 2

+6
source

WebKitGTK is a "port", and yes, you practically need to choose one of several ports using only webkit, basically it means writing your own port, which is a huge job. On linux, I would suggest using WebKitGTK or QtWebKit.

WebKit and WebKit2 are two completely different web engine APIs that live in the same source tree (also called WebKit in general) and use the same basic components. The big difference is that WebKit2 splits web content processing into another process - I think this is also the only serious development process. You do not need to choose between the two, because the port has usually made a choice: you simply use the API that the port provides. The GTK + port was used in Webkit, but should now use WebKit2 (but the Webkit API can still be there).

If 1.10.2 was indeed the latest version to support GTK2 (note that I do not know if this is true), then I am sure that it is not developing yet.

EDIT: In debian library options:

  • libwebkitgtk-1.0 2.2.0: Webkit1, GTK + 2
  • libwebkitgtk-3.0 2.2.0: Webkit1, GTK + 3
  • libwebkit2gtk-3.0 2.2.0: Webkit2, GTK + 3

So, it seems that GTK + 2 is still at least supported, but (at least on debian) you get the WebKit2 API only with GTK + 3. This option should be the most reliable in the future.

+1
source

Source: https://habr.com/ru/post/957077/


All Articles