Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/backend/pixbuf
diff options
context:
space:
mode:
Diffstat (limited to 'backend/pixbuf')
-rw-r--r--backend/pixbuf/Makefile.am30
-rw-r--r--backend/pixbuf/pixbuf-document.c9
-rw-r--r--backend/pixbuf/pixbuf-document.h4
-rw-r--r--backend/pixbuf/pixbufdocument.evince-backend.in4
4 files changed, 36 insertions, 11 deletions
diff --git a/backend/pixbuf/Makefile.am b/backend/pixbuf/Makefile.am
index b81e1c8..acc23a5 100644
--- a/backend/pixbuf/Makefile.am
+++ b/backend/pixbuf/Makefile.am
@@ -1,10 +1,30 @@
-INCLUDES = \
- -I$(top_srcdir) \
- -I$(top_srcdir)/libdocument \
- $(BACKEND_CFLAGS)
+backenddir = $(libdir)/evince/backends
-noinst_LTLIBRARIES = libpixbufdocument.la
+INCLUDES = \
+ -I$(top_srcdir) \
+ -I$(top_srcdir)/libdocument \
+ -DGNOMELOCALEDIR=\"$(datadir)/locale\" \
+ $(BACKEND_CFLAGS) \
+ $(WARN_CFLAGS) \
+ $(DISABLE_DEPRECATED)
+
+backend_LTLIBRARIES = libpixbufdocument.la
libpixbufdocument_la_SOURCES = \
pixbuf-document.c \
pixbuf-document.h
+
+libpixbufdocument_la_LDFLAGS = $(BACKEND_LIBTOOL_FLAGS)
+libpixbufdocument_la_LIBADD = \
+ $(top_builddir)/libdocument/libevbackend.la \
+ $(BACKEND_LIBS)
+
+backend_in_files = pixbufdocument.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/pixbuf/pixbuf-document.c b/backend/pixbuf/pixbuf-document.c
index 5f61587..c5810d1 100644
--- a/backend/pixbuf/pixbuf-document.c
+++ b/backend/pixbuf/pixbuf-document.c
@@ -17,6 +17,8 @@
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
+#include "config.h"
+
#include "pixbuf-document.h"
#include "ev-document-thumbnails.h"
#include "ev-document-misc.h"
@@ -40,12 +42,11 @@ typedef struct _PixbufDocumentClass PixbufDocumentClass;
static void pixbuf_document_document_iface_init (EvDocumentIface *iface);
static void pixbuf_document_document_thumbnails_iface_init (EvDocumentThumbnailsIface *iface);
-G_DEFINE_TYPE_WITH_CODE (PixbufDocument, pixbuf_document, G_TYPE_OBJECT,
- { G_IMPLEMENT_INTERFACE (EV_TYPE_DOCUMENT,
- pixbuf_document_document_iface_init);
+EV_BACKEND_REGISTER_WITH_CODE (PixbufDocument, pixbuf_document,
+ {
G_IMPLEMENT_INTERFACE (EV_TYPE_DOCUMENT_THUMBNAILS,
pixbuf_document_document_thumbnails_iface_init)
- });
+ });
static gboolean
pixbuf_document_load (EvDocument *document,
diff --git a/backend/pixbuf/pixbuf-document.h b/backend/pixbuf/pixbuf-document.h
index bddf94a..d8a4d43 100644
--- a/backend/pixbuf/pixbuf-document.h
+++ b/backend/pixbuf/pixbuf-document.h
@@ -29,9 +29,9 @@ G_BEGIN_DECLS
typedef struct _PixbufDocument PixbufDocument;
-PixbufDocument *pixbuf_document_new (void);
+GType pixbuf_document_get_type (void) G_GNUC_CONST;
-GType pixbuf_document_get_type (void) G_GNUC_CONST;
+G_MODULE_EXPORT GType register_evince_backend (GTypeModule *module);
G_END_DECLS
diff --git a/backend/pixbuf/pixbufdocument.evince-backend.in b/backend/pixbuf/pixbufdocument.evince-backend.in
new file mode 100644
index 0000000..9beb526
--- /dev/null
+++ b/backend/pixbuf/pixbufdocument.evince-backend.in
@@ -0,0 +1,4 @@
+[Evince Backend]
+Module=pixbufdocument
+_TypeDescription=Images
+MimeType=image/*;