Function glib::subclass::interface::register_dynamic_interface

source ·
pub fn register_dynamic_interface<P: DynamicObjectRegisterExt, T: ObjectInterface>(
    type_plugin: &P
) -> Type
Expand description

Registers a glib::Type ID for T as a dynamic type.

An object interface must be explicitly registered as a dynamic type when the system loads the implementation by calling TypePluginImpl::use_ or more specifically TypeModuleImpl::load. Therefore, unlike for object interfaces registered as static types, object interfaces registered as dynamic types can be registered several times.

The object_interface_dynamic! macro helper attribute will create register_interface() and on_implementation_load() functions around this, which will ensure that the function is called when necessary.