Class CecCallbackMethods
- Namespace
- CecSharp
- Assembly
- LibCecSharp.dll
The callback methods that libCEC uses. Derive from this class and override the Receive*/Source/Configuration methods to handle events from libCEC.
This is the pure-C# replacement for the C++/CLI CecCallbackMethods. It keeps managed delegates alive for the lifetime of the object (they must not be collected while native code holds their function pointers) and builds an ICECCallbacks table in unmanaged memory that is handed to libCEC.
public class CecCallbackMethods : IDisposable
- Inheritance
-
CecCallbackMethods
- Implements
- Inherited Members
Constructors
CecCallbackMethods()
public CecCallbackMethods()
Methods
ConfigurationChanged(LibCECConfiguration)
Called by libCEC to send back an updated configuration to the application.
public virtual int ConfigurationChanged(LibCECConfiguration config)
Parameters
configLibCECConfiguration
Returns
Dispose()
Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.
public void Dispose()
~CecCallbackMethods()
protected ~CecCallbackMethods()
ReceiveAlert(CecAlert, CecParameter)
Called by libCEC to send back an alert message to the application.
public virtual int ReceiveAlert(CecAlert alert, CecParameter data)
Parameters
alertCecAlertdataCecParameter
Returns
ReceiveCommand(CecCommand)
Called by libCEC to send back raw CEC data to the application.
public virtual int ReceiveCommand(CecCommand command)
Parameters
commandCecCommand
Returns
ReceiveKeypress(CecKeypress)
Called by libCEC to send back a key press or release to the application.
public virtual int ReceiveKeypress(CecKeypress key)
Parameters
keyCecKeypress
Returns
ReceiveLogMessage(CecLogMessage)
Called by libCEC to send back a log message to the application.
public virtual int ReceiveLogMessage(CecLogMessage message)
Parameters
messageCecLogMessage
Returns
ReceiveMenuStateChange(CecMenuState)
Called by libCEC to send back a menu state change to the application.
public virtual int ReceiveMenuStateChange(CecMenuState newVal)
Parameters
newValCecMenuState
Returns
SourceActivated(CecLogicalAddress, bool)
Called by libCEC to notify the application that a source was (de)activated.
public virtual void SourceActivated(CecLogicalAddress logicalAddress, bool activated)
Parameters
logicalAddressCecLogicalAddressactivatedbool