[gnome-keyring/introspection: 5/5] gcr: Partially complete gobject introspection annotations for gcr library



commit 2fb91609de57a19b488dea3e03fce86073c1d045
Author: Stef Walter <stefw collabora co uk>
Date:   Wed Sep 28 14:26:14 2011 +0200

    gcr: Partially complete gobject introspection annotations for gcr library
    
    https://bugzilla.gnome.org/show_bug.cgi?id=655651

 gcr/Makefile.am                |   20 ++++++++++----------
 gcr/gcr-certificate-chain.c    |    4 ++--
 gcr/gcr-certificate-renderer.c |    4 ++--
 gcr/gcr-certificate-widget.c   |    4 ++--
 gcr/gcr-certificate.c          |   26 +++++++++++++++-----------
 gcr/gcr-certificate.h          |    6 +++---
 gcr/gcr-collection-model.c     |    4 ++--
 gcr/gcr-collection.c           |    4 ++--
 gcr/gcr-combo-selector.c       |    4 ++--
 gcr/gcr-key-renderer.c         |    2 +-
 gcr/gcr-library.c              |   16 +++++++++-------
 gcr/gcr-list-selector.c        |    4 ++--
 gcr/gcr-parser.c               |   10 +++++-----
 gcr/gcr-parser.h               |    2 +-
 gcr/gcr-pkcs11-certificate.c   |    6 +++---
 gcr/gcr-renderer.c             |    4 ++--
 gcr/gcr-simple-certificate.c   |    8 ++++----
 gcr/gcr-simple-collection.c    |    6 +++---
 gcr/gcr-tree-selector.c        |   15 ++++++++-------
 gcr/gcr-types.h                |   13 +++++++++++++
 gcr/gcr-union-collection.c     |    4 ++--
 gcr/gcr-viewer.c               |   12 ++++++------
 22 files changed, 99 insertions(+), 79 deletions(-)
---
diff --git a/gcr/Makefile.am b/gcr/Makefile.am
index 63c4636..d6632ee 100644
--- a/gcr/Makefile.am
+++ b/gcr/Makefile.am
@@ -294,19 +294,19 @@ if HAVE_INTROSPECTION
 
 include $(INTROSPECTION_MAKEFILE)
 
-INTROSPECTION_GIRS = Gcr- GCR_MAJOR@  GCR_MINOR@.gir
-INTROSPECTION_SCANNER_ARGS = --warn-all --add-include-path=$(srcdir) --add-include-path=.
+INTROSPECTION_GIRS = Gcr- GCR_MAJOR@.gir
+INTROSPECTION_SCANNER_ARGS = $(INTROSPECTION_FLAGS) --warn-all --add-include-path=$(srcdir) --add-include-path=.
 INTROSPECTION_COMPILER_ARGS = --includedir=$(srcdir) --includedir=.
 
-Gcr- GCR_MAJOR@  GCR_MINOR@.gir: libgcr- GCR_MAJOR@.la
+Gcr- GCR_MAJOR@.gir: libgcr- GCR_MAJOR@.la
 
-Gcr_ GCR_MAJOR@_ GCR_MINOR@_gir_PACKAGES = gobject-2.0 gtk+-3.0 p11-kit-1
-Gcr_ GCR_MAJOR@_ GCR_MINOR@_gir_EXPORT_PACKAGES = gcr-3
-Gcr_ GCR_MAJOR@_ GCR_MINOR@_gir_INCLUDES = GObject-2.0 Gtk-3.0
-Gcr_ GCR_MAJOR@_ GCR_MINOR@_gir_LIBS = libgcr- GCR_MAJOR@.la
-Gcr_ GCR_MAJOR@_ GCR_MINOR@_gir_CFLAGS = -I$(top_srcdir) -I$(top_builddir) -DGCR_COMPILATION -DGCR_API_SUBJECT_TO_CHANGE
-Gcr_ GCR_MAJOR@_ GCR_MINOR@_gir_FILES = $(libgcr_ GCR_MAJOR@_la_SOURCES)
-Gcr_ GCR_MAJOR@_ GCR_MINOR@_gir_SCANNERFLAGS = --c-include "gcr.h"
+Gcr_ GCR_MAJOR@_gir_PACKAGES = gobject-2.0 gtk+-3.0 p11-kit-1
+Gcr_ GCR_MAJOR@_gir_EXPORT_PACKAGES = gcr-3
+Gcr_ GCR_MAJOR@_gir_INCLUDES = GObject-2.0 Gtk-3.0
+Gcr_ GCR_MAJOR@_gir_LIBS = libgcr-base- GCR_MAJOR@.la libgcr- GCR_MAJOR@.la
+Gcr_ GCR_MAJOR@_gir_CFLAGS = -I$(top_srcdir) -I$(top_builddir) -DGCR_COMPILATION -DGCR_API_SUBJECT_TO_CHANGE
+Gcr_ GCR_MAJOR@_gir_FILES = $(libgcr_base_ GCR_MAJOR@_la_SOURCES) $(libgcr_ GCR_MAJOR@_la_SOURCES)
+Gcr_ GCR_MAJOR@_gir_SCANNERFLAGS = --c-include "gcr.h" --c-include "gcr-base.h"
 
 girdir = $(datadir)/gir-1.0
 gir_DATA = $(INTROSPECTION_GIRS)
