public ulong connect_raw (void* instance, string sig_name, bool private_thread, bool private_job, ThreadWrapperCallback callback)
Connects a callback function to a signal for a particular object.
The difference with connect and similar functions are:
callbackargument is not a ObjectConstructorFunc function, so the callback signature is not dependent on the signal itself
- the signal handler must not have to return any value
callbackfunction will be called asynchronously, the caller may need to use iterate to get the notification
private_threadcontrol in which case the signal is propagated.
Also note that signal handling is done asynchronously: when emitted in the worker thread, it will be "queued" to be processed in the user thread when it has the chance (when iterate is called directly or indirectly). The side effect is that the callback function is usually called long after the object emitting the signal has finished emitting it.
To disconnect a signal handler, don't use any of the g_signal_handler_*() functions but the disconnect method.
a ThreadWrapper object
the instance to connect to
a string of the form "signal-name::detail"
a ThreadWrapperCallback function
data to pass to
the handler ID