synctex.h 995 Bytes
Newer Older
1
/* SPDX-License-Identifier: Zlib */
2 3 4 5 6 7

#ifndef SYNCTEX_H
#define SYNCTEX_H

#include "types.h"

8 9 10 11 12
typedef struct synctex_page_rect_s {
  int                 page;
  zathura_rectangle_t rect;
} synctex_page_rect_t;

13 14 15
bool synctex_get_input_line_column(const char* filename, unsigned int page,
    int x, int y, char** input_file, unsigned int* line, unsigned int* column);

16
void synctex_edit(const char* editor, zathura_page_t* page, int x, int y);
17

18 19 20
bool synctex_parse_input(const char* synctex, char** input_file, int* line,
                         int* column);

21
girara_list_t* synctex_rectangles_from_position(const char* filename,
22 23
    const char* input_file, int line, int column, unsigned int* page,
    girara_list_t** secondary_rects);
24

25 26 27 28 29 30
void synctex_highlight_rects(zathura_t* zathura, unsigned int page,
                             girara_list_t** rectangles);

bool synctex_view(zathura_t* zathura, const char* input_file,
                  unsigned int line, unsigned int column);

31
#endif