The default editor a plug-in binary declares with pulp_add_plugin(... UI <package>). More...
Go to the source code of this file.
Namespaces | |
| namespace | pulp |
| namespace | pulp::format |
| What the product grants a device: the quota table indexed by capability tier and live thermal state. | |
Macros | |
| #define | PULP_FORMAT_IMAGE_LOCAL __attribute__((visibility("hidden"))) |
Typedefs | |
| using | pulp::format::EditorFactoryHook = EditorFactory* (*)() |
| Returns the editor factory of the UI package a plug-in binary declares. | |
Functions | |
| pulp::format::__attribute__ ((visibility("hidden"))) void install_plugin_editor_factory_hook(EditorFactoryHook hook) noexcept | |
| Install this image's editor-factory hook. | |
The default editor a plug-in binary declares with pulp_add_plugin(... UI <package>).
A UI package is a CMake target that names one function returning its EditorFactory. For every format and standalone target of a plug-in that declares UI <package>, pulp_add_plugin generates a small source into that target. The source defines the hook, a function with internal linkage that calls the package's function, and installs it here at static init. Processor::editor_factory() returns what the installed hook returns, so a processor that does not override editor_factory() gets its plug-in's package editor, and core/format never names a UI package.
The slot is local to the image it is linked into. pulp-format-core is linked statically into each plug-in module and executable, the slot has internal linkage, and the two functions below have hidden visibility, so two plug-ins loaded into one host process each read their own hook and cannot replace each other's. UI none, or no UI argument, generates nothing and links nothing: the slot stays empty and editor_factory() returns null, as for a headless processor.
UI package convention (see docs/reference/cmake-functions.md):
| #define PULP_FORMAT_IMAGE_LOCAL __attribute__((visibility("hidden"))) |