1 /* viewer-render.c: Common code for rendering in viewers
3 * Copyright (C) 1999, 2004 Red Hat Software
4 * Copyright (C) 2001 Sun Microsystems
6 * This library is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU Library General Public
8 * License as published by the Free Software Foundation; either
9 * version 2 of the License, or (at your option) any later version.
11 * This library is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 * Library General Public License for more details.
16 * You should have received a copy of the GNU Library General Public
17 * License along with this library; if not, write to the
18 * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
19 * Boston, MA 02111-1307, USA.
21 #ifndef VIEWER_RENDER_H
22 #define VIEWER_RENDER_H
24 #include <pango/pango-layout.h>
35 typedef void (*RenderCallback) (PangoLayout *layout,
40 typedef void (*TransformCallback) (PangoContext *context,
41 PangoMatrix *transform,
45 void fail (const char *format, ...) G_GNUC_PRINTF (1, 2) G_GNUC_NORETURN;
47 void parse_options (int argc,
49 void do_output (PangoContext *context,
50 RenderCallback render_cb,
51 TransformCallback transform_cb,
57 gchar *get_options_string (void);
59 extern const char *prog_name;
61 /* handled by viewer-render.c */
62 extern const char *opt_font;
63 extern gboolean opt_header;
64 extern int opt_margin;
65 extern int opt_markup;
66 extern gboolean opt_rtl;
67 extern double opt_rotate;
68 extern gboolean opt_auto_dir;
69 extern const char *opt_text;
70 extern gboolean opt_waterfall;
72 extern int opt_indent;
73 extern PangoEllipsizeMode opt_ellipsize;
74 extern const char *opt_pangorc;
76 /* handled by viewer-main.c */
77 extern gboolean opt_display;
78 extern const char *opt_output;
80 extern const PangoViewer *opt_viewer;
82 /* handled by backend-specific code */
84 extern HintMode opt_hinting;
85 extern PangoColor opt_fg_color;
86 extern guint16 opt_fg_alpha;
87 extern gboolean opt_bg_set;
88 extern PangoColor opt_bg_color;
89 extern guint16 opt_bg_alpha;
91 #endif /* VIEWER_RENDER_H */