Xcm.h   Xcm.h 
/* @file Xcm.h /* @file Xcm.h
* *
* libXcm Xorg Colour Management * libXcm Xorg Colour Management
* *
* @par Copyright: * @par Copyright:
* 2008 (C) Tomas Carnecky * 2008 (C) Tomas Carnecky
* 2008-2010 (C) Kai-Uwe Behrmann * 2008-2012 (C) Kai-Uwe Behrmann
* *
* @brief net-color spec helpers * @brief X Color Management specfication helpers
* @internal * @internal
* @author Tomas Carnecky * @author Tomas Carnecky
* Kai-Uwe Behrmann <ku.b@gmx.de> * Kai-Uwe Behrmann <ku.b@gmx.de>
* @par License: * @par License:
* MIT <http://www.opensource.org/licenses/mit-license.php> * MIT <http://www.opensource.org/licenses/mit-license.php>
* @since 2008/04/00 * @since 2008/04/00
*/ */
#ifndef __XCOLOR_H__ #ifndef __XCOLOR_H__
#define __XCOLOR_H__ #define __XCOLOR_H__
#include "XcmVersion.h"
#ifdef HAVE_X11
#include <X11/Xlib.h> #include <X11/Xlib.h>
#include <X11/Xatom.h> #include <X11/Xatom.h>
#include <stdint.h> #include <stdint.h>
#include <arpa/inet.h> #include <arpa/inet.h>
#include <stdlib.h> #include <stdlib.h>
#include <string.h> #include <string.h>
#endif /* HAVE_X11 */
#ifdef __cplusplus #ifdef __cplusplus
extern "C" { extern "C" {
#endif /* __cplusplus */ #endif /* __cplusplus */
#ifdef HAVE_X11
/** \addtogroup Xcm X Color Management Core API's /** \addtogroup Xcm X Color Management Core API's
* @{ * @{
*/ */
/** /**
* The XcolorProfile typedefed structure * The XcolorProfile typedefed structure
* describes a single ICC profile. The 'md5' field is used to identify the * describes a single ICC profile. The 'md5' field is used to identify the
* profile. The actual data follows right after the structure. * profile. The actual data follows right after the structure.
*/ */
typedef struct { typedef struct {
uint8_t md5[16]; /**< ICC MD5 of the profile */ uint8_t md5[16]; /**< ICC MD5 of the profile */
uint32_t length; /**< number of bytes following, network byte order */ uint32_t length; /**< number of bytes following, network byte order */
} XcolorProfile; } XcolorProfile;
/** /**
* The XCM_COLOR_PROFILES macro
* represents a atom name for under which XcolorProfile data can be stored.
*/
#define XCM_COLOR_PROFILES "_ICC_COLOR_PROFILES"
/**
* The XcolorRegion typedefed structure * The XcolorRegion typedefed structure
* describes a single region with an attached profile. The region is * describes a single region with an attached profile. The region is
* evaluated when the client enables the region and not when the region * evaluated when the client enables the region and not when the region
* is atttached to the window. This allows clients to update the region * is atttached to the window. This allows clients to update the region
* (when the window is resized for example) by simply modifying the * (when the window is resized for example) by simply modifying the
* XserverRegion and then sending a ClientMessage. * XserverRegion and then sending a ClientMessage.
*/ */
typedef struct { typedef struct {
uint32_t region; /**< XserverRegion, network byte order */ uint32_t region; /**< XserverRegion, network byte order */
uint8_t md5[16]; /**< ICC MD5 of the associated profile */ uint8_t md5[16]; /**< ICC MD5 of the associated profile */
} XcolorRegion; } XcolorRegion;
/**
* The XCM_COLOR_REGIONS macro
* represents a atom name for under which XcolorRegions data can be stored.
*/
#define XCM_COLOR_REGIONS "_ICC_COLOR_REGIONS"
/** Function XcolorProfileUpload /** Function XcolorProfileUpload
* @brief Uploads the profile into all screens of the display. * @brief Uploads the profile into all screens of the display.
* *
* Uploads the profile into all screens of the display. Profiles are * Uploads the profile into all screens of the display. Profiles are
* ref-counted inside the compositing manager, so make sure to call * ref-counted inside the compositing manager, so make sure to call
* XcolorProfileDelete() before your application exits or when you don't * XcolorProfileDelete() before your application exits or when you don't
* need the profile anymore. * need the profile anymore.
*/ */
int XcolorProfileUpload(Display *dpy, XcolorProfile *profile); int XcolorProfileUpload(Display *dpy, XcolorProfile *profile);
skipping to change at line 119 skipping to change at line 137
/** Function XcolorRegionActivate /** Function XcolorRegionActivate
* @brief Activates regions * @brief Activates regions
* *
* Activates 'count' regions starting at positiong 'start' in the stack. Un like * Activates 'count' regions starting at positiong 'start' in the stack. Un like
* the other functions it does not check whether 'start + count' extends be yond * the other functions it does not check whether 'start + count' extends be yond
* the stack end. To disable all regions pass zero to 'count'. * the stack end. To disable all regions pass zero to 'count'.
*/ */
int XcolorRegionActivate(Display *dpy, Window win, unsigned long start, uns igned long count); int XcolorRegionActivate(Display *dpy, Window win, unsigned long start, uns igned long count);
/** /**
* The XCM_COLOR_OUTPUTS macro
* is attached to windows and specifies on which output the window should
* look correctly. The type is XA_STRING.
*/
#define XCM_COLOR_OUTPUTS "_ICC_COLOR_OUTPUTS"
/**
* The XCM_COLOR_DESKTOP macro
The atom is attached on the root window to tell about a color servers activ
ity.
The content is of type XA_STRING and has four sections separated by a
empty space char ' '.
The _ICC_COLOR_DESKTOP atom is a string with following usages:
- uniquely identify the colour server
- tell the name of the colour server
- tell the colour server is alive
All sections are separated by one space char ' ' for easy parsing.
The first section contains the process id (pid_t) of the color server proce
ss,
which has set the atom.
The second section contains time since epoch GMT as returned by time(NULL).
The thired section contains the bar '|' separated and surrounded
capabilities:
- ICP _ICC_COLOR_PROFILES
- ICM _ICC_COLOR_MANAGEMENT
- ICO _ICC_COLOR_OUTPUTS
- ICR _ICC_COLOR_REGIONS
- ICA _ICC_COLOR_DISPLAY_ADVANCED
- V0.3 indicates version compliance to the _ICC_Profile in X spec
The fourth section contains the servers name identifier.
As of this specification the third section must contain ICR and the
supported _ICC_PROFILE in X version.
A example of a valid atom might look like:
_ICC_COLOR_DESKTOP(STRING) = "4518 1274001512 |ICR|V0.3| compiz_colour_desk
top"
*/
#define XCM_COLOR_DESKTOP "_ICC_COLOR_DESKTOP"
#endif /* HAVE_X11 */
/**
* The XCM_COLOR_SERVER_ enums
* describe colour server capabilities as specified in XCM_COLOR_DESKTOP at
om.
*/
enum {
XCM_COLOR_SERVER_REGIONS = 0x01, /**< _ICC_COLOR_REGIONS */
XCM_COLOR_SERVER_PROFILES = 0x02, /**< _ICC_COLOR_PROFILES */
XCM_COLOR_SERVER_DISPLAY_ADVANCED = 0x04, /**< _ICC_COLOR_DISPLAY_ADVANC
ED */
XCM_COLOR_SERVER_OUTPUTS = 0x08 /**< _ICC_COLOR_OUTPUTS */
};
#ifdef HAVE_X11
/** Function XcmColorServerCapabilities
* @brief informs which colour server services are available
*
* Query the capabilities of a colour server. In case no colour server is
* running, the function should return zero. The return value consists of
a bit
* mask of XCM_COLOR_SERVER_ properties from the XCM_COLOR_DESKTOP atom.
*/
int XcmColorServerCapabilities ( Display *dpy );
/**
* The _ICC_DEVICE_PROFILE atom
The atom will hold a native ICC profile with the exposed device
characteristics at the compositing window manager level.
The colour server shall if no _ICC_DEVICE_PROFILE(_xxx) is set, copy the
_ICC_PROFILE(_xxx) profiles to each equivalent _ICC_DEVICE_PROFILE(_xxx) at
om.
The _ICC_PROFILE(_xxx) profiles shall be replaced by a sRGB ICC profile.
The counting in the atoms (_xxx) name section follows the rules outlined in
the ICC Profile in X recommendation. After finishing the session the the ol
d
state has to be recovered by copying any _ICC_DEVICE_PROFILE(_xxx) atoms
content into the appropriate _ICC_PROFILE(_xxx) atoms and removing all
_ICC_DEVICE_PROFILE(_xxx) atoms.
The colour server must be aware about change property events indicating tha
t
a _ICC_PROFILE(_xxx) atom has changed by a external application and needs t
o
move that profile to the appropriate _ICC_DEVICE_PROFILE(_xxx) atom and set
the _ICC_PROFILE(_xxx) atom to sRGB as well.
The modification of the _ICC_DEVICE_PROFILE(_xxx) atoms by external applica
tions
is undefined.
*/
#define XCM_DEVICE_PROFILE "_ICC_DEVICE_PROFILE"
/**
* @} *//*Xcm * @} *//*Xcm
*/ */
#endif /* HAVE_X11 */
#ifdef __cplusplus #ifdef __cplusplus
} /* extern "C" */ } /* extern "C" */
#endif /* __cplusplus */ #endif /* __cplusplus */
#endif /* __XCOLOR_H__ */ #endif /* __XCOLOR_H__ */
 End of changes. 9 change blocks. 
