From: Christian Persch Date: Sun, 25 Jan 2009 15:08:57 +0000 (+0000) Subject: Renamed from evince-backend.pc.in. Renamed library to libevdocument.la. X-Git-Tag: EVINCE_2_25_90~26 X-Git-Url: https://www.fi.muni.cz/~kas/git//home/kas/public_html/git/?a=commitdiff_plain;h=4912987303aefef0d02a45726b75e5fdae043982;p=evince.git Renamed from evince-backend.pc.in. Renamed library to libevdocument.la. * configure.ac: * evince-document.pc.in: Renamed from evince-backend.pc.in. * libdocument/Makefile.am: Renamed library to libevdocument.la. * libview/Makefile.am: * shell/Makefile.am: * backend/*/Makefile.am: Adapt to changed library name. * libdocument/Makefile.am: * libview/Makefile.am: Change the installed headers path to match the directory names in SVN. * evince-document.h: * evince-view.h: Add single headers. Bug #568227. * libdocument/*.h: * libview/*.h: Add single headers guards. * libview/Makefile.am: * libdocument/Makefile.am: * backend/*/Makefile.am: * help/reference/Makefile.am: Define EVINCE_COMPILATION, so we can still include individual headers. * properties/Makefile.am: * properties/ev-properties-main.c: * properties/ev-properties-view.h: * thumbnailer/Makefile.am: * thumbnailer/evince-thumbnailer.c: Include only evince-document.h. * libdocument/Makefile.am: * libview/Makefile.am: Generate type builtins from all installed headers. * libdocument/ev-link-action.[ch]: * libdocument/ev-link-dest.[ch]: * libdocument/ev-transition-effect.[ch]: * libview/ev-view.[ch]: Remove handcoded type builtins. * libdocument/Makefile.am: * evince-document.h: Add ev-document-factory.h to the public headers. svn path=/trunk/; revision=3381 --- diff --git a/.gitignore b/.gitignore new file mode 100644 index 00000000..178a6127 --- /dev/null +++ b/.gitignore @@ -0,0 +1,41 @@ +*~ +*/*~ +*/*/*~ +*/*/*/*~ +*.orig +*.rej +*/*.orig +*/*.rej +*/*/*.orig +*/*/*.rej +*/*/*/*.orig +*/*/*/*.rej +INSTALL +Makefile.in +*/Makefile.in +*/*/Makefile.in +*/*/*/Makefile.in +*/*/*/*/Makefile.in +aclocal.m4 +autom4te.cache +compile +config.guess +config.h.in +config.sub +configure +depcomp +gnome-doc-utils.make +gtk-doc.make +help/reference/*.bak +help/reference/*.stamp +help/reference/html +help/reference/tmpl/*.sgml.bak +help/reference/xml +install-sh +intltool-extract.in +intltool-merge.in +intltool-update.in +ltmain.sh +missing +mkinstalldirs +po/Makefile.in.in diff --git a/ChangeLog b/ChangeLog index 61e46ea3..06446f8e 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,44 @@ +2009-01-25 Christian Persch + + * configure.ac: + * evince-document.pc.in: Renamed from evince-backend.pc.in. + * libdocument/Makefile.am: Renamed library to libevdocument.la. + * libview/Makefile.am: + * shell/Makefile.am: + * backend/*/Makefile.am: Adapt to changed library name. + + * libdocument/Makefile.am: + * libview/Makefile.am: Change the installed headers path to match + the directory names in SVN. + + * evince-document.h: + * evince-view.h: Add single headers. Bug #568227. + + * libdocument/*.h: + * libview/*.h: Add single headers guards. + + * libview/Makefile.am: + * libdocument/Makefile.am: + * backend/*/Makefile.am: + * help/reference/Makefile.am: Define EVINCE_COMPILATION, so we can + still include individual headers. + + * properties/Makefile.am: + * properties/ev-properties-main.c: + * properties/ev-properties-view.h: + * thumbnailer/Makefile.am: + * thumbnailer/evince-thumbnailer.c: Include only evince-document.h. + + * libdocument/Makefile.am: + * libview/Makefile.am: Generate type builtins from all installed headers. + * libdocument/ev-link-action.[ch]: + * libdocument/ev-link-dest.[ch]: + * libdocument/ev-transition-effect.[ch]: + * libview/ev-view.[ch]: Remove handcoded type builtins. + + * libdocument/Makefile.am: + * evince-document.h: Add ev-document-factory.h to the public headers. + 2009-01-24 Carlos Garcia Campos * shell/ev-sidebar-page.c: diff --git a/Makefile.am b/Makefile.am index 9fa97109..de2524ac 100644 --- a/Makefile.am +++ b/Makefile.am @@ -14,10 +14,19 @@ if ENABLE_THUMBNAILER SUBDIRS += thumbnailer endif +NULL = + pkgconfigdir = $(libdir)/pkgconfig pkgconfig_DATA = \ - evince-backend-$(EV_API_VERSION).pc \ - evince-view-$(EV_API_VERSION).pc + evince-document-$(EV_API_VERSION).pc \ + evince-view-$(EV_API_VERSION).pc \ + $(NULL) + +headerdir = $(includedir)/evince/$(EV_API_VERSION) +header_DATA = \ + evince-document.h \ + evince-view.h \ + $(NULL) # Applications diff --git a/backend/comics/Makefile.am b/backend/comics/Makefile.am index 83165eaf..36a65ae7 100644 --- a/backend/comics/Makefile.am +++ b/backend/comics/Makefile.am @@ -4,6 +4,7 @@ INCLUDES = \ -I$(top_srcdir) \ -I$(top_srcdir)/libdocument \ -DGNOMELOCALEDIR=\"$(datadir)/locale\" \ + -DEVINCE_COMPILATION \ $(BACKEND_CFLAGS) \ $(LIB_CFLAGS) \ $(WARN_CFLAGS) \ @@ -17,7 +18,7 @@ libcomicsdocument_la_SOURCES = \ libcomicsdocument_la_LDFLAGS = $(BACKEND_LIBTOOL_FLAGS) libcomicsdocument_la_LIBADD = \ - $(top_builddir)/libdocument/libevbackend.la \ + $(top_builddir)/libdocument/libevdocument.la \ $(BACKEND_LIBS) \ $(LIB_LIBS) diff --git a/backend/djvu/Makefile.am b/backend/djvu/Makefile.am index 4cd22f57..1b94646e 100644 --- a/backend/djvu/Makefile.am +++ b/backend/djvu/Makefile.am @@ -5,6 +5,7 @@ INCLUDES = \ -I$(top_srcdir)/libdocument \ -DGNOMEICONDIR=\""${prefix}/${DATADIRNAME}/pixmaps"\" \ -DGNOMELOCALEDIR=\"$(datadir)/locale\" \ + -DEVINCE_COMPILATION \ $(BACKEND_CFLAGS) \ $(DJVU_CFLAGS) \ $(WARN_CFLAGS) \ @@ -23,7 +24,7 @@ libdjvudocument_la_SOURCES = \ libdjvudocument_la_LDFLAGS = $(BACKEND_LIBTOOL_FLAGS) libdjvudocument_la_LIBADD = \ - $(top_builddir)/libdocument/libevbackend.la \ + $(top_builddir)/libdocument/libevdocument.la \ $(BACKEND_LIBS) \ $(DJVU_LIBS) diff --git a/backend/dvi/Makefile.am b/backend/dvi/Makefile.am index 49bb5188..72afd6a1 100644 --- a/backend/dvi/Makefile.am +++ b/backend/dvi/Makefile.am @@ -7,6 +7,7 @@ INCLUDES = \ -I$(top_srcdir)/libdocument \ -I$(srcdir)/mdvi-lib \ -DGNOMELOCALEDIR=\"$(datadir)/locale\" \ + -DEVINCE_COMPILATION \ $(WARN_CFLAGS) \ $(BACKEND_CFLAGS) \ $(SPECTRE_CFLAGS) \ @@ -26,7 +27,7 @@ libdvidocument_la_LDFLAGS = $(BACKEND_LIBTOOL_FLAGS) libdvidocument_la_LIBADD = \ mdvi-lib/libmdvi.la \ -lkpathsea \ - $(top_builddir)/libdocument/libevbackend.la \ + $(top_builddir)/libdocument/libevdocument.la \ $(BACKEND_LIBS) \ $(SPECTRE_LIBS) diff --git a/backend/impress/Makefile.am b/backend/impress/Makefile.am index 194e1ba9..b7deeb7b 100644 --- a/backend/impress/Makefile.am +++ b/backend/impress/Makefile.am @@ -5,6 +5,7 @@ INCLUDES = \ -I$(top_srcdir)/libdocument \ -DGNOMELOCALEDIR=\"$(datadir)/locale\" \ -DDATADIR=\""$(datadir)"\" \ + -DEVINCE_COMPILATION \ $(BACKEND_CFLAGS) \ $(WARN_CFLAGS) \ $(DISABLE_DEPRECATED) @@ -43,7 +44,7 @@ IMPOSTER_RENDER_INCLUDE_FILES = \ libimpressdocument_la_LDFLAGS = $(BACKEND_LIBTOOL_FLAGS) libimpressdocument_la_LIBADD = \ - $(top_builddir)/libdocument/libevbackend.la \ + $(top_builddir)/libdocument/libevdocument.la \ $(BACKEND_LIBS) backend_in_files = impressdocument.evince-backend.in diff --git a/backend/pdf/Makefile.am b/backend/pdf/Makefile.am index d1a9615b..10272c89 100644 --- a/backend/pdf/Makefile.am +++ b/backend/pdf/Makefile.am @@ -4,6 +4,7 @@ INCLUDES = \ -I$(top_srcdir) \ -I$(top_srcdir)/libdocument \ -DGNOMELOCALEDIR=\"$(datadir)/locale\" \ + -DEVINCE_COMPILATION \ $(BACKEND_CFLAGS) \ $(POPPLER_CFLAGS) \ $(WARN_CXXFLAGS) \ @@ -17,7 +18,7 @@ libpdfdocument_la_SOURCES = \ libpdfdocument_la_LDFLAGS = $(BACKEND_LIBTOOL_FLAGS) libpdfdocument_la_LIBADD = \ - $(top_builddir)/libdocument/libevbackend.la \ + $(top_builddir)/libdocument/libevdocument.la \ $(BACKEND_LIBS) \ $(POPPLER_LIBS) \ $(CAIRO_PDF_LIBS) \ @@ -31,4 +32,4 @@ backend_DATA = $(backend_in_files:.evince-backend.in=.evince-backend) EXTRA_DIST = $(backend_in_files) -CLEANFILES = $(backend_DATA) \ No newline at end of file +CLEANFILES = $(backend_DATA) diff --git a/backend/pixbuf/Makefile.am b/backend/pixbuf/Makefile.am index d9b9be92..decc8da9 100644 --- a/backend/pixbuf/Makefile.am +++ b/backend/pixbuf/Makefile.am @@ -4,6 +4,7 @@ INCLUDES = \ -I$(top_srcdir) \ -I$(top_srcdir)/libdocument \ -DGNOMELOCALEDIR=\"$(datadir)/locale\" \ + -DEVINCE_COMPILATION \ $(BACKEND_CFLAGS) \ $(WARN_CFLAGS) \ $(DISABLE_DEPRECATED) @@ -16,7 +17,7 @@ libpixbufdocument_la_SOURCES = \ libpixbufdocument_la_LDFLAGS = $(BACKEND_LIBTOOL_FLAGS) libpixbufdocument_la_LIBADD = \ - $(top_builddir)/libdocument/libevbackend.la \ + $(top_builddir)/libdocument/libevdocument.la \ $(BACKEND_LIBS) backend_in_files = pixbufdocument.evince-backend.in diff --git a/backend/ps/Makefile.am b/backend/ps/Makefile.am index bb079420..0bc6990d 100644 --- a/backend/ps/Makefile.am +++ b/backend/ps/Makefile.am @@ -4,6 +4,7 @@ INCLUDES = \ -I$(top_srcdir) \ -I$(top_srcdir)/libdocument \ -DGNOMELOCALEDIR=\"$(datadir)/locale\" \ + -DEVINCE_COMPILATION \ $(BACKEND_CFLAGS) \ $(SPECTRE_CFLAGS) \ $(WARN_CFLAGS) \ @@ -17,7 +18,7 @@ libpsdocument_la_SOURCES = \ libpsdocument_la_LDFLAGS = $(BACKEND_LIBTOOL_FLAGS) libpsdocument_la_LIBADD = \ - $(top_builddir)/libdocument/libevbackend.la \ + $(top_builddir)/libdocument/libevdocument.la \ $(BACKEND_LIBS) \ $(SPECTRE_LIBS) @@ -29,4 +30,4 @@ backend_DATA = $(backend_in_files:.evince-backend.in=.evince-backend) EXTRA_DIST = $(backend_in_files) -CLEANFILES = $(backend_DATA) \ No newline at end of file +CLEANFILES = $(backend_DATA) diff --git a/backend/tiff/Makefile.am b/backend/tiff/Makefile.am index 6874a934..79ec11e0 100644 --- a/backend/tiff/Makefile.am +++ b/backend/tiff/Makefile.am @@ -4,6 +4,7 @@ INCLUDES = \ -I$(top_srcdir) \ -I$(top_srcdir)/libdocument \ -DGNOMELOCALEDIR=\"$(datadir)/locale\" \ + -DEVINCE_COMPILATION \ $(BACKEND_CFLAGS) \ $(WARN_CFLAGS) \ $(DISABLE_DEPRECATED) @@ -18,7 +19,7 @@ libtiffdocument_la_SOURCES = \ libtiffdocument_la_LDFLAGS = $(BACKEND_LIBTOOL_FLAGS) libtiffdocument_la_LIBADD = \ - $(top_builddir)/libdocument/libevbackend.la \ + $(top_builddir)/libdocument/libevdocument.la \ -ltiff backend_in_files = tiffdocument.evince-backend.in diff --git a/configure.ac b/configure.ac index a76cb0a8..a19f8fb0 100644 --- a/configure.ac +++ b/configure.ac @@ -21,11 +21,11 @@ m4_define([ev_api_version], [2.25]) # - If the interface is the same as the previous version, change to C:R+1:A # Libtool version of the backend library -m4_define([ev_backend_lt_current],[1]) -m4_define([ev_backend_lt_revision],[0]) -m4_define([ev_backend_lt_age],[0]) -m4_define([ev_backend_lt_version_info],[ev_backend_lt_current:ev_backend_lt_revision:ev_backend_lt_age]) -m4_define([ev_backend_lt_current_minus_age],[m4_eval(ev_backend_lt_current - ev_backend_lt_age)]) +m4_define([ev_document_lt_current],[1]) +m4_define([ev_document_lt_revision],[0]) +m4_define([ev_document_lt_age],[0]) +m4_define([ev_document_lt_version_info],[ev_document_lt_current:ev_document_lt_revision:ev_document_lt_age]) +m4_define([ev_document_lt_current_minus_age],[m4_eval(ev_document_lt_current - ev_document_lt_age)]) # Libtool version of the view library m4_define([ev_view_lt_current],[1]) @@ -49,6 +49,7 @@ AM_PROG_LIBTOOL AC_ISC_POSIX AC_PROG_CC AM_PROG_CC_STDC +AM_PROG_CC_C_O AC_PROG_CXX AC_STDC_HEADERS IT_PROG_INTLTOOL([0.35.0]) @@ -456,8 +457,8 @@ AC_SUBST([EV_MICRO_VERSION],[ev_micro_version]) AC_SUBST([EV_API_VERSION],[ev_api_version]) -AC_SUBST([EV_BACKEND_LT_VERSION_INFO],[ev_backend_lt_version_info]) -AC_SUBST([EV_BACKEND_LT_CURRENT_MINUS_AGE],[ev_backend_lt_current_minus_age]) +AC_SUBST([EV_DOCUMENT_LT_VERSION_INFO],[ev_document_lt_version_info]) +AC_SUBST([EV_DOCUMENT_LT_CURRENT_MINUS_AGE],[ev_document_lt_current_minus_age]) AC_SUBST([EV_VIEW_LT_VERSION_INFO],[ev_view_lt_version_info]) AC_SUBST([EV_VIEW_LT_CURRENT_MINUS_AGE],[ev_view_lt_current_minus_age]) @@ -515,7 +516,7 @@ test/Makefile thumbnailer/Makefile ]) -AC_CONFIG_FILES(evince-backend-[]ev_api_version[].pc:evince-backend.pc.in) +AC_CONFIG_FILES(evince-document-[]ev_api_version[].pc:evince-document.pc.in) AC_CONFIG_FILES(evince-view-[]ev_api_version[].pc:evince-view.pc.in) AC_OUTPUT diff --git a/cut-n-paste/evmountoperation/Makefile.am b/cut-n-paste/evmountoperation/Makefile.am index e84c1b4c..fa7bd440 100644 --- a/cut-n-paste/evmountoperation/Makefile.am +++ b/cut-n-paste/evmountoperation/Makefile.am @@ -7,4 +7,4 @@ libevmountoperation_la_SOURCES = \ libevmountoperation_la_CFLAGS = \ $(SHELL_CORE_CFLAGS) \ $(WARNING_CFLAGS) \ - $(DISABLE_DEPRECATED) \ No newline at end of file + $(DISABLE_DEPRECATED) diff --git a/cut-n-paste/gimpcellrenderertoggle/Makefile.am b/cut-n-paste/gimpcellrenderertoggle/Makefile.am index 8bc909dd..1f0b3dea 100644 --- a/cut-n-paste/gimpcellrenderertoggle/Makefile.am +++ b/cut-n-paste/gimpcellrenderertoggle/Makefile.am @@ -33,4 +33,4 @@ gimpwidgetsmarshal.c: gimpwidgetsmarshal.h gen_sources = xgen-wmh xgen-wmc $(libgimpcellrenderertoggle_la_built_sources) CLEANFILES = $(gen_sources) -EXTRA_DIST = $(libgimpcellrenderertoggle_la_extra_sources) \ No newline at end of file +EXTRA_DIST = $(libgimpcellrenderertoggle_la_extra_sources) diff --git a/evince-document.h b/evince-document.h new file mode 100644 index 00000000..0f1c13f7 --- /dev/null +++ b/evince-document.h @@ -0,0 +1,57 @@ +/* + * Copyright © 2009 Christian Persch + * + * This program is free software; you can redistribute it and/or modify it + * under the terms of the GNU Lesser General Public License as published by the + * Free Software Foundation; either version 2.1 of the License, or (at your + * option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser + * General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License along + * with this program; if not, write to the Free Software Foundation, Inc., + * 59 Temple Place, Suite 330, Boston, MA 02110-1301 USA + */ + +#ifndef EVINCE_DOCUMENT_H +#define EVINCE_DOCUMENT_H + +#define __EV_EVINCE_DOCUMENT_H_INSIDE__ + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#undef __EV_EVINCE_DOCUMENT_H_INSIDE__ + +#endif /* !EVINCE_DOCUMENT_H */ diff --git a/evince-backend.pc.in b/evince-document.pc.in similarity index 83% rename from evince-backend.pc.in rename to evince-document.pc.in index 21309646..07536df3 100644 --- a/evince-backend.pc.in +++ b/evince-document.pc.in @@ -3,9 +3,9 @@ exec_prefix=@exec_prefix@ libdir=@libdir@ includedir=@includedir@/evince/@EV_API_VERSION@ -Name: Evince Backend +Name: Evince Document Description: GNOME document viewer backend library Version: @VERSION@ Requires: gio-2.0 >= @GLIB_REQUIRED@ gtk+-2.0 >= @GTK_REQUIRED@ -Libs: -L${libdir} -levbackend +Libs: -L${libdir} -levdocument Cflags: -I${includedir} diff --git a/evince-view.h b/evince-view.h new file mode 100644 index 00000000..74e78a8d --- /dev/null +++ b/evince-view.h @@ -0,0 +1,32 @@ +/* +* Copyright © 2009 Christian Persch + * + * This program is free software; you can redistribute it and/or modify it + * under the terms of the GNU Lesser General Public License as published by the + * Free Software Foundation; either version 2.1 of the License, or (at your + * option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser + * General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License along + * with this program; if not, write to the Free Software Foundation, Inc., + * 59 Temple Place, Suite 330, Boston, MA 02110-1301 USA + */ + +#ifndef EVINCE_VIEW_H +#define EVINCE_VIEW_H + +#define __EV_EVINCE_VIEW_H_INSIDE__ + +#include +#include +#include +#include +#include + +#undef __EV_EVINCE_VIEW_H_INSIDE__ + +#endif /* !EVINCE_VIEW_H */ diff --git a/evince-view.pc.in b/evince-view.pc.in index 28e1f738..f6e6be4e 100644 --- a/evince-view.pc.in +++ b/evince-view.pc.in @@ -6,6 +6,6 @@ includedir=@includedir@/evince/@EV_API_VERSION@ Name: Evince View Description: GNOME document viewer view library Version: @VERSION@ -Requires: evince-backend-@EV_API_VERSION@ = @VERSION@ gthread-2.0 +Requires: evince-document-@EV_API_VERSION@ = @VERSION@ gthread-2.0 Libs: -L${libdir} -levview Cflags: -I${includedir} diff --git a/help/reference/Makefile.am b/help/reference/Makefile.am index a8d23c22..f3ccc0f8 100644 --- a/help/reference/Makefile.am +++ b/help/reference/Makefile.am @@ -73,6 +73,8 @@ expand_content_files= # e.g. INCLUDES=-I$(top_srcdir) -I$(top_builddir) $(GTK_DEBUG_FLAGS) # e.g. GTKDOC_LIBS=$(top_builddir)/gtk/$(gtktargetlib) INCLUDES= \ + -I$(top_srcdir) \ + -I$(top_builddir) \ -I$(top_srcdir)/shell \ -DDATADIR=\"$(pkgdatadir)\" \ -DGNOMEDATADIR=\"$(datadir)\" \ @@ -82,10 +84,11 @@ INCLUDES= \ -I$(top_srcdir)/libdocument \ -I$(top_builddir)/libdocument \ -I$(top_srcdir)/libview \ - -I$(top_builddir)/libview \ + -I$(top_builddir)/libview \ -I$(top_srcdir)/properties \ -DGNOMELOCALEDIR=\"$(datadir)/locale\" \ -DGNOMEICONDIR=\""$(datadir)/pixmaps"\" \ + -DEVINCE_COMPILATION \ $(SHELL_CFLAGS) \ $(WARN_CFLAGS) \ $(DISABLE_DEPRECATED) \ @@ -101,7 +104,7 @@ GTKDOC_LIBS= \ $(top_builddir)/cut-n-paste/gimpcellrenderertoggle/libgimpcellrenderertoggle.la \ $(top_builddir)/cut-n-paste/smclient/libsmclient.la \ $(top_builddir)/properties/libevproperties.la \ - $(top_builddir)/libdocument/libevbackend.la \ + $(top_builddir)/libdocument/libevdocument.la \ $(top_builddir)/libview/libevview.la \ $(SHELL_LIBS) \ $(GNOME_PRINT_LIBS) \ diff --git a/libdocument/Makefile.am b/libdocument/Makefile.am index a44ed640..0580c622 100644 --- a/libdocument/Makefile.am +++ b/libdocument/Makefile.am @@ -1,30 +1,14 @@ -INCLUDES= \ - -DG_LOG_DOMAIN=\"EvDocument\" \ - -DEVINCE_UIDIR=\"$(pkgdatadir)\" \ - -DGNOMELOCALEDIR=\"$(datadir)/locale\" \ - -DEV_BACKENDSDIR=\"$(libdir)/evince/backends\" \ - $(LIBDOCUMENT_CFLAGS) \ - $(WARN_CFLAGS) \ - $(DISABLE_DEPRECATED) - -lib_LTLIBRARIES = libevbackend.la - -libevbackend_la_LDFLAGS = \ - -version-info $(EV_BACKEND_LT_VERSION_INFO) \ - -export-symbols-regex "^ev_*" \ - $(AM_LDFLAGS) - -libevbackend_la_LIBADD = $(LIBDOCUMENT_LIBS) +lib_LTLIBRARIES = libevdocument.la NOINST_H_FILES = \ ev-debug.h \ - ev-document-factory.h \ ev-module.h INST_H_FILES = \ ev-async-renderer.h \ ev-attachment.h \ ev-backends-manager.h \ + ev-document-factory.h \ ev-document-find.h \ ev-document-fonts.h \ ev-document-forms.h \ @@ -52,10 +36,10 @@ INST_H_FILES = \ ev-transition-effect.h \ ev-version.h -headerdir = $(includedir)/evince/$(EV_API_VERSION)/ev-backend +headerdir = $(includedir)/evince/$(EV_API_VERSION)/libdocument header_DATA = $(INST_H_FILES) -libevbackend_la_SOURCES= \ +libevdocument_la_SOURCES= \ ev-async-renderer.c \ ev-attachment.c \ ev-backends-manager.c \ @@ -89,6 +73,27 @@ libevbackend_la_SOURCES= \ $(NOINST_H_FILES) \ $(INST_H_FILES) +libevdocument_la_CPPFLAGS = \ + -DG_LOG_DOMAIN=\"EvDocument\" \ + -DEVINCE_UIDIR=\"$(pkgdatadir)\" \ + -DGNOMELOCALEDIR=\"$(datadir)/locale\" \ + -DEV_BACKENDSDIR=\"$(libdir)/evince/backends\" \ + -DEVINCE_COMPILATION \ + $(AM_CPPFLAGS) + +libevdocument_la_CFLAGS = \ + $(LIBDOCUMENT_CFLAGS) \ + $(WARN_CFLAGS) \ + $(DISABLE_DEPRECATED) \ + $(AM_CFLAGS) + +libevdocument_la_LDFLAGS = \ + -version-info $(EV_DOCUMENT_LT_VERSION_INFO) \ + -export-symbols-regex "^ev_*" \ + $(AM_LDFLAGS) + +libevdocument_la_LIBADD = $(LIBDOCUMENT_LIBS) + BUILT_SOURCES = \ ev-document-type-builtins.c \ ev-document-type-builtins.h @@ -98,13 +103,13 @@ CLEANFILES = $(BUILT_SOURCES) stamp-ev-document-type-builtins.h ev-document-type-builtins.h: stamp-ev-document-type-builtins.h @true -stamp-ev-document-type-builtins.h: ev-document-type-builtins.h.template ev-document-info.h +stamp-ev-document-type-builtins.h: ev-document-type-builtins.h.template $(INST_H_FILES) $(GLIB_MKENUMS) --template $< $(filter-out $<,$^) > xgen-etbh \ && (cmp -s xgen-etbh ev-document-type-builtins.h || cp xgen-etbh ev-document-type-builtins.h ) \ && rm -f xgen-etbh \ && echo timestamp > $(@F) -ev-document-type-builtins.c: ev-document-type-builtins.c.template ev-document-info.h +ev-document-type-builtins.c: ev-document-type-builtins.c.template $(INST_H_FILES) $(GLIB_MKENUMS) --template $< $(filter-out $<,$^) > xgen-etbc \ && (cmp -s xgen-etbc ev-document-type-builtins.c || cp xgen-etbc ev-document-type-builtins.c ) \ && rm -f xgen-etbc @@ -112,4 +117,3 @@ ev-document-type-builtins.c: ev-document-type-builtins.c.template ev-document-in EXTRA_DIST = \ ev-document-type-builtins.c.template \ ev-document-type-builtins.h.template - diff --git a/libdocument/ev-async-renderer.h b/libdocument/ev-async-renderer.h index e516a053..1615187a 100644 --- a/libdocument/ev-async-renderer.h +++ b/libdocument/ev-async-renderer.h @@ -18,6 +18,10 @@ * */ +#if !defined (__EV_EVINCE_DOCUMENT_H_INSIDE__) && !defined (EVINCE_COMPILATION) +#error "Only can be included directly." +#endif + #ifndef EV_ASYNC_RENDERER_H #define EV_ASYNC_RENDERER_H diff --git a/libdocument/ev-attachment.h b/libdocument/ev-attachment.h index f163c0a3..ccc41ba2 100644 --- a/libdocument/ev-attachment.h +++ b/libdocument/ev-attachment.h @@ -17,6 +17,10 @@ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. */ +#if !defined (__EV_EVINCE_DOCUMENT_H_INSIDE__) && !defined (EVINCE_COMPILATION) +#error "Only can be included directly." +#endif + #ifndef __EV_ATTACHMENT_H__ #define __EV_ATTACHMENT_H__ diff --git a/libdocument/ev-backends-manager.h b/libdocument/ev-backends-manager.h index a78d6f84..4fb16564 100644 --- a/libdocument/ev-backends-manager.h +++ b/libdocument/ev-backends-manager.h @@ -17,6 +17,10 @@ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. */ +#if !defined (__EV_EVINCE_DOCUMENT_H_INSIDE__) && !defined (EVINCE_COMPILATION) +#error "Only can be included directly." +#endif + #ifndef EV_BACKENDS_MANAGER #define EV_BACKENDS_MANAGER diff --git a/libdocument/ev-debug.h b/libdocument/ev-debug.h index c8b8a34f..7acb41f0 100644 --- a/libdocument/ev-debug.h +++ b/libdocument/ev-debug.h @@ -32,6 +32,10 @@ /* Modified by Evince Team */ +#if !defined (EVINCE_COMPILATION) +#error "This is a private header." +#endif + #ifndef __EV_DEBUG_H__ #define __EV_DEBUG_H__ diff --git a/libdocument/ev-document-factory.h b/libdocument/ev-document-factory.h index 82e47a2e..6b551817 100644 --- a/libdocument/ev-document-factory.h +++ b/libdocument/ev-document-factory.h @@ -18,6 +18,10 @@ * */ +#if !defined (__EV_EVINCE_DOCUMENT_H_INSIDE__) && !defined (EVINCE_COMPILATION) +#error "Only can be included directly." +#endif + #ifndef EV_DOCUMENT_FACTORY_H #define EV_DOCUMENT_FACTORY_H diff --git a/libdocument/ev-document-find.h b/libdocument/ev-document-find.h index 40db0174..835ca243 100644 --- a/libdocument/ev-document-find.h +++ b/libdocument/ev-document-find.h @@ -19,6 +19,10 @@ * $Id$ */ +#if !defined (__EV_EVINCE_DOCUMENT_H_INSIDE__) && !defined (EVINCE_COMPILATION) +#error "Only can be included directly." +#endif + #ifndef EV_DOCUMENT_FIND_H #define EV_DOCUMENT_FIND_H diff --git a/libdocument/ev-document-fonts.h b/libdocument/ev-document-fonts.h index c9f58f53..71433a5a 100644 --- a/libdocument/ev-document-fonts.h +++ b/libdocument/ev-document-fonts.h @@ -21,6 +21,10 @@ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. */ +#if !defined (__EV_EVINCE_DOCUMENT_H_INSIDE__) && !defined (EVINCE_COMPILATION) +#error "Only can be included directly." +#endif + #ifndef EV_DOCUMENT_FONTS_H #define EV_DOCUMENT_FONTS_H diff --git a/libdocument/ev-document-forms.h b/libdocument/ev-document-forms.h index 1337a5ed..f72b08bb 100644 --- a/libdocument/ev-document-forms.h +++ b/libdocument/ev-document-forms.h @@ -18,6 +18,10 @@ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. */ +#if !defined (__EV_EVINCE_DOCUMENT_H_INSIDE__) && !defined (EVINCE_COMPILATION) +#error "Only can be included directly." +#endif + #ifndef EV_DOCUMENT_FORMS_H #define EV_DOCUMENT_FORMS_H diff --git a/libdocument/ev-document-images.h b/libdocument/ev-document-images.h index d8699b94..d9d76965 100644 --- a/libdocument/ev-document-images.h +++ b/libdocument/ev-document-images.h @@ -18,6 +18,10 @@ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. */ +#if !defined (__EV_EVINCE_DOCUMENT_H_INSIDE__) && !defined (EVINCE_COMPILATION) +#error "Only can be included directly." +#endif + #ifndef EV_DOCUMENT_IMAGES_H #define EV_DOCUMENT_IMAGES_H diff --git a/libdocument/ev-document-info.h b/libdocument/ev-document-info.h index 51d5f7d9..a75f6819 100644 --- a/libdocument/ev-document-info.h +++ b/libdocument/ev-document-info.h @@ -18,6 +18,10 @@ * */ +#if !defined (__EV_EVINCE_DOCUMENT_H_INSIDE__) && !defined (EVINCE_COMPILATION) +#error "Only can be included directly." +#endif + #ifndef EV_DOCUMENT_INFO_H #define EV_DOCUMENT_INFO_H diff --git a/libdocument/ev-document-layers.h b/libdocument/ev-document-layers.h index 506808ba..b04c8056 100644 --- a/libdocument/ev-document-layers.h +++ b/libdocument/ev-document-layers.h @@ -18,6 +18,10 @@ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. */ +#if !defined (__EV_EVINCE_DOCUMENT_H_INSIDE__) && !defined (EVINCE_COMPILATION) +#error "Only can be included directly." +#endif + #ifndef EV_DOCUMENT_LAYERS_H #define EV_DOCUMENT_LAYERS_H diff --git a/libdocument/ev-document-links.h b/libdocument/ev-document-links.h index f6a6a480..b8ea6014 100644 --- a/libdocument/ev-document-links.h +++ b/libdocument/ev-document-links.h @@ -21,6 +21,10 @@ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. */ +#if !defined (__EV_EVINCE_DOCUMENT_H_INSIDE__) && !defined (EVINCE_COMPILATION) +#error "Only can be included directly." +#endif + #ifndef EV_DOCUMENT_LINKS_H #define EV_DOCUMENT_LINKS_H diff --git a/libdocument/ev-document-misc.h b/libdocument/ev-document-misc.h index 4c31dc7f..5a2ea035 100644 --- a/libdocument/ev-document-misc.h +++ b/libdocument/ev-document-misc.h @@ -19,6 +19,10 @@ * $Id$ */ +#if !defined (__EV_EVINCE_DOCUMENT_H_INSIDE__) && !defined (EVINCE_COMPILATION) +#error "Only can be included directly." +#endif + #ifndef EV_DOCUMENT_MISC_H #define EV_DOCUMENT_MISC_H diff --git a/libdocument/ev-document-security.h b/libdocument/ev-document-security.h index 154a3b15..298d9b75 100644 --- a/libdocument/ev-document-security.h +++ b/libdocument/ev-document-security.h @@ -21,6 +21,10 @@ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. */ +#if !defined (__EV_EVINCE_DOCUMENT_H_INSIDE__) && !defined (EVINCE_COMPILATION) +#error "Only can be included directly." +#endif + #ifndef EV_DOCUMENT_SECURITY_H #define EV_DOCUMENT_SECURITY_H diff --git a/libdocument/ev-document-thumbnails.h b/libdocument/ev-document-thumbnails.h index 648c0ebb..cdcb472e 100644 --- a/libdocument/ev-document-thumbnails.h +++ b/libdocument/ev-document-thumbnails.h @@ -18,6 +18,10 @@ * */ +#if !defined (__EV_EVINCE_DOCUMENT_H_INSIDE__) && !defined (EVINCE_COMPILATION) +#error "Only can be included directly." +#endif + #ifndef EV_DOCUMENT_THUMBNAILS_H #define EV_DOCUMENT_THUMBNAILS_H diff --git a/libdocument/ev-document-transition.h b/libdocument/ev-document-transition.h index 9171acf5..ad2b507b 100644 --- a/libdocument/ev-document-transition.h +++ b/libdocument/ev-document-transition.h @@ -18,6 +18,10 @@ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. */ +#if !defined (__EV_EVINCE_DOCUMENT_H_INSIDE__) && !defined (EVINCE_COMPILATION) +#error "Only can be included directly." +#endif + #ifndef EV_DOCUMENT_TRANSITION_H #define EV_DOCUMENT_TRANSITION_H diff --git a/libdocument/ev-document-type-builtins.c.template b/libdocument/ev-document-type-builtins.c.template index 19968389..600a20f2 100644 --- a/libdocument/ev-document-type-builtins.c.template +++ b/libdocument/ev-document-type-builtins.c.template @@ -1,4 +1,6 @@ /*** BEGIN file-header ***/ +#include + #include "ev-document-type-builtins.h" /*** END file-header ***/ diff --git a/libdocument/ev-document-type-builtins.h.template b/libdocument/ev-document-type-builtins.h.template index 91e3e61a..4b70c87c 100644 --- a/libdocument/ev-document-type-builtins.h.template +++ b/libdocument/ev-document-type-builtins.h.template @@ -1,5 +1,9 @@ /*** BEGIN file-header ***/ +#if !defined (__EV_EVINCE_DOCUMENT_H_INSIDE__) && !defined (EVINCE_COMPILATION) +#error "Only can be included directly." +#endif + #ifndef EV_DOCUMENT_TYPE_BUILTINS_H #define EV_DOCUMENT_TYPE_BUILTINS_H diff --git a/libdocument/ev-document.h b/libdocument/ev-document.h index 7cb6d847..cfcd5ba6 100644 --- a/libdocument/ev-document.h +++ b/libdocument/ev-document.h @@ -19,6 +19,10 @@ * $Id$ */ +#if !defined (__EV_EVINCE_DOCUMENT_H_INSIDE__) && !defined (EVINCE_COMPILATION) +#error "Only can be included directly." +#endif + #ifndef EV_DOCUMENT_H #define EV_DOCUMENT_H diff --git a/libdocument/ev-file-exporter.h b/libdocument/ev-file-exporter.h index 6302cd20..f623d5f1 100644 --- a/libdocument/ev-file-exporter.h +++ b/libdocument/ev-file-exporter.h @@ -20,6 +20,10 @@ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. */ +#if !defined (__EV_EVINCE_DOCUMENT_H_INSIDE__) && !defined (EVINCE_COMPILATION) +#error "Only can be included directly." +#endif + #ifndef EV_FILE_EXPORTER_H #define EV_FILE_EXPORTER_H diff --git a/libdocument/ev-file-helpers.h b/libdocument/ev-file-helpers.h index 833eade9..2c27b389 100644 --- a/libdocument/ev-file-helpers.h +++ b/libdocument/ev-file-helpers.h @@ -18,6 +18,10 @@ * $Id$ */ +#if !defined (__EV_EVINCE_DOCUMENT_H_INSIDE__) && !defined (EVINCE_COMPILATION) +#error "Only can be included directly." +#endif + #ifndef EV_FILE_HELPERS_H #define EV_FILE_HELPERS_H diff --git a/libdocument/ev-form-field.h b/libdocument/ev-form-field.h index 027bee60..92dd9fd4 100644 --- a/libdocument/ev-form-field.h +++ b/libdocument/ev-form-field.h @@ -18,6 +18,10 @@ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. */ +#if !defined (__EV_EVINCE_DOCUMENT_H_INSIDE__) && !defined (EVINCE_COMPILATION) +#error "Only can be included directly." +#endif + #ifndef EV_FORM_FIELD_H #define EV_FORM_FIELD_H diff --git a/libdocument/ev-image.h b/libdocument/ev-image.h index e603010f..29c1debb 100644 --- a/libdocument/ev-image.h +++ b/libdocument/ev-image.h @@ -17,6 +17,10 @@ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. */ +#if !defined (__EV_EVINCE_DOCUMENT_H_INSIDE__) && !defined (EVINCE_COMPILATION) +#error "Only can be included directly." +#endif + #ifndef __EV_IMAGE_H__ #define __EV_IMAGE_H__ diff --git a/libdocument/ev-layer.h b/libdocument/ev-layer.h index 86fc403e..5df33286 100644 --- a/libdocument/ev-layer.h +++ b/libdocument/ev-layer.h @@ -17,6 +17,10 @@ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. */ +#if !defined (__EV_EVINCE_DOCUMENT_H_INSIDE__) && !defined (EVINCE_COMPILATION) +#error "Only can be included directly." +#endif + #ifndef __EV_LAYER_H__ #define __EV_LAYER_H__ diff --git a/libdocument/ev-link-action.c b/libdocument/ev-link-action.c index 52eb9f46..982ab551 100644 --- a/libdocument/ev-link-action.c +++ b/libdocument/ev-link-action.c @@ -20,6 +20,7 @@ #include #include "ev-link-action.h" +#include "ev-document-type-builtins.h" enum { PROP_0, @@ -55,27 +56,6 @@ G_DEFINE_TYPE (EvLinkAction, ev_link_action, G_TYPE_OBJECT) #define EV_LINK_ACTION_GET_PRIVATE(object) \ (G_TYPE_INSTANCE_GET_PRIVATE ((object), EV_TYPE_LINK_ACTION, EvLinkActionPrivate)) -GType -ev_link_action_type_get_type (void) -{ - static GType type = 0; - - if (G_UNLIKELY (type == 0)) { - static const GEnumValue values[] = { - { EV_LINK_ACTION_TYPE_GOTO_DEST, "EV_LINK_ACTION_TYPE_GOTO_DEST", "goto-dest" }, - { EV_LINK_ACTION_TYPE_GOTO_REMOTE, "EV_LINK_ACTION_TYPE_GOTO_REMOTE", "goto-remote" }, - { EV_LINK_ACTION_TYPE_LAUNCH, "EV_LINK_ACTION_TYPE_LAUNCH", "launch" }, - { EV_LINK_ACTION_TYPE_EXTERNAL_URI, "EV_LINK_ACTION_TYPE_EXTERNAL_URI", "external-uri"}, - { EV_LINK_ACTION_TYPE_NAMED, "EV_LINK_ACTION_TYPE_NAMED", "named"}, - { 0, NULL, NULL } - }; - - type = g_enum_register_static ("EvLinkActionType", values); - } - - return type; -} - EvLinkActionType ev_link_action_get_action_type (EvLinkAction *self) { diff --git a/libdocument/ev-link-action.h b/libdocument/ev-link-action.h index 32211fe2..19656796 100644 --- a/libdocument/ev-link-action.h +++ b/libdocument/ev-link-action.h @@ -18,6 +18,10 @@ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. */ +#if !defined (__EV_EVINCE_DOCUMENT_H_INSIDE__) && !defined (EVINCE_COMPILATION) +#error "Only can be included directly." +#endif + #ifndef EV_LINK_ACTION_H #define EV_LINK_ACTION_H @@ -37,8 +41,6 @@ typedef struct _EvLinkActionPrivate EvLinkActionPrivate; #define EV_IS_LINK_ACTION_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE((klass), EV_TYPE_LINK_ACTION)) #define EV_LINK_ACTION_GET_CLASS(object) (G_TYPE_INSTANCE_GET_CLASS((object), EV_TYPE_LINK_ACTION, EvLinkActionClass)) -#define EV_TYPE_LINK_ACTION_TYPE (ev_link_action_type_get_type ()) - typedef enum { EV_LINK_ACTION_TYPE_GOTO_DEST, EV_LINK_ACTION_TYPE_GOTO_REMOTE, @@ -49,7 +51,6 @@ typedef enum { * actions */ } EvLinkActionType; -GType ev_link_action_type_get_type (void) G_GNUC_CONST; GType ev_link_action_get_type (void) G_GNUC_CONST; EvLinkActionType ev_link_action_get_action_type (EvLinkAction *self); diff --git a/libdocument/ev-link-dest.c b/libdocument/ev-link-dest.c index b712f9b3..a1a6b262 100644 --- a/libdocument/ev-link-dest.c +++ b/libdocument/ev-link-dest.c @@ -19,7 +19,9 @@ */ #include + #include "ev-link-dest.h" +#include "ev-document-type-builtins.h" enum { PROP_0, @@ -69,31 +71,6 @@ G_DEFINE_TYPE (EvLinkDest, ev_link_dest, G_TYPE_OBJECT) #define EV_LINK_DEST_GET_PRIVATE(object) \ (G_TYPE_INSTANCE_GET_PRIVATE ((object), EV_TYPE_LINK_DEST, EvLinkDestPrivate)) -GType -ev_link_dest_type_get_type (void) -{ - static GType type = 0; - - if (G_UNLIKELY (type == 0)) { - static const GEnumValue values[] = { - { EV_LINK_DEST_TYPE_PAGE, "EV_LINK_DEST_TYPE_PAGE", "page" }, - { EV_LINK_DEST_TYPE_XYZ, "EV_LINK_DEST_TYPE_XYZ", "xyz" }, - { EV_LINK_DEST_TYPE_FIT, "EV_LINK_DEST_TYPE_FIT", "fit" }, - { EV_LINK_DEST_TYPE_FITH, "EV_LINK_DEST_TYPE_FITH", "fith" }, - { EV_LINK_DEST_TYPE_FITV, "EV_LINK_DEST_TYPE_FITV", "fitv" }, - { EV_LINK_DEST_TYPE_FITR, "EV_LINK_DEST_TYPE_FITR", "fitr" }, - { EV_LINK_DEST_TYPE_NAMED, "EV_LINK_DEST_TYPE_NAMED", "named" }, - { EV_LINK_DEST_TYPE_PAGE_LABEL, "EV_LINK_DEST_TYPE_PAGE_LABEL", "page_label" }, - { EV_LINK_DEST_TYPE_UNKNOWN, "EV_LINK_DEST_TYPE_UNKNOWN", "unknown" }, - { 0, NULL, NULL } - }; - - type = g_enum_register_static ("EvLinkDestType", values); - } - - return type; -} - EvLinkDestType ev_link_dest_get_dest_type (EvLinkDest *self) { diff --git a/libdocument/ev-link-dest.h b/libdocument/ev-link-dest.h index a7ee0595..7cfd7bba 100644 --- a/libdocument/ev-link-dest.h +++ b/libdocument/ev-link-dest.h @@ -18,6 +18,10 @@ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. */ +#if !defined (__EV_EVINCE_DOCUMENT_H_INSIDE__) && !defined (EVINCE_COMPILATION) +#error "Only can be included directly." +#endif + #ifndef EV_LINK_DEST_H #define EV_LINK_DEST_H @@ -36,8 +40,6 @@ typedef struct _EvLinkDestPrivate EvLinkDestPrivate; #define EV_IS_LINK_DEST_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE((klass), EV_TYPE_LINK_DEST)) #define EV_LINK_DEST_GET_CLASS(object) (G_TYPE_INSTANCE_GET_CLASS((object), EV_TYPE_LINK_DEST, EvLinkDestClass)) -#define EV_TYPE_LINK_DEST_TYPE (ev_link_dest_type_get_type ()) - typedef enum { EV_LINK_DEST_TYPE_PAGE, EV_LINK_DEST_TYPE_XYZ, @@ -50,7 +52,6 @@ typedef enum { EV_LINK_DEST_TYPE_UNKNOWN } EvLinkDestType; -GType ev_link_dest_type_get_type (void) G_GNUC_CONST; GType ev_link_dest_get_type (void) G_GNUC_CONST; EvLinkDestType ev_link_dest_get_dest_type (EvLinkDest *self); diff --git a/libdocument/ev-link.h b/libdocument/ev-link.h index 136047c7..cb3733a7 100644 --- a/libdocument/ev-link.h +++ b/libdocument/ev-link.h @@ -17,6 +17,10 @@ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. */ +#if !defined (__EV_EVINCE_DOCUMENT_H_INSIDE__) && !defined (EVINCE_COMPILATION) +#error "Only can be included directly." +#endif + #ifndef EV_LINK_H #define EV_LINK_H diff --git a/libdocument/ev-module.h b/libdocument/ev-module.h index 09d46fa2..d983c1cf 100644 --- a/libdocument/ev-module.h +++ b/libdocument/ev-module.h @@ -38,6 +38,10 @@ /* Modified by Evince Team */ +#if !defined (EVINCE_COMPILATION) +#error "This is a private header." +#endif + #ifndef EV_MODULE_H #define EV_MODULE_H diff --git a/libdocument/ev-page.h b/libdocument/ev-page.h index 801b3e19..e169a84a 100644 --- a/libdocument/ev-page.h +++ b/libdocument/ev-page.h @@ -17,6 +17,10 @@ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. */ +#if !defined (__EV_EVINCE_DOCUMENT_H_INSIDE__) && !defined (EVINCE_COMPILATION) +#error "Only can be included directly." +#endif + #ifndef EV_PAGE_H #define EV_PAGE_H diff --git a/libdocument/ev-render-context.h b/libdocument/ev-render-context.h index eb324e88..96664bb2 100644 --- a/libdocument/ev-render-context.h +++ b/libdocument/ev-render-context.h @@ -17,6 +17,10 @@ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. */ +#if !defined (__EV_EVINCE_DOCUMENT_H_INSIDE__) && !defined (EVINCE_COMPILATION) +#error "Only can be included directly." +#endif + #ifndef EV_RENDER_CONTEXT_H #define EV_RENDER_CONTEXT_H diff --git a/libdocument/ev-selection.h b/libdocument/ev-selection.h index 59f731c0..7a1252a1 100644 --- a/libdocument/ev-selection.h +++ b/libdocument/ev-selection.h @@ -18,6 +18,10 @@ * */ +#if !defined (__EV_EVINCE_DOCUMENT_H_INSIDE__) && !defined (EVINCE_COMPILATION) +#error "Only can be included directly." +#endif + #ifndef EV_SELECTION_H #define EV_SELECTION_H diff --git a/libdocument/ev-transition-effect.c b/libdocument/ev-transition-effect.c index 1986b774..a80fd6ac 100644 --- a/libdocument/ev-transition-effect.c +++ b/libdocument/ev-transition-effect.c @@ -18,8 +18,12 @@ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. */ +#include + #include "ev-transition-effect.h" +#include "ev-document-type-builtins.h" + #define EV_TRANSITION_EFFECT_GET_PRIV(obj) (G_TYPE_INSTANCE_GET_PRIVATE ((obj), EV_TYPE_TRANSITION_EFFECT, EvTransitionEffectPrivate)) typedef struct EvTransitionEffectPrivate EvTransitionEffectPrivate; @@ -49,71 +53,6 @@ enum { G_DEFINE_TYPE (EvTransitionEffect, ev_transition_effect, G_TYPE_OBJECT) - -GType -ev_transition_effect_type_get_type (void) -{ - static GType type = 0; - - if (G_UNLIKELY (type == 0)) { - static const GEnumValue values[] = { - { EV_TRANSITION_EFFECT_REPLACE, "EV_TRANSITION_EFFECT_REPLACE", "replace" }, - { EV_TRANSITION_EFFECT_SPLIT, "EV_TRANSITION_EFFECT_SPLIT", "split" }, - { EV_TRANSITION_EFFECT_BLINDS, "EV_TRANSITION_EFFECT_BLINDS", "blinds" }, - { EV_TRANSITION_EFFECT_BOX, "EV_TRANSITION_EFFECT_BOX", "box" }, - { EV_TRANSITION_EFFECT_WIPE, "EV_TRANSITION_EFFECT_WIPE", "wipe" }, - { EV_TRANSITION_EFFECT_DISSOLVE, "EV_TRANSITION_EFFECT_DISSOLVE", "dissolve" }, - { EV_TRANSITION_EFFECT_GLITTER, "EV_TRANSITION_EFFECT_GLITTER", "glitter" }, - { EV_TRANSITION_EFFECT_FLY, "EV_TRANSITION_EFFECT_FLY", "fly" }, - { EV_TRANSITION_EFFECT_PUSH, "EV_TRANSITION_EFFECT_PUSH", "push" }, - { EV_TRANSITION_EFFECT_COVER, "EV_TRANSITION_EFFECT_COVER", "cover" }, - { EV_TRANSITION_EFFECT_UNCOVER, "EV_TRANSITION_EFFECT_UNCOVER", "uncover" }, - { EV_TRANSITION_EFFECT_FADE, "EV_TRANSITION_EFFECT_FADE", "fade" }, - { 0, NULL, NULL } - }; - - type = g_enum_register_static ("EvTransitionEffectType", values); - } - - return type; -} - -GType -ev_transition_effect_alignment_get_type (void) -{ - static GType type = 0; - - if (G_UNLIKELY (type == 0)) { - static const GEnumValue values[] = { - { EV_TRANSITION_ALIGNMENT_HORIZONTAL, "EV_TRANSITION_ALIGNMENT_HORIZONTAL", "horizontal" }, - { EV_TRANSITION_ALIGNMENT_VERTICAL, "EV_TRANSITION_ALIGNMENT_VERTICAL", "vertical" }, - { 0, NULL, NULL } - }; - - type = g_enum_register_static ("EvTransitionEffectAlignment", values); - } - - return type; -} - -GType -ev_transition_effect_direction_get_type (void) -{ - static GType type = 0; - - if (G_UNLIKELY (type == 0)) { - static const GEnumValue values[] = { - { EV_TRANSITION_DIRECTION_INWARD, "EV_TRANSITION_DIRECTION_INWARD", "inward" }, - { EV_TRANSITION_DIRECTION_OUTWARD, "EV_TRANSITION_DIRECTION_OUTWARD", "outward" }, - { 0, NULL, NULL } - }; - - type = g_enum_register_static ("EvTransitionEffectDirection", values); - } - - return type; -} - static void ev_transition_effect_set_property (GObject *object, guint prop_id, diff --git a/libdocument/ev-transition-effect.h b/libdocument/ev-transition-effect.h index 0d778a9a..f1b868ff 100644 --- a/libdocument/ev-transition-effect.h +++ b/libdocument/ev-transition-effect.h @@ -18,6 +18,10 @@ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. */ +#if !defined (__EV_EVINCE_DOCUMENT_H_INSIDE__) && !defined (EVINCE_COMPILATION) +#error "Only can be included directly." +#endif + #ifndef __EV_TRANSITION_EFFECT_H__ #define __EV_TRANSITION_EFFECT_H__ @@ -26,9 +30,6 @@ G_BEGIN_DECLS #define EV_TYPE_TRANSITION_EFFECT (ev_transition_effect_get_type ()) -#define EV_TYPE_TRANSITION_EFFECT_TYPE (ev_transition_effect_type_get_type ()) -#define EV_TYPE_TRANSITION_EFFECT_ALIGNMENT (ev_transition_effect_alignment_get_type ()) -#define EV_TYPE_TRANSITION_EFFECT_DIRECTION (ev_transition_effect_direction_get_type ()) #define EV_TRANSITION_EFFECT(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), EV_TYPE_TRANSITION_EFFECT, EvTransitionEffect)) #define EV_TRANSITION_EFFECT_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), EV_TYPE_TRANSITION_EFFECT, EvTransitionEffectClass)) #define EV_IS_TRANSITION_EFFECT(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), EV_TYPE_TRANSITION_EFFECT)) @@ -76,9 +77,6 @@ struct EvTransitionEffectClass GType ev_transition_effect_get_type (void) G_GNUC_CONST; -GType ev_transition_effect_type_get_type (void) G_GNUC_CONST; -GType ev_transition_effect_alignment_get_type (void) G_GNUC_CONST; -GType ev_transition_effect_direction_get_type (void) G_GNUC_CONST; EvTransitionEffect *ev_transition_effect_new (EvTransitionEffectType type, const gchar *first_property_name, diff --git a/libview/Makefile.am b/libview/Makefile.am index eede6da7..49720c9e 100644 --- a/libview/Makefile.am +++ b/libview/Makefile.am @@ -1,20 +1,5 @@ -INCLUDES= \ - -DG_LOG_DOMAIN=\"EvView\" \ - -DGNOMELOCALEDIR=\"$(datadir)/locale\" \ - -I$(top_srcdir)/libdocument \ - $(LIBVIEW_CFLAGS) \ - $(WARN_CFLAGS) \ - $(DISABLE_DEPRECATED) - lib_LTLIBRARIES = libevview.la -libevview_la_LDFLAGS = \ - -version-info $(EV_VIEW_LT_VERSION_INFO) \ - -export-symbols-regex "^ev_*" \ - $(AM_LDFLAGS) - -libevview_la_LIBADD = $(LIBVIEW_LIBS) - NOINST_H_FILES = \ ev-pixbuf-cache.h \ ev-timeline.h \ @@ -30,7 +15,7 @@ INST_H_FILES = \ ev-view.h \ ev-view-type-builtins.h -headerdir = $(includedir)/evince/$(EV_API_VERSION)/ev-view +headerdir = $(includedir)/evince/$(EV_API_VERSION)/libview header_DATA = $(INST_H_FILES) libevview_la_SOURCES = \ @@ -47,6 +32,28 @@ libevview_la_SOURCES = \ $(NOINST_H_FILES) \ $(INST_H_FILES) +libevview_la_CPPFLAGS = \ + -DG_LOG_DOMAIN=\"EvView\" \ + -DGNOMELOCALEDIR=\"$(datadir)/locale\" \ + -DEVINCE_COMPILATION \ + -I$(top_srcdir) \ + -I$(top_srcdir)/libdocument \ + -I$(top_builddir) \ + $(AM_CPPFLAGS) + +libevview_la_CFLAGS = \ + $(LIBVIEW_CFLAGS) \ + $(WARN_CFLAGS) \ + $(DISABLE_DEPRECATED) \ + $(AM_CFLAGS) + +libevview_la_LDFLAGS = \ + -version-info $(EV_VIEW_LT_VERSION_INFO) \ + -export-symbols-regex "^ev_*" \ + $(AM_LDFLAGS) + +libevview_la_LIBADD = $(LIBVIEW_LIBS) + BUILT_SOURCES = \ ev-view-marshal.h \ ev-view-marshal.c \ @@ -65,13 +72,13 @@ ev-view-marshal.c: $(srcdir)/ev-view-marshal.list ev-view-type-builtins.h: stamp-ev-view-type-builtins.h @true -stamp-ev-view-type-builtins.h: ev-view-type-builtins.h.template ev-job-scheduler.h +stamp-ev-view-type-builtins.h: ev-view-type-builtins.h.template $(INST_H_FILES) $(GLIB_MKENUMS) --template $< $(filter-out $<,$^) > xgen-etbh \ && (cmp -s xgen-etbh ev-view-type-builtins.h || cp xgen-etbh ev-view-type-builtins.h ) \ && rm -f xgen-etbh \ && echo timestamp > $(@F) -ev-view-type-builtins.c: ev-view-type-builtins.c.template ev-job-scheduler.h +ev-view-type-builtins.c: ev-view-type-builtins.c.template $(INST_H_FILES) $(GLIB_MKENUMS) --template $< $(filter-out $<,$^) > xgen-etbc \ && (cmp -s xgen-etbc ev-view-type-builtins.c || cp xgen-etbc ev-view-type-builtins.c ) \ && rm -f xgen-etbc @@ -80,4 +87,3 @@ EXTRA_DIST = \ ev-view-type-builtins.c.template \ ev-view-type-builtins.h.template \ ev-view-marshal.list - diff --git a/libview/ev-job-scheduler.h b/libview/ev-job-scheduler.h index 66f9f80c..74a390af 100644 --- a/libview/ev-job-scheduler.h +++ b/libview/ev-job-scheduler.h @@ -18,6 +18,10 @@ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. */ +#if !defined (__EV_EVINCE_VIEW_H_INSIDE__) && !defined (EVINCE_COMPILATION) +#error "Only can be included directly." +#endif + #ifndef EV_JOB_SCHEDULER_H #define EV_JOB_SCHEDULER_H diff --git a/libview/ev-jobs.h b/libview/ev-jobs.h index 5915a28a..fc577c1e 100644 --- a/libview/ev-jobs.h +++ b/libview/ev-jobs.h @@ -18,15 +18,17 @@ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. */ +#if !defined (__EV_EVINCE_VIEW_H_INSIDE__) && !defined (EVINCE_COMPILATION) +#error "Only can be included directly." +#endif + #ifndef __EV_JOBS_H__ #define __EV_JOBS_H__ #include #include -#include "ev-document.h" -#include "ev-selection.h" -#include "ev-render-context.h" +#include G_BEGIN_DECLS diff --git a/libview/ev-page-cache.h b/libview/ev-page-cache.h index 43f45532..814ede7a 100644 --- a/libview/ev-page-cache.h +++ b/libview/ev-page-cache.h @@ -17,12 +17,16 @@ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. */ +#if !defined (__EV_EVINCE_VIEW_H_INSIDE__) && !defined (EVINCE_COMPILATION) +#error "Only can be included directly." +#endif + #ifndef __EV_PAGE_CACHE_H__ #define __EV_PAGE_CACHE_H__ #include -#include "ev-document.h" +#include G_BEGIN_DECLS #define EV_TYPE_PAGE_CACHE (ev_page_cache_get_type ()) diff --git a/libview/ev-pixbuf-cache.h b/libview/ev-pixbuf-cache.h index 5e48f284..a22634e6 100644 --- a/libview/ev-pixbuf-cache.h +++ b/libview/ev-pixbuf-cache.h @@ -21,13 +21,16 @@ * ev-view.c from exploding. */ +#if !defined (__EV_EVINCE_VIEW_H_INSIDE__) && !defined (EVINCE_COMPILATION) +#error "Only can be included directly." +#endif + #ifndef __EV_PIXBUF_CACHE_H__ #define __EV_PIXBUF_CACHE_H__ #include -#include "ev-document.h" -#include "ev-selection.h" +#include G_BEGIN_DECLS diff --git a/libview/ev-timeline.h b/libview/ev-timeline.h index 534e48ad..31c4f265 100644 --- a/libview/ev-timeline.h +++ b/libview/ev-timeline.h @@ -19,6 +19,10 @@ * Boston, MA 02111-1307, USA. */ +#if !defined (EVINCE_COMPILATION) +#error "This is a private header." +#endif + #ifndef __EV_TIMELINE_H__ #define __EV_TIMELINE_H__ diff --git a/libview/ev-transition-animation.h b/libview/ev-transition-animation.h index 522caf28..7cebfd31 100644 --- a/libview/ev-transition-animation.h +++ b/libview/ev-transition-animation.h @@ -19,9 +19,14 @@ * Boston, MA 02111-1307, USA. */ +#if !defined (EVINCE_COMPILATION) +#error "This is a private header." +#endif + #ifndef __EV_TRANSITION_ANIMATION_H__ #define __EV_TRANSITION_ANIMATION_H__ +#include #include "ev-timeline.h" #include "ev-transition-effect.h" diff --git a/libview/ev-view-accessible.h b/libview/ev-view-accessible.h index c29c471a..eee59ee2 100644 --- a/libview/ev-view-accessible.h +++ b/libview/ev-view-accessible.h @@ -18,6 +18,10 @@ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. */ +#if !defined (EVINCE_COMPILATION) +#error "This is a private header." +#endif + #ifndef __EV_VIEW_ACCESSIBLE_H__ #define __EV_VIEW_ACCESSIBLE_H__ diff --git a/libview/ev-view-private.h b/libview/ev-view-private.h index c8944403..542607d1 100644 --- a/libview/ev-view-private.h +++ b/libview/ev-view-private.h @@ -18,6 +18,10 @@ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. */ +#if !defined (EVINCE_COMPILATION) +#error "This is a private header." +#endif + #ifndef __EV_VIEW_PRIVATE_H__ #define __EV_VIEW_PRIVATE_H__ diff --git a/libview/ev-view-type-builtins.c.template b/libview/ev-view-type-builtins.c.template index 2365a44d..cbc22d69 100644 --- a/libview/ev-view-type-builtins.c.template +++ b/libview/ev-view-type-builtins.c.template @@ -1,4 +1,6 @@ /*** BEGIN file-header ***/ +#include + #include "ev-view-type-builtins.h" /*** END file-header ***/ diff --git a/libview/ev-view-type-builtins.h.template b/libview/ev-view-type-builtins.h.template index a6ac309a..c4ba4974 100644 --- a/libview/ev-view-type-builtins.h.template +++ b/libview/ev-view-type-builtins.h.template @@ -1,5 +1,9 @@ /*** BEGIN file-header ***/ +#if !defined (__EV_EVINCE_VIEW_H_INSIDE__) && !defined (EVINCE_COMPILATION) +#error "Only can be included directly." +#endif + #ifndef EV_VIEW_TYPE_BUILTINS_H #define EV_VIEW_TYPE_BUILTINS_H diff --git a/libview/ev-view.c b/libview/ev-view.c index 31915452..815571c9 100644 --- a/libview/ev-view.c +++ b/libview/ev-view.c @@ -40,6 +40,7 @@ #include "ev-view.h" #include "ev-view-accessible.h" #include "ev-view-private.h" +#include "ev-view-type-builtins.h" #define EV_VIEW_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), EV_TYPE_VIEW, EvViewClass)) #define EV_IS_VIEW_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), EV_TYPE_VIEW)) @@ -5831,22 +5832,6 @@ ev_view_previous_page (EvView *view) /*** Enum description for usage in signal ***/ -GType -ev_sizing_mode_get_type (void) -{ - static GType etype = 0; - if (etype == 0) { - static const GEnumValue values[] = { - { EV_SIZING_FIT_WIDTH, "EV_SIZING_FIT_WIDTH", "fit-width" }, - { EV_SIZING_BEST_FIT, "EV_SIZING_BEST_FIT", "best-fit" }, - { EV_SIZING_FREE, "EV_SIZING_FREE", "free" }, - { 0, NULL, NULL } - }; - etype = g_enum_register_static ("EvSizingMode", values); - } - return etype; -} - void ev_view_update_view_size (EvView *view, GtkScrolledWindow * scrolled_window) { diff --git a/libview/ev-view.h b/libview/ev-view.h index af12bafe..0c9db0a2 100644 --- a/libview/ev-view.h +++ b/libview/ev-view.h @@ -17,13 +17,16 @@ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. */ +#if !defined (__EV_EVINCE_VIEW_H_INSIDE__) && !defined (EVINCE_COMPILATION) +#error "Only can be included directly." +#endif + #ifndef __EV_VIEW_H__ #define __EV_VIEW_H__ #include -#include "ev-document.h" -#include "ev-link.h" +#include G_BEGIN_DECLS @@ -31,9 +34,6 @@ G_BEGIN_DECLS #define EV_VIEW(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), EV_TYPE_VIEW, EvView)) #define EV_IS_VIEW(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), EV_TYPE_VIEW)) -#define EV_TYPE_SIZING_MODE (ev_sizing_mode_get_type()) -#define EV_SIZING_MODE_CLASS (g_type_class_peek (EV_TYPE_SIZING_MODE)) - typedef struct _EvView EvView; typedef struct _EvViewClass EvViewClass; @@ -50,7 +50,6 @@ typedef enum { } EvViewSelectionMode; GType ev_view_get_type (void) G_GNUC_CONST; -GType ev_sizing_mode_get_type (void) G_GNUC_CONST; GtkWidget* ev_view_new (void); void ev_view_set_document (EvView *view, diff --git a/properties/Makefile.am b/properties/Makefile.am index 960a0a1a..33d831ef 100644 --- a/properties/Makefile.am +++ b/properties/Makefile.am @@ -1,7 +1,8 @@ INCLUDES= \ -DDATADIR=\"$(pkgdatadir)\" \ -DGNOMELOCALEDIR=\"$(datadir)/locale\" \ - -I$(top_srcdir)/libdocument \ + -I$(top_srcdir) \ + -I$(top_builddir) \ $(FRONTEND_CFLAGS) \ $(NAUTILUS_CFLAGS) \ $(DISABLE_DEPRECATED) \ @@ -28,7 +29,7 @@ libevince_properties_page_la_SOURCES = \ libevince_properties_page_la_LIBADD = \ libevproperties.la \ - $(top_builddir)/libdocument/libevbackend.la \ + $(top_builddir)/libdocument/libevdocument.la \ $(FRONTEND_LIBS) \ $(NAUTILUS_LIBS) diff --git a/properties/ev-properties-main.c b/properties/ev-properties-main.c index d7f88e2d..a3c045b4 100644 --- a/properties/ev-properties-main.c +++ b/properties/ev-properties-main.c @@ -37,9 +37,8 @@ #include #include +#include #include "ev-properties-view.h" -#include "ev-backends-manager.h" -#include "ev-document-factory.h" static GType epp_type = 0; static void property_page_provider_iface_init diff --git a/properties/ev-properties-view.h b/properties/ev-properties-view.h index ec4dac7b..65a237b6 100644 --- a/properties/ev-properties-view.h +++ b/properties/ev-properties-view.h @@ -23,7 +23,7 @@ #include -#include "ev-document-info.h" +#include G_BEGIN_DECLS diff --git a/shell/Makefile.am b/shell/Makefile.am index ab09ef9b..4230dbb8 100644 --- a/shell/Makefile.am +++ b/shell/Makefile.am @@ -1,6 +1,8 @@ INCLUDES= \ -DDATADIR=\"$(pkgdatadir)\" \ -DGNOMEDATADIR=\"$(datadir)\" \ + -I$(top_srcdir) \ + -I$(top_builddir) \ -I$(top_srcdir)/cut-n-paste/zoom-control/ \ -I$(top_srcdir)/cut-n-paste/toolbar-editor/ \ -I$(top_srcdir)/cut-n-paste/totem-screensaver/ \ @@ -9,10 +11,13 @@ INCLUDES= \ -I$(top_srcdir)/cut-n-paste/evmountoperation/ \ -I$(top_srcdir)/cut-n-paste/smclient/ \ -I$(top_srcdir)/libdocument \ + -I$(top_builddir)/libdocument \ -I$(top_srcdir)/libview \ + -I$(top_builddir)/libview \ -I$(top_srcdir)/properties \ -DGNOMELOCALEDIR=\"$(datadir)/locale\" \ -DGNOMEICONDIR=\""$(datadir)/pixmaps"\" \ + -DEVINCE_COMPILATION \ $(SHELL_CFLAGS) \ $(WARN_CFLAGS) \ $(DISABLE_DEPRECATED) @@ -95,7 +100,7 @@ evince_LDADD= \ $(top_builddir)/cut-n-paste/evmountoperation/libevmountoperation.la \ $(top_builddir)/cut-n-paste/smclient/libsmclient.la \ $(top_builddir)/properties/libevproperties.la \ - $(top_builddir)/libdocument/libevbackend.la \ + $(top_builddir)/libdocument/libevdocument.la \ $(top_builddir)/libview/libevview.la \ $(SHELL_LIBS) diff --git a/shell/ev-window.c b/shell/ev-window.c index 6d501daa..523a8c6a 100644 --- a/shell/ev-window.c +++ b/shell/ev-window.c @@ -61,6 +61,7 @@ #include "ev-document-images.h" #include "ev-document-links.h" #include "ev-document-thumbnails.h" +#include "ev-document-type-builtins.h" #include "ev-file-exporter.h" #include "ev-file-helpers.h" #include "ev-file-monitor.h" @@ -86,6 +87,7 @@ #include "ev-utils.h" #include "ev-keyring.h" #include "ev-view.h" +#include "ev-view-type-builtins.h" #include "ev-window.h" #include "ev-window-title.h" #include "ev-print-operation.h" @@ -1073,7 +1075,7 @@ setup_view_from_metadata (EvWindow *window) /* Sizing mode */ if (ev_metadata_manager_get (uri, "sizing_mode", &sizing_mode, FALSE)) { enum_value = g_enum_get_value_by_nick - (EV_SIZING_MODE_CLASS, g_value_get_string (&sizing_mode)); + (g_type_class_peek (EV_TYPE_SIZING_MODE), g_value_get_string (&sizing_mode)); g_value_unset (&sizing_mode); ev_view_set_sizing_mode (view, enum_value->value); } @@ -4082,7 +4084,7 @@ save_sizing_mode (EvWindow *window) GEnumValue *enum_value; mode = ev_view_get_sizing_mode (EV_VIEW (window->priv->view)); - enum_value = g_enum_get_value (EV_SIZING_MODE_CLASS, mode); + enum_value = g_enum_get_value (g_type_class_peek (EV_TYPE_SIZING_MODE), mode); if (!ev_window_is_empty (window)) ev_metadata_manager_set_string (window->priv->uri, "sizing_mode", diff --git a/thumbnailer/Makefile.am b/thumbnailer/Makefile.am index 19c2bee0..c7b3c85c 100644 --- a/thumbnailer/Makefile.am +++ b/thumbnailer/Makefile.am @@ -1,21 +1,26 @@ @INTLTOOL_SCHEMAS_RULE@ -INCLUDES= \ +bin_PROGRAMS = evince-thumbnailer + +evince_thumbnailer_SOURCES = \ + evince-thumbnailer.c + +evince_thumbnailer_CPPFLAGS = \ -DDATADIR=\"$(pkgdatadir)\" \ - -I$(top_srcdir)/libdocument \ + -I$(top_srcdir) \ + -I$(top_builddir) \ -DGNOMELOCALEDIR=\"$(datadir)/locale\" \ -DGNOMEICONDIR=\""$(datadir)/pixmaps"\" \ - $(FRONTEND_CFLAGS) \ - $(DISABLE_DEPRECATED) \ - $(WARN_CFLAGS) + $(AM_CPPFLAGS) -bin_PROGRAMS=evince-thumbnailer - -evince_thumbnailer_SOURCES= \ - evince-thumbnailer.c +evince_thumbnailer_CFLAGS = \ + $(FRONTEND_CFLAGS) \ + $(DISABLE_DEPRECATED) \ + $(WARN_CFLAGS) \ + $(AM_CFLAGS) -evince_thumbnailer_LDADD= \ - $(top_builddir)/libdocument/libevbackend.la \ +evince_thumbnailer_LDADD = \ + $(top_builddir)/libdocument/libevdocument.la \ $(FRONTEND_LIBS) schema_files = \ diff --git a/thumbnailer/evince-thumbnailer.c b/thumbnailer/evince-thumbnailer.c index b3c8285e..ec72f16e 100644 --- a/thumbnailer/evince-thumbnailer.c +++ b/thumbnailer/evince-thumbnailer.c @@ -18,11 +18,7 @@ #include -#include -#include -#include -#include -#include +#include #include