(self, name, callback)
Connect to a signal on this object.

        The callback will be triggered every time this signal is issued on this
        instance. It will be passed the image ('self' here), and a single
        `void *` pointer from libvips.

        The value of the pointer, if any, depends on the signal -- for
        example, ::eval passes a pointer to a `VipsProgress` struct.
Connect to a signal on this object.
Connect to a signal on this object .
def signal_connect(self, name, callback):
        """Connect to a signal on this object.

        The callback will be triggered every time this signal is issued on this
        instance. It will be passed the image ('self' here), and a single
        `void *` pointer from libvips.

        The value of the pointer, if any, depends on the signal -- for
        example, ::eval passes a pointer to a `VipsProgress` struct.

        """

        if name not in _marshalers:
            raise Error('unsupported signal "{0}"'.format(name))

        go = ffi.cast('GObject *', self.pointer)
        handle = ffi.new_handle(callback)
        # we need to keep refs to the ffi handle and the callback to prevent
        # them being GCed
        # the callback might be a bound method (a closure) rather than a simple
        # function, so it can vanish
        self._handles.append(handle)
        self._handles.append(callback)

        gobject_lib.g_signal_connect_data(go, _to_bytes(name),
                                          _marshalers[name],
                                          handle, ffi.NULL, 0)
def signal_connect ( self , name , callback ) : if name not in _marshalers : raise Error ( 'unsupported signal "{0}"' . format ( name ) ) go = ffi . cast ( 'GObject *' , self . pointer ) handle = ffi . new_handle ( callback ) # we need to keep refs to the ffi handle and the callback to prevent # them being GCed # the callback might be a bound method (a closure) rather than a simple # function, so it can vanish self . _handles . append ( handle ) self . _handles . append ( callback ) gobject_lib . g_signal_connect_data ( go , _to_bytes ( name ) , _marshalers [ name ] , handle , ffi . NULL , 0 )