summaryrefslogtreecommitdiff
path: root/plugins/ExternalAPI
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2023-12-20 16:43:14 +0300
committerGeorge Hazan <george.hazan@gmail.com>2023-12-20 16:43:14 +0300
commitd80970d9b26b5e9b7868ec61349490da5e24dc64 (patch)
tree4f77d2094176eeaecfb99c9d7ad902124752503c /plugins/ExternalAPI
parent633f26707366cca4bd876d8f874f3ed116560e0d (diff)
libTextControl: contact settings extracted to MTextSetProto
Diffstat (limited to 'plugins/ExternalAPI')
-rw-r--r--plugins/ExternalAPI/m_text.h9
1 files changed, 6 insertions, 3 deletions
diff --git a/plugins/ExternalAPI/m_text.h b/plugins/ExternalAPI/m_text.h
index d6e948b673..4190a56dc5 100644
--- a/plugins/ExternalAPI/m_text.h
+++ b/plugins/ExternalAPI/m_text.h
@@ -61,7 +61,7 @@ enum
MTEXTCONTROL_DLL(HANDLE) MTextRegister(const char *userTitle, uint32_t options);
// allocate text object (unicode)
-MTEXTCONTROL_DLL(HText) MTextCreateW(HANDLE userHandle, const char *szProto, const wchar_t *text);
+MTEXTCONTROL_DLL(HText) MTextCreateW(HANDLE userHandle, const wchar_t *text);
// allocate text object (advanced)
MTEXTCONTROL_DLL(HText) MTextCreateEx(HANDLE userHandle, const void *text, uint32_t flags);
@@ -81,11 +81,14 @@ MTEXTCONTROL_DLL(int) MTextActivate(HText text, bool bActivate = true);
// wrapped text size is stored in sz, text
MTEXTCONTROL_DLL(int) MTextMeasure(HDC dc, SIZE *sz, HText text);
-// display text object
+// displays text object
// result = 1 (success), 0 (failure)
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)
+// sets a contact & protocol (optionally, for hContact == 0) for text object (required for valid stickers' processing)
+MTEXTCONTROL_DLL(int) MTextSetProto(HText text, MCONTACT hContact, const char *szProto = nullptr);
+
+// sets parent window for text object (this is required for mouse handling, etc)
MTEXTCONTROL_DLL(int) MTextSetParent(HText text, HWND hwnd);
// send message to an object