source: wkhtmltox/trunk/fuentes/src/lib/pdf.h @ 51

Last change on this file since 51 was 51, checked in by mabarracus, 4 years ago

wip

File size: 4.0 KB
Line 
1/* -*- mode: c++; tab-width: 4; indent-tabs-mode: t; eval: (progn (c-set-style "stroustrup") (c-set-offset 'innamespace 0)); -*-
2 * vi:set ts=4 sts=4 sw=4 noet :
3 *
4 * Copyright 2010 wkhtmltopdf authors
5 *
6 * This file is part of wkhtmltopdf.
7 *
8 * wkhtmltopdf is free software: you can redistribute it and/or modify
9 * it under the terms of the GNU Lesser General Public License as published by
10 * the Free Software Foundation, either version 3 of the License, or
11 * (at your option) any later version.
12 *
13 * wkhtmltopdf is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
16 * GNU General Public License for more details.
17 *
18 * You should have received a copy of the GNU Lesser General Public License
19 * along with wkhtmltopdf.  If not, see <http: *www.gnu.org/licenses/>.
20 */
21
22#ifndef __PDF_H__
23#define __PDF_H__
24#include <wkhtmltox/dllbegin.inc>
25
26struct wkhtmltopdf_global_settings;
27typedef struct wkhtmltopdf_global_settings wkhtmltopdf_global_settings;
28
29struct wkhtmltopdf_object_settings;
30typedef struct wkhtmltopdf_object_settings wkhtmltopdf_object_settings;
31
32struct wkhtmltopdf_converter;
33typedef struct wkhtmltopdf_converter wkhtmltopdf_converter;
34
35typedef void (*wkhtmltopdf_str_callback)(wkhtmltopdf_converter * converter, const char * str);
36typedef void (*wkhtmltopdf_int_callback)(wkhtmltopdf_converter * converter, const int val);
37typedef void (*wkhtmltopdf_void_callback)(wkhtmltopdf_converter * converter);
38
39CAPI(int) wkhtmltopdf_init(int use_graphics);
40CAPI(int) wkhtmltopdf_deinit();
41CAPI(int) wkhtmltopdf_extended_qt();
42CAPI(const char *) wkhtmltopdf_version();
43
44CAPI(wkhtmltopdf_global_settings *) wkhtmltopdf_create_global_settings();
45CAPI(void) wkhtmltopdf_destroy_global_settings(wkhtmltopdf_global_settings *);
46
47CAPI(wkhtmltopdf_object_settings *) wkhtmltopdf_create_object_settings();
48CAPI(void) wkhtmltopdf_destroy_object_settings(wkhtmltopdf_object_settings *);
49
50CAPI(int) wkhtmltopdf_set_global_setting(wkhtmltopdf_global_settings * settings, const char * name, const char * value);
51CAPI(int) wkhtmltopdf_get_global_setting(wkhtmltopdf_global_settings * settings, const char * name, char * value, int vs);
52CAPI(int) wkhtmltopdf_set_object_setting(wkhtmltopdf_object_settings * settings, const char * name, const char * value);
53CAPI(int) wkhtmltopdf_get_object_setting(wkhtmltopdf_object_settings * settings, const char * name, char * value, int vs);
54
55
56CAPI(wkhtmltopdf_converter *) wkhtmltopdf_create_converter(wkhtmltopdf_global_settings * settings);
57CAPI(void) wkhtmltopdf_destroy_converter(wkhtmltopdf_converter * converter);
58
59CAPI(void) wkhtmltopdf_set_warning_callback(wkhtmltopdf_converter * converter, wkhtmltopdf_str_callback cb);
60CAPI(void) wkhtmltopdf_set_error_callback(wkhtmltopdf_converter * converter, wkhtmltopdf_str_callback cb);
61CAPI(void) wkhtmltopdf_set_phase_changed_callback(wkhtmltopdf_converter * converter, wkhtmltopdf_void_callback cb);
62CAPI(void) wkhtmltopdf_set_progress_changed_callback(wkhtmltopdf_converter * converter, wkhtmltopdf_int_callback cb);
63CAPI(void) wkhtmltopdf_set_finished_callback(wkhtmltopdf_converter * converter, wkhtmltopdf_int_callback cb);
64/* CAPI(void) wkhtmltopdf_begin_conversion(wkhtmltopdf_converter * converter); */
65/* CAPI(void) wkhtmltopdf_cancel(wkhtmltopdf_converter * converter); */
66CAPI(int) wkhtmltopdf_convert(wkhtmltopdf_converter * converter);
67CAPI(void) wkhtmltopdf_add_object(
68        wkhtmltopdf_converter * converter, wkhtmltopdf_object_settings * setting, const char * data);
69
70CAPI(int) wkhtmltopdf_current_phase(wkhtmltopdf_converter * converter);
71CAPI(int) wkhtmltopdf_phase_count(wkhtmltopdf_converter * converter);
72CAPI(const char *) wkhtmltopdf_phase_description(wkhtmltopdf_converter * converter, int phase);
73CAPI(const char *) wkhtmltopdf_progress_string(wkhtmltopdf_converter * converter);
74CAPI(int) wkhtmltopdf_http_error_code(wkhtmltopdf_converter * converter);
75CAPI(long) wkhtmltopdf_get_output(wkhtmltopdf_converter * converter, const unsigned char **);
76
77#include <wkhtmltox/dllend.inc>
78#endif /*__PDF_H__*/
Note: See TracBrowser for help on using the repository browser.