summaryrefslogtreecommitdiff
path: root/plugins/KeyboardNotify/src
diff options
context:
space:
mode:
authorGeorge Hazan <ghazan@miranda.im>2021-12-26 17:06:04 +0300
committerGeorge Hazan <ghazan@miranda.im>2021-12-26 17:06:04 +0300
commit1039b2829a264280493ba0fa979214fe024dc70c (patch)
tree8fa6a60eb46627582c372b56a4a1d4754d6732c3 /plugins/KeyboardNotify/src
parent62a186697df33c96dc1a6dac0f4dfc38652fb96f (diff)
WORD -> uint16_t
Diffstat (limited to 'plugins/KeyboardNotify/src')
-rw-r--r--plugins/KeyboardNotify/src/flash.cpp4
-rw-r--r--plugins/KeyboardNotify/src/ignore.cpp4
-rw-r--r--plugins/KeyboardNotify/src/ignore.h2
-rw-r--r--plugins/KeyboardNotify/src/keypresses.cpp4
-rw-r--r--plugins/KeyboardNotify/src/main.cpp20
-rw-r--r--plugins/KeyboardNotify/src/options.cpp16
6 files changed, 25 insertions, 25 deletions
diff --git a/plugins/KeyboardNotify/src/flash.cpp b/plugins/KeyboardNotify/src/flash.cpp
index c56d3b6742..cbc51480ee 100644
--- a/plugins/KeyboardNotify/src/flash.cpp
+++ b/plugins/KeyboardNotify/src/flash.cpp
@@ -44,12 +44,12 @@ FLASHING_SEQUENCE *pFS;
BOOL bTemporarilyUseExtern;
extern uint8_t bFlashLed[3];
extern uint8_t bFlashEffect; extern uint8_t bSequenceOrder;
-extern WORD wCustomTheme;
+extern uint16_t wCustomTheme;
extern uint8_t bTrillianLedsMsg, bTrillianLedsFile, bTrillianLedsOther;
extern uint8_t bEmulateKeypresses;
// TestThread/PreviewThread globals
-extern int nWaitDelay; extern WORD wStartDelay;
+extern int nWaitDelay; extern uint16_t wStartDelay;
BOOL bTestSemaphore, bPreviewSemaphore, bPreview;
void RestoreLEDState(void)
diff --git a/plugins/KeyboardNotify/src/ignore.cpp b/plugins/KeyboardNotify/src/ignore.cpp
index b37b664763..847c8288b4 100644
--- a/plugins/KeyboardNotify/src/ignore.cpp
+++ b/plugins/KeyboardNotify/src/ignore.cpp
@@ -318,9 +318,9 @@ INT_PTR CALLBACK DlgProcIgnoreOptions(HWND hwndDlg, UINT msg, WPARAM, LPARAM lPa
return FALSE;
}
-BOOL IsIgnored(MCONTACT hContact, WORD eventType)
+BOOL IsIgnored(MCONTACT hContact, uint16_t eventType)
{
- WORD ignoreID = 0;
+ uint16_t ignoreID = 0;
DWORD mask = GetMask(hContact);
switch(eventType) {
diff --git a/plugins/KeyboardNotify/src/ignore.h b/plugins/KeyboardNotify/src/ignore.h
index 0748c5c2ba..349a72575a 100644
--- a/plugins/KeyboardNotify/src/ignore.h
+++ b/plugins/KeyboardNotify/src/ignore.h
@@ -18,5 +18,5 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#pragma once
-BOOL IsIgnored(MCONTACT, WORD);
+BOOL IsIgnored(MCONTACT, uint16_t);
INT_PTR CALLBACK DlgProcIgnoreOptions(HWND, UINT, WPARAM, LPARAM);
diff --git a/plugins/KeyboardNotify/src/keypresses.cpp b/plugins/KeyboardNotify/src/keypresses.cpp
index 85e521925e..3d103f21a4 100644
--- a/plugins/KeyboardNotify/src/keypresses.cpp
+++ b/plugins/KeyboardNotify/src/keypresses.cpp
@@ -19,7 +19,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#include "stdafx.h"
// Prototypes
-void SetLock(WORD, uint8_t, unsigned int *, INPUT *);
+void SetLock(uint16_t, uint8_t, unsigned int *, INPUT *);
// Globals
BOOL LEDstateSaved = FALSE;
@@ -51,7 +51,7 @@ BOOL keypresses_ToggleKeyboardLights(uint8_t byte)
return TRUE;
}
-void SetLock(WORD keyCode, uint8_t value, unsigned int *n, INPUT *keystrokes)
+void SetLock(uint16_t keyCode, uint8_t value, unsigned int *n, INPUT *keystrokes)
{
uint8_t status;
diff --git a/plugins/KeyboardNotify/src/main.cpp b/plugins/KeyboardNotify/src/main.cpp
index 88a31dbdde..ddac9e72a9 100644
--- a/plugins/KeyboardNotify/src/main.cpp
+++ b/plugins/KeyboardNotify/src/main.cpp
@@ -56,17 +56,17 @@ uint8_t bWorkstationActive;
uint8_t bFlashIfMsgOpen;
uint8_t bFlashIfMsgWinNotTop;
uint8_t bFlashIfMsgOlder;
-WORD wSecondsOlder;
+uint16_t wSecondsOlder;
uint8_t bFlashUntil;
-WORD wBlinksNumber;
+uint16_t wBlinksNumber;
uint8_t bMirandaOrWindows;
-WORD wStatusMap;
-WORD wReminderCheck;
+uint16_t wStatusMap;
+uint16_t wReminderCheck;
uint8_t bFlashLed[3];
uint8_t bFlashEffect;
uint8_t bSequenceOrder;
-WORD wCustomTheme;
-WORD wStartDelay;
+uint16_t wCustomTheme;
+uint16_t wStartDelay;
uint8_t bFlashSpeed;
uint8_t bOverride;
uint8_t bTrillianLedsMsg;
@@ -208,7 +208,7 @@ DBEVENTINFO readEventInfo(MEVENT hDbEvent, MCONTACT hContact)
return einfo;
}
-BOOL checkIgnore(MCONTACT hContact, WORD eventType)
+BOOL checkIgnore(MCONTACT hContact, uint16_t eventType)
{
return !IsIgnored(hContact, eventType);
}
@@ -225,7 +225,7 @@ BOOL checkProtocol(const char *szProto)
return FALSE;
}
-BOOL metaCheckProtocol(const char *szProto, MCONTACT hContact, WORD eventType)
+BOOL metaCheckProtocol(const char *szProto, MCONTACT hContact, uint16_t eventType)
{
MCONTACT hSubContact = NULL;
@@ -346,7 +346,7 @@ BOOL checkMsgTimestamp(MCONTACT hContact, MEVENT hEventCurrent, DWORD timestampC
}
-BOOL contactCheckProtocol(const char *szProto, MCONTACT hContact, WORD eventType)
+BOOL contactCheckProtocol(const char *szProto, MCONTACT hContact, uint16_t eventType)
{
if (bMetaProtoEnabled && hContact) {
MCONTACT hMetaContact = (MCONTACT)db_get_dw(hContact, META_PROTO, "Handle", 0);
@@ -509,7 +509,7 @@ static void __cdecl ForceEventsWereOpenedThread(void *eventMaxSeconds)
CallService(MS_KBDNOTIFY_EVENTSOPENED, 1, 0);
}
-void StartBlinkAction(char *flashSequence, WORD eventMaxSeconds)
+void StartBlinkAction(char *flashSequence, uint16_t eventMaxSeconds)
{
if (eventMaxSeconds)
mir_forkthread(ForceEventsWereOpenedThread, (void *)eventMaxSeconds);
diff --git a/plugins/KeyboardNotify/src/options.cpp b/plugins/KeyboardNotify/src/options.cpp
index 91439d716a..a607fe349a 100644
--- a/plugins/KeyboardNotify/src/options.cpp
+++ b/plugins/KeyboardNotify/src/options.cpp
@@ -27,7 +27,7 @@ extern uint8_t
bWorkstationActive, bFlashIfMsgOpen, bFlashIfMsgOlder, bFlashUntil, bMirandaOrWindows, bFlashLed[3], bFlashEffect, bSequenceOrder, bFlashSpeed,
bEmulateKeypresses, bOverride, bFlashIfMsgWinNotTop, bTrillianLedsMsg, bTrillianLedsURL, bTrillianLedsFile, bTrillianLedsOther;
-extern WORD wSecondsOlder, wBlinksNumber, wStatusMap, wReminderCheck, wCustomTheme, wStartDelay;
+extern uint16_t wSecondsOlder, wBlinksNumber, wStatusMap, wReminderCheck, wCustomTheme, wStartDelay;
extern PROTOCOL_LIST ProtoList;
extern PROCESS_LIST ProcessList;
@@ -732,7 +732,7 @@ static INT_PTR CALLBACK DlgProcBasicOptions(HWND hwndDlg, UINT msg, WPARAM wPara
case WM_NOTIFY:
{
uint8_t untilMap = 0;
- WORD statusMap = 0;
+ uint16_t statusMap = 0;
//Here we have pressed either the OK or the APPLY button.
switch (((LPNMHDR)lParam)->idFrom) {
case 0:
@@ -752,7 +752,7 @@ static INT_PTR CALLBACK DlgProcBasicOptions(HWND hwndDlg, UINT msg, WPARAM wPara
g_plugin.setByte("ifmsgopen", (uint8_t)(IsDlgButtonChecked(hwndDlg, IDC_IFOPEN) == BST_CHECKED ? 1 : 0));
g_plugin.setByte("ifmsgnottop", (uint8_t)(IsDlgButtonChecked(hwndDlg, IDC_IFNOTTOP) == BST_CHECKED ? 1 : 0));
g_plugin.setByte("ifmsgolder", (uint8_t)(IsDlgButtonChecked(hwndDlg, IDC_IFOLDER) == BST_CHECKED ? 1 : 0));
- g_plugin.setWord("secsolder", (WORD)SendDlgItemMessage(hwndDlg, IDC_OLDERSPIN, UDM_GETPOS, 0, 0));
+ g_plugin.setWord("secsolder", (uint16_t)SendDlgItemMessage(hwndDlg, IDC_OLDERSPIN, UDM_GETPOS, 0, 0));
if (IsDlgButtonChecked(hwndDlg, IDC_UNTILBLK) == BST_CHECKED)
untilMap |= UNTIL_NBLINKS;
@@ -763,7 +763,7 @@ static INT_PTR CALLBACK DlgProcBasicOptions(HWND hwndDlg, UINT msg, WPARAM wPara
if (IsDlgButtonChecked(hwndDlg, IDC_UNTILCOND) == BST_CHECKED)
untilMap |= UNTIL_CONDITIONS;
g_plugin.setByte("funtil", untilMap);
- g_plugin.setWord("nblinks", (WORD)SendDlgItemMessage(hwndDlg, IDC_BLINKSPIN, UDM_GETPOS, 0, 0));
+ g_plugin.setWord("nblinks", (uint16_t)SendDlgItemMessage(hwndDlg, IDC_BLINKSPIN, UDM_GETPOS, 0, 0));
g_plugin.setByte("mirorwin", (uint8_t)SendDlgItemMessage(hwndDlg, IDC_MIRORWIN, CB_GETITEMDATA, (WPARAM)SendDlgItemMessage(hwndDlg, IDC_MIRORWIN, CB_GETCURSEL, 0, 0), 0));
if (IsDlgButtonChecked(hwndDlg, IDC_ONLINE) == BST_CHECKED)
@@ -784,13 +784,13 @@ static INT_PTR CALLBACK DlgProcBasicOptions(HWND hwndDlg, UINT msg, WPARAM wPara
statusMap |= MAP_OFFLINE;
g_plugin.setWord("status", statusMap);
- g_plugin.setWord("remcheck", (WORD)SendDlgItemMessage(hwndDlg, IDC_REMCHECK, UDM_GETPOS, 0, 0));
+ g_plugin.setWord("remcheck", (uint16_t)SendDlgItemMessage(hwndDlg, IDC_REMCHECK, UDM_GETPOS, 0, 0));
int i = 0;
for (int j = 0; j < ProcessListAux.count; j++)
if (ProcessListAux.szFileName[j])
g_plugin.setWString(fmtDBSettingName("process%d", i++), ProcessListAux.szFileName[j]);
- g_plugin.setWord("processcount", (WORD)i);
+ g_plugin.setWord("processcount", (uint16_t)i);
while (!g_plugin.delSetting(fmtDBSettingName("process%d", i++)));
if (XstatusListAux)
@@ -939,14 +939,14 @@ static INT_PTR CALLBACK DlgProcEffectOptions(HWND hwndDlg, UINT msg, WPARAM wPar
else
g_plugin.setByte("feffect", FLASH_SAMETIME);
g_plugin.setByte("order", (uint8_t)SendDlgItemMessage(hwndDlg, IDC_SEQORDER, CB_GETITEMDATA, (WPARAM)SendDlgItemMessage(hwndDlg, IDC_SEQORDER, CB_GETCURSEL, 0, 0), 0));
- g_plugin.setWord("custom", (WORD)SendDlgItemMessage(hwndDlg, IDC_SCUSTOM, CB_GETITEMDATA, (WPARAM)SendDlgItemMessage(hwndDlg, IDC_SCUSTOM, CB_GETCURSEL, 0, 0), 0));
+ g_plugin.setWord("custom", (uint16_t)SendDlgItemMessage(hwndDlg, IDC_SCUSTOM, CB_GETITEMDATA, (WPARAM)SendDlgItemMessage(hwndDlg, IDC_SCUSTOM, CB_GETCURSEL, 0, 0), 0));
g_plugin.setByte("ledsmsg", trillianLedsMsg);
g_plugin.setByte("ledsfile", trillianLedsFile);
g_plugin.setByte("ledsurl", trillianLedsURL);
g_plugin.setByte("ledsother", trillianLedsOther);
- g_plugin.setWord("sdelay", (WORD)SendDlgItemMessage(hwndDlg, IDC_DELAYSPIN, UDM_GETPOS, 0, 0));
+ g_plugin.setWord("sdelay", (uint16_t)SendDlgItemMessage(hwndDlg, IDC_DELAYSPIN, UDM_GETPOS, 0, 0));
g_plugin.setByte("speed", (uint8_t)SendDlgItemMessage(hwndDlg, IDC_SPEED, TBM_GETPOS, 0, 0));