File: fo-libfo-context.h

package info (click to toggle)
xmlroff 0.6.2-1
  • links: PTS, VCS
  • area: main
  • in suites: squeeze
  • size: 36,456 kB
  • ctags: 25,964
  • sloc: ansic: 178,200; xml: 109,155; sh: 8,973; makefile: 1,331; perl: 30
file content (95 lines) | stat: -rw-r--r-- 3,950 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
/* Fo
 * fo-libfo-context.h: 'FoLibfoContext' object type
 *
 * Copyright (C) 2003 Sun Microsystems
 * Copyright (C) 2007-2008 Menteith Consulting Ltd
 *
 * See COPYING for the status of this software.
 */

#ifndef __FO_LIBFO_CONTEXT_H__
#define __FO_LIBFO_CONTEXT_H__

#include <libfo/fo-utils.h>

G_BEGIN_DECLS

/**
 * FoFlagsFormat:
 * @FO_FLAG_FORMAT_UNKNOWN:    Invalid format
 * @FO_FLAG_FORMAT_AUTO:       Choose based on output file name or other heuristic
 * @FO_FLAG_FORMAT_PDF:        PDF
 * @FO_FLAG_FORMAT_POSTSCRIPT: PostScript
 * @FO_FLAG_FORMAT_SVG:        SVG
 *
 * Output file format.  Used both for specifying which format to use
 * and to identify formats supported by a particular backend.
 */
typedef enum {
  FO_FLAG_FORMAT_UNKNOWN = 0,
  FO_FLAG_FORMAT_AUTO = 1 << 0,
  FO_FLAG_FORMAT_PDF = 1 << 1,
  FO_FLAG_FORMAT_POSTSCRIPT = 1 << 2,
  FO_FLAG_FORMAT_SVG = 1 << 3
} FoFlagsFormat;

GType fo_flags_format_get_type (void);
#define FO_TYPE_FLAGS_FORMAT fo_flags_format_get_type ()

/**
 * FoEnumFontEmbed:
 * @FO_ENUM_FONT_EMBED_INVALID: Invalid category
 * @FO_ENUM_FONT_EMBED_ALL:     Embed all fonts
 * @FO_ENUM_FONT_EMBED_NONBASE: Embed all fonts except the PostScript base fonts
 * @FO_ENUM_FONT_EMBED_NONE:    Do not embed any fonts
 *
 * Which categories of fonts to embed in the output file, useful only
 * where the output format and the backend both support control of
 * embedding or not embedding those fonts.
 */
typedef enum {
  FO_ENUM_FONT_EMBED_INVALID,
  FO_ENUM_FONT_EMBED_ALL,
  FO_ENUM_FONT_EMBED_NONBASE,
  FO_ENUM_FONT_EMBED_NONE
} FoEnumFontEmbed;

GType fo_enum_font_embed_get_type (void);
#define FO_TYPE_ENUM_FONT_EMBED fo_enum_font_embed_get_type ()

#define FO_TYPE_LIBFO_CONTEXT              (fo_libfo_context_get_type ())
#define FO_LIBFO_CONTEXT(object)           (G_TYPE_CHECK_INSTANCE_CAST ((object), FO_TYPE_LIBFO_CONTEXT, FoLibfoContext))
#define FO_LIBFO_CONTEXT_CLASS(klass)      (G_TYPE_CHECK_CLASS_CAST ((klass), FO_TYPE_LIBFO_CONTEXT, FoLibfoContextClass))
#define FO_IS_LIBFO_CONTEXT(object)        (G_TYPE_CHECK_INSTANCE_TYPE ((object), FO_TYPE_LIBFO_CONTEXT))
#define FO_IS_LIBFO_CONTEXT_CLASS(klass)   (G_TYPE_CHECK_CLASS_TYPE ((klass), FO_TYPE_LIBFO_CONTEXT))
#define FO_LIBFO_CONTEXT_GET_CLASS(obj)    (G_TYPE_INSTANCE_GET_CLASS ((obj), FO_TYPE_LIBFO_CONTEXT, FoLibfoContextClass))


typedef struct _FoLibfoContext FoLibfoContext;
typedef struct _FoLibfoContextClass FoLibfoContextClass;

GType            fo_libfo_context_get_type (void) G_GNUC_CONST;
FoLibfoContext * fo_libfo_context_new (void);

FoFlagsFormat   fo_libfo_context_get_format               (FoLibfoContext *libfo_context);
void            fo_libfo_context_set_format               (FoLibfoContext *libfo_context,
							   FoFlagsFormat   format);
FoEnumFontEmbed fo_libfo_context_get_font_embed           (FoLibfoContext *libfo_context);
void            fo_libfo_context_set_font_embed           (FoLibfoContext *libfo_context,
							   FoEnumFontEmbed font_embed);
gboolean        fo_libfo_context_get_validation           (FoLibfoContext *libfo_context);
void            fo_libfo_context_set_validation           (FoLibfoContext *libfo_context,
							   gboolean        validation);
gboolean        fo_libfo_context_get_continue_after_error (FoLibfoContext *libfo_context);
void            fo_libfo_context_set_continue_after_error (FoLibfoContext *libfo_context,
							   gboolean        continue_after_error);
FoDebugFlag     fo_libfo_context_get_debug_mode           (FoLibfoContext *libfo_context);
void            fo_libfo_context_set_debug_mode           (FoLibfoContext *libfo_context,
							   FoDebugFlag     debug_mode);
FoWarningFlag   fo_libfo_context_get_warning_mode         (FoLibfoContext *libfo_context);
void            fo_libfo_context_set_warning_mode         (FoLibfoContext *libfo_context,
							   FoWarningFlag   warning_mode);

G_END_DECLS

#endif /* !__FO_LIBFO_CONTEXT_H__ */