On Fri, 10 May 2019 19:49:22 +0200, Mike Wey wrote:

On 10-05-2019 16:20, Ron Tarrant wrote:

I don't know the talk, but if i`m correct you would use gsignalnew to
register a new signal, and call gsignalemit to well emit the signal.

A user could then use gsignalconnect the connect to the signal.

In GtkD there is Signals.newv and Signals.emitv witch are the array
based versions of gsignalnew and gsignalemit.

And Signals.connect to connect a function, a delegate, or something with
an opCall to the Signal.

On Fri, 10 May 2019 19:33:41 +0200, Mike Wey wrote:

The get_something_async function in D would be something like this:

string get_something_async()
     gulong id;

     void activate(Entry entry)
	Signals.handlerDisconnect(entry, id);

     id = entry.addOnActivate(&activate);


     return entry.getText();

Thanks for the info, Mike. I'll let you know how I make out.