]> www.fi.muni.cz Git - evince.git/blob - libdocument/ev-document-links.h
e6d90204489fa03f97d5d1cebc9ff14dfc11b08d
[evince.git] / libdocument / ev-document-links.h
1 /* ev-document-links.h
2  *  this file is part of evince, a gnome document viewer
3  * 
4  * Copyright (C) 2004 Red Hat, Inc.
5  *
6  * Author:
7  *   Jonathan Blandford <jrb@alum.mit.edu>
8  *
9  * Evince is free software; you can redistribute it and/or modify it
10  * under the terms of the GNU General Public License as published by
11  * the Free Software Foundation; either version 2 of the License, or
12  * (at your option) any later version.
13  *
14  * Evince is distributed in the hope that it will be useful, but
15  * WITHOUT ANY WARRANTY; without even the implied warranty of
16  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
17  * General Public License for more details.
18  *
19  * You should have received a copy of the GNU General Public License
20  * along with this program; if not, write to the Free Software
21  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
22  */
23
24 #if !defined (__EV_EVINCE_DOCUMENT_H_INSIDE__) && !defined (EVINCE_COMPILATION)
25 #error "Only <evince-document.h> can be included directly."
26 #endif
27
28 #ifndef EV_DOCUMENT_LINKS_H
29 #define EV_DOCUMENT_LINKS_H
30
31 #include <glib-object.h>
32 #include <glib.h>
33 #include <gtk/gtk.h>
34
35 #include "ev-document.h"
36 #include "ev-link.h"
37
38 G_BEGIN_DECLS
39
40 #define EV_TYPE_DOCUMENT_LINKS            (ev_document_links_get_type ())
41 #define EV_DOCUMENT_LINKS(o)              (G_TYPE_CHECK_INSTANCE_CAST ((o), EV_TYPE_DOCUMENT_LINKS, EvDocumentLinks))
42 #define EV_DOCUMENT_LINKS_IFACE(k)        (G_TYPE_CHECK_CLASS_CAST((k), EV_TYPE_DOCUMENT_LINKS, EvDocumentLinksInterface))
43 #define EV_IS_DOCUMENT_LINKS(o)           (G_TYPE_CHECK_INSTANCE_TYPE ((o), EV_TYPE_DOCUMENT_LINKS))
44 #define EV_IS_DOCUMENT_LINKS_IFACE(k)     (G_TYPE_CHECK_CLASS_TYPE ((k), EV_TYPE_DOCUMENT_LINKS))
45 #define EV_DOCUMENT_LINKS_GET_IFACE(inst) (G_TYPE_INSTANCE_GET_INTERFACE ((inst), EV_TYPE_DOCUMENT_LINKS, EvDocumentLinksInterface))
46
47 typedef struct _EvDocumentLinks          EvDocumentLinks;
48 typedef struct _EvDocumentLinksInterface EvDocumentLinksInterface;
49
50 enum {
51         EV_DOCUMENT_LINKS_COLUMN_MARKUP,
52         EV_DOCUMENT_LINKS_COLUMN_LINK,
53         EV_DOCUMENT_LINKS_COLUMN_EXPAND,
54         EV_DOCUMENT_LINKS_COLUMN_PAGE_LABEL,
55         EV_DOCUMENT_LINKS_COLUMN_NUM_COLUMNS
56 };
57
58 struct _EvDocumentLinksInterface
59 {
60         GTypeInterface base_iface;
61
62         /* Methods  */
63         gboolean      (* has_document_links) (EvDocumentLinks *document_links);
64         GtkTreeModel *(* get_links_model)    (EvDocumentLinks *document_links);
65         GList        *(* get_links)          (EvDocumentLinks *document_links,
66                                               EvPage          *page);
67         EvLinkDest   *(* find_link_dest)     (EvDocumentLinks *document_links,
68                                               const gchar     *link_name);
69 };
70
71 GType         ev_document_links_get_type           (void);
72 gboolean      ev_document_links_has_document_links (EvDocumentLinks *document_links);
73 GtkTreeModel *ev_document_links_get_links_model    (EvDocumentLinks *document_links);
74
75 GList        *ev_document_links_get_links          (EvDocumentLinks *document_links,
76                                                     EvPage          *page);
77 EvLinkDest   *ev_document_links_find_link_dest     (EvDocumentLinks *document_links,
78                                                     const gchar     *link_name);
79 gint          ev_document_links_get_dest_page      (EvDocumentLinks *document_links,
80                                                     EvLinkDest      *dest);
81 gchar        *ev_document_links_get_dest_page_label(EvDocumentLinks *document_links,
82                                                     EvLinkDest      *dest);
83
84 G_END_DECLS
85
86 #endif