Enlightenment CVS committal
Author : kwo
Project : e16
Module : e
Dir : e16/e/src
Modified Files:
dialog.c progress.c tclass.c tclass.h warp.c
Log Message:
Eliminate TextclassApply().
===================================================================
RCS file: /cvs/e/e16/e/src/dialog.c,v
retrieving revision 1.148
retrieving revision 1.149
diff -u -3 -r1.148 -r1.149
--- dialog.c 17 Apr 2006 08:43:09 -0000 1.148
+++ dialog.c 22 Apr 2006 13:24:51 -0000 1.149
@@ -517,8 +517,14 @@
if (d->text)
{
- TextclassApply(d->iclass, d->pmap, d->w, d->h, 0, 0, STATE_NORMAL,
- d->tclass, d->text);
+ EImageBorder *pad;
+
+ pad = ImageclassGetPadding(d->iclass);
+ TextDraw(d->tclass, d->pmap, 0, 0, STATE_NORMAL, d->text,
+ pad->left, pad->top, d->w - (pad->left + pad->right),
+ d->h - (pad->top + pad->bottom),
+ d->h - (pad->top + pad->bottom),
+ TextclassGetJustification(d->tclass));
}
else if (d->item)
{
===================================================================
RCS file: /cvs/e/e16/e/src/progress.c,v
retrieving revision 1.30
retrieving revision 1.31
diff -u -3 -r1.30 -r1.31
--- progress.c 19 Apr 2006 17:23:34 -0000 1.30
+++ progress.c 22 Apr 2006 13:24:51 -0000 1.31
@@ -117,7 +117,6 @@
EobjMove(pp->p_win, pp->p_win->x, pp->p_win->y - dy);
}
break;
-
}
if (p->ic)
@@ -152,6 +151,7 @@
{
int w;
char s[64];
+ EImageBorder *pad;
if (progress == p->value)
return;
@@ -164,12 +164,17 @@
w = p->w;
Esnprintf(s, sizeof(s), "%i%%", p->value);
- TextclassApply(p->inc, p->n_win->win, p->h * 5, p->h, 0, 0, STATE_CLICKED,
- p->tnc, s);
+ EobjResize(p->p_win, w, p->h);
ImageclassApply(p->inc, p->p_win->win, w, p->h, 1, 0, STATE_NORMAL,
ST_SOLID);
+ EobjShapeUpdate(p->p_win, 0);
- EobjResize(p->p_win, w, p->h);
+ pad = ImageclassGetPadding(p->inc);
+ EClearWindow(p->n_win->win);
+ TextDraw(p->tnc, p->n_win->win, 0, 0, STATE_CLICKED, s,
+ pad->left, pad->top, p->h * 5 - (pad->left + pad->right),
+ p->h - (pad->top + pad->bottom), p->h - (pad->top + pad->bottom),
+ TextclassGetJustification(p->tnc));
EFlush();
}
@@ -177,27 +182,26 @@
void
ProgressbarShow(Progressbar * p)
{
- int w;
-
- w = (p->value * p->w) / 100;
- if (w < 1)
- w = 1;
- if (w > p->w)
- w = p->w;
+ EImageBorder *pad;
ImageclassApply(p->ic, p->win->win, p->w - (p->h * 5), p->h, 0, 0,
STATE_NORMAL, ST_SOLID);
ImageclassApply(p->inc, p->n_win->win, (p->h * 5), p->h, 0, 0,
STATE_CLICKED,
ST_SOLID);
- ImageclassApply(p->ipc, p->p_win->win, w, p->h, 1, 0, STATE_NORMAL,
+ ImageclassApply(p->ipc, p->p_win->win, 1, p->h, 1, 0, STATE_NORMAL,
ST_SOLID);
EobjMap(p->win, 0);
EobjMap(p->n_win, 0);
EobjMap(p->p_win, 0);
- ESync();
- TextclassApply(p->ic, p->win->win, p->w - (p->h * 5), p->h, 0, 0,
- STATE_NORMAL, p->tc, p->win->name);
+
+ pad = ImageclassGetPadding(p->inc);
+ TextDraw(p->tc, p->win->win, 0, 0, STATE_NORMAL, p->win->name,
+ pad->left, pad->top, p->w - (p->h * 5) - (pad->left + pad->right),
+ p->h - (pad->top + pad->bottom), p->h - (pad->top + pad->bottom),
+ TextclassGetJustification(p->tnc));
+
+ EFlush();
}
void
===================================================================
RCS file: /cvs/e/e16/e/src/tclass.c,v
retrieving revision 1.43
retrieving revision 1.44
diff -u -3 -r1.43 -r1.44
--- tclass.c 21 Apr 2006 22:52:59 -0000 1.43
+++ tclass.c 22 Apr 2006 13:24:51 -0000 1.44
@@ -470,25 +470,6 @@
return err;
}
-void
-TextclassApply(ImageClass * iclass, Window win, int w, int h,
- int active, int sticky, int state,
- TextClass * tclass, const char *text)
-{
- EImageBorder *pad;
-
- if ((!iclass) || (!tclass) || (!text) || (!win) || (w < 1) || (h < 1))
- return;
-
- XClearWindow(disp, win);
-
- pad = ImageclassGetPadding(iclass);
- TextDraw(tclass, win, active, sticky, state, text,
- pad->left, pad->top, w - (pad->left + pad->right),
- h - (pad->top + pad->bottom), h - (pad->top + pad->bottom),
- tclass->justification);
-}
-
/*
* Textclass Module
*/
===================================================================
RCS file: /cvs/e/e16/e/src/tclass.h,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -3 -r1.6 -r1.7
--- tclass.h 16 Apr 2006 22:27:06 -0000 1.6
+++ tclass.h 22 Apr 2006 13:24:51 -0000 1.7
@@ -78,9 +78,6 @@
int TextclassGetJustification(TextClass * tc);
void TextclassSetJustification(TextClass * tc, int just);
TextClass *TextclassFind(const char *name, int fallback);
-void TextclassApply(ImageClass * ic, Window win, int w,
- int h, int active, int sticky, int state,
- TextClass * tclass, const char *text);
/* text.c */
TextState *TextclassGetTextState(TextClass * tclass, int state,
===================================================================
RCS file: /cvs/e/e16/e/src/warp.c,v
retrieving revision 1.88
retrieving revision 1.89
diff -u -3 -r1.88 -r1.89
--- warp.c 21 Apr 2006 22:52:59 -0000 1.88
+++ warp.c 22 Apr 2006 13:24:51 -0000 1.89
@@ -191,8 +191,11 @@
static void
WarpFocusWinPaint(WarpFocusWin * fw)
{
- int i, state;
+ int i, state, iw;
WarplistItem *wi;
+ EImageBorder *pad;
+
+ pad = ImageclassGetPadding(fw->ic);
for (i = 0; i < warplist_num; i++)
{
@@ -208,33 +211,26 @@
ImageclassApply(fw->ic, wi->win, fw->mw, fw->mh, 0, 0, state,
ST_WARPLIST);
- /* New icon stuff */
+ iw = 0;
if (Conf.warplist.icon_mode != 0)
{
int icon_size = fw->mh - 2 * ICON_PAD;
EImage *im;
- EImageBorder *pad;
-
- pad = ImageclassGetPadding(fw->ic);
-
- TextDraw(fw->tc, wi->win, 0, 0, state, wi->txt,
- pad->left + fw->mh, pad->top, fw->tw, fw->th, 0, 0);
im = EwinIconImageGet(wi->ewin, icon_size,
Conf.warplist.icon_mode);
- if (!im)
- continue;
-
- EImageRenderOnDrawable(im, wi->win, pad->left +
- ICON_PAD, ICON_PAD,
- icon_size, icon_size, 1);
- EImageFree(im);
- }
- else
- {
- TextclassApply(fw->ic, wi->win, fw->mw, fw->mh, 0, 0, state,
- fw->tc, wi->txt);
+ if (im)
+ {
+ EImageRenderOnDrawable(im, wi->win, pad->left +
+ ICON_PAD, ICON_PAD,
+ icon_size, icon_size, 1);
+ EImageFree(im);
+ }
+ iw = fw->mh;
}
+
+ TextDraw(fw->tc, wi->win, 0, 0, state, wi->txt,
+ pad->left + iw, pad->top, fw->tw, fw->th, 0, 0);
}
/* FIXME - Check shape */
-------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
enlightenment-cvs mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs