summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStephane Marchesin <stephane.marchesin@gmail.com>2010-05-07 21:21:54 -0700
committerStephane Marchesin <stephane.marchesin@gmail.com>2010-05-07 21:21:54 -0700
commit5d8136b120819d3fb3f92dea832147f54dab2669 (patch)
tree24ac188785c203a724747fb57c13e0958c592102
parenta54e8e11f50279ac03273d047688d2681a059893 (diff)
More color.
-rw-r--r--xlib_api.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/xlib_api.c b/xlib_api.c
index 67f13c5..760e80d 100644
--- a/xlib_api.c
+++ b/xlib_api.c
@@ -192,7 +192,7 @@ Status XParseColor(
XColor* exact_def_return
)
{
- unsigned short r,g,b;
+ unsigned long r,g,b;
if (!spec)
return BadValue;
if (spec[0] == '#')
@@ -222,6 +222,10 @@ Status XParseColor(
default:
return BadValue;
}
+ exact_def_return -> red = r;
+ exact_def_return -> green = g;
+ exact_def_return -> blue = b;
+ exact_def_return -> pixel = (r << 32) | (g << 16) | b;
printf("parse color ok %x-%x-%x\n",r>>8,g>>8,b>>8);
}
else