Struct libspa_sys::spa_node_events
source · #[repr(C)]pub struct spa_node_events {
pub version: u32,
pub info: Option<unsafe extern "C" fn(data: *mut c_void, info: *const spa_node_info)>,
pub port_info: Option<unsafe extern "C" fn(data: *mut c_void, direction: spa_direction, port: u32, info: *const spa_port_info)>,
pub result: Option<unsafe extern "C" fn(data: *mut c_void, seq: c_int, res: c_int, type_: u32, result: *const c_void)>,
pub event: Option<unsafe extern "C" fn(data: *mut c_void, event: *const spa_event)>,
}
Expand description
events from the spa_node.
All event are called from the main thread and multiple listeners can be registered for the events with spa_node_add_listener().
Fields§
§version: u32
< version of this structure
info: Option<unsafe extern "C" fn(data: *mut c_void, info: *const spa_node_info)>
Emitted when info changes
port_info: Option<unsafe extern "C" fn(data: *mut c_void, direction: spa_direction, port: u32, info: *const spa_port_info)>
Emitted when port info changes, NULL when port is removed
result: Option<unsafe extern "C" fn(data: *mut c_void, seq: c_int, res: c_int, type_: u32, result: *const c_void)>
notify a result.
Some methods will trigger a result event with an optional result of the given type. Look at the documentation of the method to know when to expect a result event.
The result event can be called synchronously, as an event called from inside the method itself, in which case the seq number passed to the method will be passed unchanged.
The result event will be called asynchronously when the method returned an async return value. In this case, the seq number in the result will match the async return value of the method call. Users should match the seq number from request to the reply.
event: Option<unsafe extern "C" fn(data: *mut c_void, event: *const spa_event)>
\param node a spa_node \param event the event that was emitted
This will be called when an out-of-bound event is notified on \a node.
Trait Implementations§
source§impl Clone for spa_node_events
impl Clone for spa_node_events
source§fn clone(&self) -> spa_node_events
fn clone(&self) -> spa_node_events
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl Debug for spa_node_events
impl Debug for spa_node_events
source§impl PartialEq for spa_node_events
impl PartialEq for spa_node_events
source§fn eq(&self, other: &spa_node_events) -> bool
fn eq(&self, other: &spa_node_events) -> bool
self
and other
values to be equal, and is used
by ==
.