From 7bb10e1bd21e36a488828f285e7d56def75e8d24 Mon Sep 17 00:00:00 2001 From: Evan Nemerson Date: Sun, 15 Jan 2012 11:02:50 -0800 Subject: [PATCH] glib: various minor introspection and documentation improvements Bug 44790 --- glib/Makefile.am | 4 +++- glib/poppler-annot.cc | 8 ++++---- glib/poppler-attachment.h | 7 ++++--- glib/poppler-document.cc | 6 ++++-- glib/poppler-media.h | 7 ++++--- glib/poppler-page.cc | 23 +++++++++++++++-------- 6 files changed, 34 insertions(+), 21 deletions(-) diff --git a/glib/Makefile.am b/glib/Makefile.am index 67116fc..54e4085 100644 --- a/glib/Makefile.am +++ b/glib/Makefile.am @@ -91,12 +91,14 @@ INTROSPECTION_GIRS = INTROSPECTION_SCANNER_ARGS = --add-include-path=$(srcdir) INTROSPECTION_COMPILER_ARGS = --includedir=$(srcdir) -introspection_files = $(libpoppler_glib_la_SOURCES) $(poppler_glib_include_HEADERS) +introspection_files = $(libpoppler_glib_la_SOURCES) $(poppler_glib_include_HEADERS) $(nodist_poppler_glib_include_HEADERS) Poppler-0.18.gir: libpoppler-glib.la Poppler_0_18_gir_INCLUDES = GObject-2.0 cairo-1.0 Poppler_0_18_gir_CFLAGS = $(INCLUDES) -I$(top_builddir) Poppler_0_18_gir_LIBS = libpoppler-glib.la Poppler_0_18_gir_FILES = $(addprefix $(srcdir)/, $(introspection_files)) +Poppler_0_18_gir_SCANNERFLAGS = --c-include poppler.h +Poppler_0_18_gir_EXPORT_PACKAGES = poppler-glib INTROSPECTION_GIRS += Poppler-0.18.gir diff --git a/glib/poppler-annot.cc b/glib/poppler-annot.cc index a69644d..2f9ef9c 100644 --- a/glib/poppler-annot.cc +++ b/glib/poppler-annot.cc @@ -1167,7 +1167,7 @@ poppler_annot_free_text_get_quadding (PopplerAnnotFreeText *poppler_annot) * line attached to the @poppler_annot. * * Return value: a new allocated #PopplerCalloutLine if the annot has a callout - * line, NULL in other case. It must be freed with g_free() when + * line, %NULL in other case. It must be freed with g_free() when * done. **/ PopplerAnnotCalloutLine * @@ -1211,7 +1211,7 @@ poppler_annot_free_text_get_callout_line (PopplerAnnotFreeText *poppler_annot) * Creates a #PopplerAttachment for the file of the file attachment annotation @annot. * The #PopplerAttachment must be unrefed with g_object_unref by the caller. * - * Return value: @PopplerAttachment + * Return value: (transfer full): @PopplerAttachment * * Since: 0.14 **/ @@ -1266,7 +1266,7 @@ POPPLER_DEFINE_BOXED_TYPE (PopplerAnnotCalloutLine, poppler_annot_callout_line, * * Creates a new empty #PopplerAnnotCalloutLine. * - * Return value: a new allocated #PopplerAnnotCalloutLine, NULL in other case. + * Return value: a new allocated #PopplerAnnotCalloutLine, %NULL in other case. * It must be freed when done. **/ PopplerAnnotCalloutLine * @@ -1282,7 +1282,7 @@ poppler_annot_callout_line_new (void) * It does copy @callout to a new #PopplerAnnotCalloutLine. * * Return value: a new allocated #PopplerAnnotCalloutLine as exact copy of - * @callout, NULL in other case. It must be freed when done. + * @callout, %NULL in other case. It must be freed when done. **/ PopplerAnnotCalloutLine * poppler_annot_callout_line_copy (PopplerAnnotCalloutLine *callout) diff --git a/glib/poppler-attachment.h b/glib/poppler-attachment.h index 7d24c4a..e87971e 100644 --- a/glib/poppler-attachment.h +++ b/glib/poppler-attachment.h @@ -34,10 +34,11 @@ G_BEGIN_DECLS /** * PopplerAttachmentSaveFunc: - * @buf: buffer containing bytes to be written. + * @buf: (array length=count) (element-type guint8): buffer containing + * bytes to be written. * @count: number of bytes in @buf. - * @data: user data passed to poppler_attachment_save_to_callback() - * @error: GError to set on error, or NULL + * @data: (closure): user data passed to poppler_attachment_save_to_callback() + * @error: GError to set on error, or %NULL * * Specifies the type of the function passed to * poppler_attachment_save_to_callback(). It is called once for each block of diff --git a/glib/poppler-document.cc b/glib/poppler-document.cc index 745bc9b..4dd5519 100644 --- a/glib/poppler-document.cc +++ b/glib/poppler-document.cc @@ -2323,7 +2323,8 @@ poppler_layers_iter_get_title (PopplerLayersIter *iter) * Returns the #PopplerLayer associated with @iter. It must be freed with * poppler_layer_free(). * - * Return value: a new #PopplerLayer, or %NULL if there isn't any layer associated with @iter + * Return value: (transfer full): a new #PopplerLayer, or %NULL if + * there isn't any layer associated with @iter * * Since: 0.12 **/ @@ -2496,7 +2497,8 @@ poppler_ps_file_free (PopplerPSFile *ps_file) * Returns the #PopplerFormField for the given @id. It must be freed with * g_object_unref() * - * Return value: a new #PopplerFormField or NULL if not found + * Return value: (transfer full): a new #PopplerFormField or %NULL if + * not found **/ PopplerFormField * poppler_document_get_form_field (PopplerDocument *document, diff --git a/glib/poppler-media.h b/glib/poppler-media.h index c8ad222..f324e1b 100644 --- a/glib/poppler-media.h +++ b/glib/poppler-media.h @@ -33,10 +33,11 @@ G_BEGIN_DECLS /** * PopplerMediaSaveFunc: - * @buf: buffer containing bytes to be written. + * @buf: (array length=count) (element-type guint8): buffer containing + * bytes to be written. * @count: number of bytes in @buf. - * @data: user data passed to poppler_media_save_to_callback() - * @error: GError to set on error, or NULL + * @data: (closure): user data passed to poppler_media_save_to_callback() + * @error: GError to set on error, or %NULL * * Specifies the type of the function passed to * poppler_media_save_to_callback(). It is called once for each block of diff --git a/glib/poppler-page.cc b/glib/poppler-page.cc index 9850d44..b5e03f1 100644 --- a/glib/poppler-page.cc +++ b/glib/poppler-page.cc @@ -175,7 +175,7 @@ poppler_page_get_duration (PopplerPage *page) * * Returns the transition effect of @page * - * Return value: a #PopplerPageTransition or NULL. + * Return value: a #PopplerPageTransition or %NULL. **/ PopplerPageTransition * poppler_page_get_transition (PopplerPage *page) @@ -691,7 +691,8 @@ poppler_page_get_selection_region (PopplerPage *page, /** * poppler_page_selection_region_free: - * @region: a #GList of #PopplerRectangle + * @region: (element-type PopplerRectangle): a #GList of + * #PopplerRectangle * * Frees @region * @@ -1030,7 +1031,8 @@ poppler_page_get_image (PopplerPage *page, /** * poppler_page_free_image_mapping: - * @list: A list of #PopplerImageMappings + * @list: (element-type PopplerImageMapping): A list of + * #PopplerImageMappings * * Frees a list of #PopplerImageMappings allocated by * poppler_page_get_image_mapping(). @@ -1209,7 +1211,9 @@ poppler_page_get_link_mapping (PopplerPage *page) /** * poppler_page_free_link_mapping: - * @list: A list of #PopplerLinkMappings + + * @list: (element-type PopplerLinkMapping): A list of + * #PopplerLinkMappings * * Frees a list of #PopplerLinkMappings allocated by * poppler_page_get_link_mapping(). It also frees the #PopplerActions @@ -1277,7 +1281,8 @@ poppler_page_get_form_field_mapping (PopplerPage *page) /** * poppler_page_free_form_field_mapping: - * @list: A list of #PopplerFormFieldMappings + * @list: (element-type PopplerFormFieldMapping): A list of + * #PopplerFormFieldMappings * * Frees a list of #PopplerFormFieldMappings allocated by * poppler_page_get_form_field_mapping(). @@ -1396,7 +1401,8 @@ poppler_page_get_annot_mapping (PopplerPage *page) /** * poppler_page_free_annot_mapping: - * @list: A list of #PopplerAnnotMappings + * @list: (element-type PopplerAnnotMapping): A list of + * #PopplerAnnotMappings * * Frees a list of #PopplerAnnotMappings allocated by * poppler_page_get_annot_mapping(). It also frees the #PopplerAnnots @@ -2007,8 +2013,9 @@ poppler_page_get_text_layout (PopplerPage *page, } /** - * poppler_page_free_text_attributes; - * @list: A list of #PopplerTextAttributess + * poppler_page_free_text_attributes: + * @list: (element-type PopplerTextAttributes): A list of + * #PopplerTextAttributess * * Frees a list of #PopplerTextAttributess allocated by * poppler_page_get_text_attributes(). -- 1.7.7.5