diff options
author | George Hazan <ghazan@miranda.im> | 2022-06-09 21:26:35 +0300 |
---|---|---|
committer | George Hazan <ghazan@miranda.im> | 2022-06-09 21:30:54 +0300 |
commit | 856ff580fd9d776c331a6b525fa7d73a24d92f64 (patch) | |
tree | 42c4912b0b9c406c15783af3fc6e8c4857b09de1 /include | |
parent | 68c2dea66f3e368cc1437f7890c8e62907890fcd (diff) |
UserInfo -> UI classes
Diffstat (limited to 'include')
-rw-r--r-- | include/m_gui.h | 1 | ||||
-rw-r--r-- | include/m_userinfo.h | 58 | ||||
-rw-r--r-- | include/newpluginapi.h | 2 |
3 files changed, 28 insertions, 33 deletions
diff --git a/include/m_gui.h b/include/m_gui.h index 08ece9af48..3728037ab4 100644 --- a/include/m_gui.h +++ b/include/m_gui.h @@ -1401,7 +1401,6 @@ protected: // CCtrlPages #define PSN_INFOCHANGED 1 -#define PSN_PARAMCHANGED 2 // force-send a PSN_INFOCHANGED to all pages #define PSM_FORCECHANGED (WM_USER+100) diff --git a/include/m_userinfo.h b/include/m_userinfo.h index 7eac5049cc..897b42ea2b 100644 --- a/include/m_userinfo.h +++ b/include/m_userinfo.h @@ -25,11 +25,34 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. #ifndef M_USERINFO_H__
#define M_USERINFO_H__ 1
-#ifndef M_CORE_H__
-#include <m_core.h>
-#endif
+#include <m_gui.h>
-#include "m_options.h"
+class MIR_APP_EXPORT CUserInfoPageDlg : public CDlgBase
+{
+protected:
+ MCONTACT m_hContact = INVALID_CONTACT_ID;
+
+public:
+ CUserInfoPageDlg(class CMPluginBase &pPlug, int idDialog);
+
+ __forceinline void SetContact(MCONTACT hContact) {
+ m_hContact = hContact;
+ }
+
+ virtual bool OnRefresh();
+};
+
+struct USERINFOPAGE
+{
+ MAllStrings szTitle, szGroup; // [TRANSLATED-BY-CORE]
+ HPLUGIN pPlugin;
+ uint32_t flags;
+ CUserInfoPageDlg *pDialog;
+
+ // used in UInfoEx only
+ int position;
+ INT_PTR dwInitParam;
+};
//show the User Details dialog box
//wParam = (MCONTACT)hContact
@@ -49,31 +72,4 @@ hook. Look up core/m_system.h:me_system_modulesloaded. */
#define ME_USERINFO_INITIALISE "UserInfo/Initialise"
-/* UserInfo/AddPage v0.1.2.0+
-Must only be called during an userinfo/initialise hook
-Adds a page to the details dialog
-wParam = addInfo
-lParam = (LPARAM)(OPTIONSDIALOGPAGE*)odp
-addInfo must have come straight from the wParam of userinfo/initialise
-Pages in the details dialog operate just like pages in property sheets. See the
-Microsoft documentation for info on how they operate.
-When the pages receive WM_INITDIALOG, lParam = (LPARAM)hContact
-Strings in the structure can be released as soon as the service returns, but
-icons must be kept around. This is not a problem if you're loading them from a
-resource
-The 3 'group' elements in the structure are ignored, and will always be ignored
-Unlike the options dialog, the details dialog does not resize to fit its
-largest page. Details dialog pages should be 222x132 dlus.
-The details dialog (currently) has no Cancel button. I'm waiting to see if it's
-sensible to have one.
-Pages will be sent PSN_INFOCHANGED through WM_NOTIFY (idFrom = 0) when a protocol
-ack is broadcast for the correct contact and with type = ACKTYPE_GETINFO.
-To help you out, PSN_INFOCHANGED will also be sent to each page just after it's
-created.
-All PSN_ WM_NOTIFY messages have PSHNOTIFY.lParam = (LPARAM)hContact
-*/
-#define PSN_INFOCHANGED 1
-#define PSN_PARAMCHANGED 2
-#define PSM_FORCECHANGED (WM_USER+100) //force-send a PSN_INFOCHANGED to all pages
-
#endif // M_USERINFO_H__
diff --git a/include/newpluginapi.h b/include/newpluginapi.h index 7b852b7af4..88d72a47d0 100644 --- a/include/newpluginapi.h +++ b/include/newpluginapi.h @@ -216,7 +216,7 @@ public: int addFrame(const struct CLISTFrame*); int addHotkey(const struct HOTKEYDESC*); int addSound(const char *name, const wchar_t *section, const wchar_t *description, const wchar_t *defaultFile = nullptr); - int addUserInfo(WPARAM wParam, struct OPTIONSDIALOGPAGE *odp); + int addUserInfo(WPARAM wParam, struct USERINFOPAGE *odp); //////////////////////////////////////////////////////////////////////////////////////// |