summaryrefslogtreecommitdiff
path: root/cups/ppd-private.h
diff options
context:
space:
mode:
authormsweet <msweet@a1ca3aef-8c08-0410-bb20-df032aa958be>2010-07-08 20:45:48 +0000
committermsweet <msweet@a1ca3aef-8c08-0410-bb20-df032aa958be>2010-07-08 20:45:48 +0000
commitc7017eccd21da514f345a5c7a41156b1adf7cb35 (patch)
tree155dfe5c7696ab6789d31cc7bfc5eb0874eecb11 /cups/ppd-private.h
parentcc75483441ba4241a6b0079e028d7699d99a6b0f (diff)
downloadcups-c7017eccd21da514f345a5c7a41156b1adf7cb35.tar.gz
Merge changes from CUPS 1.5svn-r9198.
git-svn-id: svn+ssh://src.apple.com/svn/cups/easysw/current@2309 a1ca3aef-8c08-0410-bb20-df032aa958be
Diffstat (limited to 'cups/ppd-private.h')
-rw-r--r--cups/ppd-private.h59
1 files changed, 57 insertions, 2 deletions
diff --git a/cups/ppd-private.h b/cups/ppd-private.h
index 2867fc83e..3b2d3aa1a 100644
--- a/cups/ppd-private.h
+++ b/cups/ppd-private.h
@@ -31,6 +31,7 @@
* Include necessary headers...
*/
+# include <cups/cups.h>
# include <cups/ppd.h>
# include "pwg-private.h"
@@ -45,9 +46,16 @@ extern "C" {
/*
- * Structures...
+ * Types and structures...
*/
+typedef enum _ppd_parse_e /**** Selector for _ppdParseOptions ****/
+{
+ _PPD_PARSE_OPTIONS, /* Parse only the options */
+ _PPD_PARSE_PROPERTIES, /* Parse only the properties */
+ _PPD_PARSE_ALL /* Parse everything */
+} _ppd_parse_t;
+
typedef struct _ppd_cups_uiconst_s /**** Constraint from cupsUIConstraints ****/
{
ppd_option_t *option; /* Constrained option */
@@ -63,6 +71,49 @@ typedef struct _ppd_cups_uiconsts_s /**** cupsUIConstraints ****/
_ppd_cups_uiconst_t *constraints; /* Constraints */
} _ppd_cups_uiconsts_t;
+typedef enum _pwg_output_mode_e /**** PWG output-mode indices ****/
+{
+ _PWG_OUTPUT_MODE_MONOCHROME = 0, /* output-mode=monochrome */
+ _PWG_OUTPUT_MODE_COLOR, /* output-mode=color */
+ _PWG_OUTPUT_MODE_MAX
+} _pwg_output_mode_t;
+
+typedef enum _pwg_print_quality_e /**** PWG print-quality indices ****/
+{
+ _PWG_PRINT_QUALITY_DRAFT = 0, /* print-quality=3 */
+ _PWG_PRINT_QUALITY_NORMAL, /* print-quality=4 */
+ _PWG_PRINT_QUALITY_HIGH, /* print-quality=5 */
+ _PWG_PRINT_QUALITY_MAX
+} _pwg_print_quality_t;
+
+typedef struct _pwg_s /**** PWG-PPD conversion data ****/
+{
+ int num_bins; /* Number of output bins */
+ _pwg_map_t *bins; /* Output bins */
+ int num_sizes; /* Number of media sizes */
+ _pwg_size_t *sizes; /* Media sizes */
+ int custom_max_width, /* Maximum custom width in 2540ths */
+ custom_max_length, /* Maximum custom length in 2540ths */
+ custom_min_width, /* Minimum custom width in 2540ths */
+ custom_min_length; /* Minimum custom length in 2540ths */
+ char *custom_max_keyword, /* Maximum custom size PWG keyword */
+ *custom_min_keyword, /* Minimum custom size PWG keyword */
+ custom_ppd_size[41]; /* Custom PPD size name */
+ _pwg_size_t custom_size; /* Custom size record */
+ int num_sources; /* Number of media sources */
+ _pwg_map_t *sources; /* Media sources */
+ int num_types; /* Number of media types */
+ _pwg_map_t *types; /* Media types */
+ int num_presets[_PWG_OUTPUT_MODE_MAX][_PWG_PRINT_QUALITY_MAX];
+ /* Number of output-mode/print-quality options */
+ cups_option_t *presets[_PWG_OUTPUT_MODE_MAX][_PWG_PRINT_QUALITY_MAX];
+ /* output-mode/print-quality options */
+ char *sides_option, /* PPD option for sides */
+ *sides_1sided, /* Choice for one-sided */
+ *sides_2sided_long, /* Choice for two-sided-long-edge */
+ *sides_2sided_short; /* Choice for two-sided-short-edge */
+} _pwg_t;
+
/*
* Prototypes...
@@ -78,8 +129,11 @@ extern char *_ppdNormalizeMakeAndModel(const char *make_and_model,
char *buffer,
size_t bufsize);
extern int _ppdParseOptions(const char *s, int num_options,
- cups_option_t **options);
+ cups_option_t **options,
+ _ppd_parse_t which);
+extern _pwg_t *_pwgCreateWithFile(const char *filename);
extern _pwg_t *_pwgCreateWithPPD(ppd_file_t *ppd);
+extern void _pwgDestroy(_pwg_t *pwg);
extern const char *_pwgGetBin(_pwg_t *pwg, const char *output_bin);
extern const char *_pwgGetInputSlot(_pwg_t *pwg, ipp_t *job,
const char *keyword);
@@ -98,6 +152,7 @@ extern const char *_pwgMediaTypeForType(const char *media_type,
char *name, size_t namesize);
extern const char *_pwgPageSizeForMedia(_pwg_media_t *media,
char *name, size_t namesize);
+extern int _pwgWriteFile(_pwg_t *pwg, const char *filename);
/*