[eog] Add GI annotations and API documents where relevant



commit e6a784eabc3d902a11d295a25c53927d7e3f014d
Author: Claudio Saavedra <csaavedra igalia com>
Date:   Thu Dec 30 20:41:54 2010 +0200

    Add GI annotations and API documents where relevant
    
    This suppresses many warnings during the gir file generation

 src/eog-application.c        |    6 +++---
 src/eog-error-message-area.c |   17 +++++++++++++++++
 src/eog-image.c              |   40 ++++++++++++++++++++++++++++++++++++++++
 src/eog-list-store.c         |    2 +-
 src/eog-properties-dialog.c  |   11 +++++++++++
 src/eog-thumb-view.c         |    4 ++--
 src/eog-thumbnail.c          |   28 ++++++++++++++++++++++++++++
 src/eog-transform.c          |   27 +++++++++++++++++++++++++++
 src/eog-window.c             |   16 ++++++++--------
 9 files changed, 137 insertions(+), 14 deletions(-)
---
diff --git a/src/eog-application.c b/src/eog-application.c
index 012ca32..7046d7c 100644
--- a/src/eog-application.c
+++ b/src/eog-application.c
@@ -169,7 +169,7 @@ eog_application_init (EogApplication *eog_application)
  * Returns a singleton instance of #EogApplication currently running.
  * If not running yet, it will create one.
  *
- * Returns: a running #EogApplication.
+ * Returns: (transfer none): a running #EogApplication.
  **/
 EogApplication *
 eog_application_get_instance (void)
@@ -439,7 +439,7 @@ eog_application_shutdown (EogApplication *application)
  * your own references if you want to perform actions that may destroy
  * them.
  *
- * Returns: A new list of #EogWindow<!-- -->s.
+ * Returns: (element-type EogWindow) (transfer container): A new list of #EogWindow<!-- -->s.
  **/
 GList *
 eog_application_get_windows (EogApplication *application)
@@ -468,7 +468,7 @@ eog_application_get_windows (EogApplication *application)
  *
  * Retrieves the #EggToolbarsModel for the toolbar in #EogApplication.
  *
- * Returns: An #EggToolbarsModel.
+ * Returns: (transfer none): An #EggToolbarsModel.
  **/
 EggToolbarsModel *
 eog_application_get_toolbars_model (EogApplication *application)
diff --git a/src/eog-error-message-area.c b/src/eog-error-message-area.c
index 4e8fb25..750666e 100644
--- a/src/eog-error-message-area.c
+++ b/src/eog-error-message-area.c
@@ -121,6 +121,15 @@ create_error_message_area (const gchar *primary_text,
 	return message_area;
 }
 
+/**
+ * eog_image_load_error_message_area_new:
+ * @caption: 
+ * @error: 
+ *
+ * 
+ *
+ * Returns: (transfer full): a new #GtkInfoArea
+ **/
 GtkWidget *
 eog_image_load_error_message_area_new (const gchar  *caption,
 				       const GError *error)
@@ -154,6 +163,14 @@ eog_image_load_error_message_area_new (const gchar  *caption,
 	return message_area;
 }
 
+/**
+ * eog_no_images_error_message_area_new:
+ * @file: 
+ *
+ * 
+ *
+ * Returns: (transfer full): a new #GtkInfoBar
+ **/
 GtkWidget *
 eog_no_images_error_message_area_new (GFile *file)
 {
diff --git a/src/eog-image.c b/src/eog-image.c
index 7a039e7..a4e1bb9 100644
--- a/src/eog-image.c
+++ b/src/eog-image.c
@@ -1309,6 +1309,14 @@ eog_image_set_thumbnail (EogImage *img, GdkPixbuf *thumbnail)
 	}
 }
 
+/**
+ * eog_image_get_pixbuf:
+ * @img: a #EogImage
+ *
+ * Gets the #GdkPixbuf of the image
+ *
+ * Returns: (transfer full): a #GdkPixbuf
+ **/
 GdkPixbuf *
 eog_image_get_pixbuf (EogImage *img)
 {
@@ -1337,6 +1345,14 @@ eog_image_get_profile (EogImage *img)
 }
 #endif
 
+/**
+ * eog_image_get_thumbnail:
+ * @img: a #EogImage
+ *
+ * Gets the thumbnail pixbuf for @img 
+ *
+ * Returns: (transfer full): a #GdkPixbuf with a thumbnail
+ **/
 GdkPixbuf *
 eog_image_get_thumbnail (EogImage *img)
 {
@@ -1908,6 +1924,15 @@ eog_image_get_exif_info (EogImage *img)
 }
 #endif
 
+/**
+ * eog_image_get_xmp_info:
+ * @img: a #EogImage
+ *
+ * Gets the XMP info for @img or NULL if compiled without
+ * libexempi support.
+ *
+ * Returns: (transfer full): the xmp data
+ **/
 gpointer
 eog_image_get_xmp_info (EogImage *img)
 {
@@ -1928,6 +1953,14 @@ eog_image_get_xmp_info (EogImage *img)
 }
 
 
