• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  * Common filter definitions for CUPS.
3  *
4  * Copyright © 2020-2024 by OpenPrinting.
5  * Copyright 2007-2010 by Apple Inc.
6  * Copyright 1997-2006 by Easy Software Products.
7  *
8  * Licensed under Apache License v2.0.  See the file "LICENSE" for more information.
9  */
10 
11 /*
12  * Include necessary headers...
13  */
14 
15 #include <cups/string-private.h>
16 #include <cups/cups.h>
17 #include <cups/ppd.h>
18 #include <time.h>
19 
20 
21 /*
22  * C++ magic...
23  */
24 
25 #ifdef __cplusplus
26 extern "C" {
27 #endif /* __cplusplus */
28 
29 
30 /*
31  * Globals...
32  */
33 
34 extern int	Orientation,	/* 0 = portrait, 1 = landscape, etc. */
35 		Duplex,		/* Duplexed? */
36 		LanguageLevel,	/* Language level of printer */
37 		ColorDevice;	/* Do color text? */
38 extern float	PageLeft,	/* Left margin */
39 		PageRight,	/* Right margin */
40 		PageBottom,	/* Bottom margin */
41 		PageTop,	/* Top margin */
42 		PageWidth,	/* Total page width */
43 		PageLength;	/* Total page length */
44 
45 
46 /*
47  * Prototypes...
48  */
49 
50 extern ppd_file_t *SetCommonOptions(int num_options, cups_option_t *options,
51 		                    int change_size);
52 extern void	UpdatePageVars(void);
53 extern void	WriteCommon(void);
54 extern void	WriteLabelProlog(const char *label, float bottom,
55 		                 float top, float width);
56 extern void	WriteLabels(int orient);
57 extern void	WriteTextComment(const char *name, const char *value);
58 
59 
60 /*
61  * C++ magic...
62  */
63 
64 #ifdef __cplusplus
65 }
66 #endif /* __cplusplus */
67