forked from enlightenment/efl
Change the colour calls to work on all bitdepths
SVN revision: 12744
This commit is contained in:
parent
b24984a765
commit
68d6c5facf
|
@ -840,7 +840,9 @@ EAPI Ecore_X_Window ecore_x_window_at_xy_get(int x, int y);
|
|||
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,
|
||||
|
|
|
@ -713,11 +713,21 @@ ecore_x_window_parent_get(Ecore_X_Window win)
|
|||
* @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);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue