summaryrefslogtreecommitdiff
path: root/plugins/Scriver/src/msgs.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/Scriver/src/msgs.cpp')
-rw-r--r--plugins/Scriver/src/msgs.cpp52
1 files changed, 26 insertions, 26 deletions
diff --git a/plugins/Scriver/src/msgs.cpp b/plugins/Scriver/src/msgs.cpp
index f4f9133162..ffc1f0c14a 100644
--- a/plugins/Scriver/src/msgs.cpp
+++ b/plugins/Scriver/src/msgs.cpp
@@ -27,7 +27,7 @@ HCURSOR hCurSplitNS, hCurSplitWE, hCurHyperlinkHand, hDragCursor;
HANDLE hHookWinEvt, hHookWinPopup, hHookWinWrite;
HGENMENU hMsgMenuItem;
-extern HWND GetParentWindow(HCONTACT hContact, BOOL bChat);
+extern HWND GetParentWindow(MCONTACT hContact, BOOL bChat);
#define EVENTTYPE_SCRIVER 2010
#define SCRIVER_DB_GETEVENTTEXT "Scriver/GetText"
@@ -59,11 +59,11 @@ static int SRMMStatusToPf2(int status)
return 0;
}
-int IsAutoPopup(HCONTACT hContact) {
+int IsAutoPopup(MCONTACT hContact) {
if (g_dat.flags & SMF_AUTOPOPUP) {
char *szProto = GetContactProto(hContact);
if (strcmp(szProto, "MetaContacts") == 0 ) {
- hContact = (HCONTACT)CallService(MS_MC_GETMOSTONLINECONTACT, (WPARAM)hContact, 0);
+ hContact = (MCONTACT)CallService(MS_MC_GETMOSTONLINECONTACT, (WPARAM)hContact, 0);
if (hContact != NULL)
szProto = GetContactProto(hContact);
}
@@ -96,7 +96,7 @@ static int MessageEventAdded(WPARAM wParam, LPARAM lParam)
if (dbei.eventType == EVENTTYPE_MESSAGE && (dbei.flags & DBEF_READ))
return 0;
- HWND hwnd = WindowList_Find(g_dat.hMessageWindowList, (HCONTACT)wParam);
+ HWND hwnd = WindowList_Find(g_dat.hMessageWindowList, (MCONTACT)wParam);
if (hwnd)
SendMessage(hwnd, HM_DBEVENTADDED, wParam, lParam);
@@ -108,9 +108,9 @@ static int MessageEventAdded(WPARAM wParam, LPARAM lParam)
if (hwnd == NULL) {
/* new message */
SkinPlaySound("AlertMsg");
- if (IsAutoPopup((HCONTACT)wParam)) {
+ if (IsAutoPopup((MCONTACT)wParam)) {
NewMessageWindowLParam newData = { 0 };
- newData.hContact = (HCONTACT)wParam;
+ newData.hContact = (MCONTACT)wParam;
HWND hParent = GetParentWindow(newData.hContact, FALSE);
newData.flags = NMWLP_INCOMING;
CreateDialogParam(g_hInst, MAKEINTRESOURCE(IDD_MSG), hParent, DlgProcMessage, (LPARAM)&newData);
@@ -123,7 +123,7 @@ static int MessageEventAdded(WPARAM wParam, LPARAM lParam)
CLISTEVENT cle = { sizeof(cle) };
cle.flags = CLEF_TCHAR;
- cle.hContact = (HCONTACT)wParam;
+ cle.hContact = (MCONTACT)wParam;
cle.hDbEvent = (HANDLE)lParam;
cle.hIcon = LoadSkinnedIcon(SKINICON_EVENT_MESSAGE);
cle.pszService = "SRMsg/ReadMessage";
@@ -136,15 +136,15 @@ static int MessageEventAdded(WPARAM wParam, LPARAM lParam)
static INT_PTR SendMessageCommandW(WPARAM wParam, LPARAM lParam)
{
- /* does the HCONTACT's protocol support IM messages? */
- char *szProto = GetContactProto((HCONTACT)wParam);
+ /* does the MCONTACT's protocol support IM messages? */
+ char *szProto = GetContactProto((MCONTACT)wParam);
if (szProto == NULL)
return 1; /* unknown contact */
if (!CallProtoService(szProto, PS_GETCAPS, PFLAGNUM_1, 0) & PF1_IMSEND)
return 1;
- HWND hwnd = WindowList_Find(g_dat.hMessageWindowList, (HCONTACT)wParam);
+ HWND hwnd = WindowList_Find(g_dat.hMessageWindowList, (MCONTACT)wParam);
if (hwnd != NULL) {
if (lParam) {
HWND hEdit = GetDlgItem(hwnd, IDC_MESSAGE);
@@ -155,7 +155,7 @@ static INT_PTR SendMessageCommandW(WPARAM wParam, LPARAM lParam)
}
else {
NewMessageWindowLParam newData = { 0 };
- newData.hContact = (HCONTACT)wParam;
+ newData.hContact = (MCONTACT)wParam;
newData.szInitialText = (const char *) lParam;
newData.isWchar = 1;
HWND hParent = GetParentWindow(newData.hContact, FALSE);
@@ -166,17 +166,17 @@ static INT_PTR SendMessageCommandW(WPARAM wParam, LPARAM lParam)
static INT_PTR SendMessageCommand(WPARAM wParam, LPARAM lParam)
{
- char *szProto = GetContactProto((HCONTACT)wParam);
+ char *szProto = GetContactProto((MCONTACT)wParam);
//logInfo("Show message window for: %s (%s)", CallService(MS_CLIST_GETCONTACTDISPLAYNAME, wParam, 0), szProto);
if (szProto) {
- /* does the HCONTACT's protocol support IM messages? */
+ /* does the MCONTACT's protocol support IM messages? */
if (!CallProtoService(szProto, PS_GETCAPS, PFLAGNUM_1, 0) & PF1_IMSEND)
return 1;
}
else /* unknown contact */
return 1;
- HWND hwnd = WindowList_Find(g_dat.hMessageWindowList, (HCONTACT)wParam);
+ HWND hwnd = WindowList_Find(g_dat.hMessageWindowList, (MCONTACT)wParam);
if (hwnd != NULL) {
if (lParam) {
HWND hEdit = GetDlgItem(hwnd, IDC_MESSAGE);
@@ -187,7 +187,7 @@ static INT_PTR SendMessageCommand(WPARAM wParam, LPARAM lParam)
}
else {
NewMessageWindowLParam newData = { 0 };
- newData.hContact = (HCONTACT)wParam;
+ newData.hContact = (MCONTACT)wParam;
newData.szInitialText = (const char *)lParam;
HWND hParent = GetParentWindow(newData.hContact, FALSE);
CreateDialogParam(g_hInst, MAKEINTRESOURCE(IDD_MSG), hParent, DlgProcMessage, (LPARAM)& newData);
@@ -210,7 +210,7 @@ static int TypingMessage(WPARAM wParam, LPARAM lParam)
SkinPlaySound((lParam) ? "TNStart" : "TNStop");
- HWND hwnd = WindowList_Find(g_dat.hMessageWindowList, (HCONTACT)wParam);
+ HWND hwnd = WindowList_Find(g_dat.hMessageWindowList, (MCONTACT)wParam);
if (hwnd)
SendMessage(hwnd, DM_TYPING, 0, lParam);
else if (lParam && (g_dat.flags2 & SMF2_SHOWTYPINGTRAY)) {
@@ -231,7 +231,7 @@ static int TypingMessage(WPARAM wParam, LPARAM lParam)
CLISTEVENT cle = {0};
cle.cbSize = sizeof(cle);
- cle.hContact = (HCONTACT)wParam;
+ cle.hContact = (MCONTACT)wParam;
cle.hDbEvent = (HANDLE)1;
cle.flags = CLEF_ONLYAFEW | CLEF_TCHAR;
cle.hIcon = GetCachedIcon("scriver_TYPING");
@@ -247,7 +247,7 @@ static int TypingMessage(WPARAM wParam, LPARAM lParam)
static int MessageSettingChanged(WPARAM wParam, LPARAM lParam)
{
DBCONTACTWRITESETTING *cws = (DBCONTACTWRITESETTING *) lParam;
- char *szProto = GetContactProto((HCONTACT)wParam);
+ char *szProto = GetContactProto((MCONTACT)wParam);
if (lstrcmpA(cws->szModule, "CList") && (szProto == NULL || lstrcmpA(cws->szModule, szProto)))
return 0;
WindowList_Broadcast(g_dat.hMessageWindowList, DM_CLISTSETTINGSCHANGED, wParam, lParam);
@@ -257,7 +257,7 @@ static int MessageSettingChanged(WPARAM wParam, LPARAM lParam)
static int ContactDeleted(WPARAM wParam, LPARAM lParam)
{
HWND hwnd;
- if ((hwnd = WindowList_Find(g_dat.hMessageWindowList, (HCONTACT)wParam)))
+ if ((hwnd = WindowList_Find(g_dat.hMessageWindowList, (MCONTACT)wParam)))
SendMessage(hwnd, WM_CLOSE, 0, 0);
return 0;
}
@@ -274,7 +274,7 @@ static void RestoreUnreadMessageAlerts(void)
cle.flags = CLEF_TCHAR;
cle.ptszTooltip = toolTip;
- for (HCONTACT hContact = db_find_first(); hContact; hContact = db_find_next(hContact)) {
+ for (MCONTACT hContact = db_find_first(); hContact; hContact = db_find_next(hContact)) {
HANDLE hDbEvent = db_event_firstUnread(hContact);
while (hDbEvent) {
dbei.cbBlob = 0;
@@ -338,9 +338,9 @@ static INT_PTR GetWindowData(WPARAM wParam, LPARAM lParam)
static INT_PTR SetStatusText(WPARAM wParam, LPARAM lParam)
{
- HWND hwnd = WindowList_Find(g_dat.hMessageWindowList, (HCONTACT)wParam);
+ HWND hwnd = WindowList_Find(g_dat.hMessageWindowList, (MCONTACT)wParam);
if (hwnd == NULL)
- hwnd = SM_FindWindowByContact((HCONTACT)wParam);
+ hwnd = SM_FindWindowByContact((MCONTACT)wParam);
if (hwnd == NULL)
return 1;
@@ -354,7 +354,7 @@ static INT_PTR SetStatusText(WPARAM wParam, LPARAM lParam)
static int PrebuildContactMenu(WPARAM wParam, LPARAM lParam)
{
- HCONTACT hContact = (HCONTACT)wParam;
+ MCONTACT hContact = (MCONTACT)wParam;
if (hContact == 0)
return 0;
@@ -376,7 +376,7 @@ static int AvatarChanged(WPARAM wParam, LPARAM lParam)
if (wParam == 0) // protocol picture has changed...
WindowList_Broadcast(g_dat.hMessageWindowList, DM_AVATARCHANGED, wParam, lParam);
else {
- HWND hwnd = WindowList_Find(g_dat.hMessageWindowList, (HCONTACT)wParam);
+ HWND hwnd = WindowList_Find(g_dat.hMessageWindowList, (MCONTACT)wParam);
SendMessage(hwnd, DM_AVATARCHANGED, wParam, lParam);
}
return 0;
@@ -407,9 +407,9 @@ void ChangeStatusIcons()
int StatusIconPressed(WPARAM wParam, LPARAM lParam)
{
StatusIconClickData *sicd = (StatusIconClickData *) lParam;
- HWND hwnd = WindowList_Find(g_dat.hMessageWindowList, (HCONTACT)wParam);
+ HWND hwnd = WindowList_Find(g_dat.hMessageWindowList, (MCONTACT)wParam);
if (hwnd == NULL)
- hwnd = SM_FindWindowByContact((HCONTACT)wParam);
+ hwnd = SM_FindWindowByContact((MCONTACT)wParam);
if (hwnd != NULL) {
if (!strcmp(SRMMMOD, sicd->szModule)) {