On Thu, 2014-10-16 at 12:52 +0200, Carlos Garcia Campos wrote:
> Robert Schroll <[email protected]> writes:
> 
> > On Wed, Oct 15, 2014 at 2:36 PM, Evan Nemerson <[email protected]> 
> > wrote:
> >> Vala is strongly (and statically) typed, so it needs to know what the
> >> delegate you pass to the closure argument should look like.  GObject
> >> Introspection doesn't include that information for for GClosures (bug
> >> #636812) so we have to set the type for GClosure arguments in 
> >> metadata.
> >> It's not difficult to do, but someone who actually knows the API needs
> >> to tell us what that type should be (or it needs to be documented).
> >> 
> >> The VAPI just needs to change from
> >> 
> >>         public bool add_event_listener_with_closure (string 
> >> event_name,
> >>         GLib.Closure handler, bool use_capture);
> >> 
> >> to something like
> >> 
> >>         public bool add_event_listener_with_closure (string 
> >> event_name,
> >>         [CCode (type = "GClosure*")] owned WebKit.DOM.FooFunc handler,
> >>         bool use_capture);
> >> 
> >> I just need to know what to put for instead of WebKit.DOM.FooFunc and 
> >> I
> >> can push a change to the VAPI.  Preferably a typedef in C, but if need
> >> be we can also create a delegate type from scratch in the VAPI.
> >
> > Thanks for setting me straight on this.  I tried to create my own 
> > delegate in the VAPI and managed to get it to compile.  But it crashed 
> > the web process on execution.  (As promised, the UI process continued!) 
> >  So I'm hoping that a WebKitGTK guru can enlighten us on the signature 
> > of the delegate.
> 
> void (* eventListener) (WebKitDOMEventTarget *target, WebKitDOMEvent *event, 
> gpointer user_data);

Done, thanks.

Please feel free to report any future issues to the "Bindings: GTK+
GStreamer WebKitGTK+" component in the "Vala" product on
bugzilla.gnome.org.


-Evan

Attachment: signature.asc
Description: This is a digitally signed message part

_______________________________________________
desktop-devel-list mailing list
[email protected]
https://mail.gnome.org/mailman/listinfo/desktop-devel-list

Reply via email to