Skip to content

ipygame.display

pygame-compatible display module.

def init() -> None

Initialise the display module.

def quit() -> None

Uninitialise the display module.

def get_init() -> bool

def set_mode(size: tuple[int, int] = (0, 0),
flags: int = 0,
depth: int = 0,
display: int = 0,
vsync: int = 0) -> Surface

Create a display Surface backed by an ipycanvas Canvas.

The canvas widget is automatically shown in the notebook output.

def get_surface() -> Surface | None

Return the current display Surface, or None.

def flip() -> None

Update the full display Surface to the canvas.

def update(rectangle=None) -> None

Update portions of the display (or the full display if rectangle is None).

def set_caption(title: str, icontitle: str = "") -> None

def get_caption() -> tuple[str, str]

def set_icon(surface: Surface) -> None

def iconify() -> bool

def toggle_fullscreen() -> int

class _VidInfo()

Minimal video-info object returned by Info().

def __init__(w: int, h: int)

def Info() -> _VidInfo

def get_driver() -> str

def get_window_size() -> tuple[int, int]