summaryrefslogtreecommitdiff
path: root/plugins/TooltipNotify/src
diff options
context:
space:
mode:
authorGeorge Hazan <ghazan@miranda.im>2021-12-26 16:39:04 +0300
committerGeorge Hazan <ghazan@miranda.im>2021-12-26 16:39:04 +0300
commit62a186697df33c96dc1a6dac0f4dfc38652fb96f (patch)
tree1437d0906218fae8827aed384026f2b7e656f4ac /plugins/TooltipNotify/src
parentfcbb395dc7ff3edab972b6d4b27dbbfb3305f5d7 (diff)
BYTE -> uint8_t
Diffstat (limited to 'plugins/TooltipNotify/src')
-rw-r--r--plugins/TooltipNotify/src/Tooltip.cpp2
-rw-r--r--plugins/TooltipNotify/src/Tooltip.h6
-rw-r--r--plugins/TooltipNotify/src/TooltipNotify.cpp42
-rw-r--r--plugins/TooltipNotify/src/TooltipNotify.h34
4 files changed, 42 insertions, 42 deletions
diff --git a/plugins/TooltipNotify/src/Tooltip.cpp b/plugins/TooltipNotify/src/Tooltip.cpp
index 014802da07..a05a2a7632 100644
--- a/plugins/TooltipNotify/src/Tooltip.cpp
+++ b/plugins/TooltipNotify/src/Tooltip.cpp
@@ -167,7 +167,7 @@ void CTooltip::Hide()
-void CTooltip::set_Translucency(BYTE bAlpha)
+void CTooltip::set_Translucency(uint8_t bAlpha)
{
if (SetWindowLongPtr(m_hWnd, GWL_EXSTYLE, GetWindowLongPtr(m_hWnd, GWL_EXSTYLE) | WS_EX_LAYERED) != 0)
SetLayeredWindowAttributes(m_hWnd, RGB(0,0,0), bAlpha, LWA_ALPHA);
diff --git a/plugins/TooltipNotify/src/Tooltip.h b/plugins/TooltipNotify/src/Tooltip.h
index 1767e0d3a3..b451316705 100644
--- a/plugins/TooltipNotify/src/Tooltip.h
+++ b/plugins/TooltipNotify/src/Tooltip.h
@@ -20,7 +20,7 @@ public:
void set_Position(INT x, INT y);
void get_Rect(RECT *Rect) const;
void set_TransparentInput(BOOL bOnOff);
- void set_Translucency(BYTE bAlpha);
+ void set_Translucency(uint8_t bAlpha);
void set_Text(const wchar_t* szText);
void set_Font(const LOGFONT& Font) { m_lfFont = Font; }
void set_TextColor(DWORD TextColor) { m_dwTextColor = TextColor; }
@@ -46,9 +46,9 @@ private:
DWORD m_dwBgColor;
LOGFONT m_lfFont;
wchar_t *m_szText;
- BYTE m_bAlpha;
+ uint8_t m_bAlpha;
BOOL m_bTranspInput;
- BYTE m_bLDblClick;
+ uint8_t m_bLDblClick;
CTooltipNotify *m_pTooltipNotify;
static const wchar_t *s_szTooltipClass;
diff --git a/plugins/TooltipNotify/src/TooltipNotify.cpp b/plugins/TooltipNotify/src/TooltipNotify.cpp
index 6fff571a35..8aae437349 100644
--- a/plugins/TooltipNotify/src/TooltipNotify.cpp
+++ b/plugins/TooltipNotify/src/TooltipNotify.cpp
@@ -174,7 +174,7 @@ int CTooltipNotify::ProtoAck(WPARAM, LPARAM lParam)
char *szProtocol = (char *)ack->szModule;
if (wNewStatus == ID_STATUS_OFFLINE) {
- BYTE bProtoActive = g_plugin.getByte(szProtocol, ProtoUserBit | ProtoIntBit);
+ uint8_t bProtoActive = g_plugin.getByte(szProtocol, ProtoUserBit | ProtoIntBit);
bProtoActive &= ~ProtoIntBit;
g_plugin.setByte(szProtocol, bProtoActive);
}
@@ -354,7 +354,7 @@ void CTooltipNotify::OnConnectionTimer(HWND, UINT, UINT_PTR idEvent, DWORD)
MapTimerIdProtoIter iter = FindProtoByTimer(idEvent);
assert(iter != m_mapTimerIdProto.end());
- BYTE bProtoActive = g_plugin.getByte(iter->proto, ProtoUserBit | ProtoIntBit);
+ uint8_t bProtoActive = g_plugin.getByte(iter->proto, ProtoUserBit | ProtoIntBit);
bProtoActive |= ProtoIntBit;
g_plugin.setByte(iter->proto, bProtoActive);
@@ -445,20 +445,20 @@ void CTooltipNotify::SaveSettings()
void CTooltipNotify::ReadSettingsFromDlg(HWND hDlg)
{
- m_sOptions.bOffline = (BYTE)(IsDlgButtonChecked(hDlg, IDC_OFFLINE) == BST_CHECKED ? 1 : 0);
- m_sOptions.bOnline = (BYTE)(IsDlgButtonChecked(hDlg, IDC_ONLINE) == BST_CHECKED ? 1 : 0);
- m_sOptions.bOther = (BYTE)(IsDlgButtonChecked(hDlg, IDC_OTHER) == BST_CHECKED ? 1 : 0);
- m_sOptions.bTyping = (BYTE)(IsDlgButtonChecked(hDlg, IDC_TYPING) == BST_CHECKED ? 1 : 0);
- m_sOptions.bIdle = (BYTE)(IsDlgButtonChecked(hDlg, IDC_IDLE) == BST_CHECKED ? 1 : 0);
- m_sOptions.bX2 = (BYTE)(IsDlgButtonChecked(hDlg, IDC_X2) == BST_CHECKED ? 1 : 0);
- m_sOptions.bConjSOLN = (BYTE)(IsDlgButtonChecked(hDlg, IDC_CONJSOLN) == BST_CHECKED ? 1 : 0);
- m_sOptions.bAutoPos = (BYTE)(IsDlgButtonChecked(hDlg, IDC_AUTOPOS) == BST_CHECKED ? 1 : 0);
- m_sOptions.bBallonTip = (BYTE)(IsDlgButtonChecked(hDlg, IDC_BALLONTIP) == BST_CHECKED ? 1 : 0);
- m_sOptions.bTransp = (BYTE)(IsDlgButtonChecked(hDlg, IDC_TRANSPARENCY) == BST_CHECKED ? 1 : 0);
- m_sOptions.bAlpha = (BYTE)SendDlgItemMessage(hDlg, IDC_TRANSPARENCY_SLIDER, TBM_GETPOS, 0, 0);
- m_sOptions.bTranspInput = (BYTE)(IsDlgButtonChecked(hDlg, IDC_TRANSP_INPUT) == BST_CHECKED ? 1 : 0);
- m_sOptions.bPrefixProto = (BYTE)(IsDlgButtonChecked(hDlg, IDC_PREFIX_PROTO) == BST_CHECKED ? 1 : 0);
- m_sOptions.bLDblClick = (BYTE)(IsDlgButtonChecked(hDlg, IDC_RB_CLIST) == BST_CHECKED) ? SHOW_HIDE_CLIST : OPEN_MSGDLG;
+ m_sOptions.bOffline = (uint8_t)(IsDlgButtonChecked(hDlg, IDC_OFFLINE) == BST_CHECKED ? 1 : 0);
+ m_sOptions.bOnline = (uint8_t)(IsDlgButtonChecked(hDlg, IDC_ONLINE) == BST_CHECKED ? 1 : 0);
+ m_sOptions.bOther = (uint8_t)(IsDlgButtonChecked(hDlg, IDC_OTHER) == BST_CHECKED ? 1 : 0);
+ m_sOptions.bTyping = (uint8_t)(IsDlgButtonChecked(hDlg, IDC_TYPING) == BST_CHECKED ? 1 : 0);
+ m_sOptions.bIdle = (uint8_t)(IsDlgButtonChecked(hDlg, IDC_IDLE) == BST_CHECKED ? 1 : 0);
+ m_sOptions.bX2 = (uint8_t)(IsDlgButtonChecked(hDlg, IDC_X2) == BST_CHECKED ? 1 : 0);
+ m_sOptions.bConjSOLN = (uint8_t)(IsDlgButtonChecked(hDlg, IDC_CONJSOLN) == BST_CHECKED ? 1 : 0);
+ m_sOptions.bAutoPos = (uint8_t)(IsDlgButtonChecked(hDlg, IDC_AUTOPOS) == BST_CHECKED ? 1 : 0);
+ m_sOptions.bBallonTip = (uint8_t)(IsDlgButtonChecked(hDlg, IDC_BALLONTIP) == BST_CHECKED ? 1 : 0);
+ m_sOptions.bTransp = (uint8_t)(IsDlgButtonChecked(hDlg, IDC_TRANSPARENCY) == BST_CHECKED ? 1 : 0);
+ m_sOptions.bAlpha = (uint8_t)SendDlgItemMessage(hDlg, IDC_TRANSPARENCY_SLIDER, TBM_GETPOS, 0, 0);
+ m_sOptions.bTranspInput = (uint8_t)(IsDlgButtonChecked(hDlg, IDC_TRANSP_INPUT) == BST_CHECKED ? 1 : 0);
+ m_sOptions.bPrefixProto = (uint8_t)(IsDlgButtonChecked(hDlg, IDC_PREFIX_PROTO) == BST_CHECKED ? 1 : 0);
+ m_sOptions.bLDblClick = (uint8_t)(IsDlgButtonChecked(hDlg, IDC_RB_CLIST) == BST_CHECKED) ? SHOW_HIDE_CLIST : OPEN_MSGDLG;
m_sOptions.wDuration = LOWORD(SendDlgItemMessage(hDlg, IDC_DURATIONSPIN, UDM_GETPOS, 0, 0));
m_sOptions.wStartupDelay = LOWORD(SendDlgItemMessage(hDlg, IDC_DELAYONCONNSPIN, UDM_GETPOS, 0, 0));
}
@@ -639,7 +639,7 @@ BOOL CTooltipNotify::ProtosDlgProc(HWND hDlg, UINT msg, WPARAM wParam, LPARAM)
ListView_InsertItem(GetDlgItem(hDlg, IDC_PROTOS), &lvi);
- BYTE bProtoState = g_plugin.getByte(pa->szModuleName, ProtoUserBit | ProtoIntBit);
+ uint8_t bProtoState = g_plugin.getByte(pa->szModuleName, ProtoUserBit | ProtoIntBit);
BOOL bProtoEnabled = (bProtoState & ProtoUserBit) != 0;
ListView_SetCheckState(GetDlgItem(hDlg, IDC_PROTOS), lvi.iItem, bProtoEnabled);
}
@@ -660,7 +660,7 @@ BOOL CTooltipNotify::ProtosDlgProc(HWND hDlg, UINT msg, WPARAM wParam, LPARAM)
szMultiByteProto, sizeof(szMultiByteProto), nullptr, nullptr);
szMultiByteProto[lLen] = '\0';
- BYTE bProtoState = g_plugin.getByte(szMultiByteProto, ProtoUserBit | ProtoIntBit);
+ uint8_t bProtoState = g_plugin.getByte(szMultiByteProto, ProtoUserBit | ProtoIntBit);
BOOL bProtoEnabled = ListView_GetCheckState(GetDlgItem(hDlg, IDC_PROTOS), i);
@@ -713,15 +713,15 @@ void CTooltipNotify::LoadList(HWND hwndDlg, HANDLE hItemNew, HANDLE hItemUnknown
void CTooltipNotify::SaveList(HWND hwndDlg, HANDLE hItemNew, HANDLE hItemUnknown)
{
if (hItemNew)
- m_sOptions.bIgnoreNew = (BYTE)(SendDlgItemMessage(hwndDlg, IDC_CLIST, CLM_GETCHECKMARK, (WPARAM)hItemNew, 0) ? 0 : 1);
+ m_sOptions.bIgnoreNew = (uint8_t)(SendDlgItemMessage(hwndDlg, IDC_CLIST, CLM_GETCHECKMARK, (WPARAM)hItemNew, 0) ? 0 : 1);
if (hItemUnknown)
- m_sOptions.bIgnoreUnknown = (BYTE)(SendDlgItemMessage(hwndDlg, IDC_CLIST, CLM_GETCHECKMARK, (WPARAM)hItemUnknown, 0) ? 0 : 1);
+ m_sOptions.bIgnoreUnknown = (uint8_t)(SendDlgItemMessage(hwndDlg, IDC_CLIST, CLM_GETCHECKMARK, (WPARAM)hItemUnknown, 0) ? 0 : 1);
for (auto &hContact : Contacts()) {
HANDLE hItem = (HANDLE)SendDlgItemMessage(hwndDlg, IDC_CLIST, CLM_FINDCONTACT, hContact, 0);
if (hItem) {
- BYTE bChecked = (BYTE)(SendDlgItemMessage(hwndDlg, IDC_CLIST, CLM_GETCHECKMARK, (WPARAM)hItem, 0));
+ uint8_t bChecked = (uint8_t)(SendDlgItemMessage(hwndDlg, IDC_CLIST, CLM_GETCHECKMARK, (WPARAM)hItem, 0));
g_plugin.setByte(hContact, CONTACT_IGNORE_TTNOTIFY, bChecked ? 0 : 1);
}
}
diff --git a/plugins/TooltipNotify/src/TooltipNotify.h b/plugins/TooltipNotify/src/TooltipNotify.h
index 149eacc870..03e955ce6c 100644
--- a/plugins/TooltipNotify/src/TooltipNotify.h
+++ b/plugins/TooltipNotify/src/TooltipNotify.h
@@ -37,25 +37,25 @@ private:
static const char *s_szModuleNameOld;
struct SOptions {
- BYTE bFirstRun;
- BYTE bOffline;
- BYTE bOnline;
- BYTE bOther;
- BYTE bTyping;
- BYTE bIdle;
- BYTE bConjSOLN;
- BYTE bX2;
- BYTE bAutoPos;
- BYTE bBallonTip;
- BYTE bTransp;
- BYTE bTranspInput;
- BYTE bAlpha;
- BYTE bLDblClick;
- BYTE bPrefixProto;
+ uint8_t bFirstRun;
+ uint8_t bOffline;
+ uint8_t bOnline;
+ uint8_t bOther;
+ uint8_t bTyping;
+ uint8_t bIdle;
+ uint8_t bConjSOLN;
+ uint8_t bX2;
+ uint8_t bAutoPos;
+ uint8_t bBallonTip;
+ uint8_t bTransp;
+ uint8_t bTranspInput;
+ uint8_t bAlpha;
+ uint8_t bLDblClick;
+ uint8_t bPrefixProto;
WORD wDuration;
WORD wStartupDelay;
- BYTE bIgnoreNew;
- BYTE bIgnoreUnknown;
+ uint8_t bIgnoreNew;
+ uint8_t bIgnoreUnknown;
} m_sOptions;
struct STooltipData {