diff options
Diffstat (limited to 'backend/pdf')
-rw-r--r-- | backend/pdf/Makefile.am | 23 | ||||
-rw-r--r-- | backend/pdf/ev-poppler.cc | 12 | ||||
-rw-r--r-- | backend/pdf/ev-poppler.h | 5 | ||||
-rw-r--r-- | backend/pdf/pdfdocument.evince-backend.in | 5 |
4 files changed, 32 insertions, 13 deletions
diff --git a/backend/pdf/Makefile.am b/backend/pdf/Makefile.am index 38d0831..4d2e549 100644 --- a/backend/pdf/Makefile.am +++ b/backend/pdf/Makefile.am @@ -1,13 +1,34 @@ +backenddir = $(libdir)/evince/backends + INCLUDES = \ -I$(top_srcdir) \ -I$(top_srcdir)/libdocument \ + -DGNOMELOCALEDIR=\"$(datadir)/locale\" \ $(BACKEND_CFLAGS) \ $(POPPLER_CFLAGS) \ $(WARN_CXXFLAGS) \ $(DISABLE_DEPRECATED) -noinst_LTLIBRARIES = libpdfdocument.la +backend_LTLIBRARIES = libpdfdocument.la libpdfdocument_la_SOURCES = \ ev-poppler.cc \ ev-poppler.h + +libpdfdocument_la_LDFLAGS = $(BACKEND_LIBTOOL_FLAGS) +libpdfdocument_la_LIBADD = \ + $(top_builddir)/libdocument/libevbackend.la \ + $(BACKEND_LIBS) \ + $(POPPLER_LIBS) \ + $(CAIRO_PDF_LIBS) \ + $(CAIRO_PS_LIBS) + +backend_in_files = pdfdocument.evince-backend.in + +%.evince-backend: %.evince-backend.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*po) ; $(INTLTOOL_MERGE) $(top_srcdir)/po $< $@ -d -u -c $(top_builddir)/po/.intltool-merge-cache + +backend_DATA = $(backend_in_files:.evince-backend.in=.evince-backend) + +EXTRA_DIST = $(backend_DATA) + +CLEANFILES = $(backend_DATA)
\ No newline at end of file diff --git a/backend/pdf/ev-poppler.cc b/backend/pdf/ev-poppler.cc index 690c908..5b03980 100644 --- a/backend/pdf/ev-poppler.cc +++ b/backend/pdf/ev-poppler.cc @@ -123,10 +123,8 @@ static EvLink *ev_link_from_action (PdfDocument *pdf_document, static void pdf_document_search_free (PdfDocumentSearch *search); static void pdf_print_context_free (PdfPrintContext *ctx); -G_DEFINE_TYPE_WITH_CODE (PdfDocument, pdf_document, G_TYPE_OBJECT, - { - G_IMPLEMENT_INTERFACE (EV_TYPE_DOCUMENT, - pdf_document_document_iface_init); +EV_BACKEND_REGISTER_WITH_CODE (PdfDocument, pdf_document, + { G_IMPLEMENT_INTERFACE (EV_TYPE_DOCUMENT_SECURITY, pdf_document_security_iface_init); G_IMPLEMENT_INTERFACE (EV_TYPE_DOCUMENT_THUMBNAILS, @@ -1975,12 +1973,6 @@ pdf_document_page_transition_iface_init (EvDocumentTransitionIface *iface) iface->get_page_duration = pdf_document_get_page_duration; } -PdfDocument * -pdf_document_new (void) -{ - return PDF_DOCUMENT (g_object_new (PDF_TYPE_DOCUMENT, NULL)); -} - /* Forms */ static void pdf_document_get_crop_box (EvDocument *document, diff --git a/backend/pdf/ev-poppler.h b/backend/pdf/ev-poppler.h index 8cc65d1..8f9dcb6 100644 --- a/backend/pdf/ev-poppler.h +++ b/backend/pdf/ev-poppler.h @@ -30,8 +30,9 @@ G_BEGIN_DECLS typedef struct _PdfDocument PdfDocument; typedef struct _PdfDocumentClass PdfDocumentClass; -PdfDocument *pdf_document_new (void); -GType pdf_document_get_type (void) G_GNUC_CONST; +GType pdf_document_get_type (void) G_GNUC_CONST; + +G_MODULE_EXPORT GType register_evince_backend (GTypeModule *module); G_END_DECLS diff --git a/backend/pdf/pdfdocument.evince-backend.in b/backend/pdf/pdfdocument.evince-backend.in new file mode 100644 index 0000000..476afe3 --- /dev/null +++ b/backend/pdf/pdfdocument.evince-backend.in @@ -0,0 +1,5 @@ +[Evince Backend] +Module=pdfdocument +_TypeDescription=PDF Documents +MimeType=application/pdf;application/x-bzpdf;application/x-gzpdf + |