From cddcd7483a7c472598af098e759e5d309024f606 Mon Sep 17 00:00:00 2001 From: George Hazan Date: Sun, 26 Dec 2021 20:31:39 +0300 Subject: DWORD -> uint32_t --- plugins/Popup/src/actions.cpp | 10 +++++----- plugins/Popup/src/bitmap_funcs.cpp | 6 +++--- plugins/Popup/src/config.cpp | 6 +++--- plugins/Popup/src/config.h | 10 +++++----- plugins/Popup/src/font.cpp | 4 ++-- plugins/Popup/src/notifications.cpp | 2 +- plugins/Popup/src/notifications.h | 6 +++--- plugins/Popup/src/opt_adv.cpp | 4 ++-- plugins/Popup/src/opt_class.cpp | 4 ++-- plugins/Popup/src/opt_contacts.cpp | 4 ++-- plugins/Popup/src/opt_gen.cpp | 14 +++++++------- plugins/Popup/src/opt_skins.cpp | 14 +++++++------- plugins/Popup/src/opttree.cpp | 6 +++--- plugins/Popup/src/opttree.h | 6 +++--- plugins/Popup/src/popup_wnd2.cpp | 8 ++++---- plugins/Popup/src/popup_wnd2.h | 8 ++++---- plugins/Popup/src/services.cpp | 8 ++++---- plugins/Popup/src/skin.cpp | 4 ++-- plugins/Popup/src/skin.h | 2 +- 19 files changed, 63 insertions(+), 63 deletions(-) (limited to 'plugins/Popup/src') diff --git a/plugins/Popup/src/actions.cpp b/plugins/Popup/src/actions.cpp index 8b5d58d027..9cc7cfc61b 100644 --- a/plugins/Popup/src/actions.cpp +++ b/plugins/Popup/src/actions.cpp @@ -60,7 +60,7 @@ void RegisterAction(POPUPACTION *action) { int index; if ((index = gActions.getIndex(action)) >= 0) { - DWORD flags = gActions[index]->flags; + uint32_t flags = gActions[index]->flags; *gActions[index] = *action; gActions[index]->flags = flags; } @@ -93,10 +93,10 @@ bool IsActionEnabled(char *name) return IsActionEnabled(&action); } -DWORD MouseOverride(HWND hCombo, int number) +uint32_t MouseOverride(HWND hCombo, int number) { - DWORD dwItem = 0; - DWORD ItemActive = 0; + uint32_t dwItem = 0; + uint32_t ItemActive = 0; if (number < 0 || number > 7) number = 0; dwItem = SendMessage(hCombo, CB_ADDSTRING, 0, (LPARAM)TranslateT("No overwrite")); @@ -193,7 +193,7 @@ INT_PTR CALLBACK DlgProcPopupActions(HWND hwnd, UINT msg, WPARAM wParam, LPARAM CheckDlgButton(hwnd, IDC_RD_RIGHTICONS, PopupOptions.actions & ACT_RIGHTICONS ? BST_CHECKED : BST_UNCHECKED); { - DWORD dwActiveItem = 0; + uint32_t dwActiveItem = 0; HWND hCombo = GetDlgItem(hwnd, IDC_CB_LEFT); dwActiveItem = MouseOverride(hCombo, PopupOptions.overrideLeft); SendDlgItemMessage(hwnd, IDC_CB_LEFT, CB_SETCURSEL, dwActiveItem, 0); diff --git a/plugins/Popup/src/bitmap_funcs.cpp b/plugins/Popup/src/bitmap_funcs.cpp index 6fba66ad66..2d8af56be2 100644 --- a/plugins/Popup/src/bitmap_funcs.cpp +++ b/plugins/Popup/src/bitmap_funcs.cpp @@ -625,11 +625,11 @@ HRGN MyBitmap::buildOpaqueRgn(int level, bool opaque) for (int i = 0; i < height; i++) { int j; // we will need j after the loop! for (j = 0; j < width; j++) { - ismask = opaque ? geta(this->getRow(i)[j]) > (DWORD)level : geta(this->getRow(i)[j]) < (DWORD)level; + ismask = opaque ? geta(this->getRow(i)[j]) > (uint32_t)level : geta(this->getRow(i)[j]) < (uint32_t)level; if (wasfirst) { if (!ismask) { SetRect(&pRects[pRgnData->rdh.nCount++], first, i, j, i + 1); - if (pRgnData->rdh.nCount >= (DWORD)rectsCount) { + if (pRgnData->rdh.nCount >= (uint32_t)rectsCount) { rectsCount += addRectsCount; LPRGNDATA pRgnDataNew = (LPRGNDATA)(new uint8_t[sizeof(RGNDATAHEADER) + (rectsCount)*sizeof(RECT)]); memcpy(pRgnDataNew, pRgnData, sizeof(RGNDATAHEADER) + pRgnData->rdh.nCount * sizeof(RECT)); @@ -648,7 +648,7 @@ HRGN MyBitmap::buildOpaqueRgn(int level, bool opaque) if (wasfirst && ismask) { SetRect(&pRects[pRgnData->rdh.nCount++], first, i, j, i + 1); - if (pRgnData->rdh.nCount >= (DWORD)rectsCount) { + if (pRgnData->rdh.nCount >= (uint32_t)rectsCount) { rectsCount += addRectsCount; LPRGNDATA pRgnDataNew = (LPRGNDATA)(new uint8_t[sizeof(RGNDATAHEADER) + (rectsCount)*sizeof(RECT)]); memcpy(pRgnDataNew, pRgnData, sizeof(RGNDATAHEADER) + pRgnData->rdh.nCount * sizeof(RECT)); diff --git a/plugins/Popup/src/config.cpp b/plugins/Popup/src/config.cpp index 51223de387..5dbcca1324 100644 --- a/plugins/Popup/src/config.cpp +++ b/plugins/Popup/src/config.cpp @@ -92,13 +92,13 @@ void PopupPreview() CallService(MS_POPUP_ADDPOPUP2, (WPARAM)&ppd, APF_NO_HISTORY); if (PopupOptions.UseAnimations || PopupOptions.UseEffect) Sleep((ANIM_TIME * 2) / 3); // Pause - PUShowMessageW(TranslateT("This is a notification message"), (DWORD)SM_NOTIFY | 0x80000000); + PUShowMessageW(TranslateT("This is a notification message"), (uint32_t)SM_NOTIFY | 0x80000000); if (PopupOptions.UseAnimations || PopupOptions.UseEffect) Sleep((ANIM_TIME * 2) / 3); // Pause - PUShowMessageW(TranslateT("This is a warning message"), (DWORD)SM_WARNING | 0x80000000); + PUShowMessageW(TranslateT("This is a warning message"), (uint32_t)SM_WARNING | 0x80000000); if (PopupOptions.UseAnimations || PopupOptions.UseEffect) Sleep((ANIM_TIME * 2) / 3); // Pause - PUShowMessageW(TranslateT("This is an error message"), (DWORD)SM_ERROR | 0x80000000); + PUShowMessageW(TranslateT("This is an error message"), (uint32_t)SM_ERROR | 0x80000000); } ////////////////////////////////////////////////////////////////////////////////////////////// diff --git a/plugins/Popup/src/config.h b/plugins/Popup/src/config.h index 74b10b996c..a38ccb1bc0 100644 --- a/plugins/Popup/src/config.h +++ b/plugins/Popup/src/config.h @@ -60,7 +60,7 @@ typedef struct tagPOPUPOPTIONS { uint8_t UseWinColors; uint8_t UseMText; //==Page Actions==== - DWORD actions; + uint32_t actions; //Mouse Override int overrideLeft; int overrideRight; @@ -86,8 +86,8 @@ typedef struct tagPOPUPOPTIONS { uint8_t UseAnimations; uint8_t UseEffect; LPTSTR Effect; - DWORD FadeIn; - DWORD FadeOut; + uint32_t FadeIn; + uint32_t FadeOut; //Others uint16_t MaxPopups; } POPUPOPTIONS; @@ -162,7 +162,7 @@ extern bool OptionLoaded; #define AC_SRC_ALPHA 0x01 #endif #ifndef INVALID_FILE_ATTRIBUTES -#define INVALID_FILE_ATTRIBUTES (DWORD (-1)) +#define INVALID_FILE_ATTRIBUTES (uint32_t (-1)) #endif #define DWM_BB_ENABLE 0x00000001 @@ -170,7 +170,7 @@ extern bool OptionLoaded; #define DWM_BB_TRANSITIONONMAXIMIZED 0x00000004 struct DWM_BLURBEHIND { - DWORD dwFlags; + uint32_t dwFlags; BOOL fEnable; HRGN hRgnBlur; BOOL fTransitionOnMaximized; diff --git a/plugins/Popup/src/font.cpp b/plugins/Popup/src/font.cpp index b274615963..349dccd1e2 100644 --- a/plugins/Popup/src/font.cpp +++ b/plugins/Popup/src/font.cpp @@ -114,10 +114,10 @@ void ReloadFonts() for (auto &it : gTreeData) { if (it->typ == 2) { mir_snprintf(setting, "%s/TextCol", it->pupClass.pszName); - it->colorText = it->pupClass.colorText = (COLORREF)db_get_dw(0, PU_MODULCLASS, setting, (DWORD)fonts.clText); + it->colorText = it->pupClass.colorText = (COLORREF)db_get_dw(0, PU_MODULCLASS, setting, (uint32_t)fonts.clText); mir_snprintf(setting, "%s/BgCol", it->pupClass.pszName); - it->colorBack = it->pupClass.colorBack = (COLORREF)db_get_dw(0, PU_MODULCLASS, setting, (DWORD)fonts.clBack/*pc->colorBack*/); + it->colorBack = it->pupClass.colorBack = (COLORREF)db_get_dw(0, PU_MODULCLASS, setting, (uint32_t)fonts.clBack/*pc->colorBack*/); } } } diff --git a/plugins/Popup/src/notifications.cpp b/plugins/Popup/src/notifications.cpp index 5876781cb9..96158a2890 100644 --- a/plugins/Popup/src/notifications.cpp +++ b/plugins/Popup/src/notifications.cpp @@ -218,7 +218,7 @@ HANDLE FindTreeData(LPTSTR group, LPTSTR name, uint8_t typ) return nullptr; } -void FillNotificationData(POPUPDATA2 *ppd, DWORD *disableWhen) +void FillNotificationData(POPUPDATA2 *ppd, uint32_t *disableWhen) { if (!IsValidNotification(ppd->lchNotification)) { *disableWhen = 0; diff --git a/plugins/Popup/src/notifications.h b/plugins/Popup/src/notifications.h index 3a56992b33..b9a6baa709 100644 --- a/plugins/Popup/src/notifications.h +++ b/plugins/Popup/src/notifications.h @@ -27,7 +27,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. struct POPUPTREEDATA { int cbSize; - DWORD signature; + uint32_t signature; LPTSTR pszTreeRoot; LPTSTR pszDescription; uint8_t typ; @@ -36,7 +36,7 @@ struct POPUPTREEDATA POPUPCLASS pupClass; }; uint8_t enabled; - DWORD disableWhen; + uint32_t disableWhen; int timeoutValue; char leftAction[MAXMODULELABELLENGTH]; char rightAction[MAXMODULELABELLENGTH]; @@ -56,7 +56,7 @@ void UnloadTreeData(); void LoadNotifications(); HANDLE RegisterNotification(POPUPNOTIFICATION *notification); -void FillNotificationData(POPUPDATA2 *ppd, DWORD *disableWhen); +void FillNotificationData(POPUPDATA2 *ppd, uint32_t *disableWhen); bool PerformAction(HANDLE hNotification, HWND hwnd, UINT message, WPARAM wparal, LPARAM lparam); bool IsValidNotification(HANDLE hNotification); diff --git a/plugins/Popup/src/opt_adv.cpp b/plugins/Popup/src/opt_adv.cpp index 8b8b056d9e..8ea71bd4b8 100644 --- a/plugins/Popup/src/opt_adv.cpp +++ b/plugins/Popup/src/opt_adv.cpp @@ -206,9 +206,9 @@ INT_PTR CALLBACK DlgProcPopupAdvOpts(HWND hwnd, UINT msg, WPARAM wParam, LPARAM HWND hCtrl = GetDlgItem(hwnd, IDC_EFFECT); ComboBox_SetItemData(hCtrl, ComboBox_AddString(hCtrl, TranslateT("No effect")), -2); ComboBox_SetItemData(hCtrl, ComboBox_AddString(hCtrl, TranslateT("Fade in/out")), -1); - DWORD dwActiveItem = (DWORD)PopupOptions.UseEffect; + uint32_t dwActiveItem = (uint32_t)PopupOptions.UseEffect; for (int i = 0; i < g_lstPopupVfx.getCount(); ++i) { - DWORD dwItem = ComboBox_AddString(hCtrl, TranslateW(g_lstPopupVfx[i])); + uint32_t dwItem = ComboBox_AddString(hCtrl, TranslateW(g_lstPopupVfx[i])); ComboBox_SetItemData(hCtrl, dwItem, i); if (PopupOptions.UseEffect && !mir_wstrcmp(g_lstPopupVfx[i], PopupOptions.Effect)) dwActiveItem = dwItem; diff --git a/plugins/Popup/src/opt_class.cpp b/plugins/Popup/src/opt_class.cpp index 30376308f9..d6d28f42d8 100644 --- a/plugins/Popup/src/opt_class.cpp +++ b/plugins/Popup/src/opt_class.cpp @@ -132,8 +132,8 @@ struct { int idCtrl; int iconId; char *title; - DWORD statusFlag; - DWORD disableWhenFlag; + uint32_t statusFlag; + uint32_t disableWhenFlag; } static statusButtons[] = { { IDC_SOFFLINE, SKINICON_STATUS_OFFLINE, "Offline", PF2_IDLE, PF2_IDLE }, diff --git a/plugins/Popup/src/opt_contacts.cpp b/plugins/Popup/src/opt_contacts.cpp index 55b17d1655..b6ce031048 100644 --- a/plugins/Popup/src/opt_contacts.cpp +++ b/plugins/Popup/src/opt_contacts.cpp @@ -32,7 +32,7 @@ static void sttSetAllContactIcons(HWND hwndList) { for (auto &hContact : Contacts()) { HANDLE hItem = (HANDLE)SendMessage(hwndList, CLM_FINDCONTACT, hContact, 0); - DWORD dwMode = g_plugin.getByte(hContact, "ShowMode", 0); + uint32_t dwMode = g_plugin.getByte(hContact, "ShowMode", 0); for (int i = 0; i < 4 /*_countof(sttIcons)*/; ++i) // hIml element [0] = SKINICON_OTHER_SMALLDOT // hIml element [1..5] = IcoLib_GetIcon(....) ~ old sttIcons @@ -79,7 +79,7 @@ INT_PTR CALLBACK DlgProcContactOpts(HWND hwnd, UINT msg, WPARAM, LPARAM lParam) NMCLISTCONTROL *nm = (NMCLISTCONTROL*)lParam; if (nm->iColumn == -1) break; - DWORD hitFlags; + uint32_t hitFlags; HANDLE hItem = (HANDLE)SendDlgItemMessage(hwnd, IDC_LIST, CLM_HITTEST, (WPARAM)&hitFlags, MAKELPARAM(nm->pt.x, nm->pt.y)); if (hItem == nullptr) break; if (!(hitFlags&CLCHT_ONITEMEXTRA)) break; diff --git a/plugins/Popup/src/opt_gen.cpp b/plugins/Popup/src/opt_gen.cpp index cf034a0e71..ca491e23af 100644 --- a/plugins/Popup/src/opt_gen.cpp +++ b/plugins/Popup/src/opt_gen.cpp @@ -26,7 +26,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. INT_PTR CALLBACK PositionBoxDlgProc(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lParam); // Helper for Status Tree -static int CountStatusModes(DWORD flags) +static int CountStatusModes(uint32_t flags) { int res = 0; if (flags & PF2_ONLINE) ++res; @@ -40,7 +40,7 @@ static int CountStatusModes(DWORD flags) return res; } -int AddStatusMode(OPTTREE_OPTION *options, int pos, LPTSTR prefix, DWORD flag) +int AddStatusMode(OPTTREE_OPTION *options, int pos, LPTSTR prefix, uint32_t flag) { if (!flag) return pos; options[pos].dwFlag = flag; @@ -65,7 +65,7 @@ int AddStatusMode(OPTTREE_OPTION *options, int pos, LPTSTR prefix, DWORD flag) return pos + 1; } -int AddStatusModes(OPTTREE_OPTION *options, int pos, LPTSTR prefix, DWORD flags) +int AddStatusModes(OPTTREE_OPTION *options, int pos, LPTSTR prefix, uint32_t flags) { pos = AddStatusMode(options, pos, prefix, PF2_IDLE); pos = AddStatusMode(options, pos, prefix, flags & PF2_ONLINE); @@ -199,11 +199,11 @@ INT_PTR CALLBACK DlgProcPopupGeneral(HWND hwnd, UINT msg, WPARAM wParam, LPARAM // new status options { statusOptionsCount = 0; - DWORD globalFlags = 0; + uint32_t globalFlags = 0; auto &accs = Accounts(); for (auto &pa : accs) { if (!pa->bIsVirtual) { - DWORD protoFlags = CallProtoService(pa->szModuleName, PS_GETCAPS, PFLAGNUM_2, 0); + uint32_t protoFlags = CallProtoService(pa->szModuleName, PS_GETCAPS, PFLAGNUM_2, 0); globalFlags |= protoFlags; statusOptionsCount += CountStatusModes(protoFlags); } @@ -215,7 +215,7 @@ INT_PTR CALLBACK DlgProcPopupGeneral(HWND hwnd, UINT msg, WPARAM wParam, LPARAM int pos = AddStatusModes(statusOptions, 0, LPGENW("Global Status"), globalFlags); for (auto &pa : accs) { if (!pa->bIsVirtual) { - DWORD protoFlags = CallProtoService(pa->szModuleName, PS_GETCAPS, PFLAGNUM_2, 0); + uint32_t protoFlags = CallProtoService(pa->szModuleName, PS_GETCAPS, PFLAGNUM_2, 0); if (!CountStatusModes(protoFlags)) continue; @@ -230,7 +230,7 @@ INT_PTR CALLBACK DlgProcPopupGeneral(HWND hwnd, UINT msg, WPARAM wParam, LPARAM for (auto &pa : accs) { if (!pa->bIsVirtual) { - DWORD protoFlags = CallProtoService(pa->szModuleName, PS_GETCAPS, PFLAGNUM_2, 0); + uint32_t protoFlags = CallProtoService(pa->szModuleName, PS_GETCAPS, PFLAGNUM_2, 0); if (!CountStatusModes(protoFlags)) continue; diff --git a/plugins/Popup/src/opt_skins.cpp b/plugins/Popup/src/opt_skins.cpp index 43267d16b4..e62c48909a 100644 --- a/plugins/Popup/src/opt_skins.cpp +++ b/plugins/Popup/src/opt_skins.cpp @@ -160,7 +160,7 @@ LRESULT CALLBACK WndProcPreviewBox(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lP return mir_callNextSubclass(hwnd, WndProcPreviewBox, msg, wParam, lParam); } -int SkinOptionList_AddSkin(OPTTREE_OPTION* &options, int *OptionsCount, int pos, DWORD *dwGlobalOptions) { +int SkinOptionList_AddSkin(OPTTREE_OPTION* &options, int *OptionsCount, int pos, uint32_t *dwGlobalOptions) { const PopupSkin *skin = nullptr; if (skin = skins.getSkin(PopupOptions.SkinPack)) { for (int i = 1; i <= 10; i++) { @@ -168,7 +168,7 @@ int SkinOptionList_AddSkin(OPTTREE_OPTION* &options, int *OptionsCount, int pos continue; *OptionsCount += 1; options = (OPTTREE_OPTION*)mir_realloc(options, sizeof(OPTTREE_OPTION)*(*OptionsCount)); - options[pos].dwFlag = (DWORD)(1 << (i - 1)); + options[pos].dwFlag = (uint32_t)(1 << (i - 1)); options[pos].groupId = OPTTREE_CHECK; options[pos].iconIndex = 0; options[pos].pszSettingName = mir_wstrdup(L"Skin options"); @@ -195,7 +195,7 @@ static LPTSTR mainOption[] = { LPGENW("Use Windows colors"), LPGENW("Use advanced text render") }; -int SkinOptionList_AddMain(OPTTREE_OPTION* &options, int *OptionsCount, int pos, DWORD *dwGlobalOptions) +int SkinOptionList_AddMain(OPTTREE_OPTION* &options, int *OptionsCount, int pos, uint32_t *dwGlobalOptions) { for (int i = 0; i < _countof(mainOption); i++) { BOOL bCheck = 0; @@ -256,10 +256,10 @@ bool SkinOptionList_Update(OPTTREE_OPTION* &options, int *OptionsCount, HWND hwn *OptionsCount = 0; } // add "Global options" - DWORD dwGlobalOptions = 0; + uint32_t dwGlobalOptions = 0; int pos = SkinOptionList_AddMain(options, OptionsCount, 0, &dwGlobalOptions); // add "Skin options" - DWORD dwSkinOptions = 0; + uint32_t dwSkinOptions = 0; pos = SkinOptionList_AddSkin(options, OptionsCount, pos, &dwSkinOptions); // generate treeview int index = -1; @@ -341,7 +341,7 @@ INT_PTR CALLBACK DlgProcPopSkinsOpts(HWND hwndDlg, UINT msg, WPARAM wParam, LPAR HWND hCtrl = GetDlgItem(hwndDlg, IDC_SKINLIST); ListBox_ResetContent(hCtrl); for (const Skins::SKINLIST *sl = skins.getSkinList(); sl; sl = sl->next) { - DWORD dwIndex = ListBox_AddString(hCtrl, sl->name); + uint32_t dwIndex = ListBox_AddString(hCtrl, sl->name); ListBox_SetItemData(hCtrl, dwIndex, sl->name); } ListBox_SetCurSel(hCtrl, ListBox_FindString(hCtrl, 0, PopupOptions.SkinPack)); @@ -395,7 +395,7 @@ INT_PTR CALLBACK DlgProcPopSkinsOpts(HWND hwndDlg, UINT msg, WPARAM wParam, LPAR hCtrl = GetDlgItem(hwndDlg, IDC_SKINLIST); ListBox_ResetContent(hCtrl); for (const Skins::SKINLIST *sl = skins.getSkinList(); sl; sl = sl->next) { - DWORD dwIndex = ListBox_AddString(hCtrl, sl->name); + uint32_t dwIndex = ListBox_AddString(hCtrl, sl->name); ListBox_SetItemData(hCtrl, dwIndex, sl->name); } ListBox_SetCurSel(hCtrl, ListBox_FindString(hCtrl, 0, PopupOptions.SkinPack)); diff --git a/plugins/Popup/src/opttree.cpp b/plugins/Popup/src/opttree.cpp index a1c827d81d..21a5bf6524 100644 --- a/plugins/Popup/src/opttree.cpp +++ b/plugins/Popup/src/opttree.cpp @@ -317,10 +317,10 @@ BOOL OptTree_ProcessMessage(HWND hwnd, UINT msg, WPARAM, LPARAM lparam, int *res return FALSE; } -DWORD OptTree_GetOptions(HWND hwnd, int idcTree, OPTTREE_OPTION *options, int optionCount, LPTSTR pszSettingName) +uint32_t OptTree_GetOptions(HWND hwnd, int idcTree, OPTTREE_OPTION *options, int optionCount, LPTSTR pszSettingName) { HWND hwndTree = GetDlgItem(hwnd, idcTree); - DWORD result = 0; + uint32_t result = 0; int i; for (i = 0; i < optionCount; ++i) { if ((!options[i].pszSettingName && !pszSettingName) || @@ -337,7 +337,7 @@ DWORD OptTree_GetOptions(HWND hwnd, int idcTree, OPTTREE_OPTION *options, int op return result; } -void OptTree_SetOptions(HWND hwnd, int idcTree, OPTTREE_OPTION *options, int optionCount, DWORD dwOptions, LPTSTR pszSettingName) +void OptTree_SetOptions(HWND hwnd, int idcTree, OPTTREE_OPTION *options, int optionCount, uint32_t dwOptions, LPTSTR pszSettingName) { HWND hwndTree = GetDlgItem(hwnd, idcTree); for (int i = 0; i < optionCount; ++i) { diff --git a/plugins/Popup/src/opttree.h b/plugins/Popup/src/opttree.h index c13087b072..9d4213057a 100644 --- a/plugins/Popup/src/opttree.h +++ b/plugins/Popup/src/opttree.h @@ -30,7 +30,7 @@ typedef struct { int iconIndex; LPTSTR pszOptionName; int groupId; - DWORD dwFlag; + uint32_t dwFlag; HTREEITEM hItem; LPTSTR pszSettingName; BOOL bState; @@ -38,8 +38,8 @@ typedef struct { } OPTTREE_OPTION; BOOL OptTree_ProcessMessage(HWND hwnd, UINT msg, WPARAM wparam, LPARAM lparam, BOOL *result, int idcTree, OPTTREE_OPTION *options, int optionCount); -DWORD OptTree_GetOptions(HWND hwnd, int idcTree, OPTTREE_OPTION *options, int optionCount, LPTSTR pszSettingName = nullptr); -void OptTree_SetOptions(HWND hwnd, int idcTree, OPTTREE_OPTION *options, int optionCount, DWORD dwOptions, LPTSTR pszSettingName = nullptr); +uint32_t OptTree_GetOptions(HWND hwnd, int idcTree, OPTTREE_OPTION *options, int optionCount, LPTSTR pszSettingName = nullptr); +void OptTree_SetOptions(HWND hwnd, int idcTree, OPTTREE_OPTION *options, int optionCount, uint32_t dwOptions, LPTSTR pszSettingName = nullptr); void OptTree_Translate(HWND hwndTree); HTREEITEM OptTree_FindNamedTreeItemAt(HWND hwndTree, HTREEITEM hItem, LPCTSTR name); diff --git a/plugins/Popup/src/popup_wnd2.cpp b/plugins/Popup/src/popup_wnd2.cpp index f0c2f3ede5..b0a7d60635 100644 --- a/plugins/Popup/src/popup_wnd2.cpp +++ b/plugins/Popup/src/popup_wnd2.cpp @@ -306,8 +306,8 @@ void PopupWnd2::show() if ((m_options->UseEffect || (m_options->UseAnimations && !m_customPopup)) && m_options->FadeIn) { IPopupPlusEffect *effect = nullptr; m_bSlide = m_bFade = false; - DWORD dwTime, dwTime0 = GetTickCount(); - DWORD dwTime1 = dwTime0 + m_options->FadeIn; + uint32_t dwTime, dwTime0 = GetTickCount(); + uint32_t dwTime1 = dwTime0 + m_options->FadeIn; if (m_options->UseEffect) { m_bFade = true; m_btAlpha0 = 0; @@ -393,8 +393,8 @@ void PopupWnd2::hide() m_bDestroy = true; IPopupPlusEffect *effect = nullptr; m_bFade = m_bSlide = false; - DWORD dwTime, dwTime0 = GetTickCount(); - DWORD dwTime1 = dwTime0 + m_options->FadeOut; + uint32_t dwTime, dwTime0 = GetTickCount(); + uint32_t dwTime1 = dwTime0 + m_options->FadeOut; if (m_options->UseEffect) { m_bFade = true; m_btAlpha0 = m_options->UseTransparency ? m_options->Alpha : 255; diff --git a/plugins/Popup/src/popup_wnd2.h b/plugins/Popup/src/popup_wnd2.h index 3f4632f5d8..7f381684ac 100644 --- a/plugins/Popup/src/popup_wnd2.h +++ b/plugins/Popup/src/popup_wnd2.h @@ -45,7 +45,7 @@ public: ActionInfo() : hover(false) {} }; - DWORD m_signature; + uint32_t m_signature; private: // style @@ -97,7 +97,7 @@ private: // system POPUPOPTIONS *m_options; - DWORD m_lockCount; + uint32_t m_lockCount; PopupSkin::RenderInfo m_renderInfo; @@ -122,8 +122,8 @@ public: void hide(); void idle(); - DWORD lock() { return ++m_lockCount; } - DWORD unlock() { return m_lockCount = m_lockCount ? m_lockCount - 1 : 0; } + uint32_t lock() { return ++m_lockCount; } + uint32_t unlock() { return m_lockCount = m_lockCount ? m_lockCount - 1 : 0; } bool isLocked() { return m_lockCount != 0; } void setIcon(HICON); diff --git a/plugins/Popup/src/services.cpp b/plugins/Popup/src/services.cpp index a089a10a0c..eb8107d2fe 100644 --- a/plugins/Popup/src/services.cpp +++ b/plugins/Popup/src/services.cpp @@ -81,9 +81,9 @@ INT_PTR Popup_AddPopupW(WPARAM wParam, LPARAM lParam) } //===== Popup/AddPopup2 -static __forceinline DWORD Proto_Status2Flag_My(DWORD status) +static __forceinline uint32_t Proto_Status2Flag_My(uint32_t status) { - if (DWORD res = Proto_Status2Flag(status)) + if (uint32_t res = Proto_Status2Flag(status)) return res; return PF2_IDLE; } @@ -106,7 +106,7 @@ INT_PTR Popup_AddPopup2(WPARAM wParam, LPARAM lParam) POPUPDATA2 *ppd = &ppdFixed; memcpy(ppd, ppdIn, min(ppdIn->cbSize, sizeof(POPUPDATA2))); - DWORD disableWhen; + uint32_t disableWhen; FillNotificationData(ppd, &disableWhen); if (!(lParam & APF_NO_HISTORY)) @@ -363,7 +363,7 @@ INT_PTR Popup_RegisterPopupClass(WPARAM, LPARAM lParam) // we ignore pc->colorBack and use fonts.clBack as default (if no setting found in DB) mir_snprintf(setting, "%s/BgCol", ptd->pupClass.pszName); - ptd->pupClass.colorBack = (COLORREF)db_get_dw(0, PU_MODULCLASS, setting, (DWORD)fonts.clBack/*pc->colorBack*/); + ptd->pupClass.colorBack = (COLORREF)db_get_dw(0, PU_MODULCLASS, setting, (uint32_t)fonts.clBack/*pc->colorBack*/); ColourIDW cid = {}; mir_snwprintf(cid.group, L"%S/%s", PU_FNT_AND_COLOR, ptd->pszDescription); diff --git a/plugins/Popup/src/skin.cpp b/plugins/Popup/src/skin.cpp index 9c045ec41b..6d16d9bee3 100644 --- a/plugins/Popup/src/skin.cpp +++ b/plugins/Popup/src/skin.cpp @@ -418,7 +418,7 @@ void PopupSkin::measure(HDC hdc, PopupWnd2 *wnd, int maxw, POPUPOPTIONS *options wnd->setSize(sz); } -void PopupSkin::display(MyBitmap *bmp, PopupWnd2 *wnd, POPUPOPTIONS *options, DWORD drawFlags) const +void PopupSkin::display(MyBitmap *bmp, PopupWnd2 *wnd, POPUPOPTIONS *options, uint32_t drawFlags) const { if (!m_elements) return; @@ -1103,7 +1103,7 @@ bool Skins::load() } else { mir_wstrncpy(dir, VARSW(L"%miranda_path%\\skins\\popup"), _countof(dir)); - DWORD fa = GetFileAttributes(dir); + uint32_t fa = GetFileAttributes(dir); if ((fa == INVALID_FILE_ATTRIBUTES) || !(fa&FILE_ATTRIBUTE_DIRECTORY)) return false; } diff --git a/plugins/Popup/src/skin.h b/plugins/Popup/src/skin.h index b2c23cf37b..5b64fbfe4a 100644 --- a/plugins/Popup/src/skin.h +++ b/plugins/Popup/src/skin.h @@ -128,7 +128,7 @@ public: ~PopupSkin(); void measure(HDC hdc, PopupWnd2 *wnd, int maxw, POPUPOPTIONS *options) const; - void display(MyBitmap *bmp, PopupWnd2 *wnd, POPUPOPTIONS *options, DWORD drawFlags = DF_ALL) const; + void display(MyBitmap *bmp, PopupWnd2 *wnd, POPUPOPTIONS *options, uint32_t drawFlags = DF_ALL) const; bool onMouseMove(PopupWnd2 *wnd, int x, int y) const; bool onMouseLeave(PopupWnd2 *wnd) const; -- cgit v1.2.3