home *** CD-ROM | disk | FTP | other *** search
/ Maximum CD 2010 November / maximum-cd-2010-11.iso / DiscContents / calibre-0.7.13.msi / file_2330 (.txt) < prev    next >
Encoding:
Python Compiled Bytecode  |  2010-08-06  |  1.4 KB  |  31 lines

  1. # Source Generated with Decompyle++
  2. # File: in.pyc (Python 2.6)
  3.  
  4.  
  5. class Event(object):
  6.     
  7.     def __init__(self, console, input):
  8.         pass
  9.  
  10.     
  11.     def __repr__(self):
  12.         if self.type in ('KeyPress', 'KeyRelease'):
  13.             chr = self.char
  14.             if ord(chr) < ord('A'):
  15.                 chr = '?'
  16.             
  17.             s = u"%s char='%s'%d keysym='%s' keycode=%d:%x state=%x keyinfo=%s" % (self.type, chr, ord(self.char), self.keysym, self.keycode, self.keycode, self.state, self.keyinfo)
  18.         elif self.type in ('Motion', 'Button'):
  19.             s = u'%s x=%d y=%d state=%x' % (self.type, self.x, self.y, self.state)
  20.         elif self.type == 'Configure':
  21.             s = u'%s w=%d h=%d' % (self.type, self.width, self.height)
  22.         elif self.type in ('FocusIn', 'FocusOut'):
  23.             s = self.type
  24.         elif self.type == 'Menu':
  25.             s = u'%s state=%x' % (self.type, self.state)
  26.         else:
  27.             s = u'unknown event type'
  28.         return s
  29.  
  30.  
  31.