long g_signal_connect_data(com.sun.jna.Pointer instance,
Connects a GCallback function to a signal for a particular object.
Similar to g_signal_connect(), but allows to provide a GClosureNotify for
the data which will be called when the signal handler is disconnected and
no longer used. Specify connect_flags if you need ..._after() or
..._swapped() variants of this function.
instance - the instance to connect to.
detailed_signal - a string of the form "signal-name::detail".
c_handler - the GCallback to connect.
data - data to pass to c_handler calls.
destroy_data - a GClosureNotify for data.
connect_flags - a combination of GConnectFlags.
the handler id (always greater than 0 for successful connections)
void g_signal_handler_disconnect(com.sun.jna.Pointer instance,
Disconnects a handler from an instance so it will not be called during
any future or currently ongoing emissions of the signal it has been
connected to. The handler_id becomes invalid and may be reused. The
handler_id has to be a valid signal handler id, connected to a signal of
instance - The instance to remove the signal handler from.
handler_id - Handler id of the handler to be disconnected.
void g_object_unref(com.sun.jna.Pointer object)
Decreases the reference count of object. When its reference count drops
to 0, the object is finalized (i.e. its memory is freed). If the pointer
to the GObject may be reused in future (for example, if it is an instance
variable of another object), it is recommended to clear the pointer to
NULL rather than retain a dangling pointer to a potentially invalid
GObject instance. Use g_clear_object() for this.