Skip to content

Commit

Permalink
remove ImGui prefix from classes and enums => lots of API changes
Browse files Browse the repository at this point in the history
  • Loading branch information
pthom committed Nov 28, 2022
1 parent 151d11b commit 19ca013
Show file tree
Hide file tree
Showing 6 changed files with 1,176 additions and 1,311 deletions.
24 changes: 14 additions & 10 deletions bindings/imgui_bundle/hello_imgui.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -3,31 +3,35 @@ import numpy as np
import enum

# Manual code
import imgui_bundle.imgui

DockSpaceName = str
from imgui_bundle.imgui import (
ImVec2, ImVec4,
ImFontConfig, ImFont,
ImTextureID,
ImGuiDir_,
ImGuiWindowFlags,
ImGuiCond,
ImGuiCond_,
ImGuiStyle
Dir_,
Cond_,
)


VoidFunction = Callable[[], None]
AnyEventCallback = Callable[[Any], None]
ScreenSize = Tuple[int, int]
ScreenPosition = Tuple[int, int]
ImGuiCond_FirstUseEver = ImGuiCond_.first_use_ever
ImGuiCond_FirstUseEver = Cond_.first_use_ever

DefaultScreenSize = (800, 600)
DefaultWindowSize = (800, 600)
DefaultScreenPosition = (40, 40)

ImGuiDir_Down = ImGuiDir_.down
ImGuiCond = imgui_bundle.imgui.Cond
ImGuiDir_Down = Dir_.down
ImGuiTheme = imgui_bundle.hello_imgui
ImGuiStyle = imgui_bundle.imgui.Style
ImGuiDir_ = imgui_bundle.imgui.Dir_
ImGuiWindowFlags = imgui_bundle.imgui.WindowFlags


EmptyVoidFunction: VoidFunction
EmptyEventCallback: AnyEventCallback
Expand Down Expand Up @@ -1104,7 +1108,7 @@ class DockingSplit:
self,
initial_dock_: DockSpaceName = "",
new_dock_: DockSpaceName = "",
direction_: ImGuiDir_ = ImGuiDir_.down,
direction_: ImGuiDir_ = Dir_.down,
ratio_: float = 0.25
) -> None:
pass
Expand Down Expand Up @@ -1190,12 +1194,12 @@ class DockableWindow:
# ImVec2 windowSize = ImVec2(0.f, 0.f); /* original C++ signature */
window_size: ImVec2 = ImVec2(0., 0.)
# ImGuiCond windowSizeCondition = ImGuiCond_FirstUseEver; /* original C++ signature */
window_size_condition: ImGuiCond = ImGuiCond_.first_use_ever
window_size_condition: ImGuiCond = Cond_.first_use_ever

# ImVec2 windowPosition = ImVec2(0.f, 0.f); /* original C++ signature */
window_position: ImVec2 = ImVec2(0., 0.)
# ImGuiCond windowPositionCondition = ImGuiCond_FirstUseEver; /* original C++ signature */
window_position_condition: ImGuiCond = ImGuiCond_.first_use_ever
window_position_condition: ImGuiCond = Cond_.first_use_ever

# bool focusWindowAtNextFrame = false; /* original C++ signature */
focus_window_at_next_frame: bool = False
Expand Down

0 comments on commit 19ca013

Please sign in to comment.