Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
pwmt
zathura
Commits
9f5d6cdd
Commit
9f5d6cdd
authored
Sep 29, 2011
by
Moritz Lipp
Browse files
Added page_render_cairo function
parent
13eeebc9
Changes
2
Hide whitespace changes
Inline
Side-by-side
document.c
View file @
9f5d6cdd
...
...
@@ -206,32 +206,16 @@ zathura_document_open(zathura_t* zathura, const char* path, const char* password
goto
error_free
;
}
document
=
malloc
(
sizeof
(
zathura_document_t
));
document
=
g_
malloc
0
(
sizeof
(
zathura_document_t
));
if
(
document
==
NULL
)
{
goto
error_free
;
}
document
->
file_path
=
real_path
;
document
->
password
=
password
;
document
->
current_page_number
=
0
;
document
->
number_of_pages
=
0
;
document
->
scale
=
1
.
0
;
document
->
rotate
=
0
;
document
->
data
=
NULL
;
document
->
pages
=
NULL
;
document
->
zathura
=
zathura
;
document
->
functions
.
document_free
=
NULL
;
document
->
functions
.
document_index_generate
=
NULL
;
document
->
functions
.
document_save_as
=
NULL
;
document
->
functions
.
document_attachments_get
=
NULL
;
document
->
functions
.
page_get
=
NULL
;
document
->
functions
.
page_free
=
NULL
;
document
->
functions
.
page_search_text
=
NULL
;
document
->
functions
.
page_links_get
=
NULL
;
document
->
functions
.
page_form_fields_get
=
NULL
;
document
->
functions
.
page_render
=
NULL
;
girara_list_iterator_t
*
iter
=
girara_list_iterator
(
zathura
->
plugins
.
plugins
);
if
(
iter
==
NULL
)
{
goto
error_free
;
...
...
@@ -285,7 +269,7 @@ error_free:
free
(
document
->
pages
);
}
free
(
document
);
g_
free
(
document
);
error_out:
...
...
@@ -315,7 +299,7 @@ zathura_document_free(zathura_document_t* document)
free
(
document
->
file_path
);
}
free
(
document
);
g_
free
(
document
);
return
true
;
}
...
...
@@ -325,7 +309,7 @@ zathura_document_free(zathura_document_t* document)
free
(
document
->
file_path
);
}
free
(
document
);
g_
free
(
document
);
return
r
;
}
...
...
document.h
View file @
9f5d6cdd
...
...
@@ -3,6 +3,7 @@
#ifndef DOCUMENT_H
#define DOCUMENT_H
#include <cairo.h>
#include <gtk/gtk.h>
#include <stdbool.h>
...
...
@@ -213,6 +214,11 @@ struct zathura_document_s
*/
zathura_image_buffer_t
*
(
*
page_render
)(
zathura_page_t
*
page
);
/**
* Renders the page
*/
bool
(
*
page_render_cairo
)(
zathura_page_t
*
page
,
cairo_t
*
cairo
);
/**
* Free page
*/
...
...
Write
Preview
Supports
Markdown
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