summaryrefslogtreecommitdiff
path: root/platform/x11
diff options
context:
space:
mode:
authorRobin Watts <robin.watts@artifex.com>2014-01-03 16:50:41 +0000
committerRobin Watts <robin.watts@artifex.com>2014-01-07 10:25:42 +0000
commit7f009acebb75ff88c1ee934b03fa2d15f7785b32 (patch)
tree7be547523d730d104c62e4b5d43685dd8bb5bd40 /platform/x11
parent016adfa063293281a0896c62bf22e406b09ddf21 (diff)
downloadmupdf-7f009acebb75ff88c1ee934b03fa2d15f7785b32.tar.xz
Introduce 'document handlers'.
We define a document handler for each file type (2 in the case of PDF, one to handle files with the ability to 'run' them, and one without). We then register these handlers with the context at startup, and then call fz_open_document... as usual. This enables people to select the document types they want at will (and even to extend the library with more document types should they wish).
Diffstat (limited to 'platform/x11')
-rw-r--r--platform/x11/pdfapp.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/platform/x11/pdfapp.c b/platform/x11/pdfapp.c
index 10a44573..e9349526 100644
--- a/platform/x11/pdfapp.c
+++ b/platform/x11/pdfapp.c
@@ -192,6 +192,8 @@ void pdfapp_open_progressive(pdfapp_t *app, char *filename, int reload, int bps)
{
pdf_document *idoc;
+ fz_register_document_handlers(ctx);
+
#ifdef HAVE_CURL
if (!strncmp(filename, "http://", 7))
{