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
2
Merge Requests
2
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
647f26a7
Commit
647f26a7
authored
Mar 27, 2012
by
Moritz Lipp
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Implemented some zathura_document wrapper functions
parent
61d7a6a4
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
147 additions
and
0 deletions
+147
-0
document.c
document.c
+81
-0
document.h
document.h
+66
-0
No files found.
document.c
View file @
647f26a7
...
...
@@ -235,6 +235,87 @@ zathura_document_free(zathura_document_t* document)
return
error
;
}
const
char
*
zathura_document_get_path
(
zathura_document_t
*
document
)
{
if
(
document
==
NULL
)
{
return
NULL
;
}
return
document
->
file_path
;
}
const
char
*
zathura_document_get_password
(
zathura_document_t
*
document
)
{
if
(
document
==
NULL
)
{
return
NULL
;
}
return
document
->
password
;
}
void
*
zathura_document_get_data
(
zathura_document_t
*
document
)
{
if
(
document
==
NULL
)
{
return
NULL
;
}
return
document
->
data
;
}
void
zathura_document_set_data
(
zathura_document_t
*
document
,
void
*
data
)
{
if
(
document
==
NULL
)
{
return
;
}
document
->
data
=
data
;
}
unsigned
int
zathura_document_get_number_of_pages
(
zathura_document_t
*
document
)
{
if
(
document
==
NULL
)
{
return
0
;
}
return
document
->
number_of_pages
;
}
void
zathura_document_set_number_of_pages
(
zathura_document_t
*
document
,
unsigned
int
number_of_pages
)
{
if
(
document
==
NULL
)
{
return
;
}
document
->
number_of_pages
=
number_of_pages
;
}
unsigned
int
zathura_document_get_current_page
(
zathura_document_t
*
document
)
{
if
(
document
==
NULL
)
{
return
0
;
}
return
document
->
current_page_number
;
}
void
zathura_document_set_current_page
(
zathura_document_t
*
document
,
unsigned
int
current_page
)
{
if
(
document
==
NULL
)
{
return
;
}
document
->
current_page_number
=
current_page
;
}
zathura_error_t
zathura_document_save_as
(
zathura_document_t
*
document
,
const
char
*
path
)
{
...
...
document.h
View file @
647f26a7
...
...
@@ -64,6 +64,22 @@ struct zathura_document_s
zathura_document_t
*
zathura_document_open
(
zathura_t
*
zathura
,
const
char
*
path
,
const
char
*
password
);
/**
* Returns the path of the document
*
* @param document The document
* @return The file path of the document
*/
const
char
*
zathura_document_get_path
(
zathura_document_t
*
document
);
/**
* Returns the password of the document
*
* @param document The document
* @return Returns the password of the document
*/
const
char
*
zathura_document_get_password
(
zathura_document_t
*
document
);
/**
* Free the document
*
...
...
@@ -73,6 +89,56 @@ zathura_document_t* zathura_document_open(zathura_t* zathura, const char* path,
*/
zathura_error_t
zathura_document_free
(
zathura_document_t
*
document
);
/**
* Returns the private data of the document
*
* @param document The document
* @return The private data or NULL
*/
void
*
zathura_document_get_data
(
zathura_document_t
*
document
);
/**
* Returns the number of pages
*
* @param document The document
* @return Number of pages
*/
unsigned
int
zathura_document_get_number_of_pages
(
zathura_document_t
*
document
);
/**
* Sets the number of pages
*
* @param document The document
* @param number_of_pages Number of pages
*/
void
zathura_document_set_number_of_pages
(
zathura_document_t
*
document
,
unsigned
int
number_of_pages
);
/**
* Returns the current page number
*
* @param document The document
* @return Current page
*/
unsigned
int
zathura_document_get_current_page
(
zathura_document_t
*
document
);
/**
* Sets the number of pages
*
* @param document The document
* @param current_page The current page number
*/
void
zathura_document_set_current_page
(
zathura_document_t
*
document
,
unsigned
int
current_page
);
/**
* Sets the private data of the document
*
* @param document The document
* @param data The new private data
*/
void
zathura_document_set_data
(
zathura_document_t
*
document
,
void
*
data
);
/**
* Save the document
*
...
...
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