Creates a new connection between the inputted signal and slot.
        
        :param      signal | <variant>
                    slot   | <callable>
        
        :return     <bool> | new connection created
770213
def connect(self, signal, slot):
        
        if self.isConnected(signal, slot):
            return False

        callback = Callback(slot)
        self._callbacks.setdefault(signal, [])
        self._callbacks[signal].append(callback)
        return True
1239099
def get_connection_by_slot(self, slot):
        
        self._checkpid()

        try:
            return self.get_connection_by_node(self.get_node_by_slot(slot))
        except KeyError:
            return self.get_random_connection()
171604
def emit(self, signal, *args):
        
        if not (self.signalsBlocked() or self.signalBlocked(signal)):
            super(XViewDispatch, self).emit(SIGNAL(signal), *args)
696545
def update(self, signals):
        
        if self._sfd < 0:
            _err_closed()
        mask = sigset_t()
        sigemptyset(mask)
        if signals is not None:
            for signal in signals:
                sigaddset(mask, signal)
        # flags are ignored when sfd is not -1
        _signalfd(self._sfd, mask, 0)
        self._signals = frozenset(signals)
475870
def _make_connect(module, args, kwargs):
    
    # pylint: disable-msg=W0142
    return functools.partial(module.connect, *args, **kwargs)
195442
def print_signals_and_slots(self):
        
        for i in xrange(self.metaObject().methodCount()):
             m = self.metaObject().method(i)
             if m.methodType() == QMetaMethod.MethodType.Signal:
                 print("SIGNAL: sig=", m.signature(), "hooked to nslots=", self.receivers(SIGNAL(m.signature())))
             elif m.methodType() == QMetaMethod.MethodType.Slot:
                 print("SLOT: sig=", m.signature())
63079
def setup_standalone_signals(instance):
    
    window = instance.get_widget('config-window')
    window.connect('delete-event', Gtk.main_quit)

    # We need to block the execution of the already associated
    # callback before connecting the new handler.
    button = instance.get_widget('button1')
    button.handler_block_by_func(instance.gtk_widget_destroy)
    button.connect('clicked', Gtk.main_quit)

    return instance
1042858
def make_connection(self):
        """"""
        if self._created_connections[self._pattern_idx] >= self.max_connections_per_pattern:
            raise ConnectionError("Too many connections")
        self._created_connections[self._pattern_idx] += 1
        conn = self.connection_class(**self.patterns[self._pattern_idx])
        conn._pattern_idx = self._pattern_idx
        return conn
470743
def emit(self, signalName, *args, **kwargs):
        
        assert signalName in self, "%s is not a registered signal" % signalName
        self[signalName].emit(*args, **kwargs)
721101
def connect_or_create(self, overwrite=False):
        
        connection = self._get_connection()
        if connection:
            return connection
        else:
            return self.create(overwrite=overwrite)
826906
def send(self, signal, plugin, **kwargs):
        
        if signal not in self.signals.keys():
            raise UnknownSignal("Unknown signal %s" % signal)
        self.__log.debug("Sending signal %s for %s" % (signal, plugin.name))
        rv = self.signals[signal].send(plugin, **kwargs)
        return rv
377169
def connect(self, interface, event, object_path, handler):
        
        if object_path:
            def callback(connection, sender_name, object_path,
                         interface_name, signal_name, parameters):
                return handler(*unpack_variant(parameters))
        else:
            def callback(connection, sender_name, object_path,
                         interface_name, signal_name, parameters):
                return handler(object_path, *unpack_variant(parameters))
        return self.connection.signal_subscribe(
            self.bus_name,
            interface,
            event,
            object_path,
            None,
            Gio.DBusSignalFlags.NONE,
            callback,
        )
528196
def block(self, signals=None, isBlocked=True):
        
        if signals:
            try:
                if isinstance(signals, basestring):
                    signals = [signals]
            except NameError:
                if isinstance(signals, str):
                    signals = [signals]

        signals = signals or self.keys()

        for signal in signals:
            if signal not in self:
                raise RuntimeError("Could not find signal matching %s" % signal)
            self[signal].block(isBlocked)
626616
def connect(obj, signal, slot, event_type=tango.EventType.CHANGE_EVENT):
    """"""
    return obj._helper.connect(signal, slot, event_type=event_type)
1087453
def connect_after(self, slot, *extra_args):
        
        slot = Slot(slot, *extra_args)
        self._after_functions.add(slot)
1247367
def session_callback(self, signal):
        
        if signal == SIGNAL_DATA:
            self.event.new_event(self.data)

        elif signal == SIGNAL_FAILED:
            self.retry()

        if signal in [SIGNAL_PLAYING, SIGNAL_FAILED] and \
                self.connection_status_callback:
            self.connection_status_callback(signal)
1357751
def connect(self, slot, *extra_args):
        
        slot = Slot(slot, *extra_args)
        self._functions.add(slot)