![]() |
![]() |
![]() |
gnome-bluetooth Reference Manual | ![]() |
---|---|---|---|---|
Top | Description | Object Hierarchy | Implemented Interfaces | Properties | Signals |
#include <bluetooth-plugin.h> #define BLUETOOTH_GET_CHOOSER_CLASS (obj) BluetoothChooser; GtkWidget * bluetooth_chooser_new (const char *title); void bluetooth_chooser_set_title (BluetoothChooser *self, const char *title); char * bluetooth_chooser_get_selected_device (BluetoothChooser *self); gboolean bluetooth_chooser_get_selected_device_info (BluetoothChooser *self, const char *field, GValue *value); char * bluetooth_chooser_get_selected_device_name (BluetoothChooser *self); char * bluetooth_chooser_get_selected_device_icon (BluetoothChooser *self); BluetoothType bluetooth_chooser_get_selected_device_type (BluetoothChooser *self); gboolean bluetooth_chooser_get_selected_device_is_connected (BluetoothChooser *self); void bluetooth_chooser_start_discovery (BluetoothChooser *self); void bluetooth_chooser_stop_discovery (BluetoothChooser *self);
GObject +----GInitiallyUnowned +----GtkObject +----GtkWidget +----GtkContainer +----GtkBox +----GtkVBox +----BluetoothChooser
BluetoothChooser implements GtkBuildable, AtkImplementorIface and GtkOrientable.
"device-category-filter" BluetoothCategory : Read / Write / Construct "device-selected" gchar* : Read / Write "device-service-filter" gchar* : Write "device-type-filter" gint : Read / Write / Construct "has-internal-device-filter" gboolean : Read / Write / Construct Only "show-connected" gboolean : Read / Write "show-device-category" gboolean : Read / Write / Construct "show-device-type" gboolean : Read / Write / Construct "show-pairing" gboolean : Read / Write "show-searching" gboolean : Read / Write "title" gchar* : Write
GtkWidget * bluetooth_chooser_new (const char *title);
Returns a new BluetoothChooser widget.
|
the widget header title, if NULL , the widget header will be hidden.
|
Returns : |
A BluetoothChooser widget |
void bluetooth_chooser_set_title (BluetoothChooser *self, const char *title);
Sets the BluetoothChooser's title.
|
a BluetoothChooser widget. |
|
the widget header title. |
char * bluetooth_chooser_get_selected_device (BluetoothChooser *self);
Returns the Bluetooth address for the currently selected device.
|
a BluetoothChooser widget. |
Returns : |
the Bluetooth address for the currently selected device, or NULL .
|
gboolean bluetooth_chooser_get_selected_device_info (BluetoothChooser *self, const char *field, GValue *value);
Returns whether the value
has been set.
|
A BluetoothChooser widget. |
|
The identifier for the field to get data for. |
|
An empty GValue to set. |
Returns : |
TRUE if the value has been set.
|
char * bluetooth_chooser_get_selected_device_name (BluetoothChooser *self);
Returns the name for the currently selected device.
|
a BluetoothChooser widget. |
Returns : |
the name for the currently selected device, or NULL .
|
char * bluetooth_chooser_get_selected_device_icon (BluetoothChooser *self);
Returns the icon name to use to represent the currently selected device.
|
a BluetoothChooser widget. |
Returns : |
the icon name to use to represent the currently selected device, or NULL .
|
BluetoothType bluetooth_chooser_get_selected_device_type (BluetoothChooser *self);
Returns the BluetoothType of the device selected.
|
a BluetoothChooser widget. |
Returns : |
the BluetoothType of the device selected, or '0' if unknown. |
gboolean bluetooth_chooser_get_selected_device_is_connected (BluetoothChooser *self);
Returns whether the selected device is connected to this computer.
|
a BluetoothChooser widget. |
Returns : |
whether the selected device is connected to this computer,
will always be FALSE if no devices are selected.
|
void bluetooth_chooser_start_discovery (BluetoothChooser *self);
Starts a discovery on the default Bluetooth adapter. Note that this will only work if the Search label is visible, as otherwise the user has no visual feedback that the process is on-going.
See also: "show-searching"
|
a BluetoothChooser widget. |
void bluetooth_chooser_stop_discovery (BluetoothChooser *self);
Stops a discovery started with bluetooth_chooser_start_discovery.
|
a BluetoothChooser widget. |
"device-category-filter"
property"device-category-filter" BluetoothCategory : Read / Write / Construct
The #BluetoothCategory to show.
Default value: BLUETOOTH_CATEGORY_ALL
"device-selected"
property"device-selected" gchar* : Read / Write
the Bluetooth address for the currently selected device, or %NULL.
Default value: NULL
"device-service-filter"
property"device-service-filter" gchar* : Write
A string representing the service to filter for.
Default value: NULL
"device-type-filter"
property"device-type-filter" gint : Read / Write / Construct
A bitmask of #BluetoothType to show.
Allowed values: [1,16383]
Default value: 1
"has-internal-device-filter"
property"has-internal-device-filter" gboolean : Read / Write / Construct Only
Whether the #BluetoothChooser should be constructed with a visible #BluetoothFilterWidget.
Default value: TRUE
"show-connected"
property"show-connected" gboolean : Read / Write
Whether to show the connected column in the tree.
Default value: FALSE
"show-device-category"
property"show-device-category" gboolean : Read / Write / Construct
Whether to show the device category filter.
Default value: TRUE
"show-device-type"
property"show-device-type" gboolean : Read / Write / Construct
Whether to show the device type filter.
Default value: TRUE
"show-pairing"
property"show-pairing" gboolean : Read / Write
Whether to show the pairing column in the tree.
Default value: FALSE
"show-searching"
property"show-searching" gboolean : Read / Write
Whether to show the Searching label , this is necessary if you want to programmatically start a discovery, using bluetooth_chooser_start_discovery().
Default value: FALSE
"selected-device-changed"
signalvoid user_function (BluetoothChooser *chooser, gchar *address, gpointer user_data) : Run Last
The "selected-device-changed" signal is launched when the
selected device is changed, it will be NULL
if a device was unselected.
|
a BluetoothChooser widget which received the signal |
|
the Bluetooth address for the currently selected device, or NULL
|
|
user data set when the signal handler was connected. |