diff options
author | George Hazan <ghazan@miranda.im> | 2021-12-26 16:39:04 +0300 |
---|---|---|
committer | George Hazan <ghazan@miranda.im> | 2021-12-26 16:39:04 +0300 |
commit | 62a186697df33c96dc1a6dac0f4dfc38652fb96f (patch) | |
tree | 1437d0906218fae8827aed384026f2b7e656f4ac /plugins/Clist_nicer/src | |
parent | fcbb395dc7ff3edab972b6d4b27dbbfb3305f5d7 (diff) |
BYTE -> uint8_t
Diffstat (limited to 'plugins/Clist_nicer/src')
-rw-r--r-- | plugins/Clist_nicer/src/Docking.cpp | 2 | ||||
-rw-r--r-- | plugins/Clist_nicer/src/alphablend.cpp | 12 | ||||
-rw-r--r-- | plugins/Clist_nicer/src/clc.cpp | 6 | ||||
-rw-r--r-- | plugins/Clist_nicer/src/clc.h | 64 | ||||
-rw-r--r-- | plugins/Clist_nicer/src/clcitems.cpp | 6 | ||||
-rw-r--r-- | plugins/Clist_nicer/src/clcmsgs.cpp | 2 | ||||
-rw-r--r-- | plugins/Clist_nicer/src/clcopts.cpp | 30 | ||||
-rw-r--r-- | plugins/Clist_nicer/src/clcpaint.cpp | 16 | ||||
-rw-r--r-- | plugins/Clist_nicer/src/clcutils.cpp | 2 | ||||
-rw-r--r-- | plugins/Clist_nicer/src/clistopts.cpp | 86 | ||||
-rw-r--r-- | plugins/Clist_nicer/src/clui.cpp | 32 | ||||
-rw-r--r-- | plugins/Clist_nicer/src/cluiframes.cpp | 12 | ||||
-rw-r--r-- | plugins/Clist_nicer/src/cluiopts.cpp | 4 | ||||
-rw-r--r-- | plugins/Clist_nicer/src/cluiservices.cpp | 4 | ||||
-rw-r--r-- | plugins/Clist_nicer/src/contact.cpp | 2 | ||||
-rw-r--r-- | plugins/Clist_nicer/src/coolscroll.cpp | 2 | ||||
-rw-r--r-- | plugins/Clist_nicer/src/extBackg.cpp | 80 | ||||
-rw-r--r-- | plugins/Clist_nicer/src/statusbar.cpp | 2 | ||||
-rw-r--r-- | plugins/Clist_nicer/src/stdafx.h | 2 | ||||
-rw-r--r-- | plugins/Clist_nicer/src/viewmodes.cpp | 10 |
20 files changed, 188 insertions, 188 deletions
diff --git a/plugins/Clist_nicer/src/Docking.cpp b/plugins/Clist_nicer/src/Docking.cpp index a4fedaf825..f3013e837d 100644 --- a/plugins/Clist_nicer/src/Docking.cpp +++ b/plugins/Clist_nicer/src/Docking.cpp @@ -97,7 +97,7 @@ int Docking_ProcessWindowMessage(WPARAM wParam, LPARAM lParam) MSG *msg = (MSG *)wParam;
if (msg->message == WM_DESTROY)
- g_plugin.setByte("Docked", (BYTE)docked);
+ g_plugin.setByte("Docked", (uint8_t)docked);
if (!docked && msg->message != WM_CREATE && msg->message != WM_MOVING && msg->message != WM_CREATEDOCKED && msg->message != WM_MOVE)
return 0;
diff --git a/plugins/Clist_nicer/src/alphablend.cpp b/plugins/Clist_nicer/src/alphablend.cpp index 077016d844..ec805b4794 100644 --- a/plugins/Clist_nicer/src/alphablend.cpp +++ b/plugins/Clist_nicer/src/alphablend.cpp @@ -26,13 +26,13 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. extern int g_hottrack, g_hottrack_done;
extern BOOL g_inCLCpaint;
-extern BYTE saved_alpha;
+extern uint8_t saved_alpha;
extern DWORD savedCORNER;
extern ImageItem *g_glyphItem;
-BYTE __forceinline percent_to_byte(UINT32 percent)
+uint8_t __forceinline percent_to_byte(UINT32 percent)
{
- return(BYTE)((FLOAT)(((FLOAT)percent) / 100) * 255);
+ return(uint8_t)((FLOAT)(((FLOAT)percent) / 100) * 255);
}
COLORREF __forceinline revcolref(COLORREF colref)
@@ -42,7 +42,7 @@ COLORREF __forceinline revcolref(COLORREF colref) DWORD __forceinline argb_from_cola(COLORREF col, UINT32 alpha)
{
- return((BYTE)percent_to_byte(alpha) << 24 | col);
+ return((uint8_t)percent_to_byte(alpha) << 24 | col);
}
@@ -79,7 +79,7 @@ void __forceinline DrawBorderStyle(HDC hdcwnd, RECT *rc, DWORD BORDERSTYLE) if (hPenOld)
SelectObject(hdcwnd, hPenOld);
}
-void DrawAlpha(HDC hdcwnd, PRECT rc, DWORD basecolor, int alpha, DWORD basecolor2, BOOL transparent, BYTE FLG_GRADIENT, BYTE FLG_CORNER, DWORD BORDERSTYLE, ImageItem *imageItem)
+void DrawAlpha(HDC hdcwnd, PRECT rc, DWORD basecolor, int alpha, DWORD basecolor2, BOOL transparent, uint8_t FLG_GRADIENT, uint8_t FLG_CORNER, DWORD BORDERSTYLE, ImageItem *imageItem)
{
if (rc == nullptr)
return;
@@ -439,7 +439,7 @@ void __inline gradientVertical(UCHAR *ubRedFinal, UCHAR *ubGreenFinal, UCHAR *ub void __fastcall IMG_RenderImageItem(HDC hdc, ImageItem *item, RECT *rc)
{
- BYTE l = item->bLeft, r = item->bRight, t = item->bTop, b = item->bBottom;
+ uint8_t l = item->bLeft, r = item->bRight, t = item->bTop, b = item->bBottom;
LONG width = rc->right - rc->left;
LONG height = rc->bottom - rc->top;
BOOL isGlyph = (item->dwFlags & IMAGE_GLYPH) && g_glyphItem;
diff --git a/plugins/Clist_nicer/src/clc.cpp b/plugins/Clist_nicer/src/clc.cpp index 537f901f65..9d2925add7 100644 --- a/plugins/Clist_nicer/src/clc.cpp +++ b/plugins/Clist_nicer/src/clc.cpp @@ -95,7 +95,7 @@ static int ClcEventAdded(WPARAM hContact, LPARAM lParam) static int ClcMetamodeChanged(WPARAM bMetaEnabled, LPARAM)
{
if (BOOL(bMetaEnabled) != cfg::dat.bMetaEnabled) {
- cfg::dat.bMetaEnabled = (BYTE)bMetaEnabled;
+ cfg::dat.bMetaEnabled = (uint8_t)bMetaEnabled;
Clist_Broadcast(CLM_AUTOREBUILD, 0, 0);
}
return 0;
@@ -274,7 +274,7 @@ LRESULT CALLBACK ContactListControlWndProc(HWND hwnd, UINT msg, WPARAM wParam, L case INTM_GROUPCHANGED:
{
WORD iExtraImage[EXTRA_ICON_COUNT];
- BYTE flags = 0;
+ uint8_t flags = 0;
if (!Clist_FindItem(hwnd, dat, wParam, &contact))
memset(iExtraImage, 0xFF, sizeof(iExtraImage));
else {
@@ -547,7 +547,7 @@ LRESULT CALLBACK ContactListControlWndProc(HWND hwnd, UINT msg, WPARAM wParam, L if (!dat->bisEmbedded && szProto) { // may be a subcontact, forward the xstatus
MCONTACT hMasterContact = db_mc_tryMeta(hContact);
if (hMasterContact != hContact) // avoid recursive call of settings handler
- db_set_b(hMasterContact, META_PROTO, "XStatusId", (BYTE)db_get_b(hContact, szProto, "XStatusId", 0));
+ db_set_b(hMasterContact, META_PROTO, "XStatusId", (uint8_t)db_get_b(hContact, szProto, "XStatusId", 0));
break;
}
}
diff --git a/plugins/Clist_nicer/src/clc.h b/plugins/Clist_nicer/src/clc.h index 4c6907e305..f838cfea96 100644 --- a/plugins/Clist_nicer/src/clc.h +++ b/plugins/Clist_nicer/src/clc.h @@ -95,9 +95,9 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. /* Extra icons settings */
typedef struct _OrderTreeData
{
- BYTE ID;
+ uint8_t ID;
const wchar_t * Name;
- BYTE Position;
+ uint8_t Position;
BOOL Visible;
BOOL fReserved;
} *PORDERTREEDATA, ORDERTREEDATA;
@@ -106,9 +106,9 @@ struct TExtraCache {
MCONTACT hContact;
HANDLE hTimeZone;
- BYTE valid;
+ uint8_t valid;
wchar_t *statusMsg;
- BYTE bStatusMsgValid;
+ uint8_t bStatusMsgValid;
DWORD dwCFlags;
DWORD dwDFlags; // display flags for caching only
StatusItems_t *status_item, *proto_status_item;
@@ -123,7 +123,7 @@ struct ClcCacheEntry : public ClcCacheEntryBase struct ClcContact : public ClcContactBase
{
BOOL bIsMeta;
- BYTE xStatus;
+ uint8_t xStatus;
int xStatusIcon;
MCONTACT hSubContact;
char *metaProto;
@@ -132,7 +132,7 @@ struct ClcContact : public ClcContactBase int avatarLeft, extraIconRightBegin;
int isRtl;
DWORD cFlags;
- BYTE bSecondLine;
+ uint8_t bSecondLine;
AVATARCACHEENTRY *ace;
TExtraCache *pExtra;
@@ -169,8 +169,8 @@ struct ClcData : public ClcDataBase int currentFontID;
int rightMargin;
- BYTE SelectMode;
- BYTE isMultiSelect;
+ uint8_t SelectMode;
+ uint8_t isMultiSelect;
HWND hwndParent;
DWORD lastSort;
DWORD lastRepaint;
@@ -226,7 +226,7 @@ struct TCluiData { DWORD topOffset, bottomOffset;
int statusBarHeight;
int soundsOff;
- BYTE bAvatarServiceAvail;
+ uint8_t bAvatarServiceAvail;
HICON hIconConnecting;
DWORD winFlags;
DWORD winFlagsEx;
@@ -245,16 +245,16 @@ struct TCluiData { DWORD avatarRadius;
int avatarSize;
BOOL bForceRefetchOnPaint;
- BYTE dualRowMode;
- BYTE avatarPadding;
- BYTE cornerRadius;
- BYTE isTransparent;
- BYTE alpha, autoalpha;
- BYTE fadeinout;
- BYTE autosize;
- BYTE gapBetweenFrames;
- BYTE titleBarHeight;
- BYTE bClipBorder, bRowSpacing;
+ uint8_t dualRowMode;
+ uint8_t avatarPadding;
+ uint8_t cornerRadius;
+ uint8_t isTransparent;
+ uint8_t alpha, autoalpha;
+ uint8_t fadeinout;
+ uint8_t autosize;
+ uint8_t gapBetweenFrames;
+ uint8_t titleBarHeight;
+ uint8_t bClipBorder, bRowSpacing;
HBITMAP bmpBackground, hbmBgOld, hbmBg;
HBITMAP hbmToolbar, hbmToolbarOld;
HDC hdcBg;
@@ -283,7 +283,7 @@ struct TCluiData { char varFilter[2048];
DWORD lastMsgFilter;
char current_viewmode[256], old_viewmode[256];
- BYTE boldHideOffline;
+ uint8_t boldHideOffline;
DWORD statusMaskFilter;
DWORD stickyMaskFilter;
DWORD filterFlags;
@@ -296,17 +296,17 @@ struct TCluiData { BOOL bShowXStatusOnSbar;
BOOL bLayeredHack;
HPEN hPen3DBright, hPen3DDark;
- BYTE bSkinnedButtonMode;
- BYTE bFirstRun;
- BYTE bUseDCMirroring;
- BYTE bCLeft, bCRight, bCTop, bCBottom;
- BYTE fullyInited;
- BYTE bAutoExpandGroups;
+ uint8_t bSkinnedButtonMode;
+ uint8_t bFirstRun;
+ uint8_t bUseDCMirroring;
+ uint8_t bCLeft, bCRight, bCTop, bCBottom;
+ uint8_t fullyInited;
+ uint8_t bAutoExpandGroups;
SIZE szOldCTreeSize;
- BYTE bWantFastGradients, bUseFastGradients;
- BYTE sortOrder[3];
- BYTE bGroupAlign;
- BYTE bSkinnedScrollbar;
+ uint8_t bWantFastGradients, bUseFastGradients;
+ uint8_t sortOrder[3];
+ uint8_t bGroupAlign;
+ uint8_t bSkinnedScrollbar;
DWORD langPackCP;
BOOL fOnDesktop;
int group_padding;
@@ -385,11 +385,11 @@ size_t MY_pathToAbsolute(const wchar_t *pSrc, wchar_t *pOut); int GetDropTargetInformation(HWND hwnd, struct ClcData *dat, POINT pt);
void LoadClcOptions(HWND hwnd, struct ClcData *dat, BOOL bFirst);
-BYTE GetCachedStatusMsg(TExtraCache* p, char *szProto);
+uint8_t GetCachedStatusMsg(TExtraCache* p, char *szProto);
void GetExtendedInfo(ClcContact *contact, struct ClcData *dat);
LRESULT CALLBACK NewStatusBarWndProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam);
void HideShowNotifyFrame();
-DWORD GetCLUIWindowStyle(BYTE style);
+DWORD GetCLUIWindowStyle(uint8_t style);
void ApplyCLUIBorderStyle();
int FrameNCCalcSize(HWND hwnd, WNDPROC oldWndProc, WPARAM wParam, LPARAM lParam, BOOL hasTitleBar);
diff --git a/plugins/Clist_nicer/src/clcitems.cpp b/plugins/Clist_nicer/src/clcitems.cpp index 08b1445842..b8c69babfe 100644 --- a/plugins/Clist_nicer/src/clcitems.cpp +++ b/plugins/Clist_nicer/src/clcitems.cpp @@ -152,7 +152,7 @@ void RebuildEntireList(HWND hwnd, struct ClcData *dat) * get it and store it properly formatted in the extra data cache
*/
-BYTE GetCachedStatusMsg(TExtraCache *p, char *szProto)
+uint8_t GetCachedStatusMsg(TExtraCache *p, char *szProto)
{
if (p == nullptr)
return 0;
@@ -346,14 +346,14 @@ void LoadSkinItemToCache(TExtraCache *cEntry) cEntry->status_item->TEXTCOLOR = db_get_dw(hContact, "EXTBK", "TEXT", RGB(20, 20, 20));
cEntry->status_item->COLOR = db_get_dw(hContact, "EXTBK", "COLOR1", RGB(224, 224, 224));
cEntry->status_item->COLOR2 = db_get_dw(hContact, "EXTBK", "COLOR2", RGB(224, 224, 224));
- cEntry->status_item->ALPHA = (BYTE)db_get_b(hContact, "EXTBK", "ALPHA", 100);
+ cEntry->status_item->ALPHA = (uint8_t)db_get_b(hContact, "EXTBK", "ALPHA", 100);
cEntry->status_item->MARGIN_LEFT = (DWORD)db_get_b(hContact, "EXTBK", "LEFT", 0);
cEntry->status_item->MARGIN_RIGHT = (DWORD)db_get_b(hContact, "EXTBK", "RIGHT", 0);
cEntry->status_item->MARGIN_TOP = (DWORD)db_get_b(hContact, "EXTBK", "TOP", 0);
cEntry->status_item->MARGIN_BOTTOM = (DWORD)db_get_b(hContact, "EXTBK", "BOTTOM", 0);
- cEntry->status_item->COLOR2_TRANSPARENT = (BYTE)db_get_b(hContact, "EXTBK", "TRANS", 1);
+ cEntry->status_item->COLOR2_TRANSPARENT = (uint8_t)db_get_b(hContact, "EXTBK", "TRANS", 1);
cEntry->status_item->BORDERSTYLE = db_get_dw(hContact, "EXTBK", "BDR", 0);
cEntry->status_item->CORNER = db_get_b(hContact, "EXTBK", "CORNER", 0);
diff --git a/plugins/Clist_nicer/src/clcmsgs.cpp b/plugins/Clist_nicer/src/clcmsgs.cpp index e714ba26e6..d6d6aa33f0 100644 --- a/plugins/Clist_nicer/src/clcmsgs.cpp +++ b/plugins/Clist_nicer/src/clcmsgs.cpp @@ -70,7 +70,7 @@ LRESULT ProcessExternalMessages(HWND hwnd, struct ClcData *dat, UINT msg, WPARAM if (contact->type != CLCIT_CONTACT)
return 0;
contact->flags ^= CONTACTF_PRIORITY;
- g_plugin.setByte(contact->hContact, "Priority", (BYTE)(contact->flags & CONTACTF_PRIORITY ? 1 : 0));
+ g_plugin.setByte(contact->hContact, "Priority", (uint8_t)(contact->flags & CONTACTF_PRIORITY ? 1 : 0));
Clist_Broadcast(CLM_AUTOREBUILD, 0, 0);
}
return 0;
diff --git a/plugins/Clist_nicer/src/clcopts.cpp b/plugins/Clist_nicer/src/clcopts.cpp index 0e77ca2282..8851f896e5 100644 --- a/plugins/Clist_nicer/src/clcopts.cpp +++ b/plugins/Clist_nicer/src/clcopts.cpp @@ -112,12 +112,12 @@ public: if (curSel == 0 || curSel == CB_ERR)
cfg::dat.sortOrder[i] = 0;
else
- cfg::dat.sortOrder[i] = (BYTE)curSel;
+ cfg::dat.sortOrder[i] = (uint8_t)curSel;
}
g_plugin.setDword("SortOrder", MAKELONG(MAKEWORD(cfg::dat.sortOrder[0], cfg::dat.sortOrder[1]), MAKEWORD(cfg::dat.sortOrder[2], 0)));
cfg::dat.bDontSeparateOffline = IsDlgButtonChecked(m_hwnd, IDC_DONTSEPARATE) ? 1 : 0;
- g_plugin.setByte("DontSeparateOffline", (BYTE)cfg::dat.bDontSeparateOffline);
+ g_plugin.setByte("DontSeparateOffline", (uint8_t)cfg::dat.bDontSeparateOffline);
cfgSetFlag(m_hwnd, IDC_EVENTSONTOP, CLUI_STICKYEVENTS);
@@ -202,22 +202,22 @@ public: LRESULT curSel = SendDlgItemMessage(m_hwnd, IDC_GROUPALIGN, CB_GETCURSEL, 0, 0);
if (curSel != CB_ERR) {
- cfg::dat.bGroupAlign = (BYTE)curSel;
+ cfg::dat.bGroupAlign = (uint8_t)curSel;
db_set_b(0, "CLC", "GroupAlign", cfg::dat.bGroupAlign);
}
- cfg::dat.bRowSpacing = (BYTE)SendDlgItemMessage(m_hwnd, IDC_ROWGAPSPIN, UDM_GETPOS, 0, 0);
+ cfg::dat.bRowSpacing = (uint8_t)SendDlgItemMessage(m_hwnd, IDC_ROWGAPSPIN, UDM_GETPOS, 0, 0);
db_set_b(0, "CLC", "RowGap", cfg::dat.bRowSpacing);
BOOL translated;
- cfg::dat.avatarPadding = (BYTE)GetDlgItemInt(m_hwnd, IDC_AVATARPADDING, &translated, FALSE);
+ cfg::dat.avatarPadding = (uint8_t)GetDlgItemInt(m_hwnd, IDC_AVATARPADDING, &translated, FALSE);
g_plugin.setByte("AvatarPadding", cfg::dat.avatarPadding);
- db_set_b(0, "CLC", "LeftMargin", (BYTE)SendDlgItemMessage(m_hwnd, IDC_LEFTMARGINSPIN, UDM_GETPOS, 0, 0));
- db_set_b(0, "CLC", "RightMargin", (BYTE)SendDlgItemMessage(m_hwnd, IDC_RIGHTMARGINSPIN, UDM_GETPOS, 0, 0));
- db_set_b(0, "CLC", "GroupIndent", (BYTE)SendDlgItemMessage(m_hwnd, IDC_GROUPINDENTSPIN, UDM_GETPOS, 0, 0));
- db_set_b(0, "CLC", "RowHeight", (BYTE)SendDlgItemMessage(m_hwnd, IDC_ROWHEIGHTSPIN, UDM_GETPOS, 0, 0));
- db_set_b(0, "CLC", "GRowHeight", (BYTE)SendDlgItemMessage(m_hwnd, IDC_GROUPROWHEIGHTSPIN, UDM_GETPOS, 0, 0));
+ db_set_b(0, "CLC", "LeftMargin", (uint8_t)SendDlgItemMessage(m_hwnd, IDC_LEFTMARGINSPIN, UDM_GETPOS, 0, 0));
+ db_set_b(0, "CLC", "RightMargin", (uint8_t)SendDlgItemMessage(m_hwnd, IDC_RIGHTMARGINSPIN, UDM_GETPOS, 0, 0));
+ db_set_b(0, "CLC", "GroupIndent", (uint8_t)SendDlgItemMessage(m_hwnd, IDC_GROUPINDENTSPIN, UDM_GETPOS, 0, 0));
+ db_set_b(0, "CLC", "RowHeight", (uint8_t)SendDlgItemMessage(m_hwnd, IDC_ROWHEIGHTSPIN, UDM_GETPOS, 0, 0));
+ db_set_b(0, "CLC", "GRowHeight", (uint8_t)SendDlgItemMessage(m_hwnd, IDC_GROUPROWHEIGHTSPIN, UDM_GETPOS, 0, 0));
return true;
}
};
@@ -320,19 +320,19 @@ public: g_plugin.setWord("AvatarSize", (WORD)cfg::dat.avatarSize);
cfg::dat.bNoOfflineAvatars = IsDlgButtonChecked(m_hwnd, IDC_NOAVATARSOFFLINE) ? TRUE : FALSE;
- g_plugin.setByte("NoOfflineAV", (BYTE)cfg::dat.bNoOfflineAvatars);
+ g_plugin.setByte("NoOfflineAV", (uint8_t)cfg::dat.bNoOfflineAvatars);
cfg::dat.bShowLocalTime = chkLocalTime.GetState();
- db_set_b(0, "CLC", "ShowLocalTime", (BYTE)cfg::dat.bShowLocalTime);
+ db_set_b(0, "CLC", "ShowLocalTime", (uint8_t)cfg::dat.bShowLocalTime);
cfg::dat.bShowLocalTimeSelective = IsDlgButtonChecked(m_hwnd, IDC_SHOWLOCALTIMEONLYWHENDIFFERENT) ? 1 : 0;
- db_set_b(0, "CLC", "SelectiveLocalTime", (BYTE)cfg::dat.bShowLocalTimeSelective);
+ db_set_b(0, "CLC", "SelectiveLocalTime", (uint8_t)cfg::dat.bShowLocalTimeSelective);
KillTimer(g_clistApi.hwndContactTree, TIMERID_REFRESH);
if (cfg::dat.bShowLocalTime)
SetTimer(g_clistApi.hwndContactTree, TIMERID_REFRESH, 65000, nullptr);
- cfg::dat.dualRowMode = (BYTE)SendDlgItemMessage(m_hwnd, IDC_DUALROWMODE, CB_GETCURSEL, 0, 0);
+ cfg::dat.dualRowMode = (uint8_t)SendDlgItemMessage(m_hwnd, IDC_DUALROWMODE, CB_GETCURSEL, 0, 0);
if (cfg::dat.dualRowMode == CB_ERR)
cfg::dat.dualRowMode = 0;
db_set_b(0, "CLC", "DualRowMode", cfg::dat.dualRowMode);
@@ -394,7 +394,7 @@ public: db_set_b(0, "CLC", "ShowIdle", IsDlgButtonChecked(m_hwnd, IDC_IDLE) ? 1 : 0);
cfg::dat.bCenterStatusIcons = IsDlgButtonChecked(m_hwnd, IDC_STATUSICONSCENTERED) ? 1 : 0;
- db_set_b(0, "CLC", "si_centered", (BYTE)cfg::dat.bCenterStatusIcons);
+ db_set_b(0, "CLC", "si_centered", (uint8_t)cfg::dat.bCenterStatusIcons);
return true;
}
};
diff --git a/plugins/Clist_nicer/src/clcpaint.cpp b/plugins/Clist_nicer/src/clcpaint.cpp index de22664a9b..84b3418f35 100644 --- a/plugins/Clist_nicer/src/clcpaint.cpp +++ b/plugins/Clist_nicer/src/clcpaint.cpp @@ -31,7 +31,7 @@ extern ImageItem *g_glyphItem; extern int hClcProtoCount;
-static BYTE divide3[765] = { 255 };
+static uint8_t divide3[765] = { 255 };
extern char *im_clients[];
extern HICON im_clienthIcons[];
extern HICON overlayicons[];
@@ -42,8 +42,8 @@ extern LONG g_cxsmIcon, g_cysmIcon; int g_hottrack, g_center, g_ignoreselforgroups, g_selectiveIcon, g_hottrack_done;
HWND g_focusWnd;
-BYTE selBlend;
-BYTE saved_alpha;
+uint8_t selBlend;
+uint8_t saved_alpha;
int my_status;
BOOL g_inCLCpaint = FALSE;
@@ -342,7 +342,7 @@ static BOOL pi_selectiveIcon; static BOOL av_left, av_right, av_rightwithnick;
static BOOL mirror_rtl, mirror_always, mirror_rtltext;
-BYTE savedCORNER = -1;
+uint8_t savedCORNER = -1;
int g_padding_y = 0;
void __inline PaintItem(HDC hdcMem, ClcGroup *group, ClcContact *contact, int indent, int y, struct ClcData *dat, int index, HWND hwnd, DWORD style, RECT *clRect, BOOL *bFirstNGdrawn, int groupCountsFontTopShift, int rowHeight)
@@ -374,8 +374,8 @@ void __inline PaintItem(HDC hdcMem, ClcGroup *group, ClcContact *contact, int in int scanIndex = group->scanIndex;
BOOL av_local_wanted = (g_list_avatars > 0);
- BYTE type = contact->type;
- BYTE flags = contact->flags;
+ uint8_t type = contact->type;
+ uint8_t flags = contact->flags;
int selected = index == dat->selection && (dat->bShowSelAlways || dat->exStyle & CLS_EX_SHOWSELALWAYS || g_focusWnd == hwnd) && type != CLCIT_DIVIDER;
avatar_done = FALSE;
@@ -491,7 +491,7 @@ set_bg_l: *sfirstitem_NG, *ssingleitem_NG, *sevencontact_pos, *soddcontact_pos, *pp_item;
if (cstatus >= ID_STATUS_OFFLINE && cstatus <= ID_STATUS_MAX) {
- BYTE perstatus_ignored;
+ uint8_t perstatus_ignored;
if ((flags & CONTACTF_IDLE) && !arStatusItems[ID_EXTBKIDLE - ID_STATUS_OFFLINE]->IGNORED)
sitem = arStatusItems[ID_EXTBKIDLE - ID_STATUS_OFFLINE];
@@ -1106,7 +1106,7 @@ bgskipped: rcContent.bottom = y + rowHeight;
if (cstatus >= ID_STATUS_OFFLINE && cstatus <= ID_STATUS_MAX) {
- BYTE smsgValid = cEntry->bStatusMsgValid;
+ uint8_t smsgValid = cEntry->bStatusMsgValid;
if ((dwFlags & CLUI_FRAME_SHOWSTATUSMSG && smsgValid > STATUSMSG_XSTATUSID) || smsgValid == STATUSMSG_XSTATUSNAME)
szText = cEntry->statusMsg;
diff --git a/plugins/Clist_nicer/src/clcutils.cpp b/plugins/Clist_nicer/src/clcutils.cpp index 0070290182..7eac040108 100644 --- a/plugins/Clist_nicer/src/clcutils.cpp +++ b/plugins/Clist_nicer/src/clcutils.cpp @@ -204,7 +204,7 @@ int HitTest(HWND hwnd, struct ClcData *dat, int testx, int testy, ClcContact **c RECT clRect;
HFONT hFont;
DWORD style = GetWindowLongPtr(hwnd, GWL_STYLE);
- BYTE mirror_mode = cfg::dat.bUseDCMirroring;
+ uint8_t mirror_mode = cfg::dat.bUseDCMirroring;
if (flags)
*flags = 0;
diff --git a/plugins/Clist_nicer/src/clistopts.cpp b/plugins/Clist_nicer/src/clistopts.cpp index 4e0820cd8f..a0741a8c15 100644 --- a/plugins/Clist_nicer/src/clistopts.cpp +++ b/plugins/Clist_nicer/src/clistopts.cpp @@ -90,12 +90,12 @@ public: bool OnApply() override
{
- g_plugin.setByte("AlwaysMulti", (BYTE)BST_UNCHECKED == IsDlgButtonChecked(m_hwnd, IDC_ALWAYSMULTI));
- g_plugin.setByte("TrayIcon", (BYTE)(chkDontCycle.GetState() ? SETTING_TRAYICON_SINGLE : (chkCycle.GetState() ? SETTING_TRAYICON_CYCLE : SETTING_TRAYICON_MULTI)));
+ g_plugin.setByte("AlwaysMulti", (uint8_t)BST_UNCHECKED == IsDlgButtonChecked(m_hwnd, IDC_ALWAYSMULTI));
+ g_plugin.setByte("TrayIcon", (uint8_t)(chkDontCycle.GetState() ? SETTING_TRAYICON_SINGLE : (chkCycle.GetState() ? SETTING_TRAYICON_CYCLE : SETTING_TRAYICON_MULTI)));
g_plugin.setWord("CycleTime", (WORD)SendDlgItemMessage(m_hwnd, IDC_CYCLETIMESPIN, UDM_GETPOS, 0, 0));
g_plugin.setWord("IconFlashTime", (WORD)SendDlgItemMessage(m_hwnd, IDC_BLINKSPIN, UDM_GETPOS, 0, 0));
- g_plugin.setByte("DisableTrayFlash", (BYTE)IsDlgButtonChecked(m_hwnd, IDC_DISABLEBLINK));
- g_plugin.setByte("AutoApplyLastViewMode", (BYTE)IsDlgButtonChecked(m_hwnd, IDC_APPLYLASTVIEWMODE));
+ g_plugin.setByte("DisableTrayFlash", (uint8_t)IsDlgButtonChecked(m_hwnd, IDC_DISABLEBLINK));
+ g_plugin.setByte("AutoApplyLastViewMode", (uint8_t)IsDlgButtonChecked(m_hwnd, IDC_APPLYLASTVIEWMODE));
cfgSetFlag(m_hwnd, CLUI_FRAME_EVENTAREASUNKEN, IDC_EVENTAREASUNKEN);
cfgSetFlag(m_hwnd, CLUI_FRAME_AUTOHIDENOTIFY, IDC_EVENTAREAAUTOHIDE);
@@ -104,7 +104,7 @@ public: cfgSetFlag(m_hwnd, CLUI_FRAME_CLISTSUNKEN, IDC_CLISTSUNKEN);
cfg::dat.bNoTrayTips = IsDlgButtonChecked(m_hwnd, IDC_NOTRAYINFOTIPS) ? 1 : 0;
- g_plugin.setByte("NoTrayTips", (BYTE)cfg::dat.bNoTrayTips);
+ g_plugin.setByte("NoTrayTips", (uint8_t)cfg::dat.bNoTrayTips);
{
int cursel = SendDlgItemMessage(m_hwnd, IDC_PRIMARYSTATUS, CB_GETCURSEL, 0, 0);
PROTOACCOUNT *pa = (PROTOACCOUNT *)SendDlgItemMessage(m_hwnd, IDC_PRIMARYSTATUS, CB_GETITEMDATA, cursel, 0);
@@ -255,9 +255,9 @@ public: cfgSetFlag(m_hwnd, IDC_FULLROWSELECT, CLUI_FULLROWSELECT);
db_set_w(0, "CLC", "ScrollTime", (WORD)SendDlgItemMessage(m_hwnd, IDC_SMOOTHTIMESPIN, UDM_GETPOS, 0, 0));
- db_set_b(0, "CLC", "NoVScrollBar", (BYTE)(IsDlgButtonChecked(m_hwnd, IDC_NOSCROLLBAR) ? 1 : 0));
+ db_set_b(0, "CLC", "NoVScrollBar", (uint8_t)(IsDlgButtonChecked(m_hwnd, IDC_NOSCROLLBAR) ? 1 : 0));
cfg::dat.bDblClkAvatars = IsDlgButtonChecked(m_hwnd, IDC_DBLCLKAVATARS) ? TRUE : FALSE;
- db_set_b(0, "CLC", "dblclkav", (BYTE)cfg::dat.bDblClkAvatars);
+ db_set_b(0, "CLC", "dblclkav", (uint8_t)cfg::dat.bDblClkAvatars);
Clist_ClcOptionsChanged();
CoolSB_SetupScrollBar();
@@ -362,30 +362,30 @@ public: bool OnApply() override
{
BOOL translated;
- BYTE windowStyle = (BYTE)SendDlgItemMessage(m_hwnd, IDC_BORDERSTYLE, CB_GETCURSEL, 0, 0);
+ uint8_t windowStyle = (uint8_t)SendDlgItemMessage(m_hwnd, IDC_BORDERSTYLE, CB_GETCURSEL, 0, 0);
- db_set_b(0, "CLUI", "FadeInOut", (BYTE)IsDlgButtonChecked(m_hwnd, IDC_FADEINOUT));
+ db_set_b(0, "CLUI", "FadeInOut", (uint8_t)IsDlgButtonChecked(m_hwnd, IDC_FADEINOUT));
cfg::dat.fadeinout = IsDlgButtonChecked(m_hwnd, IDC_FADEINOUT) ? 1 : 0;
- BYTE oldFading = cfg::dat.fadeinout;
+ uint8_t oldFading = cfg::dat.fadeinout;
cfg::dat.fadeinout = FALSE;
db_set_b(0, "CLUI", "WindowStyle", windowStyle);
cfg::dat.gapBetweenFrames = GetDlgItemInt(m_hwnd, IDC_FRAMEGAP, &translated, FALSE);
db_set_dw(0, "CLUIFrames", "GapBetweenFrames", cfg::dat.gapBetweenFrames);
- g_plugin.setByte("OnTop", (BYTE)IsDlgButtonChecked(m_hwnd, IDC_ONTOP));
+ g_plugin.setByte("OnTop", (uint8_t)IsDlgButtonChecked(m_hwnd, IDC_ONTOP));
SetWindowPos(g_clistApi.hwndContactList, IsDlgButtonChecked(m_hwnd, IDC_ONTOP) ? HWND_TOPMOST : HWND_NOTOPMOST, 0, 0, 0, 0, SWP_NOMOVE | SWP_NOSIZE);
- cfg::dat.bCLeft = (BYTE)SendDlgItemMessage(m_hwnd, IDC_CLEFTSPIN, UDM_GETPOS, 0, 0);
- cfg::dat.bCRight = (BYTE)SendDlgItemMessage(m_hwnd, IDC_CRIGHTSPIN, UDM_GETPOS, 0, 0);
- cfg::dat.bCTop = (BYTE)SendDlgItemMessage(m_hwnd, IDC_CTOPSPIN, UDM_GETPOS, 0, 0);
- cfg::dat.bCBottom = (BYTE)SendDlgItemMessage(m_hwnd, IDC_CBOTTOMSPIN, UDM_GETPOS, 0, 0);
+ cfg::dat.bCLeft = (uint8_t)SendDlgItemMessage(m_hwnd, IDC_CLEFTSPIN, UDM_GETPOS, 0, 0);
+ cfg::dat.bCRight = (uint8_t)SendDlgItemMessage(m_hwnd, IDC_CRIGHTSPIN, UDM_GETPOS, 0, 0);
+ cfg::dat.bCTop = (uint8_t)SendDlgItemMessage(m_hwnd, IDC_CTOPSPIN, UDM_GETPOS, 0, 0);
+ cfg::dat.bCBottom = (uint8_t)SendDlgItemMessage(m_hwnd, IDC_CBOTTOMSPIN, UDM_GETPOS, 0, 0);
db_set_dw(0, "CLUI", "clmargins", MAKELONG(MAKEWORD(cfg::dat.bCLeft, cfg::dat.bCRight), MAKEWORD(cfg::dat.bCTop, cfg::dat.bCBottom)));
SendMessage(g_clistApi.hwndContactList, WM_SIZE, 0, 0);
- g_plugin.setByte("BringToFront", (BYTE)IsDlgButtonChecked(m_hwnd, IDC_BRINGTOFRONT));
- g_plugin.setByte("AlwaysHideOnTB", (BYTE)IsDlgButtonChecked(m_hwnd, IDC_ALWAYSHIDEONTASKBAR));
+ g_plugin.setByte("BringToFront", (uint8_t)IsDlgButtonChecked(m_hwnd, IDC_BRINGTOFRONT));
+ g_plugin.setByte("AlwaysHideOnTB", (uint8_t)IsDlgButtonChecked(m_hwnd, IDC_ALWAYSHIDEONTASKBAR));
if (windowStyle != SETTING_WINDOWSTYLE_DEFAULT) {
LONG style;
@@ -417,12 +417,12 @@ public: SetWindowLongPtr(g_clistApi.hwndContactList, GWL_EXSTYLE, style);
}
- cfg::dat.bClipBorder = (BYTE)GetDlgItemInt(m_hwnd, IDC_CLIPBORDER, &translated, FALSE);
+ cfg::dat.bClipBorder = (uint8_t)GetDlgItemInt(m_hwnd, IDC_CLIPBORDER, &translated, FALSE);
db_set_dw(0, "CLUI", "Frameflags", cfg::dat.dwFlags);
db_set_b(0, "CLUI", "clipborder", cfg::dat.bClipBorder);
- db_set_b(0, "CLUI", "ShowMainMenu", (BYTE)IsDlgButtonChecked(m_hwnd, IDC_SHOWMAINMENU));
- db_set_b(0, "CLUI", "ClientAreaDrag", (BYTE)IsDlgButtonChecked(m_hwnd, IDC_CLIENTDRAG));
+ db_set_b(0, "CLUI", "ShowMainMenu", (uint8_t)IsDlgButtonChecked(m_hwnd, IDC_SHOWMAINMENU));
+ db_set_b(0, "CLUI", "ClientAreaDrag", (uint8_t)IsDlgButtonChecked(m_hwnd, IDC_CLIENTDRAG));
ApplyCLUIBorderStyle();
@@ -444,19 +444,19 @@ public: }
db_set_b(0, "CLUI", "AutoSize", cfg::dat.autosize);
- db_set_b(0, "CLUI", "MaxSizeHeight", (BYTE)GetDlgItemInt(m_hwnd, IDC_MAXSIZEHEIGHT, nullptr, FALSE));
- db_set_b(0, "CLUI", "AutoSizeUpward", (BYTE)IsDlgButtonChecked(m_hwnd, IDC_AUTOSIZEUPWARD));
+ db_set_b(0, "CLUI", "MaxSizeHeight", (uint8_t)GetDlgItemInt(m_hwnd, IDC_MAXSIZEHEIGHT, nullptr, FALSE));
+ db_set_b(0, "CLUI", "AutoSizeUpward", (uint8_t)IsDlgButtonChecked(m_hwnd, IDC_AUTOSIZEUPWARD));
g_plugin.setByte("AutoHide", chkAutoHide.GetState());
g_plugin.setWord("HideTime", (WORD)SendDlgItemMessage(m_hwnd, IDC_HIDETIMESPIN, UDM_GETPOS, 0, 0));
g_plugin.setByte("Transparent", cfg::dat.isTransparent = chkTransparent.GetState());
- g_plugin.setByte("Alpha", cfg::dat.alpha = (BYTE)SendDlgItemMessage(m_hwnd, IDC_TRANSACTIVE, TBM_GETPOS, 0, 0));
- g_plugin.setByte("AutoAlpha", cfg::dat.autoalpha = (BYTE)SendDlgItemMessage(m_hwnd, IDC_TRANSINACTIVE, TBM_GETPOS, 0, 0));
- g_plugin.setByte("WindowShadow", (BYTE)IsDlgButtonChecked(m_hwnd, IDC_DROPSHADOW));
- g_plugin.setByte("OnDesktop", (BYTE)IsDlgButtonChecked(m_hwnd, IDC_ONDESKTOP));
+ g_plugin.setByte("Alpha", cfg::dat.alpha = (uint8_t)SendDlgItemMessage(m_hwnd, IDC_TRANSACTIVE, TBM_GETPOS, 0, 0));
+ g_plugin.setByte("AutoAlpha", cfg::dat.autoalpha = (uint8_t)SendDlgItemMessage(m_hwnd, IDC_TRANSINACTIVE, TBM_GETPOS, 0, 0));
+ g_plugin.setByte("WindowShadow", (uint8_t)IsDlgButtonChecked(m_hwnd, IDC_DROPSHADOW));
+ g_plugin.setByte("OnDesktop", (uint8_t)IsDlgButtonChecked(m_hwnd, IDC_ONDESKTOP));
db_set_dw(0, "CLUI", "Frameflags", cfg::dat.dwFlags);
cfg::dat.bFullTransparent = IsDlgButtonChecked(m_hwnd, IDC_FULLTRANSPARENT) ? 1 : 0;
- db_set_b(0, "CLUI", "fulltransparent", (BYTE)cfg::dat.bFullTransparent);
+ db_set_b(0, "CLUI", "fulltransparent", (uint8_t)cfg::dat.bFullTransparent);
if (cfg::dat.bLayeredHack)
SetWindowLongPtr(g_clistApi.hwndContactList, GWL_EXSTYLE, GetWindowLongPtr(g_clistApi.hwndContactList, GWL_EXSTYLE) | WS_EX_LAYERED);
@@ -475,11 +475,11 @@ public: SetLayeredWindowAttributes(g_clistApi.hwndContactList, 0, 255, LWA_ALPHA | LWA_COLORKEY);
SetLayeredWindowAttributes(g_clistApi.hwndContactList,
(COLORREF)(cfg::dat.bFullTransparent ? cfg::dat.colorkey : 0),
- (BYTE)(cfg::dat.isTransparent ? cfg::dat.autoalpha : 255),
+ (uint8_t)(cfg::dat.isTransparent ? cfg::dat.autoalpha : 255),
(DWORD)((cfg::dat.isTransparent ? LWA_ALPHA : 0L) | (cfg::dat.bFullTransparent ? LWA_COLORKEY : 0L)));
}
else {
- SetLayeredWindowAttributes(g_clistApi.hwndContactList, RGB(0, 0, 0), (BYTE)255, LWA_ALPHA);
+ SetLayeredWindowAttributes(g_clistApi.hwndContactList, RGB(0, 0, 0), (uint8_t)255, LWA_ALPHA);
if (!cfg::dat.bLayeredHack)
SetWindowLongPtr(g_clistApi.hwndContactList, GWL_EXSTYLE, GetWindowLongPtr(g_clistApi.hwndContactList, GWL_EXSTYLE) & ~WS_EX_LAYERED);
}
@@ -591,8 +591,8 @@ public: bool OnApply() override
{
- db_set_b(0, "CLC", "UseBitmap", (BYTE)IsDlgButtonChecked(m_hwnd, IDC_BITMAP));
- db_set_b(0, "CLC", "UseWinColours", (BYTE)IsDlgButtonChecked(m_hwnd, IDC_WINCOLOUR));
+ db_set_b(0, "CLC", "UseBitmap", (uint8_t)IsDlgButtonChecked(m_hwnd, IDC_BITMAP));
+ db_set_b(0, "CLC", "UseWinColours", (uint8_t)IsDlgButtonChecked(m_hwnd, IDC_WINCOLOUR));
char str[MAX_PATH], strrel[MAX_PATH];
GetDlgItemTextA(m_hwnd, IDC_FILENAME, str, _countof(str));
@@ -616,7 +616,7 @@ public: flags |= CLBF_PROPORTIONAL;
db_set_w(0, "CLC", "BkBmpUse", flags);
cfg::dat.bWallpaperMode = IsDlgButtonChecked(m_hwnd, IDC_SKINMODE) ? 1 : 0;
- db_set_b(0, "CLUI", "UseBkSkin", (BYTE)cfg::dat.bWallpaperMode);
+ db_set_b(0, "CLUI", "UseBkSkin", (uint8_t)cfg::dat.bWallpaperMode);
return true;
}
@@ -672,7 +672,7 @@ public: {
chkShowSbar.SetState(db_get_b(0, "CLUI", "ShowSBar", 1));
- BYTE showOpts = db_get_b(0, "CLUI", "SBarShow", 1);
+ uint8_t showOpts = db_get_b(0, "CLUI", "SBarShow", 1);
CheckDlgButton(m_hwnd, IDC_SHOWICON, showOpts & 1 ? BST_CHECKED : BST_UNCHECKED);
CheckDlgButton(m_hwnd, IDC_SHOWPROTO, showOpts & 2 ? BST_CHECKED : BST_UNCHECKED);
CheckDlgButton(m_hwnd, IDC_SHOWSTATUS, showOpts & 4 ? BST_CHECKED : BST_UNCHECKED);
@@ -690,20 +690,20 @@ public: bool OnApply() override
{
- db_set_b(0, "CLUI", "ShowSBar", (BYTE)chkShowSbar.GetState());
- db_set_b(0, "CLUI", "SBarShow", (BYTE)((IsDlgButtonChecked(m_hwnd, IDC_SHOWICON) ? 1 : 0) | (IsDlgButtonChecked(m_hwnd, IDC_SHOWPROTO) ? 2 : 0) | (IsDlgButtonChecked(m_hwnd, IDC_SHOWSTATUS) ? 4 : 0)));
- db_set_b(0, "CLUI", "SBarRightClk", (BYTE)IsDlgButtonChecked(m_hwnd, IDC_RIGHTMIRANDA));
- db_set_b(0, "CLUI", "EqualSections", (BYTE)IsDlgButtonChecked(m_hwnd, IDC_EQUALSECTIONS));
- db_set_b(0, "CLUI", "sb_skinned", (BYTE)IsDlgButtonChecked(m_hwnd, IDC_SKINBACKGROUND));
- db_set_b(0, "CLUI", "sbar_showlocked", (BYTE)IsDlgButtonChecked(m_hwnd, IDC_MARKLOCKED));
+ db_set_b(0, "CLUI", "ShowSBar", (uint8_t)chkShowSbar.GetState());
+ db_set_b(0, "CLUI", "SBarShow", (uint8_t)((IsDlgButtonChecked(m_hwnd, IDC_SHOWICON) ? 1 : 0) | (IsDlgButtonChecked(m_hwnd, IDC_SHOWPROTO) ? 2 : 0) | (IsDlgButtonChecked(m_hwnd, IDC_SHOWSTATUS) ? 4 : 0)));
+ db_set_b(0, "CLUI", "SBarRightClk", (uint8_t)IsDlgButtonChecked(m_hwnd, IDC_RIGHTMIRANDA));
+ db_set_b(0, "CLUI", "EqualSections", (uint8_t)IsDlgButtonChecked(m_hwnd, IDC_EQUALSECTIONS));
+ db_set_b(0, "CLUI", "sb_skinned", (uint8_t)IsDlgButtonChecked(m_hwnd, IDC_SKINBACKGROUND));
+ db_set_b(0, "CLUI", "sbar_showlocked", (uint8_t)IsDlgButtonChecked(m_hwnd, IDC_MARKLOCKED));
cfg::dat.bEqualSections = IsDlgButtonChecked(m_hwnd, IDC_EQUALSECTIONS) ? 1 : 0;
cfg::dat.bSkinnedStatusBar = IsDlgButtonChecked(m_hwnd, IDC_SKINBACKGROUND) ? 1 : 0;
cfg::dat.bShowXStatusOnSbar = IsDlgButtonChecked(m_hwnd, IDC_SHOWXSTATUS) ? 1 : 0;
- db_set_b(0, "CLUI", "xstatus_sbar", (BYTE)cfg::dat.bShowXStatusOnSbar);
- db_set_b(0, "CLUI", "SBarBevel", (BYTE)IsDlgButtonChecked(m_hwnd, IDC_SBPANELBEVEL));
- if (db_get_b(0, "CLUI", "ShowGrip", 1) != (BYTE)IsDlgButtonChecked(m_hwnd, IDC_SHOWGRIP)) {
- db_set_b(0, "CLUI", "ShowGrip", (BYTE)IsDlgButtonChecked(m_hwnd, IDC_SHOWGRIP));
+ db_set_b(0, "CLUI", "xstatus_sbar", (uint8_t)cfg::dat.bShowXStatusOnSbar);
+ db_set_b(0, "CLUI", "SBarBevel", (uint8_t)IsDlgButtonChecked(m_hwnd, IDC_SBPANELBEVEL));
+ if (db_get_b(0, "CLUI", "ShowGrip", 1) != (uint8_t)IsDlgButtonChecked(m_hwnd, IDC_SHOWGRIP)) {
+ db_set_b(0, "CLUI", "ShowGrip", (uint8_t)IsDlgButtonChecked(m_hwnd, IDC_SHOWGRIP));
ShowWindow(g_clistApi.hwndStatus, SW_HIDE);
mir_unsubclassWindow(g_clistApi.hwndStatus, NewStatusBarWndProc);
DestroyWindow(g_clistApi.hwndStatus);
diff --git a/plugins/Clist_nicer/src/clui.cpp b/plugins/Clist_nicer/src/clui.cpp index f4f674ca6d..276010e810 100644 --- a/plugins/Clist_nicer/src/clui.cpp +++ b/plugins/Clist_nicer/src/clui.cpp @@ -56,7 +56,7 @@ extern COLORREF g_CLUISkinnedBkColorRGB; extern FRAMEWND *wndFrameCLC; extern HPEN g_hPenCLUIFrames; -static BYTE old_cliststate, show_on_first_autosize = FALSE; +static uint8_t old_cliststate, show_on_first_autosize = FALSE; RECT cluiPos; @@ -112,9 +112,9 @@ static void Tweak_It(COLORREF clr) static void LayoutButtons(HWND hwnd, RECT *rc) { RECT rect; - BYTE left_offset = cfg::dat.bCLeft - (cfg::dat.dwFlags & CLUI_FRAME_CLISTSUNKEN ? 3 : 0); - BYTE right_offset = cfg::dat.bCRight - (cfg::dat.dwFlags & CLUI_FRAME_CLISTSUNKEN ? 3 : 0); - BYTE delta = left_offset + right_offset; + uint8_t left_offset = cfg::dat.bCLeft - (cfg::dat.dwFlags & CLUI_FRAME_CLISTSUNKEN ? 3 : 0); + uint8_t right_offset = cfg::dat.bCRight - (cfg::dat.dwFlags & CLUI_FRAME_CLISTSUNKEN ? 3 : 0); + uint8_t delta = left_offset + right_offset; ButtonItem *btnItems = g_ButtonItems; if (rc == nullptr) @@ -413,7 +413,7 @@ void SetDBButtonStates(MCONTACT hPassedContact) else { switch (buttonItem->type) { case DBVT_BYTE: { - BYTE val = db_get_b(hFinalContact, szModule, szSetting, 0); + uint8_t val = db_get_b(hFinalContact, szModule, szSetting, 0); result = (val == buttonItem->bValuePush[0]); break; } @@ -551,7 +551,7 @@ void ReloadThemedOptions() cfg::dat.bWallpaperMode = db_get_b(0, "CLUI", "UseBkSkin", 1); cfg::dat.bClipBorder = db_get_b(0, "CLUI", "clipborder", 0); cfg::dat.cornerRadius = db_get_b(0, "CLCExt", "CornerRad", 6); - cfg::dat.gapBetweenFrames = (BYTE)db_get_dw(0, "CLUIFrames", "GapBetweenFrames", 1); + cfg::dat.gapBetweenFrames = (uint8_t)db_get_dw(0, "CLUIFrames", "GapBetweenFrames", 1); cfg::dat.bUseDCMirroring = db_get_b(0, "CLC", "MirrorDC", 0); cfg::dat.bGroupAlign = db_get_b(0, "CLC", "GroupAlign", 0); if (cfg::dat.hBrushColorKey) @@ -824,7 +824,7 @@ LRESULT CALLBACK ContactListWndProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM l SendMessage(hwnd, WM_SETREDRAW, FALSE, FALSE); { LONG style; - BYTE windowStyle = db_get_b(0, "CLUI", "WindowStyle", SETTING_WINDOWSTYLE_TOOLWINDOW); + uint8_t windowStyle = db_get_b(0, "CLUI", "WindowStyle", SETTING_WINDOWSTYLE_TOOLWINDOW); ShowWindow(g_clistApi.hwndContactList, SW_HIDE); style = GetWindowLongPtr(g_clistApi.hwndContactList, GWL_EXSTYLE); if (windowStyle != SETTING_WINDOWSTYLE_DEFAULT) { @@ -1125,7 +1125,7 @@ skipbg: return 0; case CLUIINTM_REMOVEFROMTASKBAR: { - BYTE windowStyle = db_get_b(0, "CLUI", "WindowStyle", SETTING_WINDOWSTYLE_DEFAULT); + uint8_t windowStyle = db_get_b(0, "CLUI", "WindowStyle", SETTING_WINDOWSTYLE_DEFAULT); if (windowStyle == SETTING_WINDOWSTYLE_DEFAULT && g_plugin.getByte("AlwaysHideOnTB", 0)) RemoveFromTaskBar(hwnd); return 0; @@ -1259,7 +1259,7 @@ skipbg: if (wParam) { sourceAlpha = 0; destAlpha = cfg::dat.isTransparent ? cfg::dat.alpha : 255; - SetLayeredWindowAttributes(hwnd, cfg::dat.bFullTransparent ? (COLORREF)cfg::dat.colorkey : RGB(0, 0, 0), (BYTE)sourceAlpha, LWA_ALPHA | (cfg::dat.bFullTransparent ? LWA_COLORKEY : 0)); + SetLayeredWindowAttributes(hwnd, cfg::dat.bFullTransparent ? (COLORREF)cfg::dat.colorkey : RGB(0, 0, 0), (uint8_t)sourceAlpha, LWA_ALPHA | (cfg::dat.bFullTransparent ? LWA_COLORKEY : 0)); noRecurse = 1; ShowWindow(hwnd, SW_SHOW); RedrawWindow(hwnd, nullptr, nullptr, RDW_INVALIDATE | RDW_UPDATENOW | RDW_ALLCHILDREN); @@ -1272,17 +1272,17 @@ skipbg: for (startTick = GetTickCount();;) { thisTick = GetTickCount(); if (thisTick >= startTick + 200) { - SetLayeredWindowAttributes(hwnd, cfg::dat.bFullTransparent ? cfg::dat.colorkey : RGB(0, 0, 0), (BYTE)destAlpha, LWA_ALPHA | (cfg::dat.bFullTransparent ? LWA_COLORKEY : 0)); + SetLayeredWindowAttributes(hwnd, cfg::dat.bFullTransparent ? cfg::dat.colorkey : RGB(0, 0, 0), (uint8_t)destAlpha, LWA_ALPHA | (cfg::dat.bFullTransparent ? LWA_COLORKEY : 0)); g_fading_active = 0; return DefWindowProc(hwnd, msg, wParam, lParam); } - SetLayeredWindowAttributes(hwnd, cfg::dat.bFullTransparent ? cfg::dat.colorkey : RGB(0, 0, 0), (BYTE)(sourceAlpha + (destAlpha - sourceAlpha) * (int)(thisTick - startTick) / 200), LWA_ALPHA | (cfg::dat.bFullTransparent ? LWA_COLORKEY : 0)); + SetLayeredWindowAttributes(hwnd, cfg::dat.bFullTransparent ? cfg::dat.colorkey : RGB(0, 0, 0), (uint8_t)(sourceAlpha + (destAlpha - sourceAlpha) * (int)(thisTick - startTick) / 200), LWA_ALPHA | (cfg::dat.bFullTransparent ? LWA_COLORKEY : 0)); } } case WM_SYSCOMMAND: { - BYTE bWindowStyle = db_get_b(0, "CLUI", "WindowStyle", SETTING_WINDOWSTYLE_DEFAULT); + uint8_t bWindowStyle = db_get_b(0, "CLUI", "WindowStyle", SETTING_WINDOWSTYLE_DEFAULT); if (SETTING_WINDOWSTYLE_DEFAULT == bWindowStyle) { if (wParam == SC_RESTORE) { CallWindowProc(DefWindowProc, hwnd, msg, wParam, lParam); @@ -1352,7 +1352,7 @@ skipbg: } } else if (item->dwFlags & BUTTON_ISDBACTION) { - BYTE *pValue; + uint8_t *pValue; char *szModule = item->szModule; char *szSetting = item->szSetting; MCONTACT finalhContact = 0; @@ -1433,8 +1433,8 @@ skipbg: case IDC_TBSOUND: case IDC_STBSOUND: cfg::dat.soundsOff = !cfg::dat.soundsOff; - db_set_b(0, "CLUI", "NoSounds", (BYTE)cfg::dat.soundsOff); - db_set_b(0, "Skin", "UseSound", (BYTE)(cfg::dat.soundsOff ? 0 : 1)); + db_set_b(0, "CLUI", "NoSounds", (uint8_t)cfg::dat.soundsOff); + db_set_b(0, "Skin", "UseSound", (uint8_t)(cfg::dat.soundsOff ? 0 : 1)); return 0; case IDC_TBSELECTVIEWMODE: @@ -1634,7 +1634,7 @@ buttons_done: int nParts = SendMessage(g_clistApi.hwndStatus, SB_GETPARTS, 0, 0); SIZE textSize; - BYTE showOpts = db_get_b(0, "CLUI", "SBarShow", 1); + uint8_t showOpts = db_get_b(0, "CLUI", "SBarShow", 1); SetBkMode(dis->hDC, TRANSPARENT); int x = dis->rcItem.left; diff --git a/plugins/Clist_nicer/src/cluiframes.cpp b/plugins/Clist_nicer/src/cluiframes.cpp index 14b6ee3485..02bb548c61 100644 --- a/plugins/Clist_nicer/src/cluiframes.cpp +++ b/plugins/Clist_nicer/src/cluiframes.cpp @@ -425,10 +425,10 @@ int DBStoreFrameSettingsAtPos(int pos, int Frameid) db_set_ws(0, CLUIFrameModule, buf.Format("Name%d", pos), Frames[Frameid].name); //boolean - db_set_b(0, CLUIFrameModule, buf.Format("Collapse%d", pos), (BYTE)btoint(Frames[Frameid].collapsed)); - db_set_b(0, CLUIFrameModule, buf.Format("Locked%d", pos), (BYTE)btoint(Frames[Frameid].Locked)); - db_set_b(0, CLUIFrameModule, buf.Format("Visible%d", pos), (BYTE)btoint(Frames[Frameid].visible)); - db_set_b(0, CLUIFrameModule, buf.Format("TBVisile%d", pos), (BYTE)btoint(Frames[Frameid].TitleBar.ShowTitleBar)); + db_set_b(0, CLUIFrameModule, buf.Format("Collapse%d", pos), (uint8_t)btoint(Frames[Frameid].collapsed)); + db_set_b(0, CLUIFrameModule, buf.Format("Locked%d", pos), (uint8_t)btoint(Frames[Frameid].Locked)); + db_set_b(0, CLUIFrameModule, buf.Format("Visible%d", pos), (uint8_t)btoint(Frames[Frameid].visible)); + db_set_b(0, CLUIFrameModule, buf.Format("TBVisile%d", pos), (uint8_t)btoint(Frames[Frameid].TitleBar.ShowTitleBar)); db_set_w(0, CLUIFrameModule, buf.Format("Height%d", pos), (WORD)Frames[Frameid].height); db_set_w(0, CLUIFrameModule, buf.Format("HeightCollapsed%d", pos), (WORD)Frames[Frameid].HeightWhenCollapsed); @@ -439,8 +439,8 @@ int DBStoreFrameSettingsAtPos(int pos, int Frameid) db_set_w(0, CLUIFrameModule, buf.Format("FloatW%d", pos), (WORD)Frames[Frameid].FloatingSize.x); db_set_w(0, CLUIFrameModule, buf.Format("FloatH%d", pos), (WORD)Frames[Frameid].FloatingSize.y); - db_set_b(0, CLUIFrameModule, buf.Format("Floating%d", pos), (BYTE)btoint(Frames[Frameid].floating)); - db_set_b(0, CLUIFrameModule, buf.Format("UseBorder%d", pos), (BYTE)btoint(Frames[Frameid].UseBorder)); + db_set_b(0, CLUIFrameModule, buf.Format("Floating%d", pos), (uint8_t)btoint(Frames[Frameid].floating)); + db_set_b(0, CLUIFrameModule, buf.Format("UseBorder%d", pos), (uint8_t)btoint(Frames[Frameid].UseBorder)); db_set_w(0, CLUIFrameModule, buf.Format("Order%d", pos), (WORD)Frames[Frameid].order); db_set_b(0, CLUIFrameModule, buf.Format("Skinned%d", pos), Frames[Frameid].Skinned); diff --git a/plugins/Clist_nicer/src/cluiopts.cpp b/plugins/Clist_nicer/src/cluiopts.cpp index 337efc9e7d..81a44aef40 100644 --- a/plugins/Clist_nicer/src/cluiopts.cpp +++ b/plugins/Clist_nicer/src/cluiopts.cpp @@ -24,7 +24,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. #include "stdafx.h"
-DWORD GetCLUIWindowStyle(BYTE style)
+DWORD GetCLUIWindowStyle(uint8_t style)
{
DWORD dwBasic = WS_CLIPCHILDREN;
@@ -40,7 +40,7 @@ DWORD GetCLUIWindowStyle(BYTE style) void ApplyCLUIBorderStyle()
{
- BYTE windowStyle = db_get_b(0, "CLUI", "WindowStyle", SETTING_WINDOWSTYLE_TOOLWINDOW);
+ uint8_t windowStyle = db_get_b(0, "CLUI", "WindowStyle", SETTING_WINDOWSTYLE_TOOLWINDOW);
WINDOWPLACEMENT p;
bool minToTray = TRUE;
diff --git a/plugins/Clist_nicer/src/cluiservices.cpp b/plugins/Clist_nicer/src/cluiservices.cpp index ff9eb5a1a1..9ec455e5ab 100644 --- a/plugins/Clist_nicer/src/cluiservices.cpp +++ b/plugins/Clist_nicer/src/cluiservices.cpp @@ -87,7 +87,7 @@ void CluiProtocolStatusChanged(int, const char*) partCount = toshow;
}
else {
- BYTE showOpts = db_get_b(0, "CLUI", "SBarShow", 1);
+ uint8_t showOpts = db_get_b(0, "CLUI", "SBarShow", 1);
wchar_t szName[32];
HDC hdc = GetDC(nullptr);
@@ -134,7 +134,7 @@ void CluiProtocolStatusChanged(int, const char*) SendMessage(g_clistApi.hwndStatus, SB_SIMPLE, FALSE, 0);
partWidths[partCount - 1] = -1;
- BYTE windowStyle = db_get_b(0, "CLUI", "WindowStyle", 0);
+ uint8_t windowStyle = db_get_b(0, "CLUI", "WindowStyle", 0);
SendMessage(g_clistApi.hwndStatus, SB_SETMINHEIGHT, 18 + cfg::dat.bClipBorder + ((windowStyle == SETTING_WINDOWSTYLE_THINBORDER || windowStyle == SETTING_WINDOWSTYLE_NOBORDER) ? 3 : 0), 0);
SendMessage(g_clistApi.hwndStatus, SB_SETPARTS, partCount, (LPARAM)partWidths);
diff --git a/plugins/Clist_nicer/src/contact.cpp b/plugins/Clist_nicer/src/contact.cpp index 7cda00d4da..209fa4f2d6 100644 --- a/plugins/Clist_nicer/src/contact.cpp +++ b/plugins/Clist_nicer/src/contact.cpp @@ -125,7 +125,7 @@ void MF_UpdateThread(LPVOID) void MF_InitCheck(void)
{
- BYTE bMsgFrequency = g_plugin.getByte("fhistdata", 0);
+ uint8_t bMsgFrequency = g_plugin.getByte("fhistdata", 0);
if (!bMsgFrequency) {
for (auto &hContact : Contacts())
MF_CalcFrequency(hContact, 100, 0);
diff --git a/plugins/Clist_nicer/src/coolscroll.cpp b/plugins/Clist_nicer/src/coolscroll.cpp index 5a8828a312..01e1e3eede 100644 --- a/plugins/Clist_nicer/src/coolscroll.cpp +++ b/plugins/Clist_nicer/src/coolscroll.cpp @@ -96,7 +96,7 @@ LRESULT CALLBACK CoolSBWndProc(HWND hwnd, UINT message, WPARAM wParam, LPARAM lP //
static void CoolSB_ZeroMemory(void *ptr, DWORD bytes)
{
- BYTE *bptr = (BYTE *)ptr;
+ uint8_t *bptr = (uint8_t *)ptr;
while(bytes--) *bptr++ = 0;
}
diff --git a/plugins/Clist_nicer/src/extBackg.cpp b/plugins/Clist_nicer/src/extBackg.cpp index 74a0432325..697ef85f7c 100644 --- a/plugins/Clist_nicer/src/extBackg.cpp +++ b/plugins/Clist_nicer/src/extBackg.cpp @@ -330,17 +330,17 @@ void LoadExtBkSettingsFromDB() p->imageItem = nullptr;
CMStringA buffer;
buffer.Format("%s_IGNORE", p->szDBname);
- p->IGNORED = (BYTE)db_get_b(0, "CLCExt", buffer, p->IGNORED);
+ p->IGNORED = (uint8_t)db_get_b(0, "CLCExt", buffer, p->IGNORED);
buffer.Format("%s_GRADIENT", p->szDBname);
- p->GRADIENT = (BYTE)db_get_dw(0, "CLCExt", buffer, p->GRADIENT);
+ p->GRADIENT = (uint8_t)db_get_dw(0, "CLCExt", buffer, p->GRADIENT);
buffer.Format("%s_CORNER", p->szDBname);
- p->CORNER = (BYTE)db_get_dw(0, "CLCExt", buffer, p->CORNER);
+ p->CORNER = (uint8_t)db_get_dw(0, "CLCExt", buffer, p->CORNER);
buffer.Format("%s_COLOR", p->szDBname);
p->COLOR = db_get_dw(0, "CLCExt", buffer, p->COLOR);
buffer.Format("%s_COLOR2", p->szDBname);
p->COLOR2 = db_get_dw(0, "CLCExt", buffer, p->COLOR2);
buffer.Format("%s_COLOR2_TRANSPARENT", p->szDBname);
- p->COLOR2_TRANSPARENT = (BYTE)db_get_b(0, "CLCExt", buffer, p->COLOR2_TRANSPARENT);
+ p->COLOR2_TRANSPARENT = (uint8_t)db_get_b(0, "CLCExt", buffer, p->COLOR2_TRANSPARENT);
buffer.Format("%s_TEXTCOLOR", p->szDBname);
p->TEXTCOLOR = db_get_dw(0, "CLCExt", buffer, p->TEXTCOLOR);
buffer.Format("%s_ALPHA", p->szDBname);
@@ -391,15 +391,15 @@ static void SaveCompleteStructToDB() mir_snprintf(buffer, "%s_TEXTCOLOR", p->szDBname);
db_set_dw(0, "CLCExt", buffer, p->TEXTCOLOR);
mir_snprintf(buffer, "%s_ALPHA", p->szDBname);
- db_set_b(0, "CLCExt", buffer, (BYTE)p->ALPHA);
+ db_set_b(0, "CLCExt", buffer, (uint8_t)p->ALPHA);
mir_snprintf(buffer, "%s_MRGN_LEFT", p->szDBname);
- db_set_b(0, "CLCExt", buffer, (BYTE)p->MARGIN_LEFT);
+ db_set_b(0, "CLCExt", buffer, (uint8_t)p->MARGIN_LEFT);
mir_snprintf(buffer, "%s_MRGN_TOP", p->szDBname);
- db_set_b(0, "CLCExt", buffer, (BYTE)p->MARGIN_TOP);
+ db_set_b(0, "CLCExt", buffer, (uint8_t)p->MARGIN_TOP);
mir_snprintf(buffer, "%s_MRGN_RIGHT", p->szDBname);
- db_set_b(0, "CLCExt", buffer, (BYTE)p->MARGIN_RIGHT);
+ db_set_b(0, "CLCExt", buffer, (uint8_t)p->MARGIN_RIGHT);
mir_snprintf(buffer, "%s_MRGN_BOTTOM", p->szDBname);
- db_set_b(0, "CLCExt", buffer, (BYTE)p->MARGIN_BOTTOM);
+ db_set_b(0, "CLCExt", buffer, (uint8_t)p->MARGIN_BOTTOM);
mir_snprintf(buffer, "%s_BDRSTYLE", p->szDBname);
db_set_dw(0, "CLCExt", buffer, p->BORDERSTYLE);
}
@@ -439,24 +439,24 @@ void SaveNonStatusItemsSettings(HWND hwndDlg) {
BOOL translated;
- db_set_b(0, "CLCExt", "EXBK_EqualSelection", (BYTE)IsDlgButtonChecked(hwndDlg, IDC_EQUALSELECTION));
- db_set_b(0, "CLCExt", "EXBK_SelBlend", (BYTE)IsDlgButtonChecked(hwndDlg, IDC_SELBLEND));
+ db_set_b(0, "CLCExt", "EXBK_EqualSelection", (uint8_t)IsDlgButtonChecked(hwndDlg, IDC_EQUALSELECTION));
+ db_set_b(0, "CLCExt", "EXBK_SelBlend", (uint8_t)IsDlgButtonChecked(hwndDlg, IDC_SELBLEND));
cfg::dat.cornerRadius = GetDlgItemInt(hwndDlg, IDC_CORNERRAD, &translated, FALSE);
cfg::dat.bApplyIndentToBg = IsDlgButtonChecked(hwndDlg, IDC_APPLYINDENTBG) ? 1 : 0;
cfg::dat.bUsePerProto = IsDlgButtonChecked(hwndDlg, IDC_USEPERPROTO) ? 1 : 0;
cfg::dat.bWantFastGradients = IsDlgButtonChecked(hwndDlg, IDC_FASTGRADIENT) ? 1 : 0;
cfg::dat.bOverridePerStatusColors = IsDlgButtonChecked(hwndDlg, IDC_OVERRIDEPERSTATUSCOLOR) ? 1 : 0;
- cfg::dat.titleBarHeight = (BYTE)GetDlgItemInt(hwndDlg, IDC_LASTITEMPADDING, &translated, FALSE);
+ cfg::dat.titleBarHeight = (uint8_t)GetDlgItemInt(hwndDlg, IDC_LASTITEMPADDING, &translated, FALSE);
cfg::dat.group_padding = GetDlgItemInt(hwndDlg, IDC_GRPTOPPADDING, &translated, FALSE);
db_set_b(0, "CLCExt", "CornerRad", cfg::dat.cornerRadius);
- db_set_b(0, "CLCExt", "applyindentbg", (BYTE)cfg::dat.bApplyIndentToBg);
- db_set_b(0, "CLCExt", "useperproto", (BYTE)cfg::dat.bUsePerProto);
- db_set_b(0, "CLCExt", "override_status", (BYTE)cfg::dat.bOverridePerStatusColors);
- db_set_b(0, "CLCExt", "bskinned", (BYTE)(IsDlgButtonChecked(hwndDlg, IDC_SETALLBUTTONSKINNED) ? 1 : 0));
+ db_set_b(0, "CLCExt", "applyindentbg", (uint8_t)cfg::dat.bApplyIndentToBg);
+ db_set_b(0, "CLCExt", "useperproto", (uint8_t)cfg::dat.bUsePerProto);
+ db_set_b(0, "CLCExt", "override_status", (uint8_t)cfg::dat.bOverridePerStatusColors);
+ db_set_b(0, "CLCExt", "bskinned", (uint8_t)(IsDlgButtonChecked(hwndDlg, IDC_SETALLBUTTONSKINNED) ? 1 : 0));
db_set_b(0, "CLCExt", "FastGradients", cfg::dat.bWantFastGradients);
- db_set_b(0, "CLC", "IgnoreSelforGroups", (BYTE)IsDlgButtonChecked(hwndDlg, IDC_IGNORESELFORGROUPS));
+ db_set_b(0, "CLC", "IgnoreSelforGroups", (uint8_t)IsDlgButtonChecked(hwndDlg, IDC_IGNORESELFORGROUPS));
db_set_dw(0, "CLCExt", "grp_padding", cfg::dat.group_padding);
db_set_b(0, "CLCExt", "frame_height", cfg::dat.titleBarHeight);
@@ -573,7 +573,7 @@ void extbk_export(char *file) data = 0;
switch (_tagSettings[i].size) {
case 1:
- data = (DWORD)db_get_b(0, _tagSettings[i].szModule, _tagSettings[i].szSetting, (BYTE)_tagSettings[i].defaultval);
+ data = (DWORD)db_get_b(0, _tagSettings[i].szModule, _tagSettings[i].szSetting, (uint8_t)_tagSettings[i].defaultval);
break;
case 2:
data = (DWORD)db_get_w(0, _tagSettings[i].szModule, _tagSettings[i].szSetting, (DWORD)_tagSettings[i].defaultval);
@@ -617,17 +617,17 @@ static void PreMultiply(HBITMAP hBitmap, int mode) int width = bmp.bmWidth;
int height = bmp.bmHeight;
DWORD dwLen = width * height * 4;
- BYTE *p = (BYTE *)malloc(dwLen);
+ uint8_t *p = (uint8_t *)malloc(dwLen);
if (p == nullptr)
return;
GetBitmapBits(hBitmap, dwLen, p);
for (int y = 0; y < height; ++y) {
- BYTE *px = p + width * 4 * y;
+ uint8_t *px = p + width * 4 * y;
for (int x = 0; x < width; ++x) {
if (mode) {
- BYTE alpha = px[3];
+ uint8_t alpha = px[3];
px[0] = px[0] * alpha / 255;
px[1] = px[1] * alpha / 255;
px[2] = px[2] * alpha / 255;
@@ -648,7 +648,7 @@ static void CorrectBitmap32Alpha(HBITMAP hBitmap) return;
DWORD dwLen = bmp.bmWidth * bmp.bmHeight * (bmp.bmBitsPixel / 8);
- BYTE *p = (BYTE*)calloc(1, dwLen);
+ uint8_t *p = (uint8_t*)calloc(1, dwLen);
if (p == nullptr)
return;
@@ -656,7 +656,7 @@ static void CorrectBitmap32Alpha(HBITMAP hBitmap) BOOL fixIt = TRUE;
for (int y = 0; y < bmp.bmHeight; ++y) {
- BYTE *px = p + bmp.bmWidth * 4 * y;
+ uint8_t *px = p + bmp.bmWidth * 4 * y;
for (int x = 0; x < bmp.bmWidth; ++x) {
if (px[3] != 0)
@@ -757,7 +757,7 @@ static void ReadItem(StatusItems_t *this_item, char *szItem, char *file) GetPrivateProfileStringA(szItem, "Color2", def_color, buffer, 400, file);
this_item->COLOR2 = HexStringToLong(buffer);
- this_item->COLOR2_TRANSPARENT = (BYTE)GetPrivateProfileIntA(szItem, "COLOR2_TRANSPARENT", defaults->COLOR2_TRANSPARENT, file);
+ this_item->COLOR2_TRANSPARENT = (uint8_t)GetPrivateProfileIntA(szItem, "COLOR2_TRANSPARENT", defaults->COLOR2_TRANSPARENT, file);
this_item->CORNER = defaults->CORNER & CORNER_ACTIVE ? defaults->CORNER : 0;
GetPrivateProfileStringA(szItem, "Corner", "None", buffer, 400, file);
@@ -828,7 +828,7 @@ done_with_glyph: mir_snprintf(szFinalName, "%s\\%s\\%s", szDrive, szPath, buffer);
tmpItem.alpha = GetPrivateProfileIntA(itemname, "Alpha", 100, szFileName);
tmpItem.alpha = min(tmpItem.alpha, 100);
- tmpItem.alpha = (BYTE)((FLOAT)(((FLOAT)tmpItem.alpha) / 100) * 255);
+ tmpItem.alpha = (uint8_t)((FLOAT)(((FLOAT)tmpItem.alpha) / 100) * 255);
tmpItem.bf.SourceConstantAlpha = tmpItem.alpha;
tmpItem.bLeft = GetPrivateProfileIntA(itemname, "Left", 0, szFileName);
tmpItem.bRight = GetPrivateProfileIntA(itemname, "Right", 0, szFileName);
@@ -1111,7 +1111,7 @@ static void BTN_ReadItem(char *itemName, char *file) for (n = 0; n <= 1; n++) {
CMStringA szKey;
- BYTE *pValue;
+ uint8_t *pValue;
if (n == 0)
szKey = "dbonpush";
@@ -1123,7 +1123,7 @@ static void BTN_ReadItem(char *itemName, char *file) switch (szBuffer[0]) {
case 'b':
{
- BYTE value = (BYTE)atol(&szBuffer[1]);
+ uint8_t value = (uint8_t)atol(&szBuffer[1]);
pValue[0] = value;
tmpItem.type = DBVT_BYTE;
break;
@@ -1261,7 +1261,7 @@ void IMG_LoadItems() if (g_CLUIImageItem) {
cfg::dat.bFullTransparent = TRUE;
cfg::dat.dwFlags &= ~CLUI_FRAME_CLISTSUNKEN;
- db_set_b(0, "CLUI", "fulltransparent", (BYTE)cfg::dat.bFullTransparent);
+ db_set_b(0, "CLUI", "fulltransparent", (uint8_t)cfg::dat.bFullTransparent);
db_set_b(0, "CLUI", "WindowStyle", SETTING_WINDOWSTYLE_NOBORDER);
ApplyCLUIBorderStyle();
SetWindowLongPtr(g_clistApi.hwndContactList, GWL_EXSTYLE, GetWindowLongPtr(g_clistApi.hwndContactList, GWL_EXSTYLE) | WS_EX_LAYERED);
@@ -1341,12 +1341,12 @@ void LoadPerContactSkins(wchar_t *tszFileName) db_set_dw(hContact, "EXTBK", "TEXT", items[j].TEXTCOLOR);
db_set_dw(hContact, "EXTBK", "COLOR1", items[j].COLOR);
db_set_dw(hContact, "EXTBK", "COLOR2", items[j].COLOR2);
- db_set_b(hContact, "EXTBK", "ALPHA", (BYTE)items[j].ALPHA);
+ db_set_b(hContact, "EXTBK", "ALPHA", (uint8_t)items[j].ALPHA);
- db_set_b(hContact, "EXTBK", "LEFT", (BYTE)items[j].MARGIN_LEFT);
- db_set_b(hContact, "EXTBK", "RIGHT", (BYTE)items[j].MARGIN_RIGHT);
- db_set_b(hContact, "EXTBK", "TOP", (BYTE)items[j].MARGIN_TOP);
- db_set_b(hContact, "EXTBK", "BOTTOM", (BYTE)items[j].MARGIN_BOTTOM);
+ db_set_b(hContact, "EXTBK", "LEFT", (uint8_t)items[j].MARGIN_LEFT);
+ db_set_b(hContact, "EXTBK", "RIGHT", (uint8_t)items[j].MARGIN_RIGHT);
+ db_set_b(hContact, "EXTBK", "TOP", (uint8_t)items[j].MARGIN_TOP);
+ db_set_b(hContact, "EXTBK", "BOTTOM", (uint8_t)items[j].MARGIN_BOTTOM);
db_set_b(hContact, "EXTBK", "TRANS", items[j].COLOR2_TRANSPARENT);
db_set_dw(hContact, "EXTBK", "BDR", items[j].BORDERSTYLE);
@@ -1420,17 +1420,17 @@ void extbk_import(char *file, HWND hwndDlg) mir_snprintf(szKey, "Font%dSize", n);
data = 0;
GetPrivateProfileStructA(szSection, "Size", &data, 1, file);
- db_set_b(0, "CLC", szKey, (BYTE)data);
+ db_set_b(0, "CLC", szKey, (uint8_t)data);
mir_snprintf(szKey, "Font%dSty", n);
data = 0;
GetPrivateProfileStructA(szSection, "Style", &data, 1, file);
- db_set_b(0, "CLC", szKey, (BYTE)data);
+ db_set_b(0, "CLC", szKey, (uint8_t)data);
mir_snprintf(szKey, "Font%dSet", n);
data = 0;
GetPrivateProfileStructA(szSection, "Set", &data, 1, file);
- db_set_b(0, "CLC", szKey, (BYTE)data);
+ db_set_b(0, "CLC", szKey, (uint8_t)data);
mir_snprintf(szKey, "Font%dCol", n);
data = 0;
@@ -1458,7 +1458,7 @@ void extbk_import(char *file, HWND hwndDlg) GetPrivateProfileStructA("Global", _tagSettings[i].szSetting, &data, _tagSettings[i].size, file);
switch (_tagSettings[i].size) {
case 1:
- db_set_b(0, _tagSettings[i].szModule, _tagSettings[i].szSetting, (BYTE)data);
+ db_set_b(0, _tagSettings[i].szModule, _tagSettings[i].szSetting, (uint8_t)data);
break;
case 4:
db_set_dw(0, _tagSettings[i].szModule, _tagSettings[i].szSetting, data);
@@ -1557,7 +1557,7 @@ static INT_PTR CALLBACK DlgProcSkinOpts(HWND hwndDlg, UINT msg, WPARAM wParam, L case IDC_USESKIN:
{
int useskin = IsDlgButtonChecked(hwndDlg, IDC_USESKIN);
- db_set_b(0, "CLUI", "useskin", (BYTE)(useskin ? 1 : 0));
+ db_set_b(0, "CLUI", "useskin", (uint8_t)(useskin ? 1 : 0));
}
break;
@@ -1603,7 +1603,7 @@ static INT_PTR CALLBACK DlgProcSkinOpts(HWND hwndDlg, UINT msg, WPARAM wParam, L else
skinChanged = TRUE;
db_set_ws(0, "CLC", "AdvancedSkin", final_path);
- db_set_b(0, "CLUI", "skin_changed", (BYTE)skinChanged);
+ db_set_b(0, "CLUI", "skin_changed", (uint8_t)skinChanged);
SetDlgItemText(hwndDlg, IDC_SKINFILENAME, final_path);
}
}
@@ -1776,7 +1776,7 @@ static INT_PTR CALLBACK OptionsDlgProc(HWND hwnd, UINT msg, WPARAM wParam, LPARA tci.mask = TCIF_PARAM;
TabCtrl_GetItem(GetDlgItem(hwnd, IDC_OPTIONSTAB), TabCtrl_GetCurSel(GetDlgItem(hwnd, IDC_OPTIONSTAB)), &tci);
ShowWindow((HWND)tci.lParam, SW_SHOW);
- db_set_b(0, "CLUI", "opage", (BYTE)TabCtrl_GetCurSel(GetDlgItem(hwnd, IDC_OPTIONSTAB)));
+ db_set_b(0, "CLUI", "opage", (uint8_t)TabCtrl_GetCurSel(GetDlgItem(hwnd, IDC_OPTIONSTAB)));
Utils::enableDlgControl(hwnd, IDC_EXPORT, TabCtrl_GetCurSel(GetDlgItem(hwnd, IDC_OPTIONSTAB)) != 0);
Utils::enableDlgControl(hwnd, IDC_IMPORT, TabCtrl_GetCurSel(GetDlgItem(hwnd, IDC_OPTIONSTAB)) != 0);
break;
diff --git a/plugins/Clist_nicer/src/statusbar.cpp b/plugins/Clist_nicer/src/statusbar.cpp index a61bd60c1e..5a2d833c35 100644 --- a/plugins/Clist_nicer/src/statusbar.cpp +++ b/plugins/Clist_nicer/src/statusbar.cpp @@ -87,7 +87,7 @@ LRESULT CALLBACK NewStatusBarWndProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM HDC hdc = BeginPaint(hwnd, &ps);
HDC hdcMem = CreateCompatibleDC(hdc);
RECT rcClient, rcWindow;
- BYTE windowStyle = db_get_b(0, "CLUI", "WindowStyle", SETTING_WINDOWSTYLE_DEFAULT);
+ uint8_t windowStyle = db_get_b(0, "CLUI", "WindowStyle", SETTING_WINDOWSTYLE_DEFAULT);
LONG b_offset = cfg::dat.bClipBorder + (windowStyle == SETTING_WINDOWSTYLE_NOBORDER ? 2 : (windowStyle == SETTING_WINDOWSTYLE_THINBORDER ? 1 : 0));
GetClientRect(hwnd, &rcClient);
diff --git a/plugins/Clist_nicer/src/stdafx.h b/plugins/Clist_nicer/src/stdafx.h index 39216d9f92..5c95d1f8d6 100644 --- a/plugins/Clist_nicer/src/stdafx.h +++ b/plugins/Clist_nicer/src/stdafx.h @@ -93,7 +93,7 @@ typedef int (__cdecl *pfnDrawAvatar)(HDC hdcOrig, HDC hdcMem, RECT *rc, ClcCon BOOL __forceinline GetItemByStatus(int status, StatusItems_t *retitem);
-void DrawAlpha(HDC hdcwnd, PRECT rc, DWORD basecolor, int alpha, DWORD basecolor2, BOOL transparent, BYTE FLG_GRADIENT, BYTE FLG_CORNER, DWORD BORDERSTYLE, ImageItem *item);
+void DrawAlpha(HDC hdcwnd, PRECT rc, DWORD basecolor, int alpha, DWORD basecolor2, BOOL transparent, uint8_t FLG_GRADIENT, uint8_t FLG_CORNER, DWORD BORDERSTYLE, ImageItem *item);
void CustomizeButton(HWND hWnd, bool bIsSkinned, bool bIsThemed, bool bIsFlat = false, bool bIsTTButton = false);
diff --git a/plugins/Clist_nicer/src/viewmodes.cpp b/plugins/Clist_nicer/src/viewmodes.cpp index 99a560f5df..144a1ba011 100644 --- a/plugins/Clist_nicer/src/viewmodes.cpp +++ b/plugins/Clist_nicer/src/viewmodes.cpp @@ -513,7 +513,7 @@ void UpdateFilters() {
int useLastMsg = dwFlags & CLVM_USELASTMSG;
DWORD lmdat;
- BYTE bTmp;
+ uint8_t bTmp;
CheckDlgButton(sttClvmHwnd, IDC_LASTMSG, useLastMsg ? BST_CHECKED : BST_UNCHECKED);
Utils::enableDlgControl(sttClvmHwnd, IDC_LASTMESSAGEOP, useLastMsg);
@@ -778,7 +778,7 @@ static int menuCounter = 0; static int FillMenuCallback(char *szSetting)
{
- if ((BYTE)szSetting[0] == 246)
+ if ((uint8_t)szSetting[0] == 246)
return 1;
AppendMenuA(hViewModeMenu, MF_STRING, menuCounter++, szSetting);
@@ -964,7 +964,7 @@ clvm_reset_command: Clist_Broadcast(CLM_AUTOREBUILD, 0, 0);
SetDlgItemText(hwnd, IDC_SELECTMODE, TranslateT("No view mode"));
g_clistApi.pfnSetHideOffline(cfg::dat.boldHideOffline);
- cfg::dat.boldHideOffline = (BYTE)-1;
+ cfg::dat.boldHideOffline = (uint8_t)-1;
SetButtonStates();
cfg::dat.current_viewmode[0] = 0;
cfg::dat.old_viewmode[0] = 0;
@@ -1064,7 +1064,7 @@ void ApplyViewMode(const char *name) strncpy_s(cfg::dat.current_viewmode, name, _TRUNCATE);
if (cfg::dat.filterFlags & CLVM_USELASTMSG) {
- BYTE bSaved = cfg::dat.sortOrder[0];
+ uint8_t bSaved = cfg::dat.sortOrder[0];
cfg::dat.sortOrder[0] = SORTBY_LASTMSG;
for (auto &p : cfg::arCache)
@@ -1099,7 +1099,7 @@ void ApplyViewMode(const char *name) if (HIWORD(cfg::dat.filterFlags) > 0)
cfg::dat.bFilterEffective |= CLVM_STICKY_CONTACTS;
- if (cfg::dat.boldHideOffline == (BYTE)-1)
+ if (cfg::dat.boldHideOffline == (uint8_t)-1)
cfg::dat.boldHideOffline = Clist::HideOffline;
g_clistApi.pfnSetHideOffline(false);
|