summaryrefslogtreecommitdiff
path: root/plugins/Toaster/src/structs.h
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/Toaster/src/structs.h')
-rw-r--r--plugins/Toaster/src/structs.h59
1 files changed, 59 insertions, 0 deletions
diff --git a/plugins/Toaster/src/structs.h b/plugins/Toaster/src/structs.h
new file mode 100644
index 0000000000..e74eb14bf1
--- /dev/null
+++ b/plugins/Toaster/src/structs.h
@@ -0,0 +1,59 @@
+#pragma once
+
+struct ToastData : public MZeroedObject
+{
+ MCONTACT hContact;
+ TCHAR *tszTitle;
+ TCHAR *tszText;
+ union
+ {
+ HICON hIcon;
+ HBITMAP hBitmap;
+ };
+ int iType; // 0 = none, 1 = hBitmap, 2 = hIcon
+
+ WNDPROC pPopupProc;
+ void *vPopupData;
+
+ ToastData(MCONTACT _hContact, const TCHAR *_tszTitle, const TCHAR *_tszText, HICON _hIcon = NULL) :
+ hContact(_hContact),
+ tszTitle(mir_tstrdup(_tszTitle)),
+ tszText(mir_tstrdup(_tszText)),
+ hIcon(_hIcon),
+ iType(_hIcon ? 2 : 0)
+ {}
+ ToastData(MCONTACT _hContact, const TCHAR *_tszTitle, const TCHAR *_tszText, HBITMAP bmp = NULL) :
+ hContact(_hContact),
+ tszTitle(mir_tstrdup(_tszTitle)),
+ tszText(mir_tstrdup(_tszText)),
+ hBitmap(bmp),
+ iType(bmp ? 1 : 0)
+ {}
+ ~ToastData()
+ {
+ mir_free(tszTitle);
+ mir_free(tszText);
+ }
+};
+
+struct ClassData : public MZeroedObject
+{
+ int iFlags;
+ HICON hIcon;
+
+ WNDPROC pPopupProc;
+
+ ClassData(int f, HICON h = NULL) : iFlags(f), hIcon(h)
+ {
+ }
+};
+
+struct ToastHandlerData : public MZeroedObject
+{
+ MCONTACT hContact;
+
+ WNDPROC pPopupProc;
+ void *vPopupData;
+
+ ToastNotification *tstNotification;
+};