1 /* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- 2 * 3 * Copyright (C) 2010-2015 Richard Hughes <richard@hughsie.com> 4 * 5 * Licensed under the GNU Lesser General Public License Version 2.1 6 * 7 * This library is free software; you can redistribute it and/or 8 * modify it under the terms of the GNU Lesser General Public 9 * License as published by the Free Software Foundation; either 10 * version 2.1 of the License, or (at your option) any later version. 11 * 12 * This library is distributed in the hope that it will be useful, 13 * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 15 * Lesser General Public License for more details. 16 * 17 * You should have received a copy of the GNU Lesser General Public 18 * License along with this library; if not, write to the Free Software 19 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 20 */ 21 22 #if !defined (__COLORD_H_INSIDE__) && !defined (CD_COMPILATION) 23 #error "Only <colord.h> can be included directly." 24 #endif 25 26 #ifndef __CD_ENUM_H 27 #define __CD_ENUM_H 28 29 #include <glib-object.h> 30 31 G_BEGIN_DECLS 32 33 /** 34 * CdDeviceKind: 35 * 36 * The device type. 37 **/ 38 typedef enum { 39 CD_DEVICE_KIND_UNKNOWN, /* Since: 0.1.0 */ 40 CD_DEVICE_KIND_DISPLAY, /* Since: 0.1.0 */ 41 CD_DEVICE_KIND_SCANNER, /* Since: 0.1.0 */ 42 CD_DEVICE_KIND_PRINTER, /* Since: 0.1.0 */ 43 CD_DEVICE_KIND_CAMERA, /* Since: 0.1.0 */ 44 CD_DEVICE_KIND_WEBCAM, /* Since: 0.1.0 */ 45 /*< private >*/ 46 CD_DEVICE_KIND_LAST 47 } CdDeviceKind; 48 49 /** 50 * CdProfileKind: 51 * 52 * The profile type. 53 **/ 54 typedef enum { 55 CD_PROFILE_KIND_UNKNOWN, /* Since: 0.1.1 */ 56 CD_PROFILE_KIND_INPUT_DEVICE, /* Since: 0.1.1 */ 57 CD_PROFILE_KIND_DISPLAY_DEVICE, /* Since: 0.1.1 */ 58 CD_PROFILE_KIND_OUTPUT_DEVICE, /* Since: 0.1.1 */ 59 CD_PROFILE_KIND_DEVICELINK, /* Since: 0.1.1 */ 60 CD_PROFILE_KIND_COLORSPACE_CONVERSION, /* Since: 0.1.1 */ 61 CD_PROFILE_KIND_ABSTRACT, /* Since: 0.1.1 */ 62 CD_PROFILE_KIND_NAMED_COLOR, /* Since: 0.1.1 */ 63 /*< private >*/ 64 CD_PROFILE_KIND_LAST 65 } CdProfileKind; 66 67 /** 68 * CdObjectScope: 69 * 70 * The options type. 71 **/ 72 typedef enum { 73 CD_OBJECT_SCOPE_UNKNOWN, /* Since: 0.1.4 */ 74 CD_OBJECT_SCOPE_NORMAL, /* Since: 0.1.4 */ 75 CD_OBJECT_SCOPE_TEMP, /* Since: 0.1.4 */ 76 CD_OBJECT_SCOPE_DISK, /* Since: 0.1.4 */ 77 /*< private >*/ 78 CD_OBJECT_SCOPE_LAST 79 } CdObjectScope; 80 81 /** 82 * CdRenderingIntent: 83 * @CD_RENDERING_INTENT_UNKNOWN: Unknown rendering intent 84 * @CD_RENDERING_INTENT_PERCEPTUAL: Used for photos as it maintains contrast 85 * @CD_RENDERING_INTENT_RELATIVE_COLORIMETRIC: Used for graphic design and named colors 86 * @CD_RENDERING_INTENT_SATURATION: Used for business charts as it maintains saturation without dithering 87 * @CD_RENDERING_INTENT_ABSOLUTE_COLORIMETRIC: Used when a specific color is required 88 * 89 * The rendering intent. 90 **/ 91 typedef enum { 92 CD_RENDERING_INTENT_UNKNOWN, /* Since: 0.1.5 */ 93 CD_RENDERING_INTENT_PERCEPTUAL, /* Since: 0.1.5 */ 94 CD_RENDERING_INTENT_RELATIVE_COLORIMETRIC, /* Since: 0.1.5 */ 95 CD_RENDERING_INTENT_SATURATION, /* Since: 0.1.5 */ 96 CD_RENDERING_INTENT_ABSOLUTE_COLORIMETRIC, /* Since: 0.1.5 */ 97 /*< private >*/ 98 CD_RENDERING_INTENT_LAST 99 } CdRenderingIntent; 100 101 /** 102 * CdPixelFormat: 103 * 104 * The pixel format of an image. 105 * NOTE: these values are the same as the lcms2 AOTTTTTUYFPXSEEECCCCBBB type. 106 **/ 107 typedef guint32 CdPixelFormat; 108 109 #define CD_PIXEL_FORMAT_UNKNOWN 0x00000000 /* Since: 1.0.0 */ 110 #define CD_PIXEL_FORMAT_ARGB32 0x00044099 /* Since: 1.0.0 */ 111 #define CD_PIXEL_FORMAT_RGB24 0x00040019 /* Since: 1.0.0 */ 112 #define CD_PIXEL_FORMAT_CMYK32 0x00060021 /* Since: 1.0.0 */ 113 #define CD_PIXEL_FORMAT_BGRA32 0x00044499 /* Since: 1.0.0 */ 114 #define CD_PIXEL_FORMAT_RGBA32 0x00040099 /* Since: 1.1.8 */ 115 116 /** 117 * CdColorspace: 118 * 119 * The known colorspace. 120 **/ 121 typedef enum { 122 CD_COLORSPACE_UNKNOWN, /* Since: 0.1.1 */ 123 CD_COLORSPACE_XYZ, /* Since: 0.1.1 */ 124 CD_COLORSPACE_LAB, /* Since: 0.1.1 */ 125 CD_COLORSPACE_LUV, /* Since: 0.1.1 */ 126 CD_COLORSPACE_YCBCR, /* Since: 0.1.1 */ 127 CD_COLORSPACE_YXY, /* Since: 0.1.1 */ 128 CD_COLORSPACE_RGB, /* Since: 0.1.1 */ 129 CD_COLORSPACE_GRAY, /* Since: 0.1.1 */ 130 CD_COLORSPACE_HSV, /* Since: 0.1.1 */ 131 CD_COLORSPACE_CMYK, /* Since: 0.1.1 */ 132 CD_COLORSPACE_CMY, /* Since: 0.1.1 */ 133 /*< private >*/ 134 CD_COLORSPACE_LAST 135 } CdColorspace; 136 137 /** 138 * CdDeviceMode: 139 * 140 * The device mode. 141 **/ 142 typedef enum { 143 CD_DEVICE_MODE_UNKNOWN, /* Since: 0.1.2 */ 144 CD_DEVICE_MODE_PHYSICAL, /* Since: 0.1.2 */ 145 CD_DEVICE_MODE_VIRTUAL, /* Since: 0.1.2 */ 146 /*< private >*/ 147 CD_DEVICE_MODE_LAST 148 } CdDeviceMode; 149 150 /** 151 * CdDeviceRelation: 152 * 153 * The device to profile relationship. 154 **/ 155 typedef enum { 156 CD_DEVICE_RELATION_UNKNOWN, /* Since: 0.1.3 */ 157 CD_DEVICE_RELATION_SOFT, /* Since: 0.1.3 */ 158 CD_DEVICE_RELATION_HARD, /* Since: 0.1.3 */ 159 /*< private >*/ 160 CD_DEVICE_RELATION_LAST 161 } CdDeviceRelation; 162 163 /** 164 * CdSensorKind: 165 * 166 * The sensor type. 167 **/ 168 typedef enum { 169 CD_SENSOR_KIND_UNKNOWN, /* Since: 0.1.6 */ 170 CD_SENSOR_KIND_DUMMY, /* Since: 0.1.6 */ 171 CD_SENSOR_KIND_HUEY, /* Since: 0.1.6 */ 172 CD_SENSOR_KIND_COLOR_MUNKI_PHOTO, /* Since: 0.1.6 */ 173 CD_SENSOR_KIND_SPYDER, /* Since: 0.1.6, but not used since 0.1.16 */ 174 CD_SENSOR_KIND_DTP20, /* Since: 0.1.6 */ 175 CD_SENSOR_KIND_DTP22, /* Since: 0.1.6 */ 176 CD_SENSOR_KIND_DTP41, /* Since: 0.1.6 */ 177 CD_SENSOR_KIND_DTP51, /* Since: 0.1.6 */ 178 CD_SENSOR_KIND_DTP94, /* Since: 0.1.6 */ 179 CD_SENSOR_KIND_SPECTRO_SCAN, /* Since: 0.1.6 */ 180 CD_SENSOR_KIND_I1_PRO, /* Since: 0.1.6 */ 181 CD_SENSOR_KIND_COLORIMTRE_HCFR, /* Since: 0.1.6 */ 182 CD_SENSOR_KIND_I1_DISPLAY3, /* Since: 0.1.14 */ 183 CD_SENSOR_KIND_COLORHUG, /* Since: 0.1.15 */ 184 CD_SENSOR_KIND_SPYDER2, /* Since: 0.1.16 */ 185 CD_SENSOR_KIND_SPYDER3, /* Since: 0.1.16 */ 186 CD_SENSOR_KIND_COLORHUG_PLUS, /* Since: 0.1.24 */ 187 CD_SENSOR_KIND_I1_DISPLAY1, /* Since: 0.1.25 */ 188 CD_SENSOR_KIND_I1_DISPLAY2, /* Since: 0.1.25 */ 189 CD_SENSOR_KIND_DTP92, /* Since: 0.1.25 */ 190 CD_SENSOR_KIND_I1_MONITOR, /* Since: 0.1.25 */ 191 CD_SENSOR_KIND_SPYDER4, /* Since: 0.1.26 */ 192 CD_SENSOR_KIND_COLOR_MUNKI_SMILE, /* Since: 0.1.27 */ 193 CD_SENSOR_KIND_COLORHUG2, /* Since: 1.2.2 */ 194 CD_SENSOR_KIND_SPYDER5, /* Since: 1.2.11 */ 195 CD_SENSOR_KIND_SPARK, /* Since: 1.2.11 */ 196 /*< private >*/ 197 CD_SENSOR_KIND_LAST 198 } CdSensorKind; 199 200 /* renamed due to trademark issue */ 201 #define CD_SENSOR_KIND_COLORHUG_SPECTRO CD_SENSOR_KIND_COLORHUG_PLUS 202 203 /** 204 * CdSensorCap: 205 * 206 * The sensor capabilities, i.e. things the sensor can do. 207 **/ 208 typedef enum { 209 CD_SENSOR_CAP_UNKNOWN, /* Since: 0.1.6 */ 210 CD_SENSOR_CAP_LCD, /* Since: 0.1.6 */ 211 CD_SENSOR_CAP_CRT, /* Since: 0.1.6 */ 212 CD_SENSOR_CAP_PRINTER, /* Since: 0.1.6 */ 213 CD_SENSOR_CAP_SPOT, /* Since: 0.1.6 */ 214 CD_SENSOR_CAP_PROJECTOR, /* Since: 0.1.6 */ 215 CD_SENSOR_CAP_AMBIENT, /* Since: 0.1.6 */ 216 CD_SENSOR_CAP_CALIBRATION, /* Since: 0.1.6 (hint: raw measurement) */ 217 CD_SENSOR_CAP_LED, /* Since: 0.1.17 */ 218 CD_SENSOR_CAP_PLASMA, /* Since: 0.1.29 */ 219 CD_SENSOR_CAP_LCD_CCFL, /* Since: 0.1.31 */ 220 CD_SENSOR_CAP_LCD_RGB_LED, /* Since: 0.1.31 */ 221 CD_SENSOR_CAP_LCD_WHITE_LED, /* Since: 0.1.31 */ 222 CD_SENSOR_CAP_WIDE_GAMUT_LCD_CCFL, /* Since: 0.1.31 */ 223 CD_SENSOR_CAP_WIDE_GAMUT_LCD_RGB_LED, /* Since: 0.1.31 */ 224 CD_SENSOR_CAP_SPECTRAL, /* Since: 1.3.1 */ 225 CD_SENSOR_CAP_CALIBRATION_DARK, /* Since: 1.3.1 */ 226 CD_SENSOR_CAP_CALIBRATION_IRRADIANCE, /* Since: 1.3.1 */ 227 /*< private >*/ 228 CD_SENSOR_CAP_LAST 229 } CdSensorCap; 230 231 /** 232 * CdSensorState: 233 * 234 * The state of the sensor. 235 **/ 236 typedef enum { 237 CD_SENSOR_STATE_UNKNOWN, /* Since: 0.1.6 */ 238 CD_SENSOR_STATE_STARTING, /* Since: 0.1.6 */ 239 CD_SENSOR_STATE_IDLE, /* Since: 0.1.6 */ 240 CD_SENSOR_STATE_MEASURING, /* Since: 0.1.6 */ 241 CD_SENSOR_STATE_BUSY, /* Since: 0.1.19 */ 242 /*< private >*/ 243 CD_SENSOR_STATE_LAST 244 } CdSensorState; 245 246 /** 247 * CdStandardSpace: 248 * 249 * A standard colorspace 250 **/ 251 typedef enum { 252 CD_STANDARD_SPACE_UNKNOWN, /* Since: 0.1.6 */ 253 CD_STANDARD_SPACE_SRGB, /* Since: 0.1.6 */ 254 CD_STANDARD_SPACE_ADOBE_RGB, /* Since: 0.1.6 */ 255 CD_STANDARD_SPACE_PROPHOTO_RGB, /* Since: 0.1.6 */ 256 /*< private >*/ 257 CD_STANDARD_SPACE_LAST 258 } CdStandardSpace; 259 260 /** 261 * CdProfileWarning: 262 * @CD_PROFILE_WARNING_NONE: No error is found 263 * @CD_PROFILE_WARNING_DESCRIPTION_MISSING: The description is missing or of zero length 264 * @CD_PROFILE_WARNING_COPYRIGHT_MISSING: The copyright is missing or of zero length 265 * @CD_PROFILE_WARNING_VCGT_NON_MONOTONIC: The video card gamma table is not monotonic 266 * @CD_PROFILE_WARNING_SCUM_DOT: Lab 100, 0, 0 does not map to RGB 255,255,255 267 * @CD_PROFILE_WARNING_GRAY_AXIS_INVALID: There is significant a/b for gray 268 * @CD_PROFILE_WARNING_GRAY_AXIS_NON_MONOTONIC: The gray ramp is not monotonic 269 * @CD_PROFILE_WARNING_PRIMARIES_INVALID: One or more of the primaries are invalid 270 * @CD_PROFILE_WARNING_PRIMARIES_NON_ADDITIVE: The primaries to not add to give D50 white 271 * @CD_PROFILE_WARNING_PRIMARIES_UNLIKELY: One or more of the primaries are outside of ROMM RGB 272 * @CD_PROFILE_WARNING_WHITEPOINT_INVALID: RGB 255,255,255 does not return D50 273 * @CD_PROFILE_WARNING_WHITEPOINT_UNLIKELY: Whitepoint is outside of usual range 274 * 275 * The warning about the profile. Profiles with warnings can still be 276 * used, but may be of limited use. 277 **/ 278 typedef enum { 279 /* FIXME: next API break, add CD_PROFILE_WARNING_UNKNOWN */ 280 CD_PROFILE_WARNING_NONE, /* Since: 0.1.25 */ 281 CD_PROFILE_WARNING_DESCRIPTION_MISSING, /* Since: 0.1.25 */ 282 CD_PROFILE_WARNING_COPYRIGHT_MISSING, /* Since: 0.1.25 */ 283 CD_PROFILE_WARNING_VCGT_NON_MONOTONIC, /* Since: 0.1.25 */ 284 CD_PROFILE_WARNING_SCUM_DOT, /* Since: 0.1.25 */ 285 CD_PROFILE_WARNING_GRAY_AXIS_INVALID, /* Since: 0.1.25 */ 286 CD_PROFILE_WARNING_GRAY_AXIS_NON_MONOTONIC, /* Since: 0.1.25 */ 287 CD_PROFILE_WARNING_PRIMARIES_INVALID, /* Since: 0.1.25 */ 288 CD_PROFILE_WARNING_PRIMARIES_NON_ADDITIVE, /* Since: 0.1.25 */ 289 CD_PROFILE_WARNING_PRIMARIES_UNLIKELY, /* Since: 0.1.25 */ 290 CD_PROFILE_WARNING_WHITEPOINT_INVALID, /* Since: 0.1.25 */ 291 CD_PROFILE_WARNING_WHITEPOINT_UNLIKELY, /* Since: 0.1.34 */ 292 /*< private >*/ 293 CD_PROFILE_WARNING_LAST 294 } CdProfileWarning; 295 296 /** 297 * CdProfileQuality: 298 * @CD_PROFILE_QUALITY_LOW: Low quality profile, fast 299 * @CD_PROFILE_QUALITY_MEDIUM: Medium quality profile 300 * @CD_PROFILE_QUALITY_HIGH: High quality profile, slow 301 * 302 * The quality of the profile produced through calibration. 303 **/ 304 typedef enum { 305 /* FIXME: next API break, add CD_PROFILE_QUALITY_UNKNOWN */ 306 CD_PROFILE_QUALITY_LOW, /* Since: 0.1.27 */ 307 CD_PROFILE_QUALITY_MEDIUM, /* Since: 0.1.27 */ 308 CD_PROFILE_QUALITY_HIGH, /* Since: 0.1.27 */ 309 /*< private >*/ 310 CD_PROFILE_QUALITY_LAST 311 } CdProfileQuality; 312 313 /** 314 * CdSensorError: 315 * @CD_SENSOR_ERROR_NO_SUPPORT: This action is unsupported on this hardware 316 * @CD_SENSOR_ERROR_NO_DATA: The sensor provided no data 317 * @CD_SENSOR_ERROR_INTERNAL: An internal error occurred 318 * @CD_SENSOR_ERROR_ALREADY_LOCKED: The sensor is already locked 319 * @CD_SENSOR_ERROR_NOT_LOCKED: The sensor is not locked 320 * @CD_SENSOR_ERROR_IN_USE: The sensor is already in use 321 * @CD_SENSOR_ERROR_FAILED_TO_AUTHENTICATE: Authentication failed 322 * @CD_SENSOR_ERROR_REQUIRED_POSITION_CALIBRATE: The sensor needs to be in the calibrate position 323 * @CD_SENSOR_ERROR_REQUIRED_POSITION_SURFACE: The sensor needs to be in the surface position 324 * @CD_SENSOR_ERROR_REQUIRED_DARK_CALIBRATION: The sensor needs dark calibration 325 * @CD_SENSOR_ERROR_REQUIRED_IRRADIANCE_CALIBRATION: The sensor needs irradiance calibration 326 * 327 * The sensor error code. 328 * 329 * Since: 0.1.26 330 **/ 331 typedef enum { 332 CD_SENSOR_ERROR_NO_SUPPORT, /* Since: 0.1.26 */ 333 CD_SENSOR_ERROR_NO_DATA, /* Since: 0.1.26 */ 334 CD_SENSOR_ERROR_INTERNAL, /* Since: 0.1.26 */ 335 CD_SENSOR_ERROR_ALREADY_LOCKED, /* Since: 0.1.26 */ 336 CD_SENSOR_ERROR_NOT_LOCKED, /* Since: 0.1.26 */ 337 CD_SENSOR_ERROR_IN_USE, /* Since: 0.1.26 */ 338 CD_SENSOR_ERROR_FAILED_TO_AUTHENTICATE, /* Since: 0.1.26 */ 339 CD_SENSOR_ERROR_REQUIRED_POSITION_CALIBRATE, /* Since: 0.1.26 */ 340 CD_SENSOR_ERROR_REQUIRED_POSITION_SURFACE, /* Since: 0.1.26 */ 341 CD_SENSOR_ERROR_REQUIRED_DARK_CALIBRATION, /* Since: 1.2.13 */ 342 CD_SENSOR_ERROR_REQUIRED_IRRADIANCE_CALIBRATION, /* Since: 1.1.1 */ 343 /*< private >*/ 344 CD_SENSOR_ERROR_LAST 345 } CdSensorError; 346 347 /** 348 * CdProfileError: 349 * @CD_PROFILE_ERROR_INTERNAL: An internal error occurred 350 * @CD_PROFILE_ERROR_ALREADY_INSTALLED: The profile is already installed 351 * @CD_PROFILE_ERROR_FAILED_TO_WRITE: The profile could not be written 352 * @CD_PROFILE_ERROR_FAILED_TO_PARSE: The profile could not be parsed 353 * @CD_PROFILE_ERROR_FAILED_TO_READ: The profile could not be read 354 * @CD_PROFILE_ERROR_FAILED_TO_AUTHENTICATE: Authentication failed 355 * @CD_PROFILE_ERROR_PROPERTY_INVALID: One or more of the properties was invalid 356 * @CD_PROFILE_ERROR_FAILED_TO_GET_UID: Failed to get UID for sender 357 * 358 * Errors that can be thrown 359 */ 360 typedef enum 361 { 362 CD_PROFILE_ERROR_INTERNAL, /* Since: 0.1.26 */ 363 CD_PROFILE_ERROR_ALREADY_INSTALLED, /* Since: 0.1.26 */ 364 CD_PROFILE_ERROR_FAILED_TO_WRITE, /* Since: 0.1.26 */ 365 CD_PROFILE_ERROR_FAILED_TO_PARSE, /* Since: 0.1.26 */ 366 CD_PROFILE_ERROR_FAILED_TO_READ, /* Since: 0.1.26 */ 367 CD_PROFILE_ERROR_FAILED_TO_AUTHENTICATE, /* Since: 0.1.26 */ 368 CD_PROFILE_ERROR_PROPERTY_INVALID, /* Since: 0.1.31 */ 369 CD_PROFILE_ERROR_FAILED_TO_GET_UID, /* Since: 1.2.1 */ 370 /*< private >*/ 371 CD_PROFILE_ERROR_LAST 372 } CdProfileError; 373 374 /** 375 * CdDeviceError: 376 * @CD_DEVICE_ERROR_INTERNAL: An internal error occurred 377 * @CD_DEVICE_ERROR_PROFILE_DOES_NOT_EXIST: The profile does not exist 378 * @CD_DEVICE_ERROR_PROFILE_ALREADY_ADDED: The profile has already been added 379 * @CD_DEVICE_ERROR_PROFILING: The device is being profiled 380 * @CD_DEVICE_ERROR_NOTHING_MATCHED: Nothing matched the search term 381 * @CD_DEVICE_ERROR_FAILED_TO_INHIBIT: Cound not inhibit device 382 * @CD_DEVICE_ERROR_FAILED_TO_UNINHIBIT: Cound not uninhibit device 383 * @CD_DEVICE_ERROR_FAILED_TO_AUTHENTICATE: Authentication failed 384 * @CD_DEVICE_ERROR_NOT_ENABLED: The device has been disabled 385 * 386 * Errors that can be thrown 387 */ 388 typedef enum 389 { 390 CD_DEVICE_ERROR_INTERNAL, /* Since: 0.1.26 */ 391 CD_DEVICE_ERROR_PROFILE_DOES_NOT_EXIST, /* Since: 0.1.26 */ 392 CD_DEVICE_ERROR_PROFILE_ALREADY_ADDED, /* Since: 0.1.26 */ 393 CD_DEVICE_ERROR_PROFILING, /* Since: 0.1.26 */ 394 CD_DEVICE_ERROR_NOTHING_MATCHED, /* Since: 0.1.26 */ 395 CD_DEVICE_ERROR_FAILED_TO_INHIBIT, /* Since: 0.1.26 */ 396 CD_DEVICE_ERROR_FAILED_TO_UNINHIBIT, /* Since: 0.1.26 */ 397 CD_DEVICE_ERROR_FAILED_TO_AUTHENTICATE, /* Since: 0.1.26 */ 398 CD_DEVICE_ERROR_NOT_ENABLED, /* Since: 0.1.26 */ 399 /*< private >*/ 400 CD_DEVICE_ERROR_LAST 401 } CdDeviceError; 402 403 /** 404 * CdClientError: 405 * @CD_CLIENT_ERROR_INTERNAL: An internal error occurred 406 * @CD_CLIENT_ERROR_ALREADY_EXISTS: The profile already exists 407 * @CD_CLIENT_ERROR_FAILED_TO_AUTHENTICATE: Authentication failed 408 * @CD_CLIENT_ERROR_NOT_SUPPORTED: Feature not supported 409 * @CD_CLIENT_ERROR_NOT_FOUND: Profile or device not found 410 * @CD_CLIENT_ERROR_INPUT_INVALID: One or more of the parameters is invalid 411 * @CD_CLIENT_ERROR_FILE_INVALID: The file if invalid 412 * 413 * Errors that can be thrown 414 */ 415 typedef enum { 416 CD_CLIENT_ERROR_INTERNAL, /* Since: 0.1.26 */ 417 CD_CLIENT_ERROR_ALREADY_EXISTS, /* Since: 0.1.26 */ 418 CD_CLIENT_ERROR_FAILED_TO_AUTHENTICATE, /* Since: 0.1.26 */ 419 CD_CLIENT_ERROR_NOT_SUPPORTED, /* Since: 0.1.26 */ 420 CD_CLIENT_ERROR_NOT_FOUND, /* Since: 0.1.26 */ 421 CD_CLIENT_ERROR_INPUT_INVALID, /* Since: 0.1.26 */ 422 CD_CLIENT_ERROR_FILE_INVALID, /* Since: 0.1.26 */ 423 /*< private >*/ 424 CD_CLIENT_ERROR_LAST 425 } CdClientError; 426 427 /* defined in org.freedesktop.ColorManager.xml */ 428 #define CD_CLIENT_PROPERTY_DAEMON_VERSION "DaemonVersion" /* Since: 0.1.0 */ 429 #define CD_CLIENT_PROPERTY_SYSTEM_VENDOR "SystemVendor" /* Since: 1.0.2 */ 430 #define CD_CLIENT_PROPERTY_SYSTEM_MODEL "SystemModel" /* Since: 1.0.2 */ 431 432 /* defined in metadata-spec.txt */ 433 #define CD_PROFILE_METADATA_STANDARD_SPACE "STANDARD_space" /* Since: 0.1.8 */ 434 #define CD_PROFILE_METADATA_EDID_MD5 "EDID_md5" /* Since: 0.1.8 */ 435 #define CD_PROFILE_METADATA_EDID_MODEL "EDID_model" /* Since: 0.1.8 */ 436 #define CD_PROFILE_METADATA_EDID_SERIAL "EDID_serial" /* Since: 0.1.8 */ 437 #define CD_PROFILE_METADATA_EDID_MNFT "EDID_mnft" /* Since: 0.1.8 */ 438 #define CD_PROFILE_METADATA_EDID_VENDOR "EDID_manufacturer" /* Since: 0.1.8 */ 439 #define CD_PROFILE_METADATA_FILE_CHECKSUM "FILE_checksum" /* Since: 0.1.8 */ 440 #define CD_PROFILE_METADATA_CMF_PRODUCT "CMF_product" /* Since: 0.1.9 */ 441 #define CD_PROFILE_METADATA_CMF_BINARY "CMF_binary" /* Since: 0.1.9 */ 442 #define CD_PROFILE_METADATA_CMF_VERSION "CMF_version" /* Since: 0.1.9 */ 443 #define CD_PROFILE_METADATA_DATA_SOURCE "DATA_source" /* Since: 0.1.9 */ 444 #define CD_PROFILE_METADATA_DATA_SOURCE_EDID "edid" /* Since: 0.1.9 */ 445 #define CD_PROFILE_METADATA_DATA_SOURCE_CALIB "calib" /* Since: 0.1.9 */ 446 #define CD_PROFILE_METADATA_DATA_SOURCE_STANDARD "standard" /* Since: 0.1.14 */ 447 #define CD_PROFILE_METADATA_DATA_SOURCE_TEST "test" /* Since: 0.1.14 */ 448 #define CD_PROFILE_METADATA_MAPPING_FORMAT "MAPPING_format" /* Since: 0.1.9 */ 449 #define CD_PROFILE_METADATA_MAPPING_QUALIFIER "MAPPING_qualifier" /* Since: 0.1.9 */ 450 #define CD_PROFILE_METADATA_MAPPING_DEVICE_ID "MAPPING_device_id" /* Since: 0.1.9 */ 451 #define CD_PROFILE_METADATA_ACCURACY_DE76_AVG "ACCURACY_dE76_avg" /* Since: 0.1.16 */ 452 #define CD_PROFILE_METADATA_ACCURACY_DE76_MAX "ACCURACY_dE76_max" /* Since: 0.1.16 */ 453 #define CD_PROFILE_METADATA_ACCURACY_DE76_RMS "ACCURACY_dE76_rms" /* Since: 0.1.16 */ 454 #define CD_PROFILE_METADATA_MEASUREMENT_DEVICE "MEASUREMENT_device" /* Since: 0.1.16 */ 455 #define CD_PROFILE_METADATA_SCREEN_SURFACE "SCREEN_surface" /* Since: 0.1.16 */ 456 #define CD_PROFILE_METADATA_SCREEN_SURFACE_MATTE "matte" /* Since: 0.1.16 */ 457 #define CD_PROFILE_METADATA_SCREEN_SURFACE_GLOSSY "glossy" /* Since: 0.1.16 */ 458 #define CD_PROFILE_METADATA_SCREEN_BRIGHTNESS "SCREEN_brightness" /* Since: 0.1.17 */ 459 #define CD_PROFILE_METADATA_CONNECTION_TYPE "CONNECTION_type" /* Since: 0.1.16 */ 460 #define CD_PROFILE_METADATA_CONNECTION_TYPE_INTERNAL "internal" /* Since: 0.1.16 */ 461 #define CD_PROFILE_METADATA_CONNECTION_TYPE_VGA "vga" /* Since: 0.1.16 */ 462 #define CD_PROFILE_METADATA_CONNECTION_TYPE_DVI "dvi" /* Since: 0.1.16 */ 463 #define CD_PROFILE_METADATA_CONNECTION_TYPE_HDMI "hdmi" /* Since: 0.1.16 */ 464 #define CD_PROFILE_METADATA_CONNECTION_TYPE_DISPLAYPORT "displayport" /* Since: 0.1.16 */ 465 #define CD_PROFILE_METADATA_LICENSE "License" /* Since: 0.1.25 */ 466 #define CD_PROFILE_METADATA_QUALITY "Quality" /* Since: 0.1.27 */ 467 #define CD_PROFILE_METADATA_QUALITY_LOW "low" /* Since: 0.1.27 */ 468 #define CD_PROFILE_METADATA_QUALITY_MEDIUM "medium" /* Since: 0.1.27 */ 469 #define CD_PROFILE_METADATA_QUALITY_HIGH "high" /* Since: 0.1.27 */ 470 471 /* defined in org.freedesktop.ColorManager.Profile.xml */ 472 #define CD_PROFILE_PROPERTY_FILENAME "Filename" /* Since: 0.1.8 */ 473 #define CD_PROFILE_PROPERTY_QUALIFIER "Qualifier" /* Since: 0.1.8 */ 474 #define CD_PROFILE_PROPERTY_FORMAT "Format" /* Since: 0.1.8 */ 475 #define CD_PROFILE_PROPERTY_COLORSPACE "Colorspace" /* Since: 0.1.8 */ 476 #define CD_PROFILE_PROPERTY_TITLE "Title" /* Since: 0.1.8 */ 477 #define CD_PROFILE_PROPERTY_KIND "Kind" /* Since: 0.1.8 */ 478 #define CD_PROFILE_PROPERTY_CREATED "Created" /* Since: 0.1.8 */ 479 #define CD_PROFILE_PROPERTY_HAS_VCGT "HasVcgt" /* Since: 0.1.8 */ 480 #define CD_PROFILE_PROPERTY_IS_SYSTEM_WIDE "IsSystemWide" /* Since: 0.1.8 */ 481 #define CD_PROFILE_PROPERTY_METADATA "Metadata" /* Since: 0.1.8 */ 482 #define CD_PROFILE_PROPERTY_ID "ProfileId" /* Since: 0.1.8 */ 483 #define CD_PROFILE_PROPERTY_SCOPE "Scope" /* Since: 0.1.10 */ 484 #define CD_PROFILE_PROPERTY_OWNER "Owner" /* Since: 0.1.13 */ 485 #define CD_PROFILE_PROPERTY_WARNINGS "Warnings" /* Since: 0.1.25 */ 486 487 /* defined in metadata-spec.txt */ 488 #define CD_DEVICE_METADATA_XRANDR_NAME "XRANDR_name" /* Since: 0.1.8 */ 489 #define CD_DEVICE_METADATA_OUTPUT_EDID_MD5 "OutputEdidMd5" /* Since: 0.1.34 */ 490 #define CD_DEVICE_METADATA_OUTPUT_PRIORITY "OutputPriority" /* Since: 0.1.25 */ 491 #define CD_DEVICE_METADATA_OUTPUT_PRIORITY_PRIMARY "primary" /* Since: 0.1.25 */ 492 #define CD_DEVICE_METADATA_OUTPUT_PRIORITY_SECONDARY "secondary" /* Since: 0.1.25 */ 493 #define CD_DEVICE_METADATA_OWNER_CMDLINE "OwnerCmdline" /* Since: 0.1.29 */ 494 495 /* defined in org.freedesktop.ColorManager.Device.xml */ 496 #define CD_DEVICE_PROPERTY_MODEL "Model" /* Since: 0.1.8 */ 497 #define CD_DEVICE_PROPERTY_KIND "Kind" /* Since: 0.1.8 */ 498 #define CD_DEVICE_PROPERTY_VENDOR "Vendor" /* Since: 0.1.8 */ 499 #define CD_DEVICE_PROPERTY_SERIAL "Serial" /* Since: 0.1.8 */ 500 #define CD_DEVICE_PROPERTY_COLORSPACE "Colorspace" /* Since: 0.1.8 */ 501 #define CD_DEVICE_PROPERTY_FORMAT "Format" /* Since: 0.1.9 */ 502 #define CD_DEVICE_PROPERTY_MODE "Mode" /* Since: 0.1.8 */ 503 #define CD_DEVICE_PROPERTY_PROFILES "Profiles" /* Since: 0.1.8 */ 504 #define CD_DEVICE_PROPERTY_CREATED "Created" /* Since: 0.1.8 */ 505 #define CD_DEVICE_PROPERTY_MODIFIED "Modified" /* Since: 0.1.8 */ 506 #define CD_DEVICE_PROPERTY_METADATA "Metadata" /* Since: 0.1.8 */ 507 #define CD_DEVICE_PROPERTY_ID "DeviceId" /* Since: 0.1.8 */ 508 #define CD_DEVICE_PROPERTY_SCOPE "Scope" /* Since: 0.1.9 */ 509 #define CD_DEVICE_PROPERTY_OWNER "Owner" /* Since: 0.1.13 */ 510 #define CD_DEVICE_PROPERTY_SEAT "Seat" /* Since: 0.1.24 */ 511 #define CD_DEVICE_PROPERTY_PROFILING_INHIBITORS "ProfilingInhibitors" /* Since: 0.1.18 */ 512 #define CD_DEVICE_PROPERTY_ENABLED "Enabled" /* Since: 0.1.26 */ 513 #define CD_DEVICE_PROPERTY_EMBEDDED "Embedded" /* Since: 0.1.27 */ 514 515 /* defined in org.freedesktop.ColorManager.Sensor.xml */ 516 #define CD_SENSOR_PROPERTY_ID "SensorId" /* Since: 0.1.26 */ 517 #define CD_SENSOR_PROPERTY_KIND "Kind" /* Since: 0.1.26 */ 518 #define CD_SENSOR_PROPERTY_STATE "State" /* Since: 0.1.26 */ 519 #define CD_SENSOR_PROPERTY_MODE "Mode" /* Since: 0.1.26 */ 520 #define CD_SENSOR_PROPERTY_SERIAL "Serial" /* Since: 0.1.26 */ 521 #define CD_SENSOR_PROPERTY_MODEL "Model" /* Since: 0.1.26 */ 522 #define CD_SENSOR_PROPERTY_VENDOR "Vendor" /* Since: 0.1.26 */ 523 #define CD_SENSOR_PROPERTY_NATIVE "Native" /* Since: 0.1.26 */ 524 #define CD_SENSOR_PROPERTY_LOCKED "Locked" /* Since: 0.1.26 */ 525 #define CD_SENSOR_PROPERTY_CAPABILITIES "Capabilities" /* Since: 0.1.26 */ 526 #define CD_SENSOR_PROPERTY_OPTIONS "Options" /* Since: 0.1.26 */ 527 #define CD_SENSOR_PROPERTY_EMBEDDED "Embedded" /* Since: 0.1.26 */ 528 #define CD_SENSOR_PROPERTY_METADATA "Metadata" /* Since: 0.1.28 */ 529 530 /* defined in metadata-spec.txt */ 531 #define CD_SENSOR_METADATA_IMAGE_ATTACH "ImageAttach" /* Since: 0.1.28 */ 532 #define CD_SENSOR_METADATA_IMAGE_CALIBRATE "ImageCalibrate" /* Since: 0.1.28 */ 533 #define CD_SENSOR_METADATA_IMAGE_SCREEN "ImageScreen" /* Since: 0.1.28 */ 534 535 /* convenience functions as it's easy to forget the bitwise operators */ 536 #define cd_bitfield_add(bitfield,tmp) do { ((bitfield) |= (cd_bitfield_value(tmp))); } while (0) 537 #define cd_bitfield_remove(bitfield,tmp) do { ((bitfield) &= ~(cd_bitfield_value(tmp))); } while (0) 538 #define cd_bitfield_contain(bitfield,tmp) (((bitfield) & (cd_bitfield_value(tmp))) > 0) 539 #define cd_bitfield_value(tmp) ((guint64) 1 << (tmp)) 540 541 guint64 cd_bitfield_from_enums (gint value, ...); 542 const gchar *cd_device_kind_to_string (CdDeviceKind kind_enum); 543 CdDeviceKind cd_device_kind_from_string (const gchar *kind); 544 const gchar *cd_profile_kind_to_string (CdProfileKind profile_kind); 545 CdProfileKind cd_profile_kind_from_string (const gchar *profile_kind); 546 CdRenderingIntent cd_rendering_intent_from_string (const gchar *rendering_intent); 547 const gchar *cd_rendering_intent_to_string (CdRenderingIntent rendering_intent); 548 CdPixelFormat cd_pixel_format_from_string (const gchar *pixel_format); 549 const gchar *cd_pixel_format_to_string (CdPixelFormat pixel_format); 550 const gchar *cd_colorspace_to_string (CdColorspace colorspace); 551 CdColorspace cd_colorspace_from_string (const gchar *colorspace); 552 const gchar *cd_device_mode_to_string (CdDeviceMode device_mode); 553 CdDeviceMode cd_device_mode_from_string (const gchar *device_mode); 554 const gchar *cd_device_relation_to_string (CdDeviceRelation device_relation); 555 CdDeviceRelation cd_device_relation_from_string (const gchar *device_relation); 556 const gchar *cd_object_scope_to_string (CdObjectScope object_scope); 557 CdObjectScope cd_object_scope_from_string (const gchar *object_scope); 558 const gchar *cd_sensor_kind_to_string (CdSensorKind sensor_kind); 559 CdSensorKind cd_sensor_kind_from_string (const gchar *sensor_kind); 560 const gchar *cd_sensor_state_to_string (CdSensorState sensor_state); 561 CdSensorState cd_sensor_state_from_string (const gchar *sensor_state); 562 const gchar *cd_sensor_cap_to_string (CdSensorCap sensor_cap); 563 CdSensorCap cd_sensor_cap_from_string (const gchar *sensor_cap); 564 const gchar *cd_standard_space_to_string (CdStandardSpace standard_space); 565 CdStandardSpace cd_standard_space_from_string (const gchar *standard_space); 566 const gchar *cd_profile_warning_to_string (CdProfileWarning kind_enum); 567 CdProfileWarning cd_profile_warning_from_string (const gchar *type); 568 const gchar *cd_profile_quality_to_string (CdProfileQuality quality_enum); 569 CdProfileQuality cd_profile_quality_from_string (const gchar *quality); 570 CdProfileKind cd_device_kind_to_profile_kind (CdDeviceKind device_kind); 571 572 const gchar *cd_sensor_error_to_string (CdSensorError error_enum); 573 CdSensorError cd_sensor_error_from_string (const gchar *error_desc); 574 const gchar *cd_profile_error_to_string (CdProfileError error_enum); 575 CdProfileError cd_profile_error_from_string (const gchar *error_desc); 576 const gchar *cd_device_error_to_string (CdDeviceError error_enum); 577 CdDeviceError cd_device_error_from_string (const gchar *error_desc); 578 const gchar *cd_client_error_to_string (CdClientError error_enum); 579 CdClientError cd_client_error_from_string (const gchar *error_desc); 580 581 G_END_DECLS 582 583 #endif /* __CD_ENUM_H */ 584 585