prepeare for attributes
This commit is contained in:
parent
aaf3c93e55
commit
ecc5dcfe69
@ -21,17 +21,15 @@ class Terminal:
|
|||||||
self.stream.feed(data)
|
self.stream.feed(data)
|
||||||
def dump(self):
|
def dump(self):
|
||||||
cursor = self.screen.cursor
|
cursor = self.screen.cursor
|
||||||
lines = []
|
allAttributes = []
|
||||||
data = '\n'.join(self.screen.display)
|
text = '\n'.join(self.screen.display)
|
||||||
#print(len(data))
|
for y in range(self.screen.lines):
|
||||||
#for y in range(self.screen.lines):
|
line = self.screen.buffer[y]
|
||||||
# line = self.screen.buffer[y]
|
attributes = [(char.reverse, char.fg, char.bg, char.bold, char.italics, char.underscore, char.strikethrough)
|
||||||
# #data = [(char.data, char.reverse, char.fg, char.bg)
|
for char in (line[x] for x in range(self.screen.columns))]
|
||||||
# # for char in (line[x] for x in range(self.screen.columns))]
|
allAttributes.append((attributes))
|
||||||
# lines.append((data))
|
|
||||||
#print(self.screen.lines)
|
|
||||||
self.screen.dirty.clear()
|
self.screen.dirty.clear()
|
||||||
return {"cursor": (cursor.x, cursor.y), "lines": data}.copy()
|
return {"cursor": (cursor.x, cursor.y), "lines": text, 'attributes': allAttributes}.copy()
|
||||||
|
|
||||||
class driver(screenDriver):
|
class driver(screenDriver):
|
||||||
def __init__(self):
|
def __init__(self):
|
||||||
@ -144,7 +142,7 @@ class driver(screenDriver):
|
|||||||
},
|
},
|
||||||
'screen': '1',
|
'screen': '1',
|
||||||
'text': content['lines'],
|
'text': content['lines'],
|
||||||
'attributes': None,
|
'attributes': content['attributes'],
|
||||||
'screenUpdateTime': time.time(),
|
'screenUpdateTime': time.time(),
|
||||||
}
|
}
|
||||||
#print(content['lines'][0])
|
#print(content['lines'][0])
|
||||||
|
Loading…
Reference in New Issue
Block a user