[][src]Struct libcec_sys::ICECCallbacks

#[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

impl Clone for ICECCallbacks[src]

impl Copy for ICECCallbacks[src]

impl Debug for ICECCallbacks[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

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

The type returned in the event of a conversion error.