nb.pyi 2.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677
  1. """Type stubs for immapp.nb notebook convenience API.
  2. Full documentation is in the implementation file (nb.py).
  3. """
  4. from typing import Callable, Optional, overload
  5. import asyncio
  6. from imgui_bundle.hello_imgui import RunnerParams, SimpleRunnerParams
  7. from imgui_bundle.immapp import AddOnsParams
  8. # run() - Blocking mode with screenshot
  9. @overload
  10. def run(
  11. runner_params: RunnerParams,
  12. addons_params: Optional[AddOnsParams] = None
  13. ) -> None: ...
  14. @overload
  15. def run(
  16. simple_params: SimpleRunnerParams,
  17. addons_params: Optional[AddOnsParams] = None
  18. ) -> None: ...
  19. @overload
  20. def run(
  21. gui_function: Callable[[], None],
  22. *,
  23. window_title: str = "",
  24. window_size_auto: bool = False,
  25. window_restore_previous_geometry: bool = False,
  26. window_size: Optional[tuple[int, int]] = None,
  27. fps_idle: float = 10.0,
  28. top_most: bool = False,
  29. ini_disable: bool = False,
  30. with_implot: bool = False,
  31. with_implot3d: bool = False,
  32. with_markdown: bool = False,
  33. with_node_editor: bool = False,
  34. with_tex_inspect: bool = False,
  35. with_latex: bool = False,
  36. ) -> None: ...
  37. # start() - Non-blocking async mode
  38. @overload
  39. def start(
  40. runner_params: RunnerParams,
  41. addons_params: Optional[AddOnsParams] = None
  42. ) -> asyncio.Task[None]: ...
  43. @overload
  44. def start(
  45. simple_params: SimpleRunnerParams,
  46. addons_params: Optional[AddOnsParams] = None
  47. ) -> asyncio.Task[None]: ...
  48. @overload
  49. def start(
  50. gui_function: Callable[[], None],
  51. *,
  52. window_title: str = "",
  53. window_size_auto: bool = True,
  54. window_restore_previous_geometry: bool = False,
  55. window_size: Optional[tuple[int, int]] = None,
  56. fps_idle: float = 10.0,
  57. top_most: bool = True,
  58. ini_disable: bool = False,
  59. with_implot: bool = False,
  60. with_implot3d: bool = False,
  61. with_markdown: bool = False,
  62. with_node_editor: bool = False,
  63. with_tex_inspect: bool = False,
  64. with_latex: bool = False,
  65. ) -> asyncio.Task[None]: ...
  66. # stop() and is_running()
  67. def stop() -> None: ...
  68. def is_running() -> bool: ...