+/**
+ * eog_image_get_file:
+ * @img: a #EogImage
+ *
+ * Gets the #GFile associated with @img
+ *
+ * Returns: (transfer full): a #GFile
+ **/
 GFile *
 eog_image_get_file (EogImage *img)
 {
@@ -2049,6 +2082,13 @@ compare_quarks (gconstpointer a, gconstpointer b)
 	return quark - GPOINTER_TO_INT (b);
 }
 
+/**
+ * eog_image_get_supported_mime_types:
+ *
+ * Gets the list of supported mimetypes
+ *
+ * Returns: (transfer none): a #GList of supported mimetypes
+ **/
 GList *
 eog_image_get_supported_mime_types (void)
 {
diff --git a/src/eog-list-store.c b/src/eog-list-store.c
index 0ff78da..b948274 100644
--- a/src/eog-list-store.c
+++ b/src/eog-list-store.c
@@ -726,7 +726,7 @@ eog_list_store_get_pos_by_image (EogListStore *store, EogImage *image)
  * Gets the #EogImage in the position @pos of @store. If there is
  * no image at position @pos, %NULL is returned.
  *
- * Returns: the #EogImage in position @pos or %NULL.
+ * Returns: (transfer full): the #EogImage in position @pos or %NULL.
  *
  **/
 EogImage *
diff --git a/src/eog-properties-dialog.c b/src/eog-properties-dialog.c
index cd6c914..6ad6800 100644
--- a/src/eog-properties-dialog.c
+++ b/src/eog-properties-dialog.c
@@ -781,6 +781,17 @@ eog_properties_dialog_init (EogPropertiesDialog *prop_dlg)
 #endif
 }
 
