Exemplo n.º 1
0
def _wrap_event(raw, owned=0):
    event = cstruct.xine_event_t(raw)
    if event.data_length == 0:
        # FIXME: check for actual data size needed?
        return Event(_raw=raw, _owned=owned)
    elif constwrap.XINE_EVENT_INPUT.contains(event.type):
        return InputEvent(_raw=raw, _owned=owned)
    else:
        cls = _event_types.get(event.type, Event)
        return cls(_raw=raw, _owned=owned)
Exemplo n.º 2
0
 def setUp(self):
     raw = libxine.px_make_input_event(1, 2, 3, 4)
     self.e = cstruct.xine_event_t(raw)