[webkit-gtk] The “context-menu” signal question
Carlos Garcia Campos
cgarcia at igalia.com
Thu Aug 6 00:18:10 PDT 2015
El lun, 03-08-2015 a las 14:30 +0000, Konovalov, Vadim escribió:
> > From: webkit-gtk-bounces at lists.webkit.org On Behalf Of Carlos
> > Garcia Campos
> Thank you for the quick reply,
> > * If you are building a web extension, you should include
> > <webkit2/webkit-web-extension.h> only and use
> > WebKitWebPage::context -menu
> > * If you are not building a web extension, but a program,
> > you should include <webkit2/webkit2.h> only and use
> > WebKitWebView::context-menu
> Actually I am writing a program that utilizes WebKit/gtk but I need
> to manipulate DOM also, this is why I am creating small web-extension
> which will facilitate to my program.
> This was advised somewhere on the Internet at
> > The common classes in both APIs are already included in the
> > global headers.
> I would like to narrow the question,
> In this excerpt:
> user_function (WebKitWebPage *web_page,
> WebKitContextMenu *context_menu,
> WebKitWebHitTestResult *hit_test_result,
> gpointer user_data)
> WebKitContextMenu defined in "WebKitContextMenu.h" which is included
> together with webkit2/webkit2.h;
But also included in webkit2/webkit-web-extension.h. There are a few
classes that are common to both APIs and included in both headers. You
don't need (cand can't) include headers individually, the main headers
already include what you need for every API.
> WebKitWebPage defined in WebKitWebPage.h which is included together
> with webkit2/webkit-web-extension.h;
> These two could *NOT* be included together - by design.
> How can I compile this code anyway??
You just need to include webkit2/webkit-web-extension.h and use the
flags and libs provided by webkit2gtk-web-extension-4.0.pc.
If you still have problems to build, try showing us the errors you are
> (The mentioned excerpt is placed right here -
> http://webkitgtk.org/reference/webkit2gtk/stable/WebKitWebPage.html )
Carlos Garcia Campos
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 181 bytes
Desc: This is a digitally signed message part
More information about the webkit-gtk