]>
git.ipfire.org Git - thirdparty/cups.git/blob - filter/form.h
2 * "$Id: form.h 6649 2007-07-11 21:46:42Z mike $"
4 * CUPS form header file for the Common UNIX Printing System (CUPS).
6 * Copyright 2007 by Apple Inc.
7 * Copyright 1997-2005 by Easy Software Products.
9 * These coded instructions, statements, and computer programs are the
10 * property of Apple Inc. and are protected by Federal copyright
11 * law. Distribution and use rights are outlined in the file "LICENSE.txt"
12 * which should have been included with this file. If this file is
13 * file is missing or damaged, see the license at "http://www.cups.org/".
15 * This file is subject to the Apple OS-Developed Software exception.
19 * Include necessary headers...
31 ELEMENT_FILE
= -1, /* Pseudo element, not in file, but above */
32 ELEMENT_FRAGMENT
, /* Text fragment */
33 ELEMENT_COMMENT
, /* <!-- .... --> */
107 * Attribute structure...
112 char *name
, /* Name of attribute */
113 *value
; /* Value of attribute */
118 * Form document tree structure...
121 typedef struct tree_str
123 struct tree_str
*prev
, /* Previous tree node */
124 *next
, /* Next tree node */
125 *parent
, /* Parent tree node */
126 *child
, /* First child node */
127 *last_child
; /* Last child node */
128 element_t element
; /* Element type */
129 float x
, y
, w
, h
; /* Position and size in points */
130 float bg
[3], fg
[3]; /* Colors of element */
131 float thickness
; /* Thickness of lines */
132 int preformatted
; /* Preformatted text? */
133 float size
; /* Height of text in points */
134 char *typeface
; /* Typeface of text */
135 style_t style
; /* Style of text */
136 halign_t halign
; /* Horizontal alignment */
137 valign_t valign
; /* Vertical alignment */
138 dir_t dir
; /* Direction of text */
139 int num_attrs
; /* Number of attributes */
140 attr_t
*attrs
; /* Attributes */
141 void *data
; /* Text fragment data */
149 extern int NumOptions
; /* Number of command-line options */
150 extern cups_option_t
*Options
; /* Command-line options */
151 extern ppd_file_t
*PPD
; /* PPD file */
158 extern void formDelete(tree_t
*t
);
159 extern char *formGetAttr(tree_t
*t
, const char *name
);
160 extern tree_t
*formNew(tree_t
*p
);
161 extern tree_t
*formRead(FILE *fp
, tree_t
*p
);
162 extern void formSetAttr(tree_t
*t
, const char *name
, const char *value
);
163 extern void formWrite(tree_t
*p
);
167 * End of "$Id: form.h 6649 2007-07-11 21:46:42Z mike $".