diff options
author | George Hazan <george.hazan@gmail.com> | 2012-06-26 23:41:55 +0000 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2012-06-26 23:41:55 +0000 |
commit | 25221b7d2afb70f82eb3805330fd39a6f6708049 (patch) | |
tree | 6fdd3eb5c5642788e1f8286385b15535f9a7ec16 /plugins/Scriver | |
parent | ef81e9edc10e2478f514e1fbfb0828ad1e7d8e49 (diff) |
mk: removed all LIST_INTERFACE, MI_INTERFACE & UTF8_INTERFACE instances.
all related functions moved to mir_core.
git-svn-id: http://svn.miranda-ng.org/main/trunk@644 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/Scriver')
-rw-r--r-- | plugins/Scriver/richutil.cpp | 45 | ||||
-rw-r--r-- | plugins/Scriver/srmm.cpp | 6 |
2 files changed, 22 insertions, 29 deletions
diff --git a/plugins/Scriver/richutil.cpp b/plugins/Scriver/richutil.cpp index 069d0cfaac..8c562b060c 100644 --- a/plugins/Scriver/richutil.cpp +++ b/plugins/Scriver/richutil.cpp @@ -1,6 +1,6 @@ /*
-Copyright 2000-2010 Miranda IM project,
-all portions of this codebase are copyrighted to the people
+Copyright 2000-2010 Miranda IM project,
+all portions of this codebase are copyrighted to the people
listed in contributors.txt.
This program is free software; you can redistribute it and/or
@@ -25,21 +25,20 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. RichUtil_Load();
Before the application exits, call:
RichUtil_Unload();
-
+
Then to use the library (it draws the xp border around it), you need
- to make sure you control has the WS_EX_STATICEDGE flag. Then you just
+ to make sure you control has the WS_EX_STATICEDGE flag. Then you just
subclass it with:
RichUtil_SubClass(hwndEdit);
-
+
If no xptheme is present, the window isn't subclassed the SubClass function
just returns. And if WS_EX_STATICEDGE isn't present, the subclass does nothing.
Otherwise it removes the border and draws it by itself.
*/
-extern struct LIST_INTERFACE li;
static SortedList sListInt;
-static int RichUtil_CmpVal(void *p1, void *p2)
+static int RichUtil_CmpVal(void *p1, void *p2)
{
TRichUtil *tp1 = (TRichUtil*)p1;
TRichUtil *tp2 = (TRichUtil*)p2;
@@ -65,7 +64,7 @@ static CRITICAL_SECTION csRich; static LRESULT CALLBACK RichUtil_Proc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam);
static void RichUtil_ClearUglyBorder(TRichUtil *ru);
-void RichUtil_Load(void)
+void RichUtil_Load(void)
{
sListInt.increment = 10;
sListInt.sortFunc = RichUtil_CmpVal;
@@ -91,14 +90,14 @@ void RichUtil_Load(void) !MyDrawThemeBackground ||
!MyGetThemeBackgroundContentRect ||
!MyDrawThemeParentBackground ||
- !MyIsThemeBackgroundPartiallyTransparent)
+ !MyIsThemeBackgroundPartiallyTransparent)
{
FreeLibrary(mTheme);
mTheme = NULL;
}
}
-void RichUtil_Unload(void)
+void RichUtil_Unload(void)
{
List_Destroy(&sListInt);
DeleteCriticalSection(&csRich);
@@ -106,14 +105,14 @@ void RichUtil_Unload(void) FreeLibrary(mTheme);
}
-int RichUtil_SubClass(HWND hwndEdit)
+int RichUtil_SubClass(HWND hwndEdit)
{
- if (IsWindow(hwndEdit))
+ if (IsWindow(hwndEdit))
{
int idx;
TRichUtil *ru = (TRichUtil*)mir_calloc(sizeof(TRichUtil));
-
+
ru->hwnd = hwndEdit;
ru->hasUglyBorder = 0;
@@ -133,7 +132,7 @@ static LRESULT CALLBACK RichUtil_Proc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM {
TRichUtil *ru = NULL, tru;
int idx;
-
+
tru.hwnd = hwnd;
EnterCriticalSection(&csRich);
@@ -141,7 +140,7 @@ static LRESULT CALLBACK RichUtil_Proc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM ru = (TRichUtil*)sListInt.items[idx];
LeaveCriticalSection(&csRich);
- switch(msg)
+ switch(msg)
{
case WM_THEMECHANGED:
case WM_STYLECHANGED:
@@ -153,11 +152,11 @@ static LRESULT CALLBACK RichUtil_Proc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM case WM_NCPAINT:
{
LRESULT ret = CallWindowProc(ru->origProc, hwnd, msg, wParam, lParam);
- if (ru->hasUglyBorder && MyIsThemeActive())
+ if (ru->hasUglyBorder && MyIsThemeActive())
{
HANDLE hTheme = MyOpenThemeData(ru->hwnd, L"EDIT");
- if (hTheme)
+ if (hTheme)
{
RECT rcBorder;
RECT rcClient;
@@ -195,17 +194,17 @@ static LRESULT CALLBACK RichUtil_Proc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM {
LRESULT ret = CallWindowProc(ru->origProc, hwnd, msg, wParam, lParam);
NCCALCSIZE_PARAMS *ncsParam = (NCCALCSIZE_PARAMS*)lParam;
-
- if (ru->hasUglyBorder && MyIsThemeActive())
+
+ if (ru->hasUglyBorder && MyIsThemeActive())
{
HANDLE hTheme = MyOpenThemeData(hwnd, L"EDIT");
- if (hTheme)
+ if (hTheme)
{
- RECT rcClient ={0};
+ RECT rcClient ={0};
HDC hdc = GetDC(GetParent(hwnd));
- if (MyGetThemeBackgroundContentRect(hTheme, hdc, EP_EDITTEXT, ETS_NORMAL, &ncsParam->rgrc[0], &rcClient) == S_OK)
+ if (MyGetThemeBackgroundContentRect(hTheme, hdc, EP_EDITTEXT, ETS_NORMAL, &ncsParam->rgrc[0], &rcClient) == S_OK)
{
ru->rect.left = rcClient.left-ncsParam->rgrc[0].left;
ru->rect.top = rcClient.top-ncsParam->rgrc[0].top;
@@ -235,7 +234,7 @@ static LRESULT CALLBACK RichUtil_Proc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM {
LRESULT ret = CallWindowProc(ru->origProc, hwnd, msg, wParam, lParam);
- if (IsWindow(hwnd))
+ if (IsWindow(hwnd))
{
if ((WNDPROC)GetWindowLongPtr(hwnd, GWLP_WNDPROC) == &RichUtil_Proc)
SetWindowLongPtr(hwnd, GWLP_WNDPROC, (LONG_PTR)ru->origProc);
diff --git a/plugins/Scriver/srmm.cpp b/plugins/Scriver/srmm.cpp index 41f4ceb009..d0547d1ad6 100644 --- a/plugins/Scriver/srmm.cpp +++ b/plugins/Scriver/srmm.cpp @@ -25,9 +25,6 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. int OnLoadModule(void);
int OnUnloadModule(void);
-struct MM_INTERFACE mmi;
-struct LIST_INTERFACE li;
-struct UTF8_INTERFACE utfi;
TIME_API tmi;
PLUGINLINK *pluginLink;
@@ -72,9 +69,6 @@ extern "C" __declspec(dllexport) int Load(PLUGINLINK * link) pluginLink = link;
// set the memory manager
- mir_getMMI( &mmi );
- mir_getLI( &li );
- mir_getUTFI( &utfi );
mir_getTMI(&tmi);
mir_getLP( &pluginInfo );
|