BluetoothChooser

BluetoothChooser

Synopsis

#define             BLUETOOTH_GET_CHOOSER_CLASS         (obj)
                    BluetoothChooser;
GtkWidget *         bluetooth_chooser_new               (const gchar *title);
void                bluetooth_chooser_set_title         (BluetoothChooser *self,
                                                         const char *title);
gchar *             bluetooth_chooser_get_selected_device
                                                        (BluetoothChooser *self);
gchar *             bluetooth_chooser_get_selected_device_name
                                                        (BluetoothChooser *self);
gchar *             bluetooth_chooser_get_selected_device_icon
                                                        (BluetoothChooser *self);
void                bluetooth_chooser_start_discovery   (BluetoothChooser *self);

Object Hierarchy

  GObject
   +----GInitiallyUnowned
         +----GtkObject
               +----GtkWidget
                     +----GtkContainer
                           +----GtkBox
                                 +----GtkVBox
                                       +----BluetoothChooser

Implemented Interfaces

BluetoothChooser implements GtkBuildable, GtkOrientable and AtkImplementorIface.

Properties

  "device-category-filter"   gint                  : Read / Write
  "device-selected"          gchar*                : Read
  "device-selected-icon"     gchar*                : Read
  "device-selected-name"     gchar*                : Read
  "device-selected-type"     guint                 : Read
  "device-type-filter"       gint                  : Read / Write
  "show-device-category"     gboolean              : Read / Write
  "show-device-type"         gboolean              : Read / Write
  "show-pairing"             gboolean              : Read / Write
  "show-search"              gboolean              : Read / Write
  "title"                    gchar*                : Write

Signals

  "selected-device-changed"                        : Run Last

Description

Details

BLUETOOTH_GET_CHOOSER_CLASS()

#define             BLUETOOTH_GET_CHOOSER_CLASS(obj)

obj :


BluetoothChooser

typedef struct _BluetoothChooser BluetoothChooser;


bluetooth_chooser_new ()

GtkWidget *         bluetooth_chooser_new               (const gchar *title);

title :

the widget header title

Returns :

A BluetoothChooser widget

bluetooth_chooser_set_title ()

void                bluetooth_chooser_set_title         (BluetoothChooser *self,
                                                         const char *title);

self :

a BluetoothChooser widget

title :

the widget header title

bluetooth_chooser_get_selected_device ()

gchar *             bluetooth_chooser_get_selected_device
                                                        (BluetoothChooser *self);

self :

a BluetoothChooser widget

Returns :

the Bluetooth address for the currently selected device, or NULL

bluetooth_chooser_get_selected_device_name ()

gchar *             bluetooth_chooser_get_selected_device_name
                                                        (BluetoothChooser *self);

self :

a BluetoothChooser widget

Returns :

the name for the currently selected device, or NULL

bluetooth_chooser_get_selected_device_icon ()

gchar *             bluetooth_chooser_get_selected_device_icon
                                                        (BluetoothChooser *self);

self :

a BluetoothChooser widget

Returns :

the icon name to use to represent the currently selected device, or NULL

bluetooth_chooser_start_discovery ()

void                bluetooth_chooser_start_discovery   (BluetoothChooser *self);

Starts a discovery on the default Bluetooth adapter. Note that this will only work if the Search button is visible, as otherwise the user has no visual feedback that the process is on-going.

See also: "show-search"

self :

a BluetoothChooser widget

Property Details

The "device-category-filter" property

  "device-category-filter"   gint                  : Read / Write

FIXME

Allowed values: [0,4]

Default value: 0


The "device-selected" property

  "device-selected"          gchar*                : Read

the Bluetooth address for the currently selected device, or NULL

Default value: NULL


The "device-selected-icon" property

  "device-selected-icon"     gchar*                : Read

the icon name to use to represent the currently selected device, or NULL

Default value: NULL


The "device-selected-name" property

  "device-selected-name"     gchar*                : Read

the name for the currently selected device

Default value: NULL


The "device-selected-type" property

  "device-selected-type"     guint                 : Read

the currently selected device's type, or 0

Allowed values: [1,2048]

Default value: 1


The "device-type-filter" property

  "device-type-filter"       gint                  : Read / Write

FIXME

Allowed values: [1,2048]

Default value: 1


The "show-device-category" property

  "show-device-category"     gboolean              : Read / Write

Whether to show the device category filter

Default value: TRUE


The "show-device-type" property

  "show-device-type"         gboolean              : Read / Write

Whether to show the device type filter

Default value: TRUE


The "show-pairing" property

  "show-pairing"             gboolean              : Read / Write

Whether to show the pairing column in the tree.

Default value: FALSE


The "show-search" property

  "show-search"              gboolean              : Read / Write

Whether to show the Search button, this is necessary if you want to programmatically start a discovery, using bluetooth_chooser_start_discovery()

Default value: FALSE


The "title" property

  "title"                    gchar*                : Write

The widget header title.

Default value: NULL

Signal Details

The "selected-device-changed" signal

void                user_function                      (BluetoothChooser *arg0,
                                                        gchar            *arg1,
                                                        gpointer          user_data)      : Run Last

bluetoothchooser: a BluetoothChooser widget arg1: the Bluetooth address for the currently selected device, or NULL

The "selected-device-changed" signal is launched when the selected device is changed, it will be NULL is a device was unselected.

user_data :

user data set when the signal handler was connected.