diff options
| author | George Hazan <ghazan@miranda.im> | 2021-12-26 17:06:04 +0300 |
|---|---|---|
| committer | George Hazan <ghazan@miranda.im> | 2021-12-26 17:06:04 +0300 |
| commit | 1039b2829a264280493ba0fa979214fe024dc70c (patch) | |
| tree | 8fa6a60eb46627582c372b56a4a1d4754d6732c3 /include | |
| parent | 62a186697df33c96dc1a6dac0f4dfc38652fb96f (diff) | |
WORD -> uint16_t
Diffstat (limited to 'include')
| -rw-r--r-- | include/m_chat_int.h | 18 | ||||
| -rw-r--r-- | include/m_clistint.h | 4 | ||||
| -rw-r--r-- | include/m_database.h | 20 | ||||
| -rw-r--r-- | include/m_gui.h | 36 | ||||
| -rw-r--r-- | include/m_hotkeys.h | 2 | ||||
| -rw-r--r-- | include/m_netlib.h | 8 | ||||
| -rw-r--r-- | include/m_protoint.h | 8 | ||||
| -rw-r--r-- | include/m_protosvc.h | 2 | ||||
| -rw-r--r-- | include/m_types.h | 1 | ||||
| -rw-r--r-- | include/newpluginapi.h | 4 |
10 files changed, 51 insertions, 52 deletions
diff --git a/include/m_chat_int.h b/include/m_chat_int.h index 434f93a5c3..a44aa5245b 100644 --- a/include/m_chat_int.h +++ b/include/m_chat_int.h @@ -82,7 +82,7 @@ struct USERINFO : public MZeroedObject, public MNonCopyable {
wchar_t* pszUID;
wchar_t* pszNick;
- WORD Status;
+ uint16_t Status;
int iStatusEx;
WORD ContactStatus;
};
@@ -153,9 +153,9 @@ struct MIR_APP_EXPORT GCSessionInfoBase : public MZeroedObject, public MNonCopya int iEventCount;
int iStatusCount;
- WORD wStatus;
- WORD wState;
- WORD wCommandsNum;
+ uint16_t wStatus;
+ uint16_t wState;
+ uint16_t wCommandsNum;
void* pItemData;
time_t LastTime;
@@ -293,16 +293,16 @@ struct CHAT_MANAGER BOOL (*MM_RemoveAll)(void);
STATUSINFO* (*TM_FindStatus)(STATUSINFO *pStatusList, const wchar_t *pszStatus);
- wchar_t* (*TM_WordToString)(STATUSINFO *pStatusList, WORD Status);
+ wchar_t* (*TM_WordToString)(STATUSINFO *pStatusList, uint16_t Status);
BOOL (*TM_RemoveAll)(STATUSINFO** pStatusList);
int (*UM_CompareItem)(const USERINFO *u1, const USERINFO *u2);
- USERINFO* (*UM_AddUser)(SESSION_INFO *si, const wchar_t *pszUID, const wchar_t *pszNick, WORD wStatus);
+ USERINFO* (*UM_AddUser)(SESSION_INFO *si, const wchar_t *pszUID, const wchar_t *pszNick, uint16_t wStatus);
USERINFO* (*UM_FindUser)(SESSION_INFO *si, const wchar_t *pszUID);
USERINFO* (*UM_FindUserFromIndex)(SESSION_INFO *si, int index);
- USERINFO* (*UM_GiveStatus)(SESSION_INFO *si, const wchar_t *pszUID, WORD status);
- USERINFO* (*UM_SetContactStatus)(SESSION_INFO *si, const wchar_t *pszUID, WORD status);
- USERINFO* (*UM_TakeStatus)(SESSION_INFO *si, const wchar_t *pszUID, WORD status);
+ USERINFO* (*UM_GiveStatus)(SESSION_INFO *si, const wchar_t *pszUID, uint16_t status);
+ USERINFO* (*UM_SetContactStatus)(SESSION_INFO *si, const wchar_t *pszUID, uint16_t status);
+ USERINFO* (*UM_TakeStatus)(SESSION_INFO *si, const wchar_t *pszUID, uint16_t status);
wchar_t* (*UM_FindUserAutoComplete)(SESSION_INFO *si, const wchar_t* pszOriginal, const wchar_t* pszCurrent);
BOOL (*UM_RemoveUser)(SESSION_INFO *si, const wchar_t *pszUID);
diff --git a/include/m_clistint.h b/include/m_clistint.h index 339ed32aa8..a1c0ea5815 100644 --- a/include/m_clistint.h +++ b/include/m_clistint.h @@ -109,11 +109,11 @@ struct ClcContactBase MCONTACT hContact;
};
struct {
- WORD groupId;
+ uint16_t groupId;
ClcGroup *group;
};
};
- WORD iExtraImage[EXTRA_ICON_COUNT];
+ uint16_t iExtraImage[EXTRA_ICON_COUNT];
wchar_t szText[120-EXTRA_ICON_COUNT];
ClcCacheEntry *pce; // cache is persistent, contacts aren't
};
diff --git a/include/m_database.h b/include/m_database.h index 838506f38d..a34aba57fa 100644 --- a/include/m_database.h +++ b/include/m_database.h @@ -146,17 +146,17 @@ struct DBVARIANT uint8_t type; union { uint8_t bVal; char cVal; - WORD wVal; short sVal; + uint16_t wVal; short sVal; DWORD dVal; long lVal; struct { union { char *pszVal; wchar_t *pwszVal; }; - WORD cchVal; //only used for db/contact/getsettingstatic + uint16_t cchVal; //only used for db/contact/getsettingstatic }; struct { - WORD cpbVal; + uint16_t cpbVal; uint8_t *pbVal; }; }; @@ -176,10 +176,10 @@ struct DBEVENTINFO DWORD timestamp; // seconds since 00:00, 01/01/1970. Gives us times until 2106 // unless you use the standard C library which is // signed and can only do until 2038. In GMT. - DWORD flags; // combination of DBEF_* flags - WORD eventType; // module-defined event type field - int cbBlob; // size of pBlob in bytes - uint8_t *pBlob; // pointer to buffer containing module-defined event data + DWORD flags; // combination of DBEF_* flags + uint16_t eventType; // module-defined event type field + int cbBlob; // size of pBlob in bytes + uint8_t *pBlob; // pointer to buffer containing module-defined event data const char *szId; // server id bool __forceinline markedRead() const { @@ -383,7 +383,7 @@ EXTERN_C MIR_CORE_DLL(int) db_get_wstatic(MCONTACT hContact, const char *sz EXTERN_C MIR_CORE_DLL(INT_PTR) db_set(MCONTACT hContact, const char *szModule, const char *szSetting, DBVARIANT *dbv); EXTERN_C MIR_CORE_DLL(INT_PTR) db_set_b(MCONTACT hContact, const char *szModule, const char *szSetting, uint8_t val); -EXTERN_C MIR_CORE_DLL(INT_PTR) db_set_w(MCONTACT hContact, const char *szModule, const char *szSetting, WORD val); +EXTERN_C MIR_CORE_DLL(INT_PTR) db_set_w(MCONTACT hContact, const char *szModule, const char *szSetting, uint16_t val); EXTERN_C MIR_CORE_DLL(INT_PTR) db_set_dw(MCONTACT hContact, const char *szModule, const char *szSetting, DWORD val); EXTERN_C MIR_CORE_DLL(INT_PTR) db_set_s(MCONTACT hContact, const char *szModule, const char *szSetting, const char *val); EXTERN_C MIR_CORE_DLL(INT_PTR) db_set_ws(MCONTACT hContact, const char *szModule, const char *szSetting, const wchar_t *val); @@ -653,9 +653,9 @@ __inline uint8_t DBGetContactSettingRangedByte(MCONTACT hContact, const char *sz return (bVal < minValue || bVal > maxValue) ? errorValue : bVal; } -__inline WORD DBGetContactSettingRangedWord(MCONTACT hContact, const char *szModule, const char *szSetting, WORD errorValue, WORD minValue, WORD maxValue) +__inline uint16_t DBGetContactSettingRangedWord(MCONTACT hContact, const char *szModule, const char *szSetting, uint16_t errorValue, uint16_t minValue, uint16_t maxValue) { - WORD wVal = db_get_w(hContact, szModule, szSetting, errorValue); + uint16_t wVal = db_get_w(hContact, szModule, szSetting, errorValue); return (wVal < minValue || wVal > maxValue) ? errorValue : wVal; } diff --git a/include/m_gui.h b/include/m_gui.h index 537507f54b..91f8ac95b3 100644 --- a/include/m_gui.h +++ b/include/m_gui.h @@ -65,7 +65,7 @@ struct CMDBTraits<1> template<> struct CMDBTraits<2> { - typedef WORD DBType; + typedef uint16_t DBType; enum { DBTypeId = DBVT_WORD }; static __forceinline DBType Get(const char *szModule, const char *szSetting, DBType value) { @@ -516,7 +516,7 @@ public: int GetInt() const; - virtual BOOL OnCommand(HWND /*hwndCtrl*/, WORD /*idCtrl*/, WORD /*idCode*/) { return FALSE; } + virtual BOOL OnCommand(HWND /*hwndCtrl*/, uint16_t /*idCtrl*/, uint16_t /*idCode*/) { return FALSE; } virtual BOOL OnNotify(int /*idCtrl*/, NMHDR* /*pnmh*/) { return FALSE; } virtual BOOL OnMeasureItem(MEASUREITEMSTRUCT*) { return FALSE; } @@ -571,7 +571,7 @@ class MIR_CORE_EXPORT CCtrlButton : public CCtrlBase public: CCtrlButton(CDlgBase *dlg, int ctrlId); - BOOL OnCommand(HWND hwndCtrl, WORD idCtrl, WORD idCode) override; + BOOL OnCommand(HWND hwndCtrl, uint16_t idCtrl, uint16_t idCode) override; CCallback<CCtrlButton> OnClick; @@ -631,7 +631,7 @@ class MIR_CORE_EXPORT CCtrlHyperlink : public CCtrlBase public: CCtrlHyperlink(CDlgBase *dlg, int ctrlId, const char* url = nullptr); - BOOL OnCommand(HWND hwndCtrl, WORD idCtrl, WORD idCode) override; + BOOL OnCommand(HWND hwndCtrl, uint16_t idCtrl, uint16_t idCode) override; CCallback<CCtrlHyperlink> OnClick; @@ -652,10 +652,10 @@ class MIR_CORE_EXPORT CCtrlProgress : public CCtrlBase public: CCtrlProgress(CDlgBase *dlg, int ctrlId); - void SetRange(WORD max, WORD min = 0); - void SetPosition(WORD value); - void SetStep(WORD value); - WORD Move(WORD delta = 0); + void SetRange(uint16_t max, uint16_t min = 0); + void SetPosition(uint16_t value); + void SetStep(uint16_t value); + uint16_t Move(uint16_t delta = 0); }; ///////////////////////////////////////////////////////////////////////////////////////// @@ -771,7 +771,7 @@ class MIR_CORE_EXPORT CCtrlCheck : public CCtrlData public: CCtrlCheck(CDlgBase *dlg, int ctrlId); - BOOL OnCommand(HWND /*hwndCtrl*/, WORD /*idCtrl*/, WORD /*idCode*/) override; + BOOL OnCommand(HWND /*hwndCtrl*/, uint16_t /*idCtrl*/, uint16_t /*idCode*/) override; bool OnApply() override; void OnReset() override; @@ -791,7 +791,7 @@ class MIR_CORE_EXPORT CCtrlColor : public CCtrlData public: CCtrlColor(CDlgBase *dlg, int ctrlId); - BOOL OnCommand(HWND /*hwndCtrl*/, WORD /*idCtrl*/, WORD /*idCode*/) override; + BOOL OnCommand(HWND /*hwndCtrl*/, uint16_t /*idCtrl*/, uint16_t /*idCode*/) override; bool OnApply() override; void OnReset() override; @@ -825,7 +825,7 @@ class MIR_CORE_EXPORT CCtrlEdit : public CCtrlData public: CCtrlEdit(CDlgBase *dlg, int ctrlId); - BOOL OnCommand(HWND /*hwndCtrl*/, WORD /*idCtrl*/, WORD idCode) override; + BOOL OnCommand(HWND /*hwndCtrl*/, uint16_t /*idCtrl*/, uint16_t idCode) override; bool OnApply() override; void OnReset() override; @@ -868,7 +868,7 @@ class MIR_CORE_EXPORT CCtrlSlider : public CCtrlData int m_wMin, m_wMax; protected: - BOOL OnCommand(HWND hwndCtrl, WORD idCtrl, WORD idCode) override; + BOOL OnCommand(HWND hwndCtrl, uint16_t idCtrl, uint16_t idCode) override; public: CCtrlSlider(CDlgBase *dlg, int ctrlId, int max = 100, int min = 0); @@ -887,18 +887,18 @@ class MIR_CORE_EXPORT CCtrlSpin : public CCtrlData { typedef CCtrlData CSuper; - WORD m_wMin, m_wMax, m_wCurr; + uint16_t m_wMin, m_wMax, m_wCurr; BOOL OnNotify(int, NMHDR*) override; public: - CCtrlSpin(CDlgBase *dlg, int ctrlId, WORD max = 100, WORD min = 0); + CCtrlSpin(CDlgBase *dlg, int ctrlId, uint16_t max = 100, uint16_t min = 0); bool OnApply() override; void OnReset() override; - WORD GetPosition(); - void SetPosition(WORD pos); + uint16_t GetPosition(); + void SetPosition(uint16_t pos); }; ///////////////////////////////////////////////////////////////////////////////////////// @@ -938,7 +938,7 @@ public: CCallback<CCtrlListBox> OnSelChange; protected: - BOOL OnCommand(HWND hwndCtrl, WORD idCtrl, WORD idCode) override; + BOOL OnCommand(HWND hwndCtrl, uint16_t idCtrl, uint16_t idCode) override; void GetCaretPos(CContextMenuPos&) const override; }; @@ -952,7 +952,7 @@ class MIR_CORE_EXPORT CCtrlCombo : public CCtrlData public: CCtrlCombo(CDlgBase *dlg, int ctrlId); - BOOL OnCommand(HWND /*hwndCtrl*/, WORD /*idCtrl*/, WORD idCode) override; + BOOL OnCommand(HWND /*hwndCtrl*/, uint16_t /*idCtrl*/, uint16_t idCode) override; void OnInit() override; bool OnApply() override; void OnReset() override; diff --git a/include/m_hotkeys.h b/include/m_hotkeys.h index 712af60f15..382ee9738a 100644 --- a/include/m_hotkeys.h +++ b/include/m_hotkeys.h @@ -38,7 +38,7 @@ struct HOTKEYDESC MAllStrings szDescription; // description for options dialog
MAllStrings szSection; // section name used to group sounds (NULL is acceptable)
const char *pszService; // Service to call when HotKey Pressed
- WORD DefHotKey; // default hot key for action
+ uint16_t DefHotKey; // default hot key for action
DWORD dwFlags; // one of HKD_* constants
LPARAM lParam; // lParam to pass to service
};
diff --git a/include/m_netlib.h b/include/m_netlib.h index 161c1056c4..b322e1866c 100644 --- a/include/m_netlib.h +++ b/include/m_netlib.h @@ -272,7 +272,7 @@ struct NETLIBBIND // new connection, IP of remote machine (host byte order) DWORD dwInternalIP; // set on return, host byte order DWORD dwExternalIP; // set on return, host byte order - WORD wPort, wExPort; // set on return, host byte order + uint16_t wPort, wExPort; // set on return, host byte order void *pExtra; // argument is sent to callback }; @@ -316,8 +316,8 @@ EXTERN_C MIR_APP_DLL(HNETLIBBIND) Netlib_BindPort(HNETLIBUSER nlu, NETLIBBIND *n struct NETLIBOPENCONNECTION { - const char *szHost; // can contain the string representation of an IP - WORD wPort; // host byte order + const char *szHost; // can contain the string representation of an IP + uint16_t wPort; // host byte order DWORD flags; unsigned int timeout; /* optional, called in the context of the thread that issued the attempt, if it returns 0 the connection attempt is @@ -398,7 +398,7 @@ struct NETLIBCONNINFO { char szIpPort[64]; unsigned dwIpv4; - WORD wPort; + uint16_t wPort; }; EXTERN_C MIR_APP_DLL(int) Netlib_GetConnectionInfo(HNETLIBCONN hConnection, NETLIBCONNINFO *connInfo); diff --git a/include/m_protoint.h b/include/m_protoint.h index 6f41d51de3..4876656bd9 100644 --- a/include/m_protoint.h +++ b/include/m_protoint.h @@ -114,9 +114,9 @@ public: __forceinline int getByte(MCONTACT hContact, const char *name, uint8_t defaultValue = 0) { return db_get_b(hContact, m_szModuleName, name, defaultValue); } - __forceinline int getWord(const char *name, WORD defaultValue = 0) { + __forceinline int getWord(const char *name, uint16_t defaultValue = 0) { return db_get_w(0, m_szModuleName, name, defaultValue); } - __forceinline int getWord(MCONTACT hContact, const char *name, WORD defaultValue = 0) { + __forceinline int getWord(MCONTACT hContact, const char *name, uint16_t defaultValue = 0) { return db_get_w(hContact, m_szModuleName, name, defaultValue); } __forceinline DWORD getDword(const char *name, DWORD defaultValue = 0) { @@ -167,8 +167,8 @@ public: __forceinline void setByte(const char *name, uint8_t value) { db_set_b(0, m_szModuleName, name, value); } __forceinline void setByte(MCONTACT hContact, const char *name, uint8_t value) { db_set_b(hContact, m_szModuleName, name, value); } - __forceinline void setWord(const char *name, WORD value) { db_set_w(0, m_szModuleName, name, value); } - __forceinline void setWord(MCONTACT hContact, const char *name, WORD value) { db_set_w(hContact, m_szModuleName, name, value); } + __forceinline void setWord(const char *name, uint16_t value) { db_set_w(0, m_szModuleName, name, value); } + __forceinline void setWord(MCONTACT hContact, const char *name, uint16_t value) { db_set_w(hContact, m_szModuleName, name, value); } __forceinline void setDword(const char *name, DWORD value) { db_set_dw(0, m_szModuleName, name, value); } __forceinline void setDword(MCONTACT hContact, const char *name, DWORD value) { db_set_dw(hContact, m_szModuleName, name, value); } diff --git a/include/m_protosvc.h b/include/m_protosvc.h index 715f222da3..09181e5e58 100644 --- a/include/m_protosvc.h +++ b/include/m_protosvc.h @@ -478,7 +478,7 @@ struct PROTOFILERESUME ///////////////////////////////////////////////////////////////////////////////
// Asks protocol for the status message for a status
-// wParam = (WORD) 0 for current status or a status id
+// wParam = (uint16_t)0 for current status or a status id
// lParam = SGMA_xxx
// Returns status msg or NULL if there is none. The protocol have to handle only the current
// status. Handling messages for other statuses is optional.
diff --git a/include/m_types.h b/include/m_types.h index c01c838de2..13208cc993 100644 --- a/include/m_types.h +++ b/include/m_types.h @@ -54,7 +54,6 @@ using namespace std; typedef void *HANDLE; typedef int BOOL, SOCKET; -typedef uint16_t WORD; typedef uint32_t UINT, COLORREF; typedef intptr_t WPARAM, LPARAM, INT_PTR; typedef uintptr_t UINT_PTR, DWORD_PTR, LRESULT; diff --git a/include/newpluginapi.h b/include/newpluginapi.h index ee0cc479bb..41b474cc8a 100644 --- a/include/newpluginapi.h +++ b/include/newpluginapi.h @@ -343,11 +343,11 @@ public: db_set_b(hContact, m_szModuleName, name, value); } - __forceinline void setWord(const char *name, WORD value) + __forceinline void setWord(const char *name, uint16_t value) { db_set_w(0, m_szModuleName, name, value); } - __forceinline void setWord(MCONTACT hContact, const char *name, WORD value) + __forceinline void setWord(MCONTACT hContact, const char *name, uint16_t value) { db_set_w(hContact, m_szModuleName, name, value); } |
