[prev in list] [next in list] [prev in thread] [next in thread]
List: enlightenment-svn
Subject: E CVS: e kwo
From: Enlightenment CVS <noreply () fitx-00 ! ewr ! caoslinux ! org>
Date: 2007-12-30 21:18:04
Message-ID: 20071230211804.7DC2DA30A2 () cvs ! caoslinux ! org
[Download RAW message or body]
Enlightenment CVS committal
Author : kwo
Project : e16
Module : e
Dir : e16/e/src
Modified Files:
desktops.c eimage.c eimage.h iclass.c iclass.h pager.c
Log Message:
Simplify ImageclassApplySimple and ScaleRect.
===================================================================
RCS file: /cvs/e/e16/e/src/desktops.c,v
retrieving revision 1.273
retrieving revision 1.274
diff -u -3 -r1.273 -r1.274
--- desktops.c 21 Dec 2007 22:04:54 -0000 1.273
+++ desktops.c 30 Dec 2007 21:18:04 -0000 1.274
@@ -2479,20 +2479,12 @@
ImageClass *ic;
ic = ImageclassFind("SETTINGS_AREA_AREA", 0);
- if (ic)
- ImageclassApply(ic, win, 0, 0, STATE_NORMAL, ST_SOLID);
+ ImageclassApply(ic, win, 0, 0, STATE_NORMAL, ST_SOLID);
+
awin = ECreateWindow(win, 0, 0, 18, 14, 0);
ic = ImageclassFind("SETTINGS_AREADESK_AREA", 0);
- if (ic)
- {
- Pixmap pmap;
+ ImageclassApply(ic, awin, 0, 0, STATE_NORMAL, ST_SOLID);
- pmap = ImageclassApplySimple(ic, awin, None, STATE_NORMAL,
- 0, 0, 18, 14);
- ESetWindowBackgroundPixmap(awin, pmap);
- EFreePixmap(pmap);
- }
- EClearWindow(awin);
called = 1;
}
EMoveResizeWindow(awin, ((w / 2) - (9 * tmp_area_x)),
===================================================================
RCS file: /cvs/e/e16/e/src/eimage.c,v
retrieving revision 1.20
retrieving revision 1.21
diff -u -3 -r1.20 -r1.21
--- eimage.c 15 Dec 2007 17:10:47 -0000 1.20
+++ eimage.c 30 Dec 2007 21:18:04 -0000 1.21
@@ -473,7 +473,7 @@
}
void
-ScaleRect(Win wsrc, Drawable src, Win wdst, Pixmap dst, Pixmap * pdst,
+ScaleRect(Win wsrc, Drawable src, Win wdst, Pixmap dst,
int sx, int sy, int sw, int sh,
int dx, int dy, int dw, int dh, int scale)
{
@@ -483,15 +483,7 @@
im = EImageGrabDrawableScaled(wsrc, src, None, sx, sy, sw, sh,
scale * dw, scale * dh, 0, 0);
- if (pdst)
- {
- EImageRenderPixmaps(im, wdst, EIMAGE_ANTI_ALIAS, pdst, None, dw, dh);
- }
- else
- {
- EImageRenderOnDrawable(im, wdst, dst, EIMAGE_ANTI_ALIAS,
- dx, dy, dw, dh);
- }
+ EImageRenderOnDrawable(im, wdst, dst, EIMAGE_ANTI_ALIAS, dx, dy, dw, dh);
imlib_free_image();
}
===================================================================
RCS file: /cvs/e/e16/e/src/eimage.h,v
retrieving revision 1.13
retrieving revision 1.14
diff -u -3 -r1.13 -r1.14
--- eimage.h 15 Dec 2007 17:10:47 -0000 1.13
+++ eimage.h 30 Dec 2007 21:18:04 -0000 1.14
@@ -102,8 +102,7 @@
unsigned char *b,
unsigned char *a);
-void ScaleRect(Win wsrc, Drawable src,
- Win wdst, Pixmap dst, Pixmap * pdst,
+void ScaleRect(Win wsrc, Drawable src, Win wdst, Pixmap dst,
int sx, int sy, int sw, int sh,
int dx, int dy, int dw, int dh, int scale);
===================================================================
RCS file: /cvs/e/e16/e/src/iclass.c,v
retrieving revision 1.126
retrieving revision 1.127
diff -u -3 -r1.126 -r1.127
--- iclass.c 30 Dec 2007 20:40:49 -0000 1.126
+++ iclass.c 30 Dec 2007 21:18:04 -0000 1.127
@@ -806,29 +806,18 @@
return im;
}
-Pixmap
+void
ImageclassApplySimple(ImageClass * ic, Win win, Drawable draw, int state,
int x, int y, int w, int h)
{
- Pixmap pmap;
EImage *im;
im = ImageclassGetImage(ic, 0, 0, state);
if (!im)
- return None;
-
- pmap = None;
- if (draw == None)
- {
- pmap = ECreatePixmap(win, w, h, 0);
- draw = pmap;
- x = y = 0;
- }
+ return;
EImageRenderOnDrawable(im, win, draw, 0, x, y, w, h);
EImageFree(im);
-
- return pmap;
}
#ifdef ENABLE_TRANSPARENCY
===================================================================
RCS file: /cvs/e/e16/e/src/iclass.h,v
retrieving revision 1.17
retrieving revision 1.18
diff -u -3 -r1.17 -r1.18
--- iclass.h 30 Dec 2007 20:40:49 -0000 1.17
+++ iclass.h 30 Dec 2007 21:18:04 -0000 1.18
@@ -105,7 +105,7 @@
ImageClass *ImageclassCreateSimple(const char *name, const char *image);
EImage *ImageclassGetImage(ImageClass * ic, int active, int sticky,
int state);
-Pixmap ImageclassApplySimple(ImageClass * ic, Win win,
+void ImageclassApplySimple(ImageClass * ic, Win win,
Drawable draw, int state, int x,
int y, int w, int h);
void ImageclassApply(ImageClass * ic, Win win,
===================================================================
RCS file: /cvs/e/e16/e/src/pager.c,v
retrieving revision 1.251
retrieving revision 1.252
diff -u -3 -r1.251 -r1.252
--- pager.c 21 Dec 2007 22:04:55 -0000 1.251
+++ pager.c 30 Dec 2007 21:18:04 -0000 1.252
@@ -248,7 +248,7 @@
y = ((phase & 0xfffffff8) + offsets[phase % 8]) % hh;
y2 = (y * VRoot.h) / hh;
- ScaleRect(VRoot.win, VRoot.xwin, p->win, WinGetPmap(p->win), NULL, 0, y2,
+ ScaleRect(VRoot.win, VRoot.xwin, p->win, WinGetPmap(p->win), 0, y2,
VRoot.w, VRoot.h / hh, xx, yy + y, ww, 1, Conf_pagers.hiq);
EClearArea(p->win, xx, yy + y, ww, 1, False);
y2 = p->h;
@@ -256,7 +256,7 @@
y = ((phase & 0xfffffff8) + offsets[phase % 8]) % ww;
y2 = (y * VRoot.w) / ww;
- ScaleRect(VRoot.win, VRoot.xwin, p->win, WinGetPmap(p->win), NULL, y2, 0,
+ ScaleRect(VRoot.win, VRoot.xwin, p->win, WinGetPmap(p->win), y2, 0,
VRoot.w / ww, VRoot.h, xx + y, yy, 1, hh, Conf_pagers.hiq);
EClearArea(p->win, xx + y, yy, 1, hh, False);
y2 = p->w;
@@ -327,6 +327,8 @@
ewin->mini_w = w;
ewin->mini_h = h;
+ ewin->mini_pmm.type = 0;
+ ewin->mini_pmm.pmap = ECreatePixmap(p->win, w, h, 0);
draw = None;
if (pager_mode != PAGER_MODE_SIMPLE)
@@ -342,21 +344,13 @@
ImageClass *ic;
ic = ImageclassFind("PAGER_WIN", 0);
- if (ic)
- {
- ewin->mini_pmm.type = 0;
- ewin->mini_pmm.mask = None;
- ewin->mini_pmm.pmap =
- ImageclassApplySimple(ic, p->win, None, STATE_NORMAL,
- 0, 0, w, h);
- }
+ ImageclassApplySimple(ic, p->win, ewin->mini_pmm.pmap,
+ STATE_NORMAL, 0, 0, w, h);
Dprintf("Use Iclass, pmap=%#lx\n", ewin->mini_pmm.pmap);
}
else
{
- ewin->mini_pmm.type = 1;
- ewin->mini_pmm.mask = None;
- ScaleRect(EoGetWin(ewin), draw, p->win, None, &ewin->mini_pmm.pmap,
+ ScaleRect(EoGetWin(ewin), draw, p->win, ewin->mini_pmm.pmap,
0, 0, EoGetW(ewin), EoGetH(ewin), 0, 0, w, h,
Conf_pagers.hiq);
Dprintf("Grab scaled, pmap=%#lx\n", ewin->mini_pmm.pmap);
@@ -487,7 +481,7 @@
do_screen_update:
Dprintf("doPagerUpdate %d: Snap screen\n", p->dsk->num);
/* Update pager area by snapshotting entire screen */
- ScaleRect(VRoot.win, VRoot.xwin, p->win, pmap, NULL, 0, 0,
+ ScaleRect(VRoot.win, VRoot.xwin, p->win, pmap, 0, 0,
VRoot.w, VRoot.h, cx * p->dw, cy * p->dh, p->dw, p->dh,
Conf_pagers.hiq);
@@ -617,7 +611,7 @@
if (pager_mode != PAGER_MODE_SIMPLE && p->dsk->bg.pmap)
{
- ScaleRect(VRoot.win, p->dsk->bg.pmap, p->win, pmap, NULL, 0, 0,
+ ScaleRect(VRoot.win, p->dsk->bg.pmap, p->win, pmap, 0, 0,
VRoot.w, VRoot.h, 0, 0, p->dw, p->dh, Conf_pagers.hiq);
return;
}
-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
enlightenment-cvs mailing list
enlightenment-cvs@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic