Skip to main content

ferroui_media_controls/
lib.rs

1//! Ordinary FerroUI composition for leased external textures.
2#![forbid(unsafe_code)]
3mod renderer_host;
4mod texture_presenter;
5pub use renderer_host::RendererHost;
6pub use texture_presenter::*;
7// Shared by runtime registration and the build-time XAML metadata scanner.
8const NAMESPACES: &[(&str, &str)] = &[
9    ("ferroui_media", "FerroUI.Media"),
10    ("ferroui_media_controls", "FerroUI.Media.Controls"),
11];
12const TYPES: &[&ferroui_base::TypeInfo] = &[TexturePresenter::TYPE, RendererHost::TYPE];
13/// Registers the namespaces and the table of types of this crate (and of the crates it is built
14/// on). Cheap and idempotent. The table is trimmed as that of every crate of the framework
15/// (`TypeInfo::register_table`): a class is known once it is used, and by name where the tables
16/// of types are kept.
17pub fn register_types() {
18    static ONCE: std::sync::Once = std::sync::Once::new();
19    ONCE.call_once(|| {
20        ferroui_controls::register_types();
21        ferroui_base::TypeInfo::register_namespaces(NAMESPACES);
22        ferroui_base::TypeInfo::register_table(TYPES);
23    });
24}