Screen¶
Provides access to screen contents.
- class ScreenStreamer(connection, session_id, want_contents=True)¶
An asyncio context manager for monitoring the screen contents.
You can use this to be notified when screen contents change. Optionally, you can receive the actual contents of the screen.
Don’t create this yourself. Use Session.get_screen_streamer() instead. See its docstring for more info.
- async async_get(style=False) None | ScreenContents¶
Blocks until the screen contents change.
If this ScreenStreamer has been configured to provide screen contents, then they will be returned.
- Parameters:
style (
bool) – If True, include style information in the result.- Returns:
A
ScreenContents(if so configured), otherwise None.- Throws:
RPCExceptionif something goes wrong.
- class ScreenContents(proto)¶
Describes screen contents.
- line(index: int) LineContents¶
Returns the LineContents at the given index.
- Return type:
- Parameters:
index (
int) – should be at least 0 and less than number_of_lines.- Returns:
A
LineContentsobject.
- class LineContents(proto)¶
Describes the contents of a line.
