portable_file_dialogs.pyi 4.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168
  1. ###############################################################################
  2. # This file is a part of Dear ImGui Bundle, NOT a part of portable-file-dialogs
  3. # -----------------------------------------------------------------------------
  4. # portable_file_dialogs.pyi: auto-generated bindings for
  5. # portable-file-dialogs (Portable GUI dialogs library, C++11, single-header)
  6. # See https://github.com/samhocevar/portable-file-dialogs
  7. #
  8. # Most of the code of this file is automatically generated (using https://pthom.github.io/litgen/),
  9. # and is generally very close to the C++ version. Comments, docs are identical.
  10. # Do not manually edit the autogenerated parts (look for "Autogenerated" comments)!
  11. ###############################################################################
  12. # ruff: noqa: B008
  13. import enum
  14. from typing import List, Optional
  15. # Process wait timeout, in milliseconds
  16. default_wait_timeout = 20
  17. # !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! AUTOGENERATED CODE !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
  18. # <litgen_stub> // Autogenerated code below! Do not edit!
  19. #################### <generated_from:portable_file_dialogs_simplified.h> ####################
  20. class button(enum.IntEnum):
  21. cancel = enum.auto() # (= -1)
  22. ok = enum.auto() # (= 0)
  23. yes = enum.auto() # (= 1)
  24. no = enum.auto() # (= 2)
  25. abort = enum.auto() # (= 3)
  26. retry = enum.auto() # (= 4)
  27. ignore = enum.auto() # (= 5)
  28. class choice(enum.IntEnum):
  29. ok = enum.auto() # (= 0)
  30. ok_cancel = enum.auto() # (= 1)
  31. yes_no = enum.auto() # (= 2)
  32. yes_no_cancel = enum.auto() # (= 3)
  33. retry_cancel = enum.auto() # (= 4)
  34. abort_retry_ignore = enum.auto() # (= 5)
  35. class icon(enum.IntEnum):
  36. info = enum.auto() # (= 0)
  37. warning = enum.auto() # (= 1)
  38. error = enum.auto() # (= 2)
  39. question = enum.auto() # (= 3)
  40. class opt(enum.IntEnum):
  41. """Additional option flags for various dialog constructors"""
  42. none = enum.auto() # (= 0)
  43. # For file open, allow multiselect.
  44. multiselect = enum.auto() # (= 0x1)
  45. # For file save, force overwrite and disable the confirmation dialog.
  46. force_overwrite = enum.auto() # (= 0x2)
  47. # For folder select, force path to be the provided argument instead
  48. # of the last opened directory, which is the Microsoft-recommended,
  49. # user-friendly behaviour.
  50. force_path = enum.auto() # (= 0x4)
  51. class notify:
  52. """
  53. The notify widget
  54. """
  55. def __init__(self, title: str, message: str, _icon: icon = icon.info) -> None:
  56. pass
  57. def ready(self, timeout: int = default_wait_timeout) -> bool:
  58. pass
  59. def kill(self) -> bool:
  60. pass
  61. class message:
  62. """
  63. The message widget
  64. """
  65. def __init__(
  66. self,
  67. title: str,
  68. text: str,
  69. _choice: choice = choice.ok_cancel,
  70. _icon: icon = icon.info,
  71. ) -> None:
  72. pass
  73. def result(self) -> button:
  74. pass
  75. def ready(self, timeout: int = default_wait_timeout) -> bool:
  76. pass
  77. def kill(self) -> bool:
  78. pass
  79. def all_files_filter() -> List[str]:
  80. pass
  81. class open_file:
  82. """
  83. The open_file, save_file, and open_folder widgets
  84. """
  85. def __init__(
  86. self,
  87. title: str,
  88. default_path: str = "",
  89. filters: Optional[List[str]] = None,
  90. options: opt = opt.none,
  91. ) -> None:
  92. """Python bindings defaults:
  93. If filters is None, then its default value will be: all_files_filter()
  94. """
  95. pass
  96. def ready(self, timeout: int = default_wait_timeout) -> bool:
  97. pass
  98. def kill(self) -> bool:
  99. pass
  100. def result(self) -> List[str]:
  101. pass
  102. class save_file:
  103. def __init__(
  104. self,
  105. title: str,
  106. default_path: str = "",
  107. filters: Optional[List[str]] = None,
  108. options: opt = opt.none,
  109. ) -> None:
  110. """Python bindings defaults:
  111. If filters is None, then its default value will be: all_files_filter()
  112. """
  113. pass
  114. def ready(self, timeout: int = default_wait_timeout) -> bool:
  115. pass
  116. def kill(self) -> bool:
  117. pass
  118. def result(self) -> str:
  119. pass
  120. class select_folder:
  121. def __init__(
  122. self, title: str, default_path: str = "", options: opt = opt.none
  123. ) -> None:
  124. pass
  125. def ready(self, timeout: int = default_wait_timeout) -> bool:
  126. pass
  127. def kill(self) -> bool:
  128. pass
  129. def result(self) -> str:
  130. pass
  131. #################### </generated_from:portable_file_dialogs_simplified.h> ####################
  132. # </litgen_stub> // Autogenerated code end!