summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2023-05-21 13:56:23 +0300
committerGeorge Hazan <george.hazan@gmail.com>2023-05-21 13:56:23 +0300
commitec8a7614a371f41937dc1dbc2d53289e45706e3a (patch)
treee5937361b3a7ce11eb9b1dbba9debc2d5c1b7339 /src
parentd93053e9cca314179eea3fff202a32f8ec74b770 (diff)
static function pfnGetEvent removed from CLIST_INTERFACE
Diffstat (limited to 'src')
-rw-r--r--src/core/stdfile/src/file.cpp2
-rw-r--r--src/core/stdmsg/src/msgdialog.cpp2
-rw-r--r--src/core/stdmsg/src/tabs.cpp2
-rw-r--r--src/mir_app/src/chat_clist.cpp2
-rw-r--r--src/mir_app/src/chat_manager.cpp2
-rw-r--r--src/mir_app/src/chat_tools.cpp6
-rw-r--r--src/mir_app/src/clc.h1
-rw-r--r--src/mir_app/src/clistcore.cpp1
-rw-r--r--src/mir_app/src/clistevents.cpp2
-rw-r--r--src/mir_app/src/mir_app.def1
-rw-r--r--src/mir_app/src/mir_app64.def1
11 files changed, 11 insertions, 11 deletions
diff --git a/src/core/stdfile/src/file.cpp b/src/core/stdfile/src/file.cpp
index 652da6a36c..20e9ba44a9 100644
--- a/src/core/stdfile/src/file.cpp
+++ b/src/core/stdfile/src/file.cpp
@@ -266,7 +266,7 @@ static int SRFileProtoAck(WPARAM, LPARAM lParam)
ACKDATA *ack = (ACKDATA*)lParam;
if (ack->type == ACKTYPE_FILE) {
int iEvent = 0;
- while (CLISTEVENT *cle = g_clistApi.pfnGetEvent(ack->hContact, iEvent++))
+ while (auto *cle = Clist_GetEvent(ack->hContact, iEvent++))
if (cle->lParam == (LPARAM)ack->hProcess)
g_clistApi.pfnRemoveEvent(ack->hContact, cle->hDbEvent);
}
diff --git a/src/core/stdmsg/src/msgdialog.cpp b/src/core/stdmsg/src/msgdialog.cpp
index 22f16ec7c4..63fde09620 100644
--- a/src/core/stdmsg/src/msgdialog.cpp
+++ b/src/core/stdmsg/src/msgdialog.cpp
@@ -272,7 +272,7 @@ void CMsgDialog::OnActivate()
if (db_get_w(m_hContact, m_si->pszModule, "ApparentMode", 0) != 0)
db_set_w(m_hContact, m_si->pszModule, "ApparentMode", 0);
- if (g_clistApi.pfnGetEvent(m_hContact, 0))
+ if (Clist_GetEvent(m_hContact, 0))
g_clistApi.pfnRemoveEvent(m_hContact, GC_FAKE_EVENT);
}
else {
diff --git a/src/core/stdmsg/src/tabs.cpp b/src/core/stdmsg/src/tabs.cpp
index fcce849ab8..e6a5d34e93 100644
--- a/src/core/stdmsg/src/tabs.cpp
+++ b/src/core/stdmsg/src/tabs.cpp
@@ -476,7 +476,7 @@ void CTabbedWindow::TabClicked()
if (si->wState & GC_EVENT_HIGHLIGHT) {
si->wState &= ~GC_EVENT_HIGHLIGHT;
- if (g_clistApi.pfnGetEvent(si->hContact, 0))
+ if (Clist_GetEvent(si->hContact, 0))
g_clistApi.pfnRemoveEvent(si->hContact, GC_FAKE_EVENT);
}
diff --git a/src/mir_app/src/chat_clist.cpp b/src/mir_app/src/chat_clist.cpp
index 2246219438..37e32e0d95 100644
--- a/src/mir_app/src/chat_clist.cpp
+++ b/src/mir_app/src/chat_clist.cpp
@@ -129,7 +129,7 @@ int RoomDoubleclicked(WPARAM hContact, LPARAM)
SESSION_INFO *si = Chat_Find(roomid, szProto);
if (si) {
- if (si->pDlg != nullptr && !g_clistApi.pfnGetEvent(hContact, 0) && IsWindowVisible(si->pDlg->GetHwnd()) && !IsIconic(si->pDlg->GetHwnd())) {
+ if (si->pDlg != nullptr && !Clist_GetEvent(hContact, 0) && IsWindowVisible(si->pDlg->GetHwnd()) && !IsIconic(si->pDlg->GetHwnd())) {
si->pDlg->CloseTab();
return 1;
}
diff --git a/src/mir_app/src/chat_manager.cpp b/src/mir_app/src/chat_manager.cpp
index 49f39c0883..394f0d16e7 100644
--- a/src/mir_app/src/chat_manager.cpp
+++ b/src/mir_app/src/chat_manager.cpp
@@ -113,7 +113,7 @@ static SESSION_INFO* SM_CreateSession(void)
void SM_FreeSession(SESSION_INFO *si)
{
- if (g_clistApi.pfnGetEvent(si->hContact, 0))
+ if (Clist_GetEvent(si->hContact, 0))
g_clistApi.pfnRemoveEvent(si->hContact, GC_FAKE_EVENT);
si->wState &= ~STATE_TALK;
db_set_w(si->hContact, si->pszModule, "ApparentMode", 0);
diff --git a/src/mir_app/src/chat_tools.cpp b/src/mir_app/src/chat_tools.cpp
index e06e4ab30f..cbe06d3d77 100644
--- a/src/mir_app/src/chat_tools.cpp
+++ b/src/mir_app/src/chat_tools.cpp
@@ -132,11 +132,11 @@ static void AddEvent(MCONTACT hContact, HICON hIcon, int type, const wchar_t *pw
CreateServiceFunction(cle.pszService, &EventDoubleclicked);
if (type) {
- if (!g_clistApi.pfnGetEvent(hContact, 0))
+ if (!Clist_GetEvent(hContact, 0))
g_clistApi.pfnAddEvent(&cle);
}
else {
- if (g_clistApi.pfnGetEvent(hContact, 0))
+ if (Clist_GetEvent(hContact, 0))
g_clistApi.pfnRemoveEvent(hContact, GC_FAKE_EVENT);
g_clistApi.pfnAddEvent(&cle);
}
@@ -228,7 +228,7 @@ static LRESULT CALLBACK PopupDlgProc(HWND hWnd, UINT message, WPARAM wParam, LPA
case WM_CONTEXTMENU:
SESSION_INFO *si = (SESSION_INFO*)PUGetPluginData(hWnd);
if (si->hContact)
- if (g_clistApi.pfnGetEvent(si->hContact, 0))
+ if (Clist_GetEvent(si->hContact, 0))
g_clistApi.pfnRemoveEvent(si->hContact, GC_FAKE_EVENT);
if (si->pDlg && si->pDlg->timerFlash.Stop())
diff --git a/src/mir_app/src/clc.h b/src/mir_app/src/clc.h
index 15eae7d75c..6a38b78e9f 100644
--- a/src/mir_app/src/clc.h
+++ b/src/mir_app/src/clc.h
@@ -119,7 +119,6 @@ void UnregisterFileDropping(HWND hwnd);
/* clistevents.c */
struct CListEvent* fnAddEvent(CLISTEVENT *cle);
-CLISTEVENT* fnGetEvent(MCONTACT hContact, int idx);
int fnGetImlIconIndex(HICON hIcon);
int fnRemoveEvent(MCONTACT hContact, MEVENT dbEvent);
diff --git a/src/mir_app/src/clistcore.cpp b/src/mir_app/src/clistcore.cpp
index ebfa53dda6..dcb1b64045 100644
--- a/src/mir_app/src/clistcore.cpp
+++ b/src/mir_app/src/clistcore.cpp
@@ -100,7 +100,6 @@ void InitClistCore()
g_clistApi.pfnRowHitTest = fnRowHitTest;
g_clistApi.pfnAddEvent = fnAddEvent;
- g_clistApi.pfnGetEvent = fnGetEvent;
g_clistApi.pfnGetImlIconIndex = fnGetImlIconIndex;
g_clistApi.pfnRemoveEvent = fnRemoveEvent;
diff --git a/src/mir_app/src/clistevents.cpp b/src/mir_app/src/clistevents.cpp
index 89928c9569..51185c681f 100644
--- a/src/mir_app/src/clistevents.cpp
+++ b/src/mir_app/src/clistevents.cpp
@@ -242,7 +242,7 @@ int fnRemoveEvent(MCONTACT hContact, MEVENT dbEvent)
/////////////////////////////////////////////////////////////////////////////////////////
-CLISTEVENT* fnGetEvent(MCONTACT hContact, int idx)
+MIR_APP_DLL(CListEvent *) Clist_GetEvent(MCONTACT hContact, int idx)
{
if (hContact == INVALID_CONTACT_ID) {
if (idx >= g_cliEvents.getCount())
diff --git a/src/mir_app/src/mir_app.def b/src/mir_app/src/mir_app.def
index fc9f882c9f..4dba25cc4d 100644
--- a/src/mir_app/src/mir_app.def
+++ b/src/mir_app/src/mir_app.def
@@ -869,3 +869,4 @@ Chat_IsMuted @941 NONAME
?OnCreateOfflineFile@PROTO_INTERFACE@@UAEXAAVFILE_BLOB@DB@@PAX@Z @984 NONAME
?setSize@FILE_BLOB@DB@@QAEX_J@Z @985 NONAME
?setUrl@FILE_BLOB@DB@@QAEXPBD@Z @986 NONAME
+?Clist_GetEvent@@YGPAUCListEvent@@IH@Z @987 NONAME
diff --git a/src/mir_app/src/mir_app64.def b/src/mir_app/src/mir_app64.def
index 091462dd8c..6c56bbbffa 100644
--- a/src/mir_app/src/mir_app64.def
+++ b/src/mir_app/src/mir_app64.def
@@ -869,3 +869,4 @@ Chat_IsMuted @941 NONAME
?OnCreateOfflineFile@PROTO_INTERFACE@@UEAAXAEAVFILE_BLOB@DB@@PEAX@Z @984 NONAME
?setSize@FILE_BLOB@DB@@QEAAX_J@Z @985 NONAME
?setUrl@FILE_BLOB@DB@@QEAAXPEBD@Z @986 NONAME
+?Clist_GetEvent@@YAPEAUCListEvent@@IH@Z @987 NONAME