Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Z
zathura
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
110
Issues
110
List
Boards
Labels
Milestones
Merge Requests
4
Merge Requests
4
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
pwmt
zathura
Commits
ea094f23
Commit
ea094f23
authored
Feb 24, 2016
by
Sebastian Ramacher
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Split off jumplist function declarations
parent
f6754d7a
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
92 additions
and
79 deletions
+92
-79
zathura/jumplist.c
zathura/jumplist.c
+2
-0
zathura/jumplist.h
zathura/jumplist.h
+78
-0
zathura/types.h
zathura/types.h
+10
-0
zathura/zathura.h
zathura/zathura.h
+2
-79
No files found.
zathura/jumplist.c
View file @
ea094f23
#include "jumplist.h"
#include "zathura.h"
#include "document.h"
#include "database.h"
...
...
zathura/jumplist.h
0 → 100644
View file @
ea094f23
#ifndef ZATHURA_JUMPLIST_H
#define ZATHURA_JUMPLIST_H
#include <girara/datastructures.h>
#include "types.h"
typedef
struct
zathura_jumplist_s
{
girara_list_t
*
list
;
girara_list_iterator_t
*
cur
;
unsigned
int
size
;
unsigned
int
max_size
;
}
zathura_jumplist_t
;
/**
* Checks whether current jump has a previous jump
*
* @param zathura The zathura session
* @return true if current jump has a previous jump
*/
bool
zathura_jumplist_has_previous
(
zathura_t
*
jumplzathura
);
/**
* Checks whether current jump has a next jump
*
* @param zathura The zathura session
* @return true if current jump has a next jump
*/
bool
zathura_jumplist_has_next
(
zathura_t
*
zathura
);
/**
* Return current jump in the jumplist
*
* @param zathura The zathura session
* @return current jump
*/
zathura_jump_t
*
zathura_jumplist_current
(
zathura_t
*
zathura
);
/**
* Move forward in the jumplist
*
* @param zathura The zathura session
*/
void
zathura_jumplist_forward
(
zathura_t
*
zathura
);
/**
* Move backward in the jumplist
*
* @param zathura The zathura session
*/
void
zathura_jumplist_backward
(
zathura_t
*
zathura
);
/**
* Add current page as a new item to the jumplist after current position
*
* @param zathura The zathura session
*/
void
zathura_jumplist_add
(
zathura_t
*
zathura
);
/**
* Trim entries from the beginning of the jumplist to maintain it's maximum size constraint.
*
* @param zathura The zathura session
*/
void
zathura_jumplist_trim
(
zathura_t
*
zathura
);
/**
* Load the jumplist of the specified file
*
* @param zathura The zathura session
* @param file The file whose jumplist is to be loaded
*
* return A linked list of zathura_jump_t structures constituting the jumplist of the specified file, or NULL.
*/
bool
zathura_jumplist_load
(
zathura_t
*
zathura
,
const
char
*
file
);
#endif
zathura/types.h
View file @
ea094f23
...
...
@@ -213,6 +213,16 @@ typedef struct zathura_form_s
zathura_form_type_t
type
;
/**< Type */
}
zathura_form_t
;
/**
* Jump
*/
typedef
struct
zathura_jump_s
{
unsigned
int
page
;
double
x
;
double
y
;
}
zathura_jump_t
;
/**
* Create new index element
*
...
...
zathura/zathura.h
View file @
ea094f23
...
...
@@ -11,6 +11,7 @@
#endif
#include "macros.h"
#include "types.h"
#include "jumplist.h"
enum
{
NEXT
,
...
...
@@ -82,16 +83,6 @@ enum {
/* forward declaration for types from database.h */
typedef
struct
_ZathuraDatabase
zathura_database_t
;
/**
* Jump
*/
typedef
struct
zathura_jump_s
{
unsigned
int
page
;
double
x
;
double
y
;
}
zathura_jump_t
;
struct
zathura_s
{
struct
...
...
@@ -162,13 +153,7 @@ struct zathura_s
girara_list_t
*
bookmarks
;
/**< bookmarks */
}
bookmarks
;
struct
{
girara_list_t
*
list
;
girara_list_iterator_t
*
cur
;
unsigned
int
size
;
unsigned
int
max_size
;
}
jumplist
;
zathura_jumplist_t
jumplist
;
struct
{
...
...
@@ -415,68 +400,6 @@ void page_widget_set_mode(zathura_t* zathura, unsigned int page_padding,
*/
void
statusbar_page_number_update
(
zathura_t
*
zathura
);
/**
* Checks whether current jump has a previous jump
*
* @param zathura The zathura session
* @return true if current jump has a previous jump
*/
bool
zathura_jumplist_has_previous
(
zathura_t
*
zathura
);
/**
* Checks whether current jump has a next jump
*
* @param zathura The zathura session
* @return true if current jump has a next jump
*/
bool
zathura_jumplist_has_next
(
zathura_t
*
zathura
);
/**
* Return current jump in the jumplist
*
* @param zathura The zathura session
* @return current jump
*/
zathura_jump_t
*
zathura_jumplist_current
(
zathura_t
*
zathura
);
/**
* Move forward in the jumplist
*
* @param zathura The zathura session
*/
void
zathura_jumplist_forward
(
zathura_t
*
zathura
);
/**
* Move backward in the jumplist
*
* @param zathura The zathura session
*/
void
zathura_jumplist_backward
(
zathura_t
*
zathura
);
/**
* Add current page as a new item to the jumplist after current position
*
* @param zathura The zathura session
*/
void
zathura_jumplist_add
(
zathura_t
*
zathura
);
/**
* Trim entries from the beginning of the jumplist to maintain it's maximum size constraint.
*
* @param zathura The zathura session
*/
void
zathura_jumplist_trim
(
zathura_t
*
zathura
);
/**
* Load the jumplist of the specified file
*
* @param zathura The zathura session
* @param file The file whose jumplist is to be loaded
*
* return A linked list of zathura_jump_t structures constituting the jumplist of the specified file, or NULL.
*/
bool
zathura_jumplist_load
(
zathura_t
*
zathura
,
const
char
*
file
);
/**
* Gets the nicely formatted filename of the loaded document according to settings
*
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment