summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorTor Andersson <tor.andersson@artifex.com>2014-11-26 02:14:34 +0100
committerTor Andersson <tor.andersson@artifex.com>2014-12-03 12:25:52 +0100
commit673f6e7149c3c5b0e2a1fe334c3b04124fc807c6 (patch)
tree0009993139bd79dcaf3a3ed867b759069ef6433e /include
parentcf42f2f4d5e95b7254479e80614d1814e74e2387 (diff)
downloadmupdf-673f6e7149c3c5b0e2a1fe334c3b04124fc807c6.tar.xz
html: Clean up some names.
Diffstat (limited to 'include')
-rw-r--r--include/mupdf/html.h21
1 files changed, 9 insertions, 12 deletions
diff --git a/include/mupdf/html.h b/include/mupdf/html.h
index abc6cac0..16036144 100644
--- a/include/mupdf/html.h
+++ b/include/mupdf/html.h
@@ -3,22 +3,19 @@
#include "mupdf/fitz.h"
-typedef struct html_context_s html_context;
+typedef struct fz_html_font_set_s fz_html_font_set;
-struct html_context_s
+struct fz_html_font_set_s
{
- fz_archive *zip;
fz_font *fonts[16];
- float page_w, page_h, em;
};
-void html_init(fz_context *ctx, html_context *htx, fz_archive *zip);
-void html_fini(fz_context *ctx, html_context *htx);
-void html_rebind(html_context *htx, fz_context *ctx);
+fz_html_font_set *fz_new_html_font_set(fz_context *ctx);
+void fz_free_html_font_set(fz_context *ctx, fz_html_font_set *htx);
-struct box *html_generate(fz_context *ctx, html_context *htx, const char *base_uri, fz_buffer *buf);
-void html_layout(fz_context *ctx, html_context *htx, struct box *box, float w, float h, float em);
-void html_draw(fz_context *ctx, html_context *htx, struct box *box, float page_top, float page_bot, fz_device *dev, const fz_matrix *ctm);
+struct box *fz_generate_html(fz_context *ctx, fz_html_font_set *htx, fz_archive *zip, const char *base_uri, fz_buffer *buf);
+void fz_layout_html(fz_context *ctx, struct box *box, float w, float h, float em);
+void fz_draw_html(fz_context *ctx, struct box *box, float page_top, float page_bot, fz_device *dev, const fz_matrix *ctm);
enum
{
@@ -134,11 +131,11 @@ struct computed_style
void apply_styles(fz_context *ctx, struct style *style, struct rule *rule, fz_xml *node);
void default_computed_style(struct computed_style *cstyle);
-void compute_style(fz_context *ctx, html_context *htx, struct computed_style *cstyle, struct style *style);
+void compute_style(fz_context *ctx, fz_html_font_set *set, struct computed_style *cstyle, struct style *style);
float from_number(struct number, float em, float width);
float from_number_scale(struct number number, float scale, float em, float width);
-fz_font *html_load_font(fz_context *ctx, html_context *htx,
+fz_font *fz_html_load_font(fz_context *ctx, fz_html_font_set *set,
const char *family, const char *variant, const char *style, const char *weight);
enum