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
ev-document-text.c
Go to the documentation of this file.
1 /* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8; c-indent-level: 8 -*- */
2 /*
3  * Copyright (C) 2010 Yaco Sistemas, Daniel Garcia <danigm@yaco.es>
4  *
5  * This program is free software; you can redistribute it and/or modify
6  * it under the terms of the GNU General Public License as published by
7  * the Free Software Foundation; either version 2, or (at your option)
8  * any later version.
9  *
10  * This program is distributed in the hope that it will be useful,
11  * but WITHOUT ANY WARRANTY; without even the implied warranty of
12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13  * GNU General Public License for more details.
14  *
15  * You should have received a copy of the GNU General Public License
16  * along with this program; if not, write to the Free Software
17  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
18  *
19  * $Id$
20  */
21 
22 #include "config.h"
23 
24 #include "ev-document-text.h"
25 
26 G_DEFINE_INTERFACE (EvDocumentText, ev_document_text, 0)
27 
28 static void
30 {
31 }
32 
33 gchar *
35  EvPage *page)
36 {
37  EvDocumentTextInterface *iface = EV_DOCUMENT_TEXT_GET_IFACE (document_text);
38 
39  if (!iface->get_text)
40  return NULL;
41 
42  return iface->get_text (document_text, page);
43 }
44 
45 
46 gboolean
48  EvPage *page,
49  EvRectangle **areas,
50  guint *n_areas)
51 {
52  EvDocumentTextInterface *iface = EV_DOCUMENT_TEXT_GET_IFACE (document_text);
53 
54  if (!iface->get_text_layout)
55  return FALSE;
56 
57  return iface->get_text_layout (document_text, page, areas, n_areas);
58 }
59 
60 cairo_region_t *
62  EvPage *page)
63 {
64  EvDocumentTextInterface *iface = EV_DOCUMENT_TEXT_GET_IFACE (document_text);
65 
66  if (!iface->get_text_mapping)
67  return NULL;
68 
69  return iface->get_text_mapping (document_text, page);
70 }
71 
83 PangoAttrList *
85  EvPage *page)
86 {
87  EvDocumentTextInterface *iface = EV_DOCUMENT_TEXT_GET_IFACE (document_text);
88 
89  if (!iface->get_text_attrs)
90  return NULL;
91 
92  return iface->get_text_attrs (document_text, page);
93 }