Update of /cvsroot/scsh/scx/c/xlib
In directory usw-pr-cvs1:/tmp/cvs-serv17475
Modified Files:
colormap.c
Log Message:
added the Scx_parse_Color Funktion.
Index: colormap.c
===================================================================
RCS file: /cvsroot/scsh/scx/c/xlib/colormap.c,v
retrieving revision 1.5
retrieving revision 1.6
diff -C2 -r1.5 -r1.6
*** colormap.c 2001/07/31 14:51:21 1.5
--- colormap.c 2001/08/22 14:51:06 1.6
***************
*** 43,50 ****
--- 43,63 ----
}
+ // swaped from util.c to this file
+ s48_value scx_Parse_Color (s48_value Xdpy, s48_value cmap, s48_value spec) {
+ XColor ret;
+
+ if (XParseColor (SCX_EXTRACT_DISPLAY(Xdpy),
+ SCX_EXTRACT_COLORMAP(cmap),
+ s48_extract_string(spec),
+ &ret))
+ return scx_create_Color (ret.red, ret.green, ret.blue);
+ return S48_FALSE;
+ }
+
void scx_init_colormap(void) {
S48_EXPORT_FUNCTION(scx_Free_Colormap);
S48_EXPORT_FUNCTION(scx_Alloc_Color);
S48_EXPORT_FUNCTION(scx_Alloc_Named_Color);
+ S48_EXPORT_FUNKTION(scx_Parse_Color);
}
|