summaryrefslogtreecommitdiff
path: root/plugins/Scriver
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2015-01-16 17:49:54 +0000
committerGeorge Hazan <george.hazan@gmail.com>2015-01-16 17:49:54 +0000
commit85c0b6a96f366bdf0ca334ee7cb1877fb3f2288c (patch)
treefe07935255b7432938f282419c3ab1378524c02f /plugins/Scriver
parent8a09c895c4cd0e9cc87c38181ae2913dba77c30b (diff)
MEVENT - the strict type for events, they are not HANDLE anymore
git-svn-id: http://svn.miranda-ng.org/main/trunk@11866 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/Scriver')
-rw-r--r--plugins/Scriver/src/msgdialog.cpp10
-rw-r--r--plugins/Scriver/src/msglog.cpp6
-rw-r--r--plugins/Scriver/src/msgs.cpp6
-rw-r--r--plugins/Scriver/src/msgs.h4
4 files changed, 13 insertions, 13 deletions
diff --git a/plugins/Scriver/src/msgdialog.cpp b/plugins/Scriver/src/msgdialog.cpp
index 830b49d04b..31a3413a90 100644
--- a/plugins/Scriver/src/msgdialog.cpp
+++ b/plugins/Scriver/src/msgdialog.cpp
@@ -852,7 +852,7 @@ INT_PTR CALLBACK DlgProcMessage(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lP
}
DBEVENTINFO dbei = { sizeof(dbei) };
- HANDLE hPrevEvent;
+ MEVENT hPrevEvent;
switch (historyMode) {
case LOADHISTORY_COUNT:
for (int i = db_get_w(NULL, SRMMMOD, SRMSGSET_LOADCOUNT, SRMSGDEFSET_LOADCOUNT); i > 0; i--) {
@@ -896,7 +896,7 @@ INT_PTR CALLBACK DlgProcMessage(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lP
}
SendMessage(dat->hwndParent, CM_ADDCHILD, (WPARAM)hwndDlg, dat->hContact);
{
- HANDLE hdbEvent = db_event_last(dat->hContact);
+ MEVENT hdbEvent = db_event_last(dat->hContact);
if (hdbEvent) {
DBEVENTINFO dbei = { sizeof(dbei) };
do {
@@ -1221,7 +1221,7 @@ INT_PTR CALLBACK DlgProcMessage(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lP
//fall through
case WM_MOUSEACTIVATE:
if (dat->hDbUnreadEventFirst != NULL) {
- HANDLE hDbEvent = dat->hDbUnreadEventFirst;
+ MEVENT hDbEvent = dat->hDbUnreadEventFirst;
dat->hDbUnreadEventFirst = NULL;
while (hDbEvent != NULL) {
DBEVENTINFO dbei = { sizeof(dbei) };
@@ -1311,7 +1311,7 @@ INT_PTR CALLBACK DlgProcMessage(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lP
break;
case DM_APPENDTOLOG: //takes wParam=hDbEvent
- StreamInEvents(hwndDlg, (HANDLE)wParam, 1, 1);
+ StreamInEvents(hwndDlg, wParam, 1, 1);
break;
case DM_SCROLLLOGTOBOTTOM:
@@ -1342,7 +1342,7 @@ INT_PTR CALLBACK DlgProcMessage(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lP
case HM_DBEVENTADDED:
if (wParam == dat->hContact) {
- HANDLE hDbEvent = (HANDLE)lParam;
+ MEVENT hDbEvent = lParam;
DBEVENTINFO dbei = { sizeof(dbei) };
db_event_get(hDbEvent, &dbei);
if (dat->hDbEventFirst == NULL)
diff --git a/plugins/Scriver/src/msglog.cpp b/plugins/Scriver/src/msglog.cpp
index 4d7631dba9..a5f6297500 100644
--- a/plugins/Scriver/src/msglog.cpp
+++ b/plugins/Scriver/src/msglog.cpp
@@ -75,7 +75,7 @@ struct LogStreamData
{
int stage;
MCONTACT hContact;
- HANDLE hDbEvent, hDbEventLast;
+ MEVENT hDbEvent, hDbEventLast;
char *buffer;
size_t bufferOffset, bufferLen;
int eventsToInsert;
@@ -151,7 +151,7 @@ int DbEventIsShown(DBEVENTINFO &dbei)
return DbEventIsCustomForMsgWindow(&dbei);
}
-EventData* getEventFromDB(SrmmWindowData *dat, MCONTACT hContact, HANDLE hDbEvent)
+EventData* getEventFromDB(SrmmWindowData *dat, MCONTACT hContact, MEVENT hDbEvent)
{
DBEVENTINFO dbei = { sizeof(dbei) };
dbei.cbBlob = db_event_getBlobSize(hDbEvent);
@@ -814,7 +814,7 @@ void StreamInTestEvents(HWND hEditWnd, GlobalMessageData *gdat)
SendMessage(hEditWnd, EM_HIDESELECTION, FALSE, 0);
}
-void StreamInEvents(HWND hwndDlg, HANDLE hDbEventFirst, int count, int fAppend)
+void StreamInEvents(HWND hwndDlg, MEVENT hDbEventFirst, int count, int fAppend)
{
FINDTEXTEXA fi;
EDITSTREAM stream = { 0 };
diff --git a/plugins/Scriver/src/msgs.cpp b/plugins/Scriver/src/msgs.cpp
index 913e429db6..e4a6022401 100644
--- a/plugins/Scriver/src/msgs.cpp
+++ b/plugins/Scriver/src/msgs.cpp
@@ -89,7 +89,7 @@ static INT_PTR ReadMessageCommand(WPARAM, LPARAM lParam)
static int MessageEventAdded(WPARAM hContact, LPARAM lParam)
{
- HANDLE hDbEvent = (HANDLE)lParam;
+ MEVENT hDbEvent = (MEVENT)lParam;
DBEVENTINFO dbei = { sizeof(dbei) };
db_event_get(hDbEvent, &dbei);
if (dbei.eventType == EVENTTYPE_MESSAGE && (dbei.flags & DBEF_READ))
@@ -221,7 +221,7 @@ static int TypingMessage(WPARAM hContact, LPARAM lParam)
else {
CLISTEVENT cle = { sizeof(cle) };
cle.hContact = hContact;
- cle.hDbEvent = (HANDLE)1;
+ cle.hDbEvent = 1;
cle.flags = CLEF_ONLYAFEW | CLEF_TCHAR;
cle.hIcon = GetCachedIcon("scriver_TYPING");
cle.pszService = "SRMsg/TypingMessage";
@@ -263,7 +263,7 @@ static void RestoreUnreadMessageAlerts(void)
cle.ptszTooltip = toolTip;
for (MCONTACT hContact = db_find_first(); hContact; hContact = db_find_next(hContact)) {
- for (HANDLE hDbEvent = db_event_firstUnread(hContact); hDbEvent; hDbEvent = db_event_next(hContact, hDbEvent)) {
+ for (MEVENT hDbEvent = db_event_firstUnread(hContact); hDbEvent; hDbEvent = db_event_next(hContact, hDbEvent)) {
dbei.cbBlob = 0;
db_event_get(hDbEvent, &dbei);
if (!(dbei.flags & (DBEF_SENT | DBEF_READ)) && DbEventIsMessageOrCustom(&dbei)) {
diff --git a/plugins/Scriver/src/msgs.h b/plugins/Scriver/src/msgs.h
index c823caff29..cc991e6c87 100644
--- a/plugins/Scriver/src/msgs.h
+++ b/plugins/Scriver/src/msgs.h
@@ -119,7 +119,7 @@ struct SrmmWindowData : public CommonWindowData
MCONTACT hContact;
int tabId;
HWND hwndParent;
- HANDLE hDbEventFirst, hDbEventLast, hDbUnreadEventFirst;
+ MEVENT hDbEventFirst, hDbEventLast, hDbUnreadEventFirst;
int splitterPos;
int desiredInputAreaHeight;
SIZE toolbarSize;
@@ -225,7 +225,7 @@ INT_PTR CALLBACK ErrorDlgProc(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lPar
int DbEventIsShown(DBEVENTINFO &dbei);
int DbEventIsCustomForMsgWindow(DBEVENTINFO *dbei);
int DbEventIsMessageOrCustom(DBEVENTINFO *dbei);
-void StreamInEvents(HWND hwndDlg, HANDLE hDbEventFirst, int count, int fAppend);
+void StreamInEvents(HWND hwndDlg, MEVENT hDbEventFirst, int count, int fAppend);
void LoadMsgLogIcons(void);
void FreeMsgLogIcons(void);
TCHAR *GetNickname(MCONTACT hContact, const char *szProto);