On 15 September 2017 at 13:18, Stefan Salewski <mail@xxxxxxxxxxxx> wrote: > On Fri, 2017-09-15 at 12:25 +0100, Emmanuele Bassi wrote: >> The g_signal_emitv() function is the vector-based function for >> emitting signals in language bindings. >> >> The variadic argument version is a C convenience function, as >> functions with variadic arguments are not introspectable. >> >> This is a typical pattern for any GObject-based library; for every >> variadic argument function there should be a vector-based one that >> can >> be used by language bindings. > When I provide a Nim version of g_signal_emitv() -- how could I test > it? I'm puzzled by this question. How do you test signal emission *now*? Actually: how do you even implement it, if you're not already using g_signal_emitv()? > I am still not aware of a (small) example in any language (C, > Python, Ruby, ...) where it is used. > > With Google I found the Perl glue code, but still no test. > > https://github.com/GNOME/perl-Glib/blob/master/GSignal.xs There's also Python: https://git.gnome.org/browse/pygobject/tree/gi/pygobject-object.c#n1810 But I still don't understand the question. The g_signal_emitv() function is what you use *internally* to provide signal emission to your own language bindings. A Perl developer would see it as the `emit()` method on a Glib::Object instance; a Python developer would see it as the `emit()` method on a GObject.Object instance; and so on, and so forth for any other language binding. High level language typically do not expose this as a "GSignal" function, but subsume it into the GObject bindings API; the fact that any GTypeInstance can have signals is not a widely known, or used, feature of the type system. Ciao, Emmanuele. -- https://www.bassi.io [@] ebassi [@gmail.com] _______________________________________________ gtk-list mailing list gtk-list@xxxxxxxxx https://mail.gnome.org/mailman/listinfo/gtk-list