[gnome-keyring] gcr: Annotate which types are being returned
- From: Stefan Walter <stefw src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-keyring] gcr: Annotate which types are being returned
- Date: Thu, 29 Sep 2011 14:29:06 +0000 (UTC)
commit 2c7e52817c4d125859c7fe500fee76eb98784738
Author: Stef Walter <stefw collabora co uk>
Date: Thu Sep 29 15:31:00 2011 +0200
gcr: Annotate which types are being returned
* If the C function is returning a base type, then annotate
what derived type is actually being returned.
gcr/gcr-callback-output-stream.c | 5 +++++
gcr/gcr-certificate-basics-widget.c | 15 +++++++++++++--
gcr/gcr-certificate-details-widget.c | 16 +++++++++++-----
gcr/gcr-failure-renderer.c | 2 +-
gcr/gcr-gnupg-collection.c | 2 +-
gcr/gcr-gnupg-importer.c | 5 +++++
gcr/gcr-live-search.c | 5 +++++
gcr/gcr-memory-icon.c | 2 +-
gcr/gcr-menu-button.c | 5 +++++
gcr/gcr-pkcs11-importer.c | 5 +++++
gcr/gcr-simple-certificate.c | 4 ++--
gcr/gcr-simple-collection.c | 4 ++--
gcr/gcr-union-collection.c | 4 ++--
gcr/gcr-unlock-options-widget.c | 4 ++--
gcr/gcr-viewer-window.c | 2 +-
15 files changed, 61 insertions(+), 19 deletions(-)
---
diff --git a/gcr/gcr-callback-output-stream.c b/gcr/gcr-callback-output-stream.c
index 2d4e0e5..91bdbf3 100644
--- a/gcr/gcr-callback-output-stream.c
+++ b/gcr/gcr-callback-output-stream.c
@@ -109,6 +109,11 @@ _gcr_callback_output_stream_class_init (GcrCallbackOutputStreamClass *klass)
output_class->close_fn = _gcr_callback_output_stream_close;
}
+/**
+ * _gcr_callback_output_stream_new: (skip)
+ *
+ * Returns: (transfer full) (type Gcr.CallbackOutputStream): the new stream
+ */
GOutputStream *
_gcr_callback_output_stream_new (GcrCallbackOutputFunc callback,
gpointer user_data,
diff --git a/gcr/gcr-certificate-basics-widget.c b/gcr/gcr-certificate-basics-widget.c
index 5e4e5c7..f1d4528 100644
--- a/gcr/gcr-certificate-basics-widget.c
+++ b/gcr/gcr-certificate-basics-widget.c
@@ -33,9 +33,11 @@ gcr_certificate_basics_widget_get_type (void)
}
/**
- * gcr_certificate_basics_widget_new: (skip):
+ * gcr_certificate_basics_widget_new: (skip)
*
* Deprecated: Since 2.30
+ *
+ * Returns: (transfer full) (type Gcr.CertificateWidget): a new certificate widget
*/
GcrCertificateBasicsWidget *
gcr_certificate_basics_widget_new (GcrCertificate *cert)
@@ -44,9 +46,11 @@ gcr_certificate_basics_widget_new (GcrCertificate *cert)
}
/**
- * gcr_certificate_basics_widget_get_certificate: (skip):
+ * gcr_certificate_basics_widget_get_certificate: (skip)
*
* Deprecated: Since 2.30
+ *
+ * Returns: (transfer none): the certificate
*/
GcrCertificate *
gcr_certificate_basics_widget_get_certificate (GcrCertificateBasicsWidget *basics)
@@ -54,6 +58,13 @@ gcr_certificate_basics_widget_get_certificate (GcrCertificateBasicsWidget *basic
return gcr_certificate_widget_get_certificate (basics);
}
+/**
+ * gcr_certificate_basics_widget_set_certificate: (skip)
+ * @basics: the certificate widget
+ * @cert: the certificate
+ *
+ * Deprecated: Since 2.30
+ */
void
gcr_certificate_basics_widget_set_certificate (GcrCertificateBasicsWidget *basics,
GcrCertificate *cert)
diff --git a/gcr/gcr-certificate-details-widget.c b/gcr/gcr-certificate-details-widget.c
index 7cf9db3..9fc2307 100644
--- a/gcr/gcr-certificate-details-widget.c
+++ b/gcr/gcr-certificate-details-widget.c
@@ -33,20 +33,24 @@ gcr_certificate_details_widget_get_type (void)
}
/**
- * gcr_certificate_details_widget_new: (skip):
+ * gcr_certificate_details_widget_new: (skip)
*
* Deprecated: Since 2.30
+ *
+ * Returns: (transfer full) (type Gcr.CertificateWidget): a new certificate widget
*/
-GcrCertificateDetailsWidget*
+GcrCertificateDetailsWidget *
gcr_certificate_details_widget_new (GcrCertificate *cert)
{
return gcr_certificate_widget_new (cert);
}
/**
- * gcr_certificate_details_widget_get_certificate: (skip):
+ * gcr_certificate_details_widget_get_certificate: (skip)
*
* Deprecated: Since 2.30
+ *
+ * Returns: (transfer none): the certificate
*/
GcrCertificate*
gcr_certificate_details_widget_get_certificate (GcrCertificateDetailsWidget *details)
@@ -55,9 +59,11 @@ gcr_certificate_details_widget_get_certificate (GcrCertificateDetailsWidget *det
}
/**
- * gcr_certificate_details_widget_set_certificate: (skip):
+ * gcr_certificate_details_widget_set_certificate: (skip)
+ * @details: the certificate widget
+ * @cert: the certificate
*
- * Deprecated
+ * Deprecated: Since 2.30
*/
void
gcr_certificate_details_widget_set_certificate (GcrCertificateDetailsWidget *details,
diff --git a/gcr/gcr-failure-renderer.c b/gcr/gcr-failure-renderer.c
index 035c97f..31d0331 100644
--- a/gcr/gcr-failure-renderer.c
+++ b/gcr/gcr-failure-renderer.c
@@ -184,7 +184,7 @@ gcr_renderer_iface_init (GcrRendererIface *iface)
*
* Create a new renderer for an error.
*
- * Returns: (transfer full): the new renderer
+ * Returns: (transfer full) (type Gcr.FailureRenderer): the new renderer
*/
GcrRenderer *
gcr_failure_renderer_new (const gchar *label,
diff --git a/gcr/gcr-gnupg-collection.c b/gcr/gcr-gnupg-collection.c
index 8e81204..fe730a2 100644
--- a/gcr/gcr-gnupg-collection.c
+++ b/gcr/gcr-gnupg-collection.c
@@ -201,7 +201,7 @@ _gcr_collection_iface (GcrCollectionIface *iface)
* The gnupg home directory is where the keyring files live. If directory is
* %NULL then the default gnupg home directory is used.
*
- * Returns: (transfer full): A newly allocated collection.
+ * Returns: (transfer full) (type Gcr.GnupgCollection): A newly allocated collection.
*/
GcrCollection*
_gcr_gnupg_collection_new (const gchar *directory)
diff --git a/gcr/gcr-gnupg-importer.c b/gcr/gcr-gnupg-importer.c
index 5cd8fae..b9a0b55 100644
--- a/gcr/gcr-gnupg-importer.c
+++ b/gcr/gcr-gnupg-importer.c
@@ -299,6 +299,11 @@ gcr_gnupg_importer_iface (GcrImporterIface *iface)
iface->import_finish = _gcr_gnupg_importer_import_finish;
}
+/**
+ * _gcr_gnupg_importer_new:
+ *
+ * Returns: (transfer full) (type Gcr.GnupgImporter): the new importer
+ */
GcrImporter *
_gcr_gnupg_importer_new (const gchar *directory)
{
diff --git a/gcr/gcr-live-search.c b/gcr/gcr-live-search.c
index c8fb8b1..ca91e20 100644
--- a/gcr/gcr-live-search.c
+++ b/gcr/gcr-live-search.c
@@ -563,6 +563,11 @@ _gcr_live_search_init (GcrLiveSearch *self)
self->pv->hook_widget = NULL;
}
+/**
+ * _gcr_live_search_new:
+ *
+ * Returns: (transfer full) (type Gcr.LiveSearch): The new widget
+ */
GtkWidget *
_gcr_live_search_new (GtkWidget *hook)
{
diff --git a/gcr/gcr-memory-icon.c b/gcr/gcr-memory-icon.c
index 26e83a5..3971359 100644
--- a/gcr/gcr-memory-icon.c
+++ b/gcr/gcr-memory-icon.c
@@ -177,7 +177,7 @@ _gcr_memory_icon_iface_loadable_icon (GLoadableIconIface *iface)
* Create a new GIcon based on image data in memory. The data will be copied
* by the new icon.
*
- * Returns: (transfer full): A newly allocated icon.
+ * Returns: (transfer full) (type Gcr.MemoryIcon): A newly allocated icon.
*/
GIcon*
_gcr_memory_icon_new (const gchar *image_type, gconstpointer data, gsize n_data)
diff --git a/gcr/gcr-menu-button.c b/gcr/gcr-menu-button.c
index abcbcfa..444e2dd 100644
--- a/gcr/gcr-menu-button.c
+++ b/gcr/gcr-menu-button.c
@@ -296,6 +296,11 @@ _gcr_menu_button_class_init (GcrMenuButtonClass *klass)
}
+/**
+ * _gcr_menu_button_new:
+ *
+ * Returns: (transfer full) (type Gcr.MenuButton): the new menu button
+ */
GtkWidget *
_gcr_menu_button_new (const gchar *label)
{
diff --git a/gcr/gcr-pkcs11-importer.c b/gcr/gcr-pkcs11-importer.c
index 7edbf85..feb012c 100644
--- a/gcr/gcr-pkcs11-importer.c
+++ b/gcr/gcr-pkcs11-importer.c
@@ -550,6 +550,11 @@ _gcr_pkcs11_importer_init_iface (GcrImporterIface *iface)
iface->import_finish = _gcr_pkcs11_importer_import_finish;
}
+/**
+ * _gcr_pkcs11_importer_new:
+ *
+ * Returns: (transfer full) (type Gcr.Pkcs11Importer): the new importer
+ */
GcrImporter *
_gcr_pkcs11_importer_new (GckSlot *slot)
{
diff --git a/gcr/gcr-simple-certificate.c b/gcr/gcr-simple-certificate.c
index f286c2e..03e3e76 100644
--- a/gcr/gcr-simple-certificate.c
+++ b/gcr/gcr-simple-certificate.c
@@ -138,7 +138,7 @@ 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: (transfer full): a new #GcrSimpleCertificate
+ * Returns: (transfer full) (type Gcr.SimpleCertificate): a new #GcrSimpleCertificate
*/
GcrCertificate *
gcr_simple_certificate_new (const guchar *data,
@@ -165,7 +165,7 @@ gcr_simple_certificate_new (const guchar *data,
* not copied and must persist until the #GcrSimpleCertificate object is
* destroyed.
*
- * Returns: (transfer full): a new #GcrSimpleCertificate
+ * Returns: (transfer full) (type Gcr.SimpleCertificate): a new #GcrSimpleCertificate
*/
GcrCertificate *
gcr_simple_certificate_new_static (const guchar *data,
diff --git a/gcr/gcr-simple-collection.c b/gcr/gcr-simple-collection.c
index 174ccfa..f843a7c 100644
--- a/gcr/gcr-simple-collection.c
+++ b/gcr/gcr-simple-collection.c
@@ -143,8 +143,8 @@ gcr_collection_iface (GcrCollectionIface *iface)
*
* Create a new #GcrSimpleCollection.
*
- * Returns: (transfer full): a newly allocated collection, which should be
- * freed with g_object_unref()
+ * Returns: (transfer full) (type Gcr.SimpleCollection): a newly allocated
+ * collection, which should be freed with g_object_unref()
*/
GcrCollection *
gcr_simple_collection_new (void)
diff --git a/gcr/gcr-union-collection.c b/gcr/gcr-union-collection.c
index 3c0877c..459fbcc 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: (transfer full): a newly allocated collection, which should be
- * freed with g_object_unref()
+ * Returns: (transfer full) (type Gcr.UnionCollection): a newly allocated
+ * collection, which should be freed with g_object_unref()
*/
GcrCollection *
gcr_union_collection_new (void)
diff --git a/gcr/gcr-unlock-options-widget.c b/gcr/gcr-unlock-options-widget.c
index 3d1b784..5721caf 100644
--- a/gcr/gcr-unlock-options-widget.c
+++ b/gcr/gcr-unlock-options-widget.c
@@ -315,9 +315,9 @@ gcr_unlock_options_widget_class_init (GcrUnlockOptionsWidgetClass *klass)
*
* Create a new #GcrUnlockOptionsWidget.
*
- * Returns: A new #GcrUnlockOptionsWidget.
+ * Returns: (transfer full) (type Gcr.UnlockOptionsWidget): a new #GcrUnlockOptionsWidget
*/
-GtkWidget*
+GtkWidget *
gcr_unlock_options_widget_new (void)
{
return g_object_new (GCR_TYPE_UNLOCK_OPTIONS_WIDGET, NULL);
diff --git a/gcr/gcr-viewer-window.c b/gcr/gcr-viewer-window.c
index b21bb80..c604d18 100644
--- a/gcr/gcr-viewer-window.c
+++ b/gcr/gcr-viewer-window.c
@@ -152,7 +152,7 @@ gcr_viewer_window_class_init (GcrViewerWindowClass *klass)
*
* Create a new viewer window.
*
- * Returns: (transfer full): a new viewer window
+ * Returns: (transfer full) (type Gcr.ViewerWindow): a new viewer window
*/
GtkWindow *
gcr_viewer_window_new (void)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]