mirror of
https://github.com/kovidgoyal/kitty
synced 2026-07-24 01:08:10 +02:00
Add threaded job infrastructure to tui
This commit is contained in:
@@ -5,9 +5,10 @@
|
||||
|
||||
class Handler:
|
||||
|
||||
def initialize(self, screen_size, quit_loop, wakeup):
|
||||
def initialize(self, screen_size, quit_loop, wakeup, start_job):
|
||||
self.screen_size, self.quit_loop = screen_size, quit_loop
|
||||
self.wakeup = wakeup
|
||||
self.start_job = start_job
|
||||
|
||||
def on_resize(self, screen_size):
|
||||
self.screen_size = screen_size
|
||||
@@ -33,6 +34,9 @@ class Handler:
|
||||
def on_wakeup(self):
|
||||
pass
|
||||
|
||||
def on_job_done(self, job_id, job_result):
|
||||
pass
|
||||
|
||||
def write(self, data):
|
||||
if isinstance(data, str):
|
||||
data = data.encode('utf-8')
|
||||
|
||||
Reference in New Issue
Block a user