forked from enlightenment/efl
Cleanup ecore_x_window_background_color_set().
SVN revision: 32553
This commit is contained in:
parent
ee259f860f
commit
6983cf7503
|
@ -1123,24 +1123,26 @@ ecore_x_window_parent_get(Ecore_X_Window win)
|
||||||
/**
|
/**
|
||||||
* Sets the background color of the given window.
|
* Sets the background color of the given window.
|
||||||
* @param win The given window
|
* @param win The given window
|
||||||
* @param color The color to set to (i.e. 0xff0000)
|
* @param r red value (0...65536, 16 bits)
|
||||||
|
* @param g green value (0...65536, 16 bits)
|
||||||
|
* @param b blue value (0...65536, 16 bits)
|
||||||
*/
|
*/
|
||||||
EAPI void
|
EAPI void
|
||||||
ecore_x_window_background_color_set(Ecore_X_Window win, unsigned short r,
|
ecore_x_window_background_color_set(Ecore_X_Window win, unsigned short r,
|
||||||
unsigned short g, unsigned short b)
|
unsigned short g, unsigned short b)
|
||||||
{
|
{
|
||||||
XSetWindowAttributes attr;
|
XSetWindowAttributes attr;
|
||||||
|
Colormap map;
|
||||||
XColor col;
|
XColor col;
|
||||||
|
|
||||||
col.red = r;
|
col.red = r;
|
||||||
col.green = g;
|
col.green = g;
|
||||||
col.blue = b;
|
col.blue = b;
|
||||||
|
|
||||||
XAllocColor(_ecore_x_disp, DefaultColormap(_ecore_x_disp,
|
map = DefaultColormap(_ecore_x_disp, DefaultScreen(_ecore_x_disp));
|
||||||
DefaultScreen(_ecore_x_disp)),
|
XAllocColor(_ecore_x_disp, map, &col);
|
||||||
&col);
|
|
||||||
|
attr.background_pixel = col.pixel;
|
||||||
attr.background_pixel = col.pixel;
|
|
||||||
XChangeWindowAttributes(_ecore_x_disp, win, CWBackPixel, &attr);
|
XChangeWindowAttributes(_ecore_x_disp, win, CWBackPixel, &attr);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue