[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 
> also,
> which will facilitate to my program. 
> This was advised somewhere on the Internet at 
> http://blogs.igalia.com/carlosgc/2014/08/01/webkitgtk-2-5-1-good-bye
> -webkit1/
> 
> 
> > The common classes in both APIs are already included in the
> > global headers.
> 
> I would like to narrow the question,
> 
> In this excerpt:
> 
> gboolean
>  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
getting.

> (The mentioned excerpt is placed right here - 
> http://webkitgtk.org/reference/webkit2gtk/stable/WebKitWebPage.html )
> 
> Regards,
> Vadim.
> 
-- 
Carlos Garcia Campos
http://pgp.rediris.es:11371/pks/lookup?op=get&search=0xF3D322D0EC4582C3
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 181 bytes
Desc: This is a digitally signed message part
URL: <https://lists.webkit.org/pipermail/webkit-gtk/attachments/20150806/2b0eeeda/attachment.sig>


More information about the webkit-gtk mailing list