diff options
author | George Hazan <ghazan@miranda.im> | 2020-04-03 16:49:50 +0300 |
---|---|---|
committer | George Hazan <ghazan@miranda.im> | 2020-04-03 16:49:50 +0300 |
commit | 8beac85f6a7b0538622b67e9d2739155792777a2 (patch) | |
tree | 7b452c8344ed72b3c6f700f1e89dff93b7450daf /plugins/ExternalAPI | |
parent | 58a9d3dbd775650dd1a8ac51ec78748184b4a657 (diff) |
mTextControl: code cleaning
Diffstat (limited to 'plugins/ExternalAPI')
-rw-r--r-- | plugins/ExternalAPI/m_text.h | 25 |
1 files changed, 13 insertions, 12 deletions
diff --git a/plugins/ExternalAPI/m_text.h b/plugins/ExternalAPI/m_text.h index 0099be9a77..3a7ed7a408 100644 --- a/plugins/ExternalAPI/m_text.h +++ b/plugins/ExternalAPI/m_text.h @@ -36,19 +36,20 @@ #define DLL_CALLCONV __stdcall
#endif
-typedef struct _tagMTEXT_interface {
+struct MTEXT_INTERFACE
+{
size_t cbSize;
- DWORD version;
- HANDLE (DLL_CALLCONV *Register) (const char *userTitle, DWORD options);
- HANDLE (DLL_CALLCONV *Create) (HANDLE userHandle, TCHAR *text);
- HANDLE (DLL_CALLCONV *CreateEx) (HANDLE userHandle, void *text, DWORD flags);
- int (DLL_CALLCONV *Measure) (HDC dc, SIZE *sz, HANDLE text);
- int (DLL_CALLCONV *Display) (HDC dc, POINT pos, SIZE sz, HANDLE text);
- int (DLL_CALLCONV *SetParent) (HANDLE text, HWND hwnd, RECT rect);
- int (DLL_CALLCONV *SendMsg) (HWND hwnd, HANDLE text, UINT msg, WPARAM wParam, LPARAM lParam);
- HWND (DLL_CALLCONV *CreateProxy) (HANDLE text);
+ DWORD version;
+ HANDLE (DLL_CALLCONV *Register) (const char *userTitle, DWORD options);
+ HANDLE (DLL_CALLCONV *Create) (HANDLE userHandle, TCHAR *text);
+ HANDLE (DLL_CALLCONV *CreateEx) (HANDLE userHandle, void *text, DWORD flags);
+ int (DLL_CALLCONV *Measure) (HDC dc, SIZE *sz, HANDLE text);
+ int (DLL_CALLCONV *Display) (HDC dc, POINT pos, SIZE sz, HANDLE text);
+ int (DLL_CALLCONV *SetParent) (HANDLE text, HWND hwnd, RECT rect);
+ int (DLL_CALLCONV *SendMsg) (HWND hwnd, HANDLE text, UINT msg, WPARAM wParam, LPARAM lParam);
+ HWND (DLL_CALLCONV *CreateProxy) (HANDLE text);
int (DLL_CALLCONV *Destroy) (HANDLE text);
-} MTEXT_INTERFACE;
+};
// get access to the interface
// wParam = 0
@@ -56,7 +57,7 @@ typedef struct _tagMTEXT_interface { // dont vorget to set cbSize before call service
#define MS_TEXT_GETINTERFACE "MText/GetInterface"
-__forceinline INT_PTR mir_getMTI( MTEXT_INTERFACE* dest )
+__forceinline INT_PTR mir_getMTI(MTEXT_INTERFACE *dest)
{
dest->cbSize = sizeof(*dest);
INT_PTR result = CallService(MS_TEXT_GETINTERFACE, 0, (LPARAM)dest);
|