• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2 Copyright (c) 2014, Joseph Simon
3 
4 Permission is hereby granted, free of charge, to any person obtaining
5 a copy of this software and associated documentation files (the
6 "Software"), to deal in the Software without restriction, including
7 without limitation the rights to use, copy, modify, merge, publish,
8 distribute, sublicense, and/or sell copies of the Software, and to
9 permit persons to whom the Software is furnished to do so, subject to
10 the following conditions:
11 
12 The above copyright notice and this permission notice shall be included
13 in all copies or substantial portions of the Software.
14 
15 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
16 EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
17 MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
18 IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
19 CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
20 TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
21 SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
22 
23 MIT Open Source License  -  http://www.opensource.org/
24 
25 */
26 
27 
28 #ifndef _CUPS_FILTERS_COLORMANAGER_H_
29 #  define _CUPS_FILTERS_COLORMANAGER_H_
30 
31 
32 /* "Color Manager" -- Color management interface for cups-filters */
33 
34 
35 #  ifdef __cplusplus
36 extern "C" {
37 #  endif /* __cplusplus */
38 
39 
40 #include <cups/raster.h>
41 #include <cups/ppd.h>
42 
43 
44 
45 #define CM_CALIBRATION_STRING "cm-calibration"       /* String for "Color Calibration Mode" */
46 
47 
48 /* Enum for status of CUPS color calibration */
49 typedef enum cm_calibration_e
50 {
51   CM_CALIBRATION_DISABLED = 0,                       /* "cm-calibration" option not found */
52   CM_CALIBRATION_ENABLED = 1                         /* "cm-calibration" found */
53 } cm_calibration_t;
54 
55 
56 
57 /*
58  * Prototypes
59  */
60 
61 
62 extern
63 cm_calibration_t    cmGetCupsColorCalibrateMode       (cups_option_t *options,
64                                                        int num_options);
65 
66 extern int          cmGetPrinterIccProfile            (const char *printer_id,
67                                                        char **icc_profile,
68                                                        ppd_file_t *ppd);
69 
70 extern int          cmIsPrinterCmDisabled             (const char *printer_id);
71 
72 extern double*      cmGammaAdobeRgb                   (void);
73 extern double*      cmGammaSGray                      (void);
74 
75 extern double*      cmWhitePointAdobeRgb              (void);
76 extern double*      cmWhitePointSGray                 (void);
77 
78 extern double*      cmMatrixAdobeRgb                  (void);
79 extern double*      cmBlackPointDefault               (void);
80 
81 
82 
83 #  ifdef __cplusplus
84 }
85 #  endif /* __cplusplus */
86 
87 #endif /* !_CUPS_FILTERS_COLORMANAGER_H_ */
88