Xcm
0.4.2
|
EDID data block parsing. More...
Defines | |
#define | XCM_EDID_KEY_VENDOR "vendor" |
#define | XCM_EDID_KEY_MODEL "model" |
#define | XCM_EDID_KEY_SERIAL "serial" |
#define | XCM_EDID_KEY_REDx "redx" |
#define | XCM_EDID_KEY_REDy "redy" |
#define | XCM_EDID_KEY_GREENx "greenx" |
#define | XCM_EDID_KEY_GREENy "greeny" |
#define | XCM_EDID_KEY_BLUEx "bluex" |
#define | XCM_EDID_KEY_BLUEy "bluey" |
#define | XCM_EDID_KEY_WHITEy "whitex" |
#define | XCM_EDID_KEY_WHITEx "whitey" |
#define | XCM_EDID_KEY_GAMMA "gamma" |
#define | XCM_EDID_KEY_WEEK "week" |
#define | XCM_EDID_KEY_YEAR "year" |
#define | XCM_EDID_KEY_MNFT_ID "mnft_id" |
#define | XCM_EDID_KEY_MODEL_ID "model_id" |
#define | XCM_EDID_KEY_MNFT "mnft" |
#define | XCM_EDID_KEY_MANUFACTURER "manufacturer" |
#define | XCM_EDID_KEY_A3RED "a3red" |
#define | XCM_EDID_KEY_A2RED "a2red" |
#define | XCM_EDID_KEY_A3GREEN "a3green" |
#define | XCM_EDID_KEY_A2GREEN "a2green" |
#define | XCM_EDID_KEY_A3BLUE "a3blue" |
#define | XCM_EDID_KEY_A2BLUE "a2blue" |
Functions | |
XCM_EDID_ERROR_e | XcmEdidParse (void *edid, XcmEdidKeyValue_s **list, int *count) |
EDID to key/value pair transformation. | |
XCM_EDID_ERROR_e | XcmEdidFree (XcmEdidKeyValue_s **list) |
free library allocated list | |
const char * | XcmEdidErrorToString (XCM_EDID_ERROR_e error) |
convert enum into a meaningful text string | |
XCM_EDID_ERROR_e | XcmEdidPrintString (void *edid, char **text, void *(*alloc)(size_t sz)) |
convert a EDID block into text | |
XCM_EDID_ERROR_e | XcmEdidPrintOpenIccJSON (void *edid, char **text, void *(*alloc)(size_t sz)) |
convert a EDID block into a device configuration |
EDID data block parsing.
The purpouse of this API is to obtain basic and displayable device identification strings and colorimetric informations contained in the EDID data block sent by monitors.
The user has to pass in a valid EDID block. This can be obtained per a root window X atom or a XRandR output property and is not part of this API. The data block is passed to XcmEdidParse(). This function generates a list of key value pairs, with some first rough interpretation. The key/values are useable for data bases, ICC profile generation or device identification. The returned XcmEdidKeyValue_s list elements can be individually read and worked with. Please look as well on the XcmEdidPrintString() function and examples/edid-parse/ as a small example on how to use the API. The XcmEdidPrintOpenIccJSON() will pull out a JSON data structure. XcmEdidFree() releases allocated list memory.
XcmEdidParse.h
Xcm Xorg Colour Management
#define XCM_EDID_KEY_A2BLUE "a2blue" |
transfer value for blue component, double
#define XCM_EDID_KEY_A2GREEN "a2green" |
transfer value for green component, double
#define XCM_EDID_KEY_A2RED "a2red" |
transfer value for red component, double
#define XCM_EDID_KEY_A3BLUE "a3blue" |
transfer value for blue component, double
#define XCM_EDID_KEY_A3GREEN "a3green" |
transfer value for green component, double
#define XCM_EDID_KEY_A3RED "a3red" |
transfer value for red component, double
#define XCM_EDID_KEY_BLUEx "bluex" |
colorimetric primary blue CIE*xyY x component, double
#define XCM_EDID_KEY_BLUEy "bluey" |
colorimetric primary blue CIE*xyY y component, double
#define XCM_EDID_KEY_GAMMA "gamma" |
colorimetric single gamma for all channels, double
#define XCM_EDID_KEY_GREENx "greenx" |
colorimetric primary green CIE*xyY x component, double
#define XCM_EDID_KEY_GREENy "greeny" |
colorimetric primary green CIE*xyY y component, double
#define XCM_EDID_KEY_MANUFACTURER "manufacturer" |
full length manufacturer, string
#define XCM_EDID_KEY_MNFT "mnft" |
manufacturer ID, string
#define XCM_EDID_KEY_MNFT_ID "mnft_id" |
manufacturer ID, integer
#define XCM_EDID_KEY_MODEL "model" |
full length device model, string
#define XCM_EDID_KEY_MODEL_ID "model_id" |
model ID, integer
#define XCM_EDID_KEY_REDx "redx" |
colorimetric primary red CIE*xyY x component, double
#define XCM_EDID_KEY_REDy "redy" |
colorimetric primary red CIE*xyY y component, double
#define XCM_EDID_KEY_SERIAL "serial" |
full length device serial number, string
#define XCM_EDID_KEY_VENDOR "vendor" |
full length vendor, string
#define XCM_EDID_KEY_WEEK "week" |
manufactur week, integer
#define XCM_EDID_KEY_WHITEx "whitey" |
colorimetric primary white CIE*xyY y component, double
#define XCM_EDID_KEY_WHITEy "whitex" |
colorimetric primary white CIE*xyY x component, double
#define XCM_EDID_KEY_YEAR "year" |
manufactur year, integer
const char * XcmEdidErrorToString | ( | XCM_EDID_ERROR_e | error | ) |
convert enum into a meaningful text string
Function XcmEdidErrorToString
[in] | error | the error |
XCM_EDID_ERROR_e XcmEdidFree | ( | XcmEdidKeyValue_s ** | list | ) |
free library allocated list
Function XcmEdidFree
[in,out] | list | the key/value data structures |
XCM_EDID_ERROR_e XcmEdidParse | ( | void * | edid, |
XcmEdidKeyValue_s ** | list, | ||
int * | count | ||
) |
EDID to key/value pair transformation.
Function XcmEdidParse The function performs no verification of the data block other than the first eight byte block signature.
[in] | edid | EDID data block 128 or 256 bytes long |
[out] | list | the key/value data structures |
[in,out] | count | pass in a pointer to a int. gives the number of elements in list |
XCM_EDID_ERROR_e XcmEdidPrintOpenIccJSON | ( | void * | edid, |
char ** | text, | ||
void *(*)(size_t sz) | alloc | ||
) |
convert a EDID block into a device configuration
Function XcmEdidPrintOpenIccJSON
[in] | edid | the EDID data block |
[out] | text | the resulting text string |
[in] | alloc | a user provided function to allocate text |
XCM_EDID_ERROR_e XcmEdidPrintString | ( | void * | edid, |
char ** | text, | ||
void *(*)(size_t sz) | alloc | ||
) |
convert a EDID block into text
Function XcmEdidPrintString
[in] | edid | the EDID data block |
[out] | text | the resulting text string |
[in] | alloc | a user provided function to allocate text |