]> git.ipfire.org Git - thirdparty/cups.git/blobdiff - cups/pwg-private.h
Merge changes from CUPS 1.5svn-r9198.
[thirdparty/cups.git] / cups / pwg-private.h
index 05ab28e5350c013d00de881ac8efda3b564712cb..33a0790aff4fe8a8c56051411009eea85537f01c 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * "$Id$"
  *
- *   PWG media API definitions for CUPS.
+ *   Private PWG media API definitions for CUPS.
  *
  *   Copyright 2009-2010 by Apple Inc.
  *
@@ -48,6 +48,12 @@ extern "C" {
  * Types and structures...
  */
 
+typedef struct _pwg_map_s              /**** Map element - PPD to/from PWG */
+{
+  char         *pwg,                   /* PWG media keyword */
+               *ppd;                   /* PPD option keyword */
+} _pwg_map_t;
+
 typedef struct _pwg_media_s            /**** Common media size data ****/
 {
   const char   *pwg,                   /* PWG 5101.1 "self describing" name */
@@ -57,12 +63,6 @@ typedef struct _pwg_media_s          /**** Common media size data ****/
                length;                 /* Length in 2540ths */
 } _pwg_media_t;
 
-typedef struct _pwg_map_s              /**** Map element - PPD to/from PWG */
-{
-  char         *pwg,                   /* PWG media keyword */
-               *ppd;                   /* PPD option keyword */
-} _pwg_map_t;
-
 typedef struct _pwg_size_s             /**** Size element - PPD to/from PWG */
 {
   _pwg_map_t   map;                    /* Map element */
@@ -74,59 +74,20 @@ typedef struct _pwg_size_s          /**** Size element - PPD to/from PWG */
                top;                    /* Top margin in 2540ths */
 } _pwg_size_t;
 
-typedef struct _pwg_s                  /**** PWG-PPD conversion data ****/
-{
-  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[PPD_MAX_NAME];
-                                       /* 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 */
-} _pwg_t;
-
 
 /*
  * Functions...
  */
 
-extern _pwg_t          *_pwgCreateWithFile(const char *filename);
-extern _pwg_t          *_pwgCreateWithPPD(ppd_file_t *ppd);
-extern void            _pwgDestroy(_pwg_t *pwg);
 extern void            _pwgGenerateSize(char *keyword, size_t keysize,
                                         const char *prefix,
-                                        const char *ppdname,
+                                        const char *name,
                                         int width, int length);
-extern const char      *_pwgGetInputSlot(_pwg_t *pwg, ipp_t *job,
-                                         const char *keyword);
-extern const char      *_pwgGetMediaType(_pwg_t *pwg, ipp_t *job,
-                                         const char *keyword);
-extern const char      *_pwgGetPageSize(_pwg_t *pwg, ipp_t *job,
-                                        const char *keyword, int *exact);
-extern _pwg_size_t     *_pwgGetSize(_pwg_t *pwg, const char *page_size);
-extern const char      *_pwgGetSource(_pwg_t *pwg, const char *input_slot);
-extern const char      *_pwgGetType(_pwg_t *pwg, const char *media_type);
 extern int             _pwgInitSize(_pwg_size_t *size, ipp_t *job,
                                     int *margins_set);
-extern const char      *_pwgInputSlotForSource(const char *media_source,
-                                               char *name, size_t namesize);
 extern _pwg_media_t    *_pwgMediaForLegacy(const char *legacy);
-extern _pwg_media_t    *_pwgMediaForPPD(const char *ppd);
 extern _pwg_media_t    *_pwgMediaForPWG(const char *pwg);
 extern _pwg_media_t    *_pwgMediaForSize(int width, int length);
-extern const char      *_pwgMediaTypeForType(const char *media_source,
-                                             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);
 
 
 #  ifdef __cplusplus