]>
git.ipfire.org Git - thirdparty/cups.git/blob - filter/form.h
2 * "$Id: form.h 4494 2005-02-18 02:18:11Z mike $"
4 * CUPS form header file for the Common UNIX Printing System (CUPS).
6 * Copyright 1997-2005 by Easy Software Products.
8 * These coded instructions, statements, and computer programs are the
9 * property of Easy Software Products and are protected by Federal
10 * copyright law. Distribution and use rights are outlined in the file
11 * "LICENSE.txt" which should have been included with this file. If this
12 * file is missing or damaged please contact Easy Software Products
15 * Attn: CUPS Licensing Information
16 * Easy Software Products
17 * 44141 Airport View Drive, Suite 204
18 * Hollywood, Maryland 20636 USA
20 * Voice: (301) 373-9600
21 * EMail: cups-info@cups.org
22 * WWW: http://www.cups.org
24 * This file is subject to the Apple OS-Developed Software exception.
28 * Include necessary headers...
40 ELEMENT_FILE
= -1, /* Pseudo element, not in file, but above */
41 ELEMENT_FRAGMENT
, /* Text fragment */
42 ELEMENT_COMMENT
, /* <!-- .... --> */
116 * Attribute structure...
121 char *name
, /* Name of attribute */
122 *value
; /* Value of attribute */
127 * Form document tree structure...
130 typedef struct tree_str
132 struct tree_str
*prev
, /* Previous tree node */
133 *next
, /* Next tree node */
134 *parent
, /* Parent tree node */
135 *child
, /* First child node */
136 *last_child
; /* Last child node */
137 element_t element
; /* Element type */
138 float x
, y
, w
, h
; /* Position and size in points */
139 float bg
[3], fg
[3]; /* Colors of element */
140 float thickness
; /* Thickness of lines */
141 int preformatted
; /* Preformatted text? */
142 float size
; /* Height of text in points */
143 char *typeface
; /* Typeface of text */
144 style_t style
; /* Style of text */
145 halign_t halign
; /* Horizontal alignment */
146 valign_t valign
; /* Vertical alignment */
147 dir_t dir
; /* Direction of text */
148 int num_attrs
; /* Number of attributes */
149 attr_t
*attrs
; /* Attributes */
150 void *data
; /* Text fragment data */
158 extern int NumOptions
; /* Number of command-line options */
159 extern cups_option_t
*Options
; /* Command-line options */
160 extern ppd_file_t
*PPD
; /* PPD file */
167 extern void formDelete(tree_t
*t
);
168 extern char *formGetAttr(tree_t
*t
, const char *name
);
169 extern tree_t
*formNew(tree_t
*p
);
170 extern tree_t
*formRead(FILE *fp
, tree_t
*p
);
171 extern void formSetAttr(tree_t
*t
, const char *name
, const char *value
);
172 extern void formWrite(tree_t
*p
);
176 * End of "$Id: form.h 4494 2005-02-18 02:18:11Z mike $".