diff options
author | George Hazan <ghazan@miranda.im> | 2023-02-19 17:50:00 +0300 |
---|---|---|
committer | George Hazan <ghazan@miranda.im> | 2023-02-19 17:50:00 +0300 |
commit | 5a754e4a418e767ea3355521fd04878197cfe7aa (patch) | |
tree | acd2649ba6fec60d626424a28c0ac0b239742eb4 /plugins/ExternalAPI | |
parent | 756cda6094c7e3e24a29323867b070b988dfaf1c (diff) |
fixes #2357 (NewStory: links in log/history should be clickable)
Diffstat (limited to 'plugins/ExternalAPI')
-rw-r--r-- | plugins/ExternalAPI/m_text.h | 19 |
1 files changed, 12 insertions, 7 deletions
diff --git a/plugins/ExternalAPI/m_text.h b/plugins/ExternalAPI/m_text.h index 0780b58bd1..2039de8ba1 100644 --- a/plugins/ExternalAPI/m_text.h +++ b/plugins/ExternalAPI/m_text.h @@ -8,8 +8,10 @@ #ifdef MTEXTCONTROL_EXPORTS
#define MTEXTCONTROL_EXPORT __declspec(dllexport)
+ typedef struct TextObject *HText;
#else
#define MTEXTCONTROL_EXPORT __declspec(dllimport)
+ typedef HANDLE HText;
#endif
#define MTEXTCONTROL_DLL(T) MTEXTCONTROL_EXPORT T __stdcall
@@ -47,29 +49,32 @@ enum MTEXTCONTROL_DLL(HANDLE) MTextRegister(const char *userTitle, DWORD options);
// allocate text object (unicode)
-MTEXTCONTROL_DLL(HANDLE) MTextCreateW(HANDLE userHandle, const char *szProto, const wchar_t *text);
+MTEXTCONTROL_DLL(HText) MTextCreateW(HANDLE userHandle, const char *szProto, const wchar_t *text);
// allocate text object (advanced)
-MTEXTCONTROL_DLL(HANDLE) MTextCreateEx(HANDLE userHandle, void *text, DWORD flags);
+MTEXTCONTROL_DLL(HText) MTextCreateEx(HANDLE userHandle, void *text, DWORD flags);
// destroys text object
-MTEXTCONTROL_DLL(int) MTextDestroy(HANDLE text);
+MTEXTCONTROL_DLL(int) MTextDestroy(HText text);
+
+// activates text object
+MTEXTCONTROL_DLL(int) MTextActivate(HText text, bool bActivate = true);
// measures text object
// result = 1 (success), 0 (failure)
// sz->cx is interpreted as maximum width allowed.
// wrapped text size is stored in sz, text
-MTEXTCONTROL_DLL(int) MTextMeasure(HDC dc, SIZE *sz, HANDLE text);
+MTEXTCONTROL_DLL(int) MTextMeasure(HDC dc, SIZE *sz, HText text);
// display text object
// result = 1 (success), 0 (failure)
-MTEXTCONTROL_DLL(int) MTextDisplay(HDC dc, POINT pos, SIZE sz, HANDLE text);
+MTEXTCONTROL_DLL(int) MTextDisplay(HDC dc, POINT pos, SIZE sz, HText text);
// set parent window for text object (this is required for mouse handling, etc)
-MTEXTCONTROL_DLL(int) MTextSetParent(HANDLE text, HWND hwnd);
+MTEXTCONTROL_DLL(int) MTextSetParent(HText text, HWND hwnd);
// send message to an object
-MTEXTCONTROL_DLL(int) MTextSendMessage(HWND hwnd, HANDLE text, UINT msg, WPARAM wParam, LPARAM lParam);
+MTEXTCONTROL_DLL(int) MTextSendMessage(HWND hwnd, HText text, UINT msg, WPARAM wParam, LPARAM lParam);
#ifdef __cplusplus
}
|