summaryrefslogtreecommitdiff
path: root/plugins/Scriver/src
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2014-02-10 20:47:51 +0000
committerGeorge Hazan <george.hazan@gmail.com>2014-02-10 20:47:51 +0000
commit68d3fd47bb9b75e65859d14199ffee01f16ac9a7 (patch)
treefcc340ad7067561e57733b287f193a7dbed93dd4 /plugins/Scriver/src
parent7193759b046338c6f47ff2edb34743a1465791cd (diff)
HCONTACT is not needed anymore
git-svn-id: http://svn.miranda-ng.org/main/trunk@8086 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/Scriver/src')
-rw-r--r--plugins/Scriver/src/chat/chat.h4
-rw-r--r--plugins/Scriver/src/chat/manager.cpp2
-rw-r--r--plugins/Scriver/src/chat/tools.cpp2
-rw-r--r--plugins/Scriver/src/cmdlist.cpp6
-rw-r--r--plugins/Scriver/src/cmdlist.h8
-rw-r--r--plugins/Scriver/src/commonheaders.h2
-rw-r--r--plugins/Scriver/src/globals.h2
-rw-r--r--plugins/Scriver/src/input.cpp2
-rw-r--r--plugins/Scriver/src/input.h2
-rw-r--r--plugins/Scriver/src/msgdialog.cpp18
-rw-r--r--plugins/Scriver/src/msglog.cpp8
-rw-r--r--plugins/Scriver/src/msgoptions.cpp4
-rw-r--r--plugins/Scriver/src/msgs.cpp52
-rw-r--r--plugins/Scriver/src/msgs.h12
-rw-r--r--plugins/Scriver/src/msgwindow.cpp24
-rw-r--r--plugins/Scriver/src/msgwindow.h8
-rw-r--r--plugins/Scriver/src/sendqueue.cpp6
-rw-r--r--plugins/Scriver/src/sendqueue.h8
-rw-r--r--plugins/Scriver/src/statusicon.cpp8
-rw-r--r--plugins/Scriver/src/statusicon.h6
20 files changed, 92 insertions, 92 deletions
diff --git a/plugins/Scriver/src/chat/chat.h b/plugins/Scriver/src/chat/chat.h
index 4481f69b4e..7b8bb4d3d7 100644
--- a/plugins/Scriver/src/chat/chat.h
+++ b/plugins/Scriver/src/chat/chat.h
@@ -93,7 +93,7 @@ INT_PTR CALLBACK DlgProcColorToolWindow(HWND hwndDlg, UINT msg, WPARAM wParam, L
void Log_StreamInEvent(HWND hwndDlg, LOGINFO* lin, SESSION_INFO *si, BOOL bRedraw);
void LoadMsgLogBitmaps(void);
void FreeMsgLogBitmaps(void);
-TCHAR* GetChatLogsFilename(HCONTACT hContact, time_t tTime);
+TCHAR* GetChatLogsFilename(MCONTACT hContact, time_t tTime);
// window.c
int GetTextPixelSize( TCHAR* pszText, HFONT hFont, BOOL bWidth);
@@ -105,7 +105,7 @@ int OptionsInit(void);
void ShowRoom(SESSION_INFO *si, WPARAM wp, BOOL bSetForeground);
// manager.c
-HWND SM_FindWindowByContact(HCONTACT hContact);
+HWND SM_FindWindowByContact(MCONTACT hContact);
SESSION_INFO* SM_FindSessionAutoComplete(const char* pszModule, SESSION_INFO* currSession, SESSION_INFO* prevSession, const TCHAR* pszOriginal, const TCHAR* pszCurrent);
char SM_GetStatusIndicator(SESSION_INFO *si, USERINFO *ui);
diff --git a/plugins/Scriver/src/chat/manager.cpp b/plugins/Scriver/src/chat/manager.cpp
index 51b1b7b4e0..63a2a0309d 100644
--- a/plugins/Scriver/src/chat/manager.cpp
+++ b/plugins/Scriver/src/chat/manager.cpp
@@ -21,7 +21,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#include "../commonheaders.h"
-HWND SM_FindWindowByContact(HCONTACT hContact)
+HWND SM_FindWindowByContact(MCONTACT hContact)
{
SESSION_INFO *pTemp = pci->wndList;
diff --git a/plugins/Scriver/src/chat/tools.cpp b/plugins/Scriver/src/chat/tools.cpp
index 196d868a7f..6ae7991e30 100644
--- a/plugins/Scriver/src/chat/tools.cpp
+++ b/plugins/Scriver/src/chat/tools.cpp
@@ -152,7 +152,7 @@ BOOL DoEventHookAsync(HWND hwnd, const TCHAR *pszID, const char* pszModule, int
return TRUE;
}
-TCHAR* GetChatLogsFilename(HCONTACT hContact, time_t tTime)
+TCHAR* GetChatLogsFilename(MCONTACT hContact, time_t tTime)
{
REPLACEVARSARRAY rva[11];
TCHAR *p = { 0 }, *tszParsedName = { 0 };
diff --git a/plugins/Scriver/src/cmdlist.cpp b/plugins/Scriver/src/cmdlist.cpp
index 1c6669877b..7cbdd96b4f 100644
--- a/plugins/Scriver/src/cmdlist.cpp
+++ b/plugins/Scriver/src/cmdlist.cpp
@@ -71,7 +71,7 @@ TCmdList *tcmdlist_remove(TCmdList *list, TCmdList *n)
return list;
}
-TCmdList *tcmdlist_append2(TCmdList *list, HCONTACT hContact, const char *data)
+TCmdList *tcmdlist_append2(TCmdList *list, MCONTACT hContact, const char *data)
{
TCmdList *new_list = (TCmdList *)mir_alloc(sizeof(TCmdList));
TCmdList *attach_to = NULL;
@@ -98,7 +98,7 @@ TCmdList *tcmdlist_append2(TCmdList *list, HCONTACT hContact, const char *data)
return list;
}
-TCmdList *tcmdlist_remove2(TCmdList *list, HCONTACT hContact)
+TCmdList *tcmdlist_remove2(TCmdList *list, MCONTACT hContact)
{
for (TCmdList *n = list; n != NULL; n = n->next) {
if (n->hContact == hContact) {
@@ -113,7 +113,7 @@ TCmdList *tcmdlist_remove2(TCmdList *list, HCONTACT hContact)
return list;
}
-TCmdList *tcmdlist_get2(TCmdList *list, HCONTACT hContact)
+TCmdList *tcmdlist_get2(TCmdList *list, MCONTACT hContact)
{
for (TCmdList *n = list; n != NULL; n = n->next)
if (n->hContact == hContact)
diff --git a/plugins/Scriver/src/cmdlist.h b/plugins/Scriver/src/cmdlist.h
index 1c2509ad31..7198be8437 100644
--- a/plugins/Scriver/src/cmdlist.h
+++ b/plugins/Scriver/src/cmdlist.h
@@ -24,7 +24,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
typedef struct _TCmdList {
struct _TCmdList *next;
struct _TCmdList *prev;
- HCONTACT hContact;
+ MCONTACT hContact;
char *szCmd;
BOOL temporary;
} TCmdList;
@@ -32,9 +32,9 @@ typedef struct _TCmdList {
TCmdList *tcmdlist_append(TCmdList *list, const char *data, int maxSize, BOOL temporary);
TCmdList *tcmdlist_remove(TCmdList *list, TCmdList *n);
TCmdList *tcmdlist_remove_first(TCmdList *list);
-TCmdList *tcmdlist_append2(TCmdList *list, HCONTACT hContact, const char *data);
-TCmdList *tcmdlist_remove2(TCmdList *list, HCONTACT hContact);
-TCmdList *tcmdlist_get2(TCmdList *list, HCONTACT hContact);
+TCmdList *tcmdlist_append2(TCmdList *list, MCONTACT hContact, const char *data);
+TCmdList *tcmdlist_remove2(TCmdList *list, MCONTACT hContact);
+TCmdList *tcmdlist_get2(TCmdList *list, MCONTACT hContact);
int tcmdlist_len(TCmdList *list);
TCmdList *tcmdlist_last(TCmdList *list);
void tcmdlist_free(TCmdList * list);
diff --git a/plugins/Scriver/src/commonheaders.h b/plugins/Scriver/src/commonheaders.h
index 9061830df1..198b661de9 100644
--- a/plugins/Scriver/src/commonheaders.h
+++ b/plugins/Scriver/src/commonheaders.h
@@ -102,7 +102,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#define CFM_WEIGHT 0x00400000
#endif
-extern HWND SM_FindWindowByContact(HCONTACT hContact);
+extern HWND SM_FindWindowByContact(MCONTACT hContact);
extern HINSTANCE g_hInst;
extern CREOleCallback reOleCallback;
extern void ChangeStatusIcons();
diff --git a/plugins/Scriver/src/globals.h b/plugins/Scriver/src/globals.h
index 65ae3b8706..9fce7a273c 100644
--- a/plugins/Scriver/src/globals.h
+++ b/plugins/Scriver/src/globals.h
@@ -129,7 +129,7 @@ void ReleaseIcons();
void LoadGlobalIcons();
HICON GetCachedIcon(const char *name);
void RegisterFontServiceFonts();
-int ScriverRestoreWindowPosition(HWND hwnd,HCONTACT hContact,const char *szModule,const char *szNamePrefix, int flags, int showCmd);
+int ScriverRestoreWindowPosition(HWND hwnd,MCONTACT hContact,const char *szModule,const char *szNamePrefix, int flags, int showCmd);
int ImageList_AddIcon_Ex(HIMAGELIST hIml, int id);
int ImageList_AddIcon_Ex2(HIMAGELIST hIml, HICON hIcon);
diff --git a/plugins/Scriver/src/input.cpp b/plugins/Scriver/src/input.cpp
index 01d286fd0a..aeaf2482df 100644
--- a/plugins/Scriver/src/input.cpp
+++ b/plugins/Scriver/src/input.cpp
@@ -29,7 +29,7 @@ enum KB_ACTIONS {KB_PREV_TAB = 1, KB_NEXT_TAB, KB_SWITCHTOOLBAR,
KB_SWITCHSTATUSBAR, KB_SWITCHTITLEBAR, KB_SWITCHINFOBAR, KB_MINIMIZE, KB_CLOSE, KB_CLEAR_LOG,
KB_TAB1, KB_TAB2, KB_TAB3, KB_TAB4, KB_TAB5, KB_TAB6, KB_TAB7, KB_TAB8, KB_TAB9, KB_SEND_ALL, KB_PASTESEND, KB_QUOTE};
-void InputAreaContextMenu(HWND hwnd, WPARAM wParam, LPARAM lParam, HCONTACT hContact)
+void InputAreaContextMenu(HWND hwnd, WPARAM wParam, LPARAM lParam, MCONTACT hContact)
{
POINT pt;
CHARRANGE sel, all = { 0, -1 };
diff --git a/plugins/Scriver/src/input.h b/plugins/Scriver/src/input.h
index a36c5b02e0..874b58ce9e 100644
--- a/plugins/Scriver/src/input.h
+++ b/plugins/Scriver/src/input.h
@@ -23,7 +23,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#ifndef INPUT_H
#define INPUT_H
-extern void InputAreaContextMenu(HWND hwnd, WPARAM wParam, LPARAM lParam, HCONTACT hContact);
+extern void InputAreaContextMenu(HWND hwnd, WPARAM wParam, LPARAM lParam, MCONTACT hContact);
extern void RegisterKeyBindings();
extern int InputAreaShortcuts(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam, CommonWindowData *windowData);
BOOL HandleLinkClick(HINSTANCE hInstance, HWND hwndDlg, HWND hwndFocus, ENLINK *lParam);
diff --git a/plugins/Scriver/src/msgdialog.cpp b/plugins/Scriver/src/msgdialog.cpp
index 8d7856eb8b..2c7755f21c 100644
--- a/plugins/Scriver/src/msgdialog.cpp
+++ b/plugins/Scriver/src/msgdialog.cpp
@@ -131,7 +131,7 @@ static TCHAR *GetQuotedTextW(TCHAR * text)
return out;
}
-static void saveDraftMessage(HWND hwnd, HCONTACT hContact, int codepage)
+static void saveDraftMessage(HWND hwnd, MCONTACT hContact, int codepage)
{
char *textBuffer = GetRichTextEncoded(hwnd, codepage);
if (textBuffer != NULL) {
@@ -141,7 +141,7 @@ static void saveDraftMessage(HWND hwnd, HCONTACT hContact, int codepage)
else g_dat.draftList = tcmdlist_remove2(g_dat.draftList, hContact);
}
-void NotifyLocalWinEvent(HCONTACT hContact, HWND hwnd, unsigned int type)
+void NotifyLocalWinEvent(MCONTACT hContact, HWND hwnd, unsigned int type)
{
if (hContact == NULL || hwnd == NULL)
return;
@@ -158,7 +158,7 @@ void NotifyLocalWinEvent(HCONTACT hContact, HWND hwnd, unsigned int type)
NotifyEventHooks(hHookWinEvt, 0, (LPARAM)&mwe);
}
-static BOOL IsUtfSendAvailable(HCONTACT hContact)
+static BOOL IsUtfSendAvailable(MCONTACT hContact)
{
char* szProto = GetContactProto(hContact);
if ( szProto == NULL )
@@ -255,12 +255,12 @@ void SetStatusIcon(struct SrmmWindowData *dat)
return;
char *szProto = dat->szProto;
- HCONTACT hContact = dat->windowData.hContact;
+ MCONTACT hContact = dat->windowData.hContact;
char* szMetaProto = (char*)CallService(MS_MC_GETPROTOCOLNAME, 0, 0);
if ((INT_PTR)szMetaProto != CALLSERVICE_NOTFOUND && strcmp(dat->szProto, szMetaProto) == 0 &&
db_get_b(NULL,"CLC","Meta",0) == 0) {
- hContact = (HCONTACT)CallService(MS_MC_GETMOSTONLINECONTACT, (WPARAM)dat->windowData.hContact, 0);
+ hContact = (MCONTACT)CallService(MS_MC_GETMOSTONLINECONTACT, (WPARAM)dat->windowData.hContact, 0);
if (hContact != NULL)
szProto = GetContactProto(hContact);
else
@@ -1093,7 +1093,7 @@ INT_PTR CALLBACK DlgProcMessage(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lP
break;
case DM_CLISTSETTINGSCHANGED:
- if ((HCONTACT)wParam == dat->windowData.hContact) {
+ if ((MCONTACT)wParam == dat->windowData.hContact) {
if (dat->windowData.hContact && dat->szProto) {
DBCONTACTWRITESETTING *cws = (DBCONTACTWRITESETTING *) lParam;
char idbuf[128];
@@ -1353,7 +1353,7 @@ INT_PTR CALLBACK DlgProcMessage(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lP
case DM_REMAKELOG:
dat->lastEventType = -1;
- if (wParam == 0 || (HCONTACT)wParam == dat->windowData.hContact)
+ if (wParam == 0 || (MCONTACT)wParam == dat->windowData.hContact)
StreamInEvents(hwndDlg, dat->hDbEventFirst, -1, 0);
InvalidateRect(GetDlgItem(hwndDlg, IDC_LOG), NULL, FALSE);
@@ -1390,7 +1390,7 @@ INT_PTR CALLBACK DlgProcMessage(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lP
break;
case HM_DBEVENTADDED:
- if ((HCONTACT)wParam == dat->windowData.hContact) {
+ if ((MCONTACT)wParam == dat->windowData.hContact) {
HANDLE hDbEvent = (HANDLE)lParam;
DBEVENTINFO dbei = { sizeof(dbei) };
db_event_get(hDbEvent, &dbei);
@@ -1773,7 +1773,7 @@ INT_PTR CALLBACK DlgProcMessage(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lP
smaddInfo.targetWParam = TRUE;
smaddInfo.Protocolname = dat->szProto;
if (dat->szProto!=NULL && strcmp(dat->szProto,"MetaContacts") == 0) {
- HCONTACT hContact = (HCONTACT)CallService(MS_MC_GETMOSTONLINECONTACT, (WPARAM)dat->windowData.hContact, 0);
+ MCONTACT hContact = (MCONTACT)CallService(MS_MC_GETMOSTONLINECONTACT, (WPARAM)dat->windowData.hContact, 0);
if (hContact!=NULL) {
smaddInfo.Protocolname = GetContactProto(hContact);
}
diff --git a/plugins/Scriver/src/msglog.cpp b/plugins/Scriver/src/msglog.cpp
index 0a14b4575f..cb59b9b61b 100644
--- a/plugins/Scriver/src/msglog.cpp
+++ b/plugins/Scriver/src/msglog.cpp
@@ -74,7 +74,7 @@ struct EventData
struct LogStreamData
{
int stage;
- HCONTACT hContact;
+ MCONTACT hContact;
HANDLE hDbEvent, hDbEventLast;
char *buffer;
int bufferOffset, bufferLen;
@@ -85,7 +85,7 @@ struct LogStreamData
EventData *events;
};
-TCHAR *GetNickname(HCONTACT hContact, const char* szProto)
+TCHAR *GetNickname(MCONTACT hContact, const char* szProto)
{
CONTACTINFO ci = { sizeof(ci) };
ci.hContact = hContact;
@@ -151,7 +151,7 @@ int DbEventIsShown(DBEVENTINFO * dbei, struct SrmmWindowData *dat)
return DbEventIsCustomForMsgWindow(dbei);
}
-EventData* getEventFromDB(struct SrmmWindowData *dat, HCONTACT hContact, HANDLE hDbEvent)
+EventData* getEventFromDB(struct SrmmWindowData *dat, MCONTACT hContact, HANDLE hDbEvent)
{
DBEVENTINFO dbei = { sizeof(dbei) };
dbei.cbBlob = db_event_getBlobSize(hDbEvent);
@@ -922,7 +922,7 @@ void StreamInEvents(HWND hwndDlg, HANDLE hDbEventFirst, int count, int fAppend)
smre.hwndRichEditControl = GetDlgItem(hwndDlg, IDC_LOG);
smre.Protocolname = dat->szProto;
if (dat->szProto != NULL && strcmp(dat->szProto, "MetaContacts") == 0) {
- HCONTACT hContact = (HCONTACT)CallService(MS_MC_GETMOSTONLINECONTACT, (WPARAM)dat->windowData.hContact, 0);
+ MCONTACT hContact = (MCONTACT)CallService(MS_MC_GETMOSTONLINECONTACT, (WPARAM)dat->windowData.hContact, 0);
if (hContact != NULL)
smre.Protocolname = GetContactProto(hContact);
}
diff --git a/plugins/Scriver/src/msgoptions.cpp b/plugins/Scriver/src/msgoptions.cpp
index 962ae1dfc2..d7413db3f1 100644
--- a/plugins/Scriver/src/msgoptions.cpp
+++ b/plugins/Scriver/src/msgoptions.cpp
@@ -845,7 +845,7 @@ static void RebuildList(HWND hwndDlg, HANDLE hItemNew, HANDLE hItemUnknown)
if (hItemUnknown && db_get_b(NULL, SRMMMOD, SRMSGSET_TYPINGUNKNOWN, SRMSGDEFSET_TYPINGUNKNOWN))
SendDlgItemMessage(hwndDlg, IDC_CLIST, CLM_SETCHECKMARK, (WPARAM)hItemUnknown, 1);
- 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 hItem = (HANDLE)SendDlgItemMessage(hwndDlg, IDC_CLIST, CLM_FINDCONTACT, (WPARAM)hContact, 0);
if (hItem && db_get_b(hContact, SRMMMOD, SRMSGSET_TYPING, defType))
SendDlgItemMessage(hwndDlg, IDC_CLIST, CLM_SETCHECKMARK, (WPARAM)hItem, 1);
@@ -860,7 +860,7 @@ static void SaveList(HWND hwndDlg, HANDLE hItemNew, HANDLE hItemUnknown)
if (hItemUnknown)
db_set_b(NULL, SRMMMOD, SRMSGSET_TYPINGUNKNOWN, (BYTE)(SendDlgItemMessage(hwndDlg, IDC_CLIST, CLM_GETCHECKMARK, (WPARAM)hItemUnknown, 0) ? 1 : 0));
- 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 hItem = (HANDLE)SendDlgItemMessage(hwndDlg, IDC_CLIST, CLM_FINDCONTACT, (WPARAM)hContact, 0);
if (hItem)
db_set_b(hContact, SRMMMOD, SRMSGSET_TYPING, (BYTE)(SendDlgItemMessage(hwndDlg, IDC_CLIST, CLM_GETCHECKMARK, (WPARAM)hItem, 0) ? 1 : 0));
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)) {
diff --git a/plugins/Scriver/src/msgs.h b/plugins/Scriver/src/msgs.h
index 9272e3638b..055d65b742 100644
--- a/plugins/Scriver/src/msgs.h
+++ b/plugins/Scriver/src/msgs.h
@@ -61,7 +61,7 @@ struct TabCtrlData
struct ParentWindowData
{
HWND hwnd;
- HCONTACT hContact;
+ MCONTACT hContact;
int childrenCount;
HWND hwndActive;
HWND hwndStatus;
@@ -84,7 +84,7 @@ struct ParentWindowData
struct MessageWindowTabData
{
HWND hwnd;
- HCONTACT hContact;
+ MCONTACT hContact;
char *szProto;
ParentWindowData *parent;
HICON hIcon;
@@ -94,7 +94,7 @@ struct MessageWindowTabData
struct NewMessageWindowLParam
{
- HCONTACT hContact;
+ MCONTACT hContact;
BOOL isChat;
int isWchar;
LPCSTR szInitialText;
@@ -105,7 +105,7 @@ struct NewMessageWindowLParam
struct CommonWindowData
{
- HCONTACT hContact;
+ MCONTACT hContact;
int codePage;
DWORD flags;
HWND hwndLog;
@@ -230,8 +230,8 @@ int safe_wcslen(wchar_t *msg, int maxLen);
void StreamInEvents(HWND hwndDlg, HANDLE hDbEventFirst, int count, int fAppend);
void LoadMsgLogIcons(void);
void FreeMsgLogIcons(void);
-TCHAR *GetNickname(HCONTACT hContact, const char* szProto);
-int IsAutoPopup(HCONTACT hContact);
+TCHAR *GetNickname(MCONTACT hContact, const char* szProto);
+int IsAutoPopup(MCONTACT hContact);
#define MSGFONTID_MYMSG 0
#define MSGFONTID_YOURMSG 1
diff --git a/plugins/Scriver/src/msgwindow.cpp b/plugins/Scriver/src/msgwindow.cpp
index ffa0b80403..e079d7e7af 100644
--- a/plugins/Scriver/src/msgwindow.cpp
+++ b/plugins/Scriver/src/msgwindow.cpp
@@ -33,11 +33,11 @@ static void DrawTab(ParentWindowData *dat, HWND hwnd, WPARAM wParam, LPARAM lPa
/////////////////////////////////////////////////////////////////////////////////////////
-extern TCHAR *GetNickname(HCONTACT hContact, const char* szProto);
+extern TCHAR *GetNickname(MCONTACT hContact, const char* szProto);
static const TCHAR *titleTokenNames[] = {_T("%name%"), _T("%status%"), _T("%statusmsg%"), _T("%account%")};
-TCHAR* GetWindowTitle(HCONTACT hContact, const char *szProto)
+TCHAR* GetWindowTitle(MCONTACT hContact, const char *szProto)
{
int isTemplate;
int i, j, len;
@@ -135,7 +135,7 @@ TCHAR* GetWindowTitle(HCONTACT hContact, const char *szProto)
return title;
}
-TCHAR* GetTabName(HCONTACT hContact)
+TCHAR* GetTabName(MCONTACT hContact)
{
if (hContact)
return GetNickname(hContact, NULL);
@@ -317,7 +317,7 @@ static void ActivateChild(ParentWindowData *dat, HWND child)
SendMessage(dat->hwndActive, DM_ACTIVATE, WA_ACTIVE, 0);
}
-static void AddChild(ParentWindowData *dat, HWND hwnd, HCONTACT hContact)
+static void AddChild(ParentWindowData *dat, HWND hwnd, MCONTACT hContact)
{
MessageWindowTabData *mwtd = (MessageWindowTabData *)mir_alloc(sizeof(MessageWindowTabData));
mwtd->hwnd = hwnd;
@@ -549,13 +549,13 @@ LRESULT CALLBACK TabCtrlProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam)
MessageWindowTabData *mwtd = (MessageWindowTabData *)tci.lParam;
if (mwtd != NULL) {
HWND hChild = mwtd->hwnd;
- HCONTACT hContact = mwtd->hContact;
+ MCONTACT hContact = mwtd->hContact;
GetCursorPos(&pt);
HWND hParent = WindowFromPoint(pt);
while (GetParent(hParent) != NULL)
hParent = GetParent(hParent);
- hParent = WindowList_Find(g_dat.hParentWindowList, (HCONTACT)hParent);
+ hParent = WindowList_Find(g_dat.hParentWindowList, (MCONTACT)hParent);
if ((hParent != NULL && hParent != GetParent(hwnd)) || (hParent == NULL && mwtd->parent->childrenCount > 1 && (GetKeyState(VK_CONTROL) & 0x8000))) {
if (hParent == NULL) {
RECT rc, rcDesktop;
@@ -774,12 +774,12 @@ INT_PTR CALLBACK DlgProcParentWindow(HWND hwndDlg, UINT msg, WPARAM wParam, LPAR
if (dat->prev != NULL)
dat->prev->next = dat;
- WindowList_Add(g_dat.hParentWindowList, hwndDlg, (HCONTACT)hwndDlg);
+ WindowList_Add(g_dat.hParentWindowList, hwndDlg, (MCONTACT)hwndDlg);
SubclassTabCtrl(dat->hwndTabs);
SetContainerWindowStyle(dat);
- HCONTACT hSContact = savePerContact ? dat->hContact : NULL;
+ MCONTACT hSContact = savePerContact ? dat->hContact : NULL;
dat->bTopmost = db_get_b(hSContact, SRMMMOD, SRMSGSET_TOPMOST, SRMSGDEFSET_TOPMOST);
if (ScriverRestoreWindowPosition(hwndDlg, hSContact, SRMMMOD, (newData->isChat && !savePerContact) ? "chat" : "", 0, SW_HIDE))
SetWindowPos(hwndDlg, 0, 0, 0, 450, 300, SWP_NOZORDER | SWP_NOMOVE | SWP_HIDEWINDOW);
@@ -1128,7 +1128,7 @@ INT_PTR CALLBACK DlgProcParentWindow(HWND hwndDlg, UINT msg, WPARAM wParam, LPAR
WindowList_Remove(g_dat.hParentWindowList, hwndDlg);
int savePerContact = db_get_b(NULL, SRMMMOD, SRMSGSET_SAVEPERCONTACT, SRMSGDEFSET_SAVEPERCONTACT);
- HCONTACT hContact = (savePerContact) ? dat->hContact : NULL;
+ MCONTACT hContact = (savePerContact) ? dat->hContact : NULL;
WINDOWPLACEMENT wp = { sizeof(wp) };
GetWindowPlacement(hwndDlg, &wp);
@@ -1207,7 +1207,7 @@ INT_PTR CALLBACK DlgProcParentWindow(HWND hwndDlg, UINT msg, WPARAM wParam, LPAR
return TRUE;
case CM_ADDCHILD:
- AddChild(dat, (HWND)wParam, (HCONTACT)lParam);
+ AddChild(dat, (HWND)wParam, (MCONTACT)lParam);
return TRUE;
case CM_ACTIVATECHILD:
@@ -1506,7 +1506,7 @@ static void DrawTab(ParentWindowData *dat, HWND hwnd, WPARAM wParam, LPARAM lPar
}
}
-int ScriverRestoreWindowPosition(HWND hwnd, HCONTACT hContact, const char *szModule,const char *szNamePrefix, int flags, int showCmd)
+int ScriverRestoreWindowPosition(HWND hwnd, MCONTACT hContact, const char *szModule,const char *szNamePrefix, int flags, int showCmd)
{
WINDOWPLACEMENT wp;
wp.length = sizeof(wp);
@@ -1544,7 +1544,7 @@ int ScriverRestoreWindowPosition(HWND hwnd, HCONTACT hContact, const char *szMod
return 0;
}
-HWND GetParentWindow(HCONTACT hContact, BOOL bChat)
+HWND GetParentWindow(MCONTACT hContact, BOOL bChat)
{
NewMessageWindowLParam newData = { 0 };
newData.hContact = hContact;
diff --git a/plugins/Scriver/src/msgwindow.h b/plugins/Scriver/src/msgwindow.h
index c1977b23bd..500e671cf3 100644
--- a/plugins/Scriver/src/msgwindow.h
+++ b/plugins/Scriver/src/msgwindow.h
@@ -88,9 +88,9 @@ struct TabControlData
HICON hIcon;
};
-TCHAR* GetWindowTitle(HCONTACT hContact, const char *szProto);
-TCHAR* GetTabName(HCONTACT hContact);
-HWND GetParentWindow(HCONTACT hContact, BOOL bChat);
-void NotifyLocalWinEvent(HCONTACT hContact, HWND hwnd, unsigned int type);
+TCHAR* GetWindowTitle(MCONTACT hContact, const char *szProto);
+TCHAR* GetTabName(MCONTACT hContact);
+HWND GetParentWindow(MCONTACT hContact, BOOL bChat);
+void NotifyLocalWinEvent(MCONTACT hContact, HWND hwnd, unsigned int type);
#endif
diff --git a/plugins/Scriver/src/sendqueue.cpp b/plugins/Scriver/src/sendqueue.cpp
index 0328efb80a..6175c87d22 100644
--- a/plugins/Scriver/src/sendqueue.cpp
+++ b/plugins/Scriver/src/sendqueue.cpp
@@ -66,7 +66,7 @@ MessageSendQueueItem* CreateSendQueueItem(HWND hwndSender)
return item;
}
-MessageSendQueueItem* FindOldestPendingSendQueueItem(HWND hwndSender, HCONTACT hContact)
+MessageSendQueueItem* FindOldestPendingSendQueueItem(HWND hwndSender, MCONTACT hContact)
{
MessageSendQueueItem *item, *found = NULL;
EnterCriticalSection(&queueMutex);
@@ -79,7 +79,7 @@ MessageSendQueueItem* FindOldestPendingSendQueueItem(HWND hwndSender, HCONTACT h
return found;
}
-MessageSendQueueItem* FindSendQueueItem(HCONTACT hContact, HANDLE hSendId)
+MessageSendQueueItem* FindSendQueueItem(MCONTACT hContact, HANDLE hSendId)
{
mir_cslock lock(queueMutex);
for (MessageSendQueueItem *item = global_sendQueue; item != NULL; item = item->next)
@@ -159,7 +159,7 @@ void ReleaseSendQueueItems(HWND hwndSender)
}
}
-int ReattachSendQueueItems(HWND hwndSender, HCONTACT hContact)
+int ReattachSendQueueItems(HWND hwndSender, MCONTACT hContact)
{
int count = 0;
diff --git a/plugins/Scriver/src/sendqueue.h b/plugins/Scriver/src/sendqueue.h
index 204deec72a..688c7bd629 100644
--- a/plugins/Scriver/src/sendqueue.h
+++ b/plugins/Scriver/src/sendqueue.h
@@ -27,7 +27,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
struct MessageSendQueueItem
{
HWND hwndSender;
- HCONTACT hContact;
+ MCONTACT hContact;
char *proto;
HANDLE hSendId;
int timeout;
@@ -44,12 +44,12 @@ void InitSendQueue();
void DestroySendQueue();
MessageSendQueueItem* CreateSendQueueItem(HWND hwndSender);
TCHAR * GetSendBufferMsg(MessageSendQueueItem *item);
-MessageSendQueueItem* FindOldestPendingSendQueueItem(HWND hwndSender, HCONTACT hContact);
-MessageSendQueueItem* FindSendQueueItem(HCONTACT hContact, HANDLE hSendId);
+MessageSendQueueItem* FindOldestPendingSendQueueItem(HWND hwndSender, MCONTACT hContact);
+MessageSendQueueItem* FindSendQueueItem(MCONTACT hContact, HANDLE hSendId);
BOOL RemoveSendQueueItem(MessageSendQueueItem* item);
void ReportSendQueueTimeouts(HWND hwndSender);
void ReleaseSendQueueItems(HWND hwndSender);
-int ReattachSendQueueItems(HWND hwndSender, HCONTACT hContact);
+int ReattachSendQueueItems(HWND hwndSender, MCONTACT hContact);
void RemoveAllSendQueueItems();
void SendSendQueueItem(MessageSendQueueItem* item);
diff --git a/plugins/Scriver/src/statusicon.cpp b/plugins/Scriver/src/statusicon.cpp
index 28b26064f6..65af9ce66e 100644
--- a/plugins/Scriver/src/statusicon.cpp
+++ b/plugins/Scriver/src/statusicon.cpp
@@ -25,7 +25,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
HANDLE hHookIconPressedEvt;
-void DrawStatusIcons(HCONTACT hContact, HDC hDC, RECT r, int gap)
+void DrawStatusIcons(MCONTACT hContact, HDC hDC, RECT r, int gap)
{
HICON hIcon;
int x = r.left;
@@ -42,7 +42,7 @@ void DrawStatusIcons(HCONTACT hContact, HDC hDC, RECT r, int gap)
}
}
-void CheckStatusIconClick(HCONTACT hContact, HWND hwndFrom, POINT pt, RECT r, int gap, int click_flags)
+void CheckStatusIconClick(MCONTACT hContact, HWND hwndFrom, POINT pt, RECT r, int gap, int click_flags)
{
unsigned int iconNum = (pt.x - r.left) / (GetSystemMetrics(SM_CXSMICON) + gap);
StatusIconData *si = Srmm_GetNthIcon(hContact, iconNum);
@@ -61,7 +61,7 @@ void CheckStatusIconClick(HCONTACT hContact, HWND hwndFrom, POINT pt, RECT r, in
static int OnSrmmIconChanged(WPARAM wParam, LPARAM)
{
- HCONTACT hContact = (HCONTACT)wParam;
+ MCONTACT hContact = (MCONTACT)wParam;
if (hContact == NULL)
WindowList_Broadcast(g_dat.hParentWindowList, DM_STATUSICONCHANGE, 0, 0);
else {
@@ -88,7 +88,7 @@ int DeinitStatusIcons()
return 0;
}
-int GetStatusIconsCount(HCONTACT hContact)
+int GetStatusIconsCount(MCONTACT hContact)
{
int nIcon = 0;
while ( Srmm_GetNthIcon(hContact, nIcon) != NULL)
diff --git a/plugins/Scriver/src/statusicon.h b/plugins/Scriver/src/statusicon.h
index 5d86eb7e22..232bb06c47 100644
--- a/plugins/Scriver/src/statusicon.h
+++ b/plugins/Scriver/src/statusicon.h
@@ -26,7 +26,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
int InitStatusIcons();
int DeinitStatusIcons();
-int GetStatusIconsCount(HCONTACT hContact);
-void DrawStatusIcons(HCONTACT hContact, HDC hdc, RECT r, int gap);
-void CheckStatusIconClick(HCONTACT hContact, HWND hwndFrom, POINT pt, RECT rc, int gap, int flags);
+int GetStatusIconsCount(MCONTACT hContact);
+void DrawStatusIcons(MCONTACT hContact, HDC hdc, RECT r, int gap);
+void CheckStatusIconClick(MCONTACT hContact, HWND hwndFrom, POINT pt, RECT rc, int gap, int flags);
#endif