diff options
author | George Hazan <ghazan@miranda.im> | 2021-12-26 20:31:39 +0300 |
---|---|---|
committer | George Hazan <ghazan@miranda.im> | 2021-12-26 20:31:39 +0300 |
commit | cddcd7483a7c472598af098e759e5d309024f606 (patch) | |
tree | b0a227d6e087c41958cc84d27bc323353248aae5 /plugins/ChangeKeyboardLayout | |
parent | 1039b2829a264280493ba0fa979214fe024dc70c (diff) |
DWORD -> uint32_t
Diffstat (limited to 'plugins/ChangeKeyboardLayout')
-rw-r--r-- | plugins/ChangeKeyboardLayout/src/hook_events.cpp | 2 | ||||
-rw-r--r-- | plugins/ChangeKeyboardLayout/src/options.cpp | 2 | ||||
-rw-r--r-- | plugins/ChangeKeyboardLayout/src/stdafx.h | 6 | ||||
-rw-r--r-- | plugins/ChangeKeyboardLayout/src/text_operations.cpp | 20 |
4 files changed, 15 insertions, 15 deletions
diff --git a/plugins/ChangeKeyboardLayout/src/hook_events.cpp b/plugins/ChangeKeyboardLayout/src/hook_events.cpp index 7acb1ce6ef..c9598d5814 100644 --- a/plugins/ChangeKeyboardLayout/src/hook_events.cpp +++ b/plugins/ChangeKeyboardLayout/src/hook_events.cpp @@ -152,7 +152,7 @@ int OnOptionsInitialise(WPARAM wParam, LPARAM) LRESULT CALLBACK Keyboard_Hook(int code, WPARAM wParam, LPARAM lParam)
{
if (code == HC_ACTION) {
- DWORD lcode = 0;
+ uint32_t lcode = 0;
if ((GetKeyState(VK_SHIFT) & 0x8000)) lcode |= HOTKEYF_SHIFT;
if ((GetKeyState(VK_CONTROL) & 0x8000)) lcode |= HOTKEYF_CONTROL;
if ((GetKeyState(VK_MENU) & 0x8000)) lcode |= HOTKEYF_ALT;
diff --git a/plugins/ChangeKeyboardLayout/src/options.cpp b/plugins/ChangeKeyboardLayout/src/options.cpp index d1dc5a676a..aaa55510ad 100644 --- a/plugins/ChangeKeyboardLayout/src/options.cpp +++ b/plugins/ChangeKeyboardLayout/src/options.cpp @@ -231,7 +231,7 @@ static PopupOptions poOptionsTemp; INT_PTR CALLBACK DlgPopupsProcOptions(HWND hWnd, UINT uiMessage, WPARAM wParam, LPARAM lParam)
{
static BOOL PopupDialogLock = FALSE;
- DWORD dwTimeOut;
+ uint32_t dwTimeOut;
switch (uiMessage) {
case WM_INITDIALOG:
diff --git a/plugins/ChangeKeyboardLayout/src/stdafx.h b/plugins/ChangeKeyboardLayout/src/stdafx.h index 8d89dee754..36f626496a 100644 --- a/plugins/ChangeKeyboardLayout/src/stdafx.h +++ b/plugins/ChangeKeyboardLayout/src/stdafx.h @@ -72,9 +72,9 @@ struct CMPlugin : public PLUGIN<CMPlugin> typedef struct
{
- DWORD dwHotkey_Layout;
- DWORD dwHotkey_Layout2;
- DWORD dwHotkey_Case;
+ uint32_t dwHotkey_Layout;
+ uint32_t dwHotkey_Layout2;
+ uint32_t dwHotkey_Case;
BOOL CurrentWordLayout;
BOOL CurrentWordLayout2;
BOOL CurrentWordCase;
diff --git a/plugins/ChangeKeyboardLayout/src/text_operations.cpp b/plugins/ChangeKeyboardLayout/src/text_operations.cpp index 37fbd00c1f..85fb6bf458 100644 --- a/plugins/ChangeKeyboardLayout/src/text_operations.cpp +++ b/plugins/ChangeKeyboardLayout/src/text_operations.cpp @@ -26,7 +26,7 @@ static DWORD CALLBACK EditStreamOutRtf(DWORD_PTR dwCookie, LPBYTE pbBuff, LONG c wchar_t* GeTStringFromStreamData(EditStreamData *esd)
{
- DWORD i, k;
+ uint32_t i, k;
wchar_t *ptszOutText = (LPTSTR)mir_alloc(MaxTextSize * sizeof(wchar_t));
wchar_t *ptszTemp = (wchar_t *)esd->pbBuff;
@@ -72,7 +72,7 @@ wchar_t* GetShortNameOfLayout(HKL hklLayout) {
wchar_t szLI[20];
wchar_t *ptszLiShort = (LPTSTR)mir_alloc(3 * sizeof(wchar_t));
- DWORD dwLcid = MAKELCID(LOWORD(hklLayout), 0);
+ uint32_t dwLcid = MAKELCID(LOWORD(hklLayout), 0);
GetLocaleInfoW(dwLcid, LOCALE_SISO639LANGNAME, szLI, 10);
ptszLiShort[0] = toupper(szLI[0]);
ptszLiShort[1] = toupper(szLI[1]);
@@ -161,9 +161,9 @@ wchar_t* ChangeTextLayout(LPCTSTR ptszInText, HKL hklCurLay, HKL hklToLay, BOOL if (ptszKeybCur == nullptr || ptszKeybNext == nullptr)
return ptszOutText;
- for (DWORD i = 0; i < mir_wstrlen(ptszInText); i++) {
+ for (uint32_t i = 0; i < mir_wstrlen(ptszInText); i++) {
BOOL Found = FALSE;
- for (DWORD j = 0; j < mir_wstrlen(ptszKeybCur) && !Found; j++)
+ for (uint32_t j = 0; j < mir_wstrlen(ptszKeybCur) && !Found; j++)
if (ptszKeybCur[j] == ptszInText[i]) {
Found = TRUE;
if (mir_wstrlen(ptszKeybNext) >= j)
@@ -171,7 +171,7 @@ wchar_t* ChangeTextLayout(LPCTSTR ptszInText, HKL hklCurLay, HKL hklToLay, BOOL }
if (TwoWay && !Found)
- for (DWORD j = 0; j < mir_wstrlen(ptszKeybNext) && !Found; j++)
+ for (uint32_t j = 0; j < mir_wstrlen(ptszKeybNext) && !Found; j++)
if (ptszKeybNext[j] == ptszInText[i]) {
Found = TRUE;
if (mir_wstrlen(ptszKeybCur) >= j)
@@ -185,17 +185,17 @@ HKL GetLayoutOfText(LPCTSTR ptszInText) {
HKL hklCurLay = hklLayouts[0];
wchar_t *ptszKeybBuff = ptszLayStrings[0];
- DWORD dwMaxSymbols = 0, dwTemp = 0;
+ uint32_t dwMaxSymbols = 0, dwTemp = 0;
- for (DWORD j = 0; j < mir_wstrlen(ptszInText); j++)
+ for (uint32_t j = 0; j < mir_wstrlen(ptszInText); j++)
if (wcschr(ptszKeybBuff, ptszInText[j]) != nullptr)
++dwMaxSymbols;
for (int i = 1; i < bLayNum; i++) {
ptszKeybBuff = ptszLayStrings[i];
- DWORD dwCountSymbols = 0;
+ uint32_t dwCountSymbols = 0;
- for (DWORD j = 0; j < mir_wstrlen(ptszInText); j++)
+ for (uint32_t j = 0; j < mir_wstrlen(ptszInText); j++)
if (wcschr(ptszKeybBuff, ptszInText[j]) != nullptr)
++dwCountSymbols;
@@ -219,7 +219,7 @@ int ChangeLayout(HWND hTextWnd, uint8_t TextOperation, BOOL CurrentWord) ptrW ptszInText;
CHARRANGE crSelection = { 0 }, crTemp = { 0 };
- DWORD dwStartWord, dwEndWord;
+ uint32_t dwStartWord, dwEndWord;
uint8_t WindowType = WTYPE_Unknown;
BOOL WindowIsReadOnly, TwoWay;
|