+/**
+ * eog_properties_dialog_new:
+ * @parent: 
+ * @thumbview: 
+ * @next_image_action: 
+ * @previous_image_action: 
+ *
+ * 
+ *
+ * Returns: (transfer full): a new #EogPropertiesDialog
+ **/
 GObject *
 eog_properties_dialog_new (GtkWindow    *parent,
 			   EogThumbView *thumbview,
diff --git a/src/eog-thumb-view.c b/src/eog-thumb-view.c
index e5c184d..bde73b1 100644
--- a/src/eog-thumb-view.c
+++ b/src/eog-thumb-view.c
@@ -678,7 +678,7 @@ eog_thumb_view_get_image_from_path (EogThumbView *thumbview, GtkTreePath *path)
  * is not ensured to be really the first selected image in @thumbview, but
  * generally, it will be.
  *
- * Returns: A #EogImage.
+ * Returns: (transfer full): A #EogImage.
  **/
 EogImage *
 eog_thumb_view_get_first_selected_image (EogThumbView *thumbview)
@@ -711,7 +711,7 @@ eog_thumb_view_get_first_selected_image (EogThumbView *thumbview)
  * Gets a list with the currently selected images. Note that a new reference is
  * hold for each image and the list must be freed with g_list_free().
  *
- * Returns: A newly allocated list of #EogImage's.
+ * Returns: (element-type EogImage) (transfer full): A newly allocated list of #EogImage's.
  **/
 GList *
 eog_thumb_view_get_selected_images (EogThumbView *thumbview)
diff --git a/src/eog-thumbnail.c b/src/eog-thumbnail.c
index 299f119..3b26cd1 100644
--- a/src/eog-thumbnail.c
+++ b/src/eog-thumbnail.c
@@ -377,6 +377,14 @@ eog_thumbnail_stretch_frame_image (GdkPixbuf *frame_image,
         return result_pixbuf;
 }
 
+/**
+ * eog_thumbnail_add_frame:
+ * @thumbnail: a #GdkPixbuf
+ *
+ * Adds a frame to @thumbnail
+ *
+ * Returns: (transfer full): a new #GdkPixbuf, storing @thumbnail nicely framed.
+ **/
 GdkPixbuf *
 eog_thumbnail_add_frame (GdkPixbuf *thumbnail)
 {
@@ -406,6 +414,15 @@ eog_thumbnail_add_frame (GdkPixbuf *thumbnail)
 	return result_pixbuf;
 }
 
+/**
+ * eog_thumbnail_fit_to_size:
+ * @thumbnail: a #GdkPixbuf
+ * @dimension: the maximum width or height desired
+ *
+ * Ensures a pixbuf fits a given @dimension
+ *
+ * Returns: (transfer full): a new #GdkPixbuf
+ **/
 GdkPixbuf *
 eog_thumbnail_fit_to_size (GdkPixbuf *thumbnail, gint dimension)
 {
@@ -434,6 +451,17 @@ eog_thumbnail_fit_to_size (GdkPixbuf *thumbnail, gint dimension)
 	return gdk_pixbuf_copy (thumbnail);
 }
 
+/**
+ * eog_thumbnail_load:
+ * @image: a #EogImage
+ * @error: location to store the error ocurring or %NULL to ignore
+ *
+ * Loads the thumbnail for @image. In case of error, %NULL is returned
+ * and @error is set.
+ *
+ * Returns: (transfer full): a new #GdkPixbuf with the thumbnail for
+ * @image or %NULL in case of error.
+ **/
 GdkPixbuf*
 eog_thumbnail_load (EogImage *image, GError **error)
 {
diff --git a/src/eog-transform.c b/src/eog-transform.c
index db54f88..bcd0d75 100644
--- a/src/eog-transform.c
+++ b/src/eog-transform.c
@@ -64,6 +64,16 @@ eog_transform_class_init (EogTransformClass *klass)
 	g_type_class_add_private (klass, sizeof (EogTransformPrivate));
 }
 
+/**
+ * eog_transform_apply:
+ * @trans: a #EogTransform
+ * @pixbuf: a #GdkPixbuf
+ * @job: a #EogJob
+ *
+ * Applies the transformation in @trans to @pixbuf, setting its progress in @job.
+ *
+ * Returns: (transfer full): A new #GdkPixbuf with the transformation applied.
+ **/
 GdkPixbuf*
 eog_transform_apply (EogTransform *trans, GdkPixbuf *pixbuf, EogJob *job)
 {
@@ -220,6 +230,14 @@ _eog_cairo_matrix_flip (cairo_matrix_t *dst, const cairo_matrix_t *src, gboolean
 	dst->y0 = vert ? -src->y0 : src->y0;
 }
 
+/**
+ * eog_transform_reverse:
+ * @trans: a #EogTransform
+ *
+ * Creates the reverse transformation of @trans
+ *
+ * Returns: (transfer full): a new transformation
+ **/
 EogTransform*
 eog_transform_reverse (EogTransform *trans)
 {
@@ -236,6 +254,15 @@ eog_transform_reverse (EogTransform *trans)
 	return reverse;
 }
 
+/**
+ * eog_transform_compose:
+ * @trans: a #EogTransform
+ * @compose: another #EogTransform
+ *
+ * 
+ *
+ * Returns: (transfer full): a new transform
+ **/
 EogTransform*
 eog_transform_compose (EogTransform *trans, EogTransform *compose)
 {
diff --git a/src/eog-window.c b/src/eog-window.c
index f5f19c2..c892fa5 100644
--- a/src/eog-window.c
+++ b/src/eog-window.c
@@ -5352,7 +5352,7 @@ eog_window_open_file_list (EogWindow *window, GSList *file_list)
  *
  * Gets the #GtkUIManager that describes the UI of @window.
  *
- * Returns: A #GtkUIManager.
+ * Returns: (transfer none): A #GtkUIManager.
  **/
 GtkUIManager *
 eog_window_get_ui_manager (EogWindow *window)
@@ -5417,7 +5417,7 @@ eog_window_set_mode (EogWindow *window, EogWindowMode mode)
  * Gets the #EogListStore that contains the images in the gallery
  * of @window.
  *
- * Returns: an #EogListStore.
+ * Returns: (transfer none): an #EogListStore.
  **/
 EogListStore *
 eog_window_get_store (EogWindow *window)
@@ -5433,7 +5433,7 @@ eog_window_get_store (EogWindow *window)
  *
  * Gets the #EogScrollView in the window.
  *
- * Returns: the #EogScrollView.
+ * Returns: (transfer none): the #EogScrollView.
  **/
 GtkWidget *
 eog_window_get_view (EogWindow *window)
@@ -5449,7 +5449,7 @@ eog_window_get_view (EogWindow *window)
  *
  * Gets the sidebar widget of @window.
  *
- * Returns: the #EogSidebar.
+ * Returns: (transfer none): the #EogSidebar.
  **/
 GtkWidget *
 eog_window_get_sidebar (EogWindow *window)
@@ -5465,7 +5465,7 @@ eog_window_get_sidebar (EogWindow *window)
  *
  * Gets the thumbnails view in @window.
  *
- * Returns: an #EogThumbView.
+ * Returns: (transfer none): an #EogThumbView.
  **/
 GtkWidget *
 eog_window_get_thumb_view (EogWindow *window)
@@ -5481,7 +5481,7 @@ eog_window_get_thumb_view (EogWindow *window)
  *
  * Gets the thumbnails navigation pane in @window.
  *
- * Returns: an #EogThumbNav.
+ * Returns: (transfer none): an #EogThumbNav.
  **/
 GtkWidget *
 eog_window_get_thumb_nav (EogWindow *window)
@@ -5497,7 +5497,7 @@ eog_window_get_thumb_nav (EogWindow *window)
  *
  * Gets the statusbar in @window.
  *
- * Returns: a #EogStatusbar.
+ * Returns: (transfer none): a #EogStatusbar.
  **/
 GtkWidget *
 eog_window_get_statusbar (EogWindow *window)
@@ -5514,7 +5514,7 @@ eog_window_get_statusbar (EogWindow *window)
  * Gets the image currently displayed in @window or %NULL if
  * no image is being displayed.
  *
- * Returns: an #EogImage.
+ * Returns: (transfer none): an #EogImage.
  **/
 EogImage *
 eog_window_get_image (EogWindow *window)



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