summaryrefslogtreecommitdiff
path: root/plugins/Popup
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2014-06-11 21:06:18 +0000
committerGeorge Hazan <george.hazan@gmail.com>2014-06-11 21:06:18 +0000
commit0277d4c33b9dfe0764603867e6c6d10c87096335 (patch)
tree394463d54fe258a29444e087959865d47549fc3f /plugins/Popup
parentfe72fbef65b67f80d7577bf412a0993ed78f228e (diff)
ansi stubs returned
git-svn-id: http://svn.miranda-ng.org/main/trunk@9436 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/Popup')
-rw-r--r--plugins/Popup/src/main.cpp2
-rw-r--r--plugins/Popup/src/services.cpp38
-rw-r--r--plugins/Popup/src/services.h2
3 files changed, 41 insertions, 1 deletions
diff --git a/plugins/Popup/src/main.cpp b/plugins/Popup/src/main.cpp
index 57aec5bb5f..3f97bf29f9 100644
--- a/plugins/Popup/src/main.cpp
+++ b/plugins/Popup/src/main.cpp
@@ -376,6 +376,7 @@ MIRAPI int Load(void)
//Service Functions
hEventNotify = CreateHookableEvent(ME_POPUP_FILTER);
+ CreateServiceFunction(MS_POPUP_ADDPOPUP, Popup_AddPopup);
CreateServiceFunction(MS_POPUP_ADDPOPUPW, Popup_AddPopupW);
CreateServiceFunction(MS_POPUP_ADDPOPUP2, Popup_AddPopup2);
@@ -387,6 +388,7 @@ MIRAPI int Load(void)
CreateServiceFunction(MS_POPUP_GETCONTACT, Popup_GetContact);
CreateServiceFunction(MS_POPUP_GETPLUGINDATA, Popup_GetPluginData);
+ CreateServiceFunction(MS_POPUP_SHOWMESSAGE, Popup_ShowMessage);
CreateServiceFunction(MS_POPUP_SHOWMESSAGEW, Popup_ShowMessageW);
CreateServiceFunction(MS_POPUP_QUERY, Popup_Query);
diff --git a/plugins/Popup/src/services.cpp b/plugins/Popup/src/services.cpp
index 71892e3b4e..fe17687cf7 100644
--- a/plugins/Popup/src/services.cpp
+++ b/plugins/Popup/src/services.cpp
@@ -25,6 +25,32 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
int num_classes = 0; //for core class api support
+//===== Popup/AddPopup
+INT_PTR Popup_AddPopup(WPARAM wParam, LPARAM lParam)
+{
+ if (!gbPopupLoaded)
+ return -1;
+
+ POPUPDATA *ppd = (POPUPDATA*)wParam;
+ if (!ppd)
+ return -1;
+
+ ptrW wszText(mir_a2u(ppd->lpzText)), wszTitle(mir_a2u(ppd->lpzContactName));
+
+ POPUPDATA2 ppd2 = { sizeof(ppd2) };
+ ppd2.flags = PU2_UNICODE;
+ ppd2.lchContact = ppd->lchContact;
+ ppd2.lchIcon = ppd->lchIcon;
+ ppd2.lpwzTitle = wszTitle;
+ ppd2.lpwzText = wszText;
+ ppd2.colorBack = ppd->colorBack;
+ ppd2.colorText = ppd->colorText;
+ ppd2.PluginWindowProc = ppd->PluginWindowProc;
+ ppd2.PluginData = ppd->PluginData;
+ ppd2.iSeconds = ppd->iSeconds;
+ return Popup_AddPopup2((WPARAM)&ppd2, lParam);
+}
+
//===== Popup/AddPopupW
INT_PTR Popup_AddPopupW(WPARAM wParam, LPARAM lParam)
{
@@ -203,7 +229,8 @@ INT_PTR Popup_Change2(WPARAM wParam, LPARAM lParam)
return 0;
}
-INT_PTR Popup_ShowMessageW(WPARAM wParam, LPARAM lParam) {
+INT_PTR Popup_ShowMessageW(WPARAM wParam, LPARAM lParam)
+{
if (!gbPopupLoaded || !wParam || !lParam) return -1;
if (closing) return 0;
@@ -239,6 +266,15 @@ INT_PTR Popup_ShowMessageW(WPARAM wParam, LPARAM lParam) {
return Popup_AddPopup2((WPARAM)&ppd2, (LPARAM)((lParam & 0x80000000)?APF_NO_HISTORY:0));
}
+INT_PTR Popup_ShowMessage(WPARAM wParam, LPARAM lParam)
+{
+ if (!gbPopupLoaded || !wParam || !lParam) return -1;
+ if (closing) return 0;
+
+ ptrW wszMsg(mir_a2u((char*)wParam));
+ return Popup_ShowMessageW(wszMsg, lParam);
+}
+
//===== Popup/Query
INT_PTR Popup_Query(WPARAM wParam, LPARAM)
{
diff --git a/plugins/Popup/src/services.h b/plugins/Popup/src/services.h
index 1bd913342f..e27e6eb30a 100644
--- a/plugins/Popup/src/services.h
+++ b/plugins/Popup/src/services.h
@@ -26,6 +26,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
extern int num_classes; //for core class api support
+INT_PTR Popup_AddPopup(WPARAM, LPARAM);
INT_PTR Popup_AddPopupW(WPARAM, LPARAM);
INT_PTR Popup_AddPopup2(WPARAM, LPARAM);
@@ -37,6 +38,7 @@ INT_PTR Popup_ChangeTextW(WPARAM, LPARAM);
INT_PTR Popup_ChangeW(WPARAM, LPARAM);
INT_PTR Popup_Change2(WPARAM, LPARAM);
+INT_PTR Popup_ShowMessage(WPARAM, LPARAM);
INT_PTR Popup_ShowMessageW(WPARAM, LPARAM);
INT_PTR Popup_Query(WPARAM, LPARAM);