diff --git a/gcr/gcr-certificate-chain.c b/gcr/gcr-certificate-chain.c
index f993c74..e18c2ec 100644
--- a/gcr/gcr-certificate-chain.c
+++ b/gcr/gcr-certificate-chain.c
@@ -583,9 +583,9 @@ gcr_certificate_chain_get_status (GcrCertificateChain *self)
  * If an anchor is returned it does not mean that the certificate chain has
  * been verified, but merely that an anchor has been found.
  *
- * Returns: the anchor certificate, or NULL if not anchored.
+ * Returns: (transfer full): the anchor certificate, or NULL if not anchored.
  */
-GcrCertificate*
+GcrCertificate *
 gcr_certificate_chain_get_anchor (GcrCertificateChain *self)
 {
 	g_return_val_if_fail (GCR_IS_CERTIFICATE_CHAIN (self), NULL);
diff --git a/gcr/gcr-certificate-renderer.c b/gcr/gcr-certificate-renderer.c
index 4516199..f374536 100644
--- a/gcr/gcr-certificate-renderer.c
+++ b/gcr/gcr-certificate-renderer.c
@@ -824,9 +824,9 @@ gcr_certificate_renderer_new_for_attributes (const gchar *label, struct _GckAttr
  * explicitly set, then the renderer will return itself since it acts as
  * a valid certificate.
  *
- * Returns: The certificate, owned by the renderer.
+ * Returns: (transfer full): The certificate, owned by the renderer.
  */
-GcrCertificate*
+GcrCertificate *
 gcr_certificate_renderer_get_certificate (GcrCertificateRenderer *self)
 {
 	g_return_val_if_fail (GCR_IS_CERTIFICATE_RENDERER (self), NULL);
diff --git a/gcr/gcr-certificate-widget.c b/gcr/gcr-certificate-widget.c
index 533f065..24dc6ee 100644
--- a/gcr/gcr-certificate-widget.c
+++ b/gcr/gcr-certificate-widget.c
@@ -211,9 +211,9 @@ gcr_certificate_widget_new (GcrCertificate *certificate)
  *
  * Get the certificate displayed in the widget.
  *
- * Returns: The certificate.
+ * Returns: (transfer full): The certificate.
  */
-GcrCertificate*
+GcrCertificate *
 gcr_certificate_widget_get_certificate (GcrCertificateWidget *self)
 {
 	g_return_val_if_fail (GCR_IS_CERTIFICATE_WIDGET (self), NULL);
diff --git a/gcr/gcr-certificate.c b/gcr/gcr-certificate.c
index c4728ea..662b62e 100644
--- a/gcr/gcr-certificate.c
+++ b/gcr/gcr-certificate.c
@@ -445,10 +445,11 @@ gcr_certificate_compare (GcrComparable *first, GcrComparable *other)
  * 
  * Gets the raw DER data for an X.509 certificate.
  * 
- * Returns: raw DER data of the X.509 certificate.
+ * Returns: (array length=n_data): raw DER data of the X.509 certificate
  **/
-gconstpointer
-gcr_certificate_get_der_data (GcrCertificate *self, gsize *n_data)
+const guchar *
+gcr_certificate_get_der_data (GcrCertificate *self,
+                              gsize *n_data)
 {
 	g_return_val_if_fail (GCR_IS_CERTIFICATE (self), NULL);
 	g_return_val_if_fail (GCR_CERTIFICATE_GET_INTERFACE (self)->get_der_data, NULL);
@@ -521,10 +522,12 @@ _gcr_certificate_get_issuer_const (GcrCertificate *self, gsize *n_data)
  *
  * The data should be freed by using g_free() when no longer required.
  *
- * Returns: allocated memory containing the raw issuer.
+ * Returns: (transfer full) (array length=n_data): allocated memory containing
+ *          the raw issuer
  */
-gpointer
-gcr_certificate_get_issuer_raw (GcrCertificate *self, gsize *n_data)
+guchar *
+gcr_certificate_get_issuer_raw (GcrCertificate *self,
+                                gsize *n_data)
 {
 	gconstpointer data;
 
@@ -682,9 +685,10 @@ _gcr_certificate_get_subject_const (GcrCertificate *self, gsize *n_data)
  *
  * The data should be freed by using g_free() when no longer required.
  *
- * Returns: allocated memory containing the raw subject.
+ * Returns: (transfer full) (array length=n_data): allocated memory containing
+ *          the raw subject
  */
-gpointer
+guchar *
 gcr_certificate_get_subject_raw (GcrCertificate *self, gsize *n_data)
 {
 	GcrCertificateInfo *info;
@@ -926,10 +930,10 @@ gcr_certificate_get_serial_number_hex (GcrCertificate *self)
  *
  * Get the icon for a certificate.
  *
- * Returns: The icon for this certificate, which should be released with
- *     g_object_unref().
+ * Returns: (transfer full): the icon for this certificate, which should be
+ *          released with g_object_unref()
  */
-GIcon*
+GIcon *
 gcr_certificate_get_icon (GcrCertificate *self)
 {
 	g_return_val_if_fail (GCR_IS_CERTIFICATE (self), FALSE);
diff --git a/gcr/gcr-certificate.h b/gcr/gcr-certificate.h
index 43cba42..b574a23 100644
--- a/gcr/gcr-certificate.h
+++ b/gcr/gcr-certificate.h
@@ -61,7 +61,7 @@ struct _GcrCertificateIface {
 
 GType               gcr_certificate_get_type               (void);
 
-gconstpointer       gcr_certificate_get_der_data           (GcrCertificate *self,
+const guchar *      gcr_certificate_get_der_data           (GcrCertificate *self,
                                                             gsize *n_data);
 
 const GcrColumn*    gcr_certificate_get_columns            (void);
@@ -76,7 +76,7 @@ gchar*              gcr_certificate_get_issuer_dn          (GcrCertificate *self
 gchar*              gcr_certificate_get_issuer_part        (GcrCertificate *self, 
                                                             const gchar *part);
 
-gpointer            gcr_certificate_get_issuer_raw         (GcrCertificate *self,
+guchar *            gcr_certificate_get_issuer_raw         (GcrCertificate *self,
                                                             gsize *n_data);
 
 gboolean            gcr_certificate_is_issuer              (GcrCertificate *self,
@@ -89,7 +89,7 @@ gchar*              gcr_certificate_get_subject_dn         (GcrCertificate *self
 gchar*              gcr_certificate_get_subject_part       (GcrCertificate *self, 
                                                             const gchar *part);
 
-gpointer            gcr_certificate_get_subject_raw        (GcrCertificate *self,
+guchar *            gcr_certificate_get_subject_raw        (GcrCertificate *self,
                                                             gsize *n_data);
 
 GDate*              gcr_certificate_get_issued_date        (GcrCertificate *self);
diff --git a/gcr/gcr-collection-model.c b/gcr/gcr-collection-model.c
index 21b3fef..71176e3 100644
--- a/gcr/gcr-collection-model.c
+++ b/gcr/gcr-collection-model.c
@@ -1358,9 +1358,9 @@ gcr_collection_model_get_collection (GcrCollectionModel *self)
  *
  * Get the object that is represented by the given row in the model.
  *
- * Returns: The object, owned by the model.
+ * Returns: (transfer none): The object, owned by the model.
  */
-GObject*
+GObject *
 gcr_collection_model_object_for_iter (GcrCollectionModel *self, const GtkTreeIter *iter)
 {
 	g_return_val_if_fail (GCR_IS_COLLECTION_MODEL (self), NULL);
diff --git a/gcr/gcr-collection.c b/gcr/gcr-collection.c
index 61b75cc..2116a45 100644
--- a/gcr/gcr-collection.c
+++ b/gcr/gcr-collection.c
@@ -130,8 +130,8 @@ gcr_collection_get_length (GcrCollection *self)
  *
  * Get a list of the objects in this collection.
  *
- * Returns: A list of the objects in this collection, which should be freed
- *     with g_list_free().
+ * Returns: (transfer container) (element-type Object): a list of the objects
+ *          in this collection, which should be freed with g_list_free()
  */
 GList*
 gcr_collection_get_objects (GcrCollection *self)
diff --git a/gcr/gcr-combo-selector.c b/gcr/gcr-combo-selector.c
index bc33e78..a50eea6 100644
--- a/gcr/gcr-combo-selector.c
+++ b/gcr/gcr-combo-selector.c
@@ -216,9 +216,9 @@ gcr_combo_selector_new (GcrCollection *collection)
  *
  * Get the collection that this selector is displaying objects from.
  *
- * Returns: The collection, owned by the selector.
+ * Returns: (transfer none): The collection, owned by the selector.
  */
-GcrCollection*
+GcrCollection *
 gcr_combo_selector_get_collection (GcrComboSelector *self)
 {
 	g_return_val_if_fail (GCR_IS_COMBO_SELECTOR (self), NULL);
diff --git a/gcr/gcr-key-renderer.c b/gcr/gcr-key-renderer.c
index b9248fd..cbbdab4 100644
--- a/gcr/gcr-key-renderer.c
+++ b/gcr/gcr-key-renderer.c
@@ -394,7 +394,7 @@ gcr_key_renderer_set_attributes (GcrKeyRenderer *self, GckAttributes *attrs)
  *
  * Get the attributes displayed in the renderer.
  *
- * Returns: The attributes, owned by the renderer.
+ * Returns: (transfer none): the attributes, owned by the renderer
  */
 GckAttributes*
 gcr_key_renderer_get_attributes (GcrKeyRenderer *self)
diff --git a/gcr/gcr-library.c b/gcr/gcr-library.c
index 342407a..f94aa0a 100644
--- a/gcr/gcr-library.c
+++ b/gcr/gcr-library.c
@@ -289,7 +289,8 @@ gcr_pkcs11_initialize (GCancellable *cancellable,
  *
  * When done with the list, free it with gck_list_unref_free().
  *
- * Returns: A newly allocated list of #GckModule objects.
+ * Returns: (transfer full) (element-type Gck.Module): a newly allocated list
+ *          of #GckModule objects
  */
 GList*
 gcr_pkcs11_get_modules (void)
@@ -302,7 +303,7 @@ gcr_pkcs11_get_modules (void)
 
 /**
  * gcr_pkcs11_set_modules:
- * @modules: a list of #GckModule
+ * @modules: (element-type Gck.Module): a list of #GckModule
  *
  * Set the list of PKCS\#11 modules that are used by the GCR library.
  * Each module in the list is a #GckModule object.
@@ -392,9 +393,9 @@ gcr_pkcs11_add_module_from_file (const gchar *module_path, gpointer unused,
  *
  * When done with the #GckSlot, use g_object_unref() to release it.
  *
- * Returns: the #GckSlot to use for trust assertions.
+ * Returns: (transfer full): the #GckSlot to use for trust assertions.
  */
-GckSlot*
+GckSlot *
 gcr_pkcs11_get_trust_store_slot (void)
 {
 	GckSlot *slot;
@@ -425,7 +426,8 @@ gcr_pkcs11_get_trust_store_slot (void)
  *
  * When done with the list, free it with gck_list_unref_free().
  *
- * Returns: a list of #GckSlot objects to use for lookup of trust.
+ * Returns: (transfer full) (element-type Gck.Slot): a list of #GckSlot objects
+ *          to use for lookup of trust.
  */
 GList*
 gcr_pkcs11_get_trust_lookup_slots (void)
@@ -496,9 +498,9 @@ gcr_pkcs11_set_trust_store_uri (const gchar *pkcs11_uri)
  * Get the PKCS\#11 URIs that are used to identify which slots to use for
  * lookup trust assertions.
  *
- * Returns: the uri which identifies trust storage slot
+ * Returns: (transfer none): the uri which identifies trust storage slot
  */
-const gchar**
+const gchar **
 gcr_pkcs11_get_trust_lookup_uris (void)
 {
 	initialize_uris ();
diff --git a/gcr/gcr-list-selector.c b/gcr/gcr-list-selector.c
index c9cdbca..7a21b5b 100644
--- a/gcr/gcr-list-selector.c
+++ b/gcr/gcr-list-selector.c
@@ -380,9 +380,9 @@ gcr_list_selector_new (GcrCollection *collection)
  *
  * Get the collection that this selector is displaying objects from.
  *
- * Returns: The collection, owned by the selector.
+ * Returns: (transfer none): The collection, owned by the selector.
  */
-GcrCollection*
+GcrCollection *
 gcr_list_selector_get_collection (GcrListSelector *self)
 {
 	g_return_val_if_fail (GCR_IS_LIST_SELECTOR (self), NULL);
diff --git a/gcr/gcr-parser.c b/gcr/gcr-parser.c
index 95624d0..043018c 100644
--- a/gcr/gcr-parser.c
+++ b/gcr/gcr-parser.c
@@ -2372,8 +2372,8 @@ gcr_parsed_get_description (GcrParsed *parsed)
  * Get the attributes which make up the currently parsed item. This is generally
  * only valid during the GcrParser::parsed signal.
  *
- * Returns: The attributes for the current item. These are owned by the parser
- *     and should not be freed.
+ * Returns: (transfer none): the attributes for the current item, which are
+ *          owned by the parser and should not be freed
  */
 GckAttributes *
 gcr_parser_get_parsed_attributes (GcrParser *self)
@@ -2452,10 +2452,10 @@ gcr_parsed_get_label (GcrParsed *parsed)
  * Get the raw data block that represents this parsed object. This is only
  * valid during the GcrParser::parsed signal.
  *
- * Returns: The raw data block of the currently parsed item. The value is
- *      owned by the parser and should not be freed.
+ * Returns: (transfer none) (array length=n_block): the raw data block of the
+ *      currently parsed item; the value is owned by the parser and should not be freed
  */
-gconstpointer
+const guchar *
 gcr_parser_get_parsed_block (GcrParser *self,
                              gsize *n_block)
 {
diff --git a/gcr/gcr-parser.h b/gcr/gcr-parser.h
index cb2676c..07a054d 100644
--- a/gcr/gcr-parser.h
+++ b/gcr/gcr-parser.h
@@ -107,7 +107,7 @@ const gchar*             gcr_parser_get_parsed_description (GcrParser *self);
 
 GckAttributes*           gcr_parser_get_parsed_attributes  (GcrParser *self);
 
-gconstpointer            gcr_parser_get_parsed_block       (GcrParser *self,
+const guchar *           gcr_parser_get_parsed_block       (GcrParser *self,
                                                             gsize *n_block);
 
 GcrDataFormat            gcr_parser_get_parsed_format      (GcrParser *self);
diff --git a/gcr/gcr-pkcs11-certificate.c b/gcr/gcr-pkcs11-certificate.c
index cb8b107..61129da 100644
--- a/gcr/gcr-pkcs11-certificate.c
+++ b/gcr/gcr-pkcs11-certificate.c
@@ -330,9 +330,9 @@ gcr_certificate_iface (GcrCertificateIface *iface)
  *
  * Access the automatically loaded attributes for this certificate.
  *
- * Returns: the certificate attributes
+ * Returns: (transfer none): the certificate attributes
  */
-GckAttributes*
+GckAttributes *
 gcr_pkcs11_certificate_get_attributes (GcrPkcs11Certificate *self)
 {
 	g_return_val_if_fail (GCR_IS_PKCS11_CERTIFICATE (self), NULL);
@@ -355,7 +355,7 @@ gcr_pkcs11_certificate_get_attributes (GcrPkcs11Certificate *self)
  * Will return %NULL if no issuer certificate is found. Use @error to determine
  * if an error occurred.
  *
- * Returns: a new #GcrPkcs11Certificate, or %NULL
+ * Returns: (transfer full): a new #GcrPkcs11Certificate, or %NULL
  */
 GcrCertificate*
 gcr_pkcs11_certificate_lookup_issuer (GcrCertificate *certificate, GCancellable *cancellable,
diff --git a/gcr/gcr-renderer.c b/gcr/gcr-renderer.c
index dc542a2..5e979b0 100644
--- a/gcr/gcr-renderer.c
+++ b/gcr/gcr-renderer.c
@@ -219,8 +219,8 @@ sort_registered_by_n_attrs (gconstpointer a, gconstpointer b)
  * Create and initialize a renderer for the given attributes and label. These
  * renderers should have been preregistered via gcr_renderer_register().
  *
- * Returns: A new renderer, or %NULL if no renderer matched the attributes.
- *     The render should be released with g_object-unref().
+ * Returns: (transfer full): a new renderer, or %NULL if no renderer matched
+ *     the attributes; the render should be released with g_object_unref()
  */
 GcrRenderer*
 gcr_renderer_create (const gchar *label, GckAttributes *attrs)
diff --git a/gcr/gcr-simple-certificate.c b/gcr/gcr-simple-certificate.c
index 3d88421..eeb8254 100644
--- a/gcr/gcr-simple-certificate.c
+++ b/gcr/gcr-simple-certificate.c
@@ -137,9 +137,9 @@ gcr_simple_certificate_iface_init (GcrCertificateIface *iface)
  * Create a new #GcrSimpleCertificate for the raw DER data. The @data memory is
  * copied so you can dispose of it after this function returns.
  *
- * Returns: a new #GcrSimpleCertificate
+ * Returns: (transfer full): a new #GcrSimpleCertificate
  */
-GcrCertificate*
+GcrCertificate *
 gcr_simple_certificate_new (gconstpointer data, gsize n_data)
 {
 	GcrSimpleCertificate *cert;
@@ -163,9 +163,9 @@ gcr_simple_certificate_new (gconstpointer data, gsize n_data)
  * not copied and must persist until the #GcrSimpleCertificate object is
  * destroyed.
  *
- * Returns: a new #GcrSimpleCertificate
+ * Returns: (transfer full): a new #GcrSimpleCertificate
  */
-GcrCertificate*
+GcrCertificate *
 gcr_simple_certificate_new_static (gconstpointer data, gsize n_data)
 {
 	GcrSimpleCertificate *cert;
diff --git a/gcr/gcr-simple-collection.c b/gcr/gcr-simple-collection.c
index 2ac411a..174ccfa 100644
--- a/gcr/gcr-simple-collection.c
+++ b/gcr/gcr-simple-collection.c
@@ -143,10 +143,10 @@ gcr_collection_iface (GcrCollectionIface *iface)
  *
  * Create a new #GcrSimpleCollection.
  *
- * Returns: A newly allocated collection, which should be freed with
- *     g_object_unref().
+ * Returns: (transfer full): a newly allocated collection, which should be
+ *     freed with g_object_unref()
  */
-GcrCollection*
+GcrCollection *
 gcr_simple_collection_new (void)
 {
 	return g_object_new (GCR_TYPE_SIMPLE_COLLECTION, NULL);
diff --git a/gcr/gcr-tree-selector.c b/gcr/gcr-tree-selector.c
index 5cb2556..42a7f6d 100644
--- a/gcr/gcr-tree-selector.c
+++ b/gcr/gcr-tree-selector.c
@@ -288,10 +288,10 @@ gcr_tree_selector_class_init (GcrTreeSelectorClass *klass)
  *
  * Create a new #GcrTreeSelector.
  *
- * Returns: A newly allocated selector, which should be released with
- *     g_object_unref().
+ * Returns: (transfer full): a newly allocated selector, which should be
+ *          released with g_object_unref()
  */
-GcrTreeSelector*
+GcrTreeSelector *
 gcr_tree_selector_new (GcrCollection *collection, const GcrColumn *columns)
 {
 	return g_object_new (GCR_TYPE_TREE_SELECTOR,
@@ -306,9 +306,9 @@ gcr_tree_selector_new (GcrCollection *collection, const GcrColumn *columns)
  *
  * Get the collection that this selector is displaying objects from.
  *
- * Returns: The collection, owned by the selector.
+ * Returns: (transfer none): the collection, owned by the selector
  */
-GcrCollection*
+GcrCollection *
 gcr_tree_selector_get_collection (GcrTreeSelector *self)
 {
 	g_return_val_if_fail (GCR_IS_TREE_SELECTOR (self), NULL);
@@ -336,7 +336,8 @@ gcr_tree_selector_get_columns (GcrTreeSelector *self)
  *
  * Get a list of selected objects.
  *
- * Returns: The list of selected objects, to be released with g_list_free().
+ * Returns: (transfer container) (element-type Object): the list of selected
+ *          objects, to be released with g_list_free()
  */
 GList*
 gcr_tree_selector_get_selected (GcrTreeSelector *self)
@@ -348,7 +349,7 @@ gcr_tree_selector_get_selected (GcrTreeSelector *self)
 /**
  * gcr_tree_selector_set_selected:
  * @self: The selector
- * @selected: The list of objects to select.
+ * @selected: (element-type Object): The list of objects to select.
  *
  * Select certain objects in the selector.
  */
diff --git a/gcr/gcr-types.h b/gcr/gcr-types.h
index 7ac1c38..2fbb765 100644
--- a/gcr/gcr-types.h
+++ b/gcr/gcr-types.h
@@ -31,8 +31,21 @@
 #include <glib.h>
 
 #ifndef GCK_API_SUBJECT_TO_CHANGE
+
+/**
+ * GCK_API_SUBJECT_TO_CHANGE: (skip):
+ *
+ * skip for gir introspection
+ */
 #define GCK_API_SUBJECT_TO_CHANGE 1
+
+/**
+ * __GCR_DEFINED_GCK_SUBJECT_TO_CHANGE__: (skip):
+ *
+ * skip for gir introspection
+ */
 #define __GCR_DEFINED_GCK_SUBJECT_TO_CHANGE__ 1
+
 #endif
 
 #include <gck/gck.h>
diff --git a/gcr/gcr-union-collection.c b/gcr/gcr-union-collection.c
index dca7614..434a791 100644
--- a/gcr/gcr-union-collection.c
+++ b/gcr/gcr-union-collection.c
@@ -219,8 +219,8 @@ gcr_collection_iface (GcrCollectionIface *iface)
  *
  * Create a new #GcrUnionCollection.
  *
- * Returns: A newly allocated collection, which should be freed with
- *     g_object_unref().
+ * Returns: (transfer full): a newly allocated collection, which should be
+ *          freed with g_object_unref()
  */
 GcrCollection*
 gcr_union_collection_new (void)
diff --git a/gcr/gcr-viewer.c b/gcr/gcr-viewer.c
index b210c61..bc573ab 100644
--- a/gcr/gcr-viewer.c
+++ b/gcr/gcr-viewer.c
@@ -77,10 +77,10 @@ gcr_viewer_default_init (GcrViewerIface *iface)
  * Get an implementation of #GcrViewer that supports a view
  * of multiple renderers.
  *
- * Returns: A newly allocated #GcrViewer, which should be released with
- *     g_object_unref()
+ * Returns: (transfer full): a newly allocated #GcrViewer, which should be
+ *          released with g_object_unref()
  */
-GcrViewer*
+GcrViewer *
 gcr_viewer_new (void)
 {
 	return GCR_VIEWER (_gcr_display_view_new ());
@@ -92,8 +92,8 @@ gcr_viewer_new (void)
  * Get an implementation of #GcrViewer that supports a scrolled view
  * of multiple renderers.
  *
- * Returns: A newly allocated #GcrViewer, which should be released with
- *     g_object_unref()
+ * Returns: (transfer full): a newly allocated #GcrViewer, which should be
+ *          released with g_object_unref()
  */
 GcrViewer*
 gcr_viewer_new_scrolled (void)
@@ -171,7 +171,7 @@ gcr_viewer_count_renderers (GcrViewer *viewer)
  * Get a pointer to the renderer at the given index. It is an error to request
  * an index that is out of bounds.
  *
- * Returns: The render, owned by the viewer.
+ * Returns: (transfer none): the render, owned by the viewer
  */
 GcrRenderer*
 gcr_viewer_get_renderer (GcrViewer *viewer,



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