Struct playdate_sys::ffi::playdate_control_signal
source · #[repr(C)]pub struct playdate_control_signal {
pub newSignal: Option<unsafe extern "C" fn() -> *mut ControlSignal>,
pub freeSignal: Option<unsafe extern "C" fn(signal: *mut ControlSignal)>,
pub clearEvents: Option<unsafe extern "C" fn(control: *mut ControlSignal)>,
pub addEvent: Option<unsafe extern "C" fn(control: *mut ControlSignal, step: c_int, value: c_float, interpolate: c_int)>,
pub removeEvent: Option<unsafe extern "C" fn(control: *mut ControlSignal, step: c_int)>,
pub getMIDIControllerNumber: Option<unsafe extern "C" fn(control: *mut ControlSignal) -> c_int>,
}
Fields§
§newSignal: Option<unsafe extern "C" fn() -> *mut ControlSignal>
ControlSignal* playdate->sound->controlsignal->newSignal(void)
Creates a new control signal object.
freeSignal: Option<unsafe extern "C" fn(signal: *mut ControlSignal)>
void playdate->sound->controlsignal->freeSignal(ControlSignal* signal)
Frees the given signal.
clearEvents: Option<unsafe extern "C" fn(control: *mut ControlSignal)>
void playdate->sound->controlsignal->clearEvents(ControlSignal* signal)
Clears all events from the given signal.
addEvent: Option<unsafe extern "C" fn(control: *mut ControlSignal, step: c_int, value: c_float, interpolate: c_int)>
void playdate->sound->controlsignal->addEvent(ControlSignal* signal, int step, float value, int interpolate)
Adds a value to the signal’s timeline at the given step. If interpolate is set, the value is interpolated between the previous step+value and this one.
removeEvent: Option<unsafe extern "C" fn(control: *mut ControlSignal, step: c_int)>
void playdate->sound->controlsignal->removeEvent(ControlSignal* signal, int step)
Removes the control event at the given step.
getMIDIControllerNumber: Option<unsafe extern "C" fn(control: *mut ControlSignal) -> c_int>
int playdate->sound->controlsignal->getMIDIControllerNumber(ControlSignal* signal)
Returns the MIDI controller number for this ControlSignal, if it was created from a MIDI file via playdate→sound→sequence→loadMIDIFile().
Trait Implementations§
source§impl Clone for playdate_control_signal
impl Clone for playdate_control_signal
source§fn clone(&self) -> playdate_control_signal
fn clone(&self) -> playdate_control_signal
1.0.0§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl Debug for playdate_control_signal
impl Debug for playdate_control_signal
source§impl Default for playdate_control_signal
impl Default for playdate_control_signal
source§fn default() -> playdate_control_signal
fn default() -> playdate_control_signal
source§impl Hash for playdate_control_signal
impl Hash for playdate_control_signal
source§impl Ord for playdate_control_signal
impl Ord for playdate_control_signal
source§impl PartialEq for playdate_control_signal
impl PartialEq for playdate_control_signal
source§fn eq(&self, other: &playdate_control_signal) -> bool
fn eq(&self, other: &playdate_control_signal) -> bool
self
and other
values to be equal, and is used
by ==
.source§impl PartialOrd for playdate_control_signal
impl PartialOrd for playdate_control_signal
source§fn partial_cmp(&self, other: &playdate_control_signal) -> Option<Ordering>
fn partial_cmp(&self, other: &playdate_control_signal) -> Option<Ordering>
1.0.0§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
self
and other
) and is used by the <=
operator. Read moreimpl Copy for playdate_control_signal
impl Eq for playdate_control_signal
impl StructuralPartialEq for playdate_control_signal
Auto Trait Implementations§
impl Freeze for playdate_control_signal
impl RefUnwindSafe for playdate_control_signal
impl Send for playdate_control_signal
impl Sync for playdate_control_signal
impl Unpin for playdate_control_signal
impl UnwindSafe for playdate_control_signal
Blanket Implementations§
§impl<T> Any for Twhere
T: 'static + ?Sized,
impl<T> Any for Twhere
T: 'static + ?Sized,
§impl<T> Borrow<T> for Twhere
T: ?Sized,
impl<T> Borrow<T> for Twhere
T: ?Sized,
§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
§impl<T, U> Into<U> for Twhere
U: From<T>,
impl<T, U> Into<U> for Twhere
U: From<T>,
§impl<T> ToOwned for Twhere
T: Clone,
impl<T> ToOwned for Twhere
T: Clone,
§impl<T, U> TryFrom<U> for Twhere
U: Into<T>,
impl<T, U> TryFrom<U> for Twhere
U: Into<T>,
Layout§
Note: Most layout information is completely unstable and may even differ between compilations. The only exception is types with certain repr(...)
attributes. Please see the Rust Reference's “Type Layout” chapter for details on type layout guarantees.
Size: 24 bytes