zathura/ft/pdf-mupdf/pdf.h

34 lines
863 B
C
Raw Normal View History

2010-11-18 02:35:33 +01:00
/* See LICENSE file for license and copyright information */
2010-11-18 03:15:32 +01:00
#ifndef PDF_H
#define PDF_H
2010-11-18 02:35:33 +01:00
#include <stdbool.h>
2011-02-26 04:15:50 +01:00
#include <fitz.h>
#include <mupdf.h>
2010-11-18 02:35:33 +01:00
#include "../../document.h"
2010-11-18 02:35:33 +01:00
2010-11-18 13:54:35 +01:00
typedef struct pdf_document_s
{
2011-02-26 04:15:50 +01:00
fz_glyphcache *glyphcache;
pdf_xref *document;
2010-11-18 13:54:35 +01:00
} pdf_document_t;
2011-02-26 04:15:50 +01:00
typedef struct mupdf_page_s
{
fz_obj* page_object;
pdf_page* page;
} mupdf_page_t;
2010-11-18 02:35:33 +01:00
bool pdf_document_open(zathura_document_t* document);
2010-11-18 03:15:32 +01:00
bool pdf_document_free(zathura_document_t* document);
zathura_page_t* pdf_page_get(zathura_document_t* document, unsigned int page);
zathura_list_t* pdf_page_search_text(zathura_page_t* page, const char* text);
zathura_list_t* pdf_page_links_get(zathura_page_t* page);
zathura_list_t* pdf_page_form_fields_get(zathura_page_t* page);
GtkWidget* pdf_page_render(zathura_page_t* page);
2010-11-18 03:15:32 +01:00
bool pdf_page_free(zathura_page_t* page);
#endif // PDF_H