Ejemplo n.º 1
0
 def event( self, t, ev ):
     if self._instance:
         system.global_send_event( self._instance, time.time() - self._instance_start, ev )
Ejemplo n.º 2
0
 def event(self, t, ev):
     if self._instance:
         system.global_send_event(self._instance,
                                  time.time() - self._instance_start, ev)
Ejemplo n.º 3
0
 def event_mouseup( self, ev ):
     system.global_send_event( self.object, self.pdict.get( 't', None ),
                               ('mouseup', ev.x, self.size[1] - ev.y, self.modlist[ev.state&7]) )
     self.s.unbind( '<Motion>', self.mousebind[0] )
     self.s.unbind( '<ButtonRelease-1>', self.mousebind[1] )
     del self.mousebind
Ejemplo n.º 4
0
 def event_mousemove( self, ev ):
     system.global_send_event( self.object, self.pdict.get( 't', None ),
                               ('mousemove', ev.x, self.size[1] - ev.y, self.modlist[ev.state&7]) )
Ejemplo n.º 5
0
 def event_mousedown( self, ev ):
     system.global_send_event( self.object, self.pdict.get( 't', None ),
                               ('mousedown', ev.x, self.size[1] - ev.y, self.modlist[ev.state&7]) )
     self.mousebind = (self.s.bind( '<Motion>', self.event_mousemove ),
                       self.s.bind( '<ButtonRelease-1>', self.event_mouseup ))
Ejemplo n.º 6
0
 def event_key( self, ev ):
     if len(ev.keysym) == 1:
         k = ev.keysym.lower()
         if k in allowed_keyevents and isinstance( self.object, controller.Controller ):
             system.global_send_event( self.object, self.pdict.get( 't', None ),
                                       ('key', k, ev.x, self.size[1] - ev.y, self.modlist[ev.state&7]) )