use crate::common::{AnyResult, AviUtl2Info};
pub trait GenericPlugin: Send + Sync + Sized {
fn new(info: AviUtl2Info) -> AnyResult<Self>;
fn register(&mut self, registry: &mut self::host_app::HostAppHandle);
fn on_project_load(&mut self, _project: &mut crate::generic::ProjectFile) {}
fn on_project_save(&mut self, _project: &mut crate::generic::ProjectFile) {}
fn on_clear_cache(&mut self, _edit_section: &crate::generic::EditSection) {}
fn on_change_scene(&mut self, _edit_section: &crate::generic::EditSection) {}
fn with_instance<R>(f: impl FnOnce(&Self) -> R) -> R
where
Self: crate::generic::__bridge::GenericSingleton,
{
<Self as crate::generic::__bridge::GenericSingleton>::with_instance(f)
}
fn with_instance_mut<R>(f: impl FnOnce(&mut Self) -> R) -> R
where
Self: crate::generic::__bridge::GenericSingleton,
{
<Self as crate::generic::__bridge::GenericSingleton>::with_instance_mut(f)
}
}
mod project;
pub use project::*;
mod edit_section;
pub use edit_section::*;
mod host_app;
pub use host_app::*;
mod edit_handle;
pub use edit_handle::*;