TUIX v0.5Beta
Python API Reference
This reference documents the stable public wrapper surface in tuix.core for v0.5. Each method entry explains how to call it and why the method exists.
Import Pattern
from tuix.core import engine, builders, registry, input, scenes, buffers, objectsCommon Rules
- Scene names, builder names, labels, and titles usually accept bytes or str.
- Character arguments such as sym, fill, empty, left, and right accept one-byte bytes, one-character str, or an integer byte value.
- Widget methods use obj_ptr. In normal code, get it once with objects.get_object_by_uid(uid) and reuse it.
- Most setters return 0 on success and non-zero on failure. Snapshot getters return dict or None.
- Compatibility feed_input methods remain for old code; current v0.5 apps should usually rely on input.listen() and engine.main_loop().
Coverage Map
| Module | Documented Surface | Primary Page |
|---|---|---|
| tuix.core.builders | Builder constants, aliases, layout constants, and register_standard(). | Builders |
| tuix.core.engine | 7 lifecycle, frame, stats, and mouse-capture methods. | Engine |
| tuix.core.input | 4 listener and snapshot methods. | Input API |
| tuix.core.scenes | 16 lifecycle, selection, focus, modal, transaction, stats, and compaction methods. | Scenes API |
| tuix.core.buffers | 12 hierarchy, z-index, layout override, grid placement, and snapshot methods. | Buffers API |
| tuix.core.objects | Object lifecycle plus every widget, layout, viewport, and modal runtime method. | Objects API |
| tuix.core.registry | RegistryProxy and current_scene_name property. | Registry |
| tuix.core._lib | Internal bridge helpers documented separately for debugging only. | Internal API |
Typical Boot Sequence
engine.init()
builders.register_standard()
scenes.init_scene('Main')
scenes.select_scene('Main')
input.listen()
uid = objects.create_object(builders.TEXT, 'Main', 0.5, 0.1, 0.1, 0.1)
obj = objects.get_object_by_uid(uid)
objects.tuix_text_set_text(obj, 'Ready')
engine.main_loop()
input.stop()
engine.shutdown()