im_anim.pyi 119 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296229722982299230023012302230323042305230623072308230923102311231223132314231523162317231823192320232123222323232423252326232723282329233023312332233323342335233623372338233923402341234223432344234523462347234823492350235123522353235423552356235723582359236023612362236323642365236623672368236923702371237223732374237523762377237823792380238123822383238423852386238723882389239023912392239323942395239623972398239924002401240224032404240524062407240824092410241124122413241424152416241724182419242024212422242324242425242624272428242924302431243224332434243524362437243824392440244124422443244424452446244724482449245024512452245324542455245624572458245924602461246224632464246524662467246824692470247124722473247424752476247724782479248024812482248324842485248624872488248924902491249224932494249524962497249824992500250125022503250425052506250725082509251025112512251325142515251625172518251925202521252225232524252525262527252825292530253125322533253425352536253725382539254025412542254325442545254625472548254925502551255225532554255525562557255825592560256125622563256425652566256725682569257025712572257325742575257625772578257925802581258225832584258525862587258825892590259125922593259425952596259725982599260026012602260326042605260626072608260926102611261226132614261526162617261826192620262126222623262426252626262726282629263026312632263326342635263626372638263926402641264226432644264526462647264826492650265126522653265426552656265726582659266026612662266326642665266626672668266926702671267226732674267526762677267826792680268126822683268426852686268726882689269026912692269326942695269626972698269927002701270227032704270527062707270827092710271127122713271427152716271727182719272027212722272327242725272627272728272927302731273227332734273527362737273827392740274127422743274427452746274727482749275027512752275327542755275627572758275927602761276227632764276527662767276827692770277127722773277427752776277727782779278027812782278327842785278627872788278927902791279227932794279527962797279827992800280128022803280428052806280728082809281028112812281328142815281628172818281928202821282228232824282528262827282828292830283128322833283428352836283728382839284028412842284328442845284628472848284928502851285228532854285528562857285828592860286128622863286428652866286728682869287028712872287328742875287628772878287928802881288228832884288528862887288828892890289128922893289428952896289728982899290029012902290329042905290629072908290929102911291229132914291529162917291829192920292129222923
  1. ###############################################################################
  2. # This file is a part of Dear ImGui Bundle, NOT a part of ImAnim
  3. # -----------------------------------------------------------------------------
  4. # im_anim.pyi is the equivalent of im_anim.h, using the bindings provided
  5. # by Dear ImGui Bundle.
  6. #
  7. # Most of the code of this file is automatically generated (using https://pthom.github.io/litgen/),
  8. # and is generally very close to the C++ version. Comments, docs are identical.
  9. # Do not manually edit the autogenerated parts (look for "Autogenerated" comments)!
  10. ###############################################################################
  11. # ruff: noqa: B008
  12. from typing import Optional, Callable, Any, overload, Tuple
  13. from imgui_bundle.imgui import ImVec2, ImVec2Like, ImVec4, ImVec4Like, ImU32, ImFont, Style, ImVector_float, ImVector_ImVec4
  14. import enum
  15. ImGuiID = int
  16. ImGuiStyle = Style
  17. # Callback type aliases
  18. ease_fn = Callable[[float], float]
  19. # Variation callbacks (index is the loop iteration)
  20. variation_float_fn = Callable[[int], float]
  21. variation_int_fn = Callable[[int], int]
  22. variation_vec2_fn = Callable[[int], ImVec2]
  23. variation_vec4_fn = Callable[[int], ImVec4]
  24. # Resolver callbacks (return dynamic target value)
  25. float_resolver = Callable[[], float]
  26. vec2_resolver = Callable[[], ImVec2]
  27. vec4_resolver = Callable[[], ImVec4]
  28. color_resolver = Callable[[], ImVec4]
  29. int_resolver = Callable[[], int]
  30. # Clip callbacks
  31. clip_callback = Callable[[int], None] # inst_id
  32. marker_callback = Callable[[int, int, float], None] # inst_id, marker_id, marker_time
  33. # !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! AUTOGENERATED CODE !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
  34. # <litgen_stub> // Autogenerated code below! Do not edit!
  35. #################### <generated_from:im_anim.h> ####################
  36. # im_anim.h — Dear ImGui animation helpers.
  37. # Author: Soufiane KHIAT
  38. # License: MIT
  39. # Version: 1.0.0
  40. #
  41. # - Channels: float, vec2, vec4, int, color (sRGB/Linear/HSV/OKLAB/OKLCH blending).
  42. # - Easing: presets + cubicBezier/steps/back/elastic/bounce/spring.
  43. # - Caching: ImPool + ImGuiStorage keyed by (ImGuiID, channel_id) via ImHashData.
  44. # - Resize helpers: relative targets, resolver callback, explicit rebase.
  45. # Version information
  46. # #ifdef IMGUI_BUNDLE_PYTHON_API
  47. #
  48. # #endif
  49. #
  50. # PI constants
  51. class ease_type(enum.IntEnum):
  52. """ ----------------------------------------------------
  53. Public enums & descriptors (C-style)
  54. ----------------------------------------------------
  55. """
  56. # ease_linear = 0, /* original C++ signature */
  57. ease_linear = enum.auto() # (= 0)
  58. # ease_in_quad, /* original C++ signature */
  59. ease_in_quad = enum.auto() # (= 1)
  60. # ease_out_quad, /* original C++ signature */
  61. ease_out_quad = enum.auto() # (= 2)
  62. # ease_in_out_quad, /* original C++ signature */
  63. ease_in_out_quad = enum.auto() # (= 3)
  64. # ease_in_cubic, /* original C++ signature */
  65. ease_in_cubic = enum.auto() # (= 4)
  66. # ease_out_cubic, /* original C++ signature */
  67. ease_out_cubic = enum.auto() # (= 5)
  68. # ease_in_out_cubic, /* original C++ signature */
  69. ease_in_out_cubic = enum.auto() # (= 6)
  70. # ease_in_quart, /* original C++ signature */
  71. ease_in_quart = enum.auto() # (= 7)
  72. # ease_out_quart, /* original C++ signature */
  73. ease_out_quart = enum.auto() # (= 8)
  74. # ease_in_out_quart, /* original C++ signature */
  75. ease_in_out_quart = enum.auto() # (= 9)
  76. # ease_in_quint, /* original C++ signature */
  77. ease_in_quint = enum.auto() # (= 10)
  78. # ease_out_quint, /* original C++ signature */
  79. ease_out_quint = enum.auto() # (= 11)
  80. # ease_in_out_quint, /* original C++ signature */
  81. ease_in_out_quint = enum.auto() # (= 12)
  82. # ease_in_sine, /* original C++ signature */
  83. ease_in_sine = enum.auto() # (= 13)
  84. # ease_out_sine, /* original C++ signature */
  85. ease_out_sine = enum.auto() # (= 14)
  86. # ease_in_out_sine, /* original C++ signature */
  87. ease_in_out_sine = enum.auto() # (= 15)
  88. # ease_in_expo, /* original C++ signature */
  89. ease_in_expo = enum.auto() # (= 16)
  90. # ease_out_expo, /* original C++ signature */
  91. ease_out_expo = enum.auto() # (= 17)
  92. # ease_in_out_expo, /* original C++ signature */
  93. ease_in_out_expo = enum.auto() # (= 18)
  94. # ease_in_circ, /* original C++ signature */
  95. ease_in_circ = enum.auto() # (= 19)
  96. # ease_out_circ, /* original C++ signature */
  97. ease_out_circ = enum.auto() # (= 20)
  98. # ease_in_out_circ, /* original C++ signature */
  99. ease_in_out_circ = enum.auto() # (= 21)
  100. # ease_in_back, /* original C++ signature */
  101. ease_in_back = enum.auto() # (= 22)
  102. # ease_out_back, /* original C++ signature */
  103. ease_out_back = enum.auto() # (= 23)
  104. # ease_in_out_back, /* original C++ signature */
  105. ease_in_out_back = enum.auto() # (= 24) # p0 = overshoot
  106. # ease_in_elastic, /* original C++ signature */
  107. ease_in_elastic = enum.auto() # (= 25)
  108. # ease_out_elastic, /* original C++ signature */
  109. ease_out_elastic = enum.auto() # (= 26)
  110. # ease_in_out_elastic, /* original C++ signature */
  111. ease_in_out_elastic = enum.auto() # (= 27) # p0 = amplitude, p1 = period
  112. # ease_in_bounce, /* original C++ signature */
  113. ease_in_bounce = enum.auto() # (= 28)
  114. # ease_out_bounce, /* original C++ signature */
  115. ease_out_bounce = enum.auto() # (= 29)
  116. # ease_in_out_bounce, /* original C++ signature */
  117. ease_in_out_bounce = enum.auto() # (= 30)
  118. # ease_steps, /* original C++ signature */
  119. ease_steps = enum.auto() # (= 31) # p0 = steps (>=1), p1 = 0:end 1:start 2:both
  120. # ease_cubic_bezier, /* original C++ signature */
  121. ease_cubic_bezier = enum.auto() # (= 32) # p0=x1 p1=y1 p2=x2 p3=y2
  122. # ease_spring, /* original C++ signature */
  123. ease_spring = enum.auto() # (= 33) # p0=mass p1=stiffness p2=damping p3=v0
  124. # ease_custom /* original C++ signature */
  125. ease_custom = enum.auto() # (= 34) # User-defined easing function (use ease_custom_fn)
  126. class policy(enum.IntEnum):
  127. # policy_crossfade = 0, /* original C++ signature */
  128. crossfade = enum.auto() # (= 0) # smooth into new target
  129. # policy_cut, /* original C++ signature */
  130. cut = enum.auto() # (= 1) # snap to target
  131. # policy_queue /* original C++ signature */
  132. queue = enum.auto() # (= 2) # queue one pending target
  133. class color_space(enum.IntEnum):
  134. # col_srgb = 0, /* original C++ signature */
  135. col_srgb = enum.auto() # (= 0) # blend in sRGB (not physically linear)
  136. # col_srgb_linear, /* original C++ signature */
  137. col_srgb_linear = enum.auto() # (= 1) # sRGB<->linear, blend in linear, back to sRGB
  138. # col_hsv, /* original C++ signature */
  139. col_hsv = enum.auto() # (= 2) # blend H/S/V (hue shortest arc), keep A linear
  140. # col_oklab, /* original C++ signature */
  141. col_oklab = enum.auto() # (= 3) # sRGB<->OKLAB, blend in OKLAB, back to sRGB
  142. # col_oklch /* original C++ signature */
  143. col_oklch = enum.auto() # (= 4) # sRGB<->OKLCH (cylindrical OKLAB), blend in OKLCH, back to sRGB
  144. class anchor_space(enum.IntEnum):
  145. # anchor_window_content = 0, /* original C++ signature */
  146. anchor_window_content = enum.auto() # (= 0) # ImGui::GetContentRegionAvail()
  147. # anchor_window, /* original C++ signature */
  148. anchor_window = enum.auto() # (= 1) # ImGui::GetWindowSize()
  149. # anchor_viewport, /* original C++ signature */
  150. anchor_viewport = enum.auto() # (= 2) # ImGui::GetWindowViewport()->Size
  151. # anchor_last_item /* original C++ signature */
  152. anchor_last_item = enum.auto() # (= 3) # ImGui::GetItemRectSize()
  153. class ease_desc:
  154. """ Descriptor for any easing (preset or parametric)"""
  155. # int type; /* original C++ signature */
  156. type: int # ease_type
  157. # float p0, /* original C++ signature */
  158. p0: float
  159. # p1, /* original C++ signature */
  160. p1: float
  161. # p2, /* original C++ signature */
  162. p2: float
  163. # p3; /* original C++ signature */
  164. p3: float
  165. # ease_desc(int type = int(), float p0 = float(), float p1 = float(), float p2 = float(), float p3 = float()); /* original C++ signature */
  166. def __init__(
  167. self,
  168. type: int = int(),
  169. p0: float = float(),
  170. p1: float = float(),
  171. p2: float = float(),
  172. p3: float = float()
  173. ) -> None:
  174. """Auto-generated default constructor with named params"""
  175. pass
  176. # Custom easing function callback (t in [0,1], returns eased value)
  177. # [ADAPT_IMGUI_BUNDLE] - use ImAnimHybridCallback to switch between function pointer and std::function
  178. # #ifdef IMGUI_BUNDLE_PYTHON_API
  179. #
  180. # #else
  181. #
  182. # #endif
  183. #
  184. # [/ADAPT_IMGUI_BUNDLE]
  185. # ----------------------------------------------------
  186. # Public API declarations
  187. # ----------------------------------------------------
  188. # Frame management
  189. # void update_begin_frame(); /* original C++ signature */
  190. def update_begin_frame() -> None:
  191. """ Call once per frame before any tweens."""
  192. pass
  193. # void gc(unsigned int max_age_frames = 600); /* original C++ signature */
  194. def gc(max_age_frames: int = 600) -> None:
  195. """ Remove stale tween entries older than max_age_frames."""
  196. pass
  197. # void pool_clear(); /* original C++ signature */
  198. def pool_clear() -> None:
  199. """ Manually clean up pools."""
  200. pass
  201. # void reserve(int cap_float, int cap_vec2, int cap_vec4, int cap_int, int cap_color); /* original C++ signature */
  202. def reserve(
  203. cap_float: int,
  204. cap_vec2: int,
  205. cap_vec4: int,
  206. cap_int: int,
  207. cap_color: int
  208. ) -> None:
  209. """ Pre-allocate pool capacity."""
  210. pass
  211. # void set_ease_lut_samples(int count); /* original C++ signature */
  212. def set_ease_lut_samples(count: int) -> None:
  213. """ Set LUT resolution for parametric easings (default: 256)."""
  214. pass
  215. # Global time scale (for slow-motion / fast-forward debugging)
  216. # void set_global_time_scale(float scale); /* original C++ signature */
  217. def set_global_time_scale(scale: float) -> None:
  218. """ Set global time multiplier (1.0 = normal, 0.5 = half speed, 2.0 = double)."""
  219. pass
  220. # float get_global_time_scale(); /* original C++ signature */
  221. def get_global_time_scale() -> float:
  222. """ Get current global time scale."""
  223. pass
  224. # Lazy Initialization - defer channel creation until animation is needed
  225. # void set_lazy_init(bool enable); /* original C++ signature */
  226. def set_lazy_init(enable: bool) -> None:
  227. """ Enable/disable lazy initialization (default: True)."""
  228. pass
  229. # bool is_lazy_init_enabled(); /* original C++ signature */
  230. def is_lazy_init_enabled() -> bool:
  231. """ Check if lazy init is enabled."""
  232. pass
  233. # Custom easing functions
  234. # void register_custom_ease(int slot, ease_fn fn); /* original C++ signature */
  235. def register_custom_ease(slot: int, fn: ease_fn) -> None:
  236. """ Register custom easing in slot 0-15. Use with ease_custom_fn(slot)."""
  237. pass
  238. # ease_fn get_custom_ease(int slot); /* original C++ signature */
  239. def get_custom_ease(slot: int) -> ease_fn:
  240. """ Get registered custom easing function."""
  241. pass
  242. # Debug UI
  243. # void show_unified_inspector(bool* p_open = nullptr); /* original C++ signature */
  244. def show_unified_inspector(p_open: Optional[bool] = None) -> Optional[bool]:
  245. """ Show unified inspector (merges debug window + animation inspector)."""
  246. pass
  247. # void show_debug_timeline(ImGuiID instance_id); /* original C++ signature */
  248. def show_debug_timeline(instance_id: int) -> None:
  249. """ Show debug timeline for a clip instance."""
  250. pass
  251. # Performance Profiler
  252. # void profiler_enable(bool enable); /* original C++ signature */
  253. def profiler_enable(enable: bool) -> None:
  254. """ Enable/disable the performance profiler."""
  255. pass
  256. # bool profiler_is_enabled(); /* original C++ signature */
  257. def profiler_is_enabled() -> bool:
  258. """ Check if profiler is enabled."""
  259. pass
  260. # void profiler_begin_frame(); /* original C++ signature */
  261. def profiler_begin_frame() -> None:
  262. """ Call at frame start when profiler is enabled."""
  263. pass
  264. # void profiler_end_frame(); /* original C++ signature */
  265. def profiler_end_frame() -> None:
  266. """ Call at frame end when profiler is enabled."""
  267. pass
  268. # void profiler_begin(const char* name); /* original C++ signature */
  269. def profiler_begin(name: str) -> None:
  270. """ Begin a named profiler section."""
  271. pass
  272. # void profiler_end(); /* original C++ signature */
  273. def profiler_end() -> None:
  274. """ End the current profiler section."""
  275. pass
  276. class drag_opts:
  277. """ Drag Feedback - animated feedback for drag operations"""
  278. # ImVec2 snap_grid; /* original C++ signature */
  279. snap_grid: ImVec2 # Grid size for snapping (0,0 = no grid)
  280. # ImVec2* snap_points; /* original C++ signature */
  281. snap_points: ImVec2 # Array of custom snap points
  282. # int snap_points_count; /* original C++ signature */
  283. snap_points_count: int # Number of snap points
  284. # float snap_duration; /* original C++ signature */
  285. snap_duration: float # Duration of snap animation
  286. # float overshoot; /* original C++ signature */
  287. overshoot: float # Overshoot amount (0 = none, 1 = normal)
  288. # int ease_type; /* original C++ signature */
  289. ease_type: int # Easing type for snap animation
  290. # drag_opts() : snap_grid(0, 0), snap_points(nullptr), snap_points_count(0), /* original C++ signature */
  291. # snap_duration(0.2f), overshoot(0), ease_type(ease_out_cubic) {}
  292. def __init__(self) -> None:
  293. pass
  294. class drag_feedback:
  295. # ImVec2 position; /* original C++ signature */
  296. position: ImVec2 # Current animated position
  297. # ImVec2 offset; /* original C++ signature */
  298. offset: ImVec2 # Offset from drag start
  299. # ImVec2 velocity; /* original C++ signature */
  300. velocity: ImVec2 # Current velocity estimate
  301. # bool is_dragging; /* original C++ signature */
  302. is_dragging: bool # Currently being dragged
  303. # bool is_snapping; /* original C++ signature */
  304. is_snapping: bool # Currently snapping to target
  305. # float snap_progress; /* original C++ signature */
  306. snap_progress: float # Snap animation progress (0-1)
  307. # drag_feedback(ImVec2 position = ImVec2(), ImVec2 offset = ImVec2(), ImVec2 velocity = ImVec2(), bool is_dragging = bool(), bool is_snapping = bool(), float snap_progress = float()); /* original C++ signature */
  308. def __init__(
  309. self,
  310. position: Optional[ImVec2Like] = None,
  311. offset: Optional[ImVec2Like] = None,
  312. velocity: Optional[ImVec2Like] = None,
  313. is_dragging: bool = bool(),
  314. is_snapping: bool = bool(),
  315. snap_progress: float = float()
  316. ) -> None:
  317. """Auto-generated default constructor with named params
  318. Python bindings defaults:
  319. If any of the params below is None, then its default value below will be used:
  320. * position: ImVec2()
  321. * offset: ImVec2()
  322. * velocity: ImVec2()
  323. """
  324. pass
  325. # drag_feedback drag_begin(ImGuiID id, ImVec2 pos); /* original C++ signature */
  326. def drag_begin(id: int, pos: ImVec2Like) -> drag_feedback:
  327. """ Start tracking drag at position."""
  328. pass
  329. # drag_feedback drag_update(ImGuiID id, ImVec2 pos, float dt); /* original C++ signature */
  330. def drag_update(id: int, pos: ImVec2Like, dt: float) -> drag_feedback:
  331. """ Update drag position during drag."""
  332. pass
  333. # drag_feedback drag_release(ImGuiID id, ImVec2 pos, drag_opts const& opts, float dt); /* original C++ signature */
  334. def drag_release(
  335. id: int,
  336. pos: ImVec2Like,
  337. opts: drag_opts,
  338. dt: float
  339. ) -> drag_feedback:
  340. """ Release drag with animated feedback."""
  341. pass
  342. # void drag_cancel(ImGuiID id); /* original C++ signature */
  343. def drag_cancel(id: int) -> None:
  344. """ Cancel drag tracking."""
  345. pass
  346. class wave_type(enum.IntEnum):
  347. """ Oscillators - continuous periodic animations"""
  348. # wave_sine = 0, /* original C++ signature */
  349. wave_sine = enum.auto() # (= 0) # Smooth sine wave
  350. # wave_triangle, /* original C++ signature */
  351. wave_triangle = enum.auto() # (= 1) # Triangle wave (linear up/down)
  352. # wave_sawtooth, /* original C++ signature */
  353. wave_sawtooth = enum.auto() # (= 2) # Sawtooth wave (linear up, instant reset)
  354. # wave_square /* original C++ signature */
  355. wave_square = enum.auto() # (= 3) # Square wave (on/off pulse)
  356. # float oscillate(ImGuiID id, float amplitude, float frequency, int wave_type, float phase, float dt); /* original C++ signature */
  357. def oscillate(
  358. id: int,
  359. amplitude: float,
  360. frequency: float,
  361. wave_type: int,
  362. phase: float,
  363. dt: float
  364. ) -> float:
  365. """ Returns oscillating value [-amplitude, +amplitude]."""
  366. pass
  367. # int oscillate_int(ImGuiID id, int amplitude, float frequency, int wave_type, float phase, float dt); /* original C++ signature */
  368. def oscillate_int(
  369. id: int,
  370. amplitude: int,
  371. frequency: float,
  372. wave_type: int,
  373. phase: float,
  374. dt: float
  375. ) -> int:
  376. """ Returns oscillating integer value [-amplitude, +amplitude]."""
  377. pass
  378. # ImVec2 oscillate_vec2(ImGuiID id, ImVec2 amplitude, ImVec2 frequency, int wave_type, ImVec2 phase, float dt); /* original C++ signature */
  379. def oscillate_vec2(
  380. id: int,
  381. amplitude: ImVec2Like,
  382. frequency: ImVec2Like,
  383. wave_type: int,
  384. phase: ImVec2Like,
  385. dt: float
  386. ) -> ImVec2:
  387. """ 2D oscillation."""
  388. pass
  389. # ImVec4 oscillate_vec4(ImGuiID id, ImVec4 amplitude, ImVec4 frequency, int wave_type, ImVec4 phase, float dt); /* original C++ signature */
  390. def oscillate_vec4(
  391. id: int,
  392. amplitude: ImVec4Like,
  393. frequency: ImVec4Like,
  394. wave_type: int,
  395. phase: ImVec4Like,
  396. dt: float
  397. ) -> ImVec4:
  398. """ 4D oscillation."""
  399. pass
  400. # ImVec4 oscillate_color(ImGuiID id, ImVec4 base_color, ImVec4 amplitude, float frequency, int wave_type, float phase, int color_space, float dt); /* original C++ signature */
  401. def oscillate_color(
  402. id: int,
  403. base_color: ImVec4Like,
  404. amplitude: ImVec4Like,
  405. frequency: float,
  406. wave_type: int,
  407. phase: float,
  408. color_space: int,
  409. dt: float
  410. ) -> ImVec4:
  411. """ Color oscillation in specified color space."""
  412. pass
  413. # Shake/Wiggle - procedural noise animations
  414. # float shake(ImGuiID id, float intensity, float frequency, float decay_time, float dt); /* original C++ signature */
  415. def shake(
  416. id: int,
  417. intensity: float,
  418. frequency: float,
  419. decay_time: float,
  420. dt: float
  421. ) -> float:
  422. """ Decaying random shake. Returns offset that decays to 0."""
  423. pass
  424. # int shake_int(ImGuiID id, int intensity, float frequency, float decay_time, float dt); /* original C++ signature */
  425. def shake_int(
  426. id: int,
  427. intensity: int,
  428. frequency: float,
  429. decay_time: float,
  430. dt: float
  431. ) -> int:
  432. """ Decaying random shake for integers."""
  433. pass
  434. # ImVec2 shake_vec2(ImGuiID id, ImVec2 intensity, float frequency, float decay_time, float dt); /* original C++ signature */
  435. def shake_vec2(
  436. id: int,
  437. intensity: ImVec2Like,
  438. frequency: float,
  439. decay_time: float,
  440. dt: float
  441. ) -> ImVec2:
  442. """ 2D decaying shake."""
  443. pass
  444. # ImVec4 shake_vec4(ImGuiID id, ImVec4 intensity, float frequency, float decay_time, float dt); /* original C++ signature */
  445. def shake_vec4(
  446. id: int,
  447. intensity: ImVec4Like,
  448. frequency: float,
  449. decay_time: float,
  450. dt: float
  451. ) -> ImVec4:
  452. """ 4D decaying shake."""
  453. pass
  454. # ImVec4 shake_color(ImGuiID id, ImVec4 base_color, ImVec4 intensity, float frequency, float decay_time, int color_space, float dt); /* original C++ signature */
  455. def shake_color(
  456. id: int,
  457. base_color: ImVec4Like,
  458. intensity: ImVec4Like,
  459. frequency: float,
  460. decay_time: float,
  461. color_space: int,
  462. dt: float
  463. ) -> ImVec4:
  464. """ Color shake in specified color space."""
  465. pass
  466. # float wiggle(ImGuiID id, float amplitude, float frequency, float dt); /* original C++ signature */
  467. def wiggle(id: int, amplitude: float, frequency: float, dt: float) -> float:
  468. """ Continuous smooth random movement."""
  469. pass
  470. # int wiggle_int(ImGuiID id, int amplitude, float frequency, float dt); /* original C++ signature */
  471. def wiggle_int(id: int, amplitude: int, frequency: float, dt: float) -> int:
  472. """ Continuous smooth random movement for integers."""
  473. pass
  474. # ImVec2 wiggle_vec2(ImGuiID id, ImVec2 amplitude, float frequency, float dt); /* original C++ signature */
  475. def wiggle_vec2(id: int, amplitude: ImVec2Like, frequency: float, dt: float) -> ImVec2:
  476. """ 2D continuous wiggle."""
  477. pass
  478. # ImVec4 wiggle_vec4(ImGuiID id, ImVec4 amplitude, float frequency, float dt); /* original C++ signature */
  479. def wiggle_vec4(id: int, amplitude: ImVec4Like, frequency: float, dt: float) -> ImVec4:
  480. """ 4D continuous wiggle."""
  481. pass
  482. # ImVec4 wiggle_color(ImGuiID id, ImVec4 base_color, ImVec4 amplitude, float frequency, int color_space, float dt); /* original C++ signature */
  483. def wiggle_color(
  484. id: int,
  485. base_color: ImVec4Like,
  486. amplitude: ImVec4Like,
  487. frequency: float,
  488. color_space: int,
  489. dt: float
  490. ) -> ImVec4:
  491. """ Color wiggle in specified color space."""
  492. pass
  493. # void trigger_shake(ImGuiID id); /* original C++ signature */
  494. def trigger_shake(id: int) -> None:
  495. """ Trigger/restart a shake animation."""
  496. pass
  497. # Easing evaluation
  498. # float eval_preset(int type, float t); /* original C++ signature */
  499. def eval_preset(type: int, t: float) -> float:
  500. """ Evaluate a preset easing function at time t (0-1)."""
  501. pass
  502. # Tween API - smoothly interpolate values over time
  503. # init_value: Initial value when channel is first created. Defaults to 0 (or white for color).
  504. # Use this to avoid unwanted animations when the first target differs from the default.
  505. # float tween_float(ImGuiID id, ImGuiID channel_id, float target, float dur, ease_desc const& ez, int policy, float dt, float init_value = 0.0f); /* original C++ signature */
  506. def tween_float(
  507. id: int,
  508. channel_id: int,
  509. target: float,
  510. dur: float,
  511. ez: ease_desc,
  512. policy: int,
  513. dt: float,
  514. init_value: float = 0.0
  515. ) -> float:
  516. """ Animate a float value."""
  517. pass
  518. # ImVec2 tween_vec2(ImGuiID id, ImGuiID channel_id, ImVec2 target, float dur, ease_desc const& ez, int policy, float dt, ImVec2 init_value = ImVec2(0, 0)); /* original C++ signature */
  519. def tween_vec2(
  520. id: int,
  521. channel_id: int,
  522. target: ImVec2Like,
  523. dur: float,
  524. ez: ease_desc,
  525. policy: int,
  526. dt: float,
  527. init_value: Optional[ImVec2Like] = None
  528. ) -> ImVec2:
  529. """Python bindings defaults:
  530. If init_value is None, then its default value will be: ImVec2(0, 0)
  531. Animate a 2D vector.
  532. """
  533. pass
  534. # ImVec4 tween_vec4(ImGuiID id, ImGuiID channel_id, ImVec4 target, float dur, ease_desc const& ez, int policy, float dt, ImVec4 init_value = ImVec4(0, 0, 0, 0)); /* original C++ signature */
  535. def tween_vec4(
  536. id: int,
  537. channel_id: int,
  538. target: ImVec4Like,
  539. dur: float,
  540. ez: ease_desc,
  541. policy: int,
  542. dt: float,
  543. init_value: Optional[ImVec4Like] = None
  544. ) -> ImVec4:
  545. """Python bindings defaults:
  546. If init_value is None, then its default value will be: ImVec4(0, 0, 0, 0)
  547. Animate a 4D vector.
  548. """
  549. pass
  550. # int tween_int(ImGuiID id, ImGuiID channel_id, int target, float dur, ease_desc const& ez, int policy, float dt, int init_value = 0); /* original C++ signature */
  551. def tween_int(
  552. id: int,
  553. channel_id: int,
  554. target: int,
  555. dur: float,
  556. ez: ease_desc,
  557. policy: int,
  558. dt: float,
  559. init_value: int = 0
  560. ) -> int:
  561. """ Animate an integer value."""
  562. pass
  563. # ImVec4 tween_color(ImGuiID id, ImGuiID channel_id, ImVec4 target_srgb, float dur, ease_desc const& ez, int policy, int color_space, float dt, ImVec4 init_value = ImVec4(1, 1, 1, 1)); /* original C++ signature */
  564. def tween_color(
  565. id: int,
  566. channel_id: int,
  567. target_srgb: ImVec4Like,
  568. dur: float,
  569. ez: ease_desc,
  570. policy: int,
  571. color_space: int,
  572. dt: float,
  573. init_value: Optional[ImVec4Like] = None
  574. ) -> ImVec4:
  575. """Python bindings defaults:
  576. If init_value is None, then its default value will be: ImVec4(1, 1, 1, 1)
  577. Animate a color in specified color space.
  578. """
  579. pass
  580. # Resize-friendly helpers
  581. # ImVec2 anchor_size(int space); /* original C++ signature */
  582. def anchor_size(space: int) -> ImVec2:
  583. """ Get dimensions of anchor space (window, viewport, etc.)."""
  584. pass
  585. # Relative target tweens (percent of anchor + pixel offset) - survive window resizes
  586. # float tween_float_rel(ImGuiID id, ImGuiID channel_id, float percent, float px_bias, float dur, ease_desc const& ez, int policy, int anchor_space, int axis, float dt); /* original C++ signature */
  587. def tween_float_rel(
  588. id: int,
  589. channel_id: int,
  590. percent: float,
  591. px_bias: float,
  592. dur: float,
  593. ez: ease_desc,
  594. policy: int,
  595. anchor_space: int,
  596. axis: int,
  597. dt: float
  598. ) -> float:
  599. """ Float relative to anchor (axis: 0=x, 1=y)."""
  600. pass
  601. # ImVec2 tween_vec2_rel(ImGuiID id, ImGuiID channel_id, ImVec2 percent, ImVec2 px_bias, float dur, ease_desc const& ez, int policy, int anchor_space, float dt); /* original C++ signature */
  602. def tween_vec2_rel(
  603. id: int,
  604. channel_id: int,
  605. percent: ImVec2Like,
  606. px_bias: ImVec2Like,
  607. dur: float,
  608. ez: ease_desc,
  609. policy: int,
  610. anchor_space: int,
  611. dt: float
  612. ) -> ImVec2:
  613. """ Vec2 relative to anchor."""
  614. pass
  615. # ImVec4 tween_vec4_rel(ImGuiID id, ImGuiID channel_id, ImVec4 percent, ImVec4 px_bias, float dur, ease_desc const& ez, int policy, int anchor_space, float dt); /* original C++ signature */
  616. def tween_vec4_rel(
  617. id: int,
  618. channel_id: int,
  619. percent: ImVec4Like,
  620. px_bias: ImVec4Like,
  621. dur: float,
  622. ez: ease_desc,
  623. policy: int,
  624. anchor_space: int,
  625. dt: float
  626. ) -> ImVec4:
  627. """ Vec4 with x,y relative to anchor."""
  628. pass
  629. # ImVec4 tween_color_rel(ImGuiID id, ImGuiID channel_id, ImVec4 percent, ImVec4 px_bias, float dur, ease_desc const& ez, int policy, int color_space, int anchor_space, float dt); /* original C++ signature */
  630. def tween_color_rel(
  631. id: int,
  632. channel_id: int,
  633. percent: ImVec4Like,
  634. px_bias: ImVec4Like,
  635. dur: float,
  636. ez: ease_desc,
  637. policy: int,
  638. color_space: int,
  639. anchor_space: int,
  640. dt: float
  641. ) -> ImVec4:
  642. """ Color with component offsets."""
  643. pass
  644. # Resolver callbacks for dynamic target computation
  645. # #ifdef IMGUI_BUNDLE_PYTHON_API
  646. #
  647. # #else
  648. #
  649. # #endif
  650. #
  651. # Resolved tweens - target computed dynamically by callback each frame
  652. # #ifdef IMGUI_BUNDLE_PYTHON_API
  653. #
  654. # float tween_float_resolved(ImGuiID id, ImGuiID channel_id, float_resolver fn, float dur, ease_desc const& ez, int policy, float dt); /* original C++ signature */
  655. def tween_float_resolved(
  656. id: int,
  657. channel_id: int,
  658. fn: float_resolver,
  659. dur: float,
  660. ez: ease_desc,
  661. policy: int,
  662. dt: float
  663. ) -> float:
  664. """ Float with dynamic target."""
  665. pass
  666. # ImVec2 tween_vec2_resolved(ImGuiID id, ImGuiID channel_id, vec2_resolver fn, float dur, ease_desc const& ez, int policy, float dt); /* original C++ signature */
  667. def tween_vec2_resolved(
  668. id: int,
  669. channel_id: int,
  670. fn: vec2_resolver,
  671. dur: float,
  672. ez: ease_desc,
  673. policy: int,
  674. dt: float
  675. ) -> ImVec2:
  676. """ Vec2 with dynamic target."""
  677. pass
  678. # ImVec4 tween_vec4_resolved(ImGuiID id, ImGuiID channel_id, vec4_resolver fn, float dur, ease_desc const& ez, int policy, float dt); /* original C++ signature */
  679. def tween_vec4_resolved(
  680. id: int,
  681. channel_id: int,
  682. fn: vec4_resolver,
  683. dur: float,
  684. ez: ease_desc,
  685. policy: int,
  686. dt: float
  687. ) -> ImVec4:
  688. """ Vec4 with dynamic target."""
  689. pass
  690. # ImVec4 tween_color_resolved(ImGuiID id, ImGuiID channel_id, color_resolver fn, float dur, ease_desc const& ez, int policy, int color_space, float dt); /* original C++ signature */
  691. def tween_color_resolved(
  692. id: int,
  693. channel_id: int,
  694. fn: color_resolver,
  695. dur: float,
  696. ez: ease_desc,
  697. policy: int,
  698. color_space: int,
  699. dt: float
  700. ) -> ImVec4:
  701. """ Color with dynamic target."""
  702. pass
  703. # int tween_int_resolved(ImGuiID id, ImGuiID channel_id, int_resolver fn, float dur, ease_desc const& ez, int policy, float dt); /* original C++ signature */
  704. def tween_int_resolved(
  705. id: int,
  706. channel_id: int,
  707. fn: int_resolver,
  708. dur: float,
  709. ez: ease_desc,
  710. policy: int,
  711. dt: float
  712. ) -> int:
  713. """ Int with dynamic target."""
  714. pass
  715. # #endif
  716. #
  717. # Rebase functions - change target of in-progress animation without restarting
  718. # void rebase_float(ImGuiID id, ImGuiID channel_id, float new_target, float dt); /* original C++ signature */
  719. def rebase_float(id: int, channel_id: int, new_target: float, dt: float) -> None:
  720. """ Smoothly redirect float animation to new target."""
  721. pass
  722. # void rebase_vec2(ImGuiID id, ImGuiID channel_id, ImVec2 new_target, float dt); /* original C++ signature */
  723. def rebase_vec2(id: int, channel_id: int, new_target: ImVec2Like, dt: float) -> None:
  724. """ Smoothly redirect vec2 animation to new target."""
  725. pass
  726. # void rebase_vec4(ImGuiID id, ImGuiID channel_id, ImVec4 new_target, float dt); /* original C++ signature */
  727. def rebase_vec4(id: int, channel_id: int, new_target: ImVec4Like, dt: float) -> None:
  728. """ Smoothly redirect vec4 animation to new target."""
  729. pass
  730. # void rebase_color(ImGuiID id, ImGuiID channel_id, ImVec4 new_target, float dt); /* original C++ signature */
  731. def rebase_color(id: int, channel_id: int, new_target: ImVec4Like, dt: float) -> None:
  732. """ Smoothly redirect color animation to new target."""
  733. pass
  734. # void rebase_int(ImGuiID id, ImGuiID channel_id, int new_target, float dt); /* original C++ signature */
  735. def rebase_int(id: int, channel_id: int, new_target: int, dt: float) -> None:
  736. """ Smoothly redirect int animation to new target."""
  737. pass
  738. # Color blending utility
  739. # ImVec4 get_blended_color(ImVec4 a_srgb, ImVec4 b_srgb, float t, int color_space); /* original C++ signature */
  740. def get_blended_color(
  741. a_srgb: ImVec4Like,
  742. b_srgb: ImVec4Like,
  743. t: float,
  744. color_space: int
  745. ) -> ImVec4:
  746. """ Blend two sRGB colors in specified color space."""
  747. pass
  748. # ----------------------------------------------------
  749. # Convenience shorthands for common easings
  750. # ----------------------------------------------------
  751. # inline ease_desc ease_preset(int type) { ease_desc e = { type, 0,0,0,0 }; return e; } /* original C++ signature */
  752. def ease_preset(type: int) -> ease_desc:
  753. """ Create descriptor from preset enum."""
  754. pass
  755. # inline ease_desc ease_bezier(float x1, float y1, float x2, float y2) { ease_desc e = { ease_cubic_bezier, x1,y1,x2,y2 }; return e; } /* original C++ signature */
  756. def ease_bezier(x1: float, y1: float, x2: float, y2: float) -> ease_desc:
  757. """ Create cubic bezier easing."""
  758. pass
  759. # inline ease_desc ease_steps_desc(int steps, int mode) { ease_desc e = { ease_steps, (float)steps,(float)mode,0,0 }; return e; } /* original C++ signature */
  760. def ease_steps_desc(steps: int, mode: int) -> ease_desc:
  761. """ Create step function easing."""
  762. pass
  763. # inline ease_desc ease_back(float overshoot) { ease_desc e = { ease_out_back, overshoot,0,0,0 }; return e; } /* original C++ signature */
  764. def ease_back(overshoot: float) -> ease_desc:
  765. """ Create back easing with overshoot."""
  766. pass
  767. # inline ease_desc ease_elastic(float amplitude, float period) { ease_desc e = { ease_out_elastic, amplitude, period,0,0 }; return e; } /* original C++ signature */
  768. def ease_elastic(amplitude: float, period: float) -> ease_desc:
  769. """ Create elastic easing."""
  770. pass
  771. # inline ease_desc ease_spring_desc(float mass, float stiffness, float damping, float v0) { ease_desc e = { ease_spring, mass, stiffness, damping, v0 }; return e; } /* original C++ signature */
  772. def ease_spring_desc(
  773. mass: float,
  774. stiffness: float,
  775. damping: float,
  776. v0: float
  777. ) -> ease_desc:
  778. """ Create physics spring."""
  779. pass
  780. # inline ease_desc ease_custom_fn(int slot) { ease_desc e = { ease_custom, (float)slot,0,0,0 }; return e; } /* original C++ signature */
  781. def ease_custom_fn(slot: int) -> ease_desc:
  782. """ Use registered custom easing (slot 0-15)."""
  783. pass
  784. # Scroll animation - smooth scrolling for ImGui windows
  785. # void scroll_to_y(float target_y, float duration, ease_desc const& ez = ease_preset(ease_out_cubic)); /* original C++ signature */
  786. def scroll_to_y(
  787. target_y: float,
  788. duration: float,
  789. ez: Optional[ease_desc] = None
  790. ) -> None:
  791. """Python bindings defaults:
  792. If ez is None, then its default value will be: ease_preset(ease_out_cubic)
  793. Scroll current window to Y position.
  794. """
  795. pass
  796. # void scroll_to_x(float target_x, float duration, ease_desc const& ez = ease_preset(ease_out_cubic)); /* original C++ signature */
  797. def scroll_to_x(
  798. target_x: float,
  799. duration: float,
  800. ez: Optional[ease_desc] = None
  801. ) -> None:
  802. """Python bindings defaults:
  803. If ez is None, then its default value will be: ease_preset(ease_out_cubic)
  804. Scroll current window to X position.
  805. """
  806. pass
  807. # void scroll_to_top(float duration = 0.3f, ease_desc const& ez = ease_preset(ease_out_cubic)); /* original C++ signature */
  808. def scroll_to_top(duration: float = 0.3, ez: Optional[ease_desc] = None) -> None:
  809. """Python bindings defaults:
  810. If ez is None, then its default value will be: ease_preset(ease_out_cubic)
  811. Scroll to top of window.
  812. """
  813. pass
  814. # void scroll_to_bottom(float duration = 0.3f, ease_desc const& ez = ease_preset(ease_out_cubic)); /* original C++ signature */
  815. def scroll_to_bottom(
  816. duration: float = 0.3,
  817. ez: Optional[ease_desc] = None
  818. ) -> None:
  819. """Python bindings defaults:
  820. If ez is None, then its default value will be: ease_preset(ease_out_cubic)
  821. Scroll to bottom of window.
  822. """
  823. pass
  824. # ----------------------------------------------------
  825. # Per-axis easing - different easing per component
  826. # ----------------------------------------------------
  827. class ease_per_axis:
  828. """ Per-axis easing descriptor (for vec2/vec4/color)"""
  829. # ease_desc x; /* original C++ signature */
  830. x: ease_desc # Easing for X component
  831. # ease_desc y; /* original C++ signature */
  832. y: ease_desc # Easing for Y component
  833. # ease_desc z; /* original C++ signature */
  834. z: ease_desc # Easing for Z component (vec4/color only)
  835. # ease_desc w; /* original C++ signature */
  836. w: ease_desc # Easing for W/alpha component (vec4/color only)
  837. # ease_per_axis() /* original C++ signature */
  838. # : x(ease_preset(ease_linear)), y(ease_preset(ease_linear)),
  839. # z(ease_preset(ease_linear)), w(ease_preset(ease_linear)) {}
  840. @overload
  841. def __init__(self) -> None:
  842. pass
  843. # ease_per_axis(ease_desc all) /* original C++ signature */
  844. # : x(all), y(all), z(all), w(all) {}
  845. @overload
  846. def __init__(self, all: ease_desc) -> None:
  847. pass
  848. # ease_per_axis(ease_desc ex, ease_desc ey) /* original C++ signature */
  849. # : x(ex), y(ey), z(ease_preset(ease_linear)), w(ease_preset(ease_linear)) {}
  850. @overload
  851. def __init__(self, ex: ease_desc, ey: ease_desc) -> None:
  852. pass
  853. # ease_per_axis(ease_desc ex, ease_desc ey, ease_desc ez, ease_desc ew) /* original C++ signature */
  854. # : x(ex), y(ey), z(ez), w(ew) {}
  855. @overload
  856. def __init__(self, ex: ease_desc, ey: ease_desc, ez: ease_desc, ew: ease_desc) -> None:
  857. pass
  858. # Tween with per-axis easing - each component uses its own easing curve
  859. # ImVec2 tween_vec2_per_axis(ImGuiID id, ImGuiID channel_id, ImVec2 target, float dur, ease_per_axis const& ez, int policy, float dt); /* original C++ signature */
  860. def tween_vec2_per_axis(
  861. id: int,
  862. channel_id: int,
  863. target: ImVec2Like,
  864. dur: float,
  865. ez: ease_per_axis,
  866. policy: int,
  867. dt: float
  868. ) -> ImVec2:
  869. pass
  870. # ImVec4 tween_vec4_per_axis(ImGuiID id, ImGuiID channel_id, ImVec4 target, float dur, ease_per_axis const& ez, int policy, float dt); /* original C++ signature */
  871. def tween_vec4_per_axis(
  872. id: int,
  873. channel_id: int,
  874. target: ImVec4Like,
  875. dur: float,
  876. ez: ease_per_axis,
  877. policy: int,
  878. dt: float
  879. ) -> ImVec4:
  880. pass
  881. # ImVec4 tween_color_per_axis(ImGuiID id, ImGuiID channel_id, ImVec4 target_srgb, float dur, ease_per_axis const& ez, int policy, int color_space, float dt); /* original C++ signature */
  882. def tween_color_per_axis(
  883. id: int,
  884. channel_id: int,
  885. target_srgb: ImVec4Like,
  886. dur: float,
  887. ez: ease_per_axis,
  888. policy: int,
  889. color_space: int,
  890. dt: float
  891. ) -> ImVec4:
  892. pass
  893. # ----------------------------------------------------
  894. # Motion Paths - animate along curves and splines
  895. # ----------------------------------------------------
  896. class path_segment_type(enum.IntEnum):
  897. """ Path segment types"""
  898. # seg_line = 0, /* original C++ signature */
  899. seg_line = enum.auto() # (= 0) # Linear segment to endpoint
  900. # seg_quadratic_bezier, /* original C++ signature */
  901. seg_quadratic_bezier = enum.auto() # (= 1) # Quadratic bezier (1 control point)
  902. # seg_cubic_bezier, /* original C++ signature */
  903. seg_cubic_bezier = enum.auto() # (= 2) # Cubic bezier (2 control points)
  904. # seg_catmull_rom /* original C++ signature */
  905. seg_catmull_rom = enum.auto() # (= 3) # Catmull-rom spline segment
  906. # Single-curve evaluation functions (stateless, for direct use)
  907. # ImVec2 bezier_quadratic(ImVec2 p0, ImVec2 p1, ImVec2 p2, float t); /* original C++ signature */
  908. def bezier_quadratic(
  909. p0: ImVec2Like,
  910. p1: ImVec2Like,
  911. p2: ImVec2Like,
  912. t: float
  913. ) -> ImVec2:
  914. """ Evaluate quadratic bezier at t [0,1]."""
  915. pass
  916. # ImVec2 bezier_cubic(ImVec2 p0, ImVec2 p1, ImVec2 p2, ImVec2 p3, float t); /* original C++ signature */
  917. def bezier_cubic(
  918. p0: ImVec2Like,
  919. p1: ImVec2Like,
  920. p2: ImVec2Like,
  921. p3: ImVec2Like,
  922. t: float
  923. ) -> ImVec2:
  924. """ Evaluate cubic bezier at t [0,1]."""
  925. pass
  926. # ImVec2 catmull_rom(ImVec2 p0, ImVec2 p1, ImVec2 p2, ImVec2 p3, float t, float tension = 0.5f); /* original C++ signature */
  927. def catmull_rom(
  928. p0: ImVec2Like,
  929. p1: ImVec2Like,
  930. p2: ImVec2Like,
  931. p3: ImVec2Like,
  932. t: float,
  933. tension: float = 0.5
  934. ) -> ImVec2:
  935. """ Evaluate Catmull-Rom spline at t [0,1]. Points go through p1 and p2."""
  936. pass
  937. # Derivatives (for tangent/velocity)
  938. # ImVec2 bezier_quadratic_deriv(ImVec2 p0, ImVec2 p1, ImVec2 p2, float t); /* original C++ signature */
  939. def bezier_quadratic_deriv(
  940. p0: ImVec2Like,
  941. p1: ImVec2Like,
  942. p2: ImVec2Like,
  943. t: float
  944. ) -> ImVec2:
  945. """ Derivative of quadratic bezier."""
  946. pass
  947. # ImVec2 bezier_cubic_deriv(ImVec2 p0, ImVec2 p1, ImVec2 p2, ImVec2 p3, float t); /* original C++ signature */
  948. def bezier_cubic_deriv(
  949. p0: ImVec2Like,
  950. p1: ImVec2Like,
  951. p2: ImVec2Like,
  952. p3: ImVec2Like,
  953. t: float
  954. ) -> ImVec2:
  955. """ Derivative of cubic bezier."""
  956. pass
  957. # ImVec2 catmull_rom_deriv(ImVec2 p0, ImVec2 p1, ImVec2 p2, ImVec2 p3, float t, float tension = 0.5f); /* original C++ signature */
  958. def catmull_rom_deriv(
  959. p0: ImVec2Like,
  960. p1: ImVec2Like,
  961. p2: ImVec2Like,
  962. p3: ImVec2Like,
  963. t: float,
  964. tension: float = 0.5
  965. ) -> ImVec2:
  966. """ Derivative of Catmull-Rom."""
  967. pass
  968. class path:
  969. """ path - fluent API for building multi-segment motion paths"""
  970. # static path begin(ImGuiID path_id, ImVec2 start); /* original C++ signature */
  971. @staticmethod
  972. def begin(path_id: int, start: ImVec2Like) -> path:
  973. """ Start building a path at position."""
  974. pass
  975. # path& line_to(ImVec2 end); /* original C++ signature */
  976. def line_to(self, end: ImVec2Like) -> path:
  977. """ Add linear segment to endpoint."""
  978. pass
  979. # path& quadratic_to(ImVec2 ctrl, ImVec2 end); /* original C++ signature */
  980. def quadratic_to(self, ctrl: ImVec2Like, end: ImVec2Like) -> path:
  981. """ Add quadratic bezier segment."""
  982. pass
  983. # path& cubic_to(ImVec2 ctrl1, ImVec2 ctrl2, ImVec2 end); /* original C++ signature */
  984. def cubic_to(self, ctrl1: ImVec2Like, ctrl2: ImVec2Like, end: ImVec2Like) -> path:
  985. """ Add cubic bezier segment."""
  986. pass
  987. # path& catmull_to(ImVec2 end, float tension = 0.5f); /* original C++ signature */
  988. def catmull_to(self, end: ImVec2Like, tension: float = 0.5) -> path:
  989. """ Add Catmull-Rom segment to endpoint."""
  990. pass
  991. # path& close(); /* original C++ signature */
  992. def close(self) -> path:
  993. """ Close path back to start point."""
  994. pass
  995. # void end(); /* original C++ signature */
  996. def end(self) -> None:
  997. """ Finalize and register path."""
  998. pass
  999. # ImGuiID id() const { return m_path_id; } /* original C++ signature */
  1000. def id(self) -> int:
  1001. pass
  1002. # Query path info
  1003. # bool path_exists(ImGuiID path_id); /* original C++ signature */
  1004. def path_exists(path_id: int) -> bool:
  1005. """ Check if path exists."""
  1006. pass
  1007. # float path_length(ImGuiID path_id); /* original C++ signature */
  1008. def path_length(path_id: int) -> float:
  1009. """ Get approximate path length."""
  1010. pass
  1011. # ImVec2 path_evaluate(ImGuiID path_id, float t); /* original C++ signature */
  1012. def path_evaluate(path_id: int, t: float) -> ImVec2:
  1013. """ Sample path at t [0,1]."""
  1014. pass
  1015. # ImVec2 path_tangent(ImGuiID path_id, float t); /* original C++ signature */
  1016. def path_tangent(path_id: int, t: float) -> ImVec2:
  1017. """ Get tangent (normalized direction) at t."""
  1018. pass
  1019. # float path_angle(ImGuiID path_id, float t); /* original C++ signature */
  1020. def path_angle(path_id: int, t: float) -> float:
  1021. """ Get rotation angle (radians) at t."""
  1022. pass
  1023. # Tween along a path
  1024. # ImVec2 tween_path(ImGuiID id, ImGuiID channel_id, ImGuiID path_id, float dur, ease_desc const& ez, int policy, float dt); /* original C++ signature */
  1025. def tween_path(
  1026. id: int,
  1027. channel_id: int,
  1028. path_id: int,
  1029. dur: float,
  1030. ez: ease_desc,
  1031. policy: int,
  1032. dt: float
  1033. ) -> ImVec2:
  1034. """ Animate position along path."""
  1035. pass
  1036. # float tween_path_angle(ImGuiID id, ImGuiID channel_id, ImGuiID path_id, float dur, ease_desc const& ez, int policy, float dt); /* original C++ signature */
  1037. def tween_path_angle(
  1038. id: int,
  1039. channel_id: int,
  1040. path_id: int,
  1041. dur: float,
  1042. ez: ease_desc,
  1043. policy: int,
  1044. dt: float
  1045. ) -> float:
  1046. """ Animate rotation angle along path."""
  1047. pass
  1048. # ----------------------------------------------------
  1049. # Arc-length parameterization (for constant-speed animation)
  1050. # ----------------------------------------------------
  1051. # Build arc-length lookup table for a path (call once per path, improves accuracy)
  1052. # void path_build_arc_lut(ImGuiID path_id, int subdivisions = 64); /* original C++ signature */
  1053. def path_build_arc_lut(path_id: int, subdivisions: int = 64) -> None:
  1054. """ Build LUT with specified resolution."""
  1055. pass
  1056. # bool path_has_arc_lut(ImGuiID path_id); /* original C++ signature */
  1057. def path_has_arc_lut(path_id: int) -> bool:
  1058. """ Check if path has precomputed LUT."""
  1059. pass
  1060. # Distance-based path evaluation (uses arc-length LUT for constant speed)
  1061. # float path_distance_to_t(ImGuiID path_id, float distance); /* original C++ signature */
  1062. def path_distance_to_t(path_id: int, distance: float) -> float:
  1063. """ Convert arc-length distance to t parameter."""
  1064. pass
  1065. # ImVec2 path_evaluate_at_distance(ImGuiID path_id, float distance); /* original C++ signature */
  1066. def path_evaluate_at_distance(path_id: int, distance: float) -> ImVec2:
  1067. """ Get position at arc-length distance."""
  1068. pass
  1069. # float path_angle_at_distance(ImGuiID path_id, float distance); /* original C++ signature */
  1070. def path_angle_at_distance(path_id: int, distance: float) -> float:
  1071. """ Get rotation angle at arc-length distance."""
  1072. pass
  1073. # ImVec2 path_tangent_at_distance(ImGuiID path_id, float distance); /* original C++ signature */
  1074. def path_tangent_at_distance(path_id: int, distance: float) -> ImVec2:
  1075. """ Get tangent at arc-length distance."""
  1076. pass
  1077. # ----------------------------------------------------
  1078. # Path Morphing - interpolate between two paths
  1079. # ----------------------------------------------------
  1080. class morph_opts:
  1081. """ Morph options for path interpolation"""
  1082. # int samples; /* original C++ signature */
  1083. samples: int # Number of sample points for resampling (default: 64)
  1084. # bool match_endpoints; /* original C++ signature */
  1085. match_endpoints: bool # Force endpoints to match exactly (default: True)
  1086. # bool use_arc_length; /* original C++ signature */
  1087. use_arc_length: bool # Use arc-length parameterization for smoother morphing (default: True)
  1088. # morph_opts() : samples(64), match_endpoints(true), use_arc_length(true) {} /* original C++ signature */
  1089. def __init__(self) -> None:
  1090. pass
  1091. # ImVec2 path_morph(ImGuiID path_a, ImGuiID path_b, float t, float blend, morph_opts const& opts = morph_opts()); /* original C++ signature */
  1092. def path_morph(
  1093. path_a: int,
  1094. path_b: int,
  1095. t: float,
  1096. blend: float,
  1097. opts: Optional[morph_opts] = None
  1098. ) -> ImVec2:
  1099. """ Evaluate morphed path at parameter t [0,1] with blend factor [0,1]
  1100. path_a at blend=0, path_b at blend=1
  1101. Paths can have different numbers of segments - they are resampled to match
  1102. Python bindings defaults:
  1103. If opts is None, then its default value will be: morph_opts()
  1104. """
  1105. pass
  1106. # ImVec2 path_morph_tangent(ImGuiID path_a, ImGuiID path_b, float t, float blend, morph_opts const& opts = morph_opts()); /* original C++ signature */
  1107. def path_morph_tangent(
  1108. path_a: int,
  1109. path_b: int,
  1110. t: float,
  1111. blend: float,
  1112. opts: Optional[morph_opts] = None
  1113. ) -> ImVec2:
  1114. """ Get tangent of morphed path
  1115. Python bindings defaults:
  1116. If opts is None, then its default value will be: morph_opts()
  1117. """
  1118. pass
  1119. # float path_morph_angle(ImGuiID path_a, ImGuiID path_b, float t, float blend, morph_opts const& opts = morph_opts()); /* original C++ signature */
  1120. def path_morph_angle(
  1121. path_a: int,
  1122. path_b: int,
  1123. t: float,
  1124. blend: float,
  1125. opts: Optional[morph_opts] = None
  1126. ) -> float:
  1127. """ Get angle (radians) of morphed path
  1128. Python bindings defaults:
  1129. If opts is None, then its default value will be: morph_opts()
  1130. """
  1131. pass
  1132. # ImVec2 tween_path_morph(ImGuiID id, ImGuiID channel_id, ImGuiID path_a, ImGuiID path_b, /* original C++ signature */
  1133. # float target_blend, float dur, ease_desc const& path_ease,
  1134. # ease_desc const& morph_ease, int policy, float dt,
  1135. # morph_opts const& opts = morph_opts());
  1136. def tween_path_morph(
  1137. id: int,
  1138. channel_id: int,
  1139. path_a: int,
  1140. path_b: int,
  1141. target_blend: float,
  1142. dur: float,
  1143. path_ease: ease_desc,
  1144. morph_ease: ease_desc,
  1145. policy: int,
  1146. dt: float,
  1147. opts: Optional[morph_opts] = None
  1148. ) -> ImVec2:
  1149. """ Tween along a morphing path - animates both position along path AND the morph blend
  1150. Python bindings defaults:
  1151. If opts is None, then its default value will be: morph_opts()
  1152. """
  1153. pass
  1154. # float get_morph_blend(ImGuiID id, ImGuiID channel_id); /* original C++ signature */
  1155. def get_morph_blend(id: int, channel_id: int) -> float:
  1156. """ Get current morph blend value from a tween (for querying state)"""
  1157. pass
  1158. # ----------------------------------------------------
  1159. # Text along motion paths
  1160. # ----------------------------------------------------
  1161. class text_path_align(enum.IntEnum):
  1162. """ Text alignment along path"""
  1163. # text_align_start = 0, /* original C++ signature */
  1164. text_align_start = enum.auto() # (= 0) # Text starts at path start (or offset)
  1165. # text_align_center, /* original C++ signature */
  1166. text_align_center = enum.auto() # (= 1) # Text centered on path
  1167. # text_align_end /* original C++ signature */
  1168. text_align_end = enum.auto() # (= 2) # Text ends at path end
  1169. class text_path_opts:
  1170. """ Text path options"""
  1171. # ImVec2 origin; /* original C++ signature */
  1172. origin: ImVec2 # Screen-space origin for rendering (path coords are offset by this)
  1173. # float offset; /* original C++ signature */
  1174. offset: float # Starting offset along path (pixels)
  1175. # float letter_spacing; /* original C++ signature */
  1176. letter_spacing: float # Extra spacing between characters (pixels)
  1177. # int align; /* original C++ signature */
  1178. align: int # text_path_align value
  1179. # bool flip_y; /* original C++ signature */
  1180. flip_y: bool # Flip text vertically (for paths going right-to-left)
  1181. # ImU32 color; /* original C++ signature */
  1182. color: ImU32 # Text color (default: white)
  1183. # ImFont* font; /* original C++ signature */
  1184. font: ImFont # Font to use (None = current font)
  1185. # float font_scale; /* original C++ signature */
  1186. font_scale: float # Additional font scale (1.0 = normal)
  1187. # text_path_opts() : origin(0, 0), offset(0), letter_spacing(0), align(text_align_start), /* original C++ signature */
  1188. # flip_y(false), color(IM_COL32_WHITE), font(nullptr), font_scale(1.0f) {}
  1189. def __init__(self) -> None:
  1190. pass
  1191. # void text_path(ImGuiID path_id, const char* text, text_path_opts const& opts = text_path_opts()); /* original C++ signature */
  1192. def text_path(
  1193. path_id: int,
  1194. text: str,
  1195. opts: Optional[text_path_opts] = None
  1196. ) -> None:
  1197. """ Render text along a path (static - no animation)
  1198. Python bindings defaults:
  1199. If opts is None, then its default value will be: text_path_opts()
  1200. """
  1201. pass
  1202. # void text_path_animated(ImGuiID path_id, const char* text, float progress, text_path_opts const& opts = text_path_opts()); /* original C++ signature */
  1203. def text_path_animated(
  1204. path_id: int,
  1205. text: str,
  1206. progress: float,
  1207. opts: Optional[text_path_opts] = None
  1208. ) -> None:
  1209. """ Animated text along path (characters appear progressively)
  1210. Python bindings defaults:
  1211. If opts is None, then its default value will be: text_path_opts()
  1212. """
  1213. pass
  1214. # float text_path_width(const char* text, text_path_opts const& opts = text_path_opts()); /* original C++ signature */
  1215. def text_path_width(text: str, opts: Optional[text_path_opts] = None) -> float:
  1216. """ Helper: Get text width for path layout calculations
  1217. Python bindings defaults:
  1218. If opts is None, then its default value will be: text_path_opts()
  1219. """
  1220. pass
  1221. # ----------------------------------------------------
  1222. # Quad transform helpers (for advanced custom rendering)
  1223. # ----------------------------------------------------
  1224. # void transform_quad(ImVec2* quad, ImVec2 center, float angle_rad, ImVec2 translation); /* original C++ signature */
  1225. def transform_quad(
  1226. quad: ImVec2Like,
  1227. center: ImVec2Like,
  1228. angle_rad: float,
  1229. translation: ImVec2Like
  1230. ) -> None:
  1231. """ Transform a quad (4 vertices) by rotation and translation"""
  1232. pass
  1233. # void make_glyph_quad(ImVec2* quad, ImVec2 pos, float angle_rad, float glyph_width, float glyph_height, float baseline_offset = 0.0f); /* original C++ signature */
  1234. def make_glyph_quad(
  1235. quad: ImVec2Like,
  1236. pos: ImVec2Like,
  1237. angle_rad: float,
  1238. glyph_width: float,
  1239. glyph_height: float,
  1240. baseline_offset: float = 0.0
  1241. ) -> None:
  1242. """ Create a rotated quad for a glyph at a position on the path"""
  1243. pass
  1244. # ----------------------------------------------------
  1245. # Text Stagger - per-character animation effects
  1246. # ----------------------------------------------------
  1247. class text_stagger_effect(enum.IntEnum):
  1248. """ Text stagger effect types"""
  1249. # text_fx_none = 0, /* original C++ signature */
  1250. text_fx_none = enum.auto() # (= 0) # No effect (instant appear)
  1251. # text_fx_fade, /* original C++ signature */
  1252. text_fx_fade = enum.auto() # (= 1) # Fade in alpha
  1253. # text_fx_scale, /* original C++ signature */
  1254. text_fx_scale = enum.auto() # (= 2) # Scale from center
  1255. # text_fx_slide_up, /* original C++ signature */
  1256. text_fx_slide_up = enum.auto() # (= 3) # Slide up from below
  1257. # text_fx_slide_down, /* original C++ signature */
  1258. text_fx_slide_down = enum.auto() # (= 4) # Slide down from above
  1259. # text_fx_slide_left, /* original C++ signature */
  1260. text_fx_slide_left = enum.auto() # (= 5) # Slide in from right
  1261. # text_fx_slide_right, /* original C++ signature */
  1262. text_fx_slide_right = enum.auto() # (= 6) # Slide in from left
  1263. # text_fx_rotate, /* original C++ signature */
  1264. text_fx_rotate = enum.auto() # (= 7) # Rotate in
  1265. # text_fx_bounce, /* original C++ signature */
  1266. text_fx_bounce = enum.auto() # (= 8) # Bounce in with overshoot
  1267. # text_fx_wave, /* original C++ signature */
  1268. text_fx_wave = enum.auto() # (= 9) # Wave motion (continuous)
  1269. # text_fx_typewriter /* original C++ signature */
  1270. text_fx_typewriter = enum.auto() # (= 10) # Typewriter style (instant per char)
  1271. class text_stagger_opts:
  1272. """ Text stagger options"""
  1273. # ImVec2 pos; /* original C++ signature */
  1274. pos: ImVec2 # Base position for text
  1275. # int effect; /* original C++ signature */
  1276. effect: int # text_stagger_effect
  1277. # float char_delay; /* original C++ signature */
  1278. char_delay: float # Delay between each character (seconds)
  1279. # float char_duration; /* original C++ signature */
  1280. char_duration: float # Duration of each character's animation (seconds)
  1281. # float effect_intensity; /* original C++ signature */
  1282. effect_intensity: float # Intensity of effect (pixels for slide, degrees for rotate, scale factor)
  1283. # ease_desc ease; /* original C++ signature */
  1284. ease: ease_desc # Easing for character animation
  1285. # ImU32 color; /* original C++ signature */
  1286. color: ImU32 # Text color
  1287. # ImFont* font; /* original C++ signature */
  1288. font: ImFont # Font to use (None = current)
  1289. # float font_scale; /* original C++ signature */
  1290. font_scale: float # Font scale multiplier
  1291. # float letter_spacing; /* original C++ signature */
  1292. letter_spacing: float # Extra spacing between characters
  1293. # text_stagger_opts() /* original C++ signature */
  1294. # : pos(0, 0), effect(text_fx_fade), char_delay(0.05f), char_duration(0.3f),
  1295. # effect_intensity(20.0f), ease(ease_preset(ease_out_cubic)),
  1296. # color(IM_COL32_WHITE), font(nullptr), font_scale(1.0f), letter_spacing(0.0f) {}
  1297. def __init__(self) -> None:
  1298. pass
  1299. # void text_stagger(ImGuiID id, const char* text, float progress, text_stagger_opts const& opts = text_stagger_opts()); /* original C++ signature */
  1300. def text_stagger(
  1301. id: int,
  1302. text: str,
  1303. progress: float,
  1304. opts: Optional[text_stagger_opts] = None
  1305. ) -> None:
  1306. """ Render text with per-character stagger animation
  1307. Python bindings defaults:
  1308. If opts is None, then its default value will be: text_stagger_opts()
  1309. """
  1310. pass
  1311. # float text_stagger_width(const char* text, text_stagger_opts const& opts = text_stagger_opts()); /* original C++ signature */
  1312. def text_stagger_width(
  1313. text: str,
  1314. opts: Optional[text_stagger_opts] = None
  1315. ) -> float:
  1316. """ Get text width for layout calculations
  1317. Python bindings defaults:
  1318. If opts is None, then its default value will be: text_stagger_opts()
  1319. """
  1320. pass
  1321. # float text_stagger_duration(const char* text, text_stagger_opts const& opts = text_stagger_opts()); /* original C++ signature */
  1322. def text_stagger_duration(
  1323. text: str,
  1324. opts: Optional[text_stagger_opts] = None
  1325. ) -> float:
  1326. """ Get total animation duration for text (accounts for stagger delays)
  1327. Python bindings defaults:
  1328. If opts is None, then its default value will be: text_stagger_opts()
  1329. """
  1330. pass
  1331. # ----------------------------------------------------
  1332. # Noise Channels - Perlin/Simplex noise for organic movement
  1333. # ----------------------------------------------------
  1334. class noise_type(enum.IntEnum):
  1335. """ Noise types"""
  1336. # noise_perlin = 0, /* original C++ signature */
  1337. noise_perlin = enum.auto() # (= 0) # Classic Perlin noise
  1338. # noise_simplex, /* original C++ signature */
  1339. noise_simplex = enum.auto() # (= 1) # Simplex noise (faster, fewer artifacts)
  1340. # noise_value, /* original C++ signature */
  1341. noise_value = enum.auto() # (= 2) # Value noise (blocky)
  1342. # noise_worley /* original C++ signature */
  1343. noise_worley = enum.auto() # (= 3) # Worley/cellular noise
  1344. class noise_opts:
  1345. """ Noise options"""
  1346. # int type; /* original C++ signature */
  1347. type: int # noise_type
  1348. # int octaves; /* original C++ signature */
  1349. octaves: int # Number of octaves for fractal noise (1-8)
  1350. # float persistence; /* original C++ signature */
  1351. persistence: float # Amplitude multiplier per octave (0.0-1.0)
  1352. # float lacunarity; /* original C++ signature */
  1353. lacunarity: float # Frequency multiplier per octave (typically 2.0)
  1354. # int seed; /* original C++ signature */
  1355. seed: int # Random seed for noise generation
  1356. # noise_opts() /* original C++ signature */
  1357. # : type(noise_perlin), octaves(4), persistence(0.5f), lacunarity(2.0f), seed(0) {}
  1358. def __init__(self) -> None:
  1359. pass
  1360. # Sample noise at a point (returns value in [-1, 1])
  1361. # float noise_2d(float x, float y, noise_opts const& opts = noise_opts()); /* original C++ signature */
  1362. def noise_2d(x: float, y: float, opts: Optional[noise_opts] = None) -> float:
  1363. """Python bindings defaults:
  1364. If opts is None, then its default value will be: noise_opts()
  1365. 2D noise
  1366. """
  1367. pass
  1368. # float noise_3d(float x, float y, float z, noise_opts const& opts = noise_opts()); /* original C++ signature */
  1369. def noise_3d(
  1370. x: float,
  1371. y: float,
  1372. z: float,
  1373. opts: Optional[noise_opts] = None
  1374. ) -> float:
  1375. """Python bindings defaults:
  1376. If opts is None, then its default value will be: noise_opts()
  1377. 3D noise
  1378. """
  1379. pass
  1380. # Animated noise channels - continuous noise that evolves over time
  1381. # float noise_channel_float(ImGuiID id, float frequency, float amplitude, noise_opts const& opts, float dt); /* original C++ signature */
  1382. def noise_channel_float(
  1383. id: int,
  1384. frequency: float,
  1385. amplitude: float,
  1386. opts: noise_opts,
  1387. dt: float
  1388. ) -> float:
  1389. """ 1D animated noise"""
  1390. pass
  1391. # ImVec2 noise_channel_vec2(ImGuiID id, ImVec2 frequency, ImVec2 amplitude, noise_opts const& opts, float dt); /* original C++ signature */
  1392. def noise_channel_vec2(
  1393. id: int,
  1394. frequency: ImVec2Like,
  1395. amplitude: ImVec2Like,
  1396. opts: noise_opts,
  1397. dt: float
  1398. ) -> ImVec2:
  1399. """ 2D animated noise"""
  1400. pass
  1401. # ImVec4 noise_channel_vec4(ImGuiID id, ImVec4 frequency, ImVec4 amplitude, noise_opts const& opts, float dt); /* original C++ signature */
  1402. def noise_channel_vec4(
  1403. id: int,
  1404. frequency: ImVec4Like,
  1405. amplitude: ImVec4Like,
  1406. opts: noise_opts,
  1407. dt: float
  1408. ) -> ImVec4:
  1409. """ 4D animated noise"""
  1410. pass
  1411. # ImVec4 noise_channel_color(ImGuiID id, ImVec4 base_color, ImVec4 amplitude, float frequency, noise_opts const& opts, int color_space, float dt); /* original C++ signature */
  1412. def noise_channel_color(
  1413. id: int,
  1414. base_color: ImVec4Like,
  1415. amplitude: ImVec4Like,
  1416. frequency: float,
  1417. opts: noise_opts,
  1418. color_space: int,
  1419. dt: float
  1420. ) -> ImVec4:
  1421. """ Animated color noise in specified color space"""
  1422. pass
  1423. # Convenience: smooth random movement (like wiggle but using noise)
  1424. # float smooth_noise_float(ImGuiID id, float amplitude, float speed, float dt); /* original C++ signature */
  1425. def smooth_noise_float(id: int, amplitude: float, speed: float, dt: float) -> float:
  1426. """ Simple 1D smooth noise"""
  1427. pass
  1428. # ImVec2 smooth_noise_vec2(ImGuiID id, ImVec2 amplitude, float speed, float dt); /* original C++ signature */
  1429. def smooth_noise_vec2(
  1430. id: int,
  1431. amplitude: ImVec2Like,
  1432. speed: float,
  1433. dt: float
  1434. ) -> ImVec2:
  1435. """ Simple 2D smooth noise"""
  1436. pass
  1437. # ImVec4 smooth_noise_vec4(ImGuiID id, ImVec4 amplitude, float speed, float dt); /* original C++ signature */
  1438. def smooth_noise_vec4(
  1439. id: int,
  1440. amplitude: ImVec4Like,
  1441. speed: float,
  1442. dt: float
  1443. ) -> ImVec4:
  1444. """ Simple 4D smooth noise"""
  1445. pass
  1446. # ImVec4 smooth_noise_color(ImGuiID id, ImVec4 base_color, ImVec4 amplitude, float speed, int color_space, float dt); /* original C++ signature */
  1447. def smooth_noise_color(
  1448. id: int,
  1449. base_color: ImVec4Like,
  1450. amplitude: ImVec4Like,
  1451. speed: float,
  1452. color_space: int,
  1453. dt: float
  1454. ) -> ImVec4:
  1455. """ Smooth noise for colors in specified color space"""
  1456. pass
  1457. # ----------------------------------------------------
  1458. # Style Interpolation - animate between ImGuiStyle themes
  1459. # ----------------------------------------------------
  1460. # Register a named style for interpolation
  1461. # void style_register(ImGuiID style_id, ImGuiStyle const& style); /* original C++ signature */
  1462. def style_register(style_id: int, style: ImGuiStyle) -> None:
  1463. """ Register a style snapshot"""
  1464. pass
  1465. # void style_register_current(ImGuiID style_id); /* original C++ signature */
  1466. def style_register_current(style_id: int) -> None:
  1467. """ Register current ImGui style"""
  1468. pass
  1469. # void style_blend(ImGuiID style_a, ImGuiID style_b, float t, int color_space = color_space::col_oklab); /* original C++ signature */
  1470. def style_blend(
  1471. style_a: int,
  1472. style_b: int,
  1473. t: float,
  1474. color_space: int = color_space.col_oklab
  1475. ) -> None:
  1476. """ Blend between two registered styles (result applied to ImGui::GetStyle())
  1477. Uses color_space for color blending mode (col_oklab recommended)
  1478. """
  1479. pass
  1480. # void style_tween(ImGuiID id, ImGuiID target_style, float duration, ease_desc const& ease, int color_space, float dt); /* original C++ signature */
  1481. def style_tween(
  1482. id: int,
  1483. target_style: int,
  1484. duration: float,
  1485. ease: ease_desc,
  1486. color_space: int,
  1487. dt: float
  1488. ) -> None:
  1489. """ Tween between styles over time"""
  1490. pass
  1491. # void style_blend_to(ImGuiID style_a, ImGuiID style_b, float t, ImGuiStyle* out_style, int color_space = color_space::col_oklab); /* original C++ signature */
  1492. def style_blend_to(
  1493. style_a: int,
  1494. style_b: int,
  1495. t: float,
  1496. out_style: ImGuiStyle,
  1497. color_space: int = color_space.col_oklab
  1498. ) -> None:
  1499. """ Get interpolated style without applying"""
  1500. pass
  1501. # bool style_exists(ImGuiID style_id); /* original C++ signature */
  1502. def style_exists(style_id: int) -> bool:
  1503. """ Check if a style is registered"""
  1504. pass
  1505. # void style_unregister(ImGuiID style_id); /* original C++ signature */
  1506. def style_unregister(style_id: int) -> None:
  1507. """ Remove a registered style"""
  1508. pass
  1509. # ----------------------------------------------------
  1510. # Gradient Interpolation - animate between color gradients
  1511. # ----------------------------------------------------
  1512. class gradient:
  1513. """ Color gradient with any number of stops (sorted by position)"""
  1514. # ImVector<float> positions; /* original C++ signature */
  1515. positions: ImVector_float # Positions along gradient [0,1], kept sorted
  1516. # ImVector<ImVec4> colors; /* original C++ signature */
  1517. colors: ImVector_ImVec4 # Colors at each position (sRGB)
  1518. # gradient() {} /* original C++ signature */
  1519. def __init__(self) -> None:
  1520. pass
  1521. # gradient& add(float position, ImVec4 color); /* original C++ signature */
  1522. @overload
  1523. def add(self, position: float, color: ImVec4Like) -> gradient:
  1524. """ Add a stop to the gradient (automatically sorted by position)"""
  1525. pass
  1526. # gradient& add(float position, ImU32 color) { /* original C++ signature */
  1527. # return add(position, ImGui::ColorConvertU32ToFloat4(color));
  1528. # }
  1529. @overload
  1530. def add(self, position: float, color: ImU32) -> gradient:
  1531. pass
  1532. # int stop_count() const { return positions.Size; } /* original C++ signature */
  1533. def stop_count(self) -> int:
  1534. """ Get stop count"""
  1535. pass
  1536. # ImVec4 sample(float t, int color_space = color_space::col_oklab) const; /* original C++ signature */
  1537. def sample(self, t: float, color_space: int = color_space.col_oklab) -> ImVec4:
  1538. """ Sample the gradient at position t [0,1]"""
  1539. pass
  1540. # Create common gradients
  1541. # static gradient solid(ImVec4 color); /* original C++ signature */
  1542. @staticmethod
  1543. def solid(color: ImVec4Like) -> gradient:
  1544. pass
  1545. # static gradient two_color(ImVec4 start, ImVec4 end); /* original C++ signature */
  1546. @staticmethod
  1547. def two_color(start: ImVec4Like, end: ImVec4Like) -> gradient:
  1548. pass
  1549. # static gradient three_color(ImVec4 start, ImVec4 mid, ImVec4 end); /* original C++ signature */
  1550. @staticmethod
  1551. def three_color(start: ImVec4Like, mid: ImVec4Like, end: ImVec4Like) -> gradient:
  1552. pass
  1553. # gradient gradient_lerp(gradient const& a, gradient const& b, float t, int color_space = color_space::col_oklab); /* original C++ signature */
  1554. def gradient_lerp(
  1555. a: gradient,
  1556. b: gradient,
  1557. t: float,
  1558. color_space: int = color_space.col_oklab
  1559. ) -> gradient:
  1560. """ Blend between two gradients"""
  1561. pass
  1562. # gradient tween_gradient(ImGuiID id, ImGuiID channel_id, gradient const& target, float dur, ease_desc const& ez, int policy, int color_space, float dt); /* original C++ signature */
  1563. def tween_gradient(
  1564. id: int,
  1565. channel_id: int,
  1566. target: gradient,
  1567. dur: float,
  1568. ez: ease_desc,
  1569. policy: int,
  1570. color_space: int,
  1571. dt: float
  1572. ) -> gradient:
  1573. """ Tween between gradients over time"""
  1574. pass
  1575. # ----------------------------------------------------
  1576. # Transform Interpolation - animate 2D transforms
  1577. # ----------------------------------------------------
  1578. class rotation_mode(enum.IntEnum):
  1579. """ Rotation interpolation modes"""
  1580. # rotation_shortest = 0, /* original C++ signature */
  1581. rotation_shortest = enum.auto() # (= 0) # Shortest path (default) - never rotates more than 180 degrees
  1582. # rotation_longest, /* original C++ signature */
  1583. rotation_longest = enum.auto() # (= 1) # Longest path - always takes the long way around
  1584. # rotation_cw, /* original C++ signature */
  1585. rotation_cw = enum.auto() # (= 2) # Clockwise - always rotates clockwise (positive direction)
  1586. # rotation_ccw, /* original C++ signature */
  1587. rotation_ccw = enum.auto() # (= 3) # Counter-clockwise - always rotates counter-clockwise
  1588. # rotation_direct /* original C++ signature */
  1589. rotation_direct = enum.auto() # (= 4) # Direct lerp - no angle unwrapping, can cause spinning for large deltas
  1590. class transform:
  1591. """ 2D transform (position, rotation, scale)"""
  1592. # ImVec2 position; /* original C++ signature */
  1593. position: ImVec2 # Translation
  1594. # ImVec2 scale; /* original C++ signature */
  1595. scale: ImVec2 # Scale (1,1 = identity)
  1596. # float rotation; /* original C++ signature */
  1597. rotation: float # Rotation in radians
  1598. # transform() : position(0, 0), scale(1, 1), rotation(0) {} /* original C++ signature */
  1599. @overload
  1600. def __init__(self) -> None:
  1601. pass
  1602. # transform(ImVec2 pos, float rot = 0, ImVec2 scl = ImVec2(1, 1)) /* original C++ signature */
  1603. # : position(pos), scale(scl), rotation(rot) {}
  1604. @overload
  1605. def __init__(
  1606. self,
  1607. pos: ImVec2Like,
  1608. rot: float = 0,
  1609. scl: Optional[ImVec2Like] = None
  1610. ) -> None:
  1611. """Python bindings defaults:
  1612. If scl is None, then its default value will be: ImVec2(1, 1)
  1613. """
  1614. pass
  1615. # static transform identity() { return transform(); } /* original C++ signature */
  1616. @staticmethod
  1617. def identity() -> transform:
  1618. """ Create identity transform"""
  1619. pass
  1620. # transform operator*(transform const& other) const; /* original C++ signature */
  1621. def __mul__(self, other: transform) -> transform:
  1622. """ Combine transforms (this * other)"""
  1623. pass
  1624. # ImVec2 apply(ImVec2 point) const; /* original C++ signature */
  1625. def apply(self, point: ImVec2Like) -> ImVec2:
  1626. """ Apply transform to a point"""
  1627. pass
  1628. # transform inverse() const; /* original C++ signature */
  1629. def inverse(self) -> transform:
  1630. """ Get inverse transform"""
  1631. pass
  1632. # transform transform_lerp(transform const& a, transform const& b, float t, int rotation_mode = rotation_mode::rotation_shortest); /* original C++ signature */
  1633. def transform_lerp(
  1634. a: transform,
  1635. b: transform,
  1636. t: float,
  1637. rotation_mode: int = rotation_mode.rotation_shortest
  1638. ) -> transform:
  1639. """ Blend between two transforms with rotation interpolation"""
  1640. pass
  1641. # transform tween_transform(ImGuiID id, ImGuiID channel_id, transform const& target, float dur, ease_desc const& ez, int policy, int rotation_mode, float dt); /* original C++ signature */
  1642. def tween_transform(
  1643. id: int,
  1644. channel_id: int,
  1645. target: transform,
  1646. dur: float,
  1647. ez: ease_desc,
  1648. policy: int,
  1649. rotation_mode: int,
  1650. dt: float
  1651. ) -> transform:
  1652. """ Tween between transforms over time"""
  1653. pass
  1654. # transform transform_from_matrix(float m00, float m01, float m10, float m11, float tx, float ty); /* original C++ signature */
  1655. def transform_from_matrix(
  1656. m00: float,
  1657. m01: float,
  1658. m10: float,
  1659. m11: float,
  1660. tx: float,
  1661. ty: float
  1662. ) -> transform:
  1663. """ Decompose a 3x2 matrix into transform components"""
  1664. pass
  1665. # ============================================================
  1666. # CLIP-BASED ANIMATION SYSTEM
  1667. # ============================================================
  1668. class direction(enum.IntEnum):
  1669. """ Direction for looping animations"""
  1670. # dir_normal = 0, /* original C++ signature */
  1671. dir_normal = enum.auto() # (= 0) # play forward
  1672. # dir_reverse, /* original C++ signature */
  1673. dir_reverse = enum.auto() # (= 1) # play backward
  1674. # dir_alternate /* original C++ signature */
  1675. dir_alternate = enum.auto() # (= 2) # ping-pong
  1676. class channel_type(enum.IntEnum):
  1677. """ Channel types for keyframes"""
  1678. # chan_float = 0, /* original C++ signature */
  1679. chan_float = enum.auto() # (= 0)
  1680. # chan_vec2, /* original C++ signature */
  1681. chan_vec2 = enum.auto() # (= 1)
  1682. # chan_vec4, /* original C++ signature */
  1683. chan_vec4 = enum.auto() # (= 2)
  1684. # chan_int, /* original C++ signature */
  1685. chan_int = enum.auto() # (= 3)
  1686. # chan_color, /* original C++ signature */
  1687. chan_color = enum.auto() # (= 4) # Color with color space (stores in vec4 + color_space metadata)
  1688. # chan_float_rel, /* original C++ signature */
  1689. chan_float_rel = enum.auto() # (= 5) # Float relative to anchor (percent + px_bias)
  1690. # chan_vec2_rel, /* original C++ signature */
  1691. chan_vec2_rel = enum.auto() # (= 6) # Vec2 relative to anchor (percent.xy + px_bias.xy)
  1692. # chan_vec4_rel, /* original C++ signature */
  1693. chan_vec4_rel = enum.auto() # (= 7) # Vec4 relative to anchor (percent.xy + px_bias.xy for x,y; z,w absolute)
  1694. # chan_color_rel /* original C++ signature */
  1695. chan_color_rel = enum.auto() # (= 8) # Color relative to anchor (for position-based color effects)
  1696. class result(enum.IntEnum):
  1697. """ Result codes"""
  1698. # ok = 0, /* original C++ signature */
  1699. ok = enum.auto() # (= 0)
  1700. # err_not_found, /* original C++ signature */
  1701. err_not_found = enum.auto() # (= 1)
  1702. # err_bad_arg, /* original C++ signature */
  1703. err_bad_arg = enum.auto() # (= 2)
  1704. # err_no_mem /* original C++ signature */
  1705. # }
  1706. err_no_mem = enum.auto() # (= 3)
  1707. class spring_params:
  1708. """ Spring parameters for physics-based animation"""
  1709. # float mass; /* original C++ signature */
  1710. mass: float
  1711. # float stiffness; /* original C++ signature */
  1712. stiffness: float
  1713. # float damping; /* original C++ signature */
  1714. damping: float
  1715. # float initial_velocity; /* original C++ signature */
  1716. initial_velocity: float
  1717. # spring_params(float mass = float(), float stiffness = float(), float damping = float(), float initial_velocity = float()); /* original C++ signature */
  1718. def __init__(
  1719. self,
  1720. mass: float = float(),
  1721. stiffness: float = float(),
  1722. damping: float = float(),
  1723. initial_velocity: float = float()
  1724. ) -> None:
  1725. """Auto-generated default constructor with named params"""
  1726. pass
  1727. # ----------------------------------------------------
  1728. # Repeat with Variation - per-loop parameter changes
  1729. # ----------------------------------------------------
  1730. class variation_mode(enum.IntEnum):
  1731. """ Variation modes for repeat animations"""
  1732. # var_none = 0, /* original C++ signature */
  1733. var_none = enum.auto() # (= 0) # No variation
  1734. # var_increment, /* original C++ signature */
  1735. var_increment = enum.auto() # (= 1) # Add amount each iteration
  1736. # var_decrement, /* original C++ signature */
  1737. var_decrement = enum.auto() # (= 2) # Subtract amount each iteration
  1738. # var_multiply, /* original C++ signature */
  1739. var_multiply = enum.auto() # (= 3) # Multiply by factor each iteration
  1740. # var_random, /* original C++ signature */
  1741. var_random = enum.auto() # (= 4) # Random in range [-amount, +amount]
  1742. # var_random_abs, /* original C++ signature */
  1743. var_random_abs = enum.auto() # (= 5) # Random in range [0, amount]
  1744. # var_pingpong, /* original C++ signature */
  1745. var_pingpong = enum.auto() # (= 6) # Alternate +/- each iteration
  1746. # var_callback /* original C++ signature */
  1747. var_callback = enum.auto() # (= 7) # Use custom callback
  1748. # Callback types for custom variation logic
  1749. # #ifdef IMGUI_BUNDLE_PYTHON_API
  1750. #
  1751. # #else
  1752. #
  1753. # #endif
  1754. #
  1755. class variation_float:
  1756. """ Float variation"""
  1757. # int mode; /* original C++ signature */
  1758. mode: int
  1759. # float amount; /* original C++ signature */
  1760. amount: float
  1761. # float min_clamp; /* original C++ signature */
  1762. min_clamp: float
  1763. # float max_clamp; /* original C++ signature */
  1764. max_clamp: float
  1765. # unsigned int seed; /* original C++ signature */
  1766. seed: int # 0 = global random, non-zero = deterministic
  1767. # variation_float_fn callback; /* original C++ signature */
  1768. callback: variation_float_fn
  1769. # void* user; /* original C++ signature */
  1770. user: Any
  1771. # variation_float(int mode = int(), float amount = float(), float min_clamp = float(), float max_clamp = float(), variation_float_fn callback = variation_float_fn()); /* original C++ signature */
  1772. def __init__(
  1773. self,
  1774. mode: int = int(),
  1775. amount: float = float(),
  1776. min_clamp: float = float(),
  1777. max_clamp: float = float(),
  1778. callback: Optional[variation_float_fn] = None
  1779. ) -> None:
  1780. """Auto-generated default constructor with named params
  1781. Python bindings defaults:
  1782. If callback is None, then its default value will be: variation_float_fn()
  1783. """
  1784. pass
  1785. class variation_int:
  1786. """ Int variation"""
  1787. # int mode; /* original C++ signature */
  1788. mode: int
  1789. # int amount; /* original C++ signature */
  1790. amount: int
  1791. # int min_clamp; /* original C++ signature */
  1792. min_clamp: int
  1793. # int max_clamp; /* original C++ signature */
  1794. max_clamp: int
  1795. # unsigned int seed; /* original C++ signature */
  1796. seed: int
  1797. # variation_int_fn callback; /* original C++ signature */
  1798. callback: variation_int_fn
  1799. # void* user; /* original C++ signature */
  1800. user: Any
  1801. # variation_int(int mode = int(), int amount = int(), int min_clamp = int(), int max_clamp = int(), variation_int_fn callback = variation_int_fn()); /* original C++ signature */
  1802. def __init__(
  1803. self,
  1804. mode: int = int(),
  1805. amount: int = int(),
  1806. min_clamp: int = int(),
  1807. max_clamp: int = int(),
  1808. callback: Optional[variation_int_fn] = None
  1809. ) -> None:
  1810. """Auto-generated default constructor with named params
  1811. Python bindings defaults:
  1812. If callback is None, then its default value will be: variation_int_fn()
  1813. """
  1814. pass
  1815. class variation_vec2:
  1816. """ Vec2 variation (global mode or per-axis)"""
  1817. # int mode; /* original C++ signature */
  1818. mode: int # Global mode (var_none = use per-axis)
  1819. # ImVec2 amount; /* original C++ signature */
  1820. amount: ImVec2
  1821. # ImVec2 min_clamp; /* original C++ signature */
  1822. min_clamp: ImVec2
  1823. # ImVec2 max_clamp; /* original C++ signature */
  1824. max_clamp: ImVec2
  1825. # unsigned int seed; /* original C++ signature */
  1826. seed: int
  1827. # variation_vec2_fn callback; /* original C++ signature */
  1828. callback: variation_vec2_fn
  1829. # void* user; /* original C++ signature */
  1830. user: Any
  1831. # variation_float x, /* original C++ signature */
  1832. x: variation_float # Per-axis (used when mode == var_none)
  1833. # y; /* original C++ signature */
  1834. y: variation_float # Per-axis (used when mode == var_none)
  1835. # variation_vec2(int mode = int(), ImVec2 amount = ImVec2(), ImVec2 min_clamp = ImVec2(), ImVec2 max_clamp = ImVec2(), variation_vec2_fn callback = variation_vec2_fn(), variation_float x = variation_float(), variation_float y = variation_float()); /* original C++ signature */
  1836. def __init__(
  1837. self,
  1838. mode: int = int(),
  1839. amount: Optional[ImVec2Like] = None,
  1840. min_clamp: Optional[ImVec2Like] = None,
  1841. max_clamp: Optional[ImVec2Like] = None,
  1842. callback: Optional[variation_vec2_fn] = None,
  1843. x: Optional[variation_float] = None,
  1844. y: Optional[variation_float] = None
  1845. ) -> None:
  1846. """Auto-generated default constructor with named params
  1847. Python bindings defaults:
  1848. If any of the params below is None, then its default value below will be used:
  1849. * amount: ImVec2()
  1850. * min_clamp: ImVec2()
  1851. * max_clamp: ImVec2()
  1852. * callback: variation_vec2_fn()
  1853. * x: variation_float()
  1854. * y: variation_float()
  1855. """
  1856. pass
  1857. class variation_vec4:
  1858. """ Vec4 variation (global mode or per-axis)"""
  1859. # int mode; /* original C++ signature */
  1860. mode: int
  1861. # ImVec4 amount; /* original C++ signature */
  1862. amount: ImVec4
  1863. # ImVec4 min_clamp; /* original C++ signature */
  1864. min_clamp: ImVec4
  1865. # ImVec4 max_clamp; /* original C++ signature */
  1866. max_clamp: ImVec4
  1867. # unsigned int seed; /* original C++ signature */
  1868. seed: int
  1869. # variation_vec4_fn callback; /* original C++ signature */
  1870. callback: variation_vec4_fn
  1871. # void* user; /* original C++ signature */
  1872. user: Any
  1873. # variation_float x, /* original C++ signature */
  1874. x: variation_float # Per-axis
  1875. # y, /* original C++ signature */
  1876. y: variation_float # Per-axis
  1877. # z, /* original C++ signature */
  1878. z: variation_float # Per-axis
  1879. # w; /* original C++ signature */
  1880. w: variation_float # Per-axis
  1881. # variation_vec4(int mode = int(), ImVec4 amount = ImVec4(), ImVec4 min_clamp = ImVec4(), ImVec4 max_clamp = ImVec4(), variation_vec4_fn callback = variation_vec4_fn(), variation_float x = variation_float(), variation_float y = variation_float(), variation_float z = variation_float(), variation_float w = variation_float()); /* original C++ signature */
  1882. def __init__(
  1883. self,
  1884. mode: int = int(),
  1885. amount: Optional[ImVec4Like] = None,
  1886. min_clamp: Optional[ImVec4Like] = None,
  1887. max_clamp: Optional[ImVec4Like] = None,
  1888. callback: Optional[variation_vec4_fn] = None,
  1889. x: Optional[variation_float] = None,
  1890. y: Optional[variation_float] = None,
  1891. z: Optional[variation_float] = None,
  1892. w: Optional[variation_float] = None
  1893. ) -> None:
  1894. """Auto-generated default constructor with named params
  1895. Python bindings defaults:
  1896. If any of the params below is None, then its default value below will be used:
  1897. * amount: ImVec4()
  1898. * min_clamp: ImVec4()
  1899. * max_clamp: ImVec4()
  1900. * callback: variation_vec4_fn()
  1901. * x: variation_float()
  1902. * y: variation_float()
  1903. * z: variation_float()
  1904. * w: variation_float()
  1905. """
  1906. pass
  1907. class variation_color:
  1908. """ Color variation (global mode or per-channel)"""
  1909. # int mode; /* original C++ signature */
  1910. mode: int
  1911. # ImVec4 amount; /* original C++ signature */
  1912. amount: ImVec4
  1913. # ImVec4 min_clamp; /* original C++ signature */
  1914. min_clamp: ImVec4
  1915. # ImVec4 max_clamp; /* original C++ signature */
  1916. max_clamp: ImVec4
  1917. # int color_space; /* original C++ signature */
  1918. color_space: int # col_oklab, etc.
  1919. # unsigned int seed; /* original C++ signature */
  1920. seed: int
  1921. # variation_vec4_fn callback; /* original C++ signature */
  1922. callback: variation_vec4_fn # Returns ImVec4 color delta
  1923. # void* user; /* original C++ signature */
  1924. user: Any
  1925. # variation_float r, /* original C++ signature */
  1926. r: variation_float # Per-channel
  1927. # g, /* original C++ signature */
  1928. g: variation_float # Per-channel
  1929. # b, /* original C++ signature */
  1930. b: variation_float # Per-channel
  1931. # a; /* original C++ signature */
  1932. a: variation_float # Per-channel
  1933. # variation_color(int mode = int(), ImVec4 amount = ImVec4(), ImVec4 min_clamp = ImVec4(), ImVec4 max_clamp = ImVec4(), int color_space = int(), variation_vec4_fn callback = variation_vec4_fn(), variation_float r = variation_float(), variation_float g = variation_float(), variation_float b = variation_float(), variation_float a = variation_float()); /* original C++ signature */
  1934. def __init__(
  1935. self,
  1936. mode: int = int(),
  1937. amount: Optional[ImVec4Like] = None,
  1938. min_clamp: Optional[ImVec4Like] = None,
  1939. max_clamp: Optional[ImVec4Like] = None,
  1940. color_space: int = int(),
  1941. callback: Optional[variation_vec4_fn] = None,
  1942. r: Optional[variation_float] = None,
  1943. g: Optional[variation_float] = None,
  1944. b: Optional[variation_float] = None,
  1945. a: Optional[variation_float] = None
  1946. ) -> None:
  1947. """Auto-generated default constructor with named params
  1948. Python bindings defaults:
  1949. If any of the params below is None, then its default value below will be used:
  1950. * amount: ImVec4()
  1951. * min_clamp: ImVec4()
  1952. * max_clamp: ImVec4()
  1953. * callback: variation_vec4_fn()
  1954. * r: variation_float()
  1955. * g: variation_float()
  1956. * b: variation_float()
  1957. * a: variation_float()
  1958. """
  1959. pass
  1960. # ----------------------------------------------------
  1961. # Variation helper functions (C11-style inline)
  1962. # ----------------------------------------------------
  1963. # Float variation helpers
  1964. # static inline variation_float varf_none(void) { /* original C++ signature */
  1965. # variation_float v = {var_none, 0, -FLT_MAX, FLT_MAX, 0, 0, 0};
  1966. # return v;
  1967. # }
  1968. def varf_none() -> variation_float:
  1969. pass
  1970. # static inline variation_float varf_inc(float amt) { /* original C++ signature */
  1971. # variation_float v = {var_increment, amt, -FLT_MAX, FLT_MAX, 0, 0, 0};
  1972. # return v;
  1973. # }
  1974. def varf_inc(amt: float) -> variation_float:
  1975. pass
  1976. # static inline variation_float varf_dec(float amt) { /* original C++ signature */
  1977. # variation_float v = {var_decrement, amt, -FLT_MAX, FLT_MAX, 0, 0, 0};
  1978. # return v;
  1979. # }
  1980. def varf_dec(amt: float) -> variation_float:
  1981. pass
  1982. # static inline variation_float varf_mul(float f) { /* original C++ signature */
  1983. # variation_float v = {var_multiply, f, -FLT_MAX, FLT_MAX, 0, 0, 0};
  1984. # return v;
  1985. # }
  1986. def varf_mul(f: float) -> variation_float:
  1987. pass
  1988. # static inline variation_float varf_rand(float r) { /* original C++ signature */
  1989. # variation_float v = {var_random, r, -FLT_MAX, FLT_MAX, 0, 0, 0};
  1990. # return v;
  1991. # }
  1992. def varf_rand(r: float) -> variation_float:
  1993. pass
  1994. # static inline variation_float varf_rand_abs(float r) { /* original C++ signature */
  1995. # variation_float v = {var_random_abs, r, -FLT_MAX, FLT_MAX, 0, 0, 0};
  1996. # return v;
  1997. # }
  1998. def varf_rand_abs(r: float) -> variation_float:
  1999. pass
  2000. # static inline variation_float varf_pingpong(float amt) { /* original C++ signature */
  2001. # variation_float v = {var_pingpong, amt, -FLT_MAX, FLT_MAX, 0, 0, 0};
  2002. # return v;
  2003. # }
  2004. def varf_pingpong(amt: float) -> variation_float:
  2005. pass
  2006. # static inline variation_float varf_fn(variation_float_fn fn, void* user) { /* original C++ signature */
  2007. # variation_float v = {var_callback, 0, -FLT_MAX, FLT_MAX, 0, fn, user};
  2008. # return v;
  2009. # }
  2010. def varf_fn(fn: variation_float_fn, user: Any) -> variation_float:
  2011. pass
  2012. # static inline variation_float varf_clamp(variation_float v, float mn, float mx) { /* original C++ signature */
  2013. # v.min_clamp = mn; v.max_clamp = mx; return v;
  2014. # }
  2015. def varf_clamp(v: variation_float, mn: float, mx: float) -> variation_float:
  2016. pass
  2017. # static inline variation_float varf_seed(variation_float v, unsigned int s) { /* original C++ signature */
  2018. # v.seed = s; return v;
  2019. # }
  2020. def varf_seed(v: variation_float, s: int) -> variation_float:
  2021. pass
  2022. # Int variation helpers
  2023. # static inline variation_int vari_none(void) { /* original C++ signature */
  2024. # variation_int v = {var_none, 0, INT_MIN, INT_MAX, 0, 0, 0};
  2025. # return v;
  2026. # }
  2027. def vari_none() -> variation_int:
  2028. pass
  2029. # static inline variation_int vari_inc(int amt) { /* original C++ signature */
  2030. # variation_int v = {var_increment, amt, INT_MIN, INT_MAX, 0, 0, 0};
  2031. # return v;
  2032. # }
  2033. def vari_inc(amt: int) -> variation_int:
  2034. pass
  2035. # static inline variation_int vari_dec(int amt) { /* original C++ signature */
  2036. # variation_int v = {var_decrement, amt, INT_MIN, INT_MAX, 0, 0, 0};
  2037. # return v;
  2038. # }
  2039. def vari_dec(amt: int) -> variation_int:
  2040. pass
  2041. # static inline variation_int vari_rand(int r) { /* original C++ signature */
  2042. # variation_int v = {var_random, r, INT_MIN, INT_MAX, 0, 0, 0};
  2043. # return v;
  2044. # }
  2045. def vari_rand(r: int) -> variation_int:
  2046. pass
  2047. # static inline variation_int vari_fn(variation_int_fn fn, void* user) { /* original C++ signature */
  2048. # variation_int v = {var_callback, 0, INT_MIN, INT_MAX, 0, fn, user};
  2049. # return v;
  2050. # }
  2051. def vari_fn(fn: variation_int_fn, user: Any) -> variation_int:
  2052. pass
  2053. # static inline variation_int vari_clamp(variation_int v, int mn, int mx) { /* original C++ signature */
  2054. # v.min_clamp = mn; v.max_clamp = mx; return v;
  2055. # }
  2056. def vari_clamp(v: variation_int, mn: int, mx: int) -> variation_int:
  2057. pass
  2058. # static inline variation_int vari_seed(variation_int v, unsigned int s) { /* original C++ signature */
  2059. # v.seed = s; return v;
  2060. # }
  2061. def vari_seed(v: variation_int, s: int) -> variation_int:
  2062. pass
  2063. # Vec2 variation helpers (global)
  2064. # static inline variation_vec2 varv2_none(void) { /* original C++ signature */
  2065. # variation_vec2 v = {var_none, {0,0}, {-FLT_MAX,-FLT_MAX}, {FLT_MAX,FLT_MAX}, 0, 0, 0, {0}, {0}};
  2066. # return v;
  2067. # }
  2068. def varv2_none() -> variation_vec2:
  2069. pass
  2070. # static inline variation_vec2 varv2_inc(float x, float y) { /* original C++ signature */
  2071. # variation_vec2 v = {var_increment, {x,y}, {-FLT_MAX,-FLT_MAX}, {FLT_MAX,FLT_MAX}, 0, 0, 0, {0}, {0}};
  2072. # return v;
  2073. # }
  2074. def varv2_inc(x: float, y: float) -> variation_vec2:
  2075. pass
  2076. # static inline variation_vec2 varv2_dec(float x, float y) { /* original C++ signature */
  2077. # variation_vec2 v = {var_decrement, {x,y}, {-FLT_MAX,-FLT_MAX}, {FLT_MAX,FLT_MAX}, 0, 0, 0, {0}, {0}};
  2078. # return v;
  2079. # }
  2080. def varv2_dec(x: float, y: float) -> variation_vec2:
  2081. pass
  2082. # static inline variation_vec2 varv2_mul(float f) { /* original C++ signature */
  2083. # variation_vec2 v = {var_multiply, {f,f}, {-FLT_MAX,-FLT_MAX}, {FLT_MAX,FLT_MAX}, 0, 0, 0, {0}, {0}};
  2084. # return v;
  2085. # }
  2086. def varv2_mul(f: float) -> variation_vec2:
  2087. pass
  2088. # static inline variation_vec2 varv2_rand(float x, float y) { /* original C++ signature */
  2089. # variation_vec2 v = {var_random, {x,y}, {-FLT_MAX,-FLT_MAX}, {FLT_MAX,FLT_MAX}, 0, 0, 0, {0}, {0}};
  2090. # return v;
  2091. # }
  2092. def varv2_rand(x: float, y: float) -> variation_vec2:
  2093. pass
  2094. # static inline variation_vec2 varv2_fn(variation_vec2_fn fn, void* user) { /* original C++ signature */
  2095. # variation_vec2 v = {var_callback, {0,0}, {-FLT_MAX,-FLT_MAX}, {FLT_MAX,FLT_MAX}, 0, fn, user, {0}, {0}};
  2096. # return v;
  2097. # }
  2098. def varv2_fn(fn: variation_vec2_fn, user: Any) -> variation_vec2:
  2099. pass
  2100. # Vec2 per-axis helper
  2101. # static inline variation_vec2 varv2_axis(variation_float vx, variation_float vy) { /* original C++ signature */
  2102. # variation_vec2 v = {var_none, {0,0}, {-FLT_MAX,-FLT_MAX}, {FLT_MAX,FLT_MAX}, 0, 0, 0, vx, vy};
  2103. # return v;
  2104. # }
  2105. def varv2_axis(vx: variation_float, vy: variation_float) -> variation_vec2:
  2106. pass
  2107. # static inline variation_vec2 varv2_clamp(variation_vec2 v, ImVec2 mn, ImVec2 mx) { /* original C++ signature */
  2108. # v.min_clamp = mn; v.max_clamp = mx; return v;
  2109. # }
  2110. def varv2_clamp(v: variation_vec2, mn: ImVec2Like, mx: ImVec2Like) -> variation_vec2:
  2111. pass
  2112. # static inline variation_vec2 varv2_seed(variation_vec2 v, unsigned int s) { /* original C++ signature */
  2113. # v.seed = s; return v;
  2114. # }
  2115. def varv2_seed(v: variation_vec2, s: int) -> variation_vec2:
  2116. pass
  2117. # Vec4 variation helpers (global)
  2118. # static inline variation_vec4 varv4_none(void) { /* original C++ signature */
  2119. # variation_vec4 v = {var_none, {0,0,0,0}, {-FLT_MAX,-FLT_MAX,-FLT_MAX,-FLT_MAX}, {FLT_MAX,FLT_MAX,FLT_MAX,FLT_MAX}, 0, 0, 0, {0}, {0}, {0}, {0}};
  2120. # return v;
  2121. # }
  2122. def varv4_none() -> variation_vec4:
  2123. pass
  2124. # static inline variation_vec4 varv4_inc(float x, float y, float z, float w) { /* original C++ signature */
  2125. # variation_vec4 v = {var_increment, {x,y,z,w}, {-FLT_MAX,-FLT_MAX,-FLT_MAX,-FLT_MAX}, {FLT_MAX,FLT_MAX,FLT_MAX,FLT_MAX}, 0, 0, 0, {0}, {0}, {0}, {0}};
  2126. # return v;
  2127. # }
  2128. def varv4_inc(x: float, y: float, z: float, w: float) -> variation_vec4:
  2129. pass
  2130. # static inline variation_vec4 varv4_dec(float x, float y, float z, float w) { /* original C++ signature */
  2131. # variation_vec4 v = {var_decrement, {x,y,z,w}, {-FLT_MAX,-FLT_MAX,-FLT_MAX,-FLT_MAX}, {FLT_MAX,FLT_MAX,FLT_MAX,FLT_MAX}, 0, 0, 0, {0}, {0}, {0}, {0}};
  2132. # return v;
  2133. # }
  2134. def varv4_dec(x: float, y: float, z: float, w: float) -> variation_vec4:
  2135. pass
  2136. # static inline variation_vec4 varv4_mul(float f) { /* original C++ signature */
  2137. # variation_vec4 v = {var_multiply, {f,f,f,f}, {-FLT_MAX,-FLT_MAX,-FLT_MAX,-FLT_MAX}, {FLT_MAX,FLT_MAX,FLT_MAX,FLT_MAX}, 0, 0, 0, {0}, {0}, {0}, {0}};
  2138. # return v;
  2139. # }
  2140. def varv4_mul(f: float) -> variation_vec4:
  2141. pass
  2142. # static inline variation_vec4 varv4_rand(float x, float y, float z, float w) { /* original C++ signature */
  2143. # variation_vec4 v = {var_random, {x,y,z,w}, {-FLT_MAX,-FLT_MAX,-FLT_MAX,-FLT_MAX}, {FLT_MAX,FLT_MAX,FLT_MAX,FLT_MAX}, 0, 0, 0, {0}, {0}, {0}, {0}};
  2144. # return v;
  2145. # }
  2146. def varv4_rand(x: float, y: float, z: float, w: float) -> variation_vec4:
  2147. pass
  2148. # static inline variation_vec4 varv4_fn(variation_vec4_fn fn, void* user) { /* original C++ signature */
  2149. # variation_vec4 v = {var_callback, {0,0,0,0}, {-FLT_MAX,-FLT_MAX,-FLT_MAX,-FLT_MAX}, {FLT_MAX,FLT_MAX,FLT_MAX,FLT_MAX}, 0, fn, user, {0}, {0}, {0}, {0}};
  2150. # return v;
  2151. # }
  2152. def varv4_fn(fn: variation_vec4_fn, user: Any) -> variation_vec4:
  2153. pass
  2154. # Vec4 per-axis helper
  2155. # static inline variation_vec4 varv4_axis(variation_float vx, variation_float vy, variation_float vz, variation_float vw) { /* original C++ signature */
  2156. # variation_vec4 v = {var_none, {0,0,0,0}, {-FLT_MAX,-FLT_MAX,-FLT_MAX,-FLT_MAX}, {FLT_MAX,FLT_MAX,FLT_MAX,FLT_MAX}, 0, 0, 0, vx, vy, vz, vw};
  2157. # return v;
  2158. # }
  2159. def varv4_axis(
  2160. vx: variation_float,
  2161. vy: variation_float,
  2162. vz: variation_float,
  2163. vw: variation_float
  2164. ) -> variation_vec4:
  2165. pass
  2166. # static inline variation_vec4 varv4_clamp(variation_vec4 v, ImVec4 mn, ImVec4 mx) { /* original C++ signature */
  2167. # v.min_clamp = mn; v.max_clamp = mx; return v;
  2168. # }
  2169. def varv4_clamp(v: variation_vec4, mn: ImVec4Like, mx: ImVec4Like) -> variation_vec4:
  2170. pass
  2171. # static inline variation_vec4 varv4_seed(variation_vec4 v, unsigned int s) { /* original C++ signature */
  2172. # v.seed = s; return v;
  2173. # }
  2174. def varv4_seed(v: variation_vec4, s: int) -> variation_vec4:
  2175. pass
  2176. # Color variation helpers (global)
  2177. # static inline variation_color varc_none(void) { /* original C++ signature */
  2178. # variation_color v = {var_none, {0,0,0,0}, {0,0,0,0}, {1,1,1,1}, col_oklab, 0, 0, 0, {0}, {0}, {0}, {0}};
  2179. # return v;
  2180. # }
  2181. def varc_none() -> variation_color:
  2182. pass
  2183. # static inline variation_color varc_inc(float r, float g, float b, float a) { /* original C++ signature */
  2184. # variation_color v = {var_increment, {r,g,b,a}, {0,0,0,0}, {1,1,1,1}, col_oklab, 0, 0, 0, {0}, {0}, {0}, {0}};
  2185. # return v;
  2186. # }
  2187. def varc_inc(r: float, g: float, b: float, a: float) -> variation_color:
  2188. pass
  2189. # static inline variation_color varc_dec(float r, float g, float b, float a) { /* original C++ signature */
  2190. # variation_color v = {var_decrement, {r,g,b,a}, {0,0,0,0}, {1,1,1,1}, col_oklab, 0, 0, 0, {0}, {0}, {0}, {0}};
  2191. # return v;
  2192. # }
  2193. def varc_dec(r: float, g: float, b: float, a: float) -> variation_color:
  2194. pass
  2195. # static inline variation_color varc_mul(float f) { /* original C++ signature */
  2196. # variation_color v = {var_multiply, {f,f,f,1}, {0,0,0,0}, {1,1,1,1}, col_oklab, 0, 0, 0, {0}, {0}, {0}, {0}};
  2197. # return v;
  2198. # }
  2199. def varc_mul(f: float) -> variation_color:
  2200. pass
  2201. # static inline variation_color varc_rand(float r, float g, float b, float a) { /* original C++ signature */
  2202. # variation_color v = {var_random, {r,g,b,a}, {0,0,0,0}, {1,1,1,1}, col_oklab, 0, 0, 0, {0}, {0}, {0}, {0}};
  2203. # return v;
  2204. # }
  2205. def varc_rand(r: float, g: float, b: float, a: float) -> variation_color:
  2206. pass
  2207. # static inline variation_color varc_fn(variation_vec4_fn fn, void* user) { /* original C++ signature */
  2208. # variation_color v = {var_callback, {0,0,0,0}, {0,0,0,0}, {1,1,1,1}, col_oklab, 0, fn, user, {0}, {0}, {0}, {0}};
  2209. # return v;
  2210. # }
  2211. def varc_fn(fn: variation_vec4_fn, user: Any) -> variation_color:
  2212. pass
  2213. # Color per-channel helper
  2214. # static inline variation_color varc_channel(variation_float vr, variation_float vg, variation_float vb, variation_float va) { /* original C++ signature */
  2215. # variation_color v = {var_none, {0,0,0,0}, {0,0,0,0}, {1,1,1,1}, col_oklab, 0, 0, 0, vr, vg, vb, va};
  2216. # return v;
  2217. # }
  2218. def varc_channel(
  2219. vr: variation_float,
  2220. vg: variation_float,
  2221. vb: variation_float,
  2222. va: variation_float
  2223. ) -> variation_color:
  2224. pass
  2225. # static inline variation_color varc_space(variation_color v, int space) { /* original C++ signature */
  2226. # v.color_space = space; return v;
  2227. # }
  2228. def varc_space(v: variation_color, space: int) -> variation_color:
  2229. pass
  2230. # static inline variation_color varc_clamp(variation_color v, ImVec4 mn, ImVec4 mx) { /* original C++ signature */
  2231. # v.min_clamp = mn; v.max_clamp = mx; return v;
  2232. # }
  2233. def varc_clamp(v: variation_color, mn: ImVec4Like, mx: ImVec4Like) -> variation_color:
  2234. pass
  2235. # static inline variation_color varc_seed(variation_color v, unsigned int s) { /* original C++ signature */
  2236. # v.seed = s; return v;
  2237. # }
  2238. def varc_seed(v: variation_color, s: int) -> variation_color:
  2239. pass
  2240. # Forward declarations
  2241. # #ifdef IMGUI_BUNDLE_PYTHON_API
  2242. #
  2243. # #else
  2244. #
  2245. # #endif
  2246. #
  2247. class clip:
  2248. """ ----------------------------------------------------
  2249. clip - fluent API for authoring animations
  2250. ----------------------------------------------------
  2251. """
  2252. # static clip begin(ImGuiID clip_id); /* original C++ signature */
  2253. @staticmethod
  2254. def begin(clip_id: int) -> clip:
  2255. """ Start building a new clip with the given ID"""
  2256. pass
  2257. # Add keyframes for different channel types
  2258. # clip& key_float(ImGuiID channel, float time, float value, int ease_type = ease_type::ease_linear, float const* bezier4 = nullptr); /* original C++ signature */
  2259. def key_float(
  2260. self,
  2261. channel: int,
  2262. time: float,
  2263. value: float,
  2264. ease_type: int = ease_type.ease_linear
  2265. ) -> clip:
  2266. pass
  2267. # clip& key_vec2(ImGuiID channel, float time, ImVec2 value, int ease_type = ease_type::ease_linear, float const* bezier4 = nullptr); /* original C++ signature */
  2268. def key_vec2(
  2269. self,
  2270. channel: int,
  2271. time: float,
  2272. value: ImVec2Like,
  2273. ease_type: int = ease_type.ease_linear
  2274. ) -> clip:
  2275. pass
  2276. # clip& key_vec4(ImGuiID channel, float time, ImVec4 value, int ease_type = ease_type::ease_linear, float const* bezier4 = nullptr); /* original C++ signature */
  2277. def key_vec4(
  2278. self,
  2279. channel: int,
  2280. time: float,
  2281. value: ImVec4Like,
  2282. ease_type: int = ease_type.ease_linear
  2283. ) -> clip:
  2284. pass
  2285. # clip& key_int(ImGuiID channel, float time, int value, int ease_type = ease_type::ease_linear); /* original C++ signature */
  2286. def key_int(
  2287. self,
  2288. channel: int,
  2289. time: float,
  2290. value: int,
  2291. ease_type: int = ease_type.ease_linear
  2292. ) -> clip:
  2293. pass
  2294. # clip& key_color(ImGuiID channel, float time, ImVec4 value, int color_space = color_space::col_oklab, int ease_type = ease_type::ease_linear, float const* bezier4 = nullptr); /* original C++ signature */
  2295. def key_color(
  2296. self,
  2297. channel: int,
  2298. time: float,
  2299. value: ImVec4Like,
  2300. color_space: int = color_space.col_oklab,
  2301. ease_type: int = ease_type.ease_linear
  2302. ) -> clip:
  2303. pass
  2304. # Keyframes with repeat variation (value changes per loop iteration)
  2305. # clip& key_float_var(ImGuiID channel, float time, float value, variation_float const& var, int ease_type = ease_type::ease_linear, float const* bezier4 = nullptr); /* original C++ signature */
  2306. def key_float_var(
  2307. self,
  2308. channel: int,
  2309. time: float,
  2310. value: float,
  2311. var: variation_float,
  2312. ease_type: int = ease_type.ease_linear
  2313. ) -> clip:
  2314. pass
  2315. # clip& key_vec2_var(ImGuiID channel, float time, ImVec2 value, variation_vec2 const& var, int ease_type = ease_type::ease_linear, float const* bezier4 = nullptr); /* original C++ signature */
  2316. def key_vec2_var(
  2317. self,
  2318. channel: int,
  2319. time: float,
  2320. value: ImVec2Like,
  2321. var: variation_vec2,
  2322. ease_type: int = ease_type.ease_linear
  2323. ) -> clip:
  2324. pass
  2325. # clip& key_vec4_var(ImGuiID channel, float time, ImVec4 value, variation_vec4 const& var, int ease_type = ease_type::ease_linear, float const* bezier4 = nullptr); /* original C++ signature */
  2326. def key_vec4_var(
  2327. self,
  2328. channel: int,
  2329. time: float,
  2330. value: ImVec4Like,
  2331. var: variation_vec4,
  2332. ease_type: int = ease_type.ease_linear
  2333. ) -> clip:
  2334. pass
  2335. # clip& key_int_var(ImGuiID channel, float time, int value, variation_int const& var, int ease_type = ease_type::ease_linear); /* original C++ signature */
  2336. def key_int_var(
  2337. self,
  2338. channel: int,
  2339. time: float,
  2340. value: int,
  2341. var: variation_int,
  2342. ease_type: int = ease_type.ease_linear
  2343. ) -> clip:
  2344. pass
  2345. # clip& key_color_var(ImGuiID channel, float time, ImVec4 value, variation_color const& var, int color_space = color_space::col_oklab, int ease_type = ease_type::ease_linear, float const* bezier4 = nullptr); /* original C++ signature */
  2346. def key_color_var(
  2347. self,
  2348. channel: int,
  2349. time: float,
  2350. value: ImVec4Like,
  2351. var: variation_color,
  2352. color_space: int = color_space.col_oklab,
  2353. ease_type: int = ease_type.ease_linear
  2354. ) -> clip:
  2355. pass
  2356. # clip& key_float_spring(ImGuiID channel, float time, float target, spring_params const& spring); /* original C++ signature */
  2357. def key_float_spring(
  2358. self,
  2359. channel: int,
  2360. time: float,
  2361. target: float,
  2362. spring: spring_params
  2363. ) -> clip:
  2364. """ Spring-based keyframe (float only)"""
  2365. pass
  2366. # Anchor-relative keyframes (values resolved relative to window/viewport at get time)
  2367. # clip& key_float_rel(ImGuiID channel, float time, float percent, float px_bias, int anchor_space, int axis, int ease_type = ease_type::ease_linear, float const* bezier4 = nullptr); /* original C++ signature */
  2368. def key_float_rel(
  2369. self,
  2370. channel: int,
  2371. time: float,
  2372. percent: float,
  2373. px_bias: float,
  2374. anchor_space: int,
  2375. axis: int,
  2376. ease_type: int = ease_type.ease_linear
  2377. ) -> clip:
  2378. pass
  2379. # clip& key_vec2_rel(ImGuiID channel, float time, ImVec2 percent, ImVec2 px_bias, int anchor_space, int ease_type = ease_type::ease_linear, float const* bezier4 = nullptr); /* original C++ signature */
  2380. def key_vec2_rel(
  2381. self,
  2382. channel: int,
  2383. time: float,
  2384. percent: ImVec2Like,
  2385. px_bias: ImVec2Like,
  2386. anchor_space: int,
  2387. ease_type: int = ease_type.ease_linear
  2388. ) -> clip:
  2389. pass
  2390. # clip& key_vec4_rel(ImGuiID channel, float time, ImVec4 percent, ImVec4 px_bias, int anchor_space, int ease_type = ease_type::ease_linear, float const* bezier4 = nullptr); /* original C++ signature */
  2391. def key_vec4_rel(
  2392. self,
  2393. channel: int,
  2394. time: float,
  2395. percent: ImVec4Like,
  2396. px_bias: ImVec4Like,
  2397. anchor_space: int,
  2398. ease_type: int = ease_type.ease_linear
  2399. ) -> clip:
  2400. pass
  2401. # clip& key_color_rel(ImGuiID channel, float time, ImVec4 percent, ImVec4 px_bias, int color_space, int anchor_space, int ease_type = ease_type::ease_linear, float const* bezier4 = nullptr); /* original C++ signature */
  2402. def key_color_rel(
  2403. self,
  2404. channel: int,
  2405. time: float,
  2406. percent: ImVec4Like,
  2407. px_bias: ImVec4Like,
  2408. color_space: int,
  2409. anchor_space: int,
  2410. ease_type: int = ease_type.ease_linear
  2411. ) -> clip:
  2412. pass
  2413. # Timeline grouping - sequential and parallel keyframe blocks
  2414. # clip& seq_begin(); /* original C++ signature */
  2415. def seq_begin(self) -> clip:
  2416. """ Start sequential block (keyframes after seq_end start after this block)"""
  2417. pass
  2418. # clip& seq_end(); /* original C++ signature */
  2419. def seq_end(self) -> clip:
  2420. pass
  2421. # clip& par_begin(); /* original C++ signature */
  2422. def par_begin(self) -> clip:
  2423. """ Start parallel block (keyframes play at same time offset)"""
  2424. pass
  2425. # clip& par_end(); /* original C++ signature */
  2426. def par_end(self) -> clip:
  2427. pass
  2428. # Timeline markers - callbacks at specific times during playback
  2429. # clip& marker(float time, ImGuiID marker_id, marker_callback cb, void* user = nullptr); /* original C++ signature */
  2430. @overload
  2431. def marker(self, time: float, marker_id: int, cb: marker_callback) -> clip:
  2432. """ Add marker at specific time."""
  2433. pass
  2434. # clip& marker(float time, marker_callback cb, void* user = nullptr); /* original C++ signature */
  2435. @overload
  2436. def marker(self, time: float, cb: marker_callback) -> clip:
  2437. """ Add marker (auto-generated ID)."""
  2438. pass
  2439. # Clip options
  2440. # clip& set_loop(bool loop, int direction = direction::dir_normal, int loop_count = -1); /* original C++ signature */
  2441. def set_loop(
  2442. self,
  2443. loop: bool,
  2444. direction: int = direction.dir_normal,
  2445. loop_count: int = -1
  2446. ) -> clip:
  2447. pass
  2448. # clip& set_delay(float delay_seconds); /* original C++ signature */
  2449. def set_delay(self, delay_seconds: float) -> clip:
  2450. pass
  2451. # clip& set_stagger(int count, float each_delay, float from_center_bias = 0.0f); /* original C++ signature */
  2452. def set_stagger(
  2453. self,
  2454. count: int,
  2455. each_delay: float,
  2456. from_center_bias: float = 0.0
  2457. ) -> clip:
  2458. pass
  2459. # Timing variation per loop iteration
  2460. # clip& set_duration_var(variation_float const& var); /* original C++ signature */
  2461. def set_duration_var(self, var: variation_float) -> clip:
  2462. """ Vary clip duration per loop"""
  2463. pass
  2464. # clip& set_delay_var(variation_float const& var); /* original C++ signature */
  2465. def set_delay_var(self, var: variation_float) -> clip:
  2466. """ Vary delay between loops"""
  2467. pass
  2468. # clip& set_timescale_var(variation_float const& var); /* original C++ signature */
  2469. def set_timescale_var(self, var: variation_float) -> clip:
  2470. """ Vary playback speed per loop"""
  2471. pass
  2472. # Callbacks
  2473. # clip& on_begin(clip_callback cb, void* user = nullptr); /* original C++ signature */
  2474. def on_begin(self, cb: clip_callback) -> clip:
  2475. pass
  2476. # clip& on_update(clip_callback cb, void* user = nullptr); /* original C++ signature */
  2477. def on_update(self, cb: clip_callback) -> clip:
  2478. pass
  2479. # clip& on_complete(clip_callback cb, void* user = nullptr); /* original C++ signature */
  2480. def on_complete(self, cb: clip_callback) -> clip:
  2481. pass
  2482. # void end(); /* original C++ signature */
  2483. def end(self) -> None:
  2484. """ Finalize the clip"""
  2485. pass
  2486. # ImGuiID id() const { return m_clip_id; } /* original C++ signature */
  2487. def id(self) -> int:
  2488. """ Get the clip ID"""
  2489. pass
  2490. class instance:
  2491. """ ----------------------------------------------------
  2492. instance - playback control for a clip
  2493. ----------------------------------------------------
  2494. """
  2495. # instance() : m_inst_id(0) {} /* original C++ signature */
  2496. @overload
  2497. def __init__(self) -> None:
  2498. pass
  2499. # instance(ImGuiID inst_id) : m_inst_id(inst_id) {} /* original C++ signature */
  2500. @overload
  2501. def __init__(self, inst_id: int) -> None:
  2502. pass
  2503. # Playback control
  2504. # void pause(); /* original C++ signature */
  2505. def pause(self) -> None:
  2506. pass
  2507. # void resume(); /* original C++ signature */
  2508. def resume(self) -> None:
  2509. pass
  2510. # void stop(); /* original C++ signature */
  2511. def stop(self) -> None:
  2512. pass
  2513. # void destroy(); /* original C++ signature */
  2514. def destroy(self) -> None:
  2515. """ Remove instance from system (valid() will return False after this)"""
  2516. pass
  2517. # void seek(float time); /* original C++ signature */
  2518. def seek(self, time: float) -> None:
  2519. pass
  2520. # void set_time_scale(float scale); /* original C++ signature */
  2521. def set_time_scale(self, scale: float) -> None:
  2522. pass
  2523. # void set_weight(float weight); /* original C++ signature */
  2524. def set_weight(self, weight: float) -> None:
  2525. """ for layering/blending"""
  2526. pass
  2527. # Animation chaining - play another clip when this one completes
  2528. # instance& then(ImGuiID next_clip_id); /* original C++ signature */
  2529. @overload
  2530. def then(self, next_clip_id: int) -> instance:
  2531. """ Chain another clip to play after this one."""
  2532. pass
  2533. # instance& then(ImGuiID next_clip_id, ImGuiID next_instance_id); /* original C++ signature */
  2534. @overload
  2535. def then(self, next_clip_id: int, next_instance_id: int) -> instance:
  2536. """ Chain with specific instance ID."""
  2537. pass
  2538. # instance& then_delay(float delay); /* original C++ signature */
  2539. def then_delay(self, delay: float) -> instance:
  2540. """ Set delay before chained clip starts."""
  2541. pass
  2542. # Query state
  2543. # float time() const; /* original C++ signature */
  2544. def time(self) -> float:
  2545. pass
  2546. # float duration() const; /* original C++ signature */
  2547. def duration(self) -> float:
  2548. pass
  2549. # bool is_playing() const; /* original C++ signature */
  2550. def is_playing(self) -> bool:
  2551. pass
  2552. # bool is_paused() const; /* original C++ signature */
  2553. def is_paused(self) -> bool:
  2554. pass
  2555. # #ifdef IMGUI_BUNDLE_PYTHON_API
  2556. #
  2557. # inline std::pair<bool, float> get_float(ImGuiID channel) const { float v = 0.f; bool ok = get_float(channel, &v); return {ok, v}; } /* original C++ signature */
  2558. def get_float(self, channel: int) -> Tuple[bool, float]:
  2559. pass
  2560. # inline std::pair<bool, ImVec2> get_vec2(ImGuiID channel) const { ImVec2 v; bool ok = get_vec2(channel, &v); return {ok, v}; } /* original C++ signature */
  2561. def get_vec2(self, channel: int) -> Tuple[bool, ImVec2]:
  2562. pass
  2563. # inline std::pair<bool, ImVec4> get_vec4(ImGuiID channel) const { ImVec4 v; bool ok = get_vec4(channel, &v); return {ok, v}; } /* original C++ signature */
  2564. def get_vec4(self, channel: int) -> Tuple[bool, ImVec4]:
  2565. pass
  2566. # inline std::pair<bool, int> get_int(ImGuiID channel) const { int v = 0; bool ok = get_int(channel, &v); return {ok, v}; } /* original C++ signature */
  2567. def get_int(self, channel: int) -> Tuple[bool, int]:
  2568. pass
  2569. # inline std::pair<bool, ImVec4> get_color(ImGuiID channel, int color_space = color_space::col_oklab) const { ImVec4 v; bool ok = get_color(channel, &v, color_space); return {ok, v}; } /* original C++ signature */
  2570. def get_color(
  2571. self,
  2572. channel: int,
  2573. color_space: int = color_space.col_oklab
  2574. ) -> Tuple[bool, ImVec4]:
  2575. pass
  2576. # #endif
  2577. #
  2578. # bool valid() const; /* original C++ signature */
  2579. def valid(self) -> bool:
  2580. """ Check validity"""
  2581. pass
  2582. # operator bool() const { return valid(); } /* original C++ signature */
  2583. def __bool__(self) -> bool:
  2584. pass
  2585. # ImGuiID id() const { return m_inst_id; } /* original C++ signature */
  2586. def id(self) -> int:
  2587. pass
  2588. # ----------------------------------------------------
  2589. # Clip System API
  2590. # ----------------------------------------------------
  2591. # Initialize/shutdown (optional - auto-init on first use)
  2592. # void clip_init(int initial_clip_cap = 256, int initial_inst_cap = 4096); /* original C++ signature */
  2593. def clip_init(initial_clip_cap: int = 256, initial_inst_cap: int = 4096) -> None:
  2594. pass
  2595. # void clip_shutdown(); /* original C++ signature */
  2596. def clip_shutdown() -> None:
  2597. pass
  2598. # void clip_update(float dt); /* original C++ signature */
  2599. def clip_update(dt: float) -> None:
  2600. """ Per-frame update (call after update_begin_frame)"""
  2601. pass
  2602. # void clip_gc(unsigned int max_age_frames = 600); /* original C++ signature */
  2603. def clip_gc(max_age_frames: int = 600) -> None:
  2604. """ Garbage collection for instances"""
  2605. pass
  2606. # instance play(ImGuiID clip_id, ImGuiID instance_id); /* original C++ signature */
  2607. def play(clip_id: int, instance_id: int) -> instance:
  2608. """ Play a clip on an instance (creates or reuses instance)"""
  2609. pass
  2610. # instance get_instance(ImGuiID instance_id); /* original C++ signature */
  2611. def get_instance(instance_id: int) -> instance:
  2612. """ Get an existing instance (returns invalid instance if not found)"""
  2613. pass
  2614. # Query clip info
  2615. # float clip_duration(ImGuiID clip_id); /* original C++ signature */
  2616. def clip_duration(clip_id: int) -> float:
  2617. """ Get clip duration in seconds."""
  2618. pass
  2619. # bool clip_exists(ImGuiID clip_id); /* original C++ signature */
  2620. def clip_exists(clip_id: int) -> bool:
  2621. """ Check if clip exists."""
  2622. pass
  2623. # Stagger helpers - compute delay for indexed instances
  2624. # float stagger_delay(ImGuiID clip_id, int index); /* original C++ signature */
  2625. def stagger_delay(clip_id: int, index: int) -> float:
  2626. """ Get stagger delay for element at index."""
  2627. pass
  2628. # instance play_stagger(ImGuiID clip_id, ImGuiID instance_id, int index); /* original C++ signature */
  2629. def play_stagger(clip_id: int, instance_id: int, index: int) -> instance:
  2630. """ Play with stagger delay applied."""
  2631. pass
  2632. # Layering support - blend multiple animation instances
  2633. # void layer_begin(ImGuiID instance_id); /* original C++ signature */
  2634. def layer_begin(instance_id: int) -> None:
  2635. """ Start blending into target instance."""
  2636. pass
  2637. # void layer_add(instance inst, float weight); /* original C++ signature */
  2638. def layer_add(inst: instance, weight: float) -> None:
  2639. """ Add source instance with weight."""
  2640. pass
  2641. # void layer_end(ImGuiID instance_id); /* original C++ signature */
  2642. def layer_end(instance_id: int) -> None:
  2643. """ Finalize blending and normalize weights."""
  2644. pass
  2645. # #ifdef IMGUI_BUNDLE_PYTHON_API
  2646. #
  2647. # inline std::pair<bool, float> get_blended_float(ImGuiID instance_id, ImGuiID channel) { float v = 0.f; bool ok = get_blended_float(instance_id, channel, &v); return {ok, v}; } /* original C++ signature */
  2648. def get_blended_float(instance_id: int, channel: int) -> Tuple[bool, float]:
  2649. pass
  2650. # inline std::pair<bool, ImVec2> get_blended_vec2(ImGuiID instance_id, ImGuiID channel) { ImVec2 v; bool ok = get_blended_vec2(instance_id, channel, &v); return {ok, v}; } /* original C++ signature */
  2651. def get_blended_vec2(instance_id: int, channel: int) -> Tuple[bool, ImVec2]:
  2652. pass
  2653. # inline std::pair<bool, ImVec4> get_blended_vec4(ImGuiID instance_id, ImGuiID channel) { ImVec4 v; bool ok = get_blended_vec4(instance_id, channel, &v); return {ok, v}; } /* original C++ signature */
  2654. def get_blended_vec4(instance_id: int, channel: int) -> Tuple[bool, ImVec4]:
  2655. pass
  2656. # inline std::pair<bool, int> get_blended_int(ImGuiID instance_id, ImGuiID channel) { int v = 0; bool ok = get_blended_int(instance_id, channel, &v); return {ok, v}; } /* original C++ signature */
  2657. def get_blended_int(instance_id: int, channel: int) -> Tuple[bool, int]:
  2658. pass
  2659. # #endif
  2660. #
  2661. # Persistence (optional)
  2662. # result clip_save(ImGuiID clip_id, char const* path); /* original C++ signature */
  2663. def clip_save(clip_id: int, path: str) -> result:
  2664. pass
  2665. # result clip_load(char const* path, ImGuiID* out_clip_id); /* original C++ signature */
  2666. def clip_load(path: str, out_clip_id: ImGuiID) -> result:
  2667. pass
  2668. # ----------------------------------------------------
  2669. # Usage notes (summary)
  2670. # ----------------------------------------------------
  2671. # TWEEN API:
  2672. # 1) Call update_begin_frame() once per frame; use ImGui::GetIO().DeltaTime as dt.
  2673. # 2) For each widget/object, pick a stable ImGuiID (e.g. ImGui::GetItemID()) and a channel_id (ImHashStr("alpha")).
  2674. # 3) Call tween_* to get the animated value, then apply it (PushStyleVar, etc).
  2675. # 4) Optionally call gc(600) every second to bound memory.
  2676. # 5) Use tween_vec2_rel / tween_vec2_resolved / rebase_vec2 to keep animations smooth on window/dock/viewport changes.
  2677. #
  2678. # CLIP API:
  2679. # 1) Author clips once at startup using clip::begin(id).key_*(...).end()
  2680. # 2) Call clip_update(dt) each frame after update_begin_frame()
  2681. # 3) Use play(clip_id, instance_id) to start playback; returns instance for queries
  2682. # 4) Call inst.get_float/vec2/vec4/int() to sample animated values
  2683. # 5) Optionally call clip_gc(600) to bound instance memory
  2684. # ----------------------------------------------------
  2685. # Demo and doc launchers (see im_anim_demo.cpp, im_anim_docs.cpp, im_anim_usecase.cpp)
  2686. # ----------------------------------------------------
  2687. # void ImAnimDemoWindow(bool create_window = true); /* original C++ signature */
  2688. def demo_window(create_window: bool = True) -> None:
  2689. pass
  2690. # void ImAnimDocWindow(bool create_window = true); /* original C++ signature */
  2691. def doc_window(create_window: bool = True) -> None:
  2692. pass
  2693. # void ImAnimUsecaseWindow(bool create_window = true); /* original C++ signature */
  2694. def usecase_window(create_window: bool = True) -> None:
  2695. pass
  2696. # void ImAnimDemoBasicsWindow(bool create_window = true); /* original C++ signature */
  2697. def demo_basics_window(create_window: bool = True) -> None:
  2698. pass
  2699. #################### </generated_from:im_anim.h> ####################
  2700. # </litgen_stub> // Autogenerated code end!