blenderui 0.1.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (616) hide show
  1. blenderui-0.1.0/.gitignore +11 -0
  2. blenderui-0.1.0/ARCHITECTURE.md +120 -0
  3. blenderui-0.1.0/CHANGELOG.md +31 -0
  4. blenderui-0.1.0/CMakeLists.txt +69 -0
  5. blenderui-0.1.0/INTEGRATION.md +234 -0
  6. blenderui-0.1.0/LICENSE +674 -0
  7. blenderui-0.1.0/PKG-INFO +462 -0
  8. blenderui-0.1.0/README.md +429 -0
  9. blenderui-0.1.0/SYNTAX_COVERAGE.md +110 -0
  10. blenderui-0.1.0/api/CMakeLists.txt +6 -0
  11. blenderui-0.1.0/api/bui_c_api.c +42 -0
  12. blenderui-0.1.0/api/bui_c_api.h +33 -0
  13. blenderui-0.1.0/backends/qt/BuiQtSink.cpp +105 -0
  14. blenderui-0.1.0/backends/qt/BuiQtSink.h +50 -0
  15. blenderui-0.1.0/backends/qt/BuiWidget.cpp +56 -0
  16. blenderui-0.1.0/backends/qt/BuiWidget.h +37 -0
  17. blenderui-0.1.0/backends/qt/CMakeLists.txt +28 -0
  18. blenderui-0.1.0/bindings/python/CMakeLists.txt +90 -0
  19. blenderui-0.1.0/bindings/python/blenderui/__init__.py +56 -0
  20. blenderui-0.1.0/bindings/python/bui/__init__.py +125 -0
  21. blenderui-0.1.0/bindings/python/bui/_realtk.py +40 -0
  22. blenderui-0.1.0/bindings/python/bui/_surface.py +309 -0
  23. blenderui-0.1.0/bindings/python/bui/_version.py +6 -0
  24. blenderui-0.1.0/bindings/python/bui/components/__init__.py +58 -0
  25. blenderui-0.1.0/bindings/python/bui/components/app.py +94 -0
  26. blenderui-0.1.0/bindings/python/bui/components/containers.py +216 -0
  27. blenderui-0.1.0/bindings/python/bui/components/core.py +165 -0
  28. blenderui-0.1.0/bindings/python/bui/components/editors.py +241 -0
  29. blenderui-0.1.0/bindings/python/bui/components/menus.py +102 -0
  30. blenderui-0.1.0/bindings/python/bui/components/templates.py +126 -0
  31. blenderui-0.1.0/bindings/python/bui/components/views.py +218 -0
  32. blenderui-0.1.0/bindings/python/bui/components/widgets.py +432 -0
  33. blenderui-0.1.0/bindings/python/bui/host.py +304 -0
  34. blenderui-0.1.0/bindings/python/bui/qt.py +178 -0
  35. blenderui-0.1.0/bindings/python/bui/qtsyntax.py +2767 -0
  36. blenderui-0.1.0/bindings/python/bui/svg.py +99 -0
  37. blenderui-0.1.0/bindings/python/bui/theme.py +186 -0
  38. blenderui-0.1.0/bindings/python/bui/tksyntax/__init__.py +79 -0
  39. blenderui-0.1.0/bindings/python/bui/tksyntax/__main__.py +26 -0
  40. blenderui-0.1.0/bindings/python/bui/tksyntax/_core.py +2543 -0
  41. blenderui-0.1.0/bindings/python/bui/tksyntax/_images.py +498 -0
  42. blenderui-0.1.0/bindings/python/bui/tksyntax/_widgets.py +3445 -0
  43. blenderui-0.1.0/bindings/python/bui/tksyntax/colorchooser.py +91 -0
  44. blenderui-0.1.0/bindings/python/bui/tksyntax/commondialog.py +31 -0
  45. blenderui-0.1.0/bindings/python/bui/tksyntax/constants.py +113 -0
  46. blenderui-0.1.0/bindings/python/bui/tksyntax/dialog.py +25 -0
  47. blenderui-0.1.0/bindings/python/bui/tksyntax/filedialog.py +142 -0
  48. blenderui-0.1.0/bindings/python/bui/tksyntax/font.py +164 -0
  49. blenderui-0.1.0/bindings/python/bui/tksyntax/messagebox.py +113 -0
  50. blenderui-0.1.0/bindings/python/bui/tksyntax/scrolledtext.py +31 -0
  51. blenderui-0.1.0/bindings/python/bui/tksyntax/simpledialog.py +254 -0
  52. blenderui-0.1.0/bindings/python/bui/tksyntax/ttk.py +1414 -0
  53. blenderui-0.1.0/bindings/python/setup.py +74 -0
  54. blenderui-0.1.0/bindings/python/src/buipy_kit.c +2244 -0
  55. blenderui-0.1.0/bindings/python/src/buipy_module.c +1289 -0
  56. blenderui-0.1.0/bindings/python/tests/test_advanced.py +208 -0
  57. blenderui-0.1.0/bindings/python/tests/test_buipy.py +53 -0
  58. blenderui-0.1.0/bindings/python/tests/test_components.py +767 -0
  59. blenderui-0.1.0/bindings/python/tests/test_render.py +263 -0
  60. blenderui-0.1.0/bindings/python/tests/test_syntax.py +267 -0
  61. blenderui-0.1.0/bindings/python/tests/test_tk_compat.py +545 -0
  62. blenderui-0.1.0/bindings/python/tests/test_tk_input.py +232 -0
  63. blenderui-0.1.0/compat/CMakeLists.txt +16 -0
  64. blenderui-0.1.0/compat/include/ANIM_action.hh +27 -0
  65. blenderui-0.1.0/compat/include/AS_asset_representation.hh +4 -0
  66. blenderui-0.1.0/compat/include/BIF_glutil.hh +212 -0
  67. blenderui-0.1.0/compat/include/BKE_addon.h +42 -0
  68. blenderui-0.1.0/compat/include/BKE_appdir.hh +192 -0
  69. blenderui-0.1.0/compat/include/BKE_colorband.hh +33 -0
  70. blenderui-0.1.0/compat/include/BKE_colortools.hh +244 -0
  71. blenderui-0.1.0/compat/include/BKE_context.hh +516 -0
  72. blenderui-0.1.0/compat/include/BKE_curveprofile.h +175 -0
  73. blenderui-0.1.0/compat/include/BKE_fcurve.hh +3 -0
  74. blenderui-0.1.0/compat/include/BKE_global.hh +379 -0
  75. blenderui-0.1.0/compat/include/BKE_lib_id.hh +26 -0
  76. blenderui-0.1.0/compat/include/BKE_report.hh +161 -0
  77. blenderui-0.1.0/compat/include/BKE_screen.hh +977 -0
  78. blenderui-0.1.0/compat/include/BKE_tracking.hh +33 -0
  79. blenderui-0.1.0/compat/include/BKE_wm_runtime.hh +198 -0
  80. blenderui-0.1.0/compat/include/BLF_api.hh +470 -0
  81. blenderui-0.1.0/compat/include/BLF_enums.hh +70 -0
  82. blenderui-0.1.0/compat/include/BLO_userdef_default.h +22 -0
  83. blenderui-0.1.0/compat/include/BLT_translation.hh +246 -0
  84. blenderui-0.1.0/compat/include/CLG_log.h +206 -0
  85. blenderui-0.1.0/compat/include/ED_asset.hh +3 -0
  86. blenderui-0.1.0/compat/include/ED_buttons.hh +49 -0
  87. blenderui-0.1.0/compat/include/ED_node.hh +20 -0
  88. blenderui-0.1.0/compat/include/ED_screen.hh +794 -0
  89. blenderui-0.1.0/compat/include/ED_screen_types.hh +133 -0
  90. blenderui-0.1.0/compat/include/ED_space_api.hh +81 -0
  91. blenderui-0.1.0/compat/include/GPU_texture.hh +11 -0
  92. blenderui-0.1.0/compat/include/IMB_colormanagement.hh +41 -0
  93. blenderui-0.1.0/compat/include/IMB_imbuf.hh +718 -0
  94. blenderui-0.1.0/compat/include/IMB_imbuf_enums.h +64 -0
  95. blenderui-0.1.0/compat/include/IMB_imbuf_types.hh +407 -0
  96. blenderui-0.1.0/compat/include/OCIO_scope.hh +46 -0
  97. blenderui-0.1.0/compat/include/OCIO_view.hh +3 -0
  98. blenderui-0.1.0/compat/include/RNA_access.hh +1114 -0
  99. blenderui-0.1.0/compat/include/RNA_define.hh +751 -0
  100. blenderui-0.1.0/compat/include/RNA_prototypes.hh +18 -0
  101. blenderui-0.1.0/compat/include/RNA_types.hh +1092 -0
  102. blenderui-0.1.0/compat/include/WM_api.hh +2418 -0
  103. blenderui-0.1.0/compat/include/WM_gizmo_api.hh +479 -0
  104. blenderui-0.1.0/compat/include/WM_gizmo_types.hh +535 -0
  105. blenderui-0.1.0/compat/include/WM_keymap.hh +246 -0
  106. blenderui-0.1.0/compat/include/WM_message.hh +11 -0
  107. blenderui-0.1.0/compat/include/WM_toolsystem.hh +169 -0
  108. blenderui-0.1.0/compat/include/WM_types.hh +1527 -0
  109. blenderui-0.1.0/compat/include/gizmo/WM_gizmo_types.hh +528 -0
  110. blenderui-0.1.0/compat/include/wm_cursors.hh +78 -0
  111. blenderui-0.1.0/compat/include/wm_draw.hh +39 -0
  112. blenderui-0.1.0/compat/include/wm_event_system.hh +220 -0
  113. blenderui-0.1.0/compat/include/wm_event_types.hh +549 -0
  114. blenderui-0.1.0/compat/include/wm_gizmo_fn.hh +97 -0
  115. blenderui-0.1.0/compat/include/wm_window.hh +163 -0
  116. blenderui-0.1.0/compat/intern/bui_stubs.cc +0 -0
  117. blenderui-0.1.0/core/CMakeLists.txt +68 -0
  118. blenderui-0.1.0/core/include/BLI_alloca.h +23 -0
  119. blenderui-0.1.0/core/include/BLI_allocator.hh +137 -0
  120. blenderui-0.1.0/core/include/BLI_any.hh +397 -0
  121. blenderui-0.1.0/core/include/BLI_any_derived.hh +178 -0
  122. blenderui-0.1.0/core/include/BLI_args.h +72 -0
  123. blenderui-0.1.0/core/include/BLI_array.hh +489 -0
  124. blenderui-0.1.0/core/include/BLI_array_state.hh +89 -0
  125. blenderui-0.1.0/core/include/BLI_array_store.h +131 -0
  126. blenderui-0.1.0/core/include/BLI_array_store_utils.h +34 -0
  127. blenderui-0.1.0/core/include/BLI_array_utils.h +148 -0
  128. blenderui-0.1.0/core/include/BLI_array_utils.hh +484 -0
  129. blenderui-0.1.0/core/include/BLI_asan.h +36 -0
  130. blenderui-0.1.0/core/include/BLI_assert.h +98 -0
  131. blenderui-0.1.0/core/include/BLI_astar.h +150 -0
  132. blenderui-0.1.0/core/include/BLI_atomic_disjoint_set.hh +158 -0
  133. blenderui-0.1.0/core/include/BLI_binary_search.hh +56 -0
  134. blenderui-0.1.0/core/include/BLI_bit_bool_conversion.hh +29 -0
  135. blenderui-0.1.0/core/include/BLI_bit_group_vector.hh +166 -0
  136. blenderui-0.1.0/core/include/BLI_bit_ref.hh +246 -0
  137. blenderui-0.1.0/core/include/BLI_bit_span.hh +486 -0
  138. blenderui-0.1.0/core/include/BLI_bit_span_ops.hh +369 -0
  139. blenderui-0.1.0/core/include/BLI_bit_span_to_index_ranges.hh +140 -0
  140. blenderui-0.1.0/core/include/BLI_bit_vector.hh +406 -0
  141. blenderui-0.1.0/core/include/BLI_bitmap.h +150 -0
  142. blenderui-0.1.0/core/include/BLI_bitmap_draw_2d.h +55 -0
  143. blenderui-0.1.0/core/include/BLI_bounds.hh +515 -0
  144. blenderui-0.1.0/core/include/BLI_bounds_types.hh +83 -0
  145. blenderui-0.1.0/core/include/BLI_boxpack_2d.h +74 -0
  146. blenderui-0.1.0/core/include/BLI_build_config.h +457 -0
  147. blenderui-0.1.0/core/include/BLI_cache_mutex.hh +122 -0
  148. blenderui-0.1.0/core/include/BLI_color.hh +155 -0
  149. blenderui-0.1.0/core/include/BLI_color_mix.hh +1064 -0
  150. blenderui-0.1.0/core/include/BLI_color_types.hh +217 -0
  151. blenderui-0.1.0/core/include/BLI_colorspace.hh +38 -0
  152. blenderui-0.1.0/core/include/BLI_compiler_attrs.h +92 -0
  153. blenderui-0.1.0/core/include/BLI_compiler_compat.h +52 -0
  154. blenderui-0.1.0/core/include/BLI_compiler_typecheck.h +682 -0
  155. blenderui-0.1.0/core/include/BLI_compression.hh +43 -0
  156. blenderui-0.1.0/core/include/BLI_compute_context.hh +184 -0
  157. blenderui-0.1.0/core/include/BLI_concurrent_map.hh +198 -0
  158. blenderui-0.1.0/core/include/BLI_console.h +18 -0
  159. blenderui-0.1.0/core/include/BLI_convexhull_2d.hh +42 -0
  160. blenderui-0.1.0/core/include/BLI_cpp_type.hh +766 -0
  161. blenderui-0.1.0/core/include/BLI_cpp_type_make.hh +476 -0
  162. blenderui-0.1.0/core/include/BLI_csv_parse.hh +247 -0
  163. blenderui-0.1.0/core/include/BLI_delaunay_2d.hh +217 -0
  164. blenderui-0.1.0/core/include/BLI_devirtualize_parameters.hh +169 -0
  165. blenderui-0.1.0/core/include/BLI_dial_2d.h +45 -0
  166. blenderui-0.1.0/core/include/BLI_disjoint_set.hh +93 -0
  167. blenderui-0.1.0/core/include/BLI_dot_export.hh +298 -0
  168. blenderui-0.1.0/core/include/BLI_dot_export_attribute_enums.hh +112 -0
  169. blenderui-0.1.0/core/include/BLI_dynamic_stack_buffer.hh +62 -0
  170. blenderui-0.1.0/core/include/BLI_dynstr.h +106 -0
  171. blenderui-0.1.0/core/include/BLI_easing.h +51 -0
  172. blenderui-0.1.0/core/include/BLI_endian_defines.h +26 -0
  173. blenderui-0.1.0/core/include/BLI_endian_switch.h +44 -0
  174. blenderui-0.1.0/core/include/BLI_endian_switch_inline.h +84 -0
  175. blenderui-0.1.0/core/include/BLI_enum_flags.hh +85 -0
  176. blenderui-0.1.0/core/include/BLI_enumerable_thread_specific.hh +112 -0
  177. blenderui-0.1.0/core/include/BLI_execution_mode.hh +88 -0
  178. blenderui-0.1.0/core/include/BLI_expr_pylike_eval.h +61 -0
  179. blenderui-0.1.0/core/include/BLI_fftw.hh +30 -0
  180. blenderui-0.1.0/core/include/BLI_fileops.h +473 -0
  181. blenderui-0.1.0/core/include/BLI_fileops.hh +36 -0
  182. blenderui-0.1.0/core/include/BLI_fileops_types.h +46 -0
  183. blenderui-0.1.0/core/include/BLI_filereader.h +63 -0
  184. blenderui-0.1.0/core/include/BLI_fixed_string.hh +28 -0
  185. blenderui-0.1.0/core/include/BLI_fixed_width_int.hh +573 -0
  186. blenderui-0.1.0/core/include/BLI_fixed_width_int_str.hh +79 -0
  187. blenderui-0.1.0/core/include/BLI_fnmatch.h +47 -0
  188. blenderui-0.1.0/core/include/BLI_function_ref.hh +165 -0
  189. blenderui-0.1.0/core/include/BLI_generic_array.hh +260 -0
  190. blenderui-0.1.0/core/include/BLI_generic_key.hh +60 -0
  191. blenderui-0.1.0/core/include/BLI_generic_key_string.hh +50 -0
  192. blenderui-0.1.0/core/include/BLI_generic_pointer.hh +139 -0
  193. blenderui-0.1.0/core/include/BLI_generic_span.hh +281 -0
  194. blenderui-0.1.0/core/include/BLI_generic_value_map.hh +115 -0
  195. blenderui-0.1.0/core/include/BLI_generic_vector_array.hh +149 -0
  196. blenderui-0.1.0/core/include/BLI_generic_virtual_array.hh +994 -0
  197. blenderui-0.1.0/core/include/BLI_generic_virtual_vector_array.hh +173 -0
  198. blenderui-0.1.0/core/include/BLI_ghash.h +650 -0
  199. blenderui-0.1.0/core/include/BLI_gsqueue.h +44 -0
  200. blenderui-0.1.0/core/include/BLI_hash.h +110 -0
  201. blenderui-0.1.0/core/include/BLI_hash.hh +268 -0
  202. blenderui-0.1.0/core/include/BLI_hash_fwd.hh +14 -0
  203. blenderui-0.1.0/core/include/BLI_hash_md5.hh +33 -0
  204. blenderui-0.1.0/core/include/BLI_hash_mm2.h +18 -0
  205. blenderui-0.1.0/core/include/BLI_hash_mm2a.hh +35 -0
  206. blenderui-0.1.0/core/include/BLI_hash_mm3.h +18 -0
  207. blenderui-0.1.0/core/include/BLI_hash_mm3.hh +17 -0
  208. blenderui-0.1.0/core/include/BLI_hash_tables.hh +322 -0
  209. blenderui-0.1.0/core/include/BLI_heap.h +79 -0
  210. blenderui-0.1.0/core/include/BLI_heap_simple.h +46 -0
  211. blenderui-0.1.0/core/include/BLI_implicit_sharing.h +26 -0
  212. blenderui-0.1.0/core/include/BLI_implicit_sharing.hh +315 -0
  213. blenderui-0.1.0/core/include/BLI_implicit_sharing_ptr.hh +262 -0
  214. blenderui-0.1.0/core/include/BLI_index_mask.hh +1306 -0
  215. blenderui-0.1.0/core/include/BLI_index_mask_expression.hh +98 -0
  216. blenderui-0.1.0/core/include/BLI_index_mask_fwd.hh +23 -0
  217. blenderui-0.1.0/core/include/BLI_index_range.hh +369 -0
  218. blenderui-0.1.0/core/include/BLI_index_ranges_builder.hh +125 -0
  219. blenderui-0.1.0/core/include/BLI_index_ranges_builder_fwd.hh +15 -0
  220. blenderui-0.1.0/core/include/BLI_inplace_priority_queue.hh +298 -0
  221. blenderui-0.1.0/core/include/BLI_iterator.h +51 -0
  222. blenderui-0.1.0/core/include/BLI_jitter_2d.h +17 -0
  223. blenderui-0.1.0/core/include/BLI_kdopbvh.hh +362 -0
  224. blenderui-0.1.0/core/include/BLI_kdtree.hh +1272 -0
  225. blenderui-0.1.0/core/include/BLI_kdtree_types.hh +68 -0
  226. blenderui-0.1.0/core/include/BLI_lasso_2d.hh +25 -0
  227. blenderui-0.1.0/core/include/BLI_lazy_threading.hh +96 -0
  228. blenderui-0.1.0/core/include/BLI_length_parameterize.hh +189 -0
  229. blenderui-0.1.0/core/include/BLI_linear_allocator.hh +316 -0
  230. blenderui-0.1.0/core/include/BLI_linear_allocator_chunked_list.hh +209 -0
  231. blenderui-0.1.0/core/include/BLI_link_utils.h +57 -0
  232. blenderui-0.1.0/core/include/BLI_linklist.h +97 -0
  233. blenderui-0.1.0/core/include/BLI_linklist_lockfree.h +56 -0
  234. blenderui-0.1.0/core/include/BLI_linklist_stack.h +171 -0
  235. blenderui-0.1.0/core/include/BLI_listbase.h +370 -0
  236. blenderui-0.1.0/core/include/BLI_listbase_iterator.hh +324 -0
  237. blenderui-0.1.0/core/include/BLI_listbase_wrapper.hh +128 -0
  238. blenderui-0.1.0/core/include/BLI_map.hh +1379 -0
  239. blenderui-0.1.0/core/include/BLI_map_slots.hh +362 -0
  240. blenderui-0.1.0/core/include/BLI_math_angle_types.hh +726 -0
  241. blenderui-0.1.0/core/include/BLI_math_axis_angle.hh +116 -0
  242. blenderui-0.1.0/core/include/BLI_math_axis_angle_types.hh +92 -0
  243. blenderui-0.1.0/core/include/BLI_math_base.h +376 -0
  244. blenderui-0.1.0/core/include/BLI_math_base.hh +303 -0
  245. blenderui-0.1.0/core/include/BLI_math_base_safe.h +32 -0
  246. blenderui-0.1.0/core/include/BLI_math_basis_types.hh +481 -0
  247. blenderui-0.1.0/core/include/BLI_math_bits.h +65 -0
  248. blenderui-0.1.0/core/include/BLI_math_boolean.hh +68 -0
  249. blenderui-0.1.0/core/include/BLI_math_color.h +190 -0
  250. blenderui-0.1.0/core/include/BLI_math_color.hh +49 -0
  251. blenderui-0.1.0/core/include/BLI_math_color_blend.h +131 -0
  252. blenderui-0.1.0/core/include/BLI_math_constants.h +77 -0
  253. blenderui-0.1.0/core/include/BLI_math_euler.hh +114 -0
  254. blenderui-0.1.0/core/include/BLI_math_euler_types.hh +437 -0
  255. blenderui-0.1.0/core/include/BLI_math_filter.hh +24 -0
  256. blenderui-0.1.0/core/include/BLI_math_geom.h +1417 -0
  257. blenderui-0.1.0/core/include/BLI_math_half.hh +55 -0
  258. blenderui-0.1.0/core/include/BLI_math_inline.h +36 -0
  259. blenderui-0.1.0/core/include/BLI_math_interp.hh +513 -0
  260. blenderui-0.1.0/core/include/BLI_math_matrix.h +591 -0
  261. blenderui-0.1.0/core/include/BLI_math_matrix.hh +1826 -0
  262. blenderui-0.1.0/core/include/BLI_math_matrix_types.hh +1042 -0
  263. blenderui-0.1.0/core/include/BLI_math_mpq.hh +30 -0
  264. blenderui-0.1.0/core/include/BLI_math_quaternion.hh +709 -0
  265. blenderui-0.1.0/core/include/BLI_math_quaternion_types.hh +319 -0
  266. blenderui-0.1.0/core/include/BLI_math_rotation.h +449 -0
  267. blenderui-0.1.0/core/include/BLI_math_rotation.hh +501 -0
  268. blenderui-0.1.0/core/include/BLI_math_rotation_legacy.hh +29 -0
  269. blenderui-0.1.0/core/include/BLI_math_rotation_types.hh +20 -0
  270. blenderui-0.1.0/core/include/BLI_math_solvers.h +113 -0
  271. blenderui-0.1.0/core/include/BLI_math_statistics.h +63 -0
  272. blenderui-0.1.0/core/include/BLI_math_time.h +57 -0
  273. blenderui-0.1.0/core/include/BLI_math_vector.h +643 -0
  274. blenderui-0.1.0/core/include/BLI_math_vector.hh +832 -0
  275. blenderui-0.1.0/core/include/BLI_math_vector_mpq_types.hh +79 -0
  276. blenderui-0.1.0/core/include/BLI_math_vector_swizzle.hh +377 -0
  277. blenderui-0.1.0/core/include/BLI_math_vector_types.hh +789 -0
  278. blenderui-0.1.0/core/include/BLI_math_vector_unroll.hh +209 -0
  279. blenderui-0.1.0/core/include/BLI_memarena.h +83 -0
  280. blenderui-0.1.0/core/include/BLI_memblock.h +55 -0
  281. blenderui-0.1.0/core/include/BLI_memiter.h +67 -0
  282. blenderui-0.1.0/core/include/BLI_memory_cache.hh +80 -0
  283. blenderui-0.1.0/core/include/BLI_memory_cache_file_load.hh +34 -0
  284. blenderui-0.1.0/core/include/BLI_memory_counter.hh +70 -0
  285. blenderui-0.1.0/core/include/BLI_memory_counter_fwd.hh +23 -0
  286. blenderui-0.1.0/core/include/BLI_memory_utils.hh +364 -0
  287. blenderui-0.1.0/core/include/BLI_mempool.h +130 -0
  288. blenderui-0.1.0/core/include/BLI_mesh_boolean.hh +75 -0
  289. blenderui-0.1.0/core/include/BLI_mesh_intersect.hh +411 -0
  290. blenderui-0.1.0/core/include/BLI_mmap.h +39 -0
  291. blenderui-0.1.0/core/include/BLI_multi_value_map.hh +173 -0
  292. blenderui-0.1.0/core/include/BLI_mutex.hh +51 -0
  293. blenderui-0.1.0/core/include/BLI_noise.h +138 -0
  294. blenderui-0.1.0/core/include/BLI_noise.hh +252 -0
  295. blenderui-0.1.0/core/include/BLI_offset_indices.hh +232 -0
  296. blenderui-0.1.0/core/include/BLI_offset_span.hh +113 -0
  297. blenderui-0.1.0/core/include/BLI_ordered_edge.hh +63 -0
  298. blenderui-0.1.0/core/include/BLI_parameter_pack_utils.hh +130 -0
  299. blenderui-0.1.0/core/include/BLI_path_utils.hh +802 -0
  300. blenderui-0.1.0/core/include/BLI_polyfill_2d.h +46 -0
  301. blenderui-0.1.0/core/include/BLI_polyfill_2d_beautify.h +65 -0
  302. blenderui-0.1.0/core/include/BLI_pool.hh +86 -0
  303. blenderui-0.1.0/core/include/BLI_probing_strategies.hh +232 -0
  304. blenderui-0.1.0/core/include/BLI_quadric.h +37 -0
  305. blenderui-0.1.0/core/include/BLI_radial_tiling.hh +24 -0
  306. blenderui-0.1.0/core/include/BLI_rand.h +101 -0
  307. blenderui-0.1.0/core/include/BLI_rand.hh +153 -0
  308. blenderui-0.1.0/core/include/BLI_random_access_iterator_mixin.hh +137 -0
  309. blenderui-0.1.0/core/include/BLI_rect.h +216 -0
  310. blenderui-0.1.0/core/include/BLI_resource_scope.hh +243 -0
  311. blenderui-0.1.0/core/include/BLI_scanfill.h +124 -0
  312. blenderui-0.1.0/core/include/BLI_serialize.hh +311 -0
  313. blenderui-0.1.0/core/include/BLI_session_uid.h +54 -0
  314. blenderui-0.1.0/core/include/BLI_set.hh +991 -0
  315. blenderui-0.1.0/core/include/BLI_set_slots.hh +378 -0
  316. blenderui-0.1.0/core/include/BLI_shared_cache.hh +112 -0
  317. blenderui-0.1.0/core/include/BLI_simd.hh +45 -0
  318. blenderui-0.1.0/core/include/BLI_smaa_textures.h +41 -0
  319. blenderui-0.1.0/core/include/BLI_sort.h +27 -0
  320. blenderui-0.1.0/core/include/BLI_sort.hh +34 -0
  321. blenderui-0.1.0/core/include/BLI_sort_utils.h +48 -0
  322. blenderui-0.1.0/core/include/BLI_span.hh +763 -0
  323. blenderui-0.1.0/core/include/BLI_stack.h +91 -0
  324. blenderui-0.1.0/core/include/BLI_stack.hh +415 -0
  325. blenderui-0.1.0/core/include/BLI_strict_flags.h +4 -0
  326. blenderui-0.1.0/core/include/BLI_string.h +701 -0
  327. blenderui-0.1.0/core/include/BLI_string_cursor_utf8.h +69 -0
  328. blenderui-0.1.0/core/include/BLI_string_ref.hh +681 -0
  329. blenderui-0.1.0/core/include/BLI_string_search.hh +144 -0
  330. blenderui-0.1.0/core/include/BLI_string_utf8.h +350 -0
  331. blenderui-0.1.0/core/include/BLI_string_utf8_symbols.h +87 -0
  332. blenderui-0.1.0/core/include/BLI_string_utils.hh +564 -0
  333. blenderui-0.1.0/core/include/BLI_sub_frame.hh +94 -0
  334. blenderui-0.1.0/core/include/BLI_subprocess.hh +157 -0
  335. blenderui-0.1.0/core/include/BLI_sys_types.h +67 -0
  336. blenderui-0.1.0/core/include/BLI_system.h +67 -0
  337. blenderui-0.1.0/core/include/BLI_task.h +32 -0
  338. blenderui-0.1.0/core/include/BLI_task.hh +256 -0
  339. blenderui-0.1.0/core/include/BLI_task_size_hints.hh +182 -0
  340. blenderui-0.1.0/core/include/BLI_tempfile.h +35 -0
  341. blenderui-0.1.0/core/include/BLI_threads.h +42 -0
  342. blenderui-0.1.0/core/include/BLI_time.h +37 -0
  343. blenderui-0.1.0/core/include/BLI_time_utildefines.h +115 -0
  344. blenderui-0.1.0/core/include/BLI_timecode.h +64 -0
  345. blenderui-0.1.0/core/include/BLI_timeit.hh +91 -0
  346. blenderui-0.1.0/core/include/BLI_timer.h +46 -0
  347. blenderui-0.1.0/core/include/BLI_unique_sorted_indices.hh +169 -0
  348. blenderui-0.1.0/core/include/BLI_unroll.hh +31 -0
  349. blenderui-0.1.0/core/include/BLI_ustring.hh +6 -0
  350. blenderui-0.1.0/core/include/BLI_utildefines.h +633 -0
  351. blenderui-0.1.0/core/include/BLI_utildefines_iter.h +36 -0
  352. blenderui-0.1.0/core/include/BLI_utildefines_stack.h +90 -0
  353. blenderui-0.1.0/core/include/BLI_utildefines_variadic.h +36 -0
  354. blenderui-0.1.0/core/include/BLI_utility_mixins.hh +43 -0
  355. blenderui-0.1.0/core/include/BLI_uuid.h +92 -0
  356. blenderui-0.1.0/core/include/BLI_vector.hh +1167 -0
  357. blenderui-0.1.0/core/include/BLI_vector_list.hh +303 -0
  358. blenderui-0.1.0/core/include/BLI_vector_set.hh +1164 -0
  359. blenderui-0.1.0/core/include/BLI_vector_set_slots.hh +147 -0
  360. blenderui-0.1.0/core/include/BLI_virtual_array.hh +1219 -0
  361. blenderui-0.1.0/core/include/BLI_virtual_array_fwd.hh +16 -0
  362. blenderui-0.1.0/core/include/BLI_virtual_vector_array.hh +83 -0
  363. blenderui-0.1.0/core/include/BLI_voxel.h +22 -0
  364. blenderui-0.1.0/core/include/BLI_winstuff.h +145 -0
  365. blenderui-0.1.0/core/include/BLI_winstuff_com.hh +42 -0
  366. blenderui-0.1.0/core/include/DNA_listBase.h +129 -0
  367. blenderui-0.1.0/core/include/MEM_guardedalloc.h +102 -0
  368. blenderui-0.1.0/core/include/UI_interface_types.hh +52 -0
  369. blenderui-0.1.0/core/include/fmt/format.h +29 -0
  370. blenderui-0.1.0/core/include/fmt/ranges.h +2 -0
  371. blenderui-0.1.0/core/intern/BLI_assert.c +55 -0
  372. blenderui-0.1.0/core/intern/BLI_dynstr.c +189 -0
  373. blenderui-0.1.0/core/intern/BLI_ghash.c +1229 -0
  374. blenderui-0.1.0/core/intern/BLI_ghash_utils.c +278 -0
  375. blenderui-0.1.0/core/intern/BLI_linklist.c +347 -0
  376. blenderui-0.1.0/core/intern/BLI_memarena.c +249 -0
  377. blenderui-0.1.0/core/intern/BLI_mempool.c +865 -0
  378. blenderui-0.1.0/core/intern/BLI_mempool_private.h +56 -0
  379. blenderui-0.1.0/core/intern/array_utils_c.c +375 -0
  380. blenderui-0.1.0/core/intern/atomic/CMakeLists.txt +39 -0
  381. blenderui-0.1.0/core/intern/atomic/atomic_ops.h +150 -0
  382. blenderui-0.1.0/core/intern/atomic/intern/atomic_ops_ext.h +248 -0
  383. blenderui-0.1.0/core/intern/atomic/intern/atomic_ops_msvc.h +284 -0
  384. blenderui-0.1.0/core/intern/atomic/intern/atomic_ops_unix.h +690 -0
  385. blenderui-0.1.0/core/intern/atomic/intern/atomic_ops_utils.h +131 -0
  386. blenderui-0.1.0/core/intern/atomic/tests/atomic_test.cc +1105 -0
  387. blenderui-0.1.0/core/intern/bui_c_compat.h +30 -0
  388. blenderui-0.1.0/core/intern/bui_eigen_shim.h +17 -0
  389. blenderui-0.1.0/core/intern/bui_system_stubs.c +53 -0
  390. blenderui-0.1.0/core/intern/bui_threads.c +65 -0
  391. blenderui-0.1.0/core/intern/endian_switch.c +92 -0
  392. blenderui-0.1.0/core/intern/fnmatch.c +239 -0
  393. blenderui-0.1.0/core/intern/gsqueue.c +179 -0
  394. blenderui-0.1.0/core/intern/guardedalloc.c +133 -0
  395. blenderui-0.1.0/core/intern/hash_mm2.c +47 -0
  396. blenderui-0.1.0/core/intern/hash_mm3.c +132 -0
  397. blenderui-0.1.0/core/intern/list_sort_impl.h +321 -0
  398. blenderui-0.1.0/core/intern/listbase.c +955 -0
  399. blenderui-0.1.0/core/intern/math_base.c +83 -0
  400. blenderui-0.1.0/core/intern/math_base_inline.c +651 -0
  401. blenderui-0.1.0/core/intern/math_base_safe_inline.c +66 -0
  402. blenderui-0.1.0/core/intern/math_bits_inline.c +184 -0
  403. blenderui-0.1.0/core/intern/math_color.c +839 -0
  404. blenderui-0.1.0/core/intern/math_color_blend_inline.c +1133 -0
  405. blenderui-0.1.0/core/intern/math_color_inline.c +355 -0
  406. blenderui-0.1.0/core/intern/math_geom.c +5641 -0
  407. blenderui-0.1.0/core/intern/math_geom_inline.c +167 -0
  408. blenderui-0.1.0/core/intern/math_matrix_c.c +2973 -0
  409. blenderui-0.1.0/core/intern/math_rotation_c.c +2474 -0
  410. blenderui-0.1.0/core/intern/math_vector.c +1051 -0
  411. blenderui-0.1.0/core/intern/math_vector_inline.c +1073 -0
  412. blenderui-0.1.0/core/intern/matrix_invert.c +62 -0
  413. blenderui-0.1.0/core/intern/porting/string_utils.cc +665 -0
  414. blenderui-0.1.0/core/intern/rct.c +1200 -0
  415. blenderui-0.1.0/core/intern/sort_utils.c +86 -0
  416. blenderui-0.1.0/core/intern/stack.c +268 -0
  417. blenderui-0.1.0/core/intern/string.c +1337 -0
  418. blenderui-0.1.0/core/intern/string_cursor_utf8.c +429 -0
  419. blenderui-0.1.0/core/intern/string_utf8.c +1505 -0
  420. blenderui-0.1.0/core/intern/svd_m3.c +99 -0
  421. blenderui-0.1.0/core/intern/wcwidth/CMakeLists.txt +23 -0
  422. blenderui-0.1.0/core/intern/wcwidth/README.blender +8 -0
  423. blenderui-0.1.0/core/intern/wcwidth/wcwidth.c +309 -0
  424. blenderui-0.1.0/core/intern/wcwidth/wcwidth.h +46 -0
  425. blenderui-0.1.0/core/tests/CMakeLists.txt +14 -0
  426. blenderui-0.1.0/core/tests/test_core.c +176 -0
  427. blenderui-0.1.0/docs/c-api.md +99 -0
  428. blenderui-0.1.0/docs/components.md +216 -0
  429. blenderui-0.1.0/docs/getting-started.md +104 -0
  430. blenderui-0.1.0/docs/images/components.png +0 -0
  431. blenderui-0.1.0/docs/images/qt.png +0 -0
  432. blenderui-0.1.0/docs/images/tkinter_canvas.png +0 -0
  433. blenderui-0.1.0/docs/images/tkinter_items.png +0 -0
  434. blenderui-0.1.0/docs/images/tkinter_messagebox.png +0 -0
  435. blenderui-0.1.0/docs/images/tkinter_notes.png +0 -0
  436. blenderui-0.1.0/docs/publishing.md +96 -0
  437. blenderui-0.1.0/docs/qt.md +145 -0
  438. blenderui-0.1.0/docs/tkinter.md +227 -0
  439. blenderui-0.1.0/examples/CMakeLists.txt +11 -0
  440. blenderui-0.1.0/examples/components_demo.py +293 -0
  441. blenderui-0.1.0/examples/kit_hello.c +60 -0
  442. blenderui-0.1.0/examples/python_demo.py +50 -0
  443. blenderui-0.1.0/examples/qt_syntax_demo.py +89 -0
  444. blenderui-0.1.0/examples/svg_demo.c +143 -0
  445. blenderui-0.1.0/examples/tk_syntax_demo.py +92 -0
  446. blenderui-0.1.0/examples/tk_unchanged_app.py +104 -0
  447. blenderui-0.1.0/gpu/CMakeLists.txt +27 -0
  448. blenderui-0.1.0/gpu/include/GPU_backend_sink.h +56 -0
  449. blenderui-0.1.0/gpu/include/GPU_batch.hh +230 -0
  450. blenderui-0.1.0/gpu/include/GPU_batch_presets.hh +6 -0
  451. blenderui-0.1.0/gpu/include/GPU_framebuffer.hh +6 -0
  452. blenderui-0.1.0/gpu/include/GPU_immediate.hh +67 -0
  453. blenderui-0.1.0/gpu/include/GPU_immediate_util.hh +64 -0
  454. blenderui-0.1.0/gpu/include/GPU_index_buffer.hh +6 -0
  455. blenderui-0.1.0/gpu/include/GPU_matrix.hh +30 -0
  456. blenderui-0.1.0/gpu/include/GPU_raster.h +185 -0
  457. blenderui-0.1.0/gpu/include/GPU_shader_shared.hh +19 -0
  458. blenderui-0.1.0/gpu/include/GPU_state.hh +52 -0
  459. blenderui-0.1.0/gpu/include/GPU_uniform_buffer.hh +18 -0
  460. blenderui-0.1.0/gpu/include/GPU_vertbuf.hh +6 -0
  461. blenderui-0.1.0/gpu/include/GPU_vertex_format.hh +6 -0
  462. blenderui-0.1.0/gpu/intern/gpu_null.c +810 -0
  463. blenderui-0.1.0/gpu/intern/gpu_raster.c +1730 -0
  464. blenderui-0.1.0/kit/CMakeLists.txt +30 -0
  465. blenderui-0.1.0/kit/include/BUI_kit.h +350 -0
  466. blenderui-0.1.0/kit/intern/kit_color.c +1371 -0
  467. blenderui-0.1.0/kit/intern/kit_core.c +3318 -0
  468. blenderui-0.1.0/kit/intern/kit_draw.c +1376 -0
  469. blenderui-0.1.0/kit/intern/kit_frame.c +1030 -0
  470. blenderui-0.1.0/kit/intern/kit_icons_data.c +590 -0
  471. blenderui-0.1.0/kit/intern/kit_icons_data.h +29 -0
  472. blenderui-0.1.0/kit/intern/kit_intern.h +535 -0
  473. blenderui-0.1.0/kit/intern/kit_menus.c +969 -0
  474. blenderui-0.1.0/kit/intern/kit_textarea.c +612 -0
  475. blenderui-0.1.0/kit/intern/kit_views.c +1288 -0
  476. blenderui-0.1.0/kit/intern/kit_widgets.c +2844 -0
  477. blenderui-0.1.0/kit/intern/kit_window.c +868 -0
  478. blenderui-0.1.0/pyproject.toml +73 -0
  479. blenderui-0.1.0/tools/extract_api.py +93 -0
  480. blenderui-0.1.0/tools/gen_doc_images.py +70 -0
  481. blenderui-0.1.0/tools/gen_kit_icons.py +117 -0
  482. blenderui-0.1.0/tools/kit_icons_src.py +613 -0
  483. blenderui-0.1.0/types/CMakeLists.txt +17 -0
  484. blenderui-0.1.0/types/dna/include/DNA_ID.h +1394 -0
  485. blenderui-0.1.0/types/dna/include/DNA_ID_enums.h +187 -0
  486. blenderui-0.1.0/types/dna/include/DNA_action_types.h +1373 -0
  487. blenderui-0.1.0/types/dna/include/DNA_anim_enums.h +584 -0
  488. blenderui-0.1.0/types/dna/include/DNA_anim_types.h +765 -0
  489. blenderui-0.1.0/types/dna/include/DNA_armature_types.h +598 -0
  490. blenderui-0.1.0/types/dna/include/DNA_asset_types.h +206 -0
  491. blenderui-0.1.0/types/dna/include/DNA_attribute_types.h +74 -0
  492. blenderui-0.1.0/types/dna/include/DNA_boid_types.h +164 -0
  493. blenderui-0.1.0/types/dna/include/DNA_brush_enums.h +596 -0
  494. blenderui-0.1.0/types/dna/include/DNA_brush_types.h +503 -0
  495. blenderui-0.1.0/types/dna/include/DNA_cachefile_types.h +118 -0
  496. blenderui-0.1.0/types/dna/include/DNA_camera_types.h +268 -0
  497. blenderui-0.1.0/types/dna/include/DNA_cloth_types.h +250 -0
  498. blenderui-0.1.0/types/dna/include/DNA_collection_types.h +201 -0
  499. blenderui-0.1.0/types/dna/include/DNA_color_types.h +242 -0
  500. blenderui-0.1.0/types/dna/include/DNA_colorband_types.h +79 -0
  501. blenderui-0.1.0/types/dna/include/DNA_constraint_types.h +1180 -0
  502. blenderui-0.1.0/types/dna/include/DNA_curve_enums.h +263 -0
  503. blenderui-0.1.0/types/dna/include/DNA_curve_types.h +427 -0
  504. blenderui-0.1.0/types/dna/include/DNA_curveprofile_types.h +85 -0
  505. blenderui-0.1.0/types/dna/include/DNA_curves_types.h +253 -0
  506. blenderui-0.1.0/types/dna/include/DNA_customdata_types.h +268 -0
  507. blenderui-0.1.0/types/dna/include/DNA_defs.h +171 -0
  508. blenderui-0.1.0/types/dna/include/DNA_documentation.h +67 -0
  509. blenderui-0.1.0/types/dna/include/DNA_dynamicpaint_types.h +248 -0
  510. blenderui-0.1.0/types/dna/include/DNA_effect_types.h +141 -0
  511. blenderui-0.1.0/types/dna/include/DNA_fileglobal_types.h +52 -0
  512. blenderui-0.1.0/types/dna/include/DNA_fluid_types.h +858 -0
  513. blenderui-0.1.0/types/dna/include/DNA_freestyle_types.h +136 -0
  514. blenderui-0.1.0/types/dna/include/DNA_genfile.h +244 -0
  515. blenderui-0.1.0/types/dna/include/DNA_gpencil_legacy_types.h +796 -0
  516. blenderui-0.1.0/types/dna/include/DNA_gpencil_modifier_types.h +1225 -0
  517. blenderui-0.1.0/types/dna/include/DNA_gpu_types.h +27 -0
  518. blenderui-0.1.0/types/dna/include/DNA_grease_pencil_types.h +741 -0
  519. blenderui-0.1.0/types/dna/include/DNA_image_types.h +266 -0
  520. blenderui-0.1.0/types/dna/include/DNA_key_types.h +155 -0
  521. blenderui-0.1.0/types/dna/include/DNA_lattice_types.h +89 -0
  522. blenderui-0.1.0/types/dna/include/DNA_layer_types.h +284 -0
  523. blenderui-0.1.0/types/dna/include/DNA_light_types.h +172 -0
  524. blenderui-0.1.0/types/dna/include/DNA_lightprobe_types.h +371 -0
  525. blenderui-0.1.0/types/dna/include/DNA_lineart_types.h +78 -0
  526. blenderui-0.1.0/types/dna/include/DNA_linestyle_types.h +688 -0
  527. blenderui-0.1.0/types/dna/include/DNA_listBase.h +109 -0
  528. blenderui-0.1.0/types/dna/include/DNA_mask_types.h +275 -0
  529. blenderui-0.1.0/types/dna/include/DNA_material_types.h +453 -0
  530. blenderui-0.1.0/types/dna/include/DNA_mesh_types.h +588 -0
  531. blenderui-0.1.0/types/dna/include/DNA_meshdata_types.h +449 -0
  532. blenderui-0.1.0/types/dna/include/DNA_meta_types.h +134 -0
  533. blenderui-0.1.0/types/dna/include/DNA_modifier_enums.h +339 -0
  534. blenderui-0.1.0/types/dna/include/DNA_modifier_types.h +3579 -0
  535. blenderui-0.1.0/types/dna/include/DNA_movieclip_types.h +203 -0
  536. blenderui-0.1.0/types/dna/include/DNA_nla_types.h +97 -0
  537. blenderui-0.1.0/types/dna/include/DNA_node_tree_interface_types.h +513 -0
  538. blenderui-0.1.0/types/dna/include/DNA_node_types.h +3980 -0
  539. blenderui-0.1.0/types/dna/include/DNA_object_enums.h +66 -0
  540. blenderui-0.1.0/types/dna/include/DNA_object_fluidsim_types.h +139 -0
  541. blenderui-0.1.0/types/dna/include/DNA_object_force_types.h +408 -0
  542. blenderui-0.1.0/types/dna/include/DNA_object_types.h +772 -0
  543. blenderui-0.1.0/types/dna/include/DNA_outliner_types.h +139 -0
  544. blenderui-0.1.0/types/dna/include/DNA_packedFile_types.h +27 -0
  545. blenderui-0.1.0/types/dna/include/DNA_particle_types.h +768 -0
  546. blenderui-0.1.0/types/dna/include/DNA_pointcache_types.h +168 -0
  547. blenderui-0.1.0/types/dna/include/DNA_pointcloud_types.h +102 -0
  548. blenderui-0.1.0/types/dna/include/DNA_rigidbody_types.h +361 -0
  549. blenderui-0.1.0/types/dna/include/DNA_scene_enums.h +239 -0
  550. blenderui-0.1.0/types/dna/include/DNA_scene_types.h +2955 -0
  551. blenderui-0.1.0/types/dna/include/DNA_screen_types.h +934 -0
  552. blenderui-0.1.0/types/dna/include/DNA_sdna_types.h +148 -0
  553. blenderui-0.1.0/types/dna/include/DNA_sequence_types.h +1020 -0
  554. blenderui-0.1.0/types/dna/include/DNA_session_uid_types.h +30 -0
  555. blenderui-0.1.0/types/dna/include/DNA_shader_fx_types.h +240 -0
  556. blenderui-0.1.0/types/dna/include/DNA_sound_types.h +71 -0
  557. blenderui-0.1.0/types/dna/include/DNA_space_enums.h +1151 -0
  558. blenderui-0.1.0/types/dna/include/DNA_space_types.h +1300 -0
  559. blenderui-0.1.0/types/dna/include/DNA_speaker_types.h +60 -0
  560. blenderui-0.1.0/types/dna/include/DNA_text_types.h +81 -0
  561. blenderui-0.1.0/types/dna/include/DNA_texture_types.h +442 -0
  562. blenderui-0.1.0/types/dna/include/DNA_theme_types.h +572 -0
  563. blenderui-0.1.0/types/dna/include/DNA_tracking_types.h +601 -0
  564. blenderui-0.1.0/types/dna/include/DNA_userdef_enums.h +57 -0
  565. blenderui-0.1.0/types/dna/include/DNA_userdef_types.h +1247 -0
  566. blenderui-0.1.0/types/dna/include/DNA_uuid_types.h +35 -0
  567. blenderui-0.1.0/types/dna/include/DNA_vec_defaults.h +40 -0
  568. blenderui-0.1.0/types/dna/include/DNA_vec_types.h +149 -0
  569. blenderui-0.1.0/types/dna/include/DNA_vfont_types.h +41 -0
  570. blenderui-0.1.0/types/dna/include/DNA_view2d_types.h +191 -0
  571. blenderui-0.1.0/types/dna/include/DNA_view3d_enums.h +53 -0
  572. blenderui-0.1.0/types/dna/include/DNA_view3d_types.h +806 -0
  573. blenderui-0.1.0/types/dna/include/DNA_viewer_path_types.h +96 -0
  574. blenderui-0.1.0/types/dna/include/DNA_volume_types.h +162 -0
  575. blenderui-0.1.0/types/dna/include/DNA_windowmanager_enums.h +75 -0
  576. blenderui-0.1.0/types/dna/include/DNA_windowmanager_types.h +511 -0
  577. blenderui-0.1.0/types/dna/include/DNA_workspace_types.h +251 -0
  578. blenderui-0.1.0/types/dna/include/DNA_world_types.h +150 -0
  579. blenderui-0.1.0/types/dna/include/DNA_xr_types.h +216 -0
  580. blenderui-0.1.0/ui/CMakeLists.txt +56 -0
  581. blenderui-0.1.0/ui/include/UI_abstract_view.hh +462 -0
  582. blenderui-0.1.0/ui/include/UI_grid_view.hh +257 -0
  583. blenderui-0.1.0/ui/include/UI_icons.hh +1186 -0
  584. blenderui-0.1.0/ui/include/UI_interface.hh +291 -0
  585. blenderui-0.1.0/ui/include/UI_interface_c.hh +3170 -0
  586. blenderui-0.1.0/ui/include/UI_interface_icons.hh +126 -0
  587. blenderui-0.1.0/ui/include/UI_interface_layout.hh +1027 -0
  588. blenderui-0.1.0/ui/include/UI_interface_types.hh +62 -0
  589. blenderui-0.1.0/ui/include/UI_resources.hh +534 -0
  590. blenderui-0.1.0/ui/include/UI_string_search.hh +38 -0
  591. blenderui-0.1.0/ui/include/UI_tree_view.hh +485 -0
  592. blenderui-0.1.0/ui/include/UI_view2d.hh +612 -0
  593. blenderui-0.1.0/ui/intern/abstract_view.cc +266 -0
  594. blenderui-0.1.0/ui/intern/abstract_view_item.cc +489 -0
  595. blenderui-0.1.0/ui/intern/interface_align.cc +509 -0
  596. blenderui-0.1.0/ui/intern/interface_button_group.cc +54 -0
  597. blenderui-0.1.0/ui/intern/interface_button_sections.cc +253 -0
  598. blenderui-0.1.0/ui/intern/interface_context_path.cc +84 -0
  599. blenderui-0.1.0/ui/intern/interface_drag.cc +135 -0
  600. blenderui-0.1.0/ui/intern/interface_draw.cc +2586 -0
  601. blenderui-0.1.0/ui/intern/interface_drop.cc +95 -0
  602. blenderui-0.1.0/ui/intern/interface_intern.hh +1823 -0
  603. blenderui-0.1.0/ui/intern/interface_query.cc +904 -0
  604. blenderui-0.1.0/ui/intern/interface_region_popup.cc +1193 -0
  605. blenderui-0.1.0/ui/intern/interface_region_search.cc +1262 -0
  606. blenderui-0.1.0/ui/intern/interface_regions_intern.hh +33 -0
  607. blenderui-0.1.0/ui/intern/interface_string_search.cc +118 -0
  608. blenderui-0.1.0/ui/intern/interface_style.cc +616 -0
  609. blenderui-0.1.0/ui/intern/interface_textbox.cc +316 -0
  610. blenderui-0.1.0/ui/intern/interface_textbox.hh +64 -0
  611. blenderui-0.1.0/ui/intern/interface_utils.cc +1020 -0
  612. blenderui-0.1.0/ui/intern/interface_widgets.cc +6359 -0
  613. blenderui-0.1.0/ui/intern/resources.cc +1615 -0
  614. blenderui-0.1.0/ui/intern/view2d.cc +2198 -0
  615. blenderui-0.1.0/ui/intern/view2d_edge_pan.cc +397 -0
  616. blenderui-0.1.0/ui/intern/view2d_intern.hh +50 -0
@@ -0,0 +1,11 @@
1
+ build*/
2
+ build-ui/
3
+ *.obj
4
+ *.o
5
+ reference/
6
+
7
+ # packaging
8
+ dist/
9
+ wheelhouse/
10
+ *.egg-info/
11
+ *.whl
@@ -0,0 +1,120 @@
1
+ # BUI Architecture
2
+
3
+ BUI is a decoupled UI toolkit extracted from the Blender project
4
+ (`source/blender/editors/interface` and its support layers). It contains **only**
5
+ reusable interface machinery — no Blender application logic (no scene graph,
6
+ depsgraph, nodes, operators-on-datablocks, file loading, Python).
7
+
8
+ ```
9
+ ┌──────────────────────────────────────────────────────────────────┐
10
+ │ ui/ widget toolkit: blocks/buttons, layout engine, │
11
+ │ widget drawing, handlers, views, view2d │
12
+ └──────┬───────────────┬──────────────┬─────────────┬──────────────┘
13
+ │ │ │ │
14
+ ┌──────▼──────┐ ┌──────▼──────┐ ┌─────▼──────────┐ ┌▼──────────────────┐
15
+ │ types/ │ │ gpu/ │ │ compat/ │ │ api/ stable C │
16
+ │ DNA data │ │ draw seam │ │ RNA / CTX / WM │ │ ABI for hosts │
17
+ │ shapes │ │ (null back- │ │ / ED / BLF / │ │ & bindings │
18
+ │ (verbatim) │ │ end + sink │ │ IMB seams │ └───┬─────────┬─────┘
19
+ │ │ │ dispatch) │ │ (stubs & hooks)│ │ │
20
+ └──────┬──────┘ └──────┬──────┘ └─────┬──────────┘ ┌───▼───┐ ┌───▼──────┐
21
+ │ │ │ │buipy │ │bui_qt │
22
+ │ │ │ │Python │ │QPainter │
23
+ │ │ │ │binding│ │backend │
24
+ ┌──────▼───────────────▼──────────────▼──────────┐└───────┘ └──────────┘
25
+ │ core/ pure C11 foundation extracted from blenlib │
26
+ │ listbase · ghash · mempool · memarena · dynstr │
27
+ │ math (vec/mat/rot/color/geom) · strings · rct │
28
+ │ guarded-allocator shim · threads stubs │
29
+ └────────────────────────────────────────────────────────────────┘
30
+ ```
31
+
32
+ Dependency rule: arrows point downward only. `ui/` never includes Blender
33
+ application code; everything it needs arrives through `types/`, `gpu/`, or
34
+ `compat/`.
35
+
36
+ ## Modules
37
+
38
+ | Module | Contents | Status |
39
+ |---|---|---|
40
+ | `core/` | C11 subset of blenlib, de-C++ified with mechanical transforms (namespaces stripped, casts normalized, MEM API mapped). Inline math lives in `include/intern/*.c` included by headers (`MINLINE` = `static inline` in C). | **Builds + tested** |
41
+ | `types/` | Verbatim `DNA_*_types.h` struct definitions. `DNA_listBase.h` aliases `blender::{Link,LinkData,ListBase}` onto the core's C structs so DNA structs and the C listbase API share one type. | **Builds** |
42
+ | `gpu/` | The draw surface used by the toolkit (`GPU_*`, `imm*`) behind seam headers + a null backend that *records and forwards*: with a sink installed it emits screen-space primitives (`GPU_backend_sink.h`); without one it discards them. Theme colors reach the GPU layer through function-pointer hooks. | **Builds + tested** |
43
+ | `compat/` | Seam headers carrying upstream API names (`RNA_access.hh`, `BLF_api.hh`, …) with BUI-owned opaque types and stub implementations (`intern/bui_stubs.cc`). | **Builds** |
44
+ | `ui/` | The toolkit sources from `editors/interface`: interface.cc family, widgets, handlers, regions, view2d, views, textbox. Option-gated (`-DBUI_BUILD_UI=ON`). | **Compiles + links** |
45
+ | `kit/` | Blender's UI as a retained-mode C runtime: node tree, uiLayout-style layout, `interface_handlers.cc` interaction rules, widget drawing ported from `interface_widgets.cc` (widget-base shader parameters rendered by `gpu/` raster), menus, color picker, views, editors; Tk-style pack/grid/place geometry managers, canvas display list, multi-line text area; UI undo/redo, Tab field traversal, vertical multi-drag, panel animation; damage-driven rendering; native Win32 window host (`kit_window.c`). C API: `kit/include/BUI_kit.h`. | **Builds + tested** |
46
+ | `api/` | `bui_c_api.h` — small stable C ABI: version info + sink/viewport plumbing for hosts and bindings. | **Builds + tested** |
47
+ | `bindings/python/` | `buipy` CPython extension (no third-party deps) + `bui` package: `bui.components` (Blender component library), `bui.qtsyntax` / `bui.tksyntax` (Qt / tkinter APIs as thin facades over the kit), `bui.host` (native or Tk windows), `SvgSink` headless renderer, `bui.qt.BuiCanvas` PySide6/PyQt6 widget. | **Builds + tested** |
48
+ | `backends/qt/` | C++ Qt backend: `BUI::QtSink` (BuiGpuSink → QPainter) + `BUI::BuiWidget` (QWidget host, no moc needed). Gate: `-DBUI_BUILD_QT_BACKEND=ON`. | **Shipped** (builds where Qt exists) |
49
+ | `examples/` | `bui_svg_demo.c` (C, sink → SVG), `python_demo.py` (buipy → SVG). | **Builds + run** |
50
+
51
+ ## Render-sink dispatch
52
+
53
+ The null backend is the integration seam. `gpu/include/GPU_backend_sink.h`
54
+ defines `BuiGpuSink` — a function-pointer table (`triangles`, `lines`,
55
+ `points`, `text`, `scissor`, `begin_frame`, `end_frame`). The null backend:
56
+
57
+ - records immediate-mode vertices (`immBegin/immAttr*/immVertex*/immEnd`),
58
+ - decodes vertex batches (pos/color attributes, index buffers),
59
+ - applies the model matrix and forwards screen-space primitives to the sink,
60
+ - or, with no sink installed, discards everything (pure null).
61
+
62
+ Real renderers plug in at three levels: C (`bui_set_render_sink`), Qt/C++
63
+ (`BUI::QtSink`), Python (`buipy.set_backend`). See INTEGRATION.md.
64
+
65
+ ## Build
66
+
67
+ ```sh
68
+ cmake -S . -B build -G "MinGW Makefiles" # or any generator
69
+ cmake --build build
70
+ ctest --test-dir build # core tests + buipy tests
71
+ cmake -S . -B build-ui -DBUI_BUILD_UI=ON -DBUI_BUILD_EXAMPLES=ON
72
+ cmake --build build-ui # + widget toolkit (bui_ui)
73
+ ```
74
+
75
+ Options: `BUI_BUILD_PYTHON_BINDINGS` (ON; auto-skips without Python dev
76
+ files), `BUI_BUILD_QT_BACKEND` (OFF; needs Qt5/Qt6 Widgets),
77
+ `BUI_BUILD_EXAMPLES`, `BUI_BUILD_TESTS`.
78
+
79
+ Windows note: the toolchain must resolve MinGW runtime DLLs from
80
+ `/c/msys64/ucrt64/bin` **before** `/mingw64/bin` or other vendors' paths
81
+ (cc1.exe loads zlib1/gmp from PATH). If builds fail silently, prepend the
82
+ ucrt64 dir: `export PATH="/c/msys64/ucrt64/bin:$PATH"`.
83
+
84
+ ## Decoupling inventory (what was cut, what remains)
85
+
86
+ Cut entirely (Blender application logic): scene/mesh/node/depsgraph/modifiers,
87
+ animrig (only the DNA structs + a minimal `animrig::Slot` wrapper remain),
88
+ asset system, sequencer, render, Python-in-Blender, file I/O (BLO),
89
+ eyedroppers, app-specific UI templates, window manager backends (GHOST),
90
+ operator system.
91
+
92
+ Remaining seams before a *hosted* toolkit (real widgets on screen) works —
93
+ call-site counts measured from the copied sources:
94
+
95
+ | Seam | Touchpoints | Notes |
96
+ |---|---|---|
97
+ | WM (events/operators/keymaps) | ~183 | Needs lite `wmEvent`/`wmOperator` structs + handler plumbing in `compat/` |
98
+ | ED (screen/region services) | ~120 | Region redraw tagging, area/region lookup — small BUI-owned implementations |
99
+ | CTX (context) | ~46 | Minimal `bContext` replacement |
100
+ | BLF (fonts) | ~45 | Text measurement/draw hook; null impl first |
101
+ | IMB (images/icons) | ~23 | Icon texture registration hook |
102
+ | RNA (properties) | ~16 entry points | Opaque `PropertyRNA` + accessor vtable |
103
+
104
+ These seams block *widget-tree hosting* (creating blocks/buttons driven by
105
+ events), not compilation: all five libraries — `bui_core`, `bui_gpu`,
106
+ `bui_compat`, `bui_api`, `bui_ui` — build and link cleanly today, and the
107
+ render pipeline is exercisable end-to-end through the sink (see
108
+ `examples/`).
109
+
110
+ ## Porting notes
111
+
112
+ - Upstream files keep their names and SPDX headers (GPL-2.0-or-later). The
113
+ mechanical de-C++ pass is intentionally boring so future syncs stay easy.
114
+ - `core/include/fmt/*` is a declaration-level stand-in for the external {fmt}
115
+ library; swap for real {fmt} if you need formatted strings.
116
+ - `MEM_guardedalloc.h` is a plain-malloc shim with the upstream C++ template
117
+ surface (`MEM_new<T>`, `MEM_new_zeroed<T>`, `MEM_new_array_uninitialized<T>`,
118
+ `MEM_delete<T>`, `MEM_SAFE_DELETE`).
119
+ - `GPU_batch.hh` carries a layout contract: the first four members of
120
+ `blender::gpu::VertBuf` must match `GPUVertBufInternal` in `gpu_null.c`.
@@ -0,0 +1,31 @@
1
+ # Changelog
2
+
3
+ All notable changes to **blenderui** (BUI). The format follows
4
+ [Keep a Changelog](https://keepachangelog.com); versions follow
5
+ [Semantic Versioning](https://semver.org).
6
+
7
+ ## [Unreleased]
8
+
9
+ ## [0.1.0] - first release
10
+
11
+ ### Added
12
+ - **C kit** (`kit/`): Blender's UI as a C runtime. It has the node tree,
13
+ Tk's packer and gridder in C, input and interaction (hover, drag grabs,
14
+ continuous cursor, menus, tooltips), widget drawing ported from Blender's
15
+ `interface_widgets.cc`, and damage-driven raster rendering. Also: undo and
16
+ redo, animation, the text area, canvas, scroll views, scrollbars and
17
+ multi-select.
18
+ - **Native window host** for Windows (Win32): DPI-aware, vsync'd
19
+ animation, clipboard, cursors, window-manager features. Other platforms use
20
+ a stdlib-Tk-hosted window.
21
+ - **`bui.tksyntax`**: the complete tkinter API (7846/7846 public names of
22
+ the tkinter and ttk classes), plus `ttk`, `messagebox`, `filedialog`,
23
+ `simpledialog`, `colorchooser`, `font` and `scrolledtext`. Run existing apps
24
+ unchanged with `python -m bui.tksyntax app.py`, `blenderui-tk app.py` or
25
+ `install()`.
26
+ - **`bui.qtsyntax`**: a Qt-style API subset (widgets, layouts, signals,
27
+ `QPainter`, menus, timers).
28
+ - **`bui.components`**: 45 Blender components (layouts, values, views,
29
+ menus, pie menus, the color picker, editors, templates).
30
+ - Packaging as `blenderui` (scikit-build-core), with `import blenderui` as
31
+ an alias of `bui`.
@@ -0,0 +1,69 @@
1
+ # BUI - Blender-derived UI toolkit
2
+ #
3
+ # A decoupled UI library extracted from the Blender project.
4
+ # The application-specific layers (scene, nodes, depsgraph, operators on
5
+ # datablocks...) are NOT part of this library. Only reusable interface
6
+ # machinery lives here: core containers/math (C), UI types, drawing
7
+ # abstraction, and the widget toolkit.
8
+ #
9
+ # SPDX-License-Identifier: GPL-2.0-or-later
10
+
11
+ cmake_minimum_required(VERSION 3.20)
12
+
13
+ # One version for the C library, the Python package and the PyPI wheel.
14
+ file(STRINGS "${CMAKE_CURRENT_SOURCE_DIR}/bindings/python/bui/_version.py" _bui_version_line
15
+ REGEX "^__version__")
16
+ string(REGEX MATCH "[0-9]+[.][0-9]+[.][0-9]+" BUI_VERSION "${_bui_version_line}")
17
+ project(bui LANGUAGES C CXX VERSION ${BUI_VERSION})
18
+
19
+ option(BUI_BUILD_TESTS "Build BUI test executables" ON)
20
+ option(BUI_BUILD_EXAMPLES "Build BUI example applications" OFF)
21
+ option(BUI_WARNINGS_AS_ERRORS "Treat compiler warnings as errors" OFF)
22
+ option(BUI_BUILD_PYTHON_BINDINGS "Build the buipy CPython bindings (needs Python3 dev files)" ON)
23
+ option(BUI_BUILD_QT_BACKEND "Build the Qt/QPainter backend (needs Qt5/Qt6 with Widgets)" OFF)
24
+
25
+ if(NOT CMAKE_BUILD_TYPE)
26
+ set(CMAKE_BUILD_TYPE Release)
27
+ endif()
28
+
29
+ set(CMAKE_C_STANDARD 11)
30
+ set(CMAKE_C_STANDARD_REQUIRED ON)
31
+ set(CMAKE_CXX_STANDARD 20)
32
+ set(CMAKE_CXX_STANDARD_REQUIRED ON)
33
+
34
+ if(MSVC)
35
+ add_compile_options(/W3)
36
+ else()
37
+ add_compile_options(-Wall -Wno-unused-parameter -Wno-missing-field-initializers)
38
+ if(NOT BUI_WARNINGS_AS_ERRORS)
39
+ add_compile_options(-Wno-error)
40
+ endif()
41
+ endif()
42
+
43
+ set(BUI_SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR})
44
+
45
+ # Dependency order matters: each layer may only use layers above it in this list.
46
+ add_subdirectory(core) # pure C foundation
47
+ add_subdirectory(types) # BUI-owned shared data types
48
+ add_subdirectory(gpu) # draw abstraction (null backend + sink dispatch)
49
+ add_subdirectory(compat) # seam headers/stubs replacing Blender-app APIs
50
+ add_subdirectory(ui) # the widget toolkit
51
+ add_subdirectory(kit) # Blender UI runtime in C (widgets, input, damage rendering)
52
+ add_subdirectory(api) # stable C ABI for hosts & bindings
53
+
54
+ if(BUI_BUILD_TESTS)
55
+ enable_testing()
56
+ add_subdirectory(core/tests)
57
+ endif()
58
+
59
+ if(BUI_BUILD_PYTHON_BINDINGS)
60
+ add_subdirectory(bindings/python)
61
+ endif()
62
+
63
+ if(BUI_BUILD_QT_BACKEND)
64
+ add_subdirectory(backends/qt)
65
+ endif()
66
+
67
+ if(BUI_BUILD_EXAMPLES)
68
+ add_subdirectory(examples)
69
+ endif()
@@ -0,0 +1,234 @@
1
+ # Host integration guide
2
+
3
+ > **High-level syntax layers (recommended):** you may not need any of the
4
+ > plumbing below. `bindings/python` ships two application-facing APIs that
5
+ > render through BUI — **Qt syntax** (`bui.qtsyntax`) and **tkinter syntax**
6
+ > (`bui.tksyntax`). See "High-level syntax layers" at the bottom, and
7
+ > "Testing the Python bindings" for the one setup step they need.
8
+
9
+ BUI draws; you present. The toolkit never opens a window, creates a GL
10
+ context, or picks a UI framework. Instead, every draw call funnels through the
11
+ **GPU seam** into a render **sink** you install. This document covers the
12
+ three supported paths: plain C/C++, Qt (C++), and Python (PySide6/PyQt6 or
13
+ headless).
14
+
15
+ ```
16
+ ┌────────────────────────┐
17
+ your host │ sink (BuiGpuSink) │
18
+ ┌────────────────┐ │ triangles() │ renderer
19
+ │ ui toolkit ────┼─┼─▶ lines() ────────────┼──▶ Qt QPainter /
20
+ │ (bui_ui) │ │ points() │ PySide6 QPainter /
21
+ │ gpu seam │ │ text() scissor() │ OpenGL / SVG / console
22
+ │ (gpu_null.c) │ │ begin/end_frame() │ — anything
23
+ └────────────────┘ └────────────────────────┘
24
+ ```
25
+
26
+ ## 1. Plain C / C++
27
+
28
+ ```c
29
+ #include "bui_c_api.h"
30
+
31
+ static void my_triangles(void *user, const float (*coords)[2],
32
+ const float (*colors)[4], int count) {
33
+ /* rasterize / record / forward `count` vertices */
34
+ }
35
+
36
+ BuiGpuSink sink = {0};
37
+ sink.user = my_renderer_state;
38
+ sink.triangles = my_triangles;
39
+ /* sink.lines, sink.points, sink.text, sink.scissor,
40
+ sink.begin_frame, sink.end_frame are optional */
41
+ bui_set_render_sink(&sink);
42
+
43
+ bui_set_viewport(1280, 720); /* pixels */
44
+ /* ... drive BUI drawing ... */
45
+ bui_set_render_sink(NULL); /* restore the discarding backend */
46
+ ```
47
+
48
+ The coordinate contract: 2D positions transformed by the current model matrix
49
+ (identity matrices → pixel coordinates), colors as RGBA floats 0..1.
50
+
51
+ A complete minimal example is `examples/svg_demo.c` — it installs an SVG
52
+ recorder and draws through the immediate-mode seam:
53
+
54
+ ```sh
55
+ cmake --build build --target bui_svg_demo
56
+ ./build/examples/bui_svg_demo out.svg
57
+ ```
58
+
59
+ ## 2. Qt (C++)
60
+
61
+ Enable the backend and link it:
62
+
63
+ ```sh
64
+ cmake -S . -B build-qt -DBUI_BUILD_QT_BACKEND=ON # needs Qt5/Qt6 Widgets
65
+ cmake --build build-qt
66
+ ```
67
+
68
+ ```cpp
69
+ #include "BuiWidget.h" // backends/qt
70
+
71
+ BUI::BuiWidget *canvas = new BUI::BuiWidget(window);
72
+ canvas->render_func = [&](int w, int h) {
73
+ // BUI draw calls; primitives land on QPainter automatically.
74
+ };
75
+ ```
76
+
77
+ `BUI::BuiWidget` handles paint/resize/mouse plumbing; `BUI::QtSink` maps BUI
78
+ primitives onto `QPainter` (per-vertex colors reduce to the first vertex color
79
+ per primitive, which matches how the toolkit draws shapes). The backend does
80
+ not require moc or OpenGL.
81
+
82
+ ## 3. Python
83
+
84
+ The `buipy` extension (built by default when Python development files are
85
+ found) exposes the same sink protocol to Python — no third-party packages.
86
+
87
+ ### Headless / CI — SVG output
88
+
89
+ ```python
90
+ import buipy
91
+ from bui.svg import SvgSink
92
+
93
+ sink = SvgSink(640, 480)
94
+ buipy.set_backend(sink)
95
+ buipy.demo_scene(640, 480) # or your own draw calls
96
+ sink.save("frame.svg")
97
+ ```
98
+
99
+ ### PySide6 / PyQt6 window
100
+
101
+ ```python
102
+ import sys
103
+ from PySide6.QtWidgets import QApplication # PyQt6 works identically
104
+ import buipy
105
+ from bui.qt import BuiCanvas
106
+
107
+ app = QApplication(sys.argv)
108
+ canvas = BuiCanvas() # default renders the demo scene
109
+ # canvas.render_func = lambda: <BUI draw calls>
110
+ canvas.resize(800, 600)
111
+ canvas.show()
112
+ sys.exit(app.exec())
113
+ ```
114
+
115
+ `BuiCanvas` installs a `QtPainterBackend` for each paint pass, so the toolkit
116
+ renders through the same QPainter path as the C++ backend — pure Python, no
117
+ shiboken build.
118
+
119
+ ## High-level syntax layers
120
+
121
+ Two facades speak the syntax of established toolkits on top of the C kit
122
+ (`kit/`, exposed to Python as `buipy.KitNode` / `buipy.KitContext`): widgets
123
+ are kit nodes, layouts are the kit's C geometry managers, and windows come
124
+ from `bui.host` (native Win32 on Windows, Tk elsewhere or with
125
+ `BUI_HOST=tk`):
126
+
127
+ ### Qt syntax — `bui.qtsyntax`
128
+
129
+ ```python
130
+ from bui.qtsyntax import QApplication, QWidget, QPushButton, QLabel, QVBoxLayout
131
+
132
+ app = QApplication([])
133
+ window = QWidget()
134
+ window.setWindowTitle("BUI — Qt syntax")
135
+ layout = QVBoxLayout()
136
+ status = QLabel("Press the button.")
137
+ button = QPushButton("Click me")
138
+ button.clicked.connect(lambda: status.setText("Clicked!"))
139
+ layout.addWidget(status)
140
+ layout.addWidget(button)
141
+ window.setLayout(layout)
142
+ window.show()
143
+ app.exec()
144
+ ```
145
+
146
+ Supported surface: see [SYNTAX_COVERAGE.md](SYNTAX_COVERAGE.md) for the
147
+ exact, honest list (the daily-driver core: windows, labels, buttons,
148
+ checkboxes, box layouts, signals, a `setStyleSheet` subset). Anything not
149
+ yet implemented raises a clear error naming that file. The window host is
150
+ chosen at runtime: **PySide6/PyQt6** if installed, otherwise a stdlib
151
+ tkinter window — the same code runs either way, always rendered by BUI.
152
+
153
+ ### tkinter syntax — `bui.tksyntax`
154
+
155
+ ```python
156
+ from bui.tksyntax import Tk, Label, Button, Checkbutton
157
+
158
+ root = Tk()
159
+ root.title("BUI — tkinter syntax")
160
+ root.geometry("420x260")
161
+ status = Label(root, text="")
162
+ status.pack()
163
+ Button(root, text="Click me", command=lambda: status.setText("Clicked!")).pack(pady=4)
164
+ Checkbutton(root, text="Enable feature").pack()
165
+ root.mainloop()
166
+ ```
167
+
168
+ Runs on the Python standard library alone. `pack(side=, padx=, pady=)`,
169
+ `place(x=, y=)`, `config(**kw)`, `invoke()` are supported; widgets render onto
170
+ a tk.Canvas **via the BUI sink**, so swapping the host renderer (Qt, SVG,
171
+ custom) changes nothing in app code.
172
+
173
+ ## Testing the Python bindings
174
+
175
+ `buipy` is a **compiled extension** — it lives in the CMake build tree and is
176
+ built for one specific interpreter. `ModuleNotFoundError: No module named
177
+ 'buipy'` means Python cannot find (or cannot load) that file. Three ways to
178
+ fix, fastest first:
179
+
180
+ **1. Nothing to install (auto-locate).** `import bui` finds the extension in
181
+ `build*/bindings/python` automatically. Just build and run:
182
+
183
+ ```sh
184
+ cmake -S . -B build -G "MinGW Makefiles"
185
+ cmake --build build --target buipy
186
+ python examples/python_demo.py # needs the interpreter CMake used
187
+ ```
188
+
189
+ **2. Match the interpreter.** The extension only loads in the interpreter it
190
+ was built for (CMake found Python 3.14 on this machine →
191
+ `buipy.cp314-win_amd64.pyd`). Check which one CMake picked and run that one:
192
+
193
+ ```sh
194
+ grep Python3_EXECUTABLE build/CMakeCache.txt
195
+ C:/Users/ppmpr/AppData/Local/Programs/Python/Python314/python.exe examples/python_demo.py
196
+ ```
197
+
198
+ To target a different interpreter, point CMake at it explicitly:
199
+
200
+ ```sh
201
+ cmake -S . -B build-py312 -DPython3_EXECUTABLE="C:/Path/Python312/python.exe"
202
+ cmake --build build-py312 --target buipy
203
+ ```
204
+
205
+ **3. pip install (no PYTHONPATH ever again):**
206
+
207
+ ```sh
208
+ cmake --build build --target buipy
209
+ python -m pip install bindings/python # stages bui/ + the .pyd into site-packages
210
+ python -c "import bui; print(bui.version())"
211
+ ```
212
+
213
+ Sanity check either way:
214
+
215
+ ```sh
216
+ python -c "import bui; print(bui.version())" # -> 0.1.0
217
+ python -m pytest bindings/python/tests # or: ctest --test-dir build
218
+ ```
219
+
220
+ ## Wire format reference
221
+
222
+ | Callback | Payload |
223
+ |---|---|
224
+ | `begin_frame(w, h)` | Start of a frame batch; viewport in pixels |
225
+ | `scissor(x, y, w, h)` | Clip rect; `w`/`h` ≤ 0 clears clipping |
226
+ | `triangles(coords, colors, n)` | Non-indexed triangles, 3 vertices each |
227
+ | `lines(coords, colors, n)` | Line list, endpoints in pairs |
228
+ | `points(coords, colors, n, size)` | Points at `size` pixels |
229
+ | `text(x, y, text, size, rgba)` | UTF-8 text run at baseline |
230
+ | `end_frame()` | End of frame batch |
231
+
232
+ All coordinates are 2D floats; colors RGBA floats 0..1. Callbacks may be
233
+ invoked with or without the GIL held — the Python bindings handle this
234
+ internally.