struct _EvDocumentPrivate
{
+ gchar *uri;
+
gint n_pages;
gboolean uniform;
{
EvDocument *document = EV_DOCUMENT (object);
+ if (document->priv->uri) {
+ g_free (document->priv->uri);
+ document->priv->uri = NULL;
+ }
+
if (document->priv->page_sizes) {
g_free (document->priv->page_sizes);
document->priv->page_sizes = NULL;
/* Cache some info about the document to avoid
* going to the backends since it requires locks
*/
+ priv->uri = g_strdup (uri);
priv->n_pages = _ev_document_get_n_pages (document);
priv->info = _ev_document_get_info (document);
return klass->render (document, rc);
}
+const gchar *
+ev_document_get_uri (EvDocument *document)
+{
+ g_return_val_if_fail (EV_IS_DOCUMENT (document), NULL);
+
+ return document->priv->uri;
+}
+
const gchar *
ev_document_get_title (EvDocument *document)
{
gint page_index);
cairo_surface_t *ev_document_render (EvDocument *document,
EvRenderContext *rc);
+const gchar *ev_document_get_uri (EvDocument *document);
const gchar *ev_document_get_title (EvDocument *document);
gboolean ev_document_is_page_size_uniform (EvDocument *document);
void ev_document_get_max_page_size (EvDocument *document,