zathura
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros
Data Structures | Macros | Typedefs | Enumerations | Functions
zathura.h File Reference
#include <stdbool.h>
#include <girara/types.h>
#include <gtk/gtk.h>
#include "macros.h"
#include "types.h"

Go to the source code of this file.

Data Structures

struct  zathura_jump_t
 
struct  zathura_t
 

Macros

#define ZATHURA_PAGE_CACHE_DEFAULT_SIZE   15
 

Typedefs

typedef struct _ZathuraDatabase zathura_database_t
 

Enumerations

enum  {
  NEXT, PREVIOUS, LEFT, RIGHT,
  UP, DOWN, BOTTOM, TOP,
  HIDE, HIGHLIGHT, DELETE_LAST_WORD, DELETE_LAST_CHAR,
  DEFAULT, ERROR, WARNING, NEXT_GROUP,
  PREVIOUS_GROUP, ZOOM_IN, ZOOM_OUT, ZOOM_ORIGINAL,
  ZOOM_SPECIFIC, FORWARD, BACKWARD, CONTINUOUS,
  DELETE_LAST, EXPAND, EXPAND_ALL, COLLAPSE_ALL,
  COLLAPSE, SELECT, GOTO_DEFAULT, GOTO_LABELS,
  GOTO_OFFSET, HALF_UP, HALF_DOWN, FULL_UP,
  FULL_DOWN, HALF_LEFT, HALF_RIGHT, FULL_LEFT,
  FULL_RIGHT, NEXT_CHAR, PREVIOUS_CHAR, DELETE_TO_LINE_START,
  APPEND_FILEPATH, ROTATE_CW, ROTATE_CCW
}
 
enum  { ZATHURA_PAGE_NUMBER_UNSPECIFIED = INT_MIN }
 

Functions

zathura_t * zathura_create (void)
 
bool zathura_init (zathura_t *zathura)
 
void zathura_free (zathura_t *zathura)
 
void zathura_set_xid (zathura_t *zathura, Window xid)
 
void zathura_set_config_dir (zathura_t *zathura, const char *dir)
 
void zathura_set_data_dir (zathura_t *zathura, const char *dir)
 
void zathura_set_plugin_dir (zathura_t *zathura, const char *dir)
 
void zathura_set_synctex_editor_command (zathura_t *zathura, const char *command)
 
void zathura_set_synctex (zathura_t *zathura, bool value)
 
void zathura_set_argv (zathura_t *zathura, char **argv)
 
bool document_open (zathura_t *zathura, const char *path, const char *password, int page_number)
 
void document_open_idle (zathura_t *zathura, const char *path, const char *password, int page_number)
 
bool document_save (zathura_t *zathura, const char *path, bool overwrite)
 
bool document_close (zathura_t *zathura, bool keep_monitor)
 
bool page_set (zathura_t *zathura, unsigned int page_id)
 
bool page_set_delayed (zathura_t *zathura, unsigned int page_id)
 
bool position_set_delayed (zathura_t *zathura, double position_x, double position_y)
 
void page_widget_set_mode (zathura_t *zathura, unsigned int pages_per_row, unsigned int first_page_column)
 
void statusbar_page_number_update (zathura_t *zathura)
 
bool zathura_jumplist_has_previous (zathura_t *zathura)
 
bool zathura_jumplist_has_next (zathura_t *zathura)
 
zathura_jump_tzathura_jumplist_current (zathura_t *zathura)
 
void zathura_jumplist_forward (zathura_t *zathura)
 
void zathura_jumplist_backward (zathura_t *zathura)
 
void zathura_jumplist_save (zathura_t *zathura)
 
void zathura_jumplist_add (zathura_t *zathura)
 
void zathura_jumplist_append_jump (zathura_t *zathura)
 
void zathura_page_cache_add (zathura_t *zathura, unsigned int page_index)
 

Macro Definition Documentation

#define ZATHURA_PAGE_CACHE_DEFAULT_SIZE   15

Definition at line 16 of file zathura.h.

Typedef Documentation

typedef struct _ZathuraDatabase zathura_database_t

Definition at line 32 of file zathura.h.

Enumeration Type Documentation

anonymous enum
Enumerator
NEXT 
PREVIOUS 
LEFT 
RIGHT 
UP 
DOWN 
BOTTOM 
TOP 
HIDE 
HIGHLIGHT 
DELETE_LAST_WORD 
DELETE_LAST_CHAR 
DEFAULT 
ERROR 
WARNING 
NEXT_GROUP 
PREVIOUS_GROUP 
ZOOM_IN 
ZOOM_OUT 
ZOOM_ORIGINAL 
ZOOM_SPECIFIC 
FORWARD 
BACKWARD 
CONTINUOUS 
DELETE_LAST 
EXPAND 
EXPAND_ALL 
COLLAPSE_ALL 
COLLAPSE 
SELECT 
GOTO_DEFAULT 
GOTO_LABELS 
GOTO_OFFSET 
HALF_UP 
HALF_DOWN 
FULL_UP 
FULL_DOWN 
HALF_LEFT 
HALF_RIGHT 
FULL_LEFT 
FULL_RIGHT 
NEXT_CHAR 
PREVIOUS_CHAR 
DELETE_TO_LINE_START 
APPEND_FILEPATH 
ROTATE_CW 
ROTATE_CCW 

Definition at line 18 of file zathura.h.

anonymous enum
Enumerator
ZATHURA_PAGE_NUMBER_UNSPECIFIED 

Definition at line 27 of file zathura.h.

Function Documentation

bool document_close ( zathura_t *  zathura,
bool  keep_monitor 
)

Closes the current opened document

Parameters
zathuraThe zathura session
keep_monitorSet to true if monitor should be kept (sc_reload)
Returns
If no error occured true, otherwise false, is returned.

Definition at line 869 of file zathura.c.

bool document_open ( zathura_t *  zathura,
const char *  path,
const char *  password,
int  page_number 
)

Opens a file

Parameters
zathuraThe zathura session
pathThe path to the file
passwordThe password of the file
Returns
If no error occured true, otherwise false, is returned.

Definition at line 553 of file zathura.c.

void document_open_idle ( zathura_t *  zathura,
const char *  path,
const char *  password,
int  page_number 
)

Opens a file (idle)

Parameters
zathuraThe zathura session
pathThe path to the file
passwordThe password of the file

Definition at line 812 of file zathura.c.

bool document_save ( zathura_t *  zathura,
const char *  path,
bool  overwrite 
)

Save a open file

Parameters
zathuraThe zathura session
pathThe path
overwriteOverwrite existing file
Returns
If no error occured true, otherwise false, is returned.

Definition at line 830 of file zathura.c.

bool page_set ( zathura_t *  zathura,
unsigned int  page_id 
)

Opens the page with the given number

Parameters
zathuraThe zathura session
page_idThe id of the page that should be set
Returns
If no error occured true, otherwise false, is returned.

Definition at line 991 of file zathura.c.

bool page_set_delayed ( zathura_t *  zathura,
unsigned int  page_id 
)

Opens the page with the given number (delayed)

Parameters
zathuraThe zathura session
page_idThe id of the page that should be set
Returns
If no error occured true, otherwise false, is returned.

Definition at line 976 of file zathura.c.

void page_widget_set_mode ( zathura_t *  zathura,
unsigned int  pages_per_row,
unsigned int  first_page_column 
)

Builds the box structure to show the rendered pages

Parameters
zathuraThe zathura session
pages_per_rowNumber of shown pages per row
first_page_columnColumn on which first page start

Definition at line 1044 of file zathura.c.

bool position_set_delayed ( zathura_t *  zathura,
double  position_x,
double  position_y 
)

Moves to the given position

Parameters
zathuraZathura session
position_xX coordinate
position_yY coordinate
Returns
If no error occured true, otherwise false, is returned.

Definition at line 1112 of file zathura.c.

void statusbar_page_number_update ( zathura_t *  zathura)

Updates the page number in the statusbar. Note that 1 will be added to the displayed number

Parameters
zathuraThe zathura session

Definition at line 1025 of file zathura.c.

zathura_t* zathura_create ( void  )

Creates a zathura session

Returns
zathura session object or NULL if zathura could not be creeated

Definition at line 63 of file zathura.c.

void zathura_free ( zathura_t *  zathura)

Free zathura session

Parameters
zathuraThe zathura session

Definition at line 311 of file zathura.c.

bool zathura_init ( zathura_t *  zathura)

Initializes zathura

Parameters
zathuraThe zathura session
Returns
true if initialization has been successful

Definition at line 95 of file zathura.c.

void zathura_jumplist_add ( zathura_t *  zathura)

Add current page as a new item to the jumplist after current position

Parameters
zathuraThe zathura session

Definition at line 1198 of file zathura.c.

void zathura_jumplist_append_jump ( zathura_t *  zathura)

Add a page to the jumplist after current position

Parameters
zathuraThe zathura session

Definition at line 1165 of file zathura.c.

void zathura_jumplist_backward ( zathura_t *  zathura)

Move backward in the jumplist

Parameters
zathuraThe zathura session

Definition at line 1157 of file zathura.c.

zathura_jump_t* zathura_jumplist_current ( zathura_t *  zathura)

Return current jump in the jumplist

Parameters
zathuraThe zathura session
Returns
current jump

Definition at line 1139 of file zathura.c.

void zathura_jumplist_forward ( zathura_t *  zathura)

Move forward in the jumplist

Parameters
zathuraThe zathura session

Definition at line 1149 of file zathura.c.

bool zathura_jumplist_has_next ( zathura_t *  zathura)

Checks whether current jump has a next jump

Parameters
zathuraThe zathura session
Returns
true if current jump has a next jump
bool zathura_jumplist_has_previous ( zathura_t *  zathura)

Checks whether current jump has a previous jump

Parameters
zathuraThe zathura session
Returns
true if current jump has a previous jump

Definition at line 1127 of file zathura.c.

void zathura_jumplist_save ( zathura_t *  zathura)

Save current page to the jumplist at current position

Parameters
zathuraThe zathura session

Definition at line 1215 of file zathura.c.

void zathura_page_cache_add ( zathura_t *  zathura,
unsigned int  page_index 
)

Add a page to the page cache

Parameters
zathuraThe zathura session
page_indexThe index of the page to be cached

Definition at line 1312 of file zathura.c.

void zathura_set_argv ( zathura_t *  zathura,
char **  argv 
)

Sets the program parameters

Parameters
zathuraThe zathura session
argvList of arguments

Definition at line 464 of file zathura.c.

void zathura_set_config_dir ( zathura_t *  zathura,
const char *  dir 
)

Set the path to the configuration directory

Parameters
zathuraThe zathura session
dirDirectory path

Definition at line 387 of file zathura.c.

void zathura_set_data_dir ( zathura_t *  zathura,
const char *  dir 
)

Set the path to the data directory

Parameters
zathuraThe zathura session
dirDirectory path

Definition at line 401 of file zathura.c.

void zathura_set_plugin_dir ( zathura_t *  zathura,
const char *  dir 
)

Set the path to the plugin directory

Parameters
zathuraThe zathura session
dirDirectory path

Definition at line 415 of file zathura.c.

void zathura_set_synctex ( zathura_t *  zathura,
bool  value 
)

En/Disable zathuras synctex support

Parameters
zathuraThe zathura session
valueThe value

Definition at line 455 of file zathura.c.

void zathura_set_synctex_editor_command ( zathura_t *  zathura,
const char *  command 
)

Enables synctex support and sets the synctex editor command

Parameters
zathuraThe zathura session
commandSynctex editor command

Definition at line 439 of file zathura.c.

void zathura_set_xid ( zathura_t *  zathura,
Window  xid 
)

Set parent window id

Parameters
zathuraThe zathura session
xidThe window id

Definition at line 378 of file zathura.c.