diff options
author | George Hazan <george.hazan@gmail.com> | 2013-01-27 11:57:40 +0000 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2013-01-27 11:57:40 +0000 |
commit | 18f6faf592c21341463e835599b61fa811d3e1a0 (patch) | |
tree | 33074d2a8466bdc6b27a4a93ae97e871da57eef7 /plugins/Clist_modern/src/modern_skinengine.cpp | |
parent | 3e2fa0fa0e7f74b99e3f76d966928e30f1b39393 (diff) |
code cleaning
git-svn-id: http://svn.miranda-ng.org/main/trunk@3301 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/Clist_modern/src/modern_skinengine.cpp')
-rw-r--r-- | plugins/Clist_modern/src/modern_skinengine.cpp | 182 |
1 files changed, 91 insertions, 91 deletions
diff --git a/plugins/Clist_modern/src/modern_skinengine.cpp b/plugins/Clist_modern/src/modern_skinengine.cpp index 8972752fe5..475760652f 100644 --- a/plugins/Clist_modern/src/modern_skinengine.cpp +++ b/plugins/Clist_modern/src/modern_skinengine.cpp @@ -114,7 +114,7 @@ static pfnImgDeleteDIBSection ImgDeleteDIBSection; typedef DWORD (__stdcall *pfnImgGetHandle)(LPVOID /*in*/pImg, HBITMAP /*out*/*pBitmap, LPVOID /*out*/*ppDIBBits);
static pfnImgGetHandle ImgGetHandle;
-static MODERNEFFECT meCurrentEffect = {-1,{0},0,0};
+static MODERNEFFECT meCurrentEffect = {-1,{0}, 0, 0};
//////////////////////////////////////////////////////////////////////////
@@ -499,14 +499,14 @@ HRESULT SkinEngineLoadModule() //create event handle
hSkinLoadedEvent = HookEvent(ME_SKIN_SERVICESCREATED,CLUI_OnSkinLoad);
- NotifyEventHooks(g_CluiData.hEventSkinServicesCreated,0,0);
+ NotifyEventHooks(g_CluiData.hEventSkinServicesCreated, 0, 0);
return S_OK;
}
int SkinEngineUnloadModule()
{
//unload services
- ModernSkinButtonUnloadModule(0,0);
+ ModernSkinButtonUnloadModule(0, 0);
ske_UnloadSkin(&g_SkinObjectList);
mir_free_and_nil(g_SkinObjectList.pObjects);
@@ -592,7 +592,7 @@ CRITICAL_SECTION BufferListCS = {0}; SortedList * BufferList = NULL;
enum
{
- BUFFER_DRAWICON = 0,
+ BUFFER_DRAWICON = 0,
BUFFER_DRAWIMAGE
};
@@ -611,7 +611,7 @@ HDC ske_RequestBufferDC(HDC hdcOwner, int dcID, int width, int height, BOOL fCle DCBUFFER * pBuf;
if (BufferList == NULL)
{
- BufferList = List_Create(0,2);
+ BufferList = List_Create(0, 2);
BufferList->sortFunc = SortBufferList;
InitializeCriticalSection(&BufferListCS);
}
@@ -646,7 +646,7 @@ HDC ske_RequestBufferDC(HDC hdcOwner, int dcID, int width, int height, BOOL fCle pBuf->hBitmap = ske_CreateDIB32Point(width,height,&(pBuf->pImage));
pBuf->oldBitmap = (HBITMAP)SelectObject(pBuf->hDC,pBuf->hBitmap);
} else if (fClear)
- memset(pBuf->pImage,0,width*height*sizeof(DWORD));
+ memset(pBuf->pImage, 0, width*height*sizeof(DWORD));
}
pBuf->dwDestroyAfterTime = 0;
LeaveCriticalSection(&BufferListCS);
@@ -695,7 +695,7 @@ BOOL ske_SetRgnOpaque(HDC memdc,HRGN hrgn, BOOL force) DWORD d;
RECT *rect;
if (g_CluiData.fDisableSkinEngine && !force) return TRUE;
- rgnsz = GetRegionData(hrgn,0,NULL);
+ rgnsz = GetRegionData(hrgn, 0, NULL);
rdata = (RGNDATA *) mir_alloc(rgnsz);
GetRegionData(hrgn,rgnsz,rdata);
rect = (RECT *)rdata->Buffer;
@@ -790,7 +790,7 @@ static BOOL ske_SkinFillRectByGlyph(HDC hDest, HDC hSource, RECT *rFill, RECT *r {
ske_AlphaBlend(mem2dc,rFill->left-wr.left,rFill->top-wr.top,rFill->right-rFill->left,rFill->bottom-rFill->top,
hSource,rGlyph->left,rGlyph->top,rGlyph->right-rGlyph->left,rGlyph->bottom-rGlyph->top,bf);
- ske_AlphaBlend(hDest,wr.left,wr.top,wr.right-wr.left, wr.bottom -wr.top,mem2dc,0,0,wr.right-wr.left, wr.bottom -wr.top,bf);
+ ske_AlphaBlend(hDest,wr.left,wr.top,wr.right-wr.left, wr.bottom -wr.top,mem2dc, 0, 0, wr.right-wr.left, wr.bottom -wr.top,bf);
}
else
{
@@ -804,7 +804,7 @@ static BOOL ske_SkinFillRectByGlyph(HDC hDest, HDC hSource, RECT *rFill, RECT *r // BLENDFUNCTION bf = {AC_SRC_OVER, 0, 255, 0 };
ske_AlphaBlend(mem2dc,rFill->left-wr.left,rFill->top-wr.top,rFill->right-rFill->left,rFill->bottom-rFill->top,
hSource,rGlyph->left,rGlyph->top,rGlyph->right-rGlyph->left,rGlyph->bottom-rGlyph->top,bf);
- ske_AlphaBlend(hDest,wr.left,wr.top,wr.right-wr.left, wr.bottom -wr.top,mem2dc,0,0,wr.right-wr.left, wr.bottom -wr.top,bf);
+ ske_AlphaBlend(hDest,wr.left,wr.top,wr.right-wr.left, wr.bottom -wr.top,mem2dc, 0, 0, wr.right-wr.left, wr.bottom -wr.top,bf);
}
if (drawMode != 2)
{
@@ -838,8 +838,8 @@ static BOOL ske_SkinFillRectByGlyph(HDC hDest, HDC hSource, RECT *rFill, RECT *r w = wr.right-wr.left;
{
// BLENDFUNCTION bf = {AC_SRC_OVER, 0, 255, 0 };
- ske_AlphaBlend(mem2dc,-(wr.left-rFill->left),0,rFill->right-rFill->left,h,hSource,rGlyph->left,rGlyph->top,rGlyph->right-rGlyph->left,h,bf);
- //StretchBlt(mem2dc,-(wr.left-rFill->left),0,rFill->right-rFill->left,h,hSource,rGlyph->left,rGlyph->top,rGlyph->right-rGlyph->left,h,SRCCOPY);
+ ske_AlphaBlend(mem2dc,-(wr.left-rFill->left), 0, rFill->right-rFill->left,h,hSource,rGlyph->left,rGlyph->top,rGlyph->right-rGlyph->left,h,bf);
+ //StretchBlt(mem2dc,-(wr.left-rFill->left), 0, rFill->right-rFill->left,h,hSource,rGlyph->left,rGlyph->top,rGlyph->right-rGlyph->left,h,SRCCOPY);
}
if (drawMode == 0 || drawMode == 2)
{
@@ -853,16 +853,16 @@ static BOOL ske_SkinFillRectByGlyph(HDC hDest, HDC hSource, RECT *rFill, RECT *r int ht;
y = wr.top;
ht = (y+h-dy <= wr.bottom)?(h-dy):(wr.bottom-wr.top);
- BitBlt(hDest,wr.left,y,w,ht,mem2dc,0,dy,SRCCOPY);
+ BitBlt(hDest,wr.left,y,w,ht,mem2dc, 0, dy,SRCCOPY);
}
y = wr.top+h-dy;
while (y < wr.bottom-h){
- BitBlt(hDest,wr.left,y,w,h,mem2dc,0,0,SRCCOPY);
+ BitBlt(hDest,wr.left,y,w,h,mem2dc, 0, 0, SRCCOPY);
y += h;
}
if (y <= wr.bottom)
- BitBlt(hDest,wr.left,y,w,wr.bottom-y, mem2dc,0,0,SRCCOPY);
+ BitBlt(hDest,wr.left,y,w,wr.bottom-y, mem2dc, 0, 0, SRCCOPY);
}
else
@@ -871,13 +871,13 @@ static BOOL ske_SkinFillRectByGlyph(HDC hDest, HDC hSource, RECT *rFill, RECT *r while (y < wr.bottom-h)
{
// BLENDFUNCTION bf = {AC_SRC_OVER, 0, 255, 0 };
- ske_AlphaBlend(hDest,wr.left,y,w,h, mem2dc,0,0,w,h,bf);
+ ske_AlphaBlend(hDest,wr.left,y,w,h, mem2dc, 0, 0, w,h,bf);
y += h;
}
if (y <= wr.bottom)
{
// BLENDFUNCTION bf = {AC_SRC_OVER, 0, 255, 0 };
- ske_AlphaBlend(hDest,wr.left,y,w,wr.bottom-y, mem2dc,0,0,w,wr.bottom-y,bf);
+ ske_AlphaBlend(hDest,wr.left,y,w,wr.bottom-y, mem2dc, 0, 0, w,wr.bottom-y,bf);
}
}
@@ -895,17 +895,17 @@ static BOOL ske_SkinFillRectByGlyph(HDC hDest, HDC hSource, RECT *rFill, RECT *r int ht;
y = wr.top;
ht = (y+h-dy <= wr.bottom)?(h-dy):(wr.bottom-wr.top);
- ske_AlphaBlend(hDest,wr.left,y,w,ht,mem2dc,0,dy,w,ht,bf);
+ ske_AlphaBlend(hDest,wr.left,y,w,ht,mem2dc, 0, dy,w,ht,bf);
}
y = wr.top+h-dy;
while (y < wr.bottom-h)
{
- ske_AlphaBlend(hDest,wr.left,y,w,h,mem2dc,0,0,w,h,bf);
+ ske_AlphaBlend(hDest,wr.left,y,w,h,mem2dc, 0, 0, w,h,bf);
y += h;
}
if (y <= wr.bottom)
- ske_AlphaBlend(hDest,wr.left,y,w,wr.bottom-y, mem2dc,0,0,w,wr.bottom-y,bf);
+ ske_AlphaBlend(hDest,wr.left,y,w,wr.bottom-y, mem2dc, 0, 0, w,wr.bottom-y,bf);
}
}
}
@@ -935,10 +935,10 @@ static BOOL ske_SkinFillRectByGlyph(HDC hDest, HDC hSource, RECT *rFill, RECT *r int x = 0, sy = 0, maxy = 0;
{
//SetStretchBltMode(mem2dc, HALFTONE);
- //StretchBlt(mem2dc,0,0,w,h,hSource,rGlyph->left+(wr.left-rFill->left),rGlyph->top,w,h,SRCCOPY);
+ //StretchBlt(mem2dc, 0, 0, w,h,hSource,rGlyph->left+(wr.left-rFill->left),rGlyph->top,w,h,SRCCOPY);
// BLENDFUNCTION bf = {AC_SRC_OVER, 0, 255, 0 };
- ske_AlphaBlend(mem2dc,0,-(wr.top-rFill->top),w,rFill->bottom-rFill->top,hSource,rGlyph->left,rGlyph->top,w,rGlyph->bottom-rGlyph->top,bf);
+ ske_AlphaBlend(mem2dc, 0, -(wr.top-rFill->top),w,rFill->bottom-rFill->top,hSource,rGlyph->left,rGlyph->top,w,rGlyph->bottom-rGlyph->top,bf);
if (drawMode == 0 || drawMode == 2)
{
if (drawMode == 0)
@@ -951,15 +951,15 @@ static BOOL ske_SkinFillRectByGlyph(HDC hDest, HDC hSource, RECT *rFill, RECT *r int wt;
x = wr.left;
wt = (x+w-dx <= wr.right)?(w-dx):(wr.right-wr.left);
- BitBlt(hDest,x,wr.top,wt,h,mem2dc,dx,0,SRCCOPY);
+ BitBlt(hDest,x,wr.top,wt,h,mem2dc,dx, 0, SRCCOPY);
}
x = wr.left+w-dx;
while (x < wr.right-w){
- BitBlt(hDest,x,wr.top,w,h,mem2dc,0,0,SRCCOPY);
+ BitBlt(hDest,x,wr.top,w,h,mem2dc, 0, 0, SRCCOPY);
x += w;
}
if (x <= wr.right)
- BitBlt(hDest,x,wr.top,wr.right-x,h, mem2dc,0,0,SRCCOPY);
+ BitBlt(hDest,x,wr.top,wr.right-x,h, mem2dc, 0, 0, SRCCOPY);
}
else
{
@@ -967,11 +967,11 @@ static BOOL ske_SkinFillRectByGlyph(HDC hDest, HDC hSource, RECT *rFill, RECT *r dx = (wr.left-rFill->left)%w;
x = wr.left-dx;
while (x < wr.right-w){
- ske_AlphaBlend(hDest,x,wr.top,w,h,mem2dc,0,0,w,h,bf);
+ ske_AlphaBlend(hDest,x,wr.top,w,h,mem2dc, 0, 0, w,h,bf);
x += w;
}
if (x <= wr.right)
- ske_AlphaBlend(hDest,x,wr.top,wr.right-x,h, mem2dc,0,0,wr.right-x,h,bf);
+ ske_AlphaBlend(hDest,x,wr.top,wr.right-x,h, mem2dc, 0, 0, wr.right-x,h,bf);
}
}
@@ -985,15 +985,15 @@ static BOOL ske_SkinFillRectByGlyph(HDC hDest, HDC hSource, RECT *rFill, RECT *r int wt;
x = wr.left;
wt = (x+w-dx <= wr.right)?(w-dx):(wr.right-wr.left);
- ske_AlphaBlend(hDest,x,wr.top,wt,h,mem2dc,dx,0,wt,h,bf);
+ ske_AlphaBlend(hDest,x,wr.top,wt,h,mem2dc,dx, 0, wt,h,bf);
}
x = wr.left+w-dx;
while (x < wr.right-w){
- ske_AlphaBlend(hDest,x,wr.top,w,h,mem2dc,0,0,w,h,bf);
+ ske_AlphaBlend(hDest,x,wr.top,w,h,mem2dc, 0, 0, w,h,bf);
x += w;
}
if (x <= wr.right)
- ske_AlphaBlend(hDest,x,wr.top,wr.right-x,h, mem2dc,0,0,wr.right-x,h,bf);
+ ske_AlphaBlend(hDest,x,wr.top,wr.right-x,h, mem2dc, 0, 0, wr.right-x,h,bf);
}
}
@@ -1032,7 +1032,7 @@ static BOOL ske_SkinFillRectByGlyph(HDC hDest, HDC hSource, RECT *rFill, RECT *r while (y < wr.bottom-wr.top)
{
- ske_AlphaBlend(mem2dc,0,y,w,rGlyph->bottom-rGlyph->top, hSource,rGlyph->left,rGlyph->top,w,rGlyph->bottom-rGlyph->top,bf);
+ ske_AlphaBlend(mem2dc, 0, y,w,rGlyph->bottom-rGlyph->top, hSource,rGlyph->left,rGlyph->top,w,rGlyph->bottom-rGlyph->top,bf);
y += rGlyph->bottom-rGlyph->top;
}
@@ -1050,15 +1050,15 @@ static BOOL ske_SkinFillRectByGlyph(HDC hDest, HDC hSource, RECT *rFill, RECT *r int wt;
x = wr.left;
wt = (x+w-dx <= wr.right)?(w-dx):(wr.right-wr.left);
- BitBlt(hDest,x,wr.top,wt,h,mem2dc,dx,0,SRCCOPY);
+ BitBlt(hDest,x,wr.top,wt,h,mem2dc,dx, 0, SRCCOPY);
}
x = wr.left+w-dx;
while (x < wr.right-w){
- BitBlt(hDest,x,wr.top,w,h,mem2dc,0,0,SRCCOPY);
+ BitBlt(hDest,x,wr.top,w,h,mem2dc, 0, 0, SRCCOPY);
x += w;
}
if (x <= wr.right)
- BitBlt(hDest,x,wr.top,wr.right-x,h, mem2dc,0,0,SRCCOPY);
+ BitBlt(hDest,x,wr.top,wr.right-x,h, mem2dc, 0, 0, SRCCOPY);
}
else
{
@@ -1066,11 +1066,11 @@ static BOOL ske_SkinFillRectByGlyph(HDC hDest, HDC hSource, RECT *rFill, RECT *r dx = (wr.left-rFill->left)%w;
x = wr.left-dx;
while (x < wr.right-w){
- ske_AlphaBlend(hDest,x,wr.top,w,h,mem2dc,0,0,w,h,bf);
+ ske_AlphaBlend(hDest,x,wr.top,w,h,mem2dc, 0, 0, w,h,bf);
x += w;
}
if (x <= wr.right)
- ske_AlphaBlend(hDest,x,wr.top,wr.right-x,h, mem2dc,0,0,wr.right-x,h,bf);
+ ske_AlphaBlend(hDest,x,wr.top,wr.right-x,h, mem2dc, 0, 0, wr.right-x,h,bf);
}
}
@@ -1085,15 +1085,15 @@ static BOOL ske_SkinFillRectByGlyph(HDC hDest, HDC hSource, RECT *rFill, RECT *r int wt;
x = wr.left;
wt = (x+w-dx <= wr.right)?(w-dx):(wr.right-wr.left);
- ske_AlphaBlend(hDest,x,wr.top,wt,h,mem2dc,dx,0,wt,h,bf);
+ ske_AlphaBlend(hDest,x,wr.top,wt,h,mem2dc,dx, 0, wt,h,bf);
}
x = wr.left+w-dx;
while (x < wr.right-w){
- ske_AlphaBlend(hDest,x,wr.top,w,h,mem2dc,0,0,w,h,bf);
+ ske_AlphaBlend(hDest,x,wr.top,w,h,mem2dc, 0, 0, w,h,bf);
x += w;
}
if (x <= wr.right)
- ske_AlphaBlend(hDest,x,wr.top,wr.right-x,h, mem2dc,0,0,wr.right-x,h,bf);
+ ske_AlphaBlend(hDest,x,wr.top,wr.right-x,h, mem2dc, 0, 0, wr.right-x,h,bf);
}
}
@@ -1147,7 +1147,7 @@ HBITMAP ske_CreateDIB32Point(int cx, int cy, void ** bits) #endif
;
}
- else memset(ptPixels,0,cx*cy*4);
+ else memset(ptPixels, 0, cx*cy*4);
if (bits != NULL) *bits = ptPixels;
return DirectBitmap;
}
@@ -1220,7 +1220,7 @@ static int ske_DrawSkinObject(SKINDRAWREQUEST * preq, GLYPHOBJECT * pobj) HDC memdc = NULL, glyphdc = NULL;
int k = 0;
//BITMAP bmp = {0};
- HBITMAP membmp = 0,oldbmp = 0,oldglyph = 0;
+ HBITMAP membmp = 0, oldbmp = 0, oldglyph = 0;
BYTE Is32Bit = 0;
RECT PRect;
POINT mode2offset = {0};
@@ -1283,7 +1283,7 @@ static int ske_DrawSkinObject(SKINDRAWREQUEST * preq, GLYPHOBJECT * pobj) RECT fr;
if (mode == 2)
{
- SetRect(&fr,0,0,PRect.right-PRect.left,PRect.bottom-PRect.top);
+ SetRect(&fr, 0, 0, PRect.right-PRect.left,PRect.bottom-PRect.top);
FillRect(memdc,&fr,br);
ske_SetRectOpaque(memdc,&fr);
// FillRectAlpha(memdc,&fr,pobj->dwColor|0xFF000000);
@@ -1291,7 +1291,7 @@ static int ske_DrawSkinObject(SKINDRAWREQUEST * preq, GLYPHOBJECT * pobj) else
{
fr = PRect;
- // SetRect(&fr,0,0,PRect.right-PRect.left,PRect.bottom-PRect.top);
+ // SetRect(&fr, 0, 0, PRect.right-PRect.left,PRect.bottom-PRect.top);
FillRect(preq->hDC,&fr,br);
}
DeleteObject(br);
@@ -1434,7 +1434,7 @@ static int ske_DrawSkinObject(SKINDRAWREQUEST * preq, GLYPHOBJECT * pobj) rGlyph.right = lft+pobj->dwLeft;
rGlyph.bottom = top+pobj->dwTop;
- k += ske_SkinFillRectByGlyph(memdc,glyphdc,&rFill,&rGlyph,&PRect,0,mode,depth);
+ k += ske_SkinFillRectByGlyph(memdc,glyphdc,&rFill,&rGlyph,&PRect, 0, mode,depth);
}
// Draw Top-Right corner...
if (1)
@@ -1453,7 +1453,7 @@ static int ske_DrawSkinObject(SKINDRAWREQUEST * preq, GLYPHOBJECT * pobj) rGlyph.right = rgh;
rGlyph.bottom = top+pobj->dwTop;
- k += ske_SkinFillRectByGlyph(memdc,glyphdc,&rFill,&rGlyph,&PRect,0,mode,depth);
+ k += ske_SkinFillRectByGlyph(memdc,glyphdc,&rFill,&rGlyph,&PRect, 0, mode,depth);
}
// Draw Bottom-Left corner...
@@ -1474,7 +1474,7 @@ static int ske_DrawSkinObject(SKINDRAWREQUEST * preq, GLYPHOBJECT * pobj) rGlyph.top = btm-pobj->dwBottom;
rGlyph.bottom = btm;
- k += ske_SkinFillRectByGlyph(memdc,glyphdc,&rFill,&rGlyph,&PRect,0,mode,depth);
+ k += ske_SkinFillRectByGlyph(memdc,glyphdc,&rFill,&rGlyph,&PRect, 0, mode,depth);
}
// Draw Bottom-Right corner...
if (1)
@@ -1493,7 +1493,7 @@ static int ske_DrawSkinObject(SKINDRAWREQUEST * preq, GLYPHOBJECT * pobj) rGlyph.top = btm-pobj->dwBottom;
rGlyph.bottom = btm;
- k += ske_SkinFillRectByGlyph(memdc,glyphdc,&rFill,&rGlyph,&PRect,0,mode,depth);
+ k += ske_SkinFillRectByGlyph(memdc,glyphdc,&rFill,&rGlyph,&PRect, 0, mode,depth);
}
}
@@ -1506,7 +1506,7 @@ static int ske_DrawSkinObject(SKINDRAWREQUEST * preq, GLYPHOBJECT * pobj) if (mode == 2)
OffsetRect(&PRect,mode2offset.x,mode2offset.y);
ske_AlphaBlend( preq->hDC,PRect.left,PRect.top,PRect.right-PRect.left,PRect.bottom-PRect.top,
- memdc,0,0,PRect.right-PRect.left,PRect.bottom-PRect.top,bf);
+ memdc, 0, 0, PRect.right-PRect.left,PRect.bottom-PRect.top,bf);
}
}
}
@@ -1877,7 +1877,7 @@ static BOOL ske_ReadTGAImageData(void * From, DWORD fromSize, BYTE * destBuf, DW static HBITMAP ske_LoadGlyphImage_TGA(char * szFilename)
{
BYTE *colormap = NULL;
- int cx = 0,cy = 0;
+ int cx = 0, cy = 0;
BOOL err = FALSE;
tga_header_t header;
if ( !szFilename) return NULL;
@@ -2032,12 +2032,12 @@ static HBITMAP ske_LoadGlyphImageByDecoders(char * szFileName) hBitmap = ske_LoadGlyphImage_Png2Dib(szFileName);
GetObject(hBitmap, sizeof(BITMAP), &bmpInfo);
f = (bmpInfo.bmBits != NULL);
- // hBitmap = (HBITMAP)CallService(MS_UTILS_LOADBITMAP,0,(LPARAM)szFileName);
+ // hBitmap = (HBITMAP)CallService(MS_UTILS_LOADBITMAP, 0, (LPARAM)szFileName);
// f = 1;
}
else if (hImageDecoderModule == NULL || !mir_bool_strcmpi(ext,".png"))
- hBitmap = (HBITMAP)CallService(MS_UTILS_LOADBITMAP,0,(LPARAM)szFileName);
+ hBitmap = (HBITMAP)CallService(MS_UTILS_LOADBITMAP, 0, (LPARAM)szFileName);
else
{
f = 1;
@@ -2063,7 +2063,7 @@ static HBITMAP ske_LoadGlyphImageByDecoders(char * szFileName) hBitmap32 = ske_CreateDIB32(bmpInfo.bmWidth,bmpInfo.bmHeight);
obmp24 = (HBITMAP)SelectObject(dc24,hBitmap);
obmp32 = (HBITMAP)SelectObject(dc32,hBitmap32);
- BitBlt(dc32,0,0,bmpInfo.bmWidth,bmpInfo.bmHeight,dc24,0,0,SRCCOPY);
+ BitBlt(dc32, 0, 0, bmpInfo.bmWidth,bmpInfo.bmHeight,dc24, 0, 0, SRCCOPY);
SelectObject(dc24,obmp24);
SelectObject(dc32,obmp32);
DeleteDC(dc24);
@@ -2303,7 +2303,7 @@ static void ske_LinkSkinObjects(SKINOBJECTSLIST * pObjectList) {
if ( !globj->plTextList)
{
- globj->plTextList = List_Create(0,1);
+ globj->plTextList = List_Create(0, 1);
globj->plTextList->sortFunc = ske_SortTextGlyphObjectFunc;
}
List_Insert(globj->plTextList,(void*)glText,globj->plTextList->realCount);
@@ -2349,7 +2349,7 @@ static int ske_GetSkinFromDB(char * szSection, SKINOBJECTSLIST * Skin) if (g_CluiData.fDisableSkinEngine) return 0;
Skin->pMaskList = (LISTMODERNMASK*)mir_alloc(sizeof(LISTMODERNMASK));
- memset(Skin->pMaskList,0,sizeof(LISTMODERNMASK));
+ memset(Skin->pMaskList, 0, sizeof(LISTMODERNMASK));
Skin->szSkinPlace = db_get_sa(NULL,SKIN,"SkinFolder");
if ( !Skin->szSkinPlace || (strchr(Skin->szSkinPlace, '%') && !db_get_b(NULL,SKIN,"Modified",0)))
{
@@ -2367,7 +2367,7 @@ static int ske_GetSkinFromDB(char * szSection, SKINOBJECTSLIST * Skin) dbces.pfnEnumProc = ske_enumdb_SkinObjectsProc;
dbces.szModule = SKIN;
dbces.ofsSettings = 0;
- CallService(MS_DB_CONTACT_ENUMSETTINGS,0,(LPARAM)&dbces);
+ CallService(MS_DB_CONTACT_ENUMSETTINGS, 0, (LPARAM)&dbces);
SortMaskList(pCurrentSkin->pMaskList);
ske_LinkSkinObjects(pCurrentSkin);
@@ -2440,7 +2440,7 @@ static int ske_DeleteAllSettingInSection(char * SectionName) dbces.szModule = SectionName;
dbces.ofsSettings = 0;
- CallService(MS_DB_CONTACT_ENUMSETTINGS,0,(LPARAM)&dbces);
+ CallService(MS_DB_CONTACT_ENUMSETTINGS, 0, (LPARAM)&dbces);
//delete all settings
if (nArrayLen == 0){return 0;};
@@ -2448,7 +2448,7 @@ static int ske_DeleteAllSettingInSection(char * SectionName) int i;
for (i=0;i < nArrayLen;i++)
{
- db_unset(0,SectionName,pszSettingName[i]);
+ db_unset(0, SectionName,pszSettingName[i]);
free(pszSettingName[i]);
};
free(pszSettingName);
@@ -2544,7 +2544,7 @@ BOOL ske_SelectTextEffect(HDC hdc, BYTE EffectID, DWORD FirstColor, DWORD Second if (EffectID == -1) return ske_ResetTextEffect(hdc);
if ( !pEffectStack)
{
- pEffectStack = List_Create(0,1);
+ pEffectStack = List_Create(0, 1);
}
{
int i;
@@ -2655,13 +2655,13 @@ static BOOL ske_DrawTextEffect(BYTE* destPt,BYTE* maskPt, DWORD width, DWORD hei //Here perform effect on buffer and place results to outbuf
for (k = 0; k < (effectCount&0x7F); k++)
{
- minX = max( 0, minX + mcLeftStart - 2 );
- minY = max( 0, minY + mcTopStart - 2 );
+ minX = max( 0, minX + mcLeftStart - 2 );
+ minY = max( 0, minY + mcTopStart - 2 );
maxX = min((int)width, maxX + mcRightEnd - 1 );
maxY = min((int)height, maxY + mcBottomEnd - 1 );
outbuf = (sbyte*)malloc(width*height*sizeof(sbyte));
- memset(outbuf,0,width*height*sizeof(sbyte));
+ memset(outbuf, 0, width*height*sizeof(sbyte));
for (y = (DWORD)minY; y < (DWORD)maxY; y++)
{
int val;
@@ -3160,7 +3160,7 @@ BOOL ske_ImageList_DrawEx( HIMAGELIST himl,int i,HDC hdcDst,int x,int y,int dx,i HICON hIcon = ske_ImageList_GetIcon(himl,i,ILD_NORMAL);
if (hIcon)
{
- ske_DrawIconEx(hdcDst,x,y,hIcon,dx?dx:GetSystemMetrics(SM_CXSMICON),dy?dy:GetSystemMetrics(SM_CYSMICON),0,NULL,DI_NORMAL|(alpha << 24));
+ ske_DrawIconEx(hdcDst,x,y,hIcon,dx?dx:GetSystemMetrics(SM_CXSMICON),dy?dy:GetSystemMetrics(SM_CYSMICON), 0, NULL,DI_NORMAL|(alpha << 24));
DestroyIcon(hIcon);
return TRUE;
}
@@ -3226,7 +3226,7 @@ BOOL ske_DrawIconEx(HDC hdcDst,int xLeft,int yTop,HICON hIcon,int cxWidth,int cy {
GetObject(tBmp,sizeof(BITMAP),&imbt);
otBmp = (HBITMAP)SelectObject(tempDC1,tBmp);
- DrawIconEx(tempDC1,0,0,hIcon,imbt.bmWidth,imbt.bmHeight,istepIfAniCur,hbrFlickerFreeDraw,DI_IMAGE);
+ DrawIconEx(tempDC1, 0, 0, hIcon,imbt.bmWidth,imbt.bmHeight,istepIfAniCur,hbrFlickerFreeDraw,DI_IMAGE);
noMirrorMask = TRUE;
}
@@ -3242,7 +3242,7 @@ BOOL ske_DrawIconEx(HDC hdcDst,int xLeft,int yTop,HICON hIcon,int cxWidth,int cy tempDC1 = ske_RequestBufferDC(hdcDst,BUFFER_DRAWICON,imbt.bmWidth,imbt.bmHeight);
if (tempDC1)
{
- DrawIconEx(tempDC1,0,0,hIcon,imbt.bmWidth,imbt.bmHeight,istepIfAniCur,hbrFlickerFreeDraw,DI_IMAGE);
+ DrawIconEx(tempDC1, 0, 0, hIcon,imbt.bmWidth,imbt.bmHeight,istepIfAniCur,hbrFlickerFreeDraw,DI_IMAGE);
noMirrorMask = TRUE;
ske_ReleaseBufferDC(tempDC1,2000); //keep buffer for 2 seconds
}
@@ -3343,7 +3343,7 @@ BOOL ske_DrawIconEx(HDC hdcDst,int xLeft,int yTop,HICON hIcon,int cxWidth,int cy }
{
BLENDFUNCTION bf = {AC_SRC_OVER, diFlags&128, alpha, AC_SRC_ALPHA };
- ske_AlphaBlend(hdcDst,xLeft,yTop,cxWidth, cyWidth, imDC,0,0, cx,icy,bf);
+ ske_AlphaBlend(hdcDst,xLeft,yTop,cxWidth, cyWidth, imDC, 0, 0, cx,icy,bf);
}
if (immaskbt.bmBits == NULL) free(immaskbits);
if (imbt.bmBits == NULL) free(imimagbits);
@@ -3381,7 +3381,7 @@ int ske_RedrawCompleteWindow() if (g_CluiData.fLayered)
{
ske_DrawNonFramedObjects(TRUE,0);
- CallService(MS_SKINENG_INVALIDATEFRAMEIMAGE,0,0);
+ CallService(MS_SKINENG_INVALIDATEFRAMEIMAGE, 0, 0);
}
else
{
@@ -3482,8 +3482,8 @@ static INT_PTR ske_Service_InvalidateFrameImage(WPARAM wParam, LPARAM lParam) }
if ( !frm->UpdateRgn)
{
- frm->UpdateRgn = CreateRectRgn(0,0,1,1);
- CombineRgn(frm->UpdateRgn,r2,0,RGN_COPY);
+ frm->UpdateRgn = CreateRectRgn(0, 0, 1,1);
+ CombineRgn(frm->UpdateRgn,r2, 0, RGN_COPY);
}
else CombineRgn(frm->UpdateRgn,frm->UpdateRgn,r2,RGN_OR);
DeleteObject(r2);
@@ -3499,7 +3499,7 @@ static INT_PTR ske_Service_InvalidateFrameImage(WPARAM wParam, LPARAM lParam) else
Sync( QueueAllFramesUpdating , (BYTE)1 );
if ( !flag_bUpdateQueued || g_flag_bPostWasCanceled)
- if (PostMessage(pcli->hwndContactList,UM_UPDATE,0,0))
+ if (PostMessage(pcli->hwndContactList,UM_UPDATE, 0, 0))
{
flag_bUpdateQueued = 1;
g_flag_bPostWasCanceled = 0;
@@ -3856,7 +3856,7 @@ int ske_ValidateFrameImageProc(RECT *r) // Callin }
if (IsNewCache)
{
- ske_DrawNonFramedObjects(0,&wnd);
+ ske_DrawNonFramedObjects(0, &wnd);
IsForceAllPainting = 1;
}
if (flag_bJustDrawNonFramedObjects)
@@ -3866,7 +3866,7 @@ int ske_ValidateFrameImageProc(RECT *r) // Callin }
if (IsForceAllPainting)
{
- BitBlt(g_pCachedWindow->hImageDC,0,0,g_pCachedWindow->Width,g_pCachedWindow->Height,g_pCachedWindow->hBackDC,0,0,SRCCOPY);
+ BitBlt(g_pCachedWindow->hImageDC, 0, 0, g_pCachedWindow->Width,g_pCachedWindow->Height,g_pCachedWindow->hBackDC, 0, 0, SRCCOPY);
Sync( QueueAllFramesUpdating, (BYTE)1 );
}
//-- Validating frames
@@ -3937,7 +3937,7 @@ void ske_ApplyTransluency() if ( !g_CluiData.fLayered && (/*(g_CluiData.bCurrentAlpha == 255) || */(g_proc_SetLayeredWindowAttributesNew && IsTransparancy)))
{
if ( !layered) SetWindowLongPtr(hwnd, GWL_EXSTYLE, GetWindowLongPtr(hwnd, GWL_EXSTYLE) | WS_EX_LAYERED);
- if (g_proc_SetLayeredWindowAttributesNew) g_proc_SetLayeredWindowAttributesNew(hwnd, RGB(0,0,0), (BYTE)g_CluiData.bCurrentAlpha, LWA_ALPHA);
+ if (g_proc_SetLayeredWindowAttributesNew) g_proc_SetLayeredWindowAttributesNew(hwnd, RGB(0, 0, 0), (BYTE)g_CluiData.bCurrentAlpha, LWA_ALPHA);
}
AniAva_RedrawAllAvatars(FALSE);
@@ -3958,7 +3958,7 @@ int ske_JustUpdateWindowImage() int ske_JustUpdateWindowImageRect(RECT *rty)
//Update window image
{
- BLENDFUNCTION bf = {AC_SRC_OVER, 0,g_CluiData.bCurrentAlpha, AC_SRC_ALPHA };
+ BLENDFUNCTION bf = {AC_SRC_OVER, 0, g_CluiData.bCurrentAlpha, AC_SRC_ALPHA };
POINT dest = {0}, src = {0};
int res;
RECT wnd = *rty;
@@ -3995,7 +3995,7 @@ int ske_DrawImageAt(HDC hdc, RECT *rc) {
BLENDFUNCTION bf = {AC_SRC_OVER, 0, 255, AC_SRC_ALPHA };
BitBlt(g_pCachedWindow->hImageDC,rc->left,rc->top,rc->right-rc->left,rc->bottom-rc->top,g_pCachedWindow->hBackDC,rc->left,rc->top,SRCCOPY);
- ske_AlphaBlend(g_pCachedWindow->hImageDC,rc->left,rc->top,rc->right-rc->left,rc->bottom-rc->top,hdc,0,0,rc->right-rc->left,rc->bottom-rc->top,bf);
+ ske_AlphaBlend(g_pCachedWindow->hImageDC,rc->left,rc->top,rc->right-rc->left,rc->bottom-rc->top,hdc, 0, 0, rc->right-rc->left,rc->bottom-rc->top,bf);
if ( !g_mutex_bLockUpdating)
ske_UpdateWindowImage();
return 0;
@@ -4017,7 +4017,7 @@ static DWORD ske_HexToARGB(char * Hex) char * st;
BYTE alpha;
DWORD AARRGGBB = 0;
- _snprintf(buf,10,"%s\n",Hex);
+ _snprintf(buf,10, "%s\n",Hex);
if (buf[1] == 'x' || buf[1] == 'X')
_snprintf(buf2,11,"0x%s\n",buf+2);
else
@@ -4123,7 +4123,7 @@ static void OLDske_AddParseTextGlyphObject(char * szGlyphTextID,char * szDefineS GLYPHOBJECT *globj = NULL;
{
char buf[255] = {0};
- GetParamN(szDefineString,buf,sizeof(buf),0,',',TRUE);
+ GetParamN(szDefineString,buf,sizeof(buf), 0, ',',TRUE);
if (strlen(buf))
{
SKINOBJECTDESCRIPTOR * lpobj;
@@ -4137,7 +4137,7 @@ static void OLDske_AddParseTextGlyphObject(char * szGlyphTextID,char * szDefineS if ( !globj->plTextList)
{
- globj->plTextList = List_Create(0,1);
+ globj->plTextList = List_Create(0, 1);
globj->plTextList->sortFunc = ske_SortTextGlyphObjectFunc;
}
glText = (GLYPHTEXT*)mir_calloc(sizeof(GLYPHTEXT));
@@ -4148,7 +4148,7 @@ static void OLDske_AddParseTextGlyphObject(char * szGlyphTextID,char * szDefineS glText->iRight = atoi(GetParamN(szDefineString,buf,sizeof(buf),3,',',TRUE));
glText->iBottom = atoi(GetParamN(szDefineString,buf,sizeof(buf),4,',',TRUE));
{
- memset(buf,0,6);
+ memset(buf, 0, 6);
GetParamN(szDefineString,buf,sizeof(buf),5,',',TRUE);
buf[0] &= 95; buf[1] &= 95; buf[2] &= 95; buf[3] &= 95; buf[4] &= 95; buf[5] &= 95; //to uppercase: &01011111 (0-95)
glText->RelativeFlags =
@@ -4175,7 +4175,7 @@ static void OLDske_AddParseTextGlyphObject(char * szGlyphTextID,char * szDefineS static void ske_AddParseTextGlyphObject(char * szGlyphTextID,char * szDefineString,SKINOBJECTSLIST *Skin)
{
char buf[255] = {0};
- GetParamN(szDefineString,buf,sizeof(buf),0,',',TRUE);
+ GetParamN(szDefineString,buf,sizeof(buf), 0, ',',TRUE);
if (strlen(buf))
{
GLYPHTEXT * glText;
@@ -4187,7 +4187,7 @@ static void ske_AddParseTextGlyphObject(char * szGlyphTextID,char * szDefineStri glText->iRight = atoi(GetParamN(szDefineString,buf,sizeof(buf),3,',',TRUE));
glText->iBottom = atoi(GetParamN(szDefineString,buf,sizeof(buf),4,',',TRUE));
{
- memset(buf,0,6);
+ memset(buf, 0, 6);
GetParamN(szDefineString,buf,sizeof(buf),5,',',TRUE);
buf[0] &= 95; buf[1] &= 95; buf[2] &= 95; buf[3] &= 95; buf[4] &= 95; buf[5] &= 95; //to uppercase: &01011111 (0-95)
glText->RelativeFlags =
@@ -4206,7 +4206,7 @@ static void ske_AddParseTextGlyphObject(char * szGlyphTextID,char * szDefineStri glText->stText = ske_ParseText(glText->stValueText);
if ( !Skin->pTextList)
- Skin->pTextList = List_Create(0,1);
+ Skin->pTextList = List_Create(0, 1);
List_InsertPtr(Skin->pTextList,glText);
}
}
@@ -4235,7 +4235,7 @@ static void ske_AddParseSkinFont(char * szFontID,char * szDefineString,SKINOBJEC logfont.lfQuality = DEFAULT_QUALITY;
logfont.lfPitchAndFamily = DEFAULT_PITCH|FF_DONTCARE;
- strncpy(logfont.lfFaceName,GetParamN(szDefineString,buf,sizeof(buf),0,',',TRUE),32);
+ strncpy(logfont.lfFaceName,GetParamN(szDefineString,buf,sizeof(buf), 0, ',',TRUE),32);
logfont.lfHeight = atoi(GetParamN(szDefineString,buf,sizeof(buf),1,',',TRUE));
if (logfont.lfHeight < 0)
{
@@ -4255,7 +4255,7 @@ static void ske_AddParseSkinFont(char * szFontID,char * szDefineString,SKINOBJEC {
sf->szFontID = mir_strdup(szFontID);
if ( !gl_plSkinFonts)
- gl_plSkinFonts = List_Create(0,1);
+ gl_plSkinFonts = List_Create(0, 1);
if (gl_plSkinFonts)
{
List_Insert(gl_plSkinFonts,(void*)sf,gl_plSkinFonts->realCount);
@@ -4290,8 +4290,8 @@ if (sz.cx == 0 || sz.cy == 0) return NULL; tempDC = CreateCompatibleDC(NULL);
nImage = ske_CreateDIB32(sz.cx,sz.cy);
oImage = SelectObject(tempDC,nImage);
-ske_DrawIconEx(tempDC,0,0,hBottom,sz.cx,sz.cy,0,NULL,DI_NORMAL);
-ske_DrawIconEx(tempDC,0,0,hTop,sz.cx,sz.cy,0,NULL,DI_NORMAL|(alpha << 24));
+ske_DrawIconEx(tempDC, 0, 0, hBottom,sz.cx,sz.cy, 0, NULL,DI_NORMAL);
+ske_DrawIconEx(tempDC, 0, 0, hTop,sz.cx,sz.cy, 0, NULL,DI_NORMAL|(alpha << 24));
SelectObject(tempDC,oImage);
DeleteDC(tempDC);
{
@@ -4318,7 +4318,7 @@ return res; */
static BOOL ske_CheckHasAlfaChannel(BYTE * from, int widthByte, int height)
{
- int i=0,j = 0;
+ int i=0, j = 0;
DWORD * pt = (DWORD*)from;
while (j < height)
{
@@ -4523,8 +4523,8 @@ HICON ske_CreateJoinedIcon(HICON hBottom, HICON hTop, BYTE alpha) }
else
{
- ske_DrawIconEx(tempDC,0,0,hBottom,16,16,0,NULL,DI_NORMAL);
- ske_DrawIconEx(tempDC,0,0,hTop,16,16,0,NULL,DI_NORMAL|(alpha << 24));
+ ske_DrawIconEx(tempDC, 0, 0, hBottom,16,16, 0, NULL,DI_NORMAL);
+ ske_DrawIconEx(tempDC, 0, 0, hTop,16,16, 0, NULL,DI_NORMAL|(alpha << 24));
}
DeleteObject(iciBottom.hbmColor);
DeleteObject(iciTop.hbmColor);
@@ -4535,7 +4535,7 @@ HICON ske_CreateJoinedIcon(HICON hBottom, HICON hTop, BYTE alpha) DeleteDC(tempDC);
{
//BYTE *p = malloc(32);
- //memset(p,0,32);
+ //memset(p, 0, 32);
BYTE p[32] = {0};
nMask = CreateBitmap(16,16,1,1,(void*)&p);
{
@@ -4544,9 +4544,9 @@ HICON ske_CreateJoinedIcon(HICON hBottom, HICON hTop, BYTE alpha) HBITMAP hbm = CreateCompatibleBitmap(tempDC3,16,16);
HBITMAP obmp = (HBITMAP)SelectObject(tempDC2,nMask);
HBITMAP obmp2 = (HBITMAP)SelectObject(tempDC3,hbm);
- DrawIconEx(tempDC2,0,0,hBottom,16,16,0,NULL,DI_MASK);
- DrawIconEx(tempDC3,0,0,hTop,16,16,0,NULL,DI_MASK);
- BitBlt(tempDC2,0,0,16,16,tempDC3,0,0,SRCAND);
+ DrawIconEx(tempDC2, 0, 0, hBottom,16,16, 0, NULL,DI_MASK);
+ DrawIconEx(tempDC3, 0, 0, hTop,16,16, 0, NULL,DI_MASK);
+ BitBlt(tempDC2, 0, 0, 16,16,tempDC3, 0, 0, SRCAND);
SelectObject(tempDC2,obmp);
SelectObject(tempDC3,obmp2);
DeleteObject(hbm);
|