textual-paint/typings/stransi/cursor.pyi
2023-05-09 16:58:25 -04:00

59 lines
1.3 KiB
Python

"""
This type stub file was generated by pyright.
"""
from dataclasses import dataclass
from .instruction import Instruction
"""Cursor movements."""
@dataclass
class CursorMove:
"""A single cursor movement."""
x: int = ...
y: int = ...
relative: bool = ...
@staticmethod
def to(x: int = ..., y: int = ...) -> CursorMove:
"""
Move the cursor to the given position.
The position is relative to the zero-based origin of the screen
(home position).
"""
...
@staticmethod
def to_home() -> CursorMove:
"""Move the cursor to the home position."""
...
@staticmethod
def up(steps: int = ...) -> CursorMove:
"""Move the cursor up by the given number of steps."""
...
@staticmethod
def down(steps: int = ...) -> CursorMove:
"""Move the cursor down by the given number of steps."""
...
@staticmethod
def left(steps: int = ...) -> CursorMove:
"""Move the cursor left by the given number of steps."""
...
@staticmethod
def right(steps: int = ...) -> CursorMove:
"""Move the cursor right by the given number of steps."""
...
@dataclass
class SetCursor(Instruction[CursorMove]):
"""Instruction to set the cursor position."""
move: CursorMove
...