Skip to content

Commit

Permalink
libdocument: add missing transfer and element-type annotations
Browse files Browse the repository at this point in the history
  • Loading branch information
Cosimo Cecchi committed Jan 28, 2013
1 parent f4fbfca commit 7917b62
Show file tree
Hide file tree
Showing 14 changed files with 161 additions and 3 deletions.
6 changes: 6 additions & 0 deletions libdocument/ev-annotation.c
Original file line number Diff line number Diff line change
Expand Up @@ -1199,6 +1199,12 @@ ev_annotation_attachment_new (EvPage *page,
NULL));
}

/**
* ev_annotation_attachment_get_attachment:
* @annot: an #EvAnnotationAttachment
*
* Returns: (transfer none): an #EvAttachment
*/
EvAttachment *
ev_annotation_attachment_get_attachment (EvAnnotationAttachment *annot)
{
Expand Down
6 changes: 6 additions & 0 deletions libdocument/ev-document-attachments.c
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,12 @@ ev_document_attachments_has_attachments (EvDocumentAttachments *document_attachm
return iface->has_attachments (document_attachments);
}

/**
* ev_document_attachments_get_attachments:
* @document_attachments: an #EvDocumentAttachments
*
* Returns: (transfer full) (element-type EvAttachment): a list of #EvAttachment objects
*/
GList *
ev_document_attachments_get_attachments (EvDocumentAttachments *document_attachments)
{
Expand Down
10 changes: 8 additions & 2 deletions libdocument/ev-document-factory.c
Original file line number Diff line number Diff line change
Expand Up @@ -389,7 +389,7 @@ ev_document_factory_get_document (const char *uri, GError **error)
* If the document is encrypted, it is returned but also @error is set to
* %EV_DOCUMENT_ERROR_ENCRYPTED.
*
* Returns: a new #EvDocument, or %NULL
* Returns: (transfer full): a new #EvDocument, or %NULL
*
* Since: 3.6
*/
Expand Down Expand Up @@ -457,7 +457,7 @@ ev_document_factory_get_document_for_gfile (GFile *file,
* If the mime type cannot be inferred from the stream, and @mime_type is %NULL,
* an error is returned.
*
* Returns: a new #EvDocument, or %NULL
* Returns: (transfer full): a new #EvDocument, or %NULL
*
* Since: 3.6
*/
Expand Down Expand Up @@ -586,6 +586,12 @@ ev_document_factory_add_filters (GtkWidget *chooser, EvDocument *document)

/* Deprecated API/ABI compatibility wrappers */

/**
* ev_backends_manager_get_document:
* @mime_type: a mime type hint
*
* Returns: (transfer full): a new #EvDocument
*/
EvDocument *ev_backends_manager_get_document (const gchar *mime_type)
{
return ev_document_factory_new_document_for_mime_type (mime_type, NULL);
Expand Down
18 changes: 18 additions & 0 deletions libdocument/ev-document-find.c
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,15 @@ ev_document_find_default_init (EvDocumentFindInterface *klass)
{
}

/**
* ev_document_find_find_text:
* @document_find: an #EvDocumentFind
* @page: an #EvPage
* @text: text to find
* @case_sensitive: whether to match the string case
*
* Returns: (transfer full) (element-type EvRectangle): a list of results
*/
GList *
ev_document_find_find_text (EvDocumentFind *document_find,
EvPage *page,
Expand All @@ -40,6 +49,15 @@ ev_document_find_find_text (EvDocumentFind *document_find,
return iface->find_text (document_find, page, text, case_sensitive);
}

/**
* ev_document_find_find_text_with_options:
* @document_find: an #EvDocumentFind
* @page: an #EvPage
* @text: text to find
* @options: a set of #EvFindOptions
*
* Returns: (transfer full) (element-type EvRectangle): a list of results
*/
GList *
ev_document_find_find_text_with_options (EvDocumentFind *document_find,
EvPage *page,
Expand Down
7 changes: 7 additions & 0 deletions libdocument/ev-document-images.c
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,13 @@ ev_document_images_get_image_mapping (EvDocumentImages *document_images,
return iface->get_image_mapping (document_images, page);
}

/**
* ev_document_images_get_image:
* @document_images: an #EvDocumentImages
* @image: an #EvImage
*
* Returns: (transfer full): a #GdkPixbuf
*/
GdkPixbuf *
ev_document_images_get_image (EvDocumentImages *document_images,
EvImage *image)
Expand Down
6 changes: 6 additions & 0 deletions libdocument/ev-document-layers.c
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,12 @@ ev_document_layers_has_layers (EvDocumentLayers *document_layers)
return iface->has_layers (document_layers);
}

/**
* ev_document_layers_get_layers:
* @document_layers: an #EvDocumentLayers
*
* Returns: (transfer full): a #GtkTreeModel
*/
GtkTreeModel *
ev_document_layers_get_layers (EvDocumentLayers *document_layers)
{
Expand Down
13 changes: 13 additions & 0 deletions libdocument/ev-document-links.c
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,12 @@ ev_document_links_has_document_links (EvDocumentLinks *document_links)
return retval;
}

/**
* ev_document_links_get_links_model:
* @document_links: an #EvDocumentLinks
*
* Returns: (transfer full): a #GtkTreeModel
*/
GtkTreeModel *
ev_document_links_get_links_model (EvDocumentLinks *document_links)
{
Expand All @@ -63,6 +69,13 @@ ev_document_links_get_links (EvDocumentLinks *document_links,
return iface->get_links (document_links, page);
}

/**
* ev_document_links_find_link_dest:
* @document_links: an #EvDocumentLinks
* @link_name: the link name
*
* Returns: (transfer full): an #EvLinkDest
*/
EvLinkDest *
ev_document_links_find_link_dest (EvDocumentLinks *document_links,
const gchar *link_name)
Expand Down
38 changes: 38 additions & 0 deletions libdocument/ev-document-misc.c
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,14 @@ create_thumbnail_frame (int width,
return retval;
}

/**
* ev_document_misc_get_thumbnail_frame:
* @width: the desired width
* @height: the desired height
* @source_pixbuf: a #GdkPixbuf
*
* Returns: (transfer full): a #GdkPixbuf
*/
GdkPixbuf *
ev_document_misc_get_thumbnail_frame (int width,
int height,
Expand All @@ -102,6 +110,14 @@ ev_document_misc_get_thumbnail_frame (int width,
return create_thumbnail_frame (width, height, source_pixbuf, TRUE);
}

/**
* ev_document_misc_get_loading_thumbnail:
* @width: the desired width
* @height: the desired height
* @inverted_colors: whether to invert colors
*
* Returns: (transfer full): a #GdkPixbuf
*/
GdkPixbuf *
ev_document_misc_get_loading_thumbnail (int width,
int height,
Expand Down Expand Up @@ -166,6 +182,15 @@ ev_document_misc_render_thumbnail_frame (GtkWidget *widget,
return retval;
}

/**
* ev_document_misc_render_loading_thumbnail:
* @widget: a #GtkWidget to use for style information
* @width: the desired width
* @height: the desired height
* @inverted_colors: whether to invert colors
*
* Returns: (transfer full): a #GdkPixbuf
*/
GdkPixbuf *
ev_document_misc_render_loading_thumbnail (GtkWidget *widget,
int width,
Expand All @@ -175,6 +200,13 @@ ev_document_misc_render_loading_thumbnail (GtkWidget *widget,
return ev_document_misc_render_thumbnail_frame (widget, width, height, inverted_colors, NULL);
}

/**
* ev_document_misc_render_thumbnail_with_frame:
* @widget: a #GtkWidget to use for style information
* @source_pixbuf: a #GdkPixbuf
*
* Returns: (transfer full): a #GdkPixbuf
*/
GdkPixbuf *
ev_document_misc_render_thumbnail_with_frame (GtkWidget *widget,
GdkPixbuf *source_pixbuf)
Expand Down Expand Up @@ -271,6 +303,12 @@ ev_document_misc_surface_from_pixbuf (GdkPixbuf *pixbuf)
return surface;
}

/**
* ev_document_misc_pixbuf_from_surface:
* @surface: a #cairo_surface_t
*
* Returns: (transfer full): a #GdkPixbuf
*/
GdkPixbuf *
ev_document_misc_pixbuf_from_surface (cairo_surface_t *surface)
{
Expand Down
7 changes: 7 additions & 0 deletions libdocument/ev-document-transition.c
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,13 @@ ev_document_transition_get_page_duration (EvDocumentTransition *document_trans,
return -1;
}

/**
* ev_document_transition_get_effect:
* @document_trans: an #EvDocumentTransition
* @page: a page index
*
* Returns: (transfer full): an #EvTransitionEffect
*/
EvTransitionEffect *
ev_document_transition_get_effect (EvDocumentTransition *document_trans,
gint page)
Expand Down
7 changes: 7 additions & 0 deletions libdocument/ev-document.c
Original file line number Diff line number Diff line change
Expand Up @@ -692,6 +692,13 @@ _ev_document_get_thumbnail (EvDocument *document,
return pixbuf;
}

/**
* ev_document_get_thumbnail:
* @document: an #EvDocument
* @rc: an #EvRenderContext
*
* Returns: (transfer full): a #GdkPixbuf
*/
GdkPixbuf *
ev_document_get_thumbnail (EvDocument *document,
EvRenderContext *rc)
Expand Down
2 changes: 1 addition & 1 deletion libdocument/ev-file-helpers.c
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,7 @@ close_fd_cb (gpointer fdptr)
*
* Creates a temp #GFile in the evince temp directory. See ev_mkstemp() for more information.
*
* Returns: a newly allocated #GFile for the newly created temp file name, or %NULL
* Returns: (transfer full): a newly allocated #GFile for the newly created temp file name, or %NULL
* on error with @error filled in
*/
GFile *
Expand Down
6 changes: 6 additions & 0 deletions libdocument/ev-image.c
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,12 @@ ev_image_get_id (EvImage *image)
return image->priv->id;
}

/**
* ev_image_get_pixbuf:
* @image: an #EvImage
*
* Returns: (transfer none): a #GdkPixbuf
*/
GdkPixbuf *
ev_image_get_pixbuf (EvImage *image)
{
Expand Down
32 changes: 32 additions & 0 deletions libdocument/ev-link-action.c
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,12 @@ ev_link_action_get_action_type (EvLinkAction *self)
return self->priv->type;
}

/**
* ev_link_action_get_dest:
* @self: an #EvLinkAction
*
* Returns: (transfer none): an #EvLinkDest
*/
EvLinkDest *
ev_link_action_get_dest (EvLinkAction *self)
{
Expand Down Expand Up @@ -110,6 +116,12 @@ ev_link_action_get_name (EvLinkAction *self)
return self->priv->name;
}

/**
* ev_link_action_get_show_list:
* @self: an #EvLinkAction
*
* Returns: (transfer none) (element-type EvLayer): a list of #EvLayer objects
*/
GList *
ev_link_action_get_show_list (EvLinkAction *self)
{
Expand All @@ -118,6 +130,12 @@ ev_link_action_get_show_list (EvLinkAction *self)
return self->priv->show_list;
}

/**
* ev_link_action_get_hide_list:
* @self: an #EvLinkAction
*
* Returns: (transfer none) (element-type EvLayer): a list of #EvLayer objects
*/
GList *
ev_link_action_get_hide_list (EvLinkAction *self)
{
Expand All @@ -126,6 +144,12 @@ ev_link_action_get_hide_list (EvLinkAction *self)
return self->priv->hide_list;
}

/**
* ev_link_action_get_toggle_list:
* @self: an #EvLinkAction
*
* Returns: (transfer none) (element-type EvLayer): a list of #EvLayer objects
*/
GList *
ev_link_action_get_toggle_list (EvLinkAction *self)
{
Expand Down Expand Up @@ -434,6 +458,14 @@ ev_link_action_new_named (const gchar *name)
NULL));
}

/**
* ev_link_action_new_layers_state:
* @show_list: (element-type EvLayer): a list of #EvLayer objects
* @hide_list: (element-type EvLayer): a list of #EvLayer objects
* @toggle_list: (element-type EvLayer): a list of #EvLayer objects
*
* Returns: (transfer full): a new #EvLinkAction
*/
EvLinkAction *
ev_link_action_new_layers_state (GList *show_list,
GList *hide_list,
Expand Down
6 changes: 6 additions & 0 deletions libdocument/ev-link.c
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,12 @@ ev_link_get_title (EvLink *self)
return self->priv->title;
}

/**
* ev_link_get_action:
* @self: an #EvLink
*
* Returns: (transfer none): an #EvLinkAction
*/
EvLinkAction *
ev_link_get_action (EvLink *self)
{
Expand Down

0 comments on commit 7917b62

Please sign in to comment.