summaryrefslogtreecommitdiff
path: root/server/synctex_parser.h
diff options
context:
space:
mode:
authorAndreas Politz <politza@hochschule-trier.de>2017-09-18 13:27:38 +0200
committerAndreas Politz <politza@hochschule-trier.de>2017-09-18 13:27:38 +0200
commit310d88ee89fffd55ac0f1696967e69a8ff43d2bc (patch)
tree3ced2dde5fd27f05ff774cdb1c6265ac7a036491 /server/synctex_parser.h
parent8b81804452fb953700470fbfe80db68279d86566 (diff)
Updated synctex parser from upstream
Diffstat (limited to 'server/synctex_parser.h')
-rw-r--r--server/synctex_parser.h31
1 files changed, 24 insertions, 7 deletions
diff --git a/server/synctex_parser.h b/server/synctex_parser.h
index 2f22c30..2c1911e 100644
--- a/server/synctex_parser.h
+++ b/server/synctex_parser.h
@@ -1,11 +1,11 @@
-/*
+/*
Copyright (c) 2008, 2009, 2010 , 2011 jerome DOT laurens AT u-bourgogne DOT fr
This file is part of the SyncTeX package.
Latest Revision: Tue Jun 14 08:23:30 UTC 2011
-Version: 1.16
+Version: 1.18
See synctex_parser_readme.txt for more details
@@ -32,9 +32,9 @@ WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
OTHER DEALINGS IN THE SOFTWARE
-Except as contained in this notice, the name of the copyright holder
-shall not be used in advertising or otherwise to promote the sale,
-use or other dealings in this Software without prior written
+Except as contained in this notice, the name of the copyright holder
+shall not be used in advertising or otherwise to promote the sale,
+use or other dealings in this Software without prior written
authorization from the copyright holder.
Acknowledgments:
@@ -59,6 +59,8 @@ Thu Jun 19 09:39:21 UTC 2008
extern "C" {
#endif
+# define SYNCTEX_VERSION_STRING "1.18"
+
/* synctex_node_t is the type for all synctex nodes.
* The synctex file is parsed into a tree of nodes, either sheet, boxes, math nodes... */
typedef struct _synctex_node * synctex_node_t;
@@ -162,8 +164,9 @@ synctex_scanner_t synctex_scanner_parse(synctex_scanner_t scanner);
* Sumatra-PDF, Skim, iTeXMac2 and Texworks are examples of open source software that use this library.
* You can browse their code for a concrete implementation.
*/
-int synctex_display_query(synctex_scanner_t scanner,const char * name,int line,int column);
-int synctex_edit_query(synctex_scanner_t scanner,int page,float h,float v);
+typedef long synctex_status_t;
+synctex_status_t synctex_display_query(synctex_scanner_t scanner,const char * name,int line,int column);
+synctex_status_t synctex_edit_query(synctex_scanner_t scanner,int page,float h,float v);
synctex_node_t synctex_next_result(synctex_scanner_t scanner);
/* Display all the information contained in the scanner object.
@@ -236,6 +239,7 @@ synctex_node_t synctex_node_sheet(synctex_node_t node);
synctex_node_t synctex_node_child(synctex_node_t node);
synctex_node_t synctex_node_sibling(synctex_node_t node);
synctex_node_t synctex_node_next(synctex_node_t node);
+synctex_node_t synctex_sheet(synctex_scanner_t scanner,int page);
synctex_node_t synctex_sheet_content(synctex_scanner_t scanner,int page);
/* These are the types of the synctex nodes */
@@ -264,6 +268,11 @@ const char * synctex_node_isa(synctex_node_t node);
void synctex_node_log(synctex_node_t node);
void synctex_node_display(synctex_node_t node);
+/* Given a node, access to the location in the synctex file where it is defined.
+ */
+typedef unsigned int synctex_charindex_t;
+synctex_charindex_t synctex_node_charindex(synctex_node_t node);
+
/* Given a node, access to its tag, line and column.
* The line and column numbers are 1 based.
* The latter is not yet fully supported in TeX, the default implementation returns 0 which means the whole line.
@@ -274,6 +283,14 @@ int synctex_node_tag(synctex_node_t node);
int synctex_node_line(synctex_node_t node);
int synctex_node_column(synctex_node_t node);
+/* In order to enhance forward synchronization,
+ * non void horizontal boxes have supplemental cached information.
+ * The mean line is the average of the line numbers of the included nodes.
+ * The child count is the number of chidren.
+ */
+int synctex_node_mean_line(synctex_node_t node);
+int synctex_node_child_count(synctex_node_t node);
+
/* This is the page where the node appears.
* This is a 1 based index as given by TeX.
*/