BtIcDevice

BtIcDevice — buzztards interaction controller device

Synopsis

#include <libbtic/ic.h>

                    BtIcDevice;
void                btic_device_add_control             (const BtIcDevice *self,
                                                         const BtIcControl *control);
gboolean            btic_device_start                   (const BtIcDevice *self);
gboolean            btic_device_stop                    (const BtIcDevice *self);
gboolean            (*btic_device_virtual_start)        (gconstpointer self);
gboolean            (*btic_device_virtual_stop)         (gconstpointer self);

Object Hierarchy

  GObject
   +----BtIcDevice
         +----BtIcInputDevice
         +----BtIcMidiDevice

Properties

  "controls"                 gpointer              : Read
  "name"                     gchar*                : Read / Write / Construct Only
  "udi"                      gchar*                : Read / Write / Construct Only

Description

Abstract base class for control devices. Subclasses will provide functionality to query capabilities and register BtIcControl instances. They will also read from the device and trigger the change events on their controls (via value property).

Details

BtIcDevice

typedef struct _BtIcDevice BtIcDevice;

buzztards interaction controller device


btic_device_add_control ()

void                btic_device_add_control             (const BtIcDevice *self,
                                                         const BtIcControl *control);

Add the given control to the list that the device manages.

self :

the device

control :

new control

btic_device_start ()

gboolean            btic_device_start                   (const BtIcDevice *self);

Starts the io-loop for the device. This can be called multiple times and must be paired by an equal amount of btic_device_stop() calls.

self :

the BtIcDevice instance to use

Returns :

TRUE for success

btic_device_stop ()

gboolean            btic_device_stop                    (const BtIcDevice *self);

Stops the io-loop for the device. This must be called as often as the device has been started using btic_device_start().

self :

the BtIcDevice instance to use

Returns :

TRUE for success

btic_device_virtual_start ()

gboolean            (*btic_device_virtual_start)        (gconstpointer self);

Subclasses will override this methods with a function that counts start calls and runs the device-io for starts>0.

self :

device instance

Returns :

TRUE for success

btic_device_virtual_stop ()

gboolean            (*btic_device_virtual_stop)         (gconstpointer self);

Subclasses will override this methods with a function that counts stop calls and stops the device-io for starts==0.

self :

device instance

Returns :

TRUE for success

Property Details

The "controls" property

  "controls"                 gpointer              : Read

A copy of the list of device controls.


The "name" property

  "name"                     gchar*                : Read / Write / Construct Only

device name.

Default value: NULL


The "udi" property

  "udi"                      gchar*                : Read / Write / Construct Only

device udi.

Default value: NULL