# import useful modules for Perks
import Perk, Task
from POR import POR
from i18n import _

class EirikurPerk(Perk.Perk):
  def init(self):
    self.registerEventTask(HandleSelectorChange(self))
    
class HandleSelectorChange(Task.SelectorTask):
  def executeActive(self, por, **kwargs):
    print 
    print "IAccessibleInfo new method tests:" 
    print '  floatvalue:', self.getAccFloatValue()
    print '  floatvalueextents:', self.getAccFloatValueExtents()
    print '  DefTextAttrs:', self.getAccDefTextAttrs()
    print '  TextSelection:', self.getAccTextSelection()
    print '  AccText:', self.getAccText()
    print '  TableExtents:', self.getAccTableExtents()
    print '  Locale:', self.getAccAppLocale()
    
##     try:
##       print self.getAccAttrs(), '<-- AccAttrs'
##     except:
##       pass
    print
##    print "DefaultAction Tests:"
##     print 'setAccCaret()', self.setAccCaret()
##     print 'setAccText()', self.setAccText("Hello from Eirikur!")
    return True

