#[repr(C)]pub struct PluginVTable {Show 24 fields
pub set_host_api: extern "C" fn(host_api: HostApiVTable),
pub get_toolbar_buttons: extern "C" fn() -> RVec<ToolbarButtonFFI>,
pub get_hud_toolbar_buttons: extern "C" fn() -> RVec<HudToolbarButtonFFI>,
pub on_action: extern "C" fn(action_id: RString) -> ActionResponseFFI,
pub on_hud_action: extern "C" fn(action_id: RString, viewport: ViewportSnapshotFFI) -> ActionResponseFFI,
pub on_ui_callback: extern "C" fn(callback_name: RString, args_json: RString),
pub get_sidebar_properties: extern "C" fn() -> RVec<UiPropertyFFI>,
pub get_viewport_context_menu_items: extern "C" fn(viewport: ViewportSnapshotFFI) -> RVec<ViewportContextMenuItemFFI>,
pub on_viewport_context_menu_action: extern "C" fn(item_id: RString, viewport: ViewportSnapshotFFI) -> ActionResponseFFI,
pub get_viewport_overlay_points: extern "C" fn(viewport: ViewportSnapshotFFI) -> RVec<ViewportOverlayPointFFI>,
pub get_viewport_overlay_polygons: extern "C" fn(viewport: ViewportSnapshotFFI) -> RVec<ViewportOverlayPolygonFFI>,
pub get_viewport_overlay_component: extern "C" fn() -> ROption<ViewportOverlayComponentRequestFFI>,
pub get_viewport_overlay_properties: extern "C" fn(viewport: ViewportSnapshotFFI) -> RVec<UiPropertyFFI>,
pub on_point_annotation_placed: extern "C" fn(viewport: ViewportSnapshotFFI, x_level0: f64, y_level0: f64),
pub on_polygon_annotation_placed: extern "C" fn(viewport: ViewportSnapshotFFI, vertices: RVec<ViewportOverlayVertexFFI>),
pub on_undo: extern "C" fn() -> ActionResponseFFI,
pub on_redo: extern "C" fn() -> ActionResponseFFI,
pub on_point_annotation_moved: extern "C" fn(viewport: ViewportSnapshotFFI, annotation_id: RString, x_level0: f64, y_level0: f64),
pub on_polygon_annotation_moved: extern "C" fn(viewport: ViewportSnapshotFFI, annotation_id: RString, vertices: RVec<ViewportOverlayVertexFFI>),
pub on_viewport_annotation_selected: extern "C" fn(viewport: ViewportSnapshotFFI, annotation_id: RString),
pub get_viewport_filters: extern "C" fn() -> RVec<ViewportFilterFFI>,
pub apply_filter_cpu: extern "C" fn(filter_id: RString, rgba_data: *mut u8, len: u32, width: u32, height: u32, viewport: *const ViewportSnapshotFFI) -> bool,
pub apply_filter_gpu: extern "C" fn(filter_id: RString, ctx: *const GpuFilterContextFFI) -> bool,
pub set_filter_enabled: extern "C" fn(filter_id: RString, enabled: bool),
}Expand description
VTable of function pointers exported by each plugin shared library.
Each plugin crate exports:
#[unsafe(no_mangle)]
pub extern "C" fn eov_get_plugin_vtable() -> PluginVTable { ... }Fields§
§set_host_api: extern "C" fn(host_api: HostApiVTable)Supplies the plugin with a host API vtable so it can query the app and issue host commands later during callbacks.
Returns the toolbar buttons this plugin wants to register.
Returns HUD toolbar buttons shown inside each viewport.
on_action: extern "C" fn(action_id: RString) -> ActionResponseFFICalled when a toolbar button registered by this plugin is clicked.
on_hud_action: extern "C" fn(action_id: RString, viewport: ViewportSnapshotFFI) -> ActionResponseFFICalled when a HUD toolbar button is clicked in a specific viewport.
on_ui_callback: extern "C" fn(callback_name: RString, args_json: RString)Called when a callback defined in the plugin’s .slint UI is invoked.
callback_name is the kebab-case name of the callback as declared in
the .slint file.
Returns the current values for public properties on the active sidebar. Values are encoded as JSON and converted to typed Slint values by the host.
Returns plugin-contributed viewport context menu items for the given viewport.
Called when a plugin-contributed viewport context menu item is selected.
get_viewport_overlay_points: extern "C" fn(viewport: ViewportSnapshotFFI) -> RVec<ViewportOverlayPointFFI>Returns point overlay data that should be rendered over the given viewport.
get_viewport_overlay_polygons: extern "C" fn(viewport: ViewportSnapshotFFI) -> RVec<ViewportOverlayPolygonFFI>Returns polygon overlay data that should be rendered over the given viewport.
get_viewport_overlay_component: extern "C" fn() -> ROption<ViewportOverlayComponentRequestFFI>Returns a viewport-scoped Slint component request for this plugin, if any.
get_viewport_overlay_properties: extern "C" fn(viewport: ViewportSnapshotFFI) -> RVec<UiPropertyFFI>Returns the current public properties for the plugin viewport overlay component.
on_point_annotation_placed: extern "C" fn(viewport: ViewportSnapshotFFI, x_level0: f64, y_level0: f64)Called when the host commits a point annotation click for the active point tool.
on_polygon_annotation_placed: extern "C" fn(viewport: ViewportSnapshotFFI, vertices: RVec<ViewportOverlayVertexFFI>)Called when the host commits a polygon annotation for the active polygon tool.
on_undo: extern "C" fn() -> ActionResponseFFICalled when the host dispatches an undo request for this plugin.
on_redo: extern "C" fn() -> ActionResponseFFICalled when the host dispatches a redo request for this plugin.
on_point_annotation_moved: extern "C" fn(viewport: ViewportSnapshotFFI, annotation_id: RString, x_level0: f64, y_level0: f64)Called when the host moves an existing point annotation for the active point tool.
on_polygon_annotation_moved: extern "C" fn(viewport: ViewportSnapshotFFI, annotation_id: RString, vertices: RVec<ViewportOverlayVertexFFI>)Called when the host moves an existing polygon annotation for the active polygon tool.
on_viewport_annotation_selected: extern "C" fn(viewport: ViewportSnapshotFFI, annotation_id: RString)Called when the host selects or deselects a plugin-owned overlay annotation. An empty annotation id means the current selection should be cleared.
get_viewport_filters: extern "C" fn() -> RVec<ViewportFilterFFI>Returns viewport filter descriptors this plugin provides. May return an empty vec if the plugin has no viewport filters.
apply_filter_cpu: extern "C" fn(filter_id: RString, rgba_data: *mut u8, len: u32, width: u32, height: u32, viewport: *const ViewportSnapshotFFI) -> boolApply a CPU viewport filter in-place.
filter_id identifies which filter to apply.
rgba_data is a mutable pointer to widthheight4 bytes of RGBA8 data.
Returns true if the filter was applied successfully.
apply_filter_gpu: extern "C" fn(filter_id: RString, ctx: *const GpuFilterContextFFI) -> boolApply a GPU viewport filter using raw Vulkan handles.
filter_id identifies which filter to apply.
ctx is a pointer to a GpuFilterContextFFI struct with the Vulkan
device, image, and sync fence. The plugin must signal the fence when done.
Returns true if the filter was applied successfully.
set_filter_enabled: extern "C" fn(filter_id: RString, enabled: bool)Enable or disable a viewport filter.
Trait Implementations§
Source§impl Clone for PluginVTable
impl Clone for PluginVTable
impl Copy for PluginVTable
Source§impl GetStaticEquivalent_ for PluginVTable
impl GetStaticEquivalent_ for PluginVTable
Source§type StaticEquivalent = _static_PluginVTable
type StaticEquivalent = _static_PluginVTable
'static equivalent of SelfSource§impl StableAbi for PluginVTable
impl StableAbi for PluginVTable
Source§const LAYOUT: &'static TypeLayout
const LAYOUT: &'static TypeLayout
Source§type IsNonZeroType = False
type IsNonZeroType = False
Source§const ABI_CONSTS: AbiConsts
const ABI_CONSTS: AbiConsts
const-equivalents of the associated types.Auto Trait Implementations§
impl Forget for PluginVTable
impl Freeze for PluginVTable
impl Move for PluginVTable
impl RefUnwindSafe for PluginVTable
impl Send for PluginVTable
impl Sync for PluginVTable
impl Unpin for PluginVTable
impl UnsafeUnpin for PluginVTable
impl UnwindSafe for PluginVTable
Blanket Implementations§
Source§impl<T> AlignerFor<1> for T
impl<T> AlignerFor<1> for T
Source§impl<T> AlignerFor<2> for T
impl<T> AlignerFor<2> for T
Source§impl<T> AlignerFor<4> for T
impl<T> AlignerFor<4> for T
Source§impl<T> AlignerFor<8> for T
impl<T> AlignerFor<8> for T
Source§impl<T> AlignerFor<16> for T
impl<T> AlignerFor<16> for T
Source§impl<T> AlignerFor<32> for T
impl<T> AlignerFor<32> for T
Source§impl<T> AlignerFor<64> for T
impl<T> AlignerFor<64> for T
Source§impl<T> AlignerFor<128> for T
impl<T> AlignerFor<128> for T
Source§type Aligner = AlignTo128<T>
type Aligner = AlignTo128<T>
AlignTo* type which aligns Self to ALIGNMENT.Source§impl<T> AlignerFor<256> for T
impl<T> AlignerFor<256> for T
Source§type Aligner = AlignTo256<T>
type Aligner = AlignTo256<T>
AlignTo* type which aligns Self to ALIGNMENT.Source§impl<T> AlignerFor<512> for T
impl<T> AlignerFor<512> for T
Source§type Aligner = AlignTo512<T>
type Aligner = AlignTo512<T>
AlignTo* type which aligns Self to ALIGNMENT.Source§impl<T> AlignerFor<1024> for T
impl<T> AlignerFor<1024> for T
Source§type Aligner = AlignTo1024<T>
type Aligner = AlignTo1024<T>
AlignTo* type which aligns Self to ALIGNMENT.Source§impl<T> AlignerFor<2048> for T
impl<T> AlignerFor<2048> for T
Source§type Aligner = AlignTo2048<T>
type Aligner = AlignTo2048<T>
AlignTo* type which aligns Self to ALIGNMENT.Source§impl<T> AlignerFor<4096> for T
impl<T> AlignerFor<4096> for T
Source§type Aligner = AlignTo4096<T>
type Aligner = AlignTo4096<T>
AlignTo* type which aligns Self to ALIGNMENT.Source§impl<T> AlignerFor<8192> for T
impl<T> AlignerFor<8192> for T
Source§type Aligner = AlignTo8192<T>
type Aligner = AlignTo8192<T>
AlignTo* type which aligns Self to ALIGNMENT.Source§impl<T> AlignerFor<16384> for T
impl<T> AlignerFor<16384> for T
Source§type Aligner = AlignTo16384<T>
type Aligner = AlignTo16384<T>
AlignTo* type which aligns Self to ALIGNMENT.Source§impl<T> AlignerFor<32768> for T
impl<T> AlignerFor<32768> for T
Source§type Aligner = AlignTo32768<T>
type Aligner = AlignTo32768<T>
AlignTo* type which aligns Self to ALIGNMENT.Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T, W> HasTypeWitness<W> for Twhere
W: MakeTypeWitness<Arg = T>,
T: ?Sized,
impl<T, W> HasTypeWitness<W> for Twhere
W: MakeTypeWitness<Arg = T>,
T: ?Sized,
Source§impl<T> Identity for Twhere
T: ?Sized,
impl<T> Identity for Twhere
T: ?Sized,
Source§impl<'a, T> RCowCompatibleRef<'a> for Twhere
T: Clone + 'a,
impl<'a, T> RCowCompatibleRef<'a> for Twhere
T: Clone + 'a,
Source§fn as_c_ref(from: &'a T) -> <T as RCowCompatibleRef<'a>>::RefC
fn as_c_ref(from: &'a T) -> <T as RCowCompatibleRef<'a>>::RefC
Source§fn as_rust_ref(from: <T as RCowCompatibleRef<'a>>::RefC) -> &'a T
fn as_rust_ref(from: <T as RCowCompatibleRef<'a>>::RefC) -> &'a T
Source§impl<S> ROExtAcc for S
impl<S> ROExtAcc for S
Source§fn f_get<F>(&self, offset: FieldOffset<S, F, Aligned>) -> &F
fn f_get<F>(&self, offset: FieldOffset<S, F, Aligned>) -> &F
offset. Read moreSource§fn f_get_mut<F>(&mut self, offset: FieldOffset<S, F, Aligned>) -> &mut F
fn f_get_mut<F>(&mut self, offset: FieldOffset<S, F, Aligned>) -> &mut F
offset. Read moreSource§fn f_get_ptr<F, A>(&self, offset: FieldOffset<S, F, A>) -> *const F
fn f_get_ptr<F, A>(&self, offset: FieldOffset<S, F, A>) -> *const F
offset. Read moreSource§fn f_get_mut_ptr<F, A>(&mut self, offset: FieldOffset<S, F, A>) -> *mut F
fn f_get_mut_ptr<F, A>(&mut self, offset: FieldOffset<S, F, A>) -> *mut F
offset. Read moreSource§impl<S> ROExtOps<Aligned> for S
impl<S> ROExtOps<Aligned> for S
Source§fn f_replace<F>(&mut self, offset: FieldOffset<S, F, Aligned>, value: F) -> F
fn f_replace<F>(&mut self, offset: FieldOffset<S, F, Aligned>, value: F) -> F
offset) with value,
returning the previous value of the field. Read moreSource§fn f_get_copy<F>(&self, offset: FieldOffset<S, F, Aligned>) -> Fwhere
F: Copy,
fn f_get_copy<F>(&self, offset: FieldOffset<S, F, Aligned>) -> Fwhere
F: Copy,
Source§impl<S> ROExtOps<Unaligned> for S
impl<S> ROExtOps<Unaligned> for S
Source§fn f_replace<F>(&mut self, offset: FieldOffset<S, F, Unaligned>, value: F) -> F
fn f_replace<F>(&mut self, offset: FieldOffset<S, F, Unaligned>, value: F) -> F
offset) with value,
returning the previous value of the field. Read moreSource§fn f_get_copy<F>(&self, offset: FieldOffset<S, F, Unaligned>) -> Fwhere
F: Copy,
fn f_get_copy<F>(&self, offset: FieldOffset<S, F, Unaligned>) -> Fwhere
F: Copy,
Source§impl<T> SelfOps for Twhere
T: ?Sized,
impl<T> SelfOps for Twhere
T: ?Sized,
Source§fn piped<F, U>(self, f: F) -> U
fn piped<F, U>(self, f: F) -> U
Source§fn piped_ref<'a, F, U>(&'a self, f: F) -> Uwhere
F: FnOnce(&'a Self) -> U,
fn piped_ref<'a, F, U>(&'a self, f: F) -> Uwhere
F: FnOnce(&'a Self) -> U,
piped except that the function takes &Self
Useful for functions that take &Self instead of Self. Read moreSource§fn piped_mut<'a, F, U>(&'a mut self, f: F) -> Uwhere
F: FnOnce(&'a mut Self) -> U,
fn piped_mut<'a, F, U>(&'a mut self, f: F) -> Uwhere
F: FnOnce(&'a mut Self) -> U,
piped, except that the function takes &mut Self.
Useful for functions that take &mut Self instead of Self.Source§fn mutated<F>(self, f: F) -> Self
fn mutated<F>(self, f: F) -> Self
Source§fn observe<F>(self, f: F) -> Self
fn observe<F>(self, f: F) -> Self
Source§fn as_ref_<T>(&self) -> &T
fn as_ref_<T>(&self) -> &T
AsRef,
using the turbofish .as_ref_::<_>() syntax. Read more