BtIcLearn

BtIcLearn — interface for devices with learn function

Synopsis

#include <libbtic/ic.h>

                    BtIcLearn;
gboolean            btic_learn_start                    (const BtIcLearn *self);
gboolean            btic_learn_stop                     (const BtIcLearn *self);
BtIcControl*        btic_learn_register_learned_control (const BtIcLearn *self,
                                                         const gchar *name);
gboolean            (*btic_learn_virtual_start)         (gconstpointer self);
gboolean            (*btic_learn_virtual_stop)          (gconstpointer self);
BtIcControl *       (*btic_learn_virtual_register_learned_control)
                                                        (gconstpointer self,
                                                         const gchar *name);

Object Hierarchy

  GInterface
   +----BtIcLearn

Known Implementations

BtIcLearn is implemented by BtIcMidiDevice.

Properties

  "device-controlchange"     gchar*                : Read / Write

Description

An interface which all devices which support interactive learning of controls should implement.

Details

BtIcLearn

typedef struct _BtIcLearn BtIcLearn;

interface for devices which implement a learn-function


btic_learn_start ()

gboolean            btic_learn_start                    (const BtIcLearn *self);

Starts the device if needed and enables the learn function. Starts emission of notify::devide-controlchange signals.

self :

the device which implements the BtIcLearn interface

Returns :

TRUE for success

btic_learn_stop ()

gboolean            btic_learn_stop                     (const BtIcLearn *self);

Eventually stops the device and disables the learn function. Stops emission of notify::devide-controlchange signals.

self :

the device which implements the BtIcLearn interface

Returns :

TRUE for success

btic_learn_register_learned_control ()

BtIcControl*        btic_learn_register_learned_control (const BtIcLearn *self,
                                                         const gchar *name);

Registers the last detected control with name name.

self :

the device which implements the BtIcLearn interface

name :

the name under which to register the control

Returns :

TRUE for success

btic_learn_virtual_start ()

gboolean            (*btic_learn_virtual_start)         (gconstpointer self);

Subclasses will override this methods with a function which enables the learning mode on this device.

self :

device instance

Returns :

TRUE for success

btic_learn_virtual_stop ()

gboolean            (*btic_learn_virtual_stop)          (gconstpointer self);

Subclasses will override this methods with a function which disables the learning mode on this device.

self :

device instance

Returns :

TRUE for success

btic_learn_virtual_register_learned_control ()

BtIcControl *       (*btic_learn_virtual_register_learned_control)
                                                        (gconstpointer self,
                                                         const gchar *name);

Subclasses will override this methods with a function which registers the last control which was detected in learn mode.

self :

device instance

name :

the name under which to register the control

Returns :

TRUE for success

Property Details

The "device-controlchange" property

  "device-controlchange"     gchar*                : Read / Write

get the last detected control.

Default value: NULL