diff options
Diffstat (limited to 'backend/tiff')
-rw-r--r-- | backend/tiff/Makefile.am | 30 | ||||
-rw-r--r-- | backend/tiff/tiff-document.c | 9 | ||||
-rw-r--r-- | backend/tiff/tiff-document.h | 4 | ||||
-rw-r--r-- | backend/tiff/tiffdocument.evince-backend.in | 4 |
4 files changed, 37 insertions, 10 deletions
diff --git a/backend/tiff/Makefile.am b/backend/tiff/Makefile.am index f89e9d9..aa7ce72 100644 --- a/backend/tiff/Makefile.am +++ b/backend/tiff/Makefile.am @@ -1,12 +1,32 @@ -INCLUDES = \ - -I$(top_srcdir) \ - -I$(top_srcdir)/libdocument \ - $(BACKEND_CFLAGS) +backenddir = $(libdir)/evince/backends -noinst_LTLIBRARIES = libtiffdocument.la +INCLUDES = \ + -I$(top_srcdir) \ + -I$(top_srcdir)/libdocument \ + -DGNOMELOCALEDIR=\"$(datadir)/locale\" \ + $(BACKEND_CFLAGS) \ + $(WARN_CFLAGS) \ + $(DISABLE_DEPRECATED) + +backend_LTLIBRARIES = libtiffdocument.la libtiffdocument_la_SOURCES = \ tiff-document.c \ tiff-document.h \ tiff2ps.c \ tiff2ps.h + +libtiffdocument_la_LDFLAGS = $(BACKEND_LIBTOOL_FLAGS) +libtiffdocument_la_LIBADD = \ + $(top_builddir)/libdocument/libevbackend.la \ + -ltiff + +backend_in_files = tiffdocument.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) diff --git a/backend/tiff/tiff-document.c b/backend/tiff/tiff-document.c index 34275c1..d1473a1 100644 --- a/backend/tiff/tiff-document.c +++ b/backend/tiff/tiff-document.c @@ -20,8 +20,11 @@ /* FIXME: Should probably buffer calls to libtiff with TIFFSetWarningHandler */ +#include "config.h" + #include <stdio.h> #include <glib.h> +#include <glib/gi18n.h> #include "tiffio.h" #include "tiff2ps.h" @@ -29,6 +32,7 @@ #include "ev-document-misc.h" #include "ev-document-thumbnails.h" #include "ev-file-exporter.h" +#include "ev-file-helpers.h" struct _TiffDocumentClass { @@ -52,9 +56,8 @@ static void tiff_document_document_iface_init (EvDocumentIface *iface); static void tiff_document_document_thumbnails_iface_init (EvDocumentThumbnailsIface *iface); static void tiff_document_document_file_exporter_iface_init (EvFileExporterIface *iface); -G_DEFINE_TYPE_WITH_CODE (TiffDocument, tiff_document, G_TYPE_OBJECT, - { G_IMPLEMENT_INTERFACE (EV_TYPE_DOCUMENT, - tiff_document_document_iface_init); +EV_BACKEND_REGISTER_WITH_CODE (TiffDocument, tiff_document, + { G_IMPLEMENT_INTERFACE (EV_TYPE_DOCUMENT_THUMBNAILS, tiff_document_document_thumbnails_iface_init); G_IMPLEMENT_INTERFACE (EV_TYPE_FILE_EXPORTER, diff --git a/backend/tiff/tiff-document.h b/backend/tiff/tiff-document.h index bdf0e29..4170cca 100644 --- a/backend/tiff/tiff-document.h +++ b/backend/tiff/tiff-document.h @@ -30,8 +30,8 @@ G_BEGIN_DECLS typedef struct _TiffDocument TiffDocument; -TiffDocument *tiff_document_new (void); -GType tiff_document_get_type (void) G_GNUC_CONST; +GType tiff_document_get_type (void) G_GNUC_CONST; +G_MODULE_EXPORT GType register_evince_backend (GTypeModule *module); G_END_DECLS diff --git a/backend/tiff/tiffdocument.evince-backend.in b/backend/tiff/tiffdocument.evince-backend.in new file mode 100644 index 0000000..daaa7fd --- /dev/null +++ b/backend/tiff/tiffdocument.evince-backend.in @@ -0,0 +1,4 @@ +[Evince Backend] +Module=tiffdocument +_TypeDescription=Tiff Documents +MimeType=image/tiff |