summaryrefslogtreecommitdiff
path: root/src/lib/ecore_x
diff options
context:
space:
mode:
authorChris Michael <cpmichael@osg.samsung.com>2016-04-05 09:39:33 -0400
committerChris Michael <cpmichael@osg.samsung.com>2016-04-05 09:39:33 -0400
commit48bfcd106f7c355e8e921b66b286562009dad858 (patch)
treefc7ab08e52a5d3e068c43b402d798c5a28808365 /src/lib/ecore_x
parent25b0dced344133548d3e1a62766358eb9659d20f (diff)
ecore-xcb: Add implementation for missing API function
This patch adds an xcb implementation for missing ecore_x_randr_edid_display_ascii_get function @fix Signed-off-by: Chris Michael <cpmichael@osg.samsung.com>
Diffstat (limited to 'src/lib/ecore_x')
-rw-r--r--src/lib/ecore_x/xcb/ecore_xcb_randr.c32
1 files changed, 32 insertions, 0 deletions
diff --git a/src/lib/ecore_x/xcb/ecore_xcb_randr.c b/src/lib/ecore_x/xcb/ecore_xcb_randr.c
index ad50ddaab2..e7245005f7 100644
--- a/src/lib/ecore_x/xcb/ecore_xcb_randr.c
+++ b/src/lib/ecore_x/xcb/ecore_xcb_randr.c
@@ -2970,6 +2970,38 @@ ecore_x_randr_edid_display_name_get(unsigned char *edid, unsigned long edid_leng
2970 return NULL; 2970 return NULL;
2971} 2971}
2972 2972
2973EAPI char *
2974ecore_x_randr_edid_display_ascii_get(unsigned char *edid, unsigned long edid_length)
2975{
2976#ifdef ECORE_XCB_RANDR
2977 unsigned char *block = NULL;
2978 int version = 0;
2979
2980 version = ecore_x_randr_edid_version_get(edid, edid_length);
2981 if (version < ECORE_X_RANDR_EDID_VERSION_13) return NULL;
2982
2983 _ECORE_X_RANDR_EDID_FOR_EACH_NON_PIXEL_DESCRIPTOR_BLOCK(edid, block)
2984 {
2985 if (block[_ECORE_X_RANDR_EDID_OFFSET_DESCRIPTOR_BLOCK_TYPE] == 0xfe)
2986 {
2987 char *ascii = NULL, *p = NULL;
2988 const char *edid_ascii;
2989
2990 edid_ascii = (const char *)block + 5;
2991
2992 if (!(ascii = malloc(14))) return NULL;
2993 strncpy(ascii, edid_ascii, 13);
2994 ascii[13] = 0;
2995 for (p = ascii; *p; p++)
2996 if ((*p < ' ') || (*p > '~')) *p = 0;
2997
2998 return ascii;
2999 }
3000 }
3001#endif
3002 return NULL;
3003}
3004
2973EAPI Eina_Bool 3005EAPI Eina_Bool
2974ecore_x_randr_edid_has_valid_header(unsigned char *edid, unsigned long edid_length) 3006ecore_x_randr_edid_has_valid_header(unsigned char *edid, unsigned long edid_length)
2975{ 3007{