Return all matches for this event. The first matcher is also returned for each matched object.
        
        :param event: an input event
764317
def matchesWithMatchers(self, event):
        '''
        
        '''
        ret = []
        self._matches(event, set(), ret)
        return tuple(ret)
597202
def match(self, item):
        
        if self._position == len(self._matchers):
            raise RuntimeError('Matcher exhausted, no more matchers to use')

        matcher = self._matchers[self._position]
        if matcher(item):
            self._position += 1

        if self._position == len(self._matchers):
            # All patterns have been matched
            return True

        return False
983020
def eventFilter( self, object, event ):
        
        if ( event.type() == event.KeyPress ):
            if ( event.key() in (Qt.Key_Return, Qt.Key_Enter) ):
                self.addQuery()
                return True
        
        return False
1267919
def get_events(self):
        '''
        
        '''
        ret = []
        while True:
            event = self.event.get_event(wait=1, full=True)
            if event is None:
                return ret
            ret.append(event)
1044032
def event(self, name):
        
        events = self.events()
        if name not in events:
            events[name] = Event(name, self, 0)
        return events[name]
227855
def _filter(self, event):
        '''
        
        '''
        tag = event['tag']
        if self.opts['event_return_whitelist']:
            ret = False
        else:
            ret = True
        for whitelist_match in self.opts['event_return_whitelist']:
            if fnmatch.fnmatch(tag, whitelist_match):
                ret = True
                break
        for blacklist_match in self.opts['event_return_blacklist']:
            if fnmatch.fnmatch(tag, blacklist_match):
                ret = False
                break
        return ret
574831
def get_events(self) -> List[Event]:
        
        LOG.debug('Getting events for %s', self.key)
        return get_events(self.key)
622161
def eventFilter( self, object, event ):
        
        if event.type() == event.KeyPress:
            if event.key() == Qt.Key_Escape:
                self.rejectEdit()
                return True
            
            elif event.key() in (Qt.Key_Return, Qt.Key_Enter):
                self.acceptEdit()
                return True
        
        elif event.type() == event.FocusOut:
            self.acceptEdit()
        
        return False
529460
def matches?(selector)
      selector.each_pair do |key, value|
        return false unless matcher(key, value).matches?(value)
      end
      true
    end
356910
def event_return(events):
    '''
    
    '''

    for event in events:
        ret = event.get('data', False)

        if ret:
            returner(ret)
1239616
async def wait_for_all_to_process(self, *matchers, eventlist = None, eventdict = None,
                                            callback = None):
        
        def _callback(event, matcher):
            event.canignore = True
            if callback:
                callback(event, matcher)
        return await self.wait_for_all(*matchers, eventlist=eventlist,
                                       eventdict=eventdict, callback=_callback)
1243527
def find_handlers(event_name, registry=HANDLER_REGISTRY):
    
    handlers = []

    # event_name can be a BaseEvent or the string representation
    if isinstance(event_name, basestring):
        matched_events = [event for event in registry.keys()
            if fnmatch.fnmatchcase(event_name, event)]
        for matched_event in matched_events:
            handlers.extend(registry.get(matched_event))
    else:
        handlers = registry.get(find_event(event_name), [])

    return handlers
514826
def filter_events(cls, client, event_data):
        """"""

        for event in cls.events:
            # try event filters
            if event.matches(client, event_data):
                yield event
207102
def events(self, *events):
        
        return self.send_events(self.create_event(e) for e in events)
243627
def match(self, expression=None, xpath=None, namespaces=None): 
        """"""
        class MatchObject(Dict):
            pass
        def _match(function):
            self.matches.append(
                MatchObject(expression=expression, xpath=xpath, function=function, namespaces=namespaces))
            def wrapper(self, *args, **params):
                return function(self, *args, **params)
            return wrapper
        return _match
601504
def _event_funcs(self, event: str) -> Iterable[Callable]:
        
        for func in self._events[event]:
            yield func
811441
@Override
    public boolean matches(Object otherEvent)
    {
        if (otherEvent == this) {
            return true;
        }

        boolean isMatching = false;

        if (this.getClass().isAssignableFrom(otherEvent.getClass())) {
            isMatching = getEventFilter().matches(((AbstractFilterableEvent) otherEvent).getEventFilter());
        }

        return isMatching;
    }