From 346ae348ae7ee5a594c9fcd17114ae949c1ce201 Mon Sep 17 00:00:00 2001 From: George Hazan Date: Mon, 13 Jun 2022 15:09:41 +0300 Subject: Popup+: fix for a madness with default popup class values --- include/m_popup.h | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) (limited to 'include/m_popup.h') diff --git a/include/m_popup.h b/include/m_popup.h index dae1b8df6a..039b05e9fe 100644 --- a/include/m_popup.h +++ b/include/m_popup.h @@ -254,7 +254,7 @@ EXTERN_C MIR_APP_DLL(int) PURegisterActions(POPUPACTION *actions, int count); #define POPUP_ACTION_NOTHING LPGEN("Do nothing") #define POPUP_ACTION_DISMISS LPGEN("Dismiss popup") -typedef struct +struct POPUPNOTIFYACTION { char lpzTitle[64]; uint32_t dwFlags; @@ -275,11 +275,11 @@ typedef struct void(*pfnCallback)(HWND hwnd, UINT message, WPARAM wparam, LPARAM lparam, uint32_t cookie); }; }; -} POPUPNOTIFYACTION, *LPPOPUPNOTIFYACTION; +}; #define PNF_CONTACT 0x01 -typedef struct +struct POPUPNOTIFICATION { int cbSize; uint32_t dwFlags; // set of PNF_* flags @@ -290,16 +290,16 @@ typedef struct COLORREF colorText; // this will be registered in fontservice int iSeconds; // default timeout int actionCount; // for unified action comboboxes - LPPOPUPNOTIFYACTION lpActions; + POPUPNOTIFYACTION *lpActions; char *lpzLAction; char *lpzRAction; char *pszReserved1; // reserved for future use #ifdef _WINDOWS DLGPROC pfnReserved2; // reserved for future use #endif -} POPUPNOTIFICATION, *LPPOPUPNOTIFICATION; +}; -EXTERN_C MIR_APP_DLL(HANDLE) PURegisterNotification(LPPOPUPNOTIFICATION notification); +EXTERN_C MIR_APP_DLL(HANDLE) PURegisterNotification(POPUPNOTIFICATION *notification); /* Popup/UnhookEventAsync Using of "UnhookEvent" inside PluginWindowProc in conjunction with HookEventMessage @@ -410,11 +410,10 @@ EXTERN_C MIR_APP_DLL(int) PUShowMessageW(const wchar_t *lpwzText, uint32_t kind) struct POPUPCLASS { - int cbSize; + char *pszName; int flags; // PCF_* constants int iSeconds; COLORREF colorBack, colorText; - char *pszName; MAllStrings pszDescription; HICON hIcon; #ifdef _WINDOWS @@ -431,7 +430,6 @@ EXTERN_C MIR_APP_DLL(void) Popup_UnregisterClass(HANDLE ppc); struct POPUPDATACLASS { - int cbSize; MCONTACT hContact; const char *pszClassName; MAllCStrings szTitle; -- cgit v1.2.3