add handler functio

This commit is contained in:
chrys 2018-09-05 19:13:20 +02:00
parent 8d6c96a44d
commit d5fa50e8c3
3 changed files with 13 additions and 1 deletions

View File

@ -56,6 +56,8 @@ class eventManager():
self.env['runtime']['fenrirManager'].handleExecuteCommand(event)
elif event['Type'] == fenrirEventType.ByteInput:
self.env['runtime']['fenrirManager'].handleByteInput(event)
elif event['Type'] == fenrirEventType.RemoteIncomming:
self.env['runtime']['fenrirManager'].handleRemoteIncomming(event)
def isMainEventLoopRunning(self):
return self.running.value == 1
def startMainEventLoop(self):

View File

@ -105,6 +105,10 @@ class fenrirManager():
self.environment['runtime']['commandManager'].executeCommand( command, 'help')
return
self.environment['runtime']['commandManager'].executeCommand( command, 'commands')
def handleRemoteIncomming(self, event):
if not event['Data']:
return
self.environment['runtime']['remoteManager'].handleRemoteIncomming(event['Data'])
def handleScreenChange(self, event):
self.environment['runtime']['screenManager'].hanldeScreenChange(event['Data'])
'''

View File

@ -5,6 +5,7 @@
# By Chrys, Storm Dragon, and contributers.
from fenrirscreenreader.core import debug
from fenrirscreenreader.core.eventData import fenrirEventType
class remoteManager():
def __init__(self):
@ -13,3 +14,8 @@ class remoteManager():
self.env = environment
def shutdown(self):
pass
def unixSocketWatchDog():
pass
def handleRemoteIncomming(self, eventData):
if not eventData:
return