Struct libcec_sys::ICECCallbacks
source · #[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.
@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
impl Clone for ICECCallbacks
source§fn clone(&self) -> ICECCallbacks
fn clone(&self) -> ICECCallbacks
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read more