Commit ea6bc195 authored by Albert Astals Cid's avatar Albert Astals Cid

Merge branch 'master' into xpdf303merge

Conflicts:
	poppler/CairoOutputDev.cc
	poppler/CairoOutputDev.h
	poppler/FontInfo.cc
	poppler/GfxFont.cc
	poppler/GfxState.cc
	poppler/GlobalParams.cc
	poppler/GlobalParams.h
	poppler/Lexer.cc
parents e17f0956 92ce79f4
......@@ -15,8 +15,8 @@ include(TestBigEndian)
test_big_endian(WORDS_BIGENDIAN)
set(POPPLER_MAJOR_VERSION "0")
set(POPPLER_MINOR_VERSION "17")
set(POPPLER_MICRO_VERSION "4")
set(POPPLER_MINOR_VERSION "18")
set(POPPLER_MICRO_VERSION "0")
set(POPPLER_VERSION "${POPPLER_MAJOR_VERSION}.${POPPLER_MINOR_VERSION}.${POPPLER_MICRO_VERSION}")
# command line switches
......@@ -34,7 +34,7 @@ option(ENABLE_ZLIB "Build with zlib (not totally safe)." OFF)
option(USE_FIXEDPOINT "Use fixed point arithmetic in the Splash backend" OFF)
option(USE_FLOAT "Use single precision arithmetic in the Splash backend" OFF)
if(WIN32)
option(ENABLE_RELOCATABLE "Hardcode the poppler library location (on Windows)." ON)
option(ENABLE_RELOCATABLE "Do not hardcode the poppler library location (on Windows)." ON)
else(WIN32)
set(ENABLE_RELOCATABLE OFF)
endif(WIN32)
......@@ -93,7 +93,6 @@ if(CAIRO_FOUND)
# Check for introspection
macro_optional_find_package(GObjectIntrospection 0.9.12)
set(HAVE_INTROSPECTION ${INTROSPECTION_FOUND})
set(GLIB_REQ "glib-2.0 >= ${GLIB_REQUIRED} gobject-2.0 >= ${GLIB_REQUIRED} cairo >= ${CAIRO_VERSION}")
set(POPPLER_GLIB_DISABLE_DEPRECATED "${POPPLER_GLIB_DISABLE_DEPRECATED} -DG_DISABLE_DEPRECATED")
set(POPPLER_GLIB_DISABLE_SINGLE_INCLUDES "${POPPLER_GLIB_DISABLE_SINGLE_INCLUDES} -DG_DISABLE_SINGLE_INCLUDES")
macro_optional_find_package(GTK)
......@@ -131,6 +130,7 @@ endif(ENABLE_LIBCURL)
add_definitions(-DHAVE_CONFIG_H=1)
if(FONTCONFIG_FOUND)
add_definitions(${FONTCONFIG_DEFINITIONS})
include_directories(${FONTCONFIG_INCLUDE_DIR})
endif(FONTCONFIG_FOUND)
if(WITH_FONTCONFIGURATION_WIN32)
if(MINGW)
......@@ -348,11 +348,12 @@ endif(TIFF_FOUND)
if(MSVC)
add_definitions(-D_CRT_SECURE_NO_WARNINGS)
set(CMAKE_CXX_FLAGS "/Zc:wchar_t- ${CMAKE_CXX_FLAGS}")
add_library(poppler STATIC ${poppler_SRCS})
else(MSVC)
add_library(poppler SHARED ${poppler_SRCS})
endif(MSVC)
set_target_properties(poppler PROPERTIES VERSION 17.0.0 SOVERSION 17)
set_target_properties(poppler PROPERTIES VERSION 18.0.0 SOVERSION 18)
target_link_libraries(poppler ${poppler_LIBS})
target_link_libraries(poppler LINK_INTERFACE_LIBRARIES "")
install(TARGETS poppler RUNTIME DESTINATION bin LIBRARY DESTINATION lib${LIB_SUFFIX} ARCHIVE DESTINATION lib${LIB_SUFFIX})
......
Release 0.18.0
core:
* Fix small memory leak when dealing with marked content
* Remove DCTStream::getRawStream since Stream::getNextStream does the same
utils:
* Rename pdfmerge to pdfunite
* Rename pdfextract to pdfseparate
* pdfseparate: Complain if %d is not present and it should
* Add pdfseparate and pdfunite man pages
build system:
* Minor cleanup in regarding removed qt code
Release 0.17.4 (0.18 RC)
core:
* SplashOutputDev: Compile when defining USE_FIXEDPOINT
......
......@@ -26,6 +26,19 @@ else (LIBOPENJPEG_LIBRARIES AND LIBOPENJPEG_INCLUDE_DIR)
find_path (LIBOPENJPEG_INCLUDE_DIR openjpeg.h PATH_SUFFIXES openjpeg)
find_library(LIBOPENJPEG_LIBRARIES openjpeg)
if(LIBOPENJPEG_INCLUDE_DIR AND LIBOPENJPEG_LIBRARIES)
set(CMAKE_REQUIRED_INCLUDES ${LIBOPENJPEG_INCLUDE_DIR})
set(CMAKE_REQUIRED_LIBRARIES ${LIBOPENJPEG_LIBRARIES})
check_cxx_source_compiles("
#include <openjpeg.h>
int main()
{
int foo = OPJ_DPARAMETERS_IGNORE_PCLR_CMAP_CDEF_FLAG;
return 0;
}
" WITH_OPENJPEG_IGNORE_PCLR_CMAP_CDEF_FLAG)
set(LIBOPENJPEG_FOUND TRUE)
endif(LIBOPENJPEG_INCLUDE_DIR AND LIBOPENJPEG_LIBRARIES)
......
......@@ -45,6 +45,7 @@ macro(gir_add_introspections introspections_girs)
_gir_list_prefix(_gir_libraries ${_gir_name}_LIBS "--library=")
_gir_list_prefix(_gir_packages ${_gir_name}_PACKAGES "--pkg=")
_gir_list_prefix(_gir_includes ${_gir_name}_INCLUDES "--include=")
_gir_list_prefix(_gir_export_packages ${_gir_name}_EXPORT_PACKAGES "--pkg-export=")
# Reuse the LIBTOOL variable from by automake if it's set
set(_gir_libtool "--no-libtool")
......@@ -59,6 +60,7 @@ macro(gir_add_introspections introspections_girs)
${_gir_libraries}
${_gir_packages}
${_gir_includes}
${_gir_export_packages}
${${_gir_name}_SCANNERFLAGS}
${${_gir_name}_CFLAGS}
${${_gir_name}_FILES}
......
......@@ -189,6 +189,9 @@
/* Use win32 font configuration backend */
#cmakedefine WITH_FONTCONFIGURATION_WIN32 1
/* OpenJPEG with the OPJ_DPARAMETERS_IGNORE_PCLR_CMAP_CDEF_FLAG flag */
#cmakedefine WITH_OPENJPEG_IGNORE_PCLR_CMAP_CDEF_FLAG 1
/* Define to 1 if the X Window System is missing or not being used. */
/* #undef X_DISPLAY_MISSING */
......
m4_define([poppler_version_major],[0])
m4_define([poppler_version_minor],[17])
m4_define([poppler_version_micro],[4])
m4_define([poppler_version_minor],[18])
m4_define([poppler_version_micro],[0])
m4_define([poppler_version],[poppler_version_major.poppler_version_minor.poppler_version_micro])
AC_PREREQ(2.59)
......@@ -40,6 +40,9 @@ AC_PROG_INSTALL
dnl ##### Check for pkgconfig
PKG_PROG_PKG_CONFIG
dnl ##### Export the version
AC_DEFINE([POPPLER_VERSION], [poppler_version], [Defines the poppler version])
dnl Enable these unconditionally.
AC_DEFINE([OPI_SUPPORT], [1], [Generate OPI comments in PS output.])
AC_DEFINE([MULTITHREADED], [1], [Enable multithreading support.])
......@@ -168,6 +171,14 @@ if test x$enable_libopenjpeg = xyes; then
LIBOPENJPEG_LIBS="-lopenjpeg"
AC_SUBST(LIBOPENJPEG_LIBS)
AC_DEFINE(ENABLE_LIBOPENJPEG)
AC_TRY_COMPILE([
#include <openjpeg.h>
], [
int foo = OPJ_DPARAMETERS_IGNORE_PCLR_CMAP_CDEF_FLAG;
], have_openjpeg_flag="yes", am_cv_proto_iconv_arg1="no")
if test x$have_openjpeg_flag = xyes; then
AC_DEFINE(WITH_OPENJPEG_IGNORE_PCLR_CMAP_CDEF_FLAG, 1, [OpenJPEG with the OPJ_DPARAMETERS_IGNORE_PCLR_CMAP_CDEF_FLAG flag.])
fi
fi
AM_CONDITIONAL(BUILD_LIBOPENJPEG, test x$enable_libopenjpeg = xyes)
......@@ -378,12 +389,17 @@ AC_ARG_ENABLE(cairo-output,
[Don't build the cairo graphics backend.]),
enable_cairo_output=$enableval,
enable_cairo_output="try")
use_cairo=""
if test x$enable_cairo_output = xyes; then
PKG_CHECK_MODULES(CAIRO, cairo >= $CAIRO_VERSION)
PKG_CHECK_MODULES(CAIRO, cairo >= $CAIRO_VERSION cairo-ft >= $CAIRO_VERSION)
elif test x$enable_cairo_output = xtry; then
PKG_CHECK_MODULES(CAIRO, cairo >= $CAIRO_VERSION,
PKG_CHECK_MODULES(CAIRO, cairo >= $CAIRO_VERSION cairo-ft >= $CAIRO_VERSION,
[enable_cairo_output="yes"],
[enable_cairo_output="no"])
[enable_cairo_output="no"
use_cairo="no (requires cairo >= $CAIRO_VERSION)"])
fi
if test x$use_cairo = x; then
use_cairo=$enable_cairo_output
fi
AC_SUBST(CAIRO_CFLAGS)
......@@ -392,6 +408,16 @@ AC_SUBST(CAIRO_LIBS)
AM_CONDITIONAL(BUILD_CAIRO_OUTPUT, test x$enable_cairo_output = xyes)
AH_TEMPLATE([HAVE_CAIRO], [Use cairo for rendering.])
if test x$enable_cairo_output = xyes; then
PDFTOCAIRO_DEPS="cairo cairo-ft"
dnl Check for optional cairo backends used by pdftocairo
PKG_CHECK_EXISTS(cairo-pdf, [PDFTOCAIRO_DEPS="$PDFTOCAIRO_DEPS cairo-pdf"], [])
PKG_CHECK_EXISTS(cairo-ps, [PDFTOCAIRO_DEPS="$PDFTOCAIRO_DEPS cairo-ps"], [])
PKG_CHECK_EXISTS(cairo-svg, [PDFTOCAIRO_DEPS="$PDFTOCAIRO_DEPS cairo-svg"], [])
PKG_CHECK_MODULES(PDFTOCAIRO, $PDFTOCAIRO_DEPS)
AC_SUBST(PDFTOCAIRO_CFLAGS)
AC_SUBST(PDFTOCAIRO_LIBS)
AC_DEFINE(HAVE_CAIRO)
CAIRO_FEATURE="#define POPPLER_HAS_CAIRO 1"
CAIRO_REQ="cairo"
......@@ -403,12 +429,14 @@ fi
AC_SUBST(CAIRO_FEATURE)
AC_SUBST(CAIRO_REQ)
use_glib=""
found_introspection=no
if test x$enable_cairo_output = xyes; then
POPPLER_GLIB_DISABLE_DEPRECATED=""
POPPLER_GLIB_DISABLE_SINGLE_INCLUDES=""
GLIB_REQUIRED=2.18
AC_SUBST(GLIB_REQUIRED)
AC_ARG_ENABLE(poppler-glib,
AC_HELP_STRING([--disable-poppler-glib],
[Don't compile poppler glib wrapper.]),
......@@ -419,13 +447,13 @@ if test x$enable_cairo_output = xyes; then
elif test x$enable_poppler_glib = xtry; then
PKG_CHECK_MODULES(POPPLER_GLIB, glib-2.0 >= $GLIB_REQUIRED gobject-2.0 >= $GLIB_REQUIRED cairo >= $CAIRO_VERSION,
[enable_poppler_glib="yes"],
[enable_poppler_glib="no"])
[enable_poppler_glib="no"
use_glib="no (requires glib-2.0 >= $GLIB_REQUIRED gobject-2.0 >= $GLIB_REQUIRED cairo >= $CAIRO_VERSION)"])
fi
if test x$enable_poppler_glib = xyes; then
# Check for introspection
GOBJECT_INTROSPECTION_CHECK([0.6.7])
GLIB_REQ="glib-2.0 >= $GLIB_REQUIRED gobject-2.0 >= $GLIB_REQUIRED cairo >= $CAIRO_VERSION"
AC_PATH_PROG([GLIB_MKENUMS],[glib-mkenums])
POPPLER_GLIB_DISABLE_DEPRECATED="$POPPLER_GLIB_DISABLE_DEPRECATED -DG_DISABLE_DEPRECATED"
POPPLER_GLIB_DISABLE_SINGLE_INCLUDES="$POPPLER_GLIB_DISABLE_SINGLE_INCLUDES -DG_DISABLE_SINGLE_INCLUDES"
......@@ -434,8 +462,11 @@ else
if test x$enable_poppler_glib = xyes; then
AC_MSG_ERROR("Cairo output is required to build glib frontend")
fi
use_glib="no (requires cairo output)"
enable_poppler_glib="no"
GLIB_REQ=""
fi
if test x$use_glib = x; then
use_glib=$enable_poppler_glib
fi
AM_CONDITIONAL(BUILD_POPPLER_GLIB, test x$enable_poppler_glib = xyes)
AM_CONDITIONAL(HAVE_INTROSPECTION, test "x$found_introspection" = "xyes")
......@@ -632,9 +663,9 @@ echo ""
echo "Building poppler with support for:"
echo " font configuration: $with_font_configuration"
echo " splash output: $enable_splash_output"
echo " cairo output: $enable_cairo_output"
echo " cairo output: $use_cairo"
echo " qt4 wrapper: $enable_poppler_qt4"
echo " glib wrapper: $enable_poppler_glib"
echo " glib wrapper: $use_glib"
echo " introspection: $found_introspection"
echo " cpp wrapper: $enable_poppler_cpp"
echo " use gtk-doc: $enable_gtk_doc"
......
......@@ -31,7 +31,7 @@ PROJECT_NAME = "Poppler CPP"
# This could be handy for archiving the generated documentation or
# if some version control system is used.
PROJECT_NUMBER = 0.17.4
PROJECT_NUMBER = 0.18.0
# The OUTPUT_DIRECTORY tag is used to specify the (relative or absolute)
# base path where the generated documentation will be put.
......
......@@ -106,7 +106,7 @@ if (HAVE_INTROSPECTION)
set(INTROSPECTION_SCANNER_ARGS "--add-include-path=${CMAKE_CURRENT_SOURCE_DIR}")
set(INTROSPECTION_COMPILER_ARGS "--includedir=${CMAKE_CURRENT_SOURCE_DIR}")
set(introspection_files ${poppler_glib_SRCS} ${poppler_glib_public_headers} poppler-private.h)
set(introspection_files ${poppler_glib_SRCS} ${poppler_glib_public_headers})
set(Poppler_0_18_gir "poppler-glib")
set(Poppler_0_18_gir_INCLUDES GObject-2.0 cairo-1.0)
get_directory_property(_tmp_includes INCLUDE_DIRECTORIES)
......@@ -117,8 +117,11 @@ if (HAVE_INTROSPECTION)
list(APPEND _abs_introspection_files
${CMAKE_CURRENT_BINARY_DIR}/poppler-enums.c
${CMAKE_CURRENT_BINARY_DIR}/poppler-enums.h
${CMAKE_CURRENT_BINARY_DIR}/poppler-features.h
)
set(Poppler_0_18_gir_FILES ${_abs_introspection_files})
set(Poppler_0_18_gir_SCANNERFLAGS --c-include poppler.h)
set(Poppler_0_18_gir_EXPORT_PACKAGES poppler-glib)
list(APPEND INTROSPECTION_GIRS Poppler-0.18.gir)
......
......@@ -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 = $(filter-out poppler-private.h, $(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_FILES = $(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
......
......@@ -666,9 +666,15 @@ pgd_annots_add_annot (GtkWidget *button,
vbox = gtk_dialog_get_content_area (GTK_DIALOG (dialog));
#if GTK_CHECK_VERSION (2, 24, 0)
type_selector = gtk_combo_box_text_new ();
gtk_combo_box_text_append_text (GTK_COMBO_BOX_TEXT (type_selector), "POPPLER_ANNOT_UNKNOWN");
gtk_combo_box_text_append_text (GTK_COMBO_BOX_TEXT (type_selector), "POPPLER_ANNOT_TEXT");
#else
type_selector = gtk_combo_box_new_text ();
gtk_combo_box_append_text (GTK_COMBO_BOX (type_selector), "POPPLER_ANNOT_UNKNOWN");
gtk_combo_box_append_text (GTK_COMBO_BOX (type_selector), "POPPLER_ANNOT_TEXT");
#endif
gtk_combo_box_set_active (GTK_COMBO_BOX (type_selector), 1);
gtk_box_pack_start (GTK_BOX (vbox), type_selector, TRUE, TRUE, 0);
gtk_widget_show (type_selector);
......
......@@ -180,7 +180,9 @@ pgd_demo_get_auth_dialog (GFile *uri_file)
action_area = gtk_dialog_get_action_area (dialog);
/* Set the dialog up with HIG properties */
#if !GTK_CHECK_VERSION (2, 22, 0)
gtk_dialog_set_has_separator (dialog, FALSE);
#endif
gtk_container_set_border_width (GTK_CONTAINER (dialog), 5);
gtk_box_set_spacing (GTK_BOX (content_area), 2); /* 2 * 5 + 2 = 12 */
gtk_container_set_border_width (GTK_CONTAINER (action_area), 5);
......@@ -300,8 +302,11 @@ gint main (gint argc, gchar **argv)
return 1;
}
/* Threading is always enabled starting from GLib 2.24.0 */
#if !GLIB_CHECK_VERSION (2, 24, 0)
if (!g_thread_supported ())
g_thread_init (NULL);
#endif
gtk_init (&argc, &argv);
......
......@@ -121,11 +121,18 @@ pgd_print_create_custom_widget (GtkPrintOperation *op,
gtk_box_pack_start (GTK_BOX (hbox), label, FALSE, FALSE, 0);
gtk_widget_show (label);
#if GTK_CHECK_VERSION (2, 24, 0)
combo = gtk_combo_box_text_new ();
gtk_combo_box_text_append_text (GTK_COMBO_BOX_TEXT (combo), "Document");
gtk_combo_box_text_append_text (GTK_COMBO_BOX_TEXT (combo), "Document and markup");
gtk_combo_box_text_append_text (GTK_COMBO_BOX_TEXT (combo), "Document and stamps");
#else
combo = gtk_combo_box_new_text ();
demo->options_combo = combo;
gtk_combo_box_append_text (GTK_COMBO_BOX (combo), "Document");
gtk_combo_box_append_text (GTK_COMBO_BOX (combo), "Document and markup");
gtk_combo_box_append_text (GTK_COMBO_BOX (combo), "Document and stamps");
#endif
demo->options_combo = combo;
gtk_combo_box_set_active (GTK_COMBO_BOX (combo), options);
gtk_box_pack_start (GTK_BOX (hbox), combo, FALSE, FALSE, 0);
gtk_widget_show (combo);
......
......@@ -372,11 +372,19 @@ pgd_render_properties_selector_create (PgdRenderDemo *demo)
gtk_box_pack_start (GTK_BOX (rotate_hbox), label, TRUE, TRUE, 0);
gtk_widget_show (label);
#if GTK_CHECK_VERSION (2, 24, 0)
rotate_selector = gtk_combo_box_text_new ();
gtk_combo_box_text_append_text (GTK_COMBO_BOX_TEXT (rotate_selector), "0");
gtk_combo_box_text_append_text (GTK_COMBO_BOX_TEXT (rotate_selector), "90");
gtk_combo_box_text_append_text (GTK_COMBO_BOX_TEXT (rotate_selector), "180");
gtk_combo_box_text_append_text (GTK_COMBO_BOX_TEXT (rotate_selector), "270");
#else
rotate_selector = gtk_combo_box_new_text ();
gtk_combo_box_append_text (GTK_COMBO_BOX (rotate_selector), "0");
gtk_combo_box_append_text (GTK_COMBO_BOX (rotate_selector), "90");
gtk_combo_box_append_text (GTK_COMBO_BOX (rotate_selector), "180");
gtk_combo_box_append_text (GTK_COMBO_BOX (rotate_selector), "270");
#endif
gtk_combo_box_set_active (GTK_COMBO_BOX (rotate_selector), 0);
g_signal_connect (G_OBJECT (rotate_selector), "changed",
G_CALLBACK (pgd_render_rotate_selector_changed),
......@@ -393,11 +401,19 @@ pgd_render_properties_selector_create (PgdRenderDemo *demo)
gtk_box_pack_start (GTK_BOX (mode_hbox), label, TRUE, TRUE, 0);
gtk_widget_show (label);
#if GTK_CHECK_VERSION (2, 24, 0)
mode_selector = gtk_combo_box_text_new ();
gtk_combo_box_text_append_text (GTK_COMBO_BOX_TEXT (mode_selector), "cairo");
#ifdef POPPLER_WITH_GDK
gtk_combo_box_text_append_text (GTK_COMBO_BOX_TEXT (mode_selector), "pixbuf");
#endif
#else // ! GTK_CHECK_VERSION (2, 24, 0)
mode_selector = gtk_combo_box_new_text ();
gtk_combo_box_append_text (GTK_COMBO_BOX (mode_selector), "cairo");
#ifdef POPPLER_WITH_GDK
gtk_combo_box_append_text (GTK_COMBO_BOX (mode_selector), "pixbuf");
#endif
#endif // GTK_CHECK_VERSION (2, 24, 0)
gtk_combo_box_set_active (GTK_COMBO_BOX (mode_selector), 0);
g_signal_connect (G_OBJECT (mode_selector), "changed",
G_CALLBACK (pgd_render_mode_selector_changed),
......
......@@ -538,11 +538,19 @@ pgd_selections_properties_selector_create (PgdSelectionsDemo *demo)
gtk_box_pack_start (GTK_BOX (rotate_hbox), label, TRUE, TRUE, 0);
gtk_widget_show (label);
#if GTK_CHECK_VERSION (2, 24, 0)
rotate_selector = gtk_combo_box_text_new ();
gtk_combo_box_text_append_text (GTK_COMBO_BOX_TEXT (rotate_selector), "0");
gtk_combo_box_text_append_text (GTK_COMBO_BOX_TEXT (rotate_selector), "90");
gtk_combo_box_text_append_text (GTK_COMBO_BOX_TEXT (rotate_selector), "180");
gtk_combo_box_text_append_text (GTK_COMBO_BOX_TEXT (rotate_selector), "270");
#else
rotate_selector = gtk_combo_box_new_text ();
gtk_combo_box_append_text (GTK_COMBO_BOX (rotate_selector), "0");
gtk_combo_box_append_text (GTK_COMBO_BOX (rotate_selector), "90");
gtk_combo_box_append_text (GTK_COMBO_BOX (rotate_selector), "180");
gtk_combo_box_append_text (GTK_COMBO_BOX (rotate_selector), "270");
#endif
gtk_combo_box_set_active (GTK_COMBO_BOX (rotate_selector), 0);
#if 0
g_signal_connect (G_OBJECT (rotate_selector), "changed",
......
......@@ -18,6 +18,7 @@
* Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.
*/
#include "config.h"
#include "poppler.h"
#include "poppler-private.h"
......@@ -1163,11 +1164,11 @@ poppler_annot_free_text_get_quadding (PopplerAnnotFreeText *poppler_annot)
* poppler_annot_free_text_get_callout_line:
* @poppler_annot: a #PopplerAnnotFreeText
*
* Retrieves a #PopplerCalloutLine of four or six numbers specifying a callout
* Retrieves a #PopplerAnnotCalloutLine of four or six numbers specifying a callout
* 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
* Return value: a new allocated #PopplerAnnotCalloutLine if the annot has a callout
* line, %NULL in other case. It must be freed with g_free() when
* done.
**/
PopplerAnnotCalloutLine *
......@@ -1211,7 +1212,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 +1267,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 *
......@@ -1277,12 +1278,12 @@ poppler_annot_callout_line_new (void)
/**
* poppler_annot_callout_line_copy:
* @callout: the #PopplerAnnotCalloutline to be copied.
* @callout: the #PopplerAnnotCalloutLine to be copied.
*
* 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)
......
......@@ -219,7 +219,7 @@ PopplerMovie *poppler_annot_movie_get_movie (
GType poppler_annot_screen_get_type (void) G_GNUC_CONST;
PopplerAction *poppler_annot_screen_get_action (PopplerAnnotScreen *poppler_annot);
/* PopplerCalloutLine */
/* PopplerAnnotCalloutLine */
GType poppler_annot_callout_line_get_type (void) G_GNUC_CONST;
PopplerAnnotCalloutLine *poppler_annot_callout_line_new (void);
PopplerAnnotCalloutLine *poppler_annot_callout_line_copy (PopplerAnnotCalloutLine *callout);
......
......@@ -210,7 +210,7 @@ poppler_attachment_save (PopplerAttachment *attachment,
return FALSE;
}
return TRUE;
return result;
}
#define BUF_SIZE 1024
......
......@@ -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
......
......@@ -16,6 +16,7 @@
* Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.
*/
#include "config.h"
#include <string.h>
#ifndef __GI_SCANNER__
......@@ -733,7 +734,7 @@ poppler_document_get_pdf_version_string (PopplerDocument *document)
* @major_version: (out) (allow-none): return location for the PDF major version number
* @minor_version: (out) (allow-none): return location for the PDF minor version number
*
* Returns the major and minor PDF version numbers.
* Returns: the major and minor PDF version numbers
*
* Since: 0.16
**/
......@@ -2319,11 +2320,11 @@ poppler_layers_iter_get_title (PopplerLayersIter *iter)
/**
* poppler_layers_iter_get_layer:
* @iter: a #PopplerLayersIter
*
* 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
*
* Returns the #PopplerLayer 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,
......
......@@ -77,17 +77,17 @@ typedef enum
/**
* PopplerFontType:
* @POPPLER_FONT_TYPE_UNKNOWN: unknown font type
* @POPPLER_FONT_TYPE_TYPE1:
* @POPPLER_FONT_TYPE_TYPE1C:
* @POPPLER_FONT_TYPE_TYPE1COT:
* @POPPLER_FONT_TYPE_TYPE3:
* @POPPLER_FONT_TYPE_TRUETYPE:
* @POPPLER_FONT_TYPE_TRUETYPEOT:
* @POPPLER_FONT_TYPE_CID_TYPE0:
* @POPPLER_FONT_TYPE_CID_TYPE0C:
* @POPPLER_FONT_TYPE_CID_TYPE0COT:
* @POPPLER_FONT_TYPE_CID_TYPE2:
* @POPPLER_FONT_TYPE_CID_TYPE2OT:
* @POPPLER_FONT_TYPE_TYPE1: Type 1 font type
* @POPPLER_FONT_TYPE_TYPE1C: Type 1 font type embedded in Compact Font Format (CFF) font program
* @POPPLER_FONT_TYPE_TYPE1COT: Type 1 font type embedded in OpenType font program
* @POPPLER_FONT_TYPE_TYPE3: A font type that is defined with PDF graphics operators
* @POPPLER_FONT_TYPE_TRUETYPE: TrueType font type
* @POPPLER_FONT_TYPE_TRUETYPEOT: TrueType font type embedded in OpenType font program
* @POPPLER_FONT_TYPE_CID_TYPE0: CIDFont type based on Type 1 font technology
* @POPPLER_FONT_TYPE_CID_TYPE0C: CIDFont type based on Type 1 font technology embedded in CFF font program
* @POPPLER_FONT_TYPE_CID_TYPE0COT: CIDFont type based on Type 1 font technology embedded in OpenType font program
* @POPPLER_FONT_TYPE_CID_TYPE2: CIDFont type based on TrueType font technology
* @POPPLER_FONT_TYPE_CID_TYPE2OT: CIDFont type based on TrueType font technology embedded in OpenType font program
*
* Font types
*/
......@@ -116,7 +116,7 @@ typedef enum
* @POPPLER_VIEWER_PREFERENCES_FIT_WINDOW: resize document's window to fit the size of the first displayed page
* @POPPLER_VIEWER_PREFERENCES_CENTER_WINDOW: position the document's window in the center of the screen
* @POPPLER_VIEWER_PREFERENCES_DISPLAY_DOC_TITLE: display document title in window's title bar
* @POPPLER_VIEWER_PREFERENCES_DIRECTION_RTL:
* @POPPLER_VIEWER_PREFERENCES_DIRECTION_RTL: the predominant reading order for text is right to left
*
* Viewer preferences
*/
......@@ -144,7 +144,7 @@ typedef enum /*< flags >*/
* @POPPLER_PERMISSIONS_OK_TO_ASSEMBLE: assemble the document (insert, rotate, or delete pages and create
* bookmarks or thumbnail images). Since 0.18
* @POPPLER_PERMISSIONS_OK_TO_PRINT_HIGH_RESOLUTION: document can be printer at high resolution. Since 0.18
* @POPPLER_PERMISSIONS_FULL:
* @POPPLER_PERMISSIONS_FULL: document permits all operations
*
* Permissions
*/
......
......@@ -136,7 +136,7 @@ poppler_media_get_filename (PopplerMedia *poppler_media)
* Whether the media clip is embedded in the PDF. If the result is %TRUE, the embedded stream
* can be saved with poppler_media_save() or poppler_media_save_to_callback() function.
* If the result is %FALSE, the media clip filename can be retrieved with
* poppler_media_get_file_name() function.
* poppler_media_get_filename() function.
*
* Return value: %TRUE if media clip is embedded, %FALSE otherwise
*
......
......@@ -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
......
......@@ -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)
......@@ -468,7 +468,7 @@ create_surface_from_thumbnail_data (guchar *data,
/**
* poppler_page_get_thumbnail:
* @page: the #PopperPage to get the thumbnail for
* @page: the #PopplerPage to get the thumbnail for
*
* Get the embedded thumbnail for the specified page. If the document
* doesn't have an embedded thumbnail for the page, this function
......@@ -622,8 +622,7 @@ poppler_page_get_thumbnail_size (PopplerPage *page,
* @selection: start and end point of selection as a rectangle
*
* Returns a region containing the area that would be rendered by
* poppler_page_render_selection() or
* poppler_page_render_selection_to_pixbuf() as a #GList of
* poppler_page_render_selection() as a #GList of
* #PopplerRectangle. The returned list must be freed with
* poppler_page_selection_region_free().
*
......@@ -689,7 +688,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
*
......@@ -713,8 +713,7 @@ poppler_page_selection_region_free (GList *region)
* @selection: start and end point of selection as a rectangle
*
* Returns a region containing the area that would be rendered by
* poppler_page_render_selection() or
* poppler_page_render_selection_to_pixbuf().
* poppler_page_render_selection().
* The returned region must be freed with cairo_region_destroy()
*
* Return value: (transfer full): a cairo_region_t
......@@ -1028,7 +1027,8 @@ poppler_page_get_image (PopplerPage *page,
/**
* poppler_page_free_image_mapping:
* @list: A list of #PopplerImageMapping<!-- -->s
* @list: (element-type PopplerImageMapping): A list of
* #PopplerImageMapping<!-- -->s
*
* Frees a list of #PopplerImageMapping<!-- -->s allocated by
* poppler_page_get_image_mapping().
......@@ -1205,7 +1205,8 @@ poppler_page_get_link_mapping (PopplerPage *page)
/**
* poppler_page_free_link_mapping:
* @list: A list of #PopplerLinkMapping<!-- -->s
* @list: (element-type PopplerLinkMapping): A list of
* #PopplerLinkMapping<!-- -->s
*
* Frees a list of #PopplerLinkMapping<!-- -->s allocated by
* poppler_page_get_link_mapping(). It also frees the #PopplerAction<!-- -->s
......@@ -1273,7 +1274,8 @@ poppler_page_get_form_field_mapping (PopplerPage *page)
/**
* poppler_page_free_form_field_mapping:
* @list: A list of #PopplerFormFieldMapping<!-- -->s
* @list: (element-type PopplerFormFieldMapping): A list of
* #PopplerFormFieldMapping<!-- -->s
*
* Frees a list of #PopplerFormFieldMapping<!-- -->s allocated by
* poppler_page_get_form_field_mapping().
......@@ -1392,12 +1394,13 @@ poppler_page_get_annot_mapping (PopplerPage *page)
/**
* poppler_page_free_annot_mapping:
* @list: A list of #PopplerAnnotMapping<!-- -->s
* @list: (element-type PopplerAnnotMapping): A list of
* #PopplerAnnotMapping<!-- -->s
*
* Frees a list of #PopplerAnnotMapping<!-- -->s allocated by
* poppler_page_get_annot_mapping(). It also frees the #PopplerAnnot<!-- -->s
* poppler_page_get_annot_mapping(). It also unreferences the #PopplerAnnot<!-- -->s
* that each mapping contains, so if you want to keep them around, you need to
* copy them with poppler_annot_copy().
* reference them with g_object_ref().
**/
void
poppler_page_free_annot_mapping (GList *list)
......@@ -2003,8 +2006,9 @@ poppler_page_get_text_layout (PopplerPage *page,
}
/**
* poppler_page_free_text_attributes;
* @list: A list of #PopplerTextAttributes<!-- -->s
* poppler_page_free_text_attributes:
* @list: (element-type PopplerTextAttributes): A list of
* #PopplerTextAttributes<!-- -->s
*
* Frees a list of #PopplerTextAttributes<!-- -->s allocated by
* poppler_page_get_text_attributes().
......
......@@ -157,7 +157,7 @@ void poppler_color_free (PopplerColor *color);
* @start_index: start position this text attributes apply
* @end_index: end position this text text attributes apply
*
* A #PopplerTextInfo is used to describe text attriutes of a reange of text
* A #PopplerTextAttributes is used to describe text attributes of a range of text
*
* Since: 0.18
*/
......@@ -290,7 +290,7 @@ void poppler_form_field_mapping_free (PopplerFormFieldMa
/**
* PopplerAnnotMapping:
* @area: a #PopplerRectangle representing an area of the page
* @annot: a #PopplerAannot
* @annot: a #PopplerAnnot
*
* A #PopplerAnnotMapping structure represents the location