summaryrefslogtreecommitdiff
path: root/plugins/Clist_modern/src
diff options
context:
space:
mode:
authorGeorge Hazan <ghazan@miranda.im>2021-12-26 20:31:39 +0300
committerGeorge Hazan <ghazan@miranda.im>2021-12-26 20:31:39 +0300
commitcddcd7483a7c472598af098e759e5d309024f606 (patch)
treeb0a227d6e087c41958cc84d27bc323353248aae5 /plugins/Clist_modern/src
parent1039b2829a264280493ba0fa979214fe024dc70c (diff)
DWORD -> uint32_t
Diffstat (limited to 'plugins/Clist_modern/src')
-rw-r--r--plugins/Clist_modern/src/cluiframes.cpp4
-rw-r--r--plugins/Clist_modern/src/modern_aniavatars.cpp10
-rw-r--r--plugins/Clist_modern/src/modern_awaymsg.cpp6
-rw-r--r--plugins/Clist_modern/src/modern_cachefuncs.cpp10
-rw-r--r--plugins/Clist_modern/src/modern_clc.cpp8
-rw-r--r--plugins/Clist_modern/src/modern_clc.h10
-rw-r--r--plugins/Clist_modern/src/modern_clcidents.cpp2
-rw-r--r--plugins/Clist_modern/src/modern_clcitems.cpp8
-rw-r--r--plugins/Clist_modern/src/modern_clcopts.cpp32
-rw-r--r--plugins/Clist_modern/src/modern_clcpaint.cpp12
-rw-r--r--plugins/Clist_modern/src/modern_clcpaint.h14
-rw-r--r--plugins/Clist_modern/src/modern_clcutils.cpp6
-rw-r--r--plugins/Clist_modern/src/modern_clist.h2
-rw-r--r--plugins/Clist_modern/src/modern_clistevents.cpp2
-rw-r--r--plugins/Clist_modern/src/modern_clistmod.cpp8
-rw-r--r--plugins/Clist_modern/src/modern_clistopts.cpp2
-rw-r--r--plugins/Clist_modern/src/modern_clui.cpp24
-rw-r--r--plugins/Clist_modern/src/modern_commonprototypes.h18
-rw-r--r--plugins/Clist_modern/src/modern_contact.cpp4
-rw-r--r--plugins/Clist_modern/src/modern_effectenum.h6
-rw-r--r--plugins/Clist_modern/src/modern_gdiplus.cpp4
-rw-r--r--plugins/Clist_modern/src/modern_global_structure.h16
-rw-r--r--plugins/Clist_modern/src/modern_rowheight_funcs.cpp4
-rw-r--r--plugins/Clist_modern/src/modern_skinbutton.cpp22
-rw-r--r--plugins/Clist_modern/src/modern_skinengine.cpp120
-rw-r--r--plugins/Clist_modern/src/modern_skinengine.h12
-rw-r--r--plugins/Clist_modern/src/modern_skinselector.cpp20
-rw-r--r--plugins/Clist_modern/src/modern_skinselector.h14
-rw-r--r--plugins/Clist_modern/src/modern_statusbar.cpp8
-rw-r--r--plugins/Clist_modern/src/modern_statusbar.h8
-rw-r--r--plugins/Clist_modern/src/modern_statusbar_options.cpp16
-rw-r--r--plugins/Clist_modern/src/modern_toolbar.cpp2
-rw-r--r--plugins/Clist_modern/src/modern_utils.cpp2
-rw-r--r--plugins/Clist_modern/src/modern_viewmodebar.cpp40
-rw-r--r--plugins/Clist_modern/src/modern_xptheme.cpp2
35 files changed, 239 insertions, 239 deletions
diff --git a/plugins/Clist_modern/src/cluiframes.cpp b/plugins/Clist_modern/src/cluiframes.cpp
index 134299752b..f0570bc97d 100644
--- a/plugins/Clist_modern/src/cluiframes.cpp
+++ b/plugins/Clist_modern/src/cluiframes.cpp
@@ -73,7 +73,7 @@ static LIST<TMO_IntMenuItem> g_frameMenus(10);
// others
static int _nContactListHeight = 0;
-static DWORD _dwLastStoreTick = 0;
+static uint32_t _dwLastStoreTick = 0;
HWND hWndExplorerToolBar;
static int GapBetweenFrames = 1;
@@ -2302,7 +2302,7 @@ int OnFrameTitleBarBackgroundChange(WPARAM, LPARAM)
return 0;
}
-void DrawBackGround(HWND hwnd, HDC mhdc, HBITMAP hBmpBackground, COLORREF bkColour, DWORD backgroundBmpUse)
+void DrawBackGround(HWND hwnd, HDC mhdc, HBITMAP hBmpBackground, COLORREF bkColour, uint32_t backgroundBmpUse)
{
HDC hdc;
RECT clRect, *rcPaint;
diff --git a/plugins/Clist_modern/src/modern_aniavatars.cpp b/plugins/Clist_modern/src/modern_aniavatars.cpp
index 9dc29c2ed8..1b2a6220a3 100644
--- a/plugins/Clist_modern/src/modern_aniavatars.cpp
+++ b/plugins/Clist_modern/src/modern_aniavatars.cpp
@@ -60,7 +60,7 @@ struct ANIAVA_OBJECT : public MZeroedObject
MCONTACT hContact;
HWND hWindow;
BOOL bInvalidPos;
- DWORD dwAvatarUniqId;
+ uint32_t dwAvatarUniqId;
SIZE ObjectSize;
~ANIAVA_OBJECT()
@@ -72,7 +72,7 @@ struct ANIAVA_OBJECT : public MZeroedObject
struct ANIAVA_INFO
{
- DWORD dwAvatarUniqId;
+ uint32_t dwAvatarUniqId;
wchar_t *tcsFilename;
int nRefCount;
int nStripTop;
@@ -185,7 +185,7 @@ static void _AniAva_AnimationTreadProc(void*)
s_AnimationThreadHandle = hThread;
SetThreadPriority(hThread, THREAD_PRIORITY_LOWEST);
for (;;) {
- DWORD rc = MsgWaitForMultipleObjectsEx(1, &s_hExitEvent, INFINITE, QS_ALLINPUT, MWMO_ALERTABLE);
+ uint32_t rc = MsgWaitForMultipleObjectsEx(1, &s_hExitEvent, INFINITE, QS_ALLINPUT, MWMO_ALERTABLE);
if (MirandaExiting())
break;
@@ -286,7 +286,7 @@ static void _AniAva_RemoveAniAvaDC()
}
}
-static void _AniAva_RealRemoveAvatar(DWORD UniqueID)
+static void _AniAva_RealRemoveAvatar(uint32_t UniqueID)
{
for (int j = 0; j < s_AniAvatarList.getCount(); j++) {
ANIAVA_INFO *aai = s_AniAvatarList[j];
@@ -411,7 +411,7 @@ static int _AniAva_LoadAvatarFromImage(wchar_t * szFileName, int width, int heig
return paai->dwAvatarUniqId;
}
-static BOOL _AniAva_GetAvatarImageInfo(DWORD dwAvatarUniqId, ANIAVATARIMAGEINFO * avii)
+static BOOL _AniAva_GetAvatarImageInfo(uint32_t dwAvatarUniqId, ANIAVATARIMAGEINFO * avii)
{
BOOL res = FALSE;
for (auto &aai : s_AniAvatarList) {
diff --git a/plugins/Clist_modern/src/modern_awaymsg.cpp b/plugins/Clist_modern/src/modern_awaymsg.cpp
index e1c0d530e0..ad2f0f8daa 100644
--- a/plugins/Clist_modern/src/modern_awaymsg.cpp
+++ b/plugins/Clist_modern/src/modern_awaymsg.cpp
@@ -40,7 +40,7 @@ static mir_cs amCS;
static LIST<void> amItems(10, PtrKeySortT);
static HANDLE hamProcessEvent = nullptr;
-static DWORD amRequestTick = 0;
+static uint32_t amRequestTick = 0;
/*
* Add contact handle to requests queue
@@ -81,7 +81,7 @@ static void amThreadProc(void *)
while (!MirandaExiting()) {
MCONTACT hContact = amGetCurrentChain();
while (hContact) {
- DWORD time = GetTickCount();
+ uint32_t time = GetTickCount();
if ((time - amRequestTick) < AMASKPERIOD) {
SleepEx(AMASKPERIOD - (time - amRequestTick) + 10, TRUE);
if (MirandaExiting())
@@ -104,7 +104,7 @@ static void amThreadProc(void *)
amRequestTick = time;
hContact = amGetCurrentChain();
if (hContact) {
- DWORD i = 0;
+ uint32_t i = 0;
do {
i++;
SleepEx(50, TRUE);
diff --git a/plugins/Clist_modern/src/modern_cachefuncs.cpp b/plugins/Clist_modern/src/modern_cachefuncs.cpp
index d9bec8a4a0..13075c4291 100644
--- a/plugins/Clist_modern/src/modern_cachefuncs.cpp
+++ b/plugins/Clist_modern/src/modern_cachefuncs.cpp
@@ -36,7 +36,7 @@ typedef BOOL(*ExecuteOnAllContactsFuncPtr) (ClcContact *contact, BOOL subcontact
/////////////////////////////////////////////////////////////////////////////////////////
// Module static declarations
-static int CopySkipUnprintableChars(wchar_t *to, wchar_t * buf, DWORD size);
+static int CopySkipUnprintableChars(wchar_t *to, wchar_t * buf, uint32_t size);
static BOOL ExecuteOnAllContacts(ClcData *dat, ExecuteOnAllContactsFuncPtr func, void *param);
static BOOL ExecuteOnAllContactsOfGroup(ClcGroup *group, ExecuteOnAllContactsFuncPtr func, void *param);
@@ -51,7 +51,7 @@ void Cache_GetTimezone(ClcData *dat, MCONTACT hContact)
dat = (ClcData *)GetWindowLongPtr(g_clistApi.hwndContactTree, 0);
if (dat && dat->hWnd == g_clistApi.hwndContactTree) {
- DWORD flags = dat->contact_time_show_only_if_different ? TZF_DIFONLY : 0;
+ uint32_t flags = dat->contact_time_show_only_if_different ? TZF_DIFONLY : 0;
pdnce->hTimeZone = TimeZone_CreateByContact(hContact, nullptr, flags);
}
}
@@ -557,9 +557,9 @@ void RemoveTag(wchar_t *to, wchar_t *tag)
/////////////////////////////////////////////////////////////////////////////////////////
// Copy string with removing Escape chars from text and BBcodes
-static int CopySkipUnprintableChars(wchar_t *to, wchar_t * buf, DWORD size)
+static int CopySkipUnprintableChars(wchar_t *to, wchar_t * buf, uint32_t size)
{
- DWORD i;
+ uint32_t i;
BOOL keep = 0;
wchar_t * cp = to;
if (!to) return 0;
@@ -737,7 +737,7 @@ void Cache_GetAvatar(ClcData *dat, ClcContact *contact)
contact->avatar_data = nullptr;
if (contact->avatar_data != nullptr)
- contact->avatar_data->t_lastAccess = (DWORD)time(0);
+ contact->avatar_data->t_lastAccess = (uint32_t)time(0);
}
else contact->avatar_data = nullptr;
diff --git a/plugins/Clist_modern/src/modern_clc.cpp b/plugins/Clist_modern/src/modern_clc.cpp
index ce8fcf072d..1b0ce64dd7 100644
--- a/plugins/Clist_modern/src/modern_clc.cpp
+++ b/plugins/Clist_modern/src/modern_clc.cpp
@@ -715,7 +715,7 @@ static LRESULT clcOnLButtonDown(ClcData *dat, HWND hwnd, UINT, WPARAM, LPARAM lP
ClcContact *contact;
ClcGroup *group;
- DWORD hitFlags;
+ uint32_t hitFlags;
int hit = cliHitTest(hwnd, dat, (short)LOWORD(lParam), (short)HIWORD(lParam), &contact, &group, &hitFlags);
if (GetFocus() != hwnd)
SetFocus(hwnd);
@@ -886,7 +886,7 @@ static LRESULT clcOnMouseMove(ClcData *dat, HWND hwnd, UINT, WPARAM wParam, LPAR
}
if (dat->iDragItem == -1) {
- DWORD flag = 0;
+ uint32_t flag = 0;
int iOldHotTrack = dat->iHotTrack;
if (dat->hwndRenameEdit != nullptr || GetKeyState(VK_MENU) & 0x8000 || GetKeyState(VK_F10) & 0x8000)
@@ -1066,7 +1066,7 @@ static LRESULT clcOnLButtonUp(ClcData *dat, HWND hwnd, UINT msg, WPARAM wParam,
SetCursor((HCURSOR)GetClassLongPtr(hwnd, GCLP_HCURSOR));
if (dat->exStyle & CLS_EX_TRACKSELECT) {
- DWORD flags;
+ uint32_t flags;
dat->iHotTrack = cliHitTest(hwnd, dat, (short)LOWORD(lParam), (short)HIWORD(lParam), nullptr, nullptr, &flags);
if (dat->iHotTrack == -1)
ReleaseCapture();
@@ -1342,7 +1342,7 @@ static LRESULT clcOnIntmIconChanged(ClcData *dat, HWND hwnd, UINT, WPARAM wParam
int nHiddenStatus = CLVM_GetContactHiddenStatus(wParam, szProto, dat);
- DWORD style = GetWindowLongPtr(hwnd, GWL_STYLE);
+ uint32_t style = GetWindowLongPtr(hwnd, GWL_STYLE);
bool isVisiblebyFilter = (((style & CLS_SHOWHIDDEN) && nHiddenStatus != -1) || !nHiddenStatus);
bool ifVisibleByClui = !Clist_IsHiddenMode(dat, status);
bool isVisible = (g_CluiData.bFilterEffective & CLVM_FILTER_STATUS) ? true : ifVisibleByClui;
diff --git a/plugins/Clist_modern/src/modern_clc.h b/plugins/Clist_modern/src/modern_clc.h
index 7f6f9308da..1477da0af0 100644
--- a/plugins/Clist_modern/src/modern_clc.h
+++ b/plugins/Clist_modern/src/modern_clc.h
@@ -188,7 +188,7 @@ struct ClcContact : public ClcContactBase
RECT pos_label;
RECT pos_contact_time;
RECT pos_extra[EXTRA_ICON_COUNT];
- DWORD lastPaintCounter;
+ uint32_t lastPaintCounter;
uint8_t bContactRate;
// For extended layout
@@ -240,7 +240,7 @@ struct ClcData : public ClcDataBase
int subIndent;
int rightMargin, topMargin, bottomMargin;
HBITMAP hMenuBackground;
- DWORD MenuBkColor, MenuBkHiColor, MenuTextColor, MenuTextHiColor;
+ uint32_t MenuBkColor, MenuBkHiColor, MenuTextColor, MenuTextHiColor;
int MenuBmpUse;
// Row height
@@ -303,7 +303,7 @@ struct ClcData : public ClcDataBase
HWND hWnd;
uint8_t menuOwnerType;
int menuOwnerID;
- DWORD m_paintCouter; //range is enoght to 49 days if painting will occure each one millisecond
+ uint32_t m_paintCouter; //range is enoght to 49 days if painting will occure each one millisecond
uint8_t drawOverlayedStatus;
int nInsertionLevel;
@@ -348,7 +348,7 @@ LRESULT cli_ProcessExternalMessages(HWND hwnd, ClcData *dat, UINT msg, WPARAM wP
// clcutils.c
void cliRecalcScrollBar(HWND hwnd, ClcData *dat);
void cliBeginRenameSelection(HWND hwnd, ClcData *dat);
-int cliHitTest(HWND hwnd, ClcData *dat, int testx, int testy, ClcContact **contact, ClcGroup **group, DWORD *flags);
+int cliHitTest(HWND hwnd, ClcData *dat, int testx, int testy, ClcContact **contact, ClcGroup **group, uint32_t *flags);
void cliScrollTo(HWND hwnd, ClcData *dat, int desty, int noSmooth);
int GetDropTargetInformation(HWND hwnd, ClcData *dat, POINT pt);
void cli_LoadCLCOptions(HWND hwnd, ClcData *dat, BOOL bFirst);
@@ -357,7 +357,7 @@ COLORREF cliGetColor(char *module, char *color, COLORREF defColor);
// clcopts.c
int ClcOptInit(WPARAM wParam, LPARAM lParam);
-DWORD GetDefaultExStyle(void);
+uint32_t GetDefaultExStyle(void);
void GetFontSetting(int i, LOGFONT *lf, COLORREF *colour, uint8_t *effect, COLORREF *eColour1, COLORREF *eColour2);
// groups.c
diff --git a/plugins/Clist_modern/src/modern_clcidents.cpp b/plugins/Clist_modern/src/modern_clcidents.cpp
index 16839387b9..f86cb20a62 100644
--- a/plugins/Clist_modern/src/modern_clcidents.cpp
+++ b/plugins/Clist_modern/src/modern_clcidents.cpp
@@ -68,7 +68,7 @@ int cliGetRowsPriorTo(ClcGroup *group, ClcGroup *subgroup, int contactIndex)
return -1;
}
-ClcContact* cliFindItem(DWORD dwItem, ClcContact *cc)
+ClcContact* cliFindItem(uint32_t dwItem, ClcContact *cc)
{
if (corecli.pfnFindItem(dwItem, cc))
return cc;
diff --git a/plugins/Clist_modern/src/modern_clcitems.cpp b/plugins/Clist_modern/src/modern_clcitems.cpp
index cb8f919932..e3363f0452 100644
--- a/plugins/Clist_modern/src/modern_clcitems.cpp
+++ b/plugins/Clist_modern/src/modern_clcitems.cpp
@@ -148,7 +148,7 @@ static void _LoadDataToContact(ClcContact *cont, ClcCacheEntry *pdnce, ClcGroup
if (pdnce->NotOnList)
cont->flags |= CONTACTF_NOTONLIST;
- DWORD idleMode = szProto != nullptr ? pdnce->IdleTS : 0;
+ uint32_t idleMode = szProto != nullptr ? pdnce->IdleTS : 0;
if (idleMode)
cont->flags |= CONTACTF_IDLE;
@@ -198,7 +198,7 @@ bool CLCItems_IsShowOfflineGroup(ClcGroup *group)
if (!group) return false;
if (group->hideOffline) return false;
- DWORD groupFlags = 0;
+ uint32_t groupFlags = 0;
Clist_GroupGetName(group->groupId, &groupFlags);
return (groupFlags & GROUPF_SHOWOFFLINE) != 0;
}
@@ -420,7 +420,7 @@ int CLVM_GetContactHiddenStatus(MCONTACT hContact, char *szProto, ClcData *dat)
szProto = Proto_GetBaseAccountName(hContact);
// check stickies first (priority), only if we really have stickies defined (CLVM_STICKY_CONTACTS is set).
if (g_CluiData.bFilterEffective & CLVM_STICKY_CONTACTS) {
- if (DWORD dwLocalMask = db_get_dw(hContact, CLVM_MODULE, g_CluiData.current_viewmode, 0)) {
+ if (uint32_t dwLocalMask = db_get_dw(hContact, CLVM_MODULE, g_CluiData.current_viewmode, 0)) {
if (g_CluiData.bFilterEffective & CLVM_FILTER_STICKYSTATUS) {
uint16_t wStatus = db_get_w(hContact, szProto, "Status", ID_STATUS_OFFLINE);
return !((1 << (wStatus - ID_STATUS_OFFLINE)) & HIWORD(dwLocalMask)) | searchResult;
@@ -465,7 +465,7 @@ int CLVM_GetContactHiddenStatus(MCONTACT hContact, char *szProto, ClcData *dat)
if (g_CluiData.bFilterEffective & CLVM_FILTER_LASTMSG) {
if (pdnce->dwLastMsgTime != -1) {
- DWORD now = g_CluiData.t_now;
+ uint32_t now = g_CluiData.t_now;
now -= g_CluiData.lastMsgFilter;
if (g_CluiData.bFilterEffective & CLVM_FILTER_LASTMSG_OLDERTHAN)
filterResult = filterResult & (pdnce->dwLastMsgTime < now);
diff --git a/plugins/Clist_modern/src/modern_clcopts.cpp b/plugins/Clist_modern/src/modern_clcopts.cpp
index af5103c31a..441cfdf66e 100644
--- a/plugins/Clist_modern/src/modern_clcopts.cpp
+++ b/plugins/Clist_modern/src/modern_clcopts.cpp
@@ -52,7 +52,7 @@ INT_PTR CALLBACK DlgProcSBarOpts(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM l
struct
{
- DWORD dwFlags;
+ uint32_t dwFlags;
int fontID;
const wchar_t *szGroup;
const wchar_t *szDescr;
@@ -180,10 +180,10 @@ void RegisterCLUIFonts(void)
registered = true;
}
-DWORD GetDefaultExStyle(void)
+uint32_t GetDefaultExStyle(void)
{
BOOL param;
- DWORD ret = CLCDEFAULT_EXSTYLE;
+ uint32_t ret = CLCDEFAULT_EXSTYLE;
if (SystemParametersInfo(SPI_GETLISTBOXSMOOTHSCROLLING, 0, &param, FALSE) && !param)
ret |= CLS_EX_NOSMOOTHSCROLLING;
if (SystemParametersInfo(SPI_GETHOTTRACKING, 0, &param, FALSE) && !param)
@@ -219,7 +219,7 @@ void GetFontSetting(int i, LOGFONT *lf, COLORREF *colour, uint8_t *effect, COLOR
struct
{
int id;
- DWORD flag;
+ uint32_t flag;
int neg;
}
static const checkBoxToStyleEx[] =
@@ -242,7 +242,7 @@ static const checkBoxToStyleEx[] =
struct CheckBoxValues_t
{
- DWORD style;
+ uint32_t style;
wchar_t *szDescr;
}
static const greyoutValues[] = {
@@ -257,7 +257,7 @@ static const greyoutValues[] = {
{ PF2_INVISIBLE, LPGENW("Invisible") }
};
-static void FillCheckBoxTree(HWND hwndTree, const struct CheckBoxValues_t *values, int nValues, DWORD style)
+static void FillCheckBoxTree(HWND hwndTree, const struct CheckBoxValues_t *values, int nValues, uint32_t style)
{
TVINSERTSTRUCT tvis;
tvis.hParent = nullptr;
@@ -272,9 +272,9 @@ static void FillCheckBoxTree(HWND hwndTree, const struct CheckBoxValues_t *value
}
}
-static DWORD MakeCheckBoxTreeFlags(HWND hwndTree)
+static uint32_t MakeCheckBoxTreeFlags(HWND hwndTree)
{
- DWORD flags = 0;
+ uint32_t flags = 0;
TVITEM tvi;
tvi.mask = TVIF_HANDLE | TVIF_PARAM | TVIF_STATE;
tvi.hItem = TreeView_GetRoot(hwndTree);
@@ -360,7 +360,7 @@ static INT_PTR CALLBACK DlgProcClistListOpts(HWND hwndDlg, UINT msg, WPARAM wPar
TranslateDialogDefault(hwndDlg);
SetWindowLongPtr(GetDlgItem(hwndDlg, IDC_GREYOUTOPTS), GWL_STYLE, GetWindowLongPtr(GetDlgItem(hwndDlg, IDC_GREYOUTOPTS), GWL_STYLE) | TVS_NOHSCROLL | TVS_CHECKBOXES);
{
- DWORD exStyle = db_get_dw(0, "CLC", "ExStyle", GetDefaultExStyle());
+ uint32_t exStyle = db_get_dw(0, "CLC", "ExStyle", GetDefaultExStyle());
for (auto &it : checkBoxToStyleEx)
CheckDlgButton(hwndDlg, it.id, (exStyle & it.flag) ^ (it.flag * it.neg) ? BST_CHECKED : BST_UNCHECKED);
@@ -419,13 +419,13 @@ static INT_PTR CALLBACK DlgProcClistListOpts(HWND hwndDlg, UINT msg, WPARAM wPar
case 0:
switch (((LPNMHDR)lParam)->code) {
case PSN_APPLY:
- DWORD exStyle = 0;
+ uint32_t exStyle = 0;
for (auto &it : checkBoxToStyleEx)
if ((IsDlgButtonChecked(hwndDlg, it.id) == 0) == it.neg)
exStyle |= it.flag;
db_set_dw(0, "CLC", "ExStyle", exStyle);
- DWORD fullGreyoutFlags = MakeCheckBoxTreeFlags(GetDlgItem(hwndDlg, IDC_GREYOUTOPTS));
+ uint32_t fullGreyoutFlags = MakeCheckBoxTreeFlags(GetDlgItem(hwndDlg, IDC_GREYOUTOPTS));
db_set_dw(0, "CLC", "FullGreyoutFlags", fullGreyoutFlags);
if (IsDlgButtonChecked(hwndDlg, IDC_GREYOUT))
db_set_dw(0, "CLC", "GreyoutFlags", fullGreyoutFlags);
@@ -1100,7 +1100,7 @@ static INT_PTR CALLBACK DlgProcClistWindowOpts(HWND hwndDlg, UINT msg, WPARAM wP
else
db_unset(0, "ModernData", "EnableLayering");
}
- g_CluiData.dwKeyColor = db_get_dw(0, "ModernSettings", "KeyColor", (DWORD)SETTING_KEYCOLOR_DEFAULT);
+ g_CluiData.dwKeyColor = db_get_dw(0, "ModernSettings", "KeyColor", (uint32_t)SETTING_KEYCOLOR_DEFAULT);
g_plugin.setByte("OnDesktop", (uint8_t)IsDlgButtonChecked(hwndDlg, IDC_ONDESKTOP));
g_plugin.setByte("OnTop", (uint8_t)IsDlgButtonChecked(hwndDlg, IDC_ONTOP));
SetWindowPos(g_clistApi.hwndContactList, IsDlgButtonChecked(hwndDlg, IDC_ONTOP) ? HWND_TOPMOST : HWND_NOTOPMOST, 0, 0, 0, 0, SWP_NOMOVE | SWP_NOSIZE | SWP_NOACTIVATE);
@@ -1146,8 +1146,8 @@ static INT_PTR CALLBACK DlgProcClistWindowOpts(HWND hwndDlg, UINT msg, WPARAM wP
int i1 = SendDlgItemMessage(hwndDlg, IDC_FRAMESSPIN, UDM_GETPOS, 0, 0);
int i2 = SendDlgItemMessage(hwndDlg, IDC_CAPTIONSSPIN, UDM_GETPOS, 0, 0);
- db_set_dw(0, "CLUIFrames", "GapBetweenFrames", (DWORD)i1);
- db_set_dw(0, "CLUIFrames", "GapBetweenTitleBar", (DWORD)i2);
+ db_set_dw(0, "CLUIFrames", "GapBetweenFrames", (uint32_t)i1);
+ db_set_dw(0, "CLUIFrames", "GapBetweenTitleBar", (uint32_t)i2);
Sync(CLUIFramesOnClistResize, (WPARAM)g_clistApi.hwndContactList, 0);
}
g_plugin.setByte("Transparent", (uint8_t)IsDlgButtonChecked(hwndDlg, IDC_TRANSPARENT));
@@ -1432,7 +1432,7 @@ static INT_PTR BkgrCfg_Register(WPARAM wParam, LPARAM lParam)
char *szSetting = (char*)wParam;
size_t len = mir_strlen(szSetting) + 1;
- char *value = (char *)mir_alloc(len + 4); // add room for flags (DWORD)
+ char *value = (char *)mir_alloc(len + 4); // add room for flags (uint32_t)
memcpy(value, szSetting, len);
char *tok = strchr(value, '/');
if (tok == nullptr) {
@@ -1440,7 +1440,7 @@ static INT_PTR BkgrCfg_Register(WPARAM wParam, LPARAM lParam)
return 1;
}
*tok = 0;
- *(DWORD*)(value + len) = lParam;
+ *(uint32_t*)(value + len) = lParam;
bkgrList = (char **)mir_realloc(bkgrList, sizeof(char*)*(bkgrCount + 1));
bkgrList[bkgrCount] = value;
diff --git a/plugins/Clist_modern/src/modern_clcpaint.cpp b/plugins/Clist_modern/src/modern_clcpaint.cpp
index 8f5d493b88..5d67ac1873 100644
--- a/plugins/Clist_modern/src/modern_clcpaint.cpp
+++ b/plugins/Clist_modern/src/modern_clcpaint.cpp
@@ -27,7 +27,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
CLCPaint g_clcPainter;
-DWORD CLCPaint::HASH[hi_LastItem] = { 0 };
+uint32_t CLCPaint::HASH[hi_LastItem] = { 0 };
const char* CLCPaint::HASHTEXT[hi_LastItem] = {
"Module",
"ID",
@@ -231,7 +231,7 @@ void CLCPaint::GetTextSize(SIZE *text_size, HDC hdcMem, RECT free_row_rc, wchar_
}
}
-void CLCPaint::AddParam(MODERNMASK *mpModernMask, DWORD dwParamHash, const char *const szValue, DWORD dwValueHash)
+void CLCPaint::AddParam(MODERNMASK *mpModernMask, uint32_t dwParamHash, const char *const szValue, uint32_t dwValueHash)
{
static MASKPARAM param = { 0 }; //AddParameter will clear it so it can be static to avoid initializations
_FillParam(&param, dwParamHash, szValue, dwValueHash);
@@ -245,7 +245,7 @@ BOOL CLCPaint::CheckMiniMode(ClcData *dat, BOOL selected)
return TRUE;
}
-tPaintCallbackProc CLCPaint::PaintCallbackProc(HWND hWnd, HDC hDC, RECT *rcPaint, HRGN, DWORD, void *)
+tPaintCallbackProc CLCPaint::PaintCallbackProc(HWND hWnd, HDC hDC, RECT *rcPaint, HRGN, uint32_t, void *)
{
ClcData *dat = (ClcData*)GetWindowLongPtr(hWnd, 0);
if (dat)
@@ -454,7 +454,7 @@ void CLCPaint::_AddParameter(MODERNMASK *mpModernMask, MASKPARAM *lpParam)
memset(lpParam, 0, sizeof(MASKPARAM));
}
-void CLCPaint::_FillParam(MASKPARAM *lpParam, DWORD dwParamHash, const char *const szValue, DWORD dwValueHash)
+void CLCPaint::_FillParam(MASKPARAM *lpParam, uint32_t dwParamHash, const char *const szValue, uint32_t dwValueHash)
{
lpParam->bMaskParamFlag = MPF_EQUAL | MPF_HASHED;
lpParam->dwId = dwParamHash;
@@ -470,7 +470,7 @@ void CLCPaint::_FillParam(MASKPARAM *lpParam, DWORD dwParamHash, const char *con
lpParam->szValue = nullptr;
}
-void CLCPaint::_AddParamShort(MODERNMASK *mpModernMask, DWORD dwParamIndex, DWORD dwValueIndex)
+void CLCPaint::_AddParamShort(MODERNMASK *mpModernMask, uint32_t dwParamIndex, uint32_t dwValueIndex)
{
AddParam(mpModernMask, HASH[dwParamIndex], HASHTEXT[dwValueIndex], HASH[dwValueIndex]);
}
@@ -891,7 +891,7 @@ void CLCPaint::_PaintRowItemsEx(HDC hdcMem, ClcData *dat, ClcContact *Drawing, R
dy += (minheight > height) ? ((minheight - height) >> 1) : 0;
}
-void CLCPaint::_DrawStatusIcon(ClcContact *Drawing, ClcData *dat, int iImage, HDC hdcMem, int x, int y, int cx, int cy, DWORD colorbg, DWORD colorfg, int mode)
+void CLCPaint::_DrawStatusIcon(ClcContact *Drawing, ClcData *dat, int iImage, HDC hdcMem, int x, int y, int cx, int cy, uint32_t colorbg, uint32_t colorfg, int mode)
{
if (Drawing->type != CLCIT_CONTACT)
ske_ImageList_DrawEx(g_himlCListClc, LOWORD(iImage), hdcMem, x, y, cx, cy, colorbg, colorfg, mode);
diff --git a/plugins/Clist_modern/src/modern_clcpaint.h b/plugins/Clist_modern/src/modern_clcpaint.h
index 6a17e9dc73..829e42eb1a 100644
--- a/plugins/Clist_modern/src/modern_clcpaint.h
+++ b/plugins/Clist_modern/src/modern_clcpaint.h
@@ -10,13 +10,13 @@ public:
~CLCPaint() {};
CLINTERFACE void cliPaintClc(HWND hwnd, ClcData *dat, HDC hdc, RECT *rcPaint);
- CLINTERFACE tPaintCallbackProc PaintCallbackProc(HWND hWnd, HDC hDC, RECT *rcPaint, HRGN rgn, DWORD dFlags, void * CallBackData);
+ CLINTERFACE tPaintCallbackProc PaintCallbackProc(HWND hWnd, HDC hDC, RECT *rcPaint, HRGN rgn, uint32_t dFlags, void * CallBackData);
BOOL IsForegroundWindow(HWND hWnd);
HFONT ChangeToFont(HDC hdc, ClcData *dat, int id, int *fontHeight);
int GetBasicFontID(ClcContact *contact);
void GetTextSize(SIZE *text_size, HDC hdcMem, RECT free_row_rc, wchar_t *szText, SortedList *plText, UINT uTextFormat, int smiley_height);
- void AddParam(MODERNMASK *mpModernMask, DWORD dwParamHash, const char* szValue, DWORD dwValueHash);
+ void AddParam(MODERNMASK *mpModernMask, uint32_t dwParamHash, const char* szValue, uint32_t dwValueHash);
BOOL CheckMiniMode(ClcData *dat, BOOL selected);
private:
@@ -91,19 +91,19 @@ private:
hi_LastItem
} enumHASHINDEX;
static const char* HASHTEXT[hi_LastItem];
- static DWORD HASH[hi_LastItem];
+ static uint32_t HASH[hi_LastItem];
void _FillQuickHash();
void _SetHotTrackColour(HDC hdc, ClcData *dat);
RECT _GetRectangle(ClcData *dat, RECT *row_rc, RECT *free_row_rc, int *left_pos, int *right_pos, BOOL left, int real_width, int width, int height, int horizontal_space);
void _DrawTextSmiley(HDC hdcMem, RECT *free_rc, SIZE * text_size, wchar_t *szText, int start, int len, SortedList *plText, UINT uTextFormat, BOOL ResizeSizeSmiley);
void _AddParameter(MODERNMASK *mpModernMask, MASKPARAM * lpParam);
- void _AddParamShort(MODERNMASK *mpModernMask, DWORD dwParamIndex, DWORD dwValueIndex);
- void _FillParam(MASKPARAM * lpParam, DWORD dwParamHash, const char* szValue, DWORD dwValueHash);
+ void _AddParamShort(MODERNMASK *mpModernMask, uint32_t dwParamIndex, uint32_t dwValueIndex);
+ void _FillParam(MASKPARAM * lpParam, uint32_t dwParamHash, const char* szValue, uint32_t dwValueHash);
MODERNMASK* _GetCLCContactRowBackModernMask(ClcGroup *group, ClcContact *Drawing, int indent, int index, BOOL selected, BOOL hottrack, ClcData *dat);
void _RTLRect(RECT *rect, int width);
void _PaintRowItemsEx(HDC hdcMem, ClcData *dat, ClcContact *Drawing, RECT row_rc, RECT free_row_rc, int selected, int hottrack);
- void _DrawStatusIcon(ClcContact *Drawing, ClcData *dat, int iImage, HDC hdcMem, int x, int y, int cx, int cy, DWORD colorbg, DWORD colorfg, int mode);
+ void _DrawStatusIcon(ClcContact *Drawing, ClcData *dat, int iImage, HDC hdcMem, int x, int y, int cx, int cy, uint32_t colorbg, uint32_t colorfg, int mode);
BOOL _DrawNonEnginedBackground(HDC hdcMem, RECT *rcPaint, RECT clRect, ClcData *dat);
void _PaintClc(HWND hwnd, ClcData *dat, HDC hdc, RECT *rcPaint);
void _StoreItemPos(ClcContact *contact, int ItemType, RECT *rc);
@@ -161,7 +161,7 @@ private:
COLORREF tmpbkcolour;
COLORREF tmpforecolour;
- DWORD fRelease;
+ uint32_t fRelease;
_PaintContext(HDC _hdcMem = nullptr) :
hdcMem(_hdcMem), hdcMem2(nullptr),
hBmpOsb2(nullptr), oldbmp2(nullptr),
diff --git a/plugins/Clist_modern/src/modern_clcutils.cpp b/plugins/Clist_modern/src/modern_clcutils.cpp
index 5420e49143..9bbf4476c9 100644
--- a/plugins/Clist_modern/src/modern_clcutils.cpp
+++ b/plugins/Clist_modern/src/modern_clcutils.cpp
@@ -31,7 +31,7 @@ BOOL RectHitTest(RECT *rc, int testx, int testy)
return testx >= rc->left && testx < rc->right && testy >= rc->top && testy < rc->bottom;
}
-int cliHitTest(HWND hwnd, ClcData *dat, int testx, int testy, ClcContact **contact, ClcGroup **group, DWORD *flags)
+int cliHitTest(HWND hwnd, ClcData *dat, int testx, int testy, ClcContact **contact, ClcGroup **group, uint32_t *flags)
{
ClcContact *hitcontact = nullptr;
ClcGroup *hitgroup = nullptr;
@@ -114,7 +114,7 @@ int cliHitTest(HWND hwnd, ClcData *dat, int testx, int testy, ClcContact **conta
void cliScrollTo(HWND hwnd, ClcData *dat, int desty, int noSmooth)
{
- DWORD startTick, nowTick;
+ uint32_t startTick, nowTick;
int oldy = dat->yScroll;
RECT clRect, rcInvalidate;
int maxy, previousy;
@@ -320,7 +320,7 @@ int GetDropTargetInformation(HWND hwnd, ClcData *dat, POINT pt)
if (!PtInRect(&clRect, pt))
return DROPTARGET_OUTSIDE;
- DWORD hitFlags;
+ uint32_t hitFlags;
int hit = cliHitTest(hwnd, dat, pt.x, pt.y, &contact, &group, &hitFlags);
cliGetRowByIndex(dat, dat->iDragItem, &movecontact, &movegroup);
if (hit == dat->iDragItem) return DROPTARGET_ONSELF;
diff --git a/plugins/Clist_modern/src/modern_clist.h b/plugins/Clist_modern/src/modern_clist.h
index 5eeef09f96..ef0558c728 100644
--- a/plugins/Clist_modern/src/modern_clist.h
+++ b/plugins/Clist_modern/src/modern_clist.h
@@ -92,7 +92,7 @@ struct ClcCacheEntry : public ClcCacheEntryBase
CSmileyString ssThirdLine;
HANDLE hTimeZone;
- DWORD dwLastMsgTime, dwLastOnlineTime;
+ uint32_t dwLastMsgTime, dwLastOnlineTime;
int __forceinline getStatus() const
{ return (this == nullptr) ? ID_STATUS_OFFLINE : m_iStatus;
diff --git a/plugins/Clist_modern/src/modern_clistevents.cpp b/plugins/Clist_modern/src/modern_clistevents.cpp
index 889db82670..8658aa1184 100644
--- a/plugins/Clist_modern/src/modern_clistevents.cpp
+++ b/plugins/Clist_modern/src/modern_clistevents.cpp
@@ -332,7 +332,7 @@ static int EventArea_Draw(HWND hwnd, HDC hDC)
return 0;
}
-static int EventArea_PaintCallbackProc(HWND hWnd, HDC hDC, RECT *, HRGN, DWORD, void *)
+static int EventArea_PaintCallbackProc(HWND hWnd, HDC hDC, RECT *, HRGN, uint32_t, void *)
{
return EventArea_Draw(hWnd, hDC);
}
diff --git a/plugins/Clist_modern/src/modern_clistmod.cpp b/plugins/Clist_modern/src/modern_clistmod.cpp
index 8033acbdb8..76c2a80cba 100644
--- a/plugins/Clist_modern/src/modern_clistmod.cpp
+++ b/plugins/Clist_modern/src/modern_clistmod.cpp
@@ -171,11 +171,11 @@ HRESULT CluiLoadModule()
#define GWVS_PARTIALLY_COVERED 4
int GetWindowVisibleState(HWND, int, int);
-__inline DWORD GetDIBPixelColor(int X, int Y, int Width, int Height, int ByteWidth, uint8_t * ptr)
+__inline uint32_t GetDIBPixelColor(int X, int Y, int Width, int Height, int ByteWidth, uint8_t * ptr)
{
- DWORD res = 0;
+ uint32_t res = 0;
if (X >= 0 && X < Width && Y >= 0 && Y < Height && ptr)
- res = *((DWORD*)(ptr + ByteWidth*(Height - Y - 1) + X * 4));
+ res = *((uint32_t*)(ptr + ByteWidth*(Height - Y - 1) + X * 4));
return res;
}
@@ -255,7 +255,7 @@ int GetWindowVisibleState(HWND hWnd, int iStepX, int iStepY)
if (rgn)
po = PtInRegion(rgn, j, i);
else {
- DWORD a = (GetDIBPixelColor(j + dx, i + dy, maxx, maxy, wx, ptr) & 0xFF000000) >> 24;
+ uint32_t a = (GetDIBPixelColor(j + dx, i + dy, maxx, maxy, wx, ptr) & 0xFF000000) >> 24;
a = ((a*g_CluiData.bCurrentAlpha) >> 8);
po = (a > 16);
}
diff --git a/plugins/Clist_modern/src/modern_clistopts.cpp b/plugins/Clist_modern/src/modern_clistopts.cpp
index 1556ab0d4e..3beaed219f 100644
--- a/plugins/Clist_modern/src/modern_clistopts.cpp
+++ b/plugins/Clist_modern/src/modern_clistopts.cpp
@@ -380,7 +380,7 @@ static INT_PTR CALLBACK DlgProcItemAvatarOpts(HWND hwndDlg, UINT msg, WPARAM wPa
g_plugin.setByte("AvatarsInSeparateWnd", (uint8_t)IsDlgButtonChecked(hwndDlg, IDC_AVATAR_FASTDRAW));
g_plugin.setByte("AvatarsDrawBorders", (uint8_t)IsDlgButtonChecked(hwndDlg, IDC_AVATAR_DRAW_BORDER));
- g_plugin.setDword("AvatarsBorderColor", (DWORD)SendDlgItemMessage(hwndDlg, IDC_AVATAR_BORDER_COLOR, CPM_GETCOLOUR, 0, 0));
+ g_plugin.setDword("AvatarsBorderColor", (uint32_t)SendDlgItemMessage(hwndDlg, IDC_AVATAR_BORDER_COLOR, CPM_GETCOLOUR, 0, 0));
g_plugin.setByte("AvatarsRoundCorners", (uint8_t)IsDlgButtonChecked(hwndDlg, IDC_AVATAR_ROUND_CORNERS));
g_plugin.setByte("AvatarsIgnoreSizeForRow", (uint8_t)IsDlgButtonChecked(hwndDlg, IDC_AVATAR_IGNORE_SIZE));
g_plugin.setByte("AvatarsUseCustomCornerSize", (uint8_t)IsDlgButtonChecked(hwndDlg, IDC_AVATAR_CUSTOM_CORNER_SIZE_CHECK));
diff --git a/plugins/Clist_modern/src/modern_clui.cpp b/plugins/Clist_modern/src/modern_clui.cpp
index 3bf17c5d56..e837f0e89a 100644
--- a/plugins/Clist_modern/src/modern_clui.cpp
+++ b/plugins/Clist_modern/src/modern_clui.cpp
@@ -161,7 +161,7 @@ int CLUI::OnEvent_FontReload(WPARAM wParam, LPARAM lParam)
{
Clist_Broadcast(INTM_RELOADOPTIONS, wParam, lParam);
- g_CluiData.dwKeyColor = db_get_dw(0, "ModernSettings", "KeyColor", (DWORD)SETTING_KEYCOLOR_DEFAULT);
+ g_CluiData.dwKeyColor = db_get_dw(0, "ModernSettings", "KeyColor", (uint32_t)SETTING_KEYCOLOR_DEFAULT);
cliInvalidateRect(g_clistApi.hwndContactList, nullptr, 0);
return 0;
@@ -363,13 +363,13 @@ HRESULT CLUI::FillAlphaChannel(HDC hDC, RECT *prcParent)
return S_FALSE;
}
- DWORD dwRgnSize = GetRegionData(hRgn, 0, nullptr);
+ uint32_t dwRgnSize = GetRegionData(hRgn, 0, nullptr);
RGNDATA *rgnData = (RGNDATA *)malloc(dwRgnSize);
GetRegionData(hRgn, dwRgnSize, rgnData);
RECT *pRect = (RECT *)rgnData->Buffer;
- for (DWORD i = 0; i < rgnData->rdh.nCount; i++)
+ for (uint32_t i = 0; i < rgnData->rdh.nCount; i++)
ske_SetRectOpaque(hDC, &pRect[i]);
free(rgnData);
@@ -1644,11 +1644,11 @@ LRESULT CLUI::OnSizingMoving(UINT msg, WPARAM wParam, LPARAM lParam)
Sync(CLUIFrames_OnMoving, m_hWnd, &rc);
if (!IsIconic(m_hWnd)) {
if (!Clist_IsDocked()) { // if g_CluiData.fDocked, dont remember pos (except for width)
- g_plugin.setDword("Height", (DWORD)(rc.bottom - rc.top));
- g_plugin.setDword("x", (DWORD)rc.left);
- g_plugin.setDword("y", (DWORD)rc.top);
+ g_plugin.setDword("Height", (uint32_t)(rc.bottom - rc.top));
+ g_plugin.setDword("x", (uint32_t)rc.left);
+ g_plugin.setDword("y", (uint32_t)rc.top);
}
- g_plugin.setDword("Width", (DWORD)(rc.right - rc.left));
+ g_plugin.setDword("Width", (uint32_t)(rc.right - rc.left));
}
}
return TRUE;
@@ -1681,12 +1681,12 @@ LRESULT CLUI::OnSizingMoving(UINT msg, WPARAM wParam, LPARAM lParam)
// if g_CluiData.fDocked, dont remember pos (except for width)
if (!Clist_IsDocked()) {
- g_plugin.setDword("Height", (DWORD)(rc.bottom - rc.top));
- g_plugin.setDword("x", (DWORD)rc.left);
- g_plugin.setDword("y", (DWORD)rc.top);
+ g_plugin.setDword("Height", (uint32_t)(rc.bottom - rc.top));
+ g_plugin.setDword("x", (uint32_t)rc.left);
+ g_plugin.setDword("y", (uint32_t)rc.top);
}
else SetWindowRgn(m_hWnd, nullptr, 0);
- g_plugin.setDword("Width", (DWORD)(rc.right - rc.left));
+ g_plugin.setDword("Width", (uint32_t)(rc.right - rc.left));
if (!g_CluiData.fLayered) {
HRGN hRgn1;
@@ -2306,7 +2306,7 @@ LRESULT CLUI::OnListSizeChangeNotify(NMCLISTCONTROL *pnmc)
LRESULT CLUI::OnClickNotify(NMCLISTCONTROL *pnmc)
{
- DWORD hitFlags;
+ uint32_t hitFlags;
HANDLE hItem = (HANDLE)SendMessage(g_clistApi.hwndContactTree, CLM_HITTEST, (WPARAM)&hitFlags, MAKELPARAM(pnmc->pt.x, pnmc->pt.y));
if (hItem && !(hitFlags & CLCHT_NOWHERE))
return DefCluiWndProc(WM_NOTIFY, 0, (LPARAM)pnmc);
diff --git a/plugins/Clist_modern/src/modern_commonprototypes.h b/plugins/Clist_modern/src/modern_commonprototypes.h
index fd42e9fca6..e68e64ef81 100644
--- a/plugins/Clist_modern/src/modern_commonprototypes.h
+++ b/plugins/Clist_modern/src/modern_commonprototypes.h
@@ -87,7 +87,7 @@ HBITMAP GDIPlus_LoadGlyphImage(const wchar_t *szFileName);
void EventArea_ConfigureEventArea();
/* ModernSkinButton */
-int ModernSkinButton_AddButton(HWND parent, char *ID, char *CommandService, char *StateDefService, char *HandeService, int Left, int Top, int Right, int Bottom, DWORD AlignedTo, wchar_t *Hint, char *DBkey, char *TypeDef, int MinWidth, int MinHeight);
+int ModernSkinButton_AddButton(HWND parent, char *ID, char *CommandService, char *StateDefService, char *HandeService, int Left, int Top, int Right, int Bottom, uint32_t AlignedTo, wchar_t *Hint, char *DBkey, char *TypeDef, int MinWidth, int MinHeight);
int ModernSkinButtonLoadModule();
int ModernSkinButton_ReposButtons(HWND parent, uint8_t draw, RECT *r);
int ModernSkinButtonUnloadModule(WPARAM, LPARAM);
@@ -122,7 +122,7 @@ int ske_PrepareImageButDontUpdateIt(RECT *r);
int ske_ReCreateBackImage(BOOL Erase, RECT *w);
int ske_RedrawCompleteWindow();
bool ske_ResetTextEffect(HDC);
-bool ske_SelectTextEffect(HDC hdc, uint8_t EffectID, DWORD FirstColor, DWORD SecondColor);
+bool ske_SelectTextEffect(HDC hdc, uint8_t EffectID, uint32_t FirstColor, uint32_t SecondColor);
INT_PTR ske_Service_DrawGlyph(WPARAM wParam, LPARAM lParam);
BOOL ske_SetRectOpaque(HDC memdc, RECT *fr, BOOL force = FALSE);
BOOL ske_SetRgnOpaque(HDC memdc, HRGN hrgn, BOOL force = FALSE);
@@ -153,13 +153,13 @@ int SetAlpha(uint8_t Alpha);
/* others TODO: move above */
int Docking_ProcessWindowMessage(WPARAM wParam, LPARAM lParam);
-void DrawBackGround(HWND hwnd, HDC mhdc, HBITMAP hBmpBackground, COLORREF bkColour, DWORD backgroundBmpUse);
+void DrawBackGround(HWND hwnd, HDC mhdc, HBITMAP hBmpBackground, COLORREF bkColour, uint32_t backgroundBmpUse);
HRESULT BackgroundsLoadModule();
int BackgroundsUnloadModule();
char* GetParamN(char *string, char *buf, int buflen, uint8_t paramN, char Delim, BOOL SkipSpaces); //mod_skin_selector.c
wchar_t* GetParamN(wchar_t *string, wchar_t *buf, int buflen, uint8_t paramN, wchar_t Delim, BOOL SkipSpaces);
-DWORD CompareContacts2_getLMTime(MCONTACT u); //contact.c
-DWORD mod_CalcHash(const char *a); //mod_skin_selector.c
+uint32_t CompareContacts2_getLMTime(MCONTACT u); //contact.c
+uint32_t mod_CalcHash(const char *a); //mod_skin_selector.c
HICON cliGetIconFromStatusMode(MCONTACT hContact, const char *szProto, int status); //clistmod.c
HICON GetMainStatusOverlay(int STATUS); //clc.c
int CLVM_GetContactHiddenStatus(MCONTACT hContact, char *szStatus, ClcData *dat); //clcitems.c
@@ -182,7 +182,7 @@ INT_PTR SetUseGroups(WPARAM wParam, LPARAM lParam);
INT_PTR ToggleSounds(WPARAM wParam, LPARAM lParam); //contact.c
void ClcOptionsChanged(); //clc.c
void Docking_GetMonitorRectFromWindow(HWND hWnd, RECT *rc); //Docking.c
-void DrawAvatarImageWithGDIp(HDC hDestDC, int x, int y, DWORD width, DWORD height, HBITMAP hbmp, int x1, int y1, DWORD width1, DWORD height1, DWORD flag, uint8_t alpha); //gdiplus.cpp
+void DrawAvatarImageWithGDIp(HDC hDestDC, int x, int y, uint32_t width, uint32_t height, HBITMAP hbmp, int x1, int y1, uint32_t width1, uint32_t height1, uint32_t flag, uint8_t alpha); //gdiplus.cpp
void InitGdiPlus(); //gdiplus.cpp
void ShutdownGdiPlus(); //gdiplus.cpp
void UnloadAvatarOverlayIcon(); //clc.c
@@ -190,7 +190,7 @@ void UnLoadContactListModule(); /
void UpdateAllAvatars(ClcData *dat); //cache_func.c
void ApplyViewMode(const char *Name);
-void SaveViewMode(const char *name, const wchar_t *szGroupFilter, const char *szProtoFilter, DWORD statusMask, DWORD stickyStatusMask, unsigned int options, unsigned int stickies, unsigned int operators, unsigned int lmdat);
+void SaveViewMode(const char *name, const wchar_t *szGroupFilter, const char *szProtoFilter, uint32_t statusMask, uint32_t stickyStatusMask, unsigned int options, unsigned int stickies, unsigned int operators, unsigned int lmdat);
// cluiframes.c
int ExtraImage_ExtraIDToColumnNum(int extra);
@@ -232,7 +232,7 @@ CListEvent* cli_AddEvent(CLISTEVENT *cle);
LRESULT CALLBACK cli_ContactListControlWndProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam);
-ClcContact* cliFindItem(DWORD dwItem, ClcContact *contact);
+ClcContact* cliFindItem(uint32_t dwItem, ClcContact *contact);
ClcContact* cliCreateClcContact(void);
ClcCacheEntry* cliCreateCacheItem(MCONTACT hContact);
@@ -243,7 +243,7 @@ ClcCacheEntry* cliCreateCacheItem(MCONTACT hContact);
#define DWM_BB_TRANSITIONONMAXIMIZED 0x00000004
struct DWM_BLURBEHIND
{
- DWORD dwFlags;
+ uint32_t dwFlags;
BOOL fEnable;
HRGN hRgnBlur;
BOOL fTransitionOnMaximized;
diff --git a/plugins/Clist_modern/src/modern_contact.cpp b/plugins/Clist_modern/src/modern_contact.cpp
index 49c9e8cc43..deaeb3b5f0 100644
--- a/plugins/Clist_modern/src/modern_contact.cpp
+++ b/plugins/Clist_modern/src/modern_contact.cpp
@@ -56,9 +56,9 @@ static int GetStatusModeOrdering(int statusMode)
return 1000;
}
-DWORD CompareContacts2_getLMTime(MCONTACT hContact)
+uint32_t CompareContacts2_getLMTime(MCONTACT hContact)
{
- DWORD ret = g_plugin.getDword(hContact, "mf_lastmsg");
+ uint32_t ret = g_plugin.getDword(hContact, "mf_lastmsg");
if (ret != 0)
return ret;
diff --git a/plugins/Clist_modern/src/modern_effectenum.h b/plugins/Clist_modern/src/modern_effectenum.h
index e6fe8bb64c..a4664bf98a 100644
--- a/plugins/Clist_modern/src/modern_effectenum.h
+++ b/plugins/Clist_modern/src/modern_effectenum.h
@@ -15,8 +15,8 @@ typedef struct _MODERNEFFECT
{
uint8_t EffectID;
MODERNEFFECTMATRIX EffectMatrix;
- DWORD EffectColor1;
- DWORD EffectColor2;
+ uint32_t EffectColor1;
+ uint32_t EffectColor2;
}MODERNEFFECT;
#ifdef _EFFECTENUM_FULL_H
@@ -90,4 +90,4 @@ MODERNEFFECTMATRIX ModernEffectsEnum[] = {
extern wchar_t * ModernEffectNames[];
#endif
extern BOOL SkinEngine_ResetTextEffect(HDC);
-extern BOOL SkinEngine_SelectTextEffect(HDC hdc, uint8_t EffectID, DWORD FirstColor, DWORD SecondColor); \ No newline at end of file
+extern BOOL SkinEngine_SelectTextEffect(HDC hdc, uint8_t EffectID, uint32_t FirstColor, uint32_t SecondColor); \ No newline at end of file
diff --git a/plugins/Clist_modern/src/modern_gdiplus.cpp b/plugins/Clist_modern/src/modern_gdiplus.cpp
index 7a11b64b70..a842c23262 100644
--- a/plugins/Clist_modern/src/modern_gdiplus.cpp
+++ b/plugins/Clist_modern/src/modern_gdiplus.cpp
@@ -43,7 +43,7 @@ static ColorMatrix ClrMatrix =
0.0f, 0.0f, 0.0f, 0.0f, 1.0f
};
-DWORD argb_from_cola(COLORREF col, uint8_t alpha)
+uint32_t argb_from_cola(COLORREF col, uint8_t alpha)
{
return((uint8_t)(alpha) << 24 | col);
}
@@ -63,7 +63,7 @@ HBITMAP GDIPlus_LoadGlyphImage(const wchar_t *tszFileName)
return hbmp;
}
-void DrawAvatarImageWithGDIp(HDC hDestDC, int x, int y, DWORD width, DWORD height, HBITMAP hbmp, int x1, int y1, DWORD width1, DWORD height1, DWORD flag, uint8_t alpha)
+void DrawAvatarImageWithGDIp(HDC hDestDC, int x, int y, uint32_t width, uint32_t height, HBITMAP hbmp, int x1, int y1, uint32_t width1, uint32_t height1, uint32_t flag, uint8_t alpha)
{
BITMAP bmp;
Bitmap *bm;
diff --git a/plugins/Clist_modern/src/modern_global_structure.h b/plugins/Clist_modern/src/modern_global_structure.h
index cdb8ed6940..a522dc2165 100644
--- a/plugins/Clist_modern/src/modern_global_structure.h
+++ b/plugins/Clist_modern/src/modern_global_structure.h
@@ -13,7 +13,7 @@ struct CLUIDATA
HMENU hMenuNotify;
uint16_t wNextMenuID;
int iIconNotify;
- DWORD dwFlags;
+ uint32_t dwFlags;
int hIconNotify;
MCONTACT hUpdateContact;
@@ -21,15 +21,15 @@ struct CLUIDATA
wchar_t groupFilter[2048];
char protoFilter[2048];
char varFilter[2048];
- DWORD lastMsgFilter;
+ uint32_t lastMsgFilter;
char current_viewmode[256], old_viewmode[256];
uint8_t boldHideOffline;
uint8_t bOldUseGroups;
- DWORD statusMaskFilter;
- DWORD stickyMaskFilter;
- DWORD filterFlags;
- DWORD bFilterEffective;
- DWORD t_now;
+ uint32_t statusMaskFilter;
+ uint32_t stickyMaskFilter;
+ uint32_t filterFlags;
+ uint32_t bFilterEffective;
+ uint32_t t_now;
// Modern Global Variables
int fDocked;
@@ -55,7 +55,7 @@ struct CLUIDATA
signed char nBehindEdgeState;
- DWORD dwKeyColor;
+ uint32_t dwKeyColor;
HWND hwndEventFrame;
diff --git a/plugins/Clist_modern/src/modern_rowheight_funcs.cpp b/plugins/Clist_modern/src/modern_rowheight_funcs.cpp
index b9d1380540..231087e2a8 100644
--- a/plugins/Clist_modern/src/modern_rowheight_funcs.cpp
+++ b/plugins/Clist_modern/src/modern_rowheight_funcs.cpp
@@ -331,7 +331,7 @@ static int other_fonts[] = { FONTID_OPENGROUPS, FONTID_OPENGROUPCOUNTS, FONTID_C
int RowHeights_GetMaxRowHeight(ClcData *dat, HWND hwnd)
{
int max_height = 0;
- DWORD style = GetWindowLongPtr(hwnd, GWL_STYLE);
+ uint32_t style = GetWindowLongPtr(hwnd, GWL_STYLE);
if (!dat->text_ignore_size_for_row_height) {
// Get contact font size
@@ -459,7 +459,7 @@ int RowHeights_GetRowHeight(ClcData *dat, HWND hwnd, ClcContact *contact, int it
if (!dat->row_variable_height)
return dat->rowHeight;
- DWORD style = GetWindowLongPtr(hwnd, GWL_STYLE);
+ uint32_t style = GetWindowLongPtr(hwnd, GWL_STYLE);
//TODO replace futher code with new rowheight definition
BOOL selected = ((item == dat->selection) && (dat->hwndRenameEdit != nullptr || dat->bShowSelAlways || (dat->exStyle & CLS_EX_SHOWSELALWAYS) || g_clcPainter.IsForegroundWindow(hwnd)) && contact->type != CLCIT_DIVIDER);
BOOL minimalistic = (g_clcPainter.CheckMiniMode(dat, selected));
diff --git a/plugins/Clist_modern/src/modern_skinbutton.cpp b/plugins/Clist_modern/src/modern_skinbutton.cpp
index a29abd19cc..efd1bd472e 100644
--- a/plugins/Clist_modern/src/modern_skinbutton.cpp
+++ b/plugins/Clist_modern/src/modern_skinbutton.cpp
@@ -57,7 +57,7 @@ typedef struct _ModernSkinButtonCtrl
typedef struct _HandleServiceParams
{
HWND hwnd;
- DWORD msg;
+ uint32_t msg;
WPARAM wParam;
LPARAM lParam;
BOOL handled;
@@ -115,12 +115,12 @@ static int ModernSkinButtonPaintWorker(HWND hwnd, HDC whdc)
if (bct->ValueDBSection && bct->ValueTypeDef) {
char * key;
char * section;
- DWORD defval = 0;
+ uint32_t defval = 0;
char buf[20];
key = mir_strdup(bct->ValueDBSection);
section = key;
if (bct->ValueTypeDef[0] != 's')
- defval = (DWORD)atol(bct->ValueTypeDef + 1);
+ defval = (uint32_t)atol(bct->ValueTypeDef + 1);
do {
if (key[0] == '/') { key[0] = '\0'; key++; break; }
key++;
@@ -206,8 +206,8 @@ static int ModernSkinButtonToggleDBValue(char * ValueDBSection, char *ValueTypeD
} while (val2[0] != '\0');
if (ValueTypeDef[0] != 's') {
- l1 = (DWORD)atol(val);
- l2 = (DWORD)atol(val2);
+ l1 = (uint32_t)atol(val);
+ l2 = (uint32_t)atol(val2);
}
switch (ValueTypeDef[0]) {
@@ -224,7 +224,7 @@ static int ModernSkinButtonToggleDBValue(char * ValueDBSection, char *ValueTypeD
case 'd':
curval = db_get_dw(0, section, key, l2);
curval = (curval == l2) ? l1 : l2;
- db_set_dw(0, section, key, (DWORD)curval);
+ db_set_dw(0, section, key, (uint32_t)curval);
break;
case 'w':
@@ -497,7 +497,7 @@ typedef struct _MButton
} MButton;
MButton * Buttons = nullptr;
-DWORD ButtonsCount = 0;
+uint32_t ButtonsCount = 0;
#define _center_h( rc ) (((rc)->right + (rc)->left ) >> 1)
#define _center_v( rc ) (((rc)->bottom + (rc)->top ) >> 1)
@@ -511,7 +511,7 @@ int ModernSkinButton_AddButton(HWND parent,
int Top,
int Right,
int Bottom,
- DWORD sbFlags,
+ uint32_t sbFlags,
wchar_t * Hint,
char * DBkey,
char * TypeDef,
@@ -577,7 +577,7 @@ int ModernSkinButton_AddButton(HWND parent,
static int ModernSkinButtonErase(int l, int t, int r, int b)
{
- DWORD i;
+ uint32_t i;
if (!ModernSkinButtonModuleIsLoaded) return 0;
if (!g_CluiData.fLayered) return 0;
if (!g_pCachedWindow) return 0;
@@ -618,7 +618,7 @@ int ModernSkinButtonRedrawAll()
{
if (!ModernSkinButtonModuleIsLoaded) return 0;
g_mutex_bLockUpdating++;
- for (DWORD i = 0; i < ButtonsCount; i++) {
+ for (uint32_t i = 0; i < ButtonsCount; i++) {
if (g_clistApi.hwndContactList && Buttons[i].hwnd == nullptr)
Buttons[i].hwnd = ModernSkinButtonCreateWindow(Buttons[i].bct, g_clistApi.hwndContactList);
ModernSkinButtonPaintWorker(Buttons[i].hwnd, nullptr);
@@ -667,7 +667,7 @@ int ModernSkinButton_ReposButtons(HWND parent, uint8_t draw, RECT *pRect)
OffsetRect(&rc, -rc.left, -rc.top);
rc.right = rc.left + (clr.right - clr.left);
rc.bottom = rc.top + (clr.bottom - clr.top);
- for (DWORD i = 0; i < ButtonsCount; i++) {
+ for (uint32_t i = 0; i < ButtonsCount; i++) {
int sbFlags = Buttons[i].ConstrainPositionFrom;
if (parent && Buttons[i].hwnd == nullptr) {
Buttons[i].hwnd = ModernSkinButtonCreateWindow(Buttons[i].bct, parent);
diff --git a/plugins/Clist_modern/src/modern_skinengine.cpp b/plugins/Clist_modern/src/modern_skinengine.cpp
index eb1f1e1ac5..20a5560471 100644
--- a/plugins/Clist_modern/src/modern_skinengine.cpp
+++ b/plugins/Clist_modern/src/modern_skinengine.cpp
@@ -74,8 +74,8 @@ SortedList *gl_plSkinFonts = nullptr;
static HANDLE hSkinLoadedEvent;
static GLYPHIMAGE *pLoadedImages = nullptr;
-static DWORD dwLoadedImagesCount = 0;
-static DWORD dwLoadedImagesAlocated = 0;
+static uint32_t dwLoadedImagesCount = 0;
+static uint32_t dwLoadedImagesAlocated = 0;
static BOOL flag_bUpdateQueued = FALSE;
static BOOL flag_bJustDrawNonFramedObjects = FALSE;
@@ -99,7 +99,7 @@ static BOOL ske_GetMaskBit(uint8_t *line, int x);
static INT_PTR ske_Service_AlphaTextOut(WPARAM wParam, LPARAM lParam);
static INT_PTR ske_Service_DrawIconEx(WPARAM wParam, LPARAM lParam);
-static int ske_AlphaTextOut(HDC hDC, LPCTSTR lpString, int nCount, RECT *lpRect, UINT format, DWORD ARGBcolor);
+static int ske_AlphaTextOut(HDC hDC, LPCTSTR lpString, int nCount, RECT *lpRect, UINT format, uint32_t ARGBcolor);
static void ske_AddParseTextGlyphObject(char * szGlyphTextID, char * szDefineString, SKINOBJECTSLIST *Skin);
static void ske_AddParseSkinFont(char * szFontID, char * szDefineString);
static int ske_GetSkinFromDB(char * szSection, SKINOBJECTSLIST * Skin);
@@ -191,7 +191,7 @@ HRESULT IniParser::WriteStrToDb(const char * szSection, const char * szName, con
break;
case 'd':
- db_set_dw(0, szSection, szName, (DWORD)atoi(szValue + 1));
+ db_set_dw(0, szSection, szName, (uint32_t)atoi(szValue + 1));
break;
case 's':
@@ -341,7 +341,7 @@ BOOL IniParser::_DoParseLine(char *szLine)
if (*ebuf == '\0')
return FALSE; // no close bracket
- DWORD sectionLen = ebuf - tbuf + 1;
+ uint32_t sectionLen = ebuf - tbuf + 1;
_szSection = (char*)mir_alloc(sectionLen + 1);
mir_strncpy(_szSection, tbuf, sectionLen);
_szSection[sectionLen] = '\0';
@@ -467,7 +467,7 @@ struct DCBUFFER
HDC hDC;
HBITMAP oldBitmap;
HBITMAP hBitmap;
- DWORD dwDestroyAfterTime;
+ uint32_t dwDestroyAfterTime;
};
static int SortBufferList(const DCBUFFER *buf1, const DCBUFFER *buf2)
@@ -518,7 +518,7 @@ HDC ske_RequestBufferDC(HDC hdcOwner, int dcID, int width, int height, BOOL fCle
pBuf->oldBitmap = (HBITMAP)SelectObject(pBuf->hDC, pBuf->hBitmap);
}
else if (fClear)
- memset(pBuf->pImage, 0, width*height*sizeof(DWORD));
+ memset(pBuf->pImage, 0, width*height*sizeof(uint32_t));
}
pBuf->dwDestroyAfterTime = 0;
return pBuf->hDC;
@@ -526,7 +526,7 @@ HDC ske_RequestBufferDC(HDC hdcOwner, int dcID, int width, int height, BOOL fCle
int ske_ReleaseBufferDC(HDC hDC, int keepTime)
{
- DWORD dwCurrentTime = GetTickCount();
+ uint32_t dwCurrentTime = GetTickCount();
// Try to find DC in buffer list - set flag to be release after time;
mir_cslock lck(BufferListCS);
@@ -551,11 +551,11 @@ int ske_ReleaseBufferDC(HDC hDC, int keepTime)
BOOL ske_SetRgnOpaque(HDC memdc, HRGN hrgn, BOOL force)
{
if (g_CluiData.fDisableSkinEngine && !force) return TRUE;
- DWORD rgnsz = GetRegionData(hrgn, 0, nullptr);
+ uint32_t rgnsz = GetRegionData(hrgn, 0, nullptr);
RGNDATA *rdata = (RGNDATA *)mir_alloc(rgnsz);
GetRegionData(hrgn, rgnsz, rdata);
RECT *rect = (RECT *)rdata->Buffer;
- for (DWORD d = 0; d < rdata->rdh.nCount; d++) {
+ for (uint32_t d = 0; d < rdata->rdh.nCount; d++) {
ske_SetRectOpaque(memdc, &rect[d], force);
}
mir_free(rdata);
@@ -1320,7 +1320,7 @@ int ske_AddDescriptorToSkinObjectList(SKINOBJECTDESCRIPTOR *lpDescr, SKINOBJECTS
if (!mir_strcmpi(lpDescr->szObjectID, "_HEADER_"))
return 0;
//check if new object allready presents.
- for (DWORD i = 0; i < sk->dwObjLPAlocated; i++)
+ for (uint32_t i = 0; i < sk->dwObjLPAlocated; i++)
if (!mir_strcmp(sk->pObjects[i].szObjectID, lpDescr->szObjectID))
return 0;
// Realocated list to add space for new object
@@ -1373,7 +1373,7 @@ static SKINOBJECTDESCRIPTOR* ske_FindObjectByMask(MODERNMASK *pModernMask, SKINO
SKINOBJECTDESCRIPTOR* ske_FindObjectByName(const char *szName, uint8_t objType, SKINOBJECTSLIST *Skin)
{
SKINOBJECTSLIST *sk = (Skin == nullptr) ? (&g_SkinObjectList) : Skin;
- for (DWORD i = 0; i < sk->dwObjLPAlocated; i++) {
+ for (uint32_t i = 0; i < sk->dwObjLPAlocated; i++) {
if (sk->pObjects[i].bType == objType || objType == OT_ANY) {
if (!mir_strcmp(sk->pObjects[i].szObjectID, szName))
return &(sk->pObjects[i]);
@@ -1427,7 +1427,7 @@ void ske_PreMultiplyChannels(HBITMAP hbmp, uint8_t Mult)
BITMAP bmp;
BOOL flag = FALSE;
uint8_t *pBitmapBits;
- DWORD Len;
+ uint32_t Len;
int bh, bw, y, x;
GetObject(hbmp, sizeof(BITMAP), (LPSTR)&bmp);
@@ -1492,13 +1492,13 @@ This function is required to load TGA to dib buffer myself
Major part of routines is from http://tfcduke.developpez.com/tutoriel/format/tga/fichiers/tga.c
*/
-static BOOL ske_ReadTGAImageData(void *From, DWORD fromSize, uint8_t *destBuf, DWORD bufSize, BOOL RLE)
+static BOOL ske_ReadTGAImageData(void *From, uint32_t fromSize, uint8_t *destBuf, uint32_t bufSize, BOOL RLE)
{
uint8_t *pos = destBuf;
uint8_t *from = fromSize ? (uint8_t *)From : nullptr;
FILE *fp = !fromSize ? (FILE *)From : nullptr;
- DWORD destCount = 0;
- DWORD fromCount = 0;
+ uint32_t destCount = 0;
+ uint32_t fromCount = 0;
if (!RLE) {
while (((from && fromCount < fromSize) || (fp && fromCount < bufSize))
&& (destCount < bufSize)) {
@@ -1529,7 +1529,7 @@ static BOOL ske_ReadTGAImageData(void *From, DWORD fromSize, uint8_t *destBuf, D
if (packet_header & 0x80) {
/* run-length packet */
if (from) {
- *((DWORD*)rgba) = *((DWORD*)(from + fromCount));
+ *((uint32_t*)rgba) = *((uint32_t*)(from + fromCount));
fromCount += 4;
}
else fread(rgba, sizeof(uint8_t), 4, fp);
@@ -1589,7 +1589,7 @@ static HBITMAP ske_LoadGlyphImage_TGA(const wchar_t *szFilename)
if (!hRSrc) return nullptr;
HGLOBAL hRes = LoadResource(g_plugin.getInst(), hRSrc);
if (!hRes) return nullptr;
- DWORD size = SizeofResource(g_plugin.getInst(), hRSrc);
+ uint32_t size = SizeofResource(g_plugin.getInst(), hRSrc);
uint8_t *mem = (uint8_t*)LockResource(hRes);
if (size > sizeof(header)) {
tga_header_t *tgahdr = (tga_header_t*)mem;
@@ -1675,7 +1675,7 @@ HBITMAP ske_LoadGlyphImage(const wchar_t *tszFileName)
mir_cslock lck(cs_SkinChanging);
if (pLoadedImages) {
- for (DWORD i = 0; i < dwLoadedImagesCount; i++) {
+ for (uint32_t i = 0; i < dwLoadedImagesCount; i++) {
if (!mir_wstrcmpi(pLoadedImages[i].szFileName, szFile)) {
pLoadedImages[i].dwLoadedTimes++;
return pLoadedImages[i].hGlyph;
@@ -1705,7 +1705,7 @@ HBITMAP ske_LoadGlyphImage(const wchar_t *tszFileName)
int ske_UnloadGlyphImage(HBITMAP hbmp)
{
- for (DWORD i = 0; i < dwLoadedImagesCount && pLoadedImages; i++) {
+ for (uint32_t i = 0; i < dwLoadedImagesCount && pLoadedImages; i++) {
if (hbmp != pLoadedImages[i].hGlyph)
continue;
@@ -1752,7 +1752,7 @@ int ske_UnloadSkin(SKINOBJECTSLIST *Skin)
if (Skin->dwObjLPAlocated == 0)
return 0;
- for (DWORD i = 0; i < Skin->dwObjLPAlocated; i++) {
+ for (uint32_t i = 0; i < Skin->dwObjLPAlocated; i++) {
switch (Skin->pObjects[i].bType) {
case OT_GLYPHOBJECT:
GLYPHOBJECT *dt = (GLYPHOBJECT*)Skin->pObjects[i].Data;
@@ -1798,7 +1798,7 @@ static void RegisterMaskByParce(const char *szSetting, char *szValue, SKINOBJECT
if (i < val_len) {
char *Obj, *Mask;
int res;
- DWORD ID = atoi(szSetting + 1);
+ uint32_t ID = atoi(szSetting + 1);
Mask = szValue + i + 1;
Obj = (char*)mir_alloc(i + 2);
mir_strncpy(Obj, szValue, i + 1);
@@ -1841,7 +1841,7 @@ static int ske_SortTextGlyphObjectFunc(void *first, void *second)
static void ske_LinkSkinObjects(SKINOBJECTSLIST *pObjectList)
{
// LINK Mask with objects
- for (DWORD i = 0; i < pObjectList->pMaskList->dwMaskCnt; i++) {
+ for (uint32_t i = 0; i < pObjectList->pMaskList->dwMaskCnt; i++) {
MODERNMASK *mm = &(pObjectList->pMaskList->pl_Masks[i]);
void *pObject = (void *)ske_FindObjectByName(mm->szObjectName, OT_ANY, (SKINOBJECTSLIST *)pObjectList);
replaceStr(mm->szObjectName, nullptr);
@@ -1932,7 +1932,7 @@ static int ske_GetSkinFromDB(char *, SKINOBJECTSLIST *Skin)
void ske_LoadSkinFromDB(void)
{
ske_GetSkinFromDB(SKIN, &g_SkinObjectList);
- g_CluiData.dwKeyColor = db_get_dw(0, "ModernSettings", "KeyColor", (DWORD)SETTING_KEYCOLOR_DEFAULT);
+ g_CluiData.dwKeyColor = db_get_dw(0, "ModernSettings", "KeyColor", (uint32_t)SETTING_KEYCOLOR_DEFAULT);
}
static int ske_LoadSkinFromResource(BOOL bOnlyObjects)
@@ -2010,7 +2010,7 @@ bool ske_ResetTextEffect(HDC hdc)
return true;
}
-bool ske_SelectTextEffect(HDC hdc, uint8_t EffectID, DWORD FirstColor, DWORD SecondColor)
+bool ske_SelectTextEffect(HDC hdc, uint8_t EffectID, uint32_t FirstColor, uint32_t SecondColor)
{
if (EffectID > MAXPREDEFINEDEFFECTS)
return false;
@@ -2047,7 +2047,7 @@ static bool ske_GetTextEffect(HDC hdc, MODERNEFFECT *modernEffect)
return true;
}
-static bool ske_DrawTextEffect(uint8_t *destPt, uint8_t *maskPt, DWORD width, DWORD height, MODERNEFFECT *effect)
+static bool ske_DrawTextEffect(uint8_t *destPt, uint8_t *maskPt, uint32_t width, uint32_t height, MODERNEFFECT *effect)
{
sbyte *buf;
sbyte *outbuf;
@@ -2056,7 +2056,7 @@ static bool ske_DrawTextEffect(uint8_t *destPt, uint8_t *maskPt, DWORD width, DW
uint8_t *maskline, *destline;
uint8_t al, rl, gl, bl, ad, rd, gd, bd;
int k = 0;
- DWORD x, y;
+ uint32_t x, y;
sbyte *matrix;
uint8_t mcTopStart;
uint8_t mcBottomEnd;
@@ -2093,7 +2093,7 @@ static bool ske_DrawTextEffect(uint8_t *destPt, uint8_t *maskPt, DWORD width, DW
bufline = buf + y*width;
maskline = maskPt + ((y*width) << 2);
for (x = 0; x < width; x++) {
- uint8_t a = (sbyte)(DWORD)((maskline[0] + maskline[2] + maskline[1] + maskline[1]) >> 4);
+ uint8_t a = (sbyte)(uint32_t)((maskline[0] + maskline[2] + maskline[1] + maskline[1]) >> 4);
*bufline = a;
if (a != 0) {
minX = min((int)x, minX);
@@ -2114,23 +2114,23 @@ static bool ske_DrawTextEffect(uint8_t *destPt, uint8_t *maskPt, DWORD width, DW
outbuf = (sbyte*)mir_alloc(width*height*sizeof(sbyte));
memset(outbuf, 0, width*height*sizeof(sbyte));
- for (y = (DWORD)minY; y < (DWORD)maxY; y++) {
+ for (y = (uint32_t)minY; y < (uint32_t)maxY; y++) {
int val;
bufline = outbuf + y*width + minX;
buflineMid = buf + y*width + minX;
- for (x = (DWORD)minX; x < (DWORD)maxX; x++) {
+ for (x = (uint32_t)minX; x < (uint32_t)maxX; x++) {
int matrixHor, matrixVer;
val = 0;
for (matrixVer = mcTopStart; matrixVer < mcBottomEnd; matrixVer++) {
int buflineStep = width*(matrixVer - 2);
int as = y + matrixVer - 2;
sbyte *buflineTopS = nullptr;
- if (as >= 0 && (DWORD)as < height) buflineTopS = buflineMid + buflineStep;
+ if (as >= 0 && (uint32_t)as < height) buflineTopS = buflineMid + buflineStep;
for (matrixHor = mcLeftStart; matrixHor < mcRightEnd; matrixHor++) {
buflineTop = buflineTopS;
int a = x + matrixHor - 2;
- if (buflineTop && a >= 0 && (DWORD)a < width) buflineTop += matrixHor - 2;
+ if (buflineTop && a >= 0 && (uint32_t)a < width) buflineTop += matrixHor - 2;
else buflineTop = nullptr;
if (buflineTop)
val += ((*buflineTop)*matrix[matrixVer * 5 + matrixHor]);
@@ -2180,7 +2180,7 @@ static bool ske_DrawTextEffect(uint8_t *destPt, uint8_t *maskPt, DWORD width, DW
return false;
}
-static int ske_AlphaTextOut(HDC hDC, LPCTSTR lpString, int nCount, RECT *lpRect, UINT format, DWORD ARGBcolor)
+static int ske_AlphaTextOut(HDC hDC, LPCTSTR lpString, int nCount, RECT *lpRect, UINT format, uint32_t ARGBcolor)
{
if (!(lpString && lpRect))
return 0;
@@ -2333,8 +2333,8 @@ static int ske_AlphaTextOut(HDC hDC, LPCTSTR lpString, int nCount, RECT *lpRect,
drawRect.right = textSize.cx;
drawRect.bottom = textSize.cy;
- DWORD width = textSize.cx;
- DWORD heigh = textSize.cy;
+ uint32_t width = textSize.cx;
+ uint32_t heigh = textSize.cy;
uint8_t *pDestScanLine, *pBufScanLine, *pix, *bufpix;
@@ -2343,13 +2343,13 @@ static int ske_AlphaTextOut(HDC hDC, LPCTSTR lpString, int nCount, RECT *lpRect,
uint8_t g = GetGValue(ARGBcolor);
uint8_t b = GetBValue(ARGBcolor);
- for (DWORD y = 2; y < heigh - 2; y++) {
+ for (uint32_t y = 2; y < heigh - 2; y++) {
int lineBytes = y * (width << 2);
pDestScanLine = bits + lineBytes;
pBufScanLine = bufbits + lineBytes;
- for (DWORD x = 2; x < width - 2; x++) {
+ for (uint32_t x = 2; x < width - 2; x++) {
pix = pDestScanLine + (x << 2);
bufpix = pBufScanLine + (x << 2);
@@ -2364,7 +2364,7 @@ static int ske_AlphaTextOut(HDC hDC, LPCTSTR lpString, int nCount, RECT *lpRect,
rx *= al / 255;
}
- uint8_t ax = (uint8_t)(((DWORD)rx * 77 + (DWORD)gx * 151 + (DWORD)bx * 28 + 128) / 256);
+ uint8_t ax = (uint8_t)(((uint32_t)rx * 77 + (uint32_t)gx * 151 + (uint32_t)bx * 28 + 128) / 256);
if (ax) {
//Normalize components to gray
uint8_t axx = 255 - ((r + g + b) >> 2); // Coefficient of grayance, more white font - more gray edges
@@ -2420,10 +2420,10 @@ static int ske_DrawTextWithEffectWorker(HDC hdc, LPCTSTR lpString, int nCount, R
if (format & DT_RTLREADING)
SetTextAlign(hdc, TA_RTLREADING);
- DWORD color = GetTextColor(hdc);
+ uint32_t color = GetTextColor(hdc);
RECT r = *lpRect;
OffsetRect(&r, 1, 1);
- DWORD form = format;
+ uint32_t form = format;
if (effect && effect->effectIndex)
ske_SelectTextEffect(hdc, effect->effectIndex - 1, effect->baseColour, effect->secondaryColour);
@@ -2452,8 +2452,8 @@ BOOL ske_DrawText(HDC hdc, LPCTSTR lpString, int nCount, RECT *lpRect, UINT form
if (format & DT_FORCENATIVERENDER || g_CluiData.fDisableSkinEngine)
return DrawText(hdc, lpString, nCount, lpRect, format & ~DT_FORCENATIVERENDER);
- DWORD form = format;
- DWORD color = GetTextColor(hdc);
+ uint32_t form = format;
+ uint32_t color = GetTextColor(hdc);
return ske_AlphaTextOut(hdc, lpString, nCount, lpRect, form, color);
}
@@ -2486,9 +2486,9 @@ HICON ske_ImageList_GetIcon(HIMAGELIST himl, int i)
// Looks like color channels in icons should be non-premultiplied with alpha
// But AddIcon store it premultiplied (incorrectly cause can be Alpha == 7F, but R,G or B == 80
// So i check that alpha is 0x7F and set it to 0x80
- DWORD *c = ((DWORD*)bcbits);
+ uint32_t *c = ((uint32_t*)bcbits);
for (x = 0; x < imi.rcImage.right - imi.rcImage.left; x++) {
- DWORD val = *c;
+ uint32_t val = *c;
uint8_t a = (uint8_t)((val) >> 24);
if (a != 0) {
uint8_t r = (uint8_t)((val & 0xFF0000) >> 16);
@@ -2579,7 +2579,7 @@ BOOL ske_DrawIconEx(HDC hdcDst, int xLeft, int yTop, HICON hIcon, int cxWidth, i
BITMAP immaskbt;
GetObject(ici.hbmMask, sizeof(BITMAP), &immaskbt);
- DWORD cy = imbt.bmHeight;
+ uint32_t cy = imbt.bmHeight;
if (imbt.bmBitsPixel != 32) {
no32bit = TRUE;
@@ -2609,8 +2609,8 @@ BOOL ske_DrawIconEx(HDC hdcDst, int xLeft, int yTop, HICON hIcon, int cxWidth, i
else immaskbits = (uint8_t*)immaskbt.bmBits;
HDC imDC = CreateCompatibleDC(hdcDst);
- DWORD icy = imbt.bmHeight;
- DWORD cx = imbt.bmWidth;
+ uint32_t icy = imbt.bmHeight;
+ uint32_t cx = imbt.bmWidth;
HBITMAP imBmp = ske_CreateDIB32Point(cx, icy, (void**)&imbits);
HBITMAP oldBmp = (HBITMAP)SelectObject(imDC, imBmp);
if (imbits != nullptr && imimagbits != nullptr && immaskbits != nullptr) {
@@ -2640,8 +2640,8 @@ BOOL ske_DrawIconEx(HDC hdcDst, int xLeft, int yTop, HICON hIcon, int cxWidth, i
for (x = 0; x < right; x++) {
uint8_t mask = 0;
uint8_t a = 0;
- DWORD *src = (DWORD*)(t1 + (x << 2));
- DWORD *dest = (DWORD*)(t2 + (x << 2));
+ uint32_t *src = (uint32_t*)(t1 + (x << 2));
+ uint32_t *dest = (uint32_t*)(t2 + (x << 2));
if (hasalpha && !hasmask)
a = ((uint8_t*)src)[3];
else {
@@ -3267,7 +3267,7 @@ HBITMAP ske_GetCurrentWindowImage()
* Glyph text routine
*/
-static DWORD ske_HexToARGB(char *Hex)
+static uint32_t ske_HexToARGB(char *Hex)
{
char buf[10] = { 0 };
char buf2[11] = { 0 };
@@ -3279,7 +3279,7 @@ static DWORD ske_HexToARGB(char *Hex)
buf2[10] = '\0';
char *st;
- DWORD AARRGGBB = strtoul(buf2, &st, 16);
+ uint32_t AARRGGBB = strtoul(buf2, &st, 16);
uint8_t alpha = (uint8_t)((AARRGGBB & 0xFF000000) >> 24);
alpha = 255 - ((alpha == 0) ? 255 : alpha);
AARRGGBB = (alpha << 24) + ((AARRGGBB & 0x00FF0000) >> 16) + ((AARRGGBB & 0x000000FF) << 16) + (AARRGGBB & 0x0000FF00);
@@ -3454,15 +3454,15 @@ static void ske_AddParseSkinFont(char *szFontID, char *szDefineString)
*/
static BOOL ske_CheckHasAlfaChannel(uint8_t *from, int widthByte, int height)
{
- DWORD *pt = (DWORD*)from;
+ uint32_t *pt = (uint32_t*)from;
for (int j = 0; j < height; j++) {
uint8_t *add = (uint8_t*)pt + widthByte;
- while (pt < (DWORD*)add) {
+ while (pt < (uint32_t*)add) {
if ((*pt & 0xFF000000) != 0)
return TRUE;
pt++;
}
- pt = (DWORD*)(from + widthByte*j);
+ pt = (uint32_t*)(from + widthByte*j);
}
return FALSE;
}
@@ -3493,7 +3493,7 @@ static BOOL ske_GetMaskBit(uint8_t *line, int x)
* X2 - overlaying points.
*/
-static DWORD ske_Blend(DWORD X1, DWORD X2, uint8_t alpha)
+static uint32_t ske_Blend(uint32_t X1, uint32_t X2, uint8_t alpha)
{
uint8_t a1 = (uint8_t)(X1 >> 24);
uint8_t a2 = (uint8_t)(((X2 >> 24)*alpha) >> 8);
@@ -3614,8 +3614,8 @@ HICON ske_CreateJoinedIcon(HICON hBottom, HICON hTop, uint8_t alpha)
for (int x = 0; x < 16; x++) {
BOOL mask_b = ske_GetMaskBit(bmb, x);
BOOL mask_t = ske_GetMaskBit(tmb, x);
- DWORD bottom_d = ((DWORD*)bb)[x];
- DWORD top_d = ((DWORD*)tb)[x];
+ uint32_t bottom_d = ((uint32_t*)bb)[x];
+ uint32_t top_d = ((uint32_t*)tb)[x];
if (topHasMask) {
if (mask_t == 1 && !topHasAlpha) top_d &= 0xFFFFFF;
else if (!topHasAlpha) top_d |= 0xFF000000;
@@ -3624,7 +3624,7 @@ HICON ske_CreateJoinedIcon(HICON hBottom, HICON hTop, uint8_t alpha)
if (mask_b == 1 && !bottomHasAlpha) bottom_d &= 0xFFFFFF;
else if (!bottomHasAlpha) bottom_d |= 0xFF000000;
}
- ((DWORD*)db)[x] = ske_Blend(bottom_d, top_d, alpha);
+ ((uint32_t*)db)[x] = ske_Blend(bottom_d, top_d, alpha);
}
bb += vstep_b;
tb += vstep_t;
@@ -3739,13 +3739,13 @@ uint16_t SkinDBGetContactSettingWord(MCONTACT hContact, const char *szSection, c
return wDefault;
}
-DWORD SkinDBGetContactSettingDword(MCONTACT hContact, const char *szSection, const char *szKey, DWORD dwDefault)
+uint32_t SkinDBGetContactSettingDword(MCONTACT hContact, const char *szSection, const char *szKey, uint32_t dwDefault)
{
DBVARIANT dbv = { 0 };
BOOL bSkinned = FALSE;
if (!SkinDBGetContactSetting(hContact, szSection, szKey, &dbv, &bSkinned)) {
if (dbv.type == DBVT_DWORD) {
- DWORD retVal = dbv.dVal;
+ uint32_t retVal = dbv.dVal;
db_free(&dbv);
return retVal;
}
diff --git a/plugins/Clist_modern/src/modern_skinengine.h b/plugins/Clist_modern/src/modern_skinengine.h
index d9f3cf440e..ebb84c22ae 100644
--- a/plugins/Clist_modern/src/modern_skinengine.h
+++ b/plugins/Clist_modern/src/modern_skinengine.h
@@ -19,8 +19,8 @@
struct SKINOBJECTSLIST
{
- DWORD dwObjLPReserved;
- DWORD dwObjLPAlocated;
+ uint32_t dwObjLPReserved;
+ uint32_t dwObjLPAlocated;
wchar_t *szSkinPlace;
LISTMODERNMASK *pMaskList;
SKINOBJECTDESCRIPTOR *pObjects;
@@ -30,7 +30,7 @@ struct SKINOBJECTSLIST
struct GLYPHIMAGE
{
wchar_t *szFileName;
- DWORD dwLoadedTimes;
+ uint32_t dwLoadedTimes;
HBITMAP hGlyph;
uint8_t isSemiTransp;
};
@@ -53,8 +53,8 @@ struct EFFECTSSTACKITEM
{
HDC hdc;
uint8_t EffectID;
- DWORD FirstColor;
- DWORD SecondColor;
+ uint32_t FirstColor;
+ uint32_t SecondColor;
};
class IniParser
@@ -102,7 +102,7 @@ private:
const char* _RemoveTailings(const char *szLine, size_t &len);
HGLOBAL _hGlobalRes;
- DWORD _dwSizeOfRes;
+ uint32_t _dwSizeOfRes;
char* _pPosition;
uint8_t _Flags;
diff --git a/plugins/Clist_modern/src/modern_skinselector.cpp b/plugins/Clist_modern/src/modern_skinselector.cpp
index bd96db90e3..143b83f530 100644
--- a/plugins/Clist_modern/src/modern_skinselector.cpp
+++ b/plugins/Clist_modern/src/modern_skinselector.cpp
@@ -40,9 +40,9 @@ int SkinSelector_DeleteMask(MODERNMASK *mm)
return 1;
}
-DWORD mod_CalcHash(const char *szStr)
+uint32_t mod_CalcHash(const char *szStr)
{
- DWORD hash = 0;
+ uint32_t hash = 0;
int shift = 0;
for (int i = 0; szStr[i]; i++) {
hash ^= szStr[i] << shift;
@@ -72,7 +72,7 @@ int ClearMaskList(LISTMODERNMASK * mmTemplateList)
return 0;
}
-static int DeleteMaskByItID(DWORD mID, LISTMODERNMASK *mmTemplateList)
+static int DeleteMaskByItID(uint32_t mID, LISTMODERNMASK *mmTemplateList)
{
if (!mmTemplateList) return -1;
if (mID >= mmTemplateList->dwMaskCnt) return -1;
@@ -86,7 +86,7 @@ static int DeleteMaskByItID(DWORD mID, LISTMODERNMASK *mmTemplateList)
SkinSelector_DeleteMask(&(mmTemplateList->pl_Masks[mID]));
MODERNMASK *newAlocation = (MODERNMASK *)mir_alloc(sizeof(MODERNMASK)*mmTemplateList->dwMaskCnt - 1);
memcpy(newAlocation, mmTemplateList->pl_Masks, sizeof(MODERNMASK)*(mID + 1));
- for (DWORD i = mID; i < mmTemplateList->dwMaskCnt - 1; i++) {
+ for (uint32_t i = mID; i < mmTemplateList->dwMaskCnt - 1; i++) {
newAlocation[i] = mmTemplateList->pl_Masks[i + 1];
newAlocation[i].dwMaskId = i;
}
@@ -98,7 +98,7 @@ static int DeleteMaskByItID(DWORD mID, LISTMODERNMASK *mmTemplateList)
}
-static int ExchangeMasksByID(DWORD mID1, DWORD mID2, LISTMODERNMASK * mmTemplateList)
+static int ExchangeMasksByID(uint32_t mID1, uint32_t mID2, LISTMODERNMASK * mmTemplateList)
{
if (!mmTemplateList) return 0;
if (mID1 >= mmTemplateList->dwMaskCnt) return 0;
@@ -114,7 +114,7 @@ static int ExchangeMasksByID(DWORD mID1, DWORD mID2, LISTMODERNMASK * mmTemplate
int SortMaskList(LISTMODERNMASK * mmList)
{
- DWORD pos = 1;
+ uint32_t pos = 1;
if (mmList->dwMaskCnt < 2) return 0;
do {
if (mmList->pl_Masks[pos].dwMaskId < mmList->pl_Masks[pos - 1].dwMaskId) {
@@ -281,7 +281,7 @@ static BOOL CompareModernMask(MODERNMASK *mmValue, MODERNMASK *mmTemplate)
uint8_t pVal = 0, pTemp = 0;
while (pTemp < mmTemplate->dwParamCnt && pVal < mmValue->dwParamCnt) {
// find pTemp parameter in mValue
- DWORD vh, ph;
+ uint32_t vh, ph;
BOOL finded = 0;
MASKPARAM p = mmTemplate->pl_Params[pTemp];
ph = p.dwId;
@@ -323,7 +323,7 @@ BOOL CompareStrWithModernMask(char *szValue, MODERNMASK *mmTemplate)
};
// AddingMask
-int AddStrModernMaskToList(DWORD maskID, char *szStr, char *objectName, LISTMODERNMASK *mmTemplateList)
+int AddStrModernMaskToList(uint32_t maskID, char *szStr, char *objectName, LISTMODERNMASK *mmTemplateList)
{
if (!szStr || !mmTemplateList)
return -1;
@@ -341,7 +341,7 @@ int AddStrModernMaskToList(DWORD maskID, char *szStr, char *objectName, LISTMODE
SKINOBJECTDESCRIPTOR* skin_FindObjectByMask(MODERNMASK *mm, LISTMODERNMASK *mmTemplateList)
{
- for (DWORD i = 0; i < mmTemplateList->dwMaskCnt; i++)
+ for (uint32_t i = 0; i < mmTemplateList->dwMaskCnt; i++)
if (CompareModernMask(mm, &(mmTemplateList->pl_Masks[i])))
return (SKINOBJECTDESCRIPTOR*)mmTemplateList->pl_Masks[i].pObject;
@@ -441,7 +441,7 @@ int RegisterButtonByParce(char * ObjectName, char * Params)
char Section[250] = { 0 };
char Type[250] = { 0 };
- DWORD alingnto;
+ uint32_t alingnto;
int a = ((int)!mir_strcmpi(buf, "Switch")) * 2;
GetParamN(Params, pServiceName, _countof(pServiceName), 1, ',', 0);
diff --git a/plugins/Clist_modern/src/modern_skinselector.h b/plugins/Clist_modern/src/modern_skinselector.h
index 9567f95870..841f654ce4 100644
--- a/plugins/Clist_modern/src/modern_skinselector.h
+++ b/plugins/Clist_modern/src/modern_skinselector.h
@@ -35,39 +35,39 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
struct MASKPARAM
{
- DWORD dwId;
+ uint32_t dwId;
uint8_t bMaskParamFlag;
char* szName;
- DWORD dwValueHash;
+ uint32_t dwValueHash;
char* szValue;
};
struct MODERNMASK
{
MASKPARAM* pl_Params;
- DWORD dwParamCnt;
+ uint32_t dwParamCnt;
union
{
void* pObject;
char* szObjectName;
};
- DWORD dwMaskId;
+ uint32_t dwMaskId;
BOOL bObjectFound;
};
struct LISTMODERNMASK
{
MODERNMASK* pl_Masks;
- DWORD dwMaskCnt;
+ uint32_t dwMaskCnt;
};
/// PROTOTYPES
-int AddStrModernMaskToList(DWORD maskID, char *szStr, char *objectName, LISTMODERNMASK *mmTemplateList);
+int AddStrModernMaskToList(uint32_t maskID, char *szStr, char *objectName, LISTMODERNMASK *mmTemplateList);
int SortMaskList(LISTMODERNMASK *mmList);
int ClearMaskList(LISTMODERNMASK *mmTemplateList);
BOOL CompareStrWithModernMask(char *szValue, MODERNMASK *mmTemplate);
-DWORD mod_CalcHash(const char *a);
+uint32_t mod_CalcHash(const char *a);
int RegisterObjectByParce(char *ObjectName, char *Params);
SKINOBJECTDESCRIPTOR* skin_FindObjectByRequest(char *szValue, LISTMODERNMASK *mmTemplateList);
SKINOBJECTDESCRIPTOR* skin_FindObjectByMask(MODERNMASK *mm, LISTMODERNMASK *mmTemplateList);
diff --git a/plugins/Clist_modern/src/modern_statusbar.cpp b/plugins/Clist_modern/src/modern_statusbar.cpp
index 1f28b12e89..87f004fe4d 100644
--- a/plugins/Clist_modern/src/modern_statusbar.cpp
+++ b/plugins/Clist_modern/src/modern_statusbar.cpp
@@ -120,7 +120,7 @@ int BgStatusBarChange(WPARAM, LPARAM)
}
// ProtocolData;
-int NewStatusPaintCallbackProc(HWND hWnd, HDC hDC, RECT *, HRGN, DWORD, void *)
+int NewStatusPaintCallbackProc(HWND hWnd, HDC hDC, RECT *, HRGN, uint32_t, void *)
{
return ModernDrawStatusBar(hWnd, hDC);
}
@@ -313,7 +313,7 @@ int ModernDrawStatusBarWorker(HWND hWnd, HDC hDC)
int iconY = rc.top + (((rc.bottom - rc.top) - iconHeight) / 2);
// Code for each line
- DWORD sw;
+ uint32_t sw;
int rectwidth = rc.right - rc.left - g_StatusBarData.rectBorders.left - g_StatusBarData.rectBorders.right;
if (visProtoCount > 1)
sw = (rectwidth - (g_StatusBarData.extraspace*(visProtoCount - 1))) / visProtoCount;
@@ -324,7 +324,7 @@ int ModernDrawStatusBarWorker(HWND hWnd, HDC hDC)
for (int i = 0; i < visProtoCount; i++) {
ProtoItemData &p = ProtosData[line*protosperline + i];
- DWORD w = p.PaddingLeft;
+ uint32_t w = p.PaddingLeft;
w += p.PaddingRight;
if (p.bShowProtoIcon) {
@@ -469,7 +469,7 @@ int ModernDrawStatusBarWorker(HWND hWnd, HDC hDC)
SelectClipRgn(hDC, rgn);
p.bDoubleIcons = false;
- DWORD dim = p.bIsDimmed ? ((64 << 24) | 0x80) : 0;
+ uint32_t dim = p.bIsDimmed ? ((64 << 24) | 0x80) : 0;
if ((p.xStatusMode & 3) == 3) {
if (hIcon)
diff --git a/plugins/Clist_modern/src/modern_statusbar.h b/plugins/Clist_modern/src/modern_statusbar.h
index 4c164a4b09..c9a1a6e135 100644
--- a/plugins/Clist_modern/src/modern_statusbar.h
+++ b/plugins/Clist_modern/src/modern_statusbar.h
@@ -20,17 +20,17 @@ typedef struct tagSTATUSBARDATA
bool bShowStatusName;
bool bConnectingIcon;
HFONT BarFont;
- DWORD fontColor;
+ uint32_t fontColor;
uint8_t TextEffectID;
- DWORD TextEffectColor1;
- DWORD TextEffectColor2;
+ uint32_t TextEffectColor1;
+ uint32_t TextEffectColor2;
uint8_t xStatusMode; // 0-only main, 1-xStatus, 2-main as overlay
uint8_t nProtosPerLine;
bool bShowProtoEmails;
HBITMAP hBmpBackground;
COLORREF bkColour;
- DWORD backgroundBmpUse;
+ uint32_t backgroundBmpUse;
BOOL bkUseWinColors;
XPTHANDLE hTheme;
diff --git a/plugins/Clist_modern/src/modern_statusbar_options.cpp b/plugins/Clist_modern/src/modern_statusbar_options.cpp
index 3513df1b6d..4a385a5db7 100644
--- a/plugins/Clist_modern/src/modern_statusbar_options.cpp
+++ b/plugins/Clist_modern/src/modern_statusbar_options.cpp
@@ -169,7 +169,7 @@ INT_PTR CALLBACK DlgProcSBarOpts(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM l
dat = (StatusBarProtocolOptions *)mir_calloc(sizeof(StatusBarProtocolOptions));
dat->szName = szName;
- DWORD dwNewId = SendMessage(hwndComboBox, CB_ADDSTRING, 0, (LPARAM)pa->tszAccountName);
+ uint32_t dwNewId = SendMessage(hwndComboBox, CB_ADDSTRING, 0, (LPARAM)pa->tszAccountName);
SendMessage(hwndComboBox, CB_SETITEMDATA, dwNewId, (LPARAM)dat);
char buf[256];
@@ -370,10 +370,10 @@ INT_PTR CALLBACK DlgProcSBarOpts(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM l
dat->SBarRightClk = IsDlgButtonChecked(hwndDlg, IDC_RIGHTMIRANDA);
}
else if (LOWORD(wParam) == IDC_OFFSETICON_LEFT) {
- dat->PaddingLeft = (DWORD)SendDlgItemMessage(hwndDlg, IDC_OFFSETSPIN_LEFT, UDM_GETPOS, 0, 0);
+ dat->PaddingLeft = (uint32_t)SendDlgItemMessage(hwndDlg, IDC_OFFSETSPIN_LEFT, UDM_GETPOS, 0, 0);
}
else if (LOWORD(wParam) == IDC_OFFSETICON_RIGHT) {
- dat->PaddingRight = (DWORD)SendDlgItemMessage(hwndDlg, IDC_OFFSETSPIN_RIGHT, UDM_GETPOS, 0, 0);
+ dat->PaddingRight = (uint32_t)SendDlgItemMessage(hwndDlg, IDC_OFFSETSPIN_RIGHT, UDM_GETPOS, 0, 0);
}
else if ((LOWORD(wParam) == IDC_MULTI_COUNT || LOWORD(wParam) == IDC_OFFSETICON || LOWORD(wParam) == IDC_OFFSETICON2
|| LOWORD(wParam) == IDC_OFFSETICON3 || LOWORD(wParam) == IDC_SBAR_BORDER_BOTTOM || LOWORD(wParam) == IDC_SBAR_BORDER_TOP)
@@ -431,11 +431,11 @@ INT_PTR CALLBACK DlgProcSBarOpts(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM l
db_set_b(0, "CLUI", "EqualSections", (uint8_t)IsDlgButtonChecked(hwndDlg, IDC_EQUALSECTIONS));
db_set_b(0, "CLUI", "Align", (uint8_t)SendDlgItemMessage(hwndDlg, IDC_SBAR_HORIZ_ALIGN, CB_GETCURSEL, 0, 0));
db_set_b(0, "CLUI", "VAlign", (uint8_t)SendDlgItemMessage(hwndDlg, IDC_SBAR_VERT_ALIGN, CB_GETCURSEL, 0, 0));
- db_set_dw(0, "CLUI", "LeftOffset", (DWORD)SendDlgItemMessage(hwndDlg, IDC_OFFSETSPIN, UDM_GETPOS, 0, 0));
- db_set_dw(0, "CLUI", "RightOffset", (DWORD)SendDlgItemMessage(hwndDlg, IDC_OFFSETSPIN2, UDM_GETPOS, 0, 0));
- db_set_dw(0, "CLUI", "TopOffset", (DWORD)SendDlgItemMessage(hwndDlg, IDC_SBAR_BORDER_TOP_SPIN, UDM_GETPOS, 0, 0));
- db_set_dw(0, "CLUI", "BottomOffset", (DWORD)SendDlgItemMessage(hwndDlg, IDC_SBAR_BORDER_BOTTOM_SPIN, UDM_GETPOS, 0, 0));
- db_set_dw(0, "CLUI", "SpaceBetween", (DWORD)SendDlgItemMessage(hwndDlg, IDC_OFFSETSPIN3, UDM_GETPOS, 0, 0));
+ db_set_dw(0, "CLUI", "LeftOffset", (uint32_t)SendDlgItemMessage(hwndDlg, IDC_OFFSETSPIN, UDM_GETPOS, 0, 0));
+ db_set_dw(0, "CLUI", "RightOffset", (uint32_t)SendDlgItemMessage(hwndDlg, IDC_OFFSETSPIN2, UDM_GETPOS, 0, 0));
+ db_set_dw(0, "CLUI", "TopOffset", (uint32_t)SendDlgItemMessage(hwndDlg, IDC_SBAR_BORDER_TOP_SPIN, UDM_GETPOS, 0, 0));
+ db_set_dw(0, "CLUI", "BottomOffset", (uint32_t)SendDlgItemMessage(hwndDlg, IDC_SBAR_BORDER_BOTTOM_SPIN, UDM_GETPOS, 0, 0));
+ db_set_dw(0, "CLUI", "SpaceBetween", (uint32_t)SendDlgItemMessage(hwndDlg, IDC_OFFSETSPIN3, UDM_GETPOS, 0, 0));
db_set_b(0, "CLUI", "ShowSBar", (uint8_t)IsDlgButtonChecked(hwndDlg, IDC_SHOWSBAR));
LoadStatusBarData();
diff --git a/plugins/Clist_modern/src/modern_toolbar.cpp b/plugins/Clist_modern/src/modern_toolbar.cpp
index 8767a9a457..d1be88c4fe 100644
--- a/plugins/Clist_modern/src/modern_toolbar.cpp
+++ b/plugins/Clist_modern/src/modern_toolbar.cpp
@@ -266,7 +266,7 @@ static LRESULT CALLBACK toolbarWndProc(HWND hwnd, UINT msg, WPARAM wParam, LPARA
return mir_callNextSubclass(hwnd, toolbarWndProc, msg, wParam, lParam);
}
-static int ToolBar_LayeredPaintProc(HWND hWnd, HDC hDC, RECT *, HRGN, DWORD, void *)
+static int ToolBar_LayeredPaintProc(HWND hWnd, HDC hDC, RECT *, HRGN, uint32_t, void *)
{
return SendMessage(hWnd, MTBM_LAYEREDPAINT, (WPARAM)hDC, 0);
}
diff --git a/plugins/Clist_modern/src/modern_utils.cpp b/plugins/Clist_modern/src/modern_utils.cpp
index 493b5b6182..2cea1b9a1a 100644
--- a/plugins/Clist_modern/src/modern_utils.cpp
+++ b/plugins/Clist_modern/src/modern_utils.cpp
@@ -23,7 +23,7 @@ char * __cdecl strstri(char *a, const char *b)
void TRACE_ERROR()
{
- DWORD t = GetLastError();
+ uint32_t t = GetLastError();
LPVOID lpMsgBuf;
if (!FormatMessage(
FORMAT_MESSAGE_ALLOCATE_BUFFER |
diff --git a/plugins/Clist_modern/src/modern_viewmodebar.cpp b/plugins/Clist_modern/src/modern_viewmodebar.cpp
index 61b12e346a..aeae1a3eb3 100644
--- a/plugins/Clist_modern/src/modern_viewmodebar.cpp
+++ b/plugins/Clist_modern/src/modern_viewmodebar.cpp
@@ -41,7 +41,7 @@ static HWND hwndSelector = nullptr;
static HIMAGELIST himlViewModes = nullptr;
static HANDLE hInfoItem = nullptr;
static int nullImage;
-static DWORD stickyStatusMask = 0;
+static uint32_t stickyStatusMask = 0;
static char g_szModename[2048];
static UINT _page1Controls[] =
@@ -86,7 +86,7 @@ static int DeleteAutoModesCallback(char *szsetting)
return 1;
}
-void SaveViewMode(const char *name, const wchar_t *szGroupFilter, const char *szProtoFilter, DWORD dwStatusMask, DWORD dwStickyStatusMask,
+void SaveViewMode(const char *name, const wchar_t *szGroupFilter, const char *szProtoFilter, uint32_t dwStatusMask, uint32_t dwStickyStatusMask,
unsigned int options, unsigned int stickies, unsigned int operators, unsigned int lmdat)
{
CLVM_EnumModes(DeleteAutoModesCallback);
@@ -170,9 +170,9 @@ class CViewModeSetupDlg : public CDlgBase
return 1;
}
- DWORD GetMaskForItem(HANDLE hItem)
+ uint32_t GetMaskForItem(HANDLE hItem)
{
- DWORD dwMask = 0;
+ uint32_t dwMask = 0;
for (int i = 0; i <= ID_STATUS_MAX - ID_STATUS_OFFLINE; i++)
dwMask |= (clist.GetExtraImage(hItem, i) == nullImage ? 0 : 1 << i);
@@ -268,8 +268,8 @@ class CViewModeSetupDlg : public CDlgBase
{
wchar_t newGroupFilter[2048] = L"|";
char newProtoFilter[2048] = "|";
- DWORD statusMask = 0;
- DWORD operators = 0;
+ uint32_t statusMask = 0;
+ uint32_t operators = 0;
if (m_iCurrItem == -1)
return;
@@ -313,14 +313,14 @@ class CViewModeSetupDlg : public CDlgBase
if (szTempModeName) {
T2Utf szModeName(szTempModeName);
- DWORD dwGlobalMask = GetMaskForItem(hInfoItem);
+ uint32_t dwGlobalMask = GetMaskForItem(hInfoItem);
for (auto &hContact : Contacts()) {
HANDLE hItem = clist.FindContact(hContact);
if (hItem == nullptr)
continue;
if (clist.GetCheck(hItem)) {
- DWORD dwLocalMask = GetMaskForItem(hItem);
+ uint32_t dwLocalMask = GetMaskForItem(hItem);
db_set_dw(hContact, CLVM_MODULE, szModeName, MAKELONG(1, (unsigned short)dwLocalMask));
stickies++;
}
@@ -337,10 +337,10 @@ class CViewModeSetupDlg : public CDlgBase
(IsDlgButtonChecked(m_hwnd, IDC_USEGROUPS) == BST_CHECKED ? CLVM_USEGROUPS : 0) |
(IsDlgButtonChecked(m_hwnd, IDC_USEGROUPS) == BST_UNCHECKED ? CLVM_DONOTUSEGROUPS : 0));
- DWORD options = SendDlgItemMessage(m_hwnd, IDC_AUTOCLEARSPIN, UDM_GETPOS, 0, 0);
+ uint32_t options = SendDlgItemMessage(m_hwnd, IDC_AUTOCLEARSPIN, UDM_GETPOS, 0, 0);
BOOL translated;
- DWORD lmdat = MAKELONG(GetDlgItemInt(m_hwnd, IDC_LASTMSGVALUE, &translated, FALSE),
+ uint32_t lmdat = MAKELONG(GetDlgItemInt(m_hwnd, IDC_LASTMSGVALUE, &translated, FALSE),
MAKEWORD(SendDlgItemMessage(m_hwnd, IDC_LASTMESSAGEOP, CB_GETCURSEL, 0, 0),
SendDlgItemMessage(m_hwnd, IDC_LASTMESSAGEUNIT, CB_GETCURSEL, 0, 0)));
@@ -448,7 +448,7 @@ class CViewModeSetupDlg : public CDlgBase
////////////////////////////////////////////////////////////////////////////////////////
- void UpdateClistItem(HANDLE hItem, DWORD mask)
+ void UpdateClistItem(HANDLE hItem, uint32_t mask)
{
for (int i = ID_STATUS_OFFLINE; i <= ID_STATUS_MAX; i++)
clist.SetExtraImage(hItem, i - ID_STATUS_OFFLINE, (1 << (i - ID_STATUS_OFFLINE)) & mask ? i - ID_STATUS_OFFLINE : nullImage);
@@ -460,8 +460,8 @@ class CViewModeSetupDlg : public CDlgBase
void UpdateFilters()
{
char szSetting[128];
- DWORD dwFlags;
- DWORD opt;
+ uint32_t dwFlags;
+ uint32_t opt;
if (m_iCurrItem == LB_ERR)
return;
@@ -489,7 +489,7 @@ class CViewModeSetupDlg : public CDlgBase
SendDlgItemMessage(m_hwnd, IDC_AUTOCLEARSPIN, UDM_SETPOS, 0, MAKELONG(LOWORD(opt), 0));
mir_snprintf(szSetting, "%c%s_SM", 246, szBuf.get());
- DWORD statusMask = db_get_dw(0, CLVM_MODULE, szSetting, 0);
+ uint32_t statusMask = db_get_dw(0, CLVM_MODULE, szSetting, 0);
mir_snprintf(szSetting, "%c%s_SSM", 246, szBuf.get());
stickyStatusMask = db_get_dw(0, CLVM_MODULE, szSetting, -1);
dwFlags = db_get_dw(0, CLVM_MODULE, szBuf, 0);
@@ -554,7 +554,7 @@ class CViewModeSetupDlg : public CDlgBase
EnableWindow(GetDlgItem(m_hwnd, IDC_LASTMESSAGEUNIT), useLastMsg);
mir_snprintf(szSetting, "%c%s_LM", 246, szBuf.get());
- DWORD lmdat = db_get_dw(0, CLVM_MODULE, szSetting, 0);
+ uint32_t lmdat = db_get_dw(0, CLVM_MODULE, szSetting, 0);
SetDlgItemInt(m_hwnd, IDC_LASTMSGVALUE, LOWORD(lmdat), FALSE);
uint8_t bTmp = LOBYTE(HIWORD(lmdat));
@@ -785,7 +785,7 @@ public:
if (hItem)
clist.SetCheck(hItem, db_get_dw(hContact, CLVM_MODULE, g_szModename, 0));
- DWORD localMask = HIWORD(db_get_dw(hContact, CLVM_MODULE, g_szModename, 0));
+ uint32_t localMask = HIWORD(db_get_dw(hContact, CLVM_MODULE, g_szModename, 0));
UpdateClistItem(hItem, (localMask == 0 || localMask == stickyStatusMask) ? stickyStatusMask : localMask);
}
@@ -807,7 +807,7 @@ public:
if (nm->iColumn == -1)
return;
- DWORD hitFlags;
+ uint32_t hitFlags;
HANDLE hItem = clist.HitTest(nm->pt.x, nm->pt.y, &hitFlags);
if (hItem == nullptr)
return;
@@ -1141,7 +1141,7 @@ static int ehhViewModeBackgroundSettingsChanged(WPARAM, LPARAM)
return 0;
}
-static int ViewModePaintCallbackProc(HWND hWnd, HDC hDC, RECT *, HRGN, DWORD, void *)
+static int ViewModePaintCallbackProc(HWND hWnd, HDC hDC, RECT *, HRGN, uint32_t, void *)
{
RECT MyRect = { 0 };
GetWindowRect(hWnd, &MyRect);
@@ -1268,7 +1268,7 @@ void ApplyViewMode(const char *szName)
if (g_CluiData.filterFlags & CLVM_AUTOCLEAR) {
mir_snprintf(szSetting, "%c%s_OPT", 246, szName);
- DWORD timerexpire = LOWORD(db_get_dw(0, CLVM_MODULE, szSetting, 0));
+ uint32_t timerexpire = LOWORD(db_get_dw(0, CLVM_MODULE, szSetting, 0));
strncpy_s(g_CluiData.old_viewmode, g_CluiData.current_viewmode, _TRUNCATE);
CLUI_SafeSetTimer(g_hwndViewModeFrame, TIMERID_VIEWMODEEXPIRE, timerexpire * 1000, nullptr);
}
@@ -1287,7 +1287,7 @@ void ApplyViewMode(const char *szName)
else
g_CluiData.bFilterEffective |= CLVM_FILTER_LASTMSG_OLDERTHAN;
- DWORD unit = LOWORD(g_CluiData.lastMsgFilter);
+ uint32_t unit = LOWORD(g_CluiData.lastMsgFilter);
switch (HIBYTE(HIWORD(g_CluiData.lastMsgFilter))) {
case 0:
unit *= 60;
diff --git a/plugins/Clist_modern/src/modern_xptheme.cpp b/plugins/Clist_modern/src/modern_xptheme.cpp
index 2c341149c9..6d101e3955 100644
--- a/plugins/Clist_modern/src/modern_xptheme.cpp
+++ b/plugins/Clist_modern/src/modern_xptheme.cpp
@@ -117,7 +117,7 @@ HRESULT xpt_DrawTheme(XPTHANDLE xptHandle, HWND hwnd, HDC hdc, int type, int sta
return S_FALSE;
}
-HRESULT xpt_DrawThemeText(XPTHANDLE xptHandle, HDC hdc, int type, int state, LPCTSTR lpStr, int len, DWORD flag1, DWORD flag2, const RECT *textRect)
+HRESULT xpt_DrawThemeText(XPTHANDLE xptHandle, HDC hdc, int type, int state, LPCTSTR lpStr, int len, uint32_t flag1, uint32_t flag2, const RECT *textRect)
{
mir_cslock lck(xptCS);
if (xpt_IsThemed(xptHandle))