pub struct PluginContext { /* private fields */ }Expand description
Plugin context that provides access to VirtualDJ API functions
This struct holds the plugin pointer and callbacks, allowing safe access to VirtualDJ state information like track metadata, position, BPM, etc.
§Example
ⓘ
let context = PluginContext::new(plugin_ptr, &callbacks);
let title = context.get_info_string("deck 1 get_title")?;
let position = context.get_info_double("deck 1 get_position")?;Implementations§
Source§impl PluginContext
impl PluginContext
Sourcepub fn new(plugin: *mut VdjPlugin, callbacks: &VdjCallbacks) -> Self
pub fn new(plugin: *mut VdjPlugin, callbacks: &VdjCallbacks) -> Self
Sourcepub fn get_info_double(&self, command: &str) -> Result<f64>
pub fn get_info_double(&self, command: &str) -> Result<f64>
Sourcepub fn get_info_string(&self, command: &str) -> Result<String>
pub fn get_info_string(&self, command: &str) -> Result<String>
Auto Trait Implementations§
impl Freeze for PluginContext
impl RefUnwindSafe for PluginContext
impl !Send for PluginContext
impl !Sync for PluginContext
impl Unpin for PluginContext
impl UnsafeUnpin for PluginContext
impl UnwindSafe for PluginContext
Blanket Implementations§
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
Mutably borrows from an owned value. Read more