2 lines changed or deleted 115 lines changed or added


 XcmDDC.h   XcmDDC.h 
skipping to change at line 20 skipping to change at line 20
* @author Kai-Uwe Behrmann <ku.b@gmx.de> * @author Kai-Uwe Behrmann <ku.b@gmx.de>
* @par License: * @par License:
* MIT <http://www.opensource.org/licenses/mit-license.php> * MIT <http://www.opensource.org/licenses/mit-license.php>
* @since 2010/12/28 * @since 2010/12/28
*/ */
#ifndef XCM_DDC_H #ifndef XCM_DDC_H
#define XCM_DDC_H #define XCM_DDC_H
#include <stddef.h> /* size_t */ #include <stddef.h> /* size_t */
#if !defined(__APPLE__) && !defined(__FreeBSD__) #include "XcmVersion.h"
#if HAVE_LINUX
#ifdef __cplusplus #ifdef __cplusplus
extern "C" { extern "C" {
#endif /* __cplusplus */ #endif /* __cplusplus */
/** \addtogroup XcmDDC /** \addtogroup XcmDDC
* *
* @{ * @{
*/ */
skipping to change at line 55 skipping to change at line 57
/* basic access functions */ /* basic access functions */
XCM_DDC_ERROR_e XcmDDClist ( char *** devices, XCM_DDC_ERROR_e XcmDDClist ( char *** devices,
int * count ); int * count );
XCM_DDC_ERROR_e XcmDDCgetEDID ( const char * device, XCM_DDC_ERROR_e XcmDDCgetEDID ( const char * device,
char ** data, char ** data,
size_t * size ); size_t * size );
const char * XcmDDCErrorToString ( XCM_DDC_ERROR_e error ); const char * XcmDDCErrorToString ( XCM_DDC_ERROR_e error );
/** } XcmDDC */ /** @} XcmDDC */
#ifdef __cplusplus #ifdef __cplusplus
} /* extern "C" */ } /* extern "C" */
#endif /* __cplusplus */ #endif /* __cplusplus */
#endif /* !__APPLE__ && !__FreeBSD__ */ #endif /* HAVE_LINUX */
#endif /* XCM_DDC_H */ #endif /* XCM_DDC_H */
 End of changes. 3 change blocks. 
