#[repr(C)]
pub struct ICECCallbacks { pub logMessage: Option<unsafe extern "C" fn(cbparam: *mut c_void, message: *const cec_log_message)>, pub keyPress: Option<unsafe extern "C" fn(cbparam: *mut c_void, key: *const cec_keypress)>, pub commandReceived: Option<unsafe extern "C" fn(cbparam: *mut c_void, command: *const cec_command)>, pub configurationChanged: Option<unsafe extern "C" fn(cbparam: *mut c_void, configuration: *const libcec_configuration)>, pub alert: Option<unsafe extern "C" fn(cbparam: *mut c_void, alert: libcec_alert, param: libcec_parameter)>, pub menuStateChanged: Option<unsafe extern "C" fn(cbparam: *mut c_void, state: cec_menu_state) -> c_int>, pub sourceActivated: Option<unsafe extern "C" fn(cbParam: *mut c_void, logicalAddress: cec_logical_address, bActivated: u8)>, }

Fields§

§logMessage: Option<unsafe extern "C" fn(cbparam: *mut c_void, message: *const cec_log_message)>

@brief Transfer a log message from libCEC to the client. @param cbparam Callback parameter provided when the callbacks were set up @param message The message to transfer.

§keyPress: Option<unsafe extern "C" fn(cbparam: *mut c_void, key: *const cec_keypress)>

@brief Transfer a keypress from libCEC to the client. @param cbparam Callback parameter provided when the callbacks were set up @param key The keypress to transfer.

§commandReceived: Option<unsafe extern "C" fn(cbparam: *mut c_void, command: *const cec_command)>

@brief Transfer a CEC command from libCEC to the client. @param cbparam Callback parameter provided when the callbacks were set up @param command The command to transfer.

§configurationChanged: Option<unsafe extern "C" fn(cbparam: *mut c_void, configuration: *const libcec_configuration)>

@brief Transfer a changed configuration from libCEC to the client @param cbparam Callback parameter provided when the callbacks were set up @param configuration The configuration to transfer

§alert: Option<unsafe extern "C" fn(cbparam: *mut c_void, alert: libcec_alert, param: libcec_parameter)>

@brief Transfer a libcec alert message from libCEC to the client @param cbparam Callback parameter provided when the callbacks were set up @param alert The alert type transfer. @param data Misc. additional information.

§menuStateChanged: Option<unsafe extern "C" fn(cbparam: *mut c_void, state: cec_menu_state) -> c_int>

@brief Transfer a menu state change to the client. Transfer a menu state change to the client. If the command returns 1, then the change will be processed by the busdevice. If 0, then the state of the busdevice won’t be changed, and will always be kept ‘activated’, @warning CEC does not allow the player to suppress the menu state change on the TV, so the menu on the TV will always be displayed, whatever the return value of this method is. so keypresses are always routed. @param cbparam Callback parameter provided when the callbacks were set up @param state The new value.

@return 1 if libCEC should use this new value, 0 otherwise.

§sourceActivated: Option<unsafe extern "C" fn(cbParam: *mut c_void, logicalAddress: cec_logical_address, bActivated: u8)>

@brief Called when a source that’s handled by this client is activated. @param cbparam Callback parameter provided when the callbacks were set up @param logicalAddress The address that was just activated. @param bActivated 1 if activated, 0 when deactivated.

Trait Implementations§

source§

impl Clone for ICECCallbacks

source§

fn clone(&self) -> ICECCallbacks

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for ICECCallbacks

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Copy for ICECCallbacks

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for Twhere T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for Twhere T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for Twhere U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T> ToOwned for Twhere T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for Twhere U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for Twhere U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.