[webkit-gtk] can not make excerpt from documentation to compile
Carlos Garcia Campos
cgarcia at igalia.com
Thu Aug 6 00:22:00 PDT 2015
El jue, 06-08-2015 a las 06:34 +0000, Konovalov, Vadim escribió:
> Ok, attempt to simplify the question ad minimum, so trivialize it to
> maximum,
>
> The mentioned excerpt is placed right here -
> http://webkitgtk.org/reference/webkit2gtk/stable/WebKitWebPage.html
>
> gboolean
> user_function (WebKitWebPage *web_page,
> WebKitContextMenu *context_menu,
> WebKitWebHitTestResult *hit_test_result,
> gpointer user_data)
>
> it could not be compiled with gcc `pkg-config --cflags webkit2gtk
> -3.0` simple.c -o simple.o
That's not the right pkg-config file neither the version I'm afrid, you
should use webkit2gtk-web-extension-4.0.
> I have either:
>
> #include <webkit2/webkit-web-extension.h>
>
> gboolean
> context_menu_cb (WebKitWebPage *web_page,
> WebKitContextMenu *context_menu,
> WebKitWebHitTestResult *hit_test_result,
> gpointer user_data) {
> printf("context_menu_cb\n");
> return FALSE;
> }
>
> simple1.c:7:16: error: unknown type name тАШWebKitContextMenuтАЩ
> WebKitContextMenu *context_menu,
> ^
> simple1.c:8:16: error: unknown type name тАШWebKitWebHitTestResultтАЩ
> WebKitWebHitTestResult *hit_test_result,
> ^
>
> Or:
> #include <webkit2/webkit2.h>
This is not the right header.
> gboolean
> context_menu_cb (WebKitWebPage *web_page,
> WebKitContextMenu *context_menu,
> WebKitWebHitTestResult *hit_test_result,
> gpointer user_data) {
> printf("context_menu_cb\n");
> return FALSE;
> }
>
> simple2.c:6:18: error: unknown type name тАШWebKitWebPageтАЩ
> context_menu_cb (WebKitWebPage *web_page,
> ^
> simple2.c:8:16: error: unknown type name тАШWebKitWebHitTestResultтАЩ
> WebKitWebHitTestResult *hit_test_result,
>
> I am lost
What WebKitGTK+ version are you using? Note that WebKitWebPage::context
-menu signal was added in version 2.8
> Vadim.
>
> _______________________________________________
> webkit-gtk mailing list
> webkit-gtk at lists.webkit.org
> https://lists.webkit.org/mailman/listinfo/webkit-gtk
--
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/eafa51d3/attachment.sig>
More information about the webkit-gtk
mailing list