3 lines changed or deleted 5 lines changed or added


 XcmEdidParse.h   XcmEdidParse.h 
skipping to change at line 35 skipping to change at line 35
* *
* @{ * @{
*/ */
/* @internal /* @internal
* DDC struct */ * DDC struct */
typedef struct { typedef struct {
unsigned char sig[8]; unsigned char sig[8];
unsigned char mnft_id[2]; /* [8] manufaturer ID */ unsigned char mnft_id[2]; /* [8] manufaturer ID */
unsigned char model_id[2]; /* [10] model ID */ unsigned char model_id[2]; /* [10] model ID */
unsigned char ser_id[2]; /* [12] serial ID */ unsigned char ser_id[4]; /* [12] serial ID */
unsigned char dummy_li[2];
unsigned char week; /* [16] Week */ unsigned char week; /* [16] Week */
unsigned char year; /* [17] + 1990 => Year */ unsigned char year; /* [17] + 1990 => Year */
unsigned char major_version; /* [18] */ unsigned char major_version; /* [18] */
unsigned char minor_version; /* [19] */ unsigned char minor_version; /* [19] */
unsigned char video_input_type; /* [20] */ unsigned char video_input_type; /* [20] */
unsigned char width; /* [21] */ unsigned char width; /* [21] */
unsigned char height; /* [22] */ unsigned char height; /* [22] */
unsigned char gamma_factor; /* [23] */ unsigned char gamma_factor; /* [23] */
unsigned char dpms; /* [24] */ unsigned char dpms; /* [24] */
unsigned char rg; /* [25] colour information */ unsigned char rg; /* [25] colour information */
skipping to change at line 112 skipping to change at line 111
XCM_EDID_ERROR_e XcmEdidPrintOpenIccJSON ( void * edid, XCM_EDID_ERROR_e XcmEdidPrintOpenIccJSON ( void * edid,
char ** text, char ** text,
void *(*alloc)(size_t sz ) ); void *(*alloc)(size_t sz ) );
/** full length vendor, string */ /** full length vendor, string */
#define XCM_EDID_KEY_VENDOR "vendor" #define XCM_EDID_KEY_VENDOR "vendor"
/** full length device model, string */ /** full length device model, string */
#define XCM_EDID_KEY_MODEL "model" #define XCM_EDID_KEY_MODEL "model"
/** full length device serial number, string */ /** full length device serial number, string */
#define XCM_EDID_KEY_SERIAL "serial" #define XCM_EDID_KEY_SERIAL "serial"
/** colorimetric primary red CIE*xyY x component, double */ /** colorimetric primary red CIE*xyY x component, double */
#define XCM_EDID_KEY_REDx "redx" #define XCM_EDID_KEY_REDx "red_x"
/** colorimetric primary red CIE*xyY y component, double */ /** colorimetric primary red CIE*xyY y component, double */
#define XCM_EDID_KEY_REDy "redy" #define XCM_EDID_KEY_REDy "red_y"
/** colorimetric primary green CIE*xyY x component, double */ /** colorimetric primary green CIE*xyY x component, double */
#define XCM_EDID_KEY_GREENx "greenx" #define XCM_EDID_KEY_GREENx "green_x"
/** colorimetric primary green CIE*xyY y component, double */ /** colorimetric primary green CIE*xyY y component, double */
#define XCM_EDID_KEY_GREENy "greeny" #define XCM_EDID_KEY_GREENy "green_y"
/** colorimetric primary blue CIE*xyY x component, double */ /** colorimetric primary blue CIE*xyY x component, double */
#define XCM_EDID_KEY_BLUEx "bluex" #define XCM_EDID_KEY_BLUEx "blue_x"
/** colorimetric primary blue CIE*xyY y component, double */ /** colorimetric primary blue CIE*xyY y component, double */
#define XCM_EDID_KEY_BLUEy "bluey" #define XCM_EDID_KEY_BLUEy "blue_y"
/** colorimetric primary white CIE*xyY x component, double */ /** colorimetric primary white CIE*xyY x component, double */
#define XCM_EDID_KEY_WHITEy "whitex" #define XCM_EDID_KEY_WHITEx "white_x"
/** colorimetric primary white CIE*xyY y component, double */ /** colorimetric primary white CIE*xyY y component, double */
#define XCM_EDID_KEY_WHITEx "whitey" #define XCM_EDID_KEY_WHITEy "white_y"
/** colorimetric single gamma for all channels, double */ /** colorimetric single gamma for all channels, double */
#define XCM_EDID_KEY_GAMMA "gamma" #define XCM_EDID_KEY_GAMMA "gamma"
/** manufactur week, integer */ /** manufactur week, integer */
#define XCM_EDID_KEY_WEEK "week" #define XCM_EDID_KEY_WEEK "week"
/** manufactur year, integer */ /** manufactur year, integer */
#define XCM_EDID_KEY_YEAR "year" #define XCM_EDID_KEY_YEAR "year"
/** manufacturer ID, integer */ /** manufacturer ID, integer */
#define XCM_EDID_KEY_MNFT_ID "mnft_id" #define XCM_EDID_KEY_MNFT_ID "mnft_id"
/** model ID, integer */ /** model ID, integer */
#define XCM_EDID_KEY_MODEL_ID "model_id" #define XCM_EDID_KEY_MODEL_ID "model_id"
 End of changes. 9 change blocks. 
10 lines changed or deleted 9 lines changed or added


 XcmEvents.h   XcmEvents.h 
skipping to change at line 36 skipping to change at line 36
#ifdef __cplusplus #ifdef __cplusplus
extern "C" { extern "C" {
#endif /* __cplusplus */ #endif /* __cplusplus */
/** \addtogroup XcmEvents X Color Management Event API's /** \addtogroup XcmEvents X Color Management Event API's
* @{ * @{
*/ */
/** @brief net-color spec atoms */ /** @brief X Color Management spec atoms */
#define XCM_ICC_COLOUR_SERVER_TARGET_PROFILE_IN_X_BASE "_ICC_DEVICE_PROFILE " #define XCM_ICC_COLOUR_SERVER_TARGET_PROFILE_IN_X_BASE "_ICC_DEVICE_PROFILE "
#define XCM_COLOUR_DESKTOP_ADVANCED "_ICC_COLOR_DISPLAY_ADVANCED"
/** @brief _ICC_PROFILE_(xxx) in X spec atoms */ /** @brief _ICC_PROFILE_(xxx) in X spec atoms */
#define XCM_ICC_V0_3_TARGET_PROFILE_IN_X_BASE "_ICC_PROFILE" #define XCM_ICC_V0_3_TARGET_PROFILE_IN_X_BASE "_ICC_PROFILE"
const char * XcmePrintWindowName ( Display * display, const char * XcmePrintWindowName ( Display * display,
Window w ); Window w );
void XcmePrintWindowRegions ( Display * display, const char * XcmePrintWindowRegions ( Display * display,
Window w, Window w,
int always ); int always );
/** @brief context for parsing events */ /** @brief context for parsing events */
typedef struct XcmeContext_s_ XcmeContext_s; typedef struct XcmeContext_s_ XcmeContext_s;
XcmeContext_s * XcmeContext_s *
XcmeContext_New ( ); XcmeContext_New ( );
XcmeContext_s * XcmeContext_s *
XcmeContext_Create ( const char * display_name ); XcmeContext_Create ( const char * display_name );
int XcmeContext_Setup ( XcmeContext_s * c, int XcmeContext_Setup ( XcmeContext_s * c,
const char * display_name ); const char * display_name );
int XcmeContext_Setup2 ( XcmeContext_s * c,
const char * display_name,
int flags );
int XcmeContext_Release ( XcmeContext_s ** c ); int XcmeContext_Release ( XcmeContext_s ** c );
int XcmeContext_InLoop ( XcmeContext_s * c, int XcmeContext_InLoop ( XcmeContext_s * c,
XEvent * event ); XEvent * event );
Display *XcmeContext_DisplayGet ( XcmeContext_s * c ); Display *XcmeContext_DisplayGet ( XcmeContext_s * c );
int XcmeContext_DisplaySet ( XcmeContext_s * c, int XcmeContext_DisplaySet ( XcmeContext_s * c,
Display * display ); Display * display );
int XcmeContext_WindowSet ( XcmeContext_s * c, int XcmeContext_WindowSet ( XcmeContext_s * c,
Window window ); Window window );
/** @brief customisable signals for a observer */ /** @brief customisable signals for a observer */
skipping to change at line 95 skipping to change at line 99
typedef char*(*XcmICCprofileGetName_f)(const void * data, typedef char*(*XcmICCprofileGetName_f)(const void * data,
size_t size, size_t size,
void *(allocate_func)(s ize_t), void *(allocate_func)(s ize_t),
int file_name ); int file_name );
void XcmICCprofileGetNameFuncSet void XcmICCprofileGetNameFuncSet
( XcmICCprofileGetName_f getName ); ( XcmICCprofileGetName_f getName );
void XcmICCprofileFromMD5FuncSet void XcmICCprofileFromMD5FuncSet
( XcmICCprofileGetFromMD5_f fromMD5 ); ( XcmICCprofileGetFromMD5_f fromMD5 );
/** } XcmEvents */ /** @} XcmEvents */
#ifdef __cplusplus #ifdef __cplusplus
} /* extern "C" */ } /* extern "C" */
#endif /* __cplusplus */ #endif /* __cplusplus */
#endif /* XCM_EVENTS_H */ #endif /* XCM_EVENTS_H */
 End of changes. 5 change blocks. 
3 lines changed or deleted 7 lines changed or added

This html diff was produced by rfcdiff 1.41. The latest version is available from http://tools.ietf.org/tools/rfcdiff/