Evince
Evince is a document viewer capable of displaying multiple and single page document formats like PDF and Postscript.
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
djvu-links.h File Reference
#include "ev-document-links.h"
#include "djvu-document.h"
#include <glib.h>
+ Include dependency graph for djvu-links.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

GtkTreeModel * djvu_links_get_links_model (EvDocumentLinks *document_links)
 
EvMappingListdjvu_links_get_links (EvDocumentLinks *document_links, gint page, double scale_factor)
 
EvLinkDestdjvu_links_find_link_dest (EvDocumentLinks *document_links, const gchar *link_name)
 
gint djvu_links_find_link_page (EvDocumentLinks *document_links, const gchar *link_name)
 
gboolean djvu_links_has_document_links (EvDocumentLinks *document_links)
 

Function Documentation

EvLinkDest* djvu_links_find_link_dest ( EvDocumentLinks document_links,
const gchar *  link_name 
)

Definition at line 424 of file djvu-links.c.

426 {
427  DjvuDocument *djvu_document = DJVU_DOCUMENT (document_links);
428  EvLinkDest *ev_dest = NULL;
429 
430  ev_dest = get_djvu_link_dest (djvu_document, link_name, -1);
431 
432  if (!ev_dest) {
433  g_warning ("DjvuLibre error: unknown link destination %s", link_name);
434  }
435 
436  return ev_dest;
437 }

+ Here is the caller graph for this function:

gint djvu_links_find_link_page ( EvDocumentLinks document_links,
const gchar *  link_name 
)

Definition at line 440 of file djvu-links.c.

442 {
443  DjvuDocument *djvu_document = DJVU_DOCUMENT (document_links);
444  gint page;
445 
446  page = get_djvu_link_page (djvu_document, link_name, -1);
447 
448  if (page == -1) {
449  g_warning ("DjvuLibre error: unknown link destination %s", link_name);
450  }
451 
452  return page;
453 }

+ Here is the caller graph for this function:

EvMappingList* djvu_links_get_links ( EvDocumentLinks document_links,
gint  page,
double  scale_factor 
)

Definition at line 385 of file djvu-links.c.

388 {
389  DjvuDocument *djvu_document = DJVU_DOCUMENT (document_links);
390  GList *retval = NULL;
391  miniexp_t page_annotations = miniexp_nil;
392  miniexp_t *hyperlinks = NULL, *iter = NULL;
393  EvMapping *ev_link_mapping;
394  ddjvu_pageinfo_t page_info;
395 
396  while ((page_annotations = ddjvu_document_get_pageanno (djvu_document->d_document, page)) == miniexp_dummy)
397  djvu_handle_events (djvu_document, TRUE, NULL);
398 
399  while (ddjvu_document_get_pageinfo (djvu_document->d_document, page, &page_info) < DDJVU_JOB_OK)
400  djvu_handle_events(djvu_document, TRUE, NULL);
401 
402  if (page_annotations) {
403  hyperlinks = ddjvu_anno_get_hyperlinks (page_annotations);
404  if (hyperlinks) {
405  for (iter = hyperlinks; *iter; ++iter) {
406  ev_link_mapping = get_djvu_hyperlink_mapping (djvu_document, page, &page_info, *iter);
407  if (ev_link_mapping) {
408  ev_link_mapping->area.x1 *= scale_factor;
409  ev_link_mapping->area.x2 *= scale_factor;
410  ev_link_mapping->area.y1 *= scale_factor;
411  ev_link_mapping->area.y2 *= scale_factor;
412  retval = g_list_prepend (retval, ev_link_mapping);
413  }
414  }
415  free (hyperlinks);
416  }
417  ddjvu_miniexp_release (djvu_document->d_document, page_annotations);
418  }
419 
420  return ev_mapping_list_new (page, retval, (GDestroyNotify)g_object_unref);
421 }

+ Here is the caller graph for this function:

GtkTreeModel* djvu_links_get_links_model ( EvDocumentLinks document_links)

Definition at line 456 of file djvu-links.c.

457 {
458  DjvuDocument *djvu_document = DJVU_DOCUMENT (document_links);
459  GtkTreeModel *model = NULL;
460  miniexp_t outline = miniexp_nil;
461 
462  while ((outline = ddjvu_document_get_outline (djvu_document->d_document)) == miniexp_dummy)
463  djvu_handle_events (djvu_document, TRUE, NULL);
464 
465  if (outline) {
466  model = (GtkTreeModel *) gtk_tree_store_new (EV_DOCUMENT_LINKS_COLUMN_NUM_COLUMNS,
467  G_TYPE_STRING,
468  G_TYPE_OBJECT,
469  G_TYPE_BOOLEAN,
470  G_TYPE_STRING);
471  build_tree (djvu_document, model, NULL, outline);
472 
473  ddjvu_miniexp_release (djvu_document->d_document, outline);
474  }
475 
476  return model;
477 }

+ Here is the caller graph for this function:

gboolean djvu_links_has_document_links ( EvDocumentLinks document_links)

Definition at line 368 of file djvu-links.c.

369 {
370  DjvuDocument *djvu_document = DJVU_DOCUMENT (document_links);
371  miniexp_t outline;
372 
373  while ((outline = ddjvu_document_get_outline (djvu_document->d_document)) == miniexp_dummy)
374  djvu_handle_events (djvu_document, TRUE, NULL);
375 
376  if (outline) {
377  ddjvu_miniexp_release (djvu_document->d_document, outline);
378  return TRUE;
379  }
380 
381  return FALSE;
382 }

+ Here is the caller graph for this function: