From 055d4460e17344248c7364afc5d19deeda39d644 Mon Sep 17 00:00:00 2001 From: George Hazan Date: Wed, 1 Jan 2014 12:32:05 +0000 Subject: copyright update for year 2014 git-svn-id: http://svn.miranda-ng.org/main/trunk@7438 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- plugins/AVS/src/acc.cpp | 75 +++++++++++++++++++++-------------------- plugins/AVS/src/commonheaders.h | 7 ++-- plugins/AVS/src/main.cpp | 5 +-- plugins/AVS/src/options.cpp | 5 +-- plugins/AVS/src/services.cpp | 7 ++-- plugins/AVS/src/stdafx.cpp | 2 +- 6 files changed, 53 insertions(+), 48 deletions(-) (limited to 'plugins/AVS') diff --git a/plugins/AVS/src/acc.cpp b/plugins/AVS/src/acc.cpp index a0d63c6b81..cfdfd8ec4b 100644 --- a/plugins/AVS/src/acc.cpp +++ b/plugins/AVS/src/acc.cpp @@ -1,9 +1,10 @@ /* -Miranda IM: the free IM client for Microsoft* Windows* +Miranda NG: the free IM client for Microsoft* Windows* -Copyright 2000-2004 Miranda ICQ/IM project, -all portions of this codebase are copyrighted to the people +Copyright (c) 2012-14 Miranda NG project (http://miranda-ng.org) +Copyright (c) 2000-04 Miranda ICQ/IM project, +all portions of this codebase are copyrighted to the people listed in contributors.txt. This program is free software; you can redistribute it and/or @@ -31,7 +32,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. #define GIF_DISPOSAL_BACKGROUND 2 #define GIF_DISPOSAL_PREVIOUS 3 -typedef struct +typedef struct { HANDLE hContact; char proto[64]; @@ -90,7 +91,7 @@ void ResizeFlash(HWND hwnd, ACCData* data) rc.bottom -= 2; } - FLASHAVATAR fa = {0}; + FLASHAVATAR fa = {0}; fa.hContact = data->hContact; fa.cProto = data->proto; fa.hParentWindow = hwnd; @@ -105,7 +106,7 @@ void SetBkgFlash(HWND hwnd, ACCData* data) if ((data->hContact != NULL || data->proto[0] != '\0') && ServiceExists(MS_FAVATAR_SETBKCOLOR)) { - FLASHAVATAR fa = {0}; + FLASHAVATAR fa = {0}; fa.hContact = data->hContact; fa.cProto = data->proto; fa.hParentWindow = hwnd; @@ -125,7 +126,7 @@ void DestroyFlash(HWND hwnd, ACCData* data) if ((data->hContact != NULL || data->proto[0] != '\0') && ServiceExists(MS_FAVATAR_DESTROY)) { - FLASHAVATAR fa = {0}; + FLASHAVATAR fa = {0}; fa.hContact = data->hContact; fa.cProto = data->proto; fa.hParentWindow = hwnd; @@ -149,7 +150,7 @@ void StartFlash(HWND hwnd, ACCData* data) else if (data->proto[0] != '\0') { protoPicCacheEntry *ace = NULL; - for (int i = 0; i < g_MyAvatars.getCount(); i++) + for (int i = 0; i < g_MyAvatars.getCount(); i++) { if (!lstrcmpA(data->proto, g_MyAvatars[i].szProtoname)) { @@ -160,7 +161,7 @@ void StartFlash(HWND hwnd, ACCData* data) if (ace != NULL && ace->szFilename != NULL) format = ProtoGetAvatarFormat(ace->szFilename); - else + else format = 0; } else @@ -169,14 +170,14 @@ void StartFlash(HWND hwnd, ACCData* data) if (format != PA_FORMAT_XML && format != PA_FORMAT_SWF) return; - FLASHAVATAR fa = {0}; + FLASHAVATAR fa = {0}; fa.hContact = data->hContact; fa.cProto = data->proto; fa.hParentWindow = hwnd; fa.id = 1675; CallService(MS_FAVATAR_MAKE, (WPARAM)&fa, 0); - if (fa.hWindow == NULL) + if (fa.hWindow == NULL) return; data->showingFlash = TRUE; @@ -189,21 +190,21 @@ BOOL AnimatedGifGetData(ACCData* data) FIBITMAP *page = fei->FI_LockPage(data->ag.multi, 0); if (page == NULL) return FALSE; - + // Get info FITAG *tag = NULL; if (!fei->FI_GetMetadata(FIMD_ANIMATION, page, "LogicalWidth", &tag)) goto ERR; data->ag.logicalWidth = *(WORD *)fei->FI_GetTagValue(tag); - + if (!fei->FI_GetMetadata(FIMD_ANIMATION, page, "LogicalHeight", &tag)) goto ERR; data->ag.logicalHeight = *(WORD *)fei->FI_GetTagValue(tag); - + if (!fei->FI_GetMetadata(FIMD_ANIMATION, page, "Loop", &tag)) goto ERR; data->ag.loop = (*(LONG *)fei->FI_GetTagValue(tag) > 0); - + if (fei->FI_HasBackgroundColor(page)) fei->FI_GetBackgroundColor(page, &data->ag.background); @@ -217,15 +218,15 @@ ERR: void AnimatedGifDispodeFrame(ACCData* data) { - if (data->ag.frame.disposal_method == GIF_DISPOSAL_PREVIOUS) + if (data->ag.frame.disposal_method == GIF_DISPOSAL_PREVIOUS) { // TODO - } - else if (data->ag.frame.disposal_method == GIF_DISPOSAL_BACKGROUND) + } + else if (data->ag.frame.disposal_method == GIF_DISPOSAL_BACKGROUND) { - for (int y = 0; y < data->ag.frame.height; y++) + for (int y = 0; y < data->ag.frame.height; y++) { - RGBQUAD *scanline = (RGBQUAD *) fei->FI_GetScanLine(data->ag.dib, + RGBQUAD *scanline = (RGBQUAD *) fei->FI_GetScanLine(data->ag.dib, data->ag.logicalHeight - (y + data->ag.frame.top) - 1) + data->ag.frame.left; for (int x = 0; x < data->ag.frame.width; x++) *scanline++ = data->ag.background; @@ -358,7 +359,7 @@ void StartAnimatedGif(HWND hwnd, ACCData* data) AVATARCACHEENTRY *ace = NULL; if (data->hContact != NULL) - ace = (AVATARCACHEENTRY *) GetAvatarBitmap((WPARAM) data->hContact, 0); + ace = (AVATARCACHEENTRY *) GetAvatarBitmap((WPARAM) data->hContact, 0); else ace = (AVATARCACHEENTRY *) GetMyAvatar(0, (LPARAM) data->proto); @@ -390,7 +391,7 @@ void StartAnimatedGif(HWND hwnd, ACCData* data) goto ERR; //fill with background color to start - for (y = 0; y < data->ag.logicalHeight; y++) + for (y = 0; y < data->ag.logicalHeight; y++) { RGBQUAD *scanline = (RGBQUAD *) fei->FI_GetScanLine(data->ag.dib, y); for (x = 0; x < data->ag.logicalWidth; x++) @@ -463,7 +464,7 @@ static void Invalidate(HWND hwnd) HWND parent = GetParent(hwnd); RECT rc; GetWindowRect(hwnd, &rc); - ScreenToClient(parent, &rc); + ScreenToClient(parent, &rc); InvalidateRect(parent, &rc, TRUE); } InvalidateRect(hwnd, NULL, TRUE); @@ -492,13 +493,13 @@ static void DrawText(HDC hdc, HFONT hFont, const RECT &rc, const TCHAR *text) // Calc text size RECT tr_ret = tr; - DrawText(hdc, text, -1, &tr_ret, + DrawText(hdc, text, -1, &tr_ret, DT_WORDBREAK | DT_NOPREFIX | DT_CENTER | DT_CALCRECT); // Calc needed size tr.top += ((tr.bottom - tr.top) - (tr_ret.bottom - tr_ret.top)) / 2; tr.bottom = tr.top + (tr_ret.bottom - tr_ret.top); - DrawText(hdc, text, -1, &tr, + DrawText(hdc, text, -1, &tr, DT_WORDBREAK | DT_NOPREFIX | DT_CENTER); SelectObject(hdc, oldFont); @@ -506,7 +507,7 @@ static void DrawText(HDC hdc, HFONT hFont, const RECT &rc, const TCHAR *text) static LRESULT CALLBACK ACCWndProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam) { ACCData* data = (ACCData *) GetWindowLongPtr(hwnd, 0); - switch(msg) + switch(msg) { case WM_NCCREATE: { @@ -514,7 +515,7 @@ static LRESULT CALLBACK ACCWndProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM l SetWindowLongPtr(hwnd, GWL_EXSTYLE, GetWindowLongPtr(hwnd, GWL_EXSTYLE) | WS_EX_TRANSPARENT); data = (ACCData*) mir_alloc(sizeof(ACCData)); - if (data == NULL) + if (data == NULL) return FALSE; SetWindowLongPtr(hwnd, 0, (LONG_PTR)data); @@ -536,7 +537,7 @@ static LRESULT CALLBACK ACCWndProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM l case WM_NCDESTROY: { DestroyAnimation(hwnd, data); - if (data) + if (data) { UnhookEvent(data->hHook); UnhookEvent(data->hHookMy); @@ -653,7 +654,7 @@ static LRESULT CALLBACK ACCWndProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM l // Get avatar if (data->showingFlash && ServiceExists(MS_FAVATAR_GETINFO)) { - FLASHAVATAR fa = {0}; + FLASHAVATAR fa = {0}; fa.hContact = data->hContact; fa.cProto = data->proto; fa.hParentWindow = hwnd; @@ -673,7 +674,7 @@ static LRESULT CALLBACK ACCWndProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM l else ace = (avatarCacheEntry *) CallService(MS_AV_GETAVATARBITMAP, (WPARAM) data->hContact, 0); - if (ace == NULL || ace->bmHeight == 0 || ace->bmWidth == 0 + if (ace == NULL || ace->bmHeight == 0 || ace->bmWidth == 0 || (data->respectHidden && (ace->dwFlags & AVS_HIDEONCLIST))) { *width = 0; @@ -689,14 +690,14 @@ static LRESULT CALLBACK ACCWndProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM l { *height = ace->bmHeight; *width = ace->bmWidth; - } + } else if (ace->bmHeight > ace->bmWidth) { float dScale = targetHeight / (float)ace->bmHeight; *height = targetHeight; *width = (int) (ace->bmWidth * dScale); } - else + else { float dScale = targetWidth / (float)ace->bmWidth; *height = (int) (ace->bmHeight * dScale); @@ -734,7 +735,7 @@ static LRESULT CALLBACK ACCWndProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM l { PAINTSTRUCT ps; HDC hdc = BeginPaint(hwnd, &ps); - if (hdc == NULL) + if (hdc == NULL) break; int oldBkMode = SetBkMode(hdc, TRANSPARENT); @@ -783,7 +784,7 @@ static LRESULT CALLBACK ACCWndProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM l avdrq.szProto = data->proto; avdrq.hTargetDC = hdc; avdrq.dwFlags = AVDRQ_HIDEBORDERONTRANSPARENCY - | (data->respectHidden ? AVDRQ_RESPECTHIDDEN : 0) + | (data->respectHidden ? AVDRQ_RESPECTHIDDEN : 0) | (data->hContact != NULL ? 0 : AVDRQ_OWNPIC) | (data->avatarBorderColor == -1 ? 0 : AVDRQ_DRAWBORDER) | (data->avatarRoundCornerRadius <= 0 ? 0 : AVDRQ_ROUNDEDCORNER) @@ -806,8 +807,8 @@ static LRESULT CALLBACK ACCWndProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM l } else ret = DrawAvatarPicture(0, (LPARAM)&avdrq); - - if (ret == 0) + + if (ret == 0) DrawText(hdc, data->hFont, rc, data->noAvatarText); } @@ -885,7 +886,7 @@ static LRESULT CALLBACK ACCWndProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM l } -int LoadACC() +int LoadACC() { WNDCLASSEX wc = {0}; wc.cbSize = sizeof(wc); diff --git a/plugins/AVS/src/commonheaders.h b/plugins/AVS/src/commonheaders.h index 063a5ece20..c5f91779c2 100644 --- a/plugins/AVS/src/commonheaders.h +++ b/plugins/AVS/src/commonheaders.h @@ -1,8 +1,9 @@ /* -Miranda IM: the free IM client for Microsoft* Windows* +Miranda NG: the free IM client for Microsoft* Windows* -Copyright 2000-2004 Miranda ICQ/IM project, +Copyright (c) 2012-14 Miranda NG project (http://miranda-ng.org) +Copyright (c) 2000-04 Miranda ICQ/IM project, all portions of this codebase are copyrighted to the people listed in contributors.txt. @@ -68,7 +69,7 @@ struct CacheNode { CacheNode *pNextNode; avatarCacheEntry ace; - + BOOL loaded; int mustLoad; DWORD dwFlags; diff --git a/plugins/AVS/src/main.cpp b/plugins/AVS/src/main.cpp index 465edd4587..5c4c050b3f 100644 --- a/plugins/AVS/src/main.cpp +++ b/plugins/AVS/src/main.cpp @@ -1,8 +1,9 @@ /* -Miranda IM: the free IM client for Microsoft* Windows* +Miranda NG: the free IM client for Microsoft* Windows* -Copyright 2000-2004 Miranda ICQ/IM project, +Copyright (c) 2012-14 Miranda NG project (http://miranda-ng.org) +Copyright (c) 2000-04 Miranda ICQ/IM project, all portions of this codebase are copyrighted to the people listed in contributors.txt. diff --git a/plugins/AVS/src/options.cpp b/plugins/AVS/src/options.cpp index b4907b8efa..fa15d767a3 100644 --- a/plugins/AVS/src/options.cpp +++ b/plugins/AVS/src/options.cpp @@ -1,8 +1,9 @@ /* -Miranda IM: the free IM client for Microsoft* Windows* +Miranda NG: the free IM client for Microsoft* Windows* -Copyright 2000-2004 Miranda ICQ/IM project, +Copyright (c) 2012-14 Miranda NG project (http://miranda-ng.org) +Copyright (c) 2000-04 Miranda ICQ/IM project, all portions of this codebase are copyrighted to the people listed in contributors.txt. diff --git a/plugins/AVS/src/services.cpp b/plugins/AVS/src/services.cpp index 7eb7c654ea..8866404681 100644 --- a/plugins/AVS/src/services.cpp +++ b/plugins/AVS/src/services.cpp @@ -1,8 +1,9 @@ /* -Miranda IM: the free IM client for Microsoft* Windows* +Miranda NG: the free IM client for Microsoft* Windows* -Copyright 2000-2004 Miranda ICQ/IM project, +Copyright (c) 2012-14 Miranda NG project (http://miranda-ng.org) +Copyright (c) 2000-04 Miranda ICQ/IM project, all portions of this codebase are copyrighted to the people listed in contributors.txt. @@ -976,7 +977,7 @@ void InitServices() CreateServiceFunction(MS_AV_DRAWAVATAR, DrawAvatarPicture); CreateServiceFunction(MS_AV_GETMYAVATAR, GetMyAvatar); CreateServiceFunction(MS_AV_REPORTMYAVATARCHANGED, ReportMyAvatarChanged); - + CreateServiceFunction(MS_AV_LOADBITMAP32, BmpFilterLoadBitmap32); CreateServiceFunction(MS_AV_SAVEBITMAP, BmpFilterSaveBitmap); CreateServiceFunction(MS_AV_CANSAVEBITMAP, BmpFilterCanSaveBitmap); diff --git a/plugins/AVS/src/stdafx.cpp b/plugins/AVS/src/stdafx.cpp index e7e41dae3c..0edf9e36e6 100644 --- a/plugins/AVS/src/stdafx.cpp +++ b/plugins/AVS/src/stdafx.cpp @@ -1,5 +1,5 @@ /* -Copyright (C) 2012-13 Miranda NG Project (http://miranda-ng.org) +Copyright (C) 2012-14 Miranda NG project (http://miranda-ng.org) This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License -- cgit v1.2.3