Enlightenment CVS committal
Author : handyande
Project : e17
Module : libs/ecore
Dir : e17/libs/ecore/src/lib/ecore_x
Modified Files:
Ecore_X.h ecore_x_window.c
Log Message:
Change the colour calls to work on all bitdepths
===================================================================
RCS file: /cvsroot/enlightenment/e17/libs/ecore/src/lib/ecore_x/Ecore_X.h,v
retrieving revision 1.88
retrieving revision 1.89
diff -u -3 -r1.88 -r1.89
--- Ecore_X.h 4 Jan 2005 13:43:27 -0000 1.88
+++ Ecore_X.h 4 Jan 2005 21:54:04 -0000 1.89
@@ -840,7 +840,9 @@
EAPI Ecore_X_Window ecore_x_window_parent_get(Ecore_X_Window win);
EAPI void ecore_x_window_background_color_set(Ecore_X_Window win,
- unsigned long color);
+ unsigned short r,
+ unsigned short g,
+ unsigned short b);
EAPI void ecore_x_window_gravity_set(Ecore_X_Window win,
Ecore_X_Gravity grav);
EAPI void ecore_x_window_pixel_gravity_set(Ecore_X_Window win,
===================================================================
RCS file:
/cvsroot/enlightenment/e17/libs/ecore/src/lib/ecore_x/ecore_x_window.c,v
retrieving revision 1.35
retrieving revision 1.36
diff -u -3 -r1.35 -r1.36
--- ecore_x_window.c 4 Dec 2004 10:10:29 -0000 1.35
+++ ecore_x_window.c 4 Jan 2005 21:54:10 -0000 1.36
@@ -713,11 +713,21 @@
* @param color The color to set to (i.e. 0xff0000)
*/
void
-ecore_x_window_background_color_set(Ecore_X_Window win, unsigned long color)
+ecore_x_window_background_color_set(Ecore_X_Window win, unsigned short r,
+ unsigned short g, unsigned short b)
{
XSetWindowAttributes attr;
+ XColor col;
- attr.background_pixel = color;
+ col.red = r;
+ col.green = g;
+ col.blue = b;
+
+ XAllocColor(_ecore_x_disp, DefaultColormap(_ecore_x_disp,
+ DefaultScreen(_ecore_x_disp)),
+ &col);
+
+ attr.background_pixel = col.pixel;
XChangeWindowAttributes(_ecore_x_disp, win, CWBackPixel, &attr);
}
-------------------------------------------------------
The SF.Net email is sponsored by: Beat the post-holiday blues
Get a FREE limited edition SourceForge.net t-shirt from ThinkGeek.
It's fun and FREE -- well, almost....http://www.thinkgeek.com/sfshirt
_______________________________________________
enlightenment-cvs mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs