]> www.fi.muni.cz Git - evince.git/blob - impress/internal.h
Do not include ev-poppler.h when pdf is disabled.
[evince.git] / impress / internal.h
1 /* imposter (OO.org Impress viewer)
2 ** Copyright (C) 2003-2005 Gurer Ozen
3 ** This code is free software; you can redistribute it and/or
4 ** modify it under the terms of GNU General Public License.
5 */
6
7 #include "zip.h"
8
9 #ifndef INTERNAL_H
10 #define INTERNAL_H
11
12 struct ImpDoc_struct {
13         ikstack *stack;
14         zip *zfile;
15         iks *content;
16         iks *styles;
17         iks *meta;
18         ImpPage *pages;
19         ImpPage *last_page;
20         int nr_pages;
21         void (*get_geometry)(ImpRenderCtx *ctx);
22         void (*render_page)(ImpRenderCtx *ctx, void *drw_data);
23 };
24
25 struct ImpPage_struct {
26         struct ImpPage_struct *next;
27         struct ImpPage_struct *prev;
28         ImpDoc *doc;
29         iks *page;
30         const char *name;
31         int nr;
32 };
33
34 struct ImpRenderCtx_struct {
35         const ImpDrawer *drw;
36         ImpPage *page;
37         iks *content;
38         iks *styles;
39         iks *last_element;
40         int step;
41         int pix_w, pix_h;
42         double cm_w, cm_h;
43         double fact_x, fact_y;
44 };
45
46 char *r_get_style (ImpRenderCtx *ctx, iks *node, char *attr);
47 int r_get_color(ImpRenderCtx *ctx, iks *node, char *name, ImpColor *ic);
48 void r_parse_color(const char *color, ImpColor *ic);
49 int r_get_x (ImpRenderCtx *ctx, iks *node, char *name);
50 int r_get_y (ImpRenderCtx *ctx, iks *node, char *name);
51 int r_get_angle (iks *node, char *name, int def);
52
53 enum {
54         IMP_LE_NONE = 0,
55         IMP_LE_ARROW,
56         IMP_LE_SQUARE,
57         IMP_LE_DIMENSION,
58         IMP_LE_DOUBLE_ARROW,
59         IMP_LE_SMALL_ARROW,
60         IMP_LE_ROUND_ARROW,
61         IMP_LE_SYM_ARROW,
62         IMP_LE_LINE_ARROW,
63         IMP_LE_ROUND_LARGE_ARROW,
64         IMP_LE_CIRCLE,
65         IMP_LE_SQUARE_45,
66         IMP_LE_CONCAVE_ARROW
67 };
68
69 void _imp_draw_rect(ImpRenderCtx *ctx, void *drw_data, int fill, int x, int y, int w, int h, int round);
70 void _imp_draw_line_end(ImpRenderCtx *ctx, void *drw_data, int type, int size, int x, int y, int x2, int y2);
71 void _imp_draw_image(ImpRenderCtx *ctx, void *drw_data, const char *name, int x, int y, int w, int h);
72 void _imp_tile_image(ImpRenderCtx *ctx, void *drw_data, const char *name, int x, int y, int w, int h);
73
74 int _imp_fill_back(ImpRenderCtx *ctx, void *drw_data, iks *node);
75 void r_text(ImpRenderCtx *ctx, void *drw_data, iks *node);
76 void r_polygon(ImpRenderCtx *ctx, void *drw_data, iks *node);
77 void r_circle(ImpRenderCtx *ctx, void *drw_data, iks *node);
78 void r_polyline(ImpRenderCtx *ctx, void *drw_data, iks *node);
79 void r_draw_gradient (ImpRenderCtx *ctx, void *drw_data, iks *node);
80
81 int _imp_oo13_load(ImpDoc *doc);
82 int _imp_oasis_load(ImpDoc *doc);
83
84
85 #endif  /* INTERNAL_H */