]> git.ipfire.org Git - thirdparty/cups.git/blob - driver/pcl-common.h
Merge changes from CUPS 1.5.1-r9875.
[thirdparty/cups.git] / driver / pcl-common.h
1 /*
2 * "$Id$"
3 *
4 * Common HP-PCL definitions for CUPS.
5 *
6 * Copyright 2007-2010 by Apple Inc.
7 * Copyright 1993-2005 by Easy Software Products, All Rights Reserved.
8 *
9 * These coded instructions, statements, and computer programs are the
10 * property of Apple Inc. and are protected by Federal copyright
11 * law. Distribution and use rights are outlined in the file "LICENSE.txt"
12 * which should have been included with this file. If this file is
13 * file is missing or damaged, see the license at "http://www.cups.org/".
14 */
15
16 /*
17 * Include necessary headers...
18 */
19
20 #include <cups/string-private.h>
21 #include "data/pcl.h"
22
23
24 /*
25 * Functions/macros...
26 */
27
28 #define pcl_reset()\
29 printf("\033E")
30 #define pcl_set_copies(copies)\
31 printf("\033&l%dX", (copies))
32 #define pcl_set_pcl_mode(m)\
33 printf("\033%%%dA", (m))
34 #define pcl_set_hpgl_mode(m)\
35 printf("\033%%%dB", (m))
36 #define pcl_set_negative_motion()\
37 printf("\033&a1N")
38 #define pcl_set_media_source(source)\
39 printf("\033&l%dH", source)
40 #define pcl_set_media_type(type)\
41 printf("\033&l%dM", type)
42 #define pcl_set_duplex(duplex,landscape)\
43 if (duplex) printf("\033&l%dS", (duplex) + (landscape))
44 #define pcl_set_simple_black()\
45 printf("\033*r-1U")
46 #define pcl_set_simple_color()\
47 printf("\033*r3U")
48 #define pcl_set_simple_cmy()\
49 printf("\033*r-3U")
50 #define pcl_set_simple_kcmy()\
51 printf("\033*r-4U")
52 #define pcl_set_simple_resolution(r)\
53 printf("\033*t%dR", (r))
54
55 #define pjl_escape()\
56 printf("\033%%-12345X@PJL\r\n")
57 #define pjl_set_job(job_id,user,title)\
58 printf("@PJL JOB NAME = \"%s\" DISPLAY = \"%d %s %s\"\r\n", \
59 (title), (job_id), (user), (title))
60 #define pjl_enter_language(lang)\
61 printf("@PJL ENTER LANGUAGE=%s\r\n", (lang))
62
63 extern void pcl_set_media_size(ppd_file_t *ppd, float width, float length);
64 extern void pjl_write(ppd_file_t *ppd, const char *format,
65 const char *value, int job_id,
66 const char *user, const char *title,
67 int num_options, cups_option_t *options);
68
69 /*
70 * End of "$Id$".
71 */