Skip to content

Commit

Permalink
Regenerate all bindings post update litgen (handle mutable default pa…
Browse files Browse the repository at this point in the history
…rams)
  • Loading branch information
pthom committed Nov 15, 2024
1 parent b552e21 commit ce4c08d
Show file tree
Hide file tree
Showing 41 changed files with 8,434 additions and 1,821 deletions.
547 changes: 428 additions & 119 deletions bindings/imgui_bundle/hello_imgui.pyi

Large diffs are not rendered by default.

23 changes: 18 additions & 5 deletions bindings/imgui_bundle/im_cool_bar.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ Python bindings for https://github.com/aiekick/ImCoolBar
"""
# ruff: noqa: B008
import enum
from typing import Optional

from imgui_bundle.imgui import ImVec2, WindowFlags, WindowFlags_

Expand Down Expand Up @@ -54,20 +55,32 @@ class ImCoolBarConfig:
effect_strength: float = 0.5
def __init__(
self,
v_anchor: ImVec2 = ImVec2(-1.0, -1.0),
v_anchor: Optional[ImVec2] = None,
v_normal_size: float = 40.0,
v_hovered_size: float = 60.0,
v_anim_step: float = 0.15,
v_effect_strength: float = 0.5
) -> None:
""" //"""
"""---
Python bindings defaults:
If vAnchor is None, then its default value will be: ImVec2(-1.0, -1.0)
//
"""
pass
def begin_cool_bar(
v_label: str,
v_cb_flags: ImCoolBarFlags = ImCoolBarFlags_.vertical,
v_config: ImCoolBarConfig = ImCoolBarConfig(),
v_flags: ImGuiWindowFlags = WindowFlags_.none
v_cb_flags: Optional[ImCoolBarFlags] = None,
v_config: Optional[ImCoolBarConfig] = None,
v_flags: Optional[ImGuiWindowFlags] = None
) -> bool:
"""---
Python bindings defaults:
If any of the params below is None, then its default value below will be used:
vCBFlags: ImCoolBarFlags_.vertical
vConfig: initialized with default value
vFlags: WindowFlags_.none
"""
pass
def end_cool_bar() -> None:
pass
Expand Down
276 changes: 216 additions & 60 deletions bindings/imgui_bundle/imgui/__init__.pyi

Large diffs are not rendered by default.

202 changes: 149 additions & 53 deletions bindings/imgui_bundle/imgui/internal.pyi

Large diffs are not rendered by default.

77 changes: 57 additions & 20 deletions bindings/imgui_bundle/imgui/test_engine.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -775,11 +775,15 @@ class TestOutput:
def __init__(
self,
status: TestStatus = TestStatus_Unknown,
log: TestLog = TestLog(),
log: Optional[TestLog] = None,
start_time: ImU64 = 0,
end_time: ImU64 = 0,
) -> None:
"""Auto-generated default constructor with named params"""
"""Auto-generated default constructor with named params
---
Python bindings defaults:
If Log is None, then its default value will be: TestLog()
"""
pass

class Test:
Expand Down Expand Up @@ -1424,10 +1428,14 @@ class TestContext:
self,
window_ref: Union[TestRef, str],
pos: ImVec2,
pivot: ImVec2 = ImVec2(0.0, 0.0),
pivot: Optional[ImVec2] = None,
flags: TestOpFlags = TestOpFlags_None,
) -> None:
"""(private API)"""
"""---
Python bindings defaults:
If pivot is None, then its default value will be: ImVec2(0.0, 0.0)
(private API)
"""
pass
# void WindowResize(ImGuiTestRef window_ref, ImVec2 sz); /* original C++ signature */
def window_resize(self, window_ref: Union[TestRef, str], sz: ImVec2) -> None:
Expand Down Expand Up @@ -1992,11 +2000,15 @@ class TestContext:
self,
src_id: Union[TestRef, str],
dst_id: Union[TestRef, str],
split_dir: Dir = Dir_None,
split_dir: Optional[Dir] = None,
is_outer_docking: bool = False,
flags: TestOpFlags = 0,
) -> None:
"""(private API)"""
"""---
Python bindings defaults:
If split_dir is None, then its default value will be: Dir_None
(private API)
"""
pass
# void UndockNode(ImGuiID dock_id); /* original C++ signature */
def undock_node(self, dock_id: ID) -> None:
Expand Down Expand Up @@ -2052,7 +2064,7 @@ class TestContext:
# ImGuiTestContext(ImGuiTestGenericVars GenericVars = ImGuiTestGenericVars(), ImGuiTestOpFlags OpFlags = ImGuiTestOpFlags_None, int PerfStressAmount = 0, int FrameCount = 0, int FirstTestFrameCount = 0, bool FirstGuiFrame = false, bool HasDock = false, ImGuiTestRunFlags RunFlags = ImGuiTestRunFlags_None, ImGuiTestActiveFunc ActiveFunc = ImGuiTestActiveFunc_None, double RunningTime = 0.0, int ActionDepth = 0, int CaptureCounter = 0, int ErrorCounter = 0, bool Abort = false, double PerfRefDt = -1.0, int PerfIterations = 400, ImGuiID RefID = 0, ImGuiID RefWindowID = 0, ImGuiInputSource InputMode = ImGuiInputSource_Mouse, ImVector<char> Clipboard = ImVector<char>(), ImVector<ImGuiWindow*> ForeignWindowsToHide = ImVector<ImGuiWindow*>(), ImGuiTestItemInfo DummyItemInfoNull = ImGuiTestItemInfo(), bool CachedLinesPrintedToTTY = false); /* original C++ signature */
def __init__(
self,
generic_vars: TestGenericVars = TestGenericVars(),
generic_vars: Optional[TestGenericVars] = None,
op_flags: TestOpFlags = TestOpFlags_None,
perf_stress_amount: int = 0,
frame_count: int = 0,
Expand All @@ -2070,13 +2082,22 @@ class TestContext:
perf_iterations: int = 400,
ref_id: ID = 0,
ref_window_id: ID = 0,
input_mode: InputSource = InputSource_Mouse,
clipboard: ImVector_char = ImVector_char(),
foreign_windows_to_hide: ImVector_Window_ptr = ImVector_Window_ptr(),
dummy_item_info_null: TestItemInfo = TestItemInfo(),
input_mode: Optional[InputSource] = None,
clipboard: Optional[ImVector[int]] = None,
foreign_windows_to_hide: Optional[ImVector[Window]] = None,
dummy_item_info_null: Optional[TestItemInfo] = None,
cached_lines_printed_to_tty: bool = False,
) -> None:
"""Auto-generated default constructor with named params"""
"""Auto-generated default constructor with named params
---
Python bindings defaults:
If any of the params below is None, then its default value below will be used:
GenericVars: TestGenericVars()
InputMode: InputSource_Mouse
Clipboard: ImVector_char()
ForeignWindowsToHide: ImVector_Window_ptr()
DummyItemInfoNull: TestItemInfo()
"""
pass

# -------------------------------------------------------------------------
Expand Down Expand Up @@ -2130,8 +2151,12 @@ class TestInfoTask:
# Output
result: TestItemInfo
# ImGuiTestInfoTask(ImGuiID ID = 0, int FrameCount = -1, ImGuiTestItemInfo Result = ImGuiTestItemInfo()); /* original C++ signature */
def __init__(self, id_: ID = 0, frame_count: int = -1, result: TestItemInfo = TestItemInfo()) -> None:
"""Auto-generated default constructor with named params"""
def __init__(self, id_: ID = 0, frame_count: int = -1, result: Optional[TestItemInfo] = None) -> None:
"""Auto-generated default constructor with named params
---
Python bindings defaults:
If Result is None, then its default value will be: TestItemInfo()
"""
pass

class TestGatherTask:
Expand Down Expand Up @@ -2304,13 +2329,19 @@ class TestInput:
def __init__(
self,
type: TestInputType = TestInputType_None,
key_chord: KeyChord = Key_None,
key_chord: Optional[KeyChord] = None,
char: ImWchar = 0,
down: bool = False,
viewport_id: ID = 0,
viewport_pos_size: ImVec2 = ImVec2(),
viewport_pos_size: Optional[ImVec2] = None,
) -> None:
"""Auto-generated default constructor with named params"""
"""Auto-generated default constructor with named params
---
Python bindings defaults:
If any of the params below is None, then its default value below will be used:
KeyChord: Key_None
ViewportPosSize: ImVec2()
"""
pass

class TestInputs:
Expand All @@ -2329,14 +2360,20 @@ class TestInputs:
# ImGuiTestInputs(ImVec2 MousePosValue = ImVec2(), ImVec2 MouseWheel = ImVec2(), ImGuiID MouseHoveredViewport = 0, int MouseButtonsValue = 0x00, bool HostEscDown = false, float HostEscDownDuration = -1.0f); /* original C++ signature */
def __init__(
self,
mouse_pos_value: ImVec2 = ImVec2(),
mouse_wheel: ImVec2 = ImVec2(),
mouse_pos_value: Optional[ImVec2] = None,
mouse_wheel: Optional[ImVec2] = None,
mouse_hovered_viewport: ID = 0,
mouse_buttons_value: int = 0x00,
host_esc_down: bool = False,
host_esc_down_duration: float = -1.0,
) -> None:
"""Auto-generated default constructor with named params"""
"""Auto-generated default constructor with named params
---
Python bindings defaults:
If any of the params below is None, then its default value below will be used:
MousePosValue: ImVec2()
MouseWheel: ImVec2()
"""
pass

class TestEngine:
Expand Down
28 changes: 21 additions & 7 deletions bindings/imgui_bundle/imgui_color_text_edit.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -148,10 +148,14 @@ class TextEditor:
m_declaration: str
def __init__(
self,
m_location: Coordinates = Coordinates(),
m_location: Optional[Coordinates] = None,
m_declaration: str = ""
) -> None:
"""Auto-generated default constructor with named params"""
"""Auto-generated default constructor with named params
---
Python bindings defaults:
If mLocation is None, then its default value will be: TextEditor.Coordinates()
"""
pass


Expand Down Expand Up @@ -224,11 +228,17 @@ class TextEditor:
def __init__(
self,
m_text: str = "",
m_start: Coordinates = Coordinates(),
m_end: Coordinates = Coordinates(),
m_start: Optional[Coordinates] = None,
m_end: Optional[Coordinates] = None,
m_type: UndoOperationType = UndoOperationType()
) -> None:
"""Auto-generated default constructor with named params"""
"""Auto-generated default constructor with named params
---
Python bindings defaults:
If any of the params below is None, then its default value below will be used:
mStart: TextEditor.Coordinates()
mEnd: TextEditor.Coordinates()
"""
pass

def __init__(self) -> None:
Expand Down Expand Up @@ -257,9 +267,13 @@ class TextEditor:
self,
a_title: str,
a_parent_is_focused: bool = False,
a_size: ImVec2 = ImVec2(),
a_size: Optional[ImVec2] = None,
a_border: bool = False
) -> bool:
"""---
Python bindings defaults:
If aSize is None, then its default value will be: ImVec2()
"""
pass
def set_text(self, a_text: str) -> None:
pass
Expand Down Expand Up @@ -320,7 +334,7 @@ class TextEditor:
def on_line_deleted(
self,
a_line_index: int,
a_handled_cursors: Optional[Set[int]] = None
a_handled_cursors: Optional[std.unordered_set[int]] = None
) -> None:
pass
def on_lines_deleted(self, a_first_line_index: int, a_last_line_index: int) -> None:
Expand Down
12 changes: 10 additions & 2 deletions bindings/imgui_bundle/imgui_knobs.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -49,11 +49,15 @@ def knob(
v_max: float,
speed: float = 0,
format: Optional[str] = None,
variant: ImGuiKnobVariant = ImGuiKnobVariant_.tick,
variant: Optional[ImGuiKnobVariant] = None,
size: float = 0,
flags: ImGuiKnobFlags = 0,
steps: int = 10,
) -> Tuple[bool, float]:
"""---
Python bindings defaults:
If variant is None, then its default value will be: ImGuiKnobVariant_.tick
"""
pass

def knob_int(
Expand All @@ -63,11 +67,15 @@ def knob_int(
v_max: int,
speed: float = 0,
format: Optional[str] = None,
variant: ImGuiKnobVariant = ImGuiKnobVariant_.tick,
variant: Optional[ImGuiKnobVariant] = None,
size: float = 0,
flags: ImGuiKnobFlags = 0,
steps: int = 10,
) -> Tuple[bool, int]:
"""---
Python bindings defaults:
If variant is None, then its default value will be: ImGuiKnobVariant_.tick
"""
pass

#################### </generated_from:imgui-knobs.h> ####################
Expand Down
6 changes: 5 additions & 1 deletion bindings/imgui_bundle/imgui_md.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,11 @@ class MarkdownOptions:
# runner_params.callbacks.load_additional_fonts = imgui_md.get_font_loader_function()
#
# hello_imgui.run(runner_params)
def initialize_markdown(options: MarkdownOptions = MarkdownOptions()) -> None:
def initialize_markdown(options: Optional[MarkdownOptions] = None) -> None:
"""---
Python bindings defaults:
If options is None, then its default value will be: MarkdownOptions()
"""
pass

def de_initialize_markdown() -> None:
Expand Down
18 changes: 15 additions & 3 deletions bindings/imgui_bundle/imgui_node_editor.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -490,7 +490,11 @@ def pop_style_var(count: int = 1) -> None:
pass

# IMGUI_NODE_EDITOR_API void Begin(const char* id, const ImVec2& size = ImVec2(0, 0)); /* original C++ signature */
def begin(id: str, size: ImVec2 = ImVec2(0, 0)) -> None:
def begin(id: str, size: Optional[ImVec2] = None) -> None:
"""---
Python bindings defaults:
If size is None, then its default value will be: ImVec2(0, 0)
"""
pass

# IMGUI_NODE_EDITOR_API void End(); /* original C++ signature */
Expand Down Expand Up @@ -571,17 +575,25 @@ def link(
id: LinkId,
start_pin_id: PinId,
end_pin_id: PinId,
color: ImVec4 = ImVec4(1, 1, 1, 1),
color: Optional[ImVec4] = None,
thickness: float = 1.0,
) -> bool:
"""---
Python bindings defaults:
If color is None, then its default value will be: ImVec4(1, 1, 1, 1)
"""
pass

# IMGUI_NODE_EDITOR_API void Flow(LinkId linkId, FlowDirection direction = FlowDirection::Forward); /* original C++ signature */
def flow(link_id: LinkId, direction: FlowDirection = FlowDirection.forward) -> None:
pass

# IMGUI_NODE_EDITOR_API bool BeginCreate(const ImVec4& color = ImVec4(1, 1, 1, 1), float thickness = 1.0f); /* original C++ signature */
def begin_create(color: ImVec4 = ImVec4(1, 1, 1, 1), thickness: float = 1.0) -> bool:
def begin_create(color: Optional[ImVec4] = None, thickness: float = 1.0) -> bool:
"""---
Python bindings defaults:
If color is None, then its default value will be: ImVec4(1, 1, 1, 1)
"""
pass

# IMGUI_NODE_EDITOR_API bool QueryNewLink(PinId* startId, PinId* endId); /* original C++ signature */
Expand Down
Loading

0 comments on commit ce4c08d

Please sign in to comment.