hello_imgui_nb.pyi 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. """Type stubs for hello_imgui.nb notebook convenience API.
  2. This module provides notebook-friendly wrappers for hello_imgui (without AddOnsParams).
  3. """
  4. from typing import Callable, Optional, overload
  5. import asyncio
  6. from imgui_bundle.hello_imgui import RunnerParams, SimpleRunnerParams
  7. # run() - Blocking mode
  8. @overload
  9. def run(runner_params: RunnerParams) -> None: ...
  10. @overload
  11. def run(simple_params: SimpleRunnerParams) -> None: ...
  12. @overload
  13. def run(
  14. gui_function: Callable[[], None],
  15. *,
  16. window_title: str = "",
  17. window_size_auto: bool = False,
  18. window_restore_previous_geometry: bool = False,
  19. window_size: Optional[tuple[int, int]] = None,
  20. fps_idle: float = 10.0,
  21. top_most: bool = False,
  22. ) -> None: ...
  23. # start() - Non-blocking async mode
  24. @overload
  25. def start(runner_params: RunnerParams) -> asyncio.Task[None]: ...
  26. @overload
  27. def start(simple_params: SimpleRunnerParams) -> asyncio.Task[None]: ...
  28. @overload
  29. def start(
  30. gui_function: Callable[[], None],
  31. *,
  32. window_title: str = "",
  33. window_size_auto: bool = True,
  34. window_restore_previous_geometry: bool = False,
  35. window_size: Optional[tuple[int, int]] = None,
  36. fps_idle: float = 10.0,
  37. top_most: bool = True,
  38. ) -> asyncio.Task[None]: ...
  39. # stop() and is_running()
  40. def stop() -> None: ...
  41. def is_running() -> bool: ...