aviutl2\generic\binding/
mod.rs1#[derive(Debug, Clone)]
3pub struct GenericPluginTable {
4 pub name: String,
6 pub information: String,
9}
10
11pub trait GenericPlugin: Send + Sync + Sized {
14 fn new(info: crate::common::AviUtl2Info) -> crate::common::AnyResult<Self>;
16
17 fn plugin_info(&self) -> crate::generic::GenericPluginTable;
19
20 fn register(&mut self, registry: &mut crate::generic::HostAppHandle);
22
23 fn on_project_load(&mut self, project: &mut crate::generic::ProjectFile) {
27 let _ = project;
28 }
29
30 fn on_project_save(&mut self, project: &mut crate::generic::ProjectFile) {
32 let _ = project;
33 }
34
35 fn on_clear_cache(&mut self, edit_section: &crate::generic::EditSection) {
37 let _ = edit_section;
38 }
39
40 fn on_change_scene(&mut self, edit_section: &crate::generic::EditSection) {
42 let _ = edit_section;
43 }
44
45 fn with_instance<R>(f: impl FnOnce(&Self) -> R) -> R
51 where
52 Self: crate::generic::__bridge::GenericSingleton,
53 {
54 <Self as crate::generic::__bridge::GenericSingleton>::with_instance(f)
55 }
56
57 fn with_instance_mut<R>(f: impl FnOnce(&mut Self) -> R) -> R
63 where
64 Self: crate::generic::__bridge::GenericSingleton,
65 {
66 <Self as crate::generic::__bridge::GenericSingleton>::with_instance_mut(f)
67 }
68}
69
70mod project;
71pub use project::*;
72mod edit_section;
73pub use edit_section::*;
74mod host_app;
75pub use host_app::*;
76mod edit_handle;
77pub use edit_handle::*;