Ejemplo n.º 1
0
def test():
    app = KumReader()

    from e32 import Ao_lock
    lock = Ao_lock()
    appuifw.app.exit_key_handler = lock.signal
    lock.wait()
Ejemplo n.º 2
0
    def __init__(self):
        from e32 import Ao_lock
        from key_codes import EKeyEnter
        self.input_wait_lock = Ao_lock()
        self.input_stopped = False
        self.control = self.text = appuifw.Text()
        self.text.bind(EKeyEnter, self.input_wait_lock.signal)
        self.savestderr = sys.stderr
        self.savestdout = sys.stdout
        self.savestdin = sys.stdin
        sys.stderr = self
        sys.stdout = self
        sys.stdin = self
        self.writebuf = []

        def make_flusher(text, buf):
            def doflush():
                text.add(unicode(''.join(buf)))
                del buf[:]
                if text.len() > 1500:
                    text.delete(0, text.len() - 500)

            return doflush

        self._doflush = make_flusher(self.text, self.writebuf)
        self._flushgate = e32.ao_callgate(self._doflush)
Ejemplo n.º 3
0
    def __init__(self, logger = False):
        self.logger = logger
        from e32 import Ao_lock
        from key_codes import EKeyEnter
        self.input_wait_lock = Ao_lock()
        self.input_stopped = False
        self.control = self.text = appuifw.Text()
        self.text.font = ('title', 16, None)
        self.text.color = 0
        self.savestderr = sys.stderr
        self.savestdout = sys.stdout
        self.savestdin = sys.stdin
        sys.stderr = self
        sys.stdout = self
        sys.stdin = self
        self.writebuf = []
        self._doflush = self.clear()
        self._flushgate = self.clear()
        if self.logger :

            def make_flusher(text, buf):

                def doflush():
                    text.set_pos(text.len())
                    text.add(ru(''.join(buf)))
                    del buf[:]

                return doflush

            self._doflush = make_flusher(self.text, self.writebuf)
            self._flushgate = e32.ao_callgate(self._doflush)
        else:
            self.logger = False
            self.clear()
        return None
Ejemplo n.º 4
0
 def __init__(self, difficulty=3):
     self.difficulty = difficulty
     self.columns = range(1, 8)
     self.suits = range(1, 5)
     self.table = Table(initialCards=Deck(visible=False))
     self.selected = None
     self.deal(self.table)
     self.select(('game', 1))
     self.table.show()
     self.registerKeys()
     self.lock = Ao_lock()
     self.lock.wait()
     self.table.unshow()
Ejemplo n.º 5
0
 def __init__(self):
     self.columns = range(1, 9)
     self.free = range(1, 5)
     self.suits = range(1, 5)
     self.table = Table(initialCards=Deck(visible=True))
     self.selected = None
     self.deal(self.table)
     self.select(('game', 1))
     self.table.show()
     self.registerKeys()
     self.lock = Ao_lock()
     self.lock.wait()
     self.table.unshow()
Ejemplo n.º 6
0
 def __init__(self, dtext, dialog):
     self.dialog = dialog
     self.filelist = []
     self.filename = None
     self.lastpath = None
     self.winparam = []
     self.body = None
     self.optbody = None
     self.dtext = dtext
     self.outpath = 'E:\\Images'
     self.quality = 75
     self.bpp = 24
     self.compression = 'default'
     self.comprname = {'no' : self.dtext['comp_no'], 'fast' : self.dtext['comp_fast'], 'default' : self.dtext['comp_def'], 'best' : self.dtext['comp_best']}
     self.conf = None
     self.format = 'PNG'
     self.lock = Ao_lock()
Ejemplo n.º 7
0
    def __init__(self, sid=None):
        self.commands = {}
        self.events = {}
        self.pluginnames = []
        self.plugins = {}
        try:
            if sid == None:
                sid = GetSid()
            self.sid = sid

            Property.Define(sid, EKeyCommand, Property.EInt)
            Property.Define(sid, EKeyArguments, Property.EText)
            Property.Define(sid, EKeyResult, Property.EInt)
            self.pCommand = Property()
            self.pArgs = Property()
            self.pResult = Property()
            self.pCommand.Attach(sid, EKeyCommand, Property.EInt)
            self.pArgs.Attach(sid, EKeyArguments, Property.EText)
            self.pResult.Attach(sid, EKeyResult, Property.EInt)
            self.lResult = Ao_lock()
        except:
            DumpExceptionInfo()
Ejemplo n.º 8
0
    text = "simlock Status = %d" % status
    app.body.add(u'%s\n' % text)

    status = get_first_boot_status()
    text = "first boot Status = %d" % status
    app.body.add(u'%s\n' % text)

    status = get_sim_owned_status()
    text = "sim owned Status = %d" % status
    app.body.add(u'%s\n' % text)

    status = get_new_email_status()
    text = "new email Status = %d" % status
    app.body.add(u'%s\n' % text)

    status = get_wcdma_status()
    text = "wcdma Status = %d" % status
    app.body.add(u'%s\n' % text)

    status = get_sim_present()
    text = "sim present = %d" % status
    app.body.add(u'%s\n' % text)


lock = Ao_lock()
app.body = Text()
app.body.clear()
app.exit_key_handler = lock.signal
app.menu = [(u"View sysagent info", viewsysagent)]
lock.wait()
Ejemplo n.º 9
0
def quit():
    app.exit_key_handler = None
    script_lock.signal()
    capturer.stop()
    print "TERMINATO."
    print


def inizio():
    global img
    img = Image.open("C:\\nokia\\images\\tasti2.JPG")
    canv.blit(img)


script_lock = Ao_lock()
app.exit_key_handler = quit
appuifw.app.body = canv = appuifw.Canvas()
appuifw.app.screen = 'full'
capturer = keycapture.KeyCapturer(cb_capture)
capturer.forwarding = 0
capturer.keys = (keycapture.EKey0, keycapture.EKey1, keycapture.EKey2,
                 keycapture.EKey3, keycapture.EKey4, keycapture.EKey5,
                 keycapture.EKey6, keycapture.EKey7, keycapture.EKey8,
                 keycapture.EKey9, keycapture.EKeyYes, keycapture.EKeyNo,
                 keycapture.EKeySelect, keycapture.EKeyEdit,
                 keycapture.EKeyStar, keycapture.EKeyHash)
capturer.start()
inizio()
script_lock.wait()