Re: g_signal_emitv -- where is it used in application code?
- Date: Fri, 15 Sep 2017 13:26:22 +0100
- From: Emmanuele Bassi <ebassi@xxxxxxxxx>
- Subject: Re: g_signal_emitv -- where is it used in application code?
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
>> be used by language bindings.
> When I provide a Nim version of g_signal_emitv() -- how could I test
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
> 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.
There's also Python:
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.
[@] ebassi [@gmail.com]
gtk-list mailing list