Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/libdocument/ev-document.h
diff options
context:
space:
mode:
authorJose Aliste <jose.aliste@gmail.com>2010-06-27 10:12:15 (GMT)
committer Carlos Garcia Campos <carlosgc@gnome.org>2010-06-27 10:12:15 (GMT)
commita3a90743203a26d3fc71f0d9ba58aeb645279d04 (patch)
tree68fd81e37ce056c6fc64178be48688400a898a17 /libdocument/ev-document.h
parent76dc886f8488897f3ebf1506ab671f29739607ff (diff)
[libdocument] Add synctex methods to search backward and forward
Diffstat (limited to 'libdocument/ev-document.h')
-rw-r--r--libdocument/ev-document.h26
1 files changed, 26 insertions, 0 deletions
diff --git a/libdocument/ev-document.h b/libdocument/ev-document.h
index 68b3307..578cc7f 100644
--- a/libdocument/ev-document.h
+++ b/libdocument/ev-document.h
@@ -65,6 +65,7 @@ typedef struct {
} EvPoint;
typedef struct _EvRectangle EvRectangle;
+typedef struct _EvMapping EvMapping;
typedef struct _EvDocumentBackendInfo EvDocumentBackendInfo;
struct _EvDocumentBackendInfo
@@ -73,6 +74,12 @@ struct _EvDocumentBackendInfo
const gchar *version;
};
+typedef struct {
+ const gchar *filename;
+ gint line;
+ gint col;
+} EvSourceLink;
+
struct _EvDocument
{
GObject base;
@@ -105,6 +112,7 @@ struct _EvDocumentClass
EvDocumentInfo * (* get_info) (EvDocument *document);
gboolean (* get_backend_info)(EvDocument *document,
EvDocumentBackendInfo *info);
+ gboolean (* support_synctex) (EvDocument *document);
};
GType ev_document_get_type (void) G_GNUC_CONST;
@@ -157,6 +165,19 @@ 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);
+gboolean ev_document_has_synctex (EvDocument *document);
+
+EvSourceLink *ev_document_synctex_backward_search
+ (EvDocument *document,
+ gint page_index,
+ gfloat x,
+ gfloat y);
+
+EvMapping *ev_document_synctex_forward_search
+ (EvDocument *document,
+ const gchar *filename,
+ gint line,
+ gint col);
gint ev_rect_cmp (EvRectangle *a,
EvRectangle *b);
@@ -175,6 +196,11 @@ EvRectangle *ev_rectangle_new (void);
EvRectangle *ev_rectangle_copy (EvRectangle *ev_rect);
void ev_rectangle_free (EvRectangle *ev_rect);
+struct _EvMapping {
+ EvRectangle area;
+ gpointer data;
+};
+
/* convenience macro to ease interface addition in the CODE
* section of EV_BACKEND_REGISTER_WITH_CODE (this macro relies on
* the g_define_type_id present within EV_BACKEND_REGISTER_WITH_CODE()).