backends.pyi 3.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124
  1. # Backend API
  2. # Note: all this code is generated *manually*
  3. from imgui_bundle.imgui import ImDrawData
  4. ###############################################################################
  5. # <bindings for imgui_impl_opengl3.h
  6. ###############################################################################
  7. def opengl3_init(glsl_version: str) -> bool:
  8. pass
  9. def opengl3_shutdown() -> None:
  10. pass
  11. def opengl3_new_frame() -> None:
  12. pass
  13. def opengl3_render_draw_data(draw_data: ImDrawData) -> None:
  14. pass
  15. # (Optional) Called by Init/NewFrame/Shutdown
  16. def opengl3_create_fonts_texture() -> bool:
  17. pass
  18. def opengl3_destroy_fonts_texture() -> None:
  19. pass
  20. def opengl3_create_device_objects() -> bool:
  21. pass
  22. def opengl3_destroy_device_objects() -> None:
  23. pass
  24. ###############################################################################
  25. # <bindings for imgui_impl_opengl2.h
  26. #
  27. ###############################################################################
  28. def opengl2_init() -> bool:
  29. pass
  30. def opengl2_shutdown() -> None:
  31. pass
  32. def opengl2_new_frame() -> None:
  33. pass
  34. def opengl2_render_draw_data(draw_data: ImDrawData) -> None:
  35. pass
  36. #
  37. # Called by Init/NewFrame/Shutdown
  38. #
  39. def opengl2_create_fonts_texture() -> bool:
  40. pass
  41. def opengl2_destroy_fonts_texture() -> None:
  42. pass
  43. def opengl2_create_device_objects() -> bool:
  44. pass
  45. def opengl2_destroy_device_objects() -> None:
  46. pass
  47. ###############################################################################
  48. # <bindings for imgui_impl_glfw.h
  49. ###############################################################################
  50. def glfw_init_for_opengl(window_address: int, install_callbacks: bool) -> bool:
  51. pass
  52. def glfw_init_for_vulkan(window_address: int, install_callbacks: bool) -> bool:
  53. pass
  54. def glfw_init_for_other(window_address: int, install_callbacks: bool) -> bool:
  55. pass
  56. def glfw_shutdown() -> None:
  57. pass
  58. def glfw_new_frame() -> None:
  59. pass
  60. # GLFW callbacks (installer)
  61. # - When calling Init with 'install_callbacks=True': ImGui_ImplGlfw_InstallCallbacks() is called. GLFW callbacks will be installed for you. They will chain-call user's previously installed callbacks, if any.
  62. # - When calling Init with 'install_callbacks=False': GLFW callbacks won't be installed. You will need to call individual function yourself from your own GLFW callbacks.
  63. def glfw_install_callbacks(window_address: int) -> None:
  64. pass
  65. def glfw_restore_callbacks(window_address: int) -> None:
  66. pass
  67. # GLFW callbacks (individual callbacks to call if you didn't install callbacks)
  68. def glfw_window_focus_callback(window_address: int, focused: int) -> None:
  69. """Since 1.84"""
  70. pass
  71. def glfw_cursor_enter_callback(window_address: int, entered: int) -> None:
  72. """Since 1.84"""
  73. pass
  74. def glfw_cursor_pos_callback(window_address: int, x: float, y: float) -> None:
  75. """Since 1.87"""
  76. pass
  77. def glfw_mouse_button_callback(
  78. window_address: int, button: int, action: int, mods: int
  79. ) -> None:
  80. pass
  81. def glfw_scroll_callback(window_address: int, xoffset: float, yoffset: float) -> None:
  82. pass
  83. def glfw_key_callback(
  84. window_address: int, key: int, scancode: int, action: int, mods: int
  85. ) -> None:
  86. pass
  87. def glfw_char_callback(window_address: int, c: int) -> None:
  88. pass
  89. # def glfw_monitor_callback(monitor: GLFWmonitor, event: int) -> None:
  90. # pass