From 1039b2829a264280493ba0fa979214fe024dc70c Mon Sep 17 00:00:00 2001 From: George Hazan Date: Sun, 26 Dec 2021 17:06:04 +0300 Subject: WORD -> uint16_t --- plugins/FloatingContacts/src/bitmap_funcs.cpp | 6 +++--- plugins/FloatingContacts/src/fltcont.h | 10 +++++----- plugins/FloatingContacts/src/main.cpp | 6 +++--- plugins/FloatingContacts/src/options.cpp | 4 ++-- plugins/FloatingContacts/src/thumbs.cpp | 2 +- 5 files changed, 14 insertions(+), 14 deletions(-) (limited to 'plugins/FloatingContacts') diff --git a/plugins/FloatingContacts/src/bitmap_funcs.cpp b/plugins/FloatingContacts/src/bitmap_funcs.cpp index c6ed9cfc34..05223da683 100644 --- a/plugins/FloatingContacts/src/bitmap_funcs.cpp +++ b/plugins/FloatingContacts/src/bitmap_funcs.cpp @@ -768,9 +768,9 @@ void MyBitmap::DrawText(wchar_t *str, int x, int y, int blur, int strength) mx = (uint8_t)(max(max(bx, rx), gx)); if (1) { - bx = (bx < mx) ? (uint8_t)(((WORD)bx * 7 + (WORD)mx) >> 3) : bx; - rx = (rx < mx) ? (uint8_t)(((WORD)rx * 7 + (WORD)mx) >> 3) : rx; - gx = (gx < mx) ? (uint8_t)(((WORD)gx * 7 + (WORD)mx) >> 3) : gx; + bx = (bx < mx) ? (uint8_t)(((uint16_t)bx * 7 + (uint16_t)mx) >> 3) : bx; + rx = (rx < mx) ? (uint8_t)(((uint16_t)rx * 7 + (uint16_t)mx) >> 3) : rx; + gx = (gx < mx) ? (uint8_t)(((uint16_t)gx * 7 + (uint16_t)mx) >> 3) : gx; // reduce boldeness at white fonts } COLOR32 cl = row_dst[j]; diff --git a/plugins/FloatingContacts/src/fltcont.h b/plugins/FloatingContacts/src/fltcont.h index 4d2724cf8b..0530c7d78f 100644 --- a/plugins/FloatingContacts/src/fltcont.h +++ b/plugins/FloatingContacts/src/fltcont.h @@ -75,9 +75,9 @@ enum //extern uint8_t thumbAlpha; //extern BOOL bShowTip; extern BOOL bEnableTip; -//extern WORD TimeIn; +//extern uint16_t TimeIn; //extern BOOL bToTop; -//extern WORD ToTopTime; +//extern uint16_t ToTopTime; //extern BOOL bHideWhenCListShow; extern BOOL bIsCListShow; @@ -93,7 +93,7 @@ extern HPEN hRBEdgesPen; extern HBRUSH hBkBrush; extern DWORD bkColor; extern HBITMAP hBmpBackground; -extern WORD nBackgroundBmpUse; +extern uint16_t nBackgroundBmpUse; @@ -107,9 +107,9 @@ typedef struct _FCOptions BOOL bFixedWidth; int nThumbWidth; BOOL bShowTip; - WORD TimeIn; + uint16_t TimeIn; BOOL bToTop; - WORD ToTopTime; + uint16_t ToTopTime; BOOL bHideWhenCListShow; BOOL bUseSingleClick; BOOL bShowIdle; diff --git a/plugins/FloatingContacts/src/main.cpp b/plugins/FloatingContacts/src/main.cpp index 57894b3426..cf6a506dce 100644 --- a/plugins/FloatingContacts/src/main.cpp +++ b/plugins/FloatingContacts/src/main.cpp @@ -49,7 +49,7 @@ HPEN hRBEdgesPen; HBRUSH hBkBrush; DWORD bkColor; HBITMAP hBmpBackground; -WORD nBackgroundBmpUse = CLB_STRETCH; +uint16_t nBackgroundBmpUse = CLB_STRETCH; HWND hwndMiranda; BOOL bVersionOK; @@ -564,7 +564,7 @@ static void CreateBackgroundBrush() if (tszBitmapName != NULL) hBmpBackground = Bitmap_Load(tszBitmapName); } - nBackgroundBmpUse = (WORD)g_plugin.getWord("BkBitmapOpt", FLT_DEFAULT_BKGNDBITMAPOPT); + nBackgroundBmpUse = (uint16_t)g_plugin.getWord("BkBitmapOpt", FLT_DEFAULT_BKGNDBITMAPOPT); // Create brush hBkBrush = CreateSolidBrush(bkColor); @@ -827,7 +827,7 @@ static LRESULT __stdcall newMirandaWndProc(HWND hwnd, UINT uMsg, WPARAM wParam, else if (!(wp->flags & SWP_NOMOVE)) { uint8_t method = db_get_b(0, "ModernData", "HideBehind", 0); if (method) { - WORD wBehindEdgeBorderSize = db_get_w(0, "ModernData", "HideBehindBorderSize", 0); + uint16_t wBehindEdgeBorderSize = db_get_w(0, "ModernData", "HideBehindBorderSize", 0); RECT rc = { wp->x, wp->y, wp->x + wp->cx, wp->y + wp->cy }; RECT rcScr = { wBehindEdgeBorderSize*(2 - method), 0, GetSystemMetrics(SM_CXSCREEN) - wBehindEdgeBorderSize * (method - 1), GetSystemMetrics(SM_CYSCREEN) }; RECT rcOverlap; diff --git a/plugins/FloatingContacts/src/options.cpp b/plugins/FloatingContacts/src/options.cpp index 5e9406527f..aae6c0c2e3 100644 --- a/plugins/FloatingContacts/src/options.cpp +++ b/plugins/FloatingContacts/src/options.cpp @@ -183,7 +183,7 @@ static INT_PTR APIENTRY OptSknWndProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LP if (wszBitmap) SetDlgItemText(hwndDlg, IDC_FILENAME, wszBitmap); - WORD bmpUse = (WORD)g_plugin.getWord("BkBitmapOpt", FLT_DEFAULT_BKGNDBITMAPOPT); + uint16_t bmpUse = (uint16_t)g_plugin.getWord("BkBitmapOpt", FLT_DEFAULT_BKGNDBITMAPOPT); CheckDlgButton(hwndDlg, IDC_STRETCHH, ((bmpUse & CLB_STRETCHH) ? BST_CHECKED : BST_UNCHECKED)); CheckDlgButton(hwndDlg, IDC_STRETCHV, ((bmpUse & CLB_STRETCHV) ? BST_CHECKED : BST_UNCHECKED)); CheckDlgButton(hwndDlg, IDC_TILEH, ((bmpUse & CLBF_TILEH) ? BST_CHECKED : BST_UNCHECKED)); @@ -303,7 +303,7 @@ static INT_PTR APIENTRY OptSknWndProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LP GetDlgItemText(hwndDlg, IDC_FILENAME, str, _countof(str)); g_plugin.setWString("BkBitmap", str); - WORD flags = 0; + uint16_t flags = 0; if (IsDlgButtonChecked(hwndDlg, IDC_STRETCHH)) flags |= CLB_STRETCHH; if (IsDlgButtonChecked(hwndDlg, IDC_STRETCHV)) diff --git a/plugins/FloatingContacts/src/thumbs.cpp b/plugins/FloatingContacts/src/thumbs.cpp index 91a34c1212..4f529ce056 100644 --- a/plugins/FloatingContacts/src/thumbs.cpp +++ b/plugins/FloatingContacts/src/thumbs.cpp @@ -400,7 +400,7 @@ void ThumbInfo::OnMouseMove(int nX, int nY) } if (bEnableTip && fcOpt.bShowTip && !bMouseDown) { - WORD tmpTimeIn; + uint16_t tmpTimeIn; POINT pt; RECT rc; -- cgit v1.2.3