From e75c4d299929984a9b630fa4aa33d3f2536dba12 Mon Sep 17 00:00:00 2001 From: Evan Nemerson Date: Sat, 14 Jan 2012 17:07:08 -0800 Subject: [PATCH] glib: various minor introspection improvements --- glib/Makefile.am | 4 +++- glib/poppler-annot.cc | 2 +- glib/poppler-attachment.h | 5 +++-- glib/poppler-document.cc | 6 ++++-- glib/poppler-media.h | 5 +++-- glib/poppler-page.cc | 21 ++++++++++++++------- 6 files changed, 28 insertions(+), 15 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..5ab9d07 100644 --- a/glib/poppler-annot.cc +++ b/glib/poppler-annot.cc @@ -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 **/ diff --git a/glib/poppler-attachment.h b/glib/poppler-attachment.h index 7d24c4a..203ab95 100644 --- a/glib/poppler-attachment.h +++ b/glib/poppler-attachment.h @@ -34,9 +34,10 @@ 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() + * @data: (closure 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 diff --git a/glib/poppler-document.cc b/glib/poppler-document.cc index 745bc9b..1191fb1 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..c5f69e7 100644 --- a/glib/poppler-media.h +++ b/glib/poppler-media.h @@ -33,9 +33,10 @@ 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() + * @data: (closure 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 diff --git a/glib/poppler-page.cc b/glib/poppler-page.cc index 9850d44..0ddc4de 100644 --- a/glib/poppler-page.cc +++ b/glib/poppler-page.cc @@ -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