Struct plugin_t
#[repr(C)]pub struct plugin_t {
pub version: c_int,
pub flags: c_int,
pub init: Option<unsafe extern "C" fn() -> *mut plugmod_t>,
pub term: Option<unsafe extern "C" fn()>,
pub run: Option<unsafe extern "C" fn(arg: usize) -> bool>,
pub comment: *const c_char,
pub help: *const c_char,
pub wanted_name: *const c_char,
pub wanted_hotkey: *const c_char,
}Expand description
A plugin is a module in the plugins subdirectory that can perform an action asked by the user. (usually via pressing a hotkey)
Fields§
§version: c_int< Should be equal to #IDP_INTERFACE_VERSION
flags: c_int< \ref PLUGIN_
init: Option<unsafe extern "C" fn() -> *mut plugmod_t>< Initialize plugin - returns a pointer to plugmod_t
term: Option<unsafe extern "C" fn()>< Terminate plugin. This function will be called < when the plugin is unloaded. May be nullptr. < Must be nullptr for PLUGIN_MULTI plugins
run: Option<unsafe extern "C" fn(arg: usize) -> bool>< Invoke plugin. < Must be nullptr for PLUGIN_MULTI plugins
comment: *const c_char< Long comment about the plugin. < it could appear in the status line < or as a hint
help: *const c_char< Multiline help about the plugin
wanted_name: *const c_char< The preferred short name of the plugin
wanted_hotkey: *const c_char< The preferred hotkey to run the plugin
Trait Implementations§
§impl ExternType for plugin_t
impl ExternType for plugin_t
impl Copy for plugin_t
Auto Trait Implementations§
impl Freeze for plugin_t
impl RefUnwindSafe for plugin_t
impl !Send for plugin_t
impl !Sync for plugin_t
impl Unpin for plugin_t
impl UnwindSafe for plugin_t
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