diff options
author | George Hazan <george.hazan@gmail.com> | 2023-10-30 14:26:08 +0300 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2023-10-30 14:26:08 +0300 |
commit | 16143e784b1697c4b5349bc888c97f7160cf4534 (patch) | |
tree | 4c0fe1126581e3a3a3d0768634125622467aca4a /plugins/ExternalAPI/m_text.h | |
parent | 029872c0b8993f84ac2cad5ac701d6056aad2d7d (diff) |
mTextControl: code cleaning + stronger types
Diffstat (limited to 'plugins/ExternalAPI/m_text.h')
-rw-r--r-- | plugins/ExternalAPI/m_text.h | 13 |
1 files changed, 3 insertions, 10 deletions
diff --git a/plugins/ExternalAPI/m_text.h b/plugins/ExternalAPI/m_text.h index bc3fc25237..d6607e2eb1 100644 --- a/plugins/ExternalAPI/m_text.h +++ b/plugins/ExternalAPI/m_text.h @@ -6,12 +6,12 @@ #define MTM_SETUSER WM_USER
#define MTM_UPDATE WM_USER+1
+typedef struct TextObject *HText;
+
#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
@@ -46,13 +46,6 @@ enum MTEXT_FLG_RTF = 0x00000004,
};
-struct MRtfProvider
-{
- virtual CMStringA CreateRtfHeader() = 0;
- virtual CMStringA CreateRtfBody() = 0;
- virtual CMStringA CreateRtfFooter() = 0;
-};
-
// subscribe to MText services
MTEXTCONTROL_DLL(HANDLE) MTextRegister(const char *userTitle, uint32_t options);
@@ -60,7 +53,7 @@ MTEXTCONTROL_DLL(HANDLE) MTextRegister(const char *userTitle, uint32_t options); MTEXTCONTROL_DLL(HText) MTextCreateW(HANDLE userHandle, const char *szProto, const wchar_t *text);
// allocate text object (advanced)
-MTEXTCONTROL_DLL(HText) MTextCreateEx(HANDLE userHandle, void *text, uint32_t flags);
+MTEXTCONTROL_DLL(HText) MTextCreateEx(HANDLE userHandle, const void *text, uint32_t flags);
// destroys text object
MTEXTCONTROL_DLL(int) MTextDestroy(HText text);
|