How to use it
DOM element extensions use the kuiext_* C ABI. Media backends use the kui_media_* protocol. Their loaders and lifecycles differ. Check architecture, ABI version, entry points, dependency DLLs and resource files during deployment.
Integration and limits
The supported 3D architecture uses standalone kui_ext_3d rather than the default-disabled legacy in-tree module. Check the package manifest for editor, PDF and media components. Extensions must follow repaint invalidation rules; one correct initial frame is not a complete integration check.
Load a DOM element extension
Document owns ExtensionManager. Deploy the matching extension DLL and dependencies to an application-controlled directory and provide an explicit path. If loadExtension returns false, inspect ABI compatibility, dependencies and diagnostics.
bool loadElementExtension(kui::Document& document, const std::string& path) {
auto* manager = document.extensionManager();
return manager && manager->loadExtension(path);
}Element extensions and media backends
kuiext_* extensions register custom elements such as kui-editor, kui-pdf and kui-3d-view. kui_media_* backends serve built-in audio/video elements. Their entry points, loaders and lifecycles differ; do not load media DLLs as element extensions through ExtensionManager.
- Editor: kui_ext_editor and matching syntax dependencies.
- PDF: kui_ext_pdf and its PDFium runtime.
- 3D: standalone kui_ext_3d and required material sidecar.
- Media: audio/video backends and decoding/playback dependencies.
Repaint extension instances
Notify the host of invalidation when extension content changes. Updating internal pixels without notifying the host can leave stale output. Check resizing, visibility, animation and cleanup on destruction; continuous rendering requires its own runtime verification.
Integrate the smallest extension first
Include only the components your application needs, using the package manifest and CMake component declarations.
- Identify whether it is a kuiext_* DOM element extension or a kui_media_* media backend.
- Select the SDK component and use its helper to copy runtime and sidecars.
- Check loading before calling it, distinguishing missing files from ABI mismatches.
- Run the package’s smallest example before integration, then test from another working directory.
Extension delivery checks
Use the symptom to narrow the cause before editing.
| Symptom | Check and action |
|---|---|
| Works locally, fails after packaging | Check the destination for the extension DLL and its dependencies instead of relying on system PATH. |
| 3D blank or fails to load | Deploy the independent extension with procedural_pbr.filamat and compare with the package example. |
| DOM extension fails through a media loader | The protocols differ; use the matching manager and entry point. |
Something unclear?
Report an issue on this page →