Top | ![]() |
![]() |
![]() |
![]() |
struct | EvDocument |
struct | EvDocumentClass |
#define | EV_DOC_MUTEX_LOCK |
#define | EV_DOC_MUTEX_UNLOCK |
enum | EvDocumentError |
struct | EvPoint |
struct | EvSourceLink |
struct | EvRectangle |
struct | EvDocumentBackendInfo |
enum | EvDocumentLoadFlags |
GBoxed ├── EvRectangle ╰── EvSourceLink GEnum ╰── EvDocumentError GFlags ╰── EvDocumentLoadFlags GObject ╰── EvDocument
EvDocumentInfo *
ev_document_get_info (EvDocument *document
);
Returns the EvDocumentInfo for the document.
gboolean ev_document_get_backend_info (EvDocument *document
,EvDocumentBackendInfo *info
);
gboolean ev_document_load (EvDocument *document
,const char *uri
,GError **error
);
Loads document
from uri
.
On failure, FALSE
is returned and error
is filled in.
If the document is encrypted, EV_DEFINE_ERROR_ENCRYPTED is returned.
If the backend cannot load the specific document, EV_DOCUMENT_ERROR_INVALID
is returned. If the backend does not support the format for the document's
contents, EV_DOCUMENT_ERROR_UNSUPPORTED_CONTENT is returned. Other errors
are possible too, depending on the backend used to load the document and
the URI, e.g. GIOError, GFileError, and GConvertError.
gboolean ev_document_load_stream (EvDocument *document
,GInputStream *stream
,EvDocumentLoadFlags flags
,GCancellable *cancellable
,GError **error
);
Synchronously loads the document from stream
.
See ev_document_load()
for more information.
document |
||
stream |
a GInputStream |
|
flags |
flags from EvDocumentLoadFlags |
|
cancellable |
a GCancellable, or |
[allow-none] |
error |
a GError location to store an error, or |
[allow-none] |
Since: 3.6
gboolean ev_document_load_gfile (EvDocument *document
,GFile *file
,EvDocumentLoadFlags flags
,GCancellable *cancellable
,GError **error
);
Synchronously loads the document from file
.
See ev_document_load()
for more information.
document |
||
file |
a GFile |
|
flags |
flags from EvDocumentLoadFlags |
|
cancellable |
a GCancellable, or |
[allow-none] |
error |
a GError location to store an error, or |
[allow-none] |
Since: 3.6
gboolean ev_document_save (EvDocument *document
,const char *uri
,GError **error
);
Saves document
to uri
.
void ev_document_get_page_size (EvDocument *document
,gint page_index
,double *width
,double *height
);
gchar * ev_document_get_page_label (EvDocument *document
,gint page_index
);
void ev_document_get_min_page_size (EvDocument *document
,gdouble *width
,gdouble *height
);
cairo_surface_t * ev_document_render (EvDocument *document
,EvRenderContext *rc
);
gboolean
ev_document_is_page_size_uniform (EvDocument *document
);
void ev_document_get_max_page_size (EvDocument *document
,gdouble *width
,gdouble *height
);
gboolean
ev_document_has_text_page_labels (EvDocument *document
);
gboolean ev_document_find_page_by_label (EvDocument *document
,const gchar *page_label
,gint *page_index
);
GdkPixbuf * ev_document_get_thumbnail (EvDocument *document
,EvRenderContext *rc
);
cairo_surface_t * ev_document_get_thumbnail_surface (EvDocument *document
,EvRenderContext *rc
);
Since: 3.14
EvSourceLink * ev_document_synctex_backward_search (EvDocument *document
,gint page_index
,gfloat x
,gfloat y
);
Peforms a Synctex backward search to obtain the TeX input file, line and
(possibly) column corresponding to the position (x
,y
) (in 72dpi
coordinates) in the page
of document
.
EvMapping * ev_document_synctex_forward_search (EvDocument *document
,EvSourceLink *source_link
);
Peforms a Synctex forward search to obtain the area in the document
corresponding to the position (line and column in source_link
) in
the source Tex file.
EvSourceLink * ev_source_link_new (const gchar *filename
,gint line
,gint col
);
#define EV_BACKEND_REGISTER_WITH_CODE(BackendName, backend_name, CODE)
struct EvDocumentClass { GObjectClass base_class; /* Virtual Methods */ gboolean (* load) (EvDocument *document, const char *uri, GError **error); gboolean (* save) (EvDocument *document, const char *uri, GError **error); gint (* get_n_pages) (EvDocument *document); EvPage * (* get_page) (EvDocument *document, gint index); void (* get_page_size) (EvDocument *document, EvPage *page, double *width, double *height); gchar * (* get_page_label) (EvDocument *document, EvPage *page); cairo_surface_t * (* render) (EvDocument *document, EvRenderContext *rc); GdkPixbuf * (* get_thumbnail) (EvDocument *document, EvRenderContext *rc); EvDocumentInfo * (* get_info) (EvDocument *document); gboolean (* get_backend_info) (EvDocument *document, EvDocumentBackendInfo *info); gboolean (* support_synctex) (EvDocument *document); /* GIO streams */ gboolean (* load_stream) (EvDocument *document, GInputStream *stream, EvDocumentLoadFlags flags, GCancellable *cancellable, GError **error); gboolean (* load_gfile) (EvDocument *document, GFile *file, EvDocumentLoadFlags flags, GCancellable *cancellable, GError **error); cairo_surface_t * (* get_thumbnail_surface) (EvDocument *document, EvRenderContext *rc); };
struct EvDocumentBackendInfo { const gchar *name; const gchar *version; };