zathura/render.h

63 lines
1.5 KiB
C
Raw Normal View History

2011-01-07 09:07:02 +01:00
/* See LICENSE file for license and copyright information */
2011-01-24 12:43:39 +01:00
#ifndef RENDER_H
#define RENDER_H
2011-01-07 09:07:02 +01:00
#include <stdbool.h>
2011-01-24 12:43:39 +01:00
#include <stdlib.h>
#include <girara/types.h>
2011-01-07 09:07:02 +01:00
2011-04-18 18:19:41 +02:00
#include "zathura.h"
2011-02-09 21:28:36 +01:00
#include "callbacks.h"
2011-01-07 09:07:02 +01:00
2011-02-08 07:51:53 +01:00
/**
* This function initializes a render thread
*
2012-02-08 15:30:13 +01:00
* @param zathura object
2011-02-08 07:51:53 +01:00
* @return The render thread object or NULL if an error occured
*/
2011-04-18 18:00:08 +02:00
render_thread_t* render_init(zathura_t* zathura);
2011-02-08 07:51:53 +01:00
/**
* This function destroys the render thread object
*
* @param render_thread The render thread object
*/
2011-01-24 12:43:39 +01:00
void render_free(render_thread_t* render_thread);
2011-02-08 07:51:53 +01:00
/**
* This function is used to add a page to the render thread list
* that should be rendered.
*
* @param render_thread The render thread object
* @param page The page that should be rendered
* @return true if no error occured
*/
bool render_page(render_thread_t* render_thread, zathura_page_t* page);
2011-01-24 12:43:39 +01:00
2011-02-09 21:28:36 +01:00
/**
* This function is used to unmark all pages as not rendered. This should
* be used if all pages should be rendered again (e.g.: the zoom level or the
* colors have changed)
2011-04-18 18:00:08 +02:00
*
* @param zathura Zathura object
2011-02-09 21:28:36 +01:00
*/
2011-04-18 18:00:08 +02:00
void render_all(zathura_t* zathura);
2011-02-09 21:28:36 +01:00
/**
* Lock the render thread. This is useful if you want to render on your own (e.g
* for printing).
*
* @param render_thread The render thread object.
*/
void render_lock(render_thread_t* render_thread);
/**
* Unlock the render thread.
*
* @param render_thread The render thread object.
*/
void render_unlock(render_thread_t* render_thread);
2011-01-24 12:43:39 +01:00
#endif // RENDER_H