Commit 31f88b7a authored by Sebastian Ramacher's avatar Sebastian Ramacher
Browse files

Register plugin without callback

parent 34c5708f
......@@ -18,26 +18,22 @@ static bool exp_to_str(miniexp_t expression, const char** string);
static bool exp_to_int(miniexp_t expression, int* integer);
static bool exp_to_rect(miniexp_t expression, zathura_rectangle_t* rect);
void
register_functions(zathura_plugin_functions_t* functions)
{
functions->document_open = (zathura_plugin_document_open_t) djvu_document_open;
functions->document_free = (zathura_plugin_document_free_t) djvu_document_free;
functions->document_index_generate = (zathura_plugin_document_index_generate_t) djvu_document_index_generate;
functions->document_save_as = (zathura_plugin_document_save_as_t) djvu_document_save_as;
functions->page_init = (zathura_plugin_page_init_t) djvu_page_init;
functions->page_clear = (zathura_plugin_page_clear_t) djvu_page_clear;
functions->page_search_text = (zathura_plugin_page_search_text_t) djvu_page_search_text;
functions->page_get_text = (zathura_plugin_page_get_text_t) djvu_page_get_text;
functions->page_links_get = (zathura_plugin_page_links_get_t) djvu_page_links_get;
functions->page_render = (zathura_plugin_page_render_t) djvu_page_render;
functions->page_render_cairo = (zathura_plugin_page_render_cairo_t) djvu_page_render_cairo;
}
ZATHURA_PLUGIN_REGISTER(
ZATHURA_PLUGIN_REGISTER_WITH_FUNCTIONS(
"djvu",
VERSION_MAJOR, VERSION_MINOR, VERSION_REV,
register_functions,
ZATHURA_PLUGIN_FUNCTIONS({
.document_open = djvu_document_open,
.document_free = (zathura_plugin_document_free_t) djvu_document_free,
.document_index_generate = (zathura_plugin_document_index_generate_t) djvu_document_index_generate,
.document_save_as = (zathura_plugin_document_save_as_t) djvu_document_save_as,
.page_init = (zathura_plugin_page_init_t) djvu_page_init,
.page_clear = (zathura_plugin_page_clear_t) djvu_page_clear,
.page_search_text = (zathura_plugin_page_search_text_t) djvu_page_search_text,
.page_get_text = (zathura_plugin_page_get_text_t) djvu_page_get_text,
.page_links_get = (zathura_plugin_page_links_get_t) djvu_page_links_get,
.page_render = (zathura_plugin_page_render_t) djvu_page_render,
.page_render_cairo = (zathura_plugin_page_render_cairo_t) djvu_page_render_cairo
}),
ZATHURA_PLUGIN_MIMETYPES({
"image/vnd.djvu"
})
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment