1 /* 2 * Common filter definitions for CUPS. 3 * 4 * Copyright 2007-2011 by Apple Inc. 5 * Copyright 1997-2006 by Easy Software Products. 6 * 7 * These coded instructions, statements, and computer programs are the 8 * property of Apple Inc. and are protected by Federal copyright 9 * law. Distribution and use rights are outlined in the file "COPYING" 10 * which should have been included with this file. 11 */ 12 13 /* 14 * Include necessary headers... 15 */ 16 17 #include <config.h> 18 #include <cups/cups.h> 19 #include <cups/ppd.h> 20 #include <time.h> 21 #include <string.h> 22 #include <ctype.h> 23 #include <errno.h> 24 25 26 /* 27 * C++ magic... 28 */ 29 30 #ifdef __cplusplus 31 extern "C" { 32 #endif /* __cplusplus */ 33 34 35 /* 36 * Globals... 37 */ 38 39 extern int Orientation, /* 0 = portrait, 1 = landscape, etc. */ 40 Duplex, /* Duplexed? */ 41 LanguageLevel, /* Language level of printer */ 42 ColorDevice; /* Do color text? */ 43 extern float PageLeft, /* Left margin */ 44 PageRight, /* Right margin */ 45 PageBottom, /* Bottom margin */ 46 PageTop, /* Top margin */ 47 PageWidth, /* Total page width */ 48 PageLength; /* Total page length */ 49 50 51 /* 52 * Prototypes... 53 */ 54 55 extern ppd_file_t *SetCommonOptions(int num_options, cups_option_t *options, 56 int change_size); 57 extern void UpdatePageVars(void); 58 extern void WriteCommon(void); 59 extern void WriteLabelProlog(const char *label, float bottom, 60 float top, float width); 61 extern void WriteLabels(int orient); 62 extern void WriteTextComment(const char *name, const char *value); 63 64 65 /* 66 * C++ magic... 67 */ 68 69 #ifdef __cplusplus 70 } 71 #endif /* __cplusplus */ 72 73