[gnome-bluetooth] Add a private header to expose some of the choosers members



commit bf2a04c3ec7fdadac917177f4bfa1f7aa66114bb
Author: Joshua Lock <josh linux intel com>
Date:   Wed Sep 23 17:15:20 2009 +0100

    Add a private header to expose some of the choosers members
    
    bluetooth-chooser-private.h is used to expose some of the choosers
    private member variables that may be useful within the gnome-bluetooth
    code
    
    https://bugzilla.gnome.org/show_bug.cgi?id=596090

 docs/reference/libgnome-bluetooth/Makefile.am |    2 +-
 lib/Makefile.am                               |    1 +
 lib/bluetooth-chooser-private.h               |   16 +++++++++++++
 lib/bluetooth-chooser.c                       |   29 +++++++++++++++++++++++++
 lib/gnome-bluetooth.symbols                   |    2 +
 5 files changed, 49 insertions(+), 1 deletions(-)
---
diff --git a/docs/reference/libgnome-bluetooth/Makefile.am b/docs/reference/libgnome-bluetooth/Makefile.am
index 902d4aa..cca48b2 100644
--- a/docs/reference/libgnome-bluetooth/Makefile.am
+++ b/docs/reference/libgnome-bluetooth/Makefile.am
@@ -54,7 +54,7 @@ CFILE_GLOB=$(top_srcdir)/lib/*.c
 
 # Header files to ignore when scanning.
 # e.g. IGNORE_HFILES=gtkdebug.h gtkintl.h
-IGNORE_HFILES=bluetooth-agent-glue.h bluetooth-agent.h bluetooth-client-glue.h bluetooth-client-private.h bluetooth-instance-glue.h bluetooth-instance.h helper.h marshal.h obex-agent-glue.h obex-agent.h
+IGNORE_HFILES=bluetooth-agent-glue.h bluetooth-agent.h bluetooth-client-glue.h bluetooth-client-private.h bluetooth-chooser-private.h bluetooth-instance-glue.h bluetooth-instance.h helper.h marshal.h obex-agent-glue.h obex-agent.h
 
 # Images to copy into HTML directory.
 # e.g. HTML_IMAGES=$(top_srcdir)/gtk/stock-icons/stock_about_24.png
diff --git a/lib/Makefile.am b/lib/Makefile.am
index 0f82ccd..f4dea76 100644
--- a/lib/Makefile.am
+++ b/lib/Makefile.am
@@ -30,6 +30,7 @@ libgnome_bluetooth_la_SOURCES =				\
 	gnome-bluetooth-enum-types.c			\
 	bling-spinner.c bling-spinner.h			\
 	bluetooth-chooser.c bluetooth-chooser.h		\
+	bluetooth-chooser-private.h			\
 	bluetooth-chooser-button.c bluetooth-chooser-button.h
 
 libgnome_bluetooth_la_LIBADD = $(LIBGNOMEBT_LIBS)
diff --git a/lib/bluetooth-chooser-private.h b/lib/bluetooth-chooser-private.h
new file mode 100644
index 0000000..95d09ee
--- /dev/null
+++ b/lib/bluetooth-chooser-private.h
@@ -0,0 +1,16 @@
+#ifndef __BLUETOOTH_CHOOSER_PRIVATE_H
+#define __BLUETOOTH_CHOOSER_PRIVATE_H
+
+#include <glib-object.h>
+#include <gtk/gtk.h>
+#include <dbus/dbus-glib.h>
+#include <bluetooth-enums.h>
+
+G_BEGIN_DECLS
+
+GtkTreeModel *bluetooth_chooser_get_model (BluetoothChooser *self);
+GtkTreeViewColumn *bluetooth_chooser_get_device_column (BluetoothChooser *self);
+
+G_END_DECLS
+
+#endif /* __BLUETOOTH_CHOOSER_PRIVATE_H */
diff --git a/lib/bluetooth-chooser.c b/lib/bluetooth-chooser.c
index 6ce95b1..3a5118c 100644
--- a/lib/bluetooth-chooser.c
+++ b/lib/bluetooth-chooser.c
@@ -33,6 +33,7 @@
 #include "bluetooth-client.h"
 #include "bluetooth-client-private.h"
 #include "bluetooth-chooser.h"
+#include "bluetooth-chooser-private.h"
 #include "gnome-bluetooth-enum-types.h"
 #include "bling-spinner.h"
 
@@ -365,6 +366,34 @@ bluetooth_chooser_get_selected_device_info (BluetoothChooser *self,
 }
 
 /**
+ * bluetooth_chooser_get_model:
+ * @self: A BluetoothChooser widget.
+ *
+ * Return value: The BluetoothChooser's GtkTreeModel.
+ **/
+GtkTreeModel *
+bluetooth_chooser_get_model (BluetoothChooser *self)
+{
+	BluetoothChooserPrivate *priv = BLUETOOTH_CHOOSER_GET_PRIVATE(self);
+	
+	return priv->model;
+}
+
+/**
+ * bluetooth_chooser_get_device_column:
+ * @self: A BluetoothChooser widget.
+ *
+ * Return value: A GtkTreeViewColumn pointer to the device column of the BluetoothChooser.
+ **/
+GtkTreeViewColumn *
+bluetooth_chooser_get_device_column (BluetoothChooser *self)
+{
+	BluetoothChooserPrivate *priv = BLUETOOTH_CHOOSER_GET_PRIVATE(self);
+	
+	return gtk_tree_view_get_column (GTK_TREE_VIEW (priv->treeview), 0);
+}
+
+/**
  * bluetooth_chooser_set_title:
  * @self: a BluetoothChooser widget.
  * @title: the widget header title.
diff --git a/lib/gnome-bluetooth.symbols b/lib/gnome-bluetooth.symbols
index f99f0e4..1accadf 100644
--- a/lib/gnome-bluetooth.symbols
+++ b/lib/gnome-bluetooth.symbols
@@ -7,6 +7,8 @@ bluetooth_chooser_get_selected_device_name
 bluetooth_chooser_get_selected_device_icon
 bluetooth_chooser_get_selected_device_type
 bluetooth_chooser_get_selected_device_is_connected
+bluetooth_chooser_get_model
+bluetooth_chooser_get_device_column
 bluetooth_chooser_start_discovery
 bluetooth_chooser_stop_discovery
 bluetooth_chooser_button_get_type



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]