Table of Contents

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

config LibCECConfiguration

Returns

int

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

alert CecAlert
data CecParameter

Returns

int

ReceiveCommand(CecCommand)

Called by libCEC to send back raw CEC data to the application.

public virtual int ReceiveCommand(CecCommand command)

Parameters

command CecCommand

Returns

int

ReceiveKeypress(CecKeypress)

Called by libCEC to send back a key press or release to the application.

public virtual int ReceiveKeypress(CecKeypress key)

Parameters

key CecKeypress

Returns

int

ReceiveLogMessage(CecLogMessage)

Called by libCEC to send back a log message to the application.

public virtual int ReceiveLogMessage(CecLogMessage message)

Parameters

message CecLogMessage

Returns

int

ReceiveMenuStateChange(CecMenuState)

Called by libCEC to send back a menu state change to the application.

public virtual int ReceiveMenuStateChange(CecMenuState newVal)

Parameters

newVal CecMenuState

Returns

int

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

logicalAddress CecLogicalAddress
activated bool