Enlightenment CVS committal
Author : kwo
Project : e16
Module : e
Dir : e16/e/src
Modified Files:
backgrounds.c cursors.c draw.c iclass.c tclass.c tclass.h
text.c text_xft.c ttfont.c x.c xwin.h
Log Message:
XColor -> EColor, EGet/SetColor -> macros.
===================================================================
RCS file: /cvs/e/e16/e/src/backgrounds.c,v
retrieving revision 1.99
retrieving revision 1.100
diff -u -3 -r1.99 -r1.100
--- backgrounds.c 27 Jul 2007 16:59:49 -0000 1.99
+++ backgrounds.c 28 Aug 2007 17:58:23 -0000 1.100
@@ -51,7 +51,7 @@
char *name;
Pixmap pmap;
time_t last_viewed;
- XColor bg_solid;
+ EColor bg_solid;
char bg_tile;
BgPart bg;
BgPart top;
@@ -80,7 +80,7 @@
int r, g, b;
int n1, n2, n3, n4, n5, f1, f2, f3, f4, f5, f6;
- EGetColor(&(bg->bg_solid), &r, &g, &b);
+ GET_COLOR(&(bg->bg_solid), r, g, b);
n1 = (r << 24) | (g << 16) | (b << 8) | (bg->bg_tile << 7)
| (bg->bg.keep_aspect << 6) | (bg->top.keep_aspect << 5);
n2 = (bg->bg.xjust << 16) | (bg->bg.yjust);
@@ -287,7 +287,7 @@
}
static Background *
-BackgroundCreate(const char *name, XColor * solid, const char *bgn, char tile,
+BackgroundCreate(const char *name, EColor * solid, const char *bgn, char tile,
char keep_aspect, int xjust, int yjust, int xperc,
int yperc, const char *top, char tkeep_aspect, int txjust,
int tyjust, int txperc, int typerc)
@@ -300,7 +300,7 @@
bg->name = Estrdup(name);
- ESetColor(&(bg->bg_solid), 160, 160, 160);
+ SET_COLOR(&(bg->bg_solid), 160, 160, 160);
if (solid)
bg->bg_solid = *solid;
else
@@ -402,7 +402,7 @@
}
static int
-BackgroundModify(Background * bg, XColor * solid, const char *bgn, char tile,
+BackgroundModify(Background * bg, EColor * solid, const char *bgn, char tile,
char keep_aspect, int xjust, int yjust, int xperc,
int yperc, const char *top, char tkeep_aspect, int txjust,
int tyjust, int txperc, int typerc)
@@ -799,7 +799,7 @@
{
Background *bg;
EImage *im, *im2;
- XColor xclr;
+ EColor color;
char tile = 1, keep_asp = 0;
int width, height;
int scalex = 0, scaley = 0;
@@ -898,9 +898,9 @@
keep_asp = 1;
}
- ESetColor(&xclr, 0, 0, 0);
+ SET_COLOR(&color, 0, 0, 0);
- bg = BackgroundCreate(bgid, &xclr, file, tile,
+ bg = BackgroundCreate(bgid, &color, file, tile,
keep_asp, justx, justy,
scalex, scaley, NULL, 0, 0, 0, 0, 0);
@@ -1014,7 +1014,7 @@
{
int r, g, b;
- EGetColor(&(bg->bg_solid), &r, &g, &b);
+ GET_COLOR(&(bg->bg_solid), r, g, b);
Esnprintf(buf, len,
"%s ref_count %u keepim %u\n"
" bg.solid\t %i %i %i \n"
@@ -1039,7 +1039,7 @@
{
int r, g, b;
- EGetColor(&(bg->bg_solid), &r, &g, &b);
+ GET_COLOR(&(bg->bg_solid), r, g, b);
Esnprintf(buf, len,
"%s %i %i %i %s %i %i %i %i %i %i %s %i %i %i %i %i",
bg->name, r, g, b, S(bg->bg.file), bg->bg_tile,
@@ -1112,7 +1112,7 @@
{
int err = 0;
Background *bg = 0;
- XColor xclr;
+ EColor color;
char s[FILEPATH_LEN_MAX];
char s2[FILEPATH_LEN_MAX];
int ii1;
@@ -1129,7 +1129,7 @@
ColorModifierClass *cm = NULL;
#endif
- ESetColor(&xclr, 0, 0, 0);
+ SET_COLOR(&color, 0, 0, 0);
while (GetLine(s, sizeof(s), fs))
{
@@ -1163,7 +1163,7 @@
}
if (ok)
{
- bg = BackgroundCreate(name, &xclr, bg1, i1, i2, i3,
+ bg = BackgroundCreate(name, &color, bg1, i1, i2, i3,
i4, i5, i6, bg2, j1, j2, j3,
j4, j5);
#if ENABLE_COLOR_MODIFIERS
@@ -1206,7 +1206,7 @@
if (!ignore)
{
if (!bg)
- bg = BackgroundCreate(name, &xclr, bg1, i1, i2,
+ bg = BackgroundCreate(name, &color, bg1, i1, i2,
i3, i4, i5, i6, bg2, j1,
j2, j3, j4, j5);
}
@@ -1218,9 +1218,9 @@
case BG_RGB:
r = g = b = 0;
sscanf(s, "%*s %d %d %d", &r, &g, &b);
- ESetColor(&xclr, r, g, b);
+ SET_COLOR(&color, r, g, b);
if (ignore)
- bg->bg_solid = xclr;
+ bg->bg_solid = color;
break;
case BG_BG1:
@@ -1324,7 +1324,7 @@
fprintf(fs, "5 999\n");
fprintf(fs, "100 %s\n", bg->name);
- EGetColor(&(bg->bg_solid), &r, &g, &b);
+ GET_COLOR(&(bg->bg_solid), r, g, b);
fprintf(fs, "560 %d %d %d\n", r, g, b);
if ((bg->bg.file) && (!bg->bg.real_file))
@@ -1530,7 +1530,7 @@
Conf.backgrounds.user = tmp_userbg;
Conf.hints.set_xroot_info_on_root_window = tmp_root_hint;
- ESetColor(&(tmp_bg->bg_solid), tmp_bg_r, tmp_bg_g, tmp_bg_b);
+ SET_COLOR(&(tmp_bg->bg_solid), tmp_bg_r, tmp_bg_g, tmp_bg_b);
tmp_bg->bg_tile = tmp_bg_tile;
tmp_bg->bg.keep_aspect = tmp_bg_keep_aspect;
tmp_bg->bg.xjust = tmp_bg_xjust;
@@ -1559,7 +1559,7 @@
int w, h;
DItem *di;
Win win;
- XColor xclr;
+ EColor color;
const char *fbg, *ffg;
if (!tmp_bg)
@@ -1572,8 +1572,8 @@
pmap = EGetWindowBackgroundPixmap(win);
fbg = (tmp_bg_image) ? BackgroundGetBgFile(tmp_bg) : NULL;
ffg = (tmp_bg_image) ? BackgroundGetFgFile(tmp_bg) : NULL;
- ESetColor(&xclr, tmp_bg_r, tmp_bg_g, tmp_bg_b);
- bg = BackgroundCreate("TEMP", &xclr, fbg, tmp_bg_tile,
+ SET_COLOR(&color, tmp_bg_r, tmp_bg_g, tmp_bg_b);
+ bg = BackgroundCreate("TEMP", &color, fbg, tmp_bg_tile,
tmp_bg_keep_aspect, tmp_bg_xjust,
1024 - tmp_bg_yjust, tmp_bg_xperc,
1024 - tmp_bg_yperc, ffg,
@@ -1592,7 +1592,7 @@
{
tmp_bg_image = (tmp_bg->bg.file) ? 1 : 0;
- EGetColor(&(tmp_bg->bg_solid), &tmp_bg_r, &tmp_bg_g, &tmp_bg_b);
+ GET_COLOR(&(tmp_bg->bg_solid), tmp_bg_r, tmp_bg_g, tmp_bg_b);
tmp_bg_tile = tmp_bg->bg_tile;
tmp_bg_keep_aspect = tmp_bg->bg.keep_aspect;
tmp_bg_xjust = tmp_bg->bg.xjust;
@@ -1661,14 +1661,14 @@
void *data __UNUSED__)
{
char s[1024];
- XColor xclr;
+ EColor color;
int lower, upper;
Esnprintf(s, sizeof(s), "__NEWBG_%i", (unsigned)time(NULL));
- ESetColor(&xclr, tmp_bg_r, tmp_bg_g, tmp_bg_b);
+ SET_COLOR(&color, tmp_bg_r, tmp_bg_g, tmp_bg_b);
- tmp_bg = BackgroundCreate(s, &xclr, tmp_bg->bg.file, tmp_bg_tile,
+ tmp_bg = BackgroundCreate(s, &color, tmp_bg->bg.file, tmp_bg_tile,
tmp_bg_keep_aspect, tmp_bg_xjust,
1024 - tmp_bg_yjust, tmp_bg_xperc,
1024 - tmp_bg_yperc, tmp_bg->top.file,
@@ -2353,7 +2353,7 @@
char type[FILEPATH_LEN_MAX];
int len, value;
Background *bg;
- XColor xclr;
+ EColor color;
if (!p || !p[0])
return;
@@ -2361,8 +2361,8 @@
bg = BackgroundFind(name);
if (!bg)
{
- ESetColor(&xclr, 0, 0, 0);
- bg = BackgroundCreate(name, &xclr, NULL, 0, 0, 0,
+ SET_COLOR(&color, 0, 0, 0);
+ bg = BackgroundCreate(name, &color, NULL, 0, 0, 0,
0, 0, 0, NULL, 0, 0, 0, 0, 0);
if (!bg)
{
@@ -2383,7 +2383,7 @@
r = g = b = 0;
sscanf(p, "%i %i %i", &r, &g, &b);
- ESetColor(&(bg->bg_solid), r, g, b);
+ SET_COLOR(&(bg->bg_solid), r, g, b);
}
else if (!strcmp(type, "bg.file"))
{
@@ -2452,7 +2452,7 @@
BackgroundSet2(const char *name, const char *params)
{
Background *bg;
- XColor xclr;
+ EColor color;
unsigned int i;
int r, g, b;
char bgf[FILEPATH_LEN_MAX], topf[FILEPATH_LEN_MAX];
@@ -2470,18 +2470,18 @@
&r, &g, &b,
bgf, &tile, &keep_aspect, &xjust, &yjust, &xperc, &yperc,
topf, &tkeep_aspect, &txjust, &tyjust, &txperc, &typerc);
- ESetColor(&xclr, r, g, b);
+ SET_COLOR(&color, r, g, b);
bg = BackgroundFind(name);
if (bg)
{
- BackgroundModify(bg, &xclr, bgf, tile, keep_aspect, xjust,
+ BackgroundModify(bg, &color, bgf, tile, keep_aspect, xjust,
yjust, xperc, yperc, topf, tkeep_aspect,
txjust, tyjust, txperc, typerc);
}
else
{
- bg = BackgroundCreate(name, &xclr, bgf, tile, keep_aspect, xjust,
+ bg = BackgroundCreate(name, &color, bgf, tile, keep_aspect, xjust,
yjust, xperc, yperc, topf, tkeep_aspect,
txjust, tyjust, txperc, typerc);
}
===================================================================
RCS file: /cvs/e/e16/e/src/cursors.c,v
retrieving revision 1.44
retrieving revision 1.45
diff -u -3 -r1.44 -r1.45
--- cursors.c 27 Jul 2007 16:59:49 -0000 1.44
+++ cursors.c 28 Aug 2007 17:58:23 -0000 1.45
@@ -40,11 +40,12 @@
static Ecore_List *cursor_list = NULL;
static ECursor *
-ECursorCreate(const char *name, const char *image, int native_id, XColor * fg,
- XColor * bg)
+ECursorCreate(const char *name, const char *image, int native_id, EColor * fg,
+ EColor * bg)
{
Cursor curs;
Pixmap pmap, mask;
+ XColor fgxc, bgxc;
int xh, yh;
unsigned int w, h, ww, hh;
char *img, msk[FILEPATH_LEN_MAX];
@@ -70,13 +71,13 @@
curs = None;
if ((w <= ww) && (h <= hh) && (pmap))
{
- EAllocColor(VRoot.cmap, fg);
- EAllocColor(VRoot.cmap, bg);
+ EAllocXColor(VRoot.cmap, &fgxc, fg);
+ EAllocXColor(VRoot.cmap, &bgxc, bg);
if (xh < 0 || xh >= (int)w)
xh = (int)w / 2;
if (yh < 0 || yh >= (int)h)
yh = (int)h / 2;
- curs = XCreatePixmapCursor(disp, pmap, mask, fg, bg, xh, yh);
+ curs = XCreatePixmapCursor(disp, pmap, mask, &fgxc, &bgxc, xh, yh);
}
if (!curs)
@@ -171,7 +172,7 @@
ECursorConfigLoad(FILE * fs)
{
int err = 0;
- XColor xclr, xclr2;
+ EColor clr, clr2;
char s[FILEPATH_LEN_MAX];
char s2[FILEPATH_LEN_MAX];
char *p2;
@@ -192,13 +193,13 @@
i2 = atoi(s2);
if (i2 != CONFIG_OPEN)
goto done;
- ESetColor(&xclr, 0, 0, 0);
- ESetColor(&xclr2, 255, 255, 255);
+ SET_COLOR(&clr, 0, 0, 0);
+ SET_COLOR(&clr2, 255, 255, 255);
pname = pfile = NULL;
native_id = -1;
break;
case CONFIG_CLOSE:
- ECursorCreate(pname, pfile, native_id, &xclr, &xclr2);
+ ECursorCreate(pname, pfile, native_id, &clr, &clr2);
err = 0;
break;
@@ -214,12 +215,12 @@
case CURS_BG_RGB:
r = g = b = 0;
sscanf(p2, "%d %d %d", &r, &g, &b);
- ESetColor(&xclr, r, g, b);
+ SET_COLOR(&clr, r, g, b);
break;
case CURS_FG_RGB:
r = g = b = 255;
sscanf(p2, "%d %d %d", &r, &g, &b);
- ESetColor(&xclr2, r, g, b);
+ SET_COLOR(&clr2, r, g, b);
break;
case XBM_FILE:
strcpy(file, s2);
===================================================================
RCS file: /cvs/e/e16/e/src/draw.c,v
retrieving revision 1.110
retrieving revision 1.111
diff -u -3 -r1.110 -r1.111
--- draw.c 11 Jul 2007 09:28:54 -0000 1.110
+++ draw.c 28 Aug 2007 17:58:23 -0000 1.111
@@ -140,15 +140,15 @@
static char color_valid = 0;
static unsigned int color_value = 0;
static unsigned int color_pixel;
- XColor xc;
+ EColor color;
if (color_valid && color_value == Conf.movres.color)
goto done;
color_value = Conf.movres.color;
- ESetColor(&xc, _R(color_value), _G(color_value), _B(color_value));
- EAllocColor(VRoot.cmap, &xc);
- color_pixel = xc.pixel;
+ SET_COLOR(&color, _R(color_value), _G(color_value), _B(color_value));
+ EAllocColor(VRoot.cmap, &color);
+ color_pixel = color.pixel;
color_valid = 1;
done:
===================================================================
RCS file: /cvs/e/e16/e/src/iclass.c,v
retrieving revision 1.120
retrieving revision 1.121
diff -u -3 -r1.120 -r1.121
--- iclass.c 27 Jul 2007 16:59:49 -0000 1.120
+++ iclass.c 28 Aug 2007 17:58:23 -0000 1.121
@@ -61,7 +61,7 @@
EImage *im;
EImageBorder *border;
int pixmapfillstyle;
- XColor bg, hi, lo, hihi, lolo;
+ EColor bg, hi, lo, hihi, lolo;
int bevelstyle;
#if ENABLE_COLOR_MODIFIERS
ColorModifierClass *colmod;
@@ -199,11 +199,11 @@
unsigned int hihi, unsigned int hi,
unsigned int bg, unsigned int lo, unsigned int lolo)
{
- ESetColor(&(is->hihi), hihi, hihi, hihi);
- ESetColor(&(is->hi), hi, hi, hi);
- ESetColor(&(is->bg), bg, bg, bg);
- ESetColor(&(is->lo), lo, lo, lo);
- ESetColor(&(is->lolo), lolo, lolo, lolo);
+ SET_COLOR(&(is->hihi), hihi, hihi, hihi);
+ SET_COLOR(&(is->hi), hi, hi, hi);
+ SET_COLOR(&(is->bg), bg, bg, bg);
+ SET_COLOR(&(is->lo), lo, lo, lo);
+ SET_COLOR(&(is->lolo), lolo, lolo, lolo);
}
static ImageState *
@@ -1383,17 +1383,17 @@
ic->active.normal = ImagestateCreate();
ImagestateColorsSetGray(ic->active.normal, 255, 255, 0, 0, 0);
- ESetColor(&(ic->active.normal->bg), 180, 140, 160);
+ SET_COLOR(&(ic->active.normal->bg), 180, 140, 160);
ic->active.normal->bevelstyle = BEVEL_AMIGA;
ic->active.hilited = ImagestateCreate();
ImagestateColorsSetGray(ic->active.hilited, 255, 255, 0, 0, 0);
- ESetColor(&(ic->active.hilited->bg), 230, 190, 210);
+ SET_COLOR(&(ic->active.hilited->bg), 230, 190, 210);
ic->active.hilited->bevelstyle = BEVEL_AMIGA;
ic->active.clicked = ImagestateCreate();
ImagestateColorsSetGray(ic->active.clicked, 0, 0, 0, 255, 255);
- ESetColor(&(ic->active.clicked->bg), 230, 190, 210);
+ SET_COLOR(&(ic->active.clicked->bg), 230, 190, 210);
ic->active.clicked->bevelstyle = BEVEL_AMIGA;
ic->padding.left = 8;
===================================================================
RCS file: /cvs/e/e16/e/src/tclass.c,v
retrieving revision 1.56
retrieving revision 1.57
diff -u -3 -r1.56 -r1.57
--- tclass.c 27 Jul 2007 16:59:50 -0000 1.56
+++ tclass.c 28 Aug 2007 17:58:23 -0000 1.57
@@ -429,7 +429,7 @@
{
r = g = b = 0;
sscanf(s, "%*s %i %i %i", &r, &g, &b);
- ESetColor(&ts->fg_col, r, g, b);
+ SET_COLOR(&ts->fg_col, r, g, b);
}
break;
case TEXT_BG_COL:
@@ -437,7 +437,7 @@
{
r = g = b = 0;
sscanf(s, "%*s %i %i %i", &r, &g, &b);
- ESetColor(&ts->bg_col, r, g, b);
+ SET_COLOR(&ts->bg_col, r, g, b);
}
break;
default:
@@ -468,7 +468,7 @@
tc->norm.normal = TextstateCreate();
tc->norm.normal->fontname =
Estrdup("-*-helvetica-medium-r-*-*-12-*-*-*-*-*-*-*");
- ESetColor(&(tc->norm.normal->fg_col), 0, 0, 0);
+ SET_COLOR(&(tc->norm.normal->fg_col), 0, 0, 0);
TextclassPopulate(tc);
break;
}
===================================================================
RCS file: /cvs/e/e16/e/src/tclass.h,v
retrieving revision 1.22
retrieving revision 1.23
diff -u -3 -r1.22 -r1.23
--- tclass.h 25 Aug 2007 05:38:53 -0000 1.22
+++ tclass.h 28 Aug 2007 17:58:23 -0000 1.23
@@ -61,7 +61,7 @@
int (*FdcInit) (TextState * ts, Win win, Drawable draw);
void (*FdcFini) (TextState * ts);
void (*FdcSetDrawable) (TextState * ts, unsigned long draw);
- void (*FdcSetColor) (TextState * ts, XColor * xc);
+ void (*FdcSetColor) (TextState * ts, EColor * xc);
} FontOps;
struct _textstate
@@ -75,8 +75,8 @@
char orientation;
char effect;
} style;
- XColor fg_col;
- XColor bg_col;
+ EColor fg_col;
+ EColor bg_col;
void *fdc;
const FontOps *ops;
};
@@ -124,6 +124,6 @@
int _xft_FdcInit(TextState * ts, Win win, Drawable draw);
void _xft_FdcFini(TextState * ts);
void _xft_FdcSetDrawable(TextState * ts, unsigned long draw);
-void _xft_FdcSetColor(TextState * ts, XColor * xc);
+void _xft_FdcSetColor(TextState * ts, EColor * xc);
#endif /* _TCLASS_H */
===================================================================
RCS file: /cvs/e/e16/e/src/text.c,v
retrieving revision 1.91
retrieving revision 1.92
diff -u -3 -r1.91 -r1.92
--- text.c 25 Aug 2007 05:38:53 -0000 1.91
+++ text.c 28 Aug 2007 17:58:23 -0000 1.92
@@ -500,7 +500,7 @@
}
static void
-_xfs_FdcSetColor(TextState * ts, XColor * xc)
+_xfs_FdcSetColor(TextState * ts, EColor * xc)
{
FontCtxXfs *fdc = (FontCtxXfs *) ts->fdc;
@@ -605,7 +605,7 @@
}
static void
-_xfont_FdcSetColor(TextState * ts, XColor * xc)
+_xfont_FdcSetColor(TextState * ts, EColor * xc)
{
FontCtxXfont *fdc = (FontCtxXfont *) ts->fdc;
===================================================================
RCS file: /cvs/e/e16/e/src/text_xft.c,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -3 -r1.1 -r1.2
--- text_xft.c 25 Aug 2007 05:38:53 -0000 1.1
+++ text_xft.c 28 Aug 2007 17:58:23 -0000 1.2
@@ -152,14 +152,14 @@
}
void
-_xft_FdcSetColor(TextState * ts, XColor * xc)
+_xft_FdcSetColor(TextState * ts, EColor * ec)
{
FontCtxXft *fdc = (FontCtxXft *) ts->fdc;
XRenderColor xrc;
- xrc.red = xc->red * 256;
- xrc.green = xc->green * 256;
- xrc.blue = xc->blue * 256;
+ xrc.red = ec->red << 8;
+ xrc.green = ec->green << 8;
+ xrc.blue = ec->blue << 8;
xrc.alpha = 65535;
XftColorAllocValue(disp, WinGetVisual(fdc->win), WinGetCmap(fdc->win),
===================================================================
RCS file: /cvs/e/e16/e/src/ttfont.c,v
retrieving revision 1.61
retrieving revision 1.62
diff -u -3 -r1.61 -r1.62
--- ttfont.c 25 Aug 2007 05:38:53 -0000 1.61
+++ ttfont.c 28 Aug 2007 17:58:23 -0000 1.62
@@ -184,11 +184,11 @@
}
static void
-_ift_FdcSetColor(TextState * ts __UNUSED__, XColor * xc)
+_ift_FdcSetColor(TextState * ts __UNUSED__, EColor * ec)
{
FontCtxIft *fdc = (FontCtxIft *) ts->fdc;
- EGetColor(xc, &(fdc->r), &(fdc->g), &(fdc->b));
+ GET_COLOR(ec, fdc->r, fdc->g, fdc->b);
}
const FontOps FontOps_ift = {
@@ -240,14 +240,6 @@
}
}
return 0;
-}
-
-void
-EGetColor(const XColor * pxc, int *pr, int *pg, int *pb)
-{
- *pr = pxc->red >> 8;
- *pg = pxc->green >> 8;
- *pb = pxc->blue >> 8;
}
#endif
===================================================================
RCS file: /cvs/e/e16/e/src/x.c,v
retrieving revision 1.161
retrieving revision 1.162
diff -u -3 -r1.161 -r1.162
--- x.c 11 Jul 2007 09:05:43 -0000 1.161
+++ x.c 28 Aug 2007 17:58:23 -0000 1.162
@@ -1572,25 +1572,21 @@
}
void
-EAllocColor(Colormap cmap, XColor * pxc)
+EAllocColor(Colormap cmap, EColor * pec)
{
- XAllocColor(disp, cmap, pxc);
-}
+ XColor xc;
-void
-ESetColor(XColor * pxc, int r, int g, int b)
-{
- pxc->red = (r << 8) | r;
- pxc->green = (g << 8) | g;
- pxc->blue = (b << 8) | b;
+ EAllocXColor(cmap, &xc, pec);
+ pec->pixel = xc.pixel;
}
void
-EGetColor(const XColor * pxc, int *pr, int *pg, int *pb)
+EAllocXColor(Colormap cmap, XColor * pxc, EColor * pec)
{
- *pr = pxc->red >> 8;
- *pg = pxc->green >> 8;
- *pb = pxc->blue >> 8;
+ pxc->red = pec->red << 8;
+ pxc->green = pec->green << 8;
+ pxc->blue = pec->blue << 8;
+ XAllocColor(disp, cmap, pxc);
}
/* Build mask from window shape rects */
===================================================================
RCS file: /cvs/e/e16/e/src/xwin.h,v
retrieving revision 1.32
retrieving revision 1.33
diff -u -3 -r1.32 -r1.33
--- xwin.h 11 Jul 2007 08:54:19 -0000 1.32
+++ xwin.h 28 Aug 2007 17:58:23 -0000 1.33
@@ -208,9 +208,20 @@
Bool EQueryPointer(Win win, int *px, int *py,
Window * pchild, unsigned int *pmask);
-void EAllocColor(Colormap colormap, XColor * pxc);
-void ESetColor(XColor * pxc, int r, int g, int b);
-void EGetColor(const XColor * pxc, int *pr, int *pg, int *pb);
+typedef struct
+{
+ unsigned long pixel;
+ unsigned char alpha, red, green, blue;
+} EColor;
+
+void EAllocColor(Colormap cmap, EColor * pec);
+void EAllocXColor(Colormap cmap, XColor * pxc, EColor * pec);
+
+#define SET_COLOR(xc, _r, _g, _b) \
+ do { (xc)->red = _r; (xc)->green = _g; (xc)->blue = _b; } while(0)
+
+#define GET_COLOR(xc, _r, _g, _b) \
+ do { _r = (xc)->red; _g = (xc)->green; _b = (xc)->blue; } while(0)
Window EXWindowGetParent(Window xwin);
int EXGetGeometry(Window xwin, Window * root_return,
-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems? Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
_______________________________________________
enlightenment-cvs mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs