summaryrefslogtreecommitdiff
path: root/plugins/ExternalAPI/delphi
diff options
context:
space:
mode:
authorGeorge Hazan <ghazan@miranda.im>2016-11-27 21:02:54 +0300
committerGeorge Hazan <ghazan@miranda.im>2016-11-27 21:02:54 +0300
commit0ebb1294ecaf4d62ad6b3e911be6275248c05354 (patch)
tree5560ce9ecc74ab5357279cd15aa9704d4d9d8c30 /plugins/ExternalAPI/delphi
parentc6b6e8a4b79e906f77b1f3be43e939316e1d912f (diff)
correct type for ServiceExists() - bool
Diffstat (limited to 'plugins/ExternalAPI/delphi')
-rw-r--r--plugins/ExternalAPI/delphi/m_notify.inc183
-rw-r--r--plugins/ExternalAPI/delphi/m_skin_eng.inc181
2 files changed, 2 insertions, 362 deletions
diff --git a/plugins/ExternalAPI/delphi/m_notify.inc b/plugins/ExternalAPI/delphi/m_notify.inc
index 6d269b0f99..2798ebbf31 100644
--- a/plugins/ExternalAPI/delphi/m_notify.inc
+++ b/plugins/ExternalAPI/delphi/m_notify.inc
@@ -64,188 +64,6 @@ const
var
notifyLink:PMNOTIFYLINK;
-(*
-function MNotifyRegister(name:PAnsiChar;icon:HICON):THANDLE;
-begin
- if notifyLink<>nil then
- result:=notifyLink^.Register(name,icon)
- else
- result:=0;
-end;
-function MNotifyCreate(atype:THANDLE):THANDLE;
-begin
- if notifyLink<>nil then
- result:=notifyLink^.Create(atype)
- else
- result:=0;
-end;
-function MNotifyIsValid(notify:THANDLE):int;
-begin
- if notifyLink<>nil then
- result:=notifyLink^.IsValid(notify)
- else
- result:=0;
-end;
-function MNotifySet(notifyORtype:THANDLE,name:PAnsiChar;val:TDBVARIANT):int;
-begin
- if notifyLink<>nil then
- result:=notifyLink^.Set(notifyORtype,name,val)
- else
- result:=0;
-end;
-function MNotifyGet(notifyORtype:THANDLE,name:PAnsiChar;val:PDBVARIANT):int;
-begin
- if notifyLink<>nil then
- result:=notifyLink^.Get(notifyORtype,name,val)
- else
- result:=0;
-end;
-function MNotifyAddAction(notifyORtype:THANDLE;icon:HICON;name:PAnsiChar;service:PAnsiChar=nil;cookie:dword=0):int;
-begin
- if notifyLink<>nil then
- result:=notifyLink^.AddAction(notifyORtype,icon,name)
- else
- result:=0;
-end;
-function MNotifyGetActions(notifyORtype:THANDLE;actions:PMNOTIFYACTIONINFO):int;
-begin
- if notifyLink<>nil then
- result:=notifyLink^.GetActions(notifyORtype,actions)
- else
- result:=0;
-end;
-function MNotifyAddRef(notify:THANDLE):int;
-begin
- if notifyLink<>nil then
- result:=notifyLink^.AddRef(notify)
- else
- result:=0;
-end;
-function MNotifyRelease(notify:THANDLE):int;
-begin
- if notifyLink<>nil then
- result:=notifyLink^.Release(notify)
- else
- result:=0;
-end;
-procedure MNotifyShow(notify:THANDLE);
-begin
- if notifyLink<>nil then
- notifyLink^.Show(notify)
-end;
-procedure MNotifyUpdate(notify:THANDLE);
-begin
- if notifyLink<>nil then
- notifyLink^.Update(notify)
-end;
-procedure MNotifyRemove(notify:THANDLE);
-begin
- if notifyLink<>nil then
- notifyLink^.Remove(notify)
-end;
-
-procedure MNotifyGetLink;
-begin
- if PluginLink^.ServiceExists(MS_NOTIFY_GETLINK)<>0 then
- notifyLink:=PMNOTIFYLINK(CallService(MS_NOTIFY_GETLINK,0,0))
- else
- notifyLink:=nil;
-end;
-
-// get helpers
-function MNotifyGetByte(notifyORtype:THANDLE;name:PAnsiChar;defValue:byte):byte;
-var
- dbv:TDBVARIANT;
-begin
- MNotifyGet(notifyORtype,name,dbv);
- if dbv._type<>DBVT_BYTE then
- result:=defValue
- else
- result:=dbv.bVal;
-end;
-function MNotifyGetWord(notifyORtype:THANDLE;name:PAnsiChar;defValue:word):word;
-var
- dbv:TDBVARIANT;
-begin
- MNotifyGet(notifyORtype,name,dbv);
- if dbv._type<>DBVT_WORD then
- result:=defValue
- else
- result:=dbv.wVal;
-end;
-function MNotifyGetDWord(notifyORtype:THANDLE;name:PAnsiChar;defValue:dword):dword;
-var
- dbv:TDBVARIANT;
-begin
- MNotifyGet(notifyORtype,name,dbv);
- if dbv._type<>DBVT_DWORD then
- result:=defValue
- else
- result:=dbv.dVal;
-end;
-function MNotifyGetString(notifyORtype:THANDLE;name:PAnsiChar;defValue:PAnsiChar):PAnsiChar;
-var
- dbv:TDBVARIANT;
-begin
- MNotifyGet(notifyORtype,name,dbv);
- if dbv._type<>DBVT_ASCIIZ then
- result:=defValue
- else
- result:=dbv.szVal.a;
-end;
-function MNotifyGetWString(notifyORtype:THANDLE;name:PAnsiChar;defValue:PWideChar):PWideChar;
-var
- dbv:TDBVARIANT;
-begin
- MNotifyGet(notifyORtype,name,dbv);
- if dbv._type<>DBVT_WCHAR then
- result:=defValue
- else
- result:=dbv.szVal.w;
-end;
-
-// set helpers
-procedure MNotifySetByte(notifyORtype:THANDLE;name:PAnsiChar;value:byte);
-var
- dbv:TDBVARIANT;
-begin
- dbv._type:=DBVT_BYTE;
- dbv.bVal :=value;
- MNotifySet(notifyORtype,name,dbv);
-end;
-procedure MNotifySetWord(notifyORtype:THANDLE;name:PAnsiChar;value:word);
-var
- dbv:TDBVARIANT;
-begin
- dbv._type:=DBVT_WORD;
- dbv.wVal :=value;
- MNotifySet(notifyORtype,name,dbv);
-end;
-procedure MNotifySetDWord(notifyORtype:THANDLE;name:PAnsiChar;value:dword);
-var
- dbv:TDBVARIANT;
-begin
- dbv._type:=DBVT_DWORD;
- dbv.dVal :=value;
- MNotifySet(notifyORtype,name,dbv);
-end;
-procedure MNotifySetString(notifyORtype:THANDLE;name:PAnsiChar;value:PAnsiChar);
-var
- dbv:TDBVARIANT;
-begin
- dbv._type :=DBVT_ASCIIZ;
- dbv.szVal.a:=value;
- MNotifySet(notifyORtype,name,dbv);
-end;
-procedure MNotifySetWString(notifyORtype:THANDLE;name:PAnsiChar;value:PWideChar);
-var
- dbv:TDBVARIANT;
-begin
- dbv._type :=DBVT_WCHAR;
- dbv.szVal.w:=value;
- MNotifySet(notifyORtype,name,dbv);
-end;
-*)
const
// Common options for Get/Set actions
@@ -260,6 +78,5 @@ const
NFOPT_BACKCOLOR = 'General/BackColor';
NFOPT_TEXTCOLOR = 'General/TextColor';
NFOPT_TIMEOUT = 'General/Timeout';
-// NFOPT_ONDESTROY = 'General/OnDestroy';
{$ENDIF}
diff --git a/plugins/ExternalAPI/delphi/m_skin_eng.inc b/plugins/ExternalAPI/delphi/m_skin_eng.inc
index 986d31718c..78ad8d306c 100644
--- a/plugins/ExternalAPI/delphi/m_skin_eng.inc
+++ b/plugins/ExternalAPI/delphi/m_skin_eng.inc
@@ -167,108 +167,6 @@ type
hFont :HFONT;
end;
-//* HELPER FUNCTIONS */
-(*
-//Paint ObjectID as parent background for frame hwndIn
-int __inline SkinDrawWindowBack(HWND hwndIn, HDC hdc, RECT * rcClip, char * objectID)
-{
- SKINDRAWREQUEST rq;
- POINT pt={0};
- RECT rc,r1;
-
- HWND hwnd=(HWND)CallService(MS_CLUI_GETHWND,0,0);
- if (!objectID) return 0;
- GetWindowRect(hwndIn,&r1);
- pt.x=r1.left;
- pt.y=r1.top;
- //ClientToScreen(hwndIn,&pt);
- GetWindowRect(hwnd,&rc);
- OffsetRect(&rc,-pt.x ,-pt.y);
- rq.hDC=hdc;
- rq.rcDestRect=rc;
- rq.rcClipRect=*rcClip;
- lstrcpynA(rq.szObjectID,objectID,sizeof(rq.szObjectID));
- ///ske_Service_DrawGlyph((WPARAM)&rq,0); //$$$
- return CallService(MS_SKIN_DRAWGLYPH,(WPARAM)&rq,0);
-}
-
-
-//Paint ObjectID
-int __inline SkinDrawGlyph(HDC hdc, RECT * rcSize, RECT * rcClip, char * objectID);
-
-//Register object with predefined style
-int __inline CreateGlyphedObjectDefStyle(char * ObjID,BYTE defStyle);
-int __inline CreateGlyphedObjectDefColor(char * ObjID,dword defColor);
-//Register default object
-int __inline CreateGlyphedObject(char * ObjID);
-
-
-//// Creating and registering objects
-//int __inline CreateGlyphedObject(char * ObjID)
-//{
-// DEF_SKIN_OBJECT_PARAMS prm={0};
-// prm.defColor=DEFAULT_BKCOLOUR;
-// prm.defStyle=DEFAULT_STYLE;
-// prm.szObjectID=ObjID;
-// return CallService(MS_SKIN_REGISTERDEFOBJECT,(WPARAM)&prm,0);
-//}
-static BOOL __inline ScreenToClientRect(HWND hWnd, LPRECT lpRect)
-{
- BOOL ret;
-
- POINT pt;
-
- pt.x = lpRect->left;
- pt.y = lpRect->top;
-
- ret = ScreenToClient(hWnd, &pt);
-
- if (!ret) return ret;
-
- lpRect->left = pt.x;
- lpRect->top = pt.y;
-
-
- pt.x = lpRect->right;
- pt.y = lpRect->bottom;
-
- ret = ScreenToClient(hWnd, &pt);
-
- lpRect->right = pt.x;
- lpRect->bottom = pt.y;
-
- return ret;
-}
-
-//int __inline CreateGlyphedObjectDefStyle(char * ObjID,BYTE defStyle)
-//{
-// DEF_SKIN_OBJECT_PARAMS prm={0};
-// prm.defColor=DEFAULT_BKCOLOUR;
-// prm.defStyle=defStyle;
-// prm.szObjectID=ObjID;
-// return CallService(MS_SKIN_REGISTERDEFOBJECT,(WPARAM)&prm,0);
-//}
-//int __inline CreateGlyphedObjectDefColor(char * ObjID,dword defColor)
-//{
-// DEF_SKIN_OBJECT_PARAMS prm={0};
-// prm.defColor=defColor;
-// prm.defStyle=ST_BRUSH;
-// prm.szObjectID=ObjID;
-// return CallService(MS_SKIN_REGISTERDEFOBJECT,(WPARAM)&prm,0);
-//}
-static int __inline SkinDrawGlyph(HDC hdc, RECT * rcSize, RECT * rcClip, char * objectID)
-{
- SKINDRAWREQUEST rq;
- if (!objectID) return 0;
- rq.hDC=hdc;
- rq.rcDestRect=*rcSize;
- rq.rcClipRect=*rcClip;
- lstrcpynA(rq.szObjectID,objectID,sizeof(rq.szObjectID));
- return CallService(MS_SKIN_DRAWGLYPH,(WPARAM)&rq,0);
-}
-*)
-//#include "../hdr/modern_skin_selector.h"
-
//////////////////////////////////////////////
// //
// New Painting sequence servises //
@@ -309,53 +207,6 @@ type
tPaintCallbackProc = function(hWnd:HWND; hDC:HDC; rcPaint:PRECT; rgnUpdate:HRGN;
dFlags:dword; CallBackData:pointer):int;
-// HELPER TO UPDATEIMAGEFRAME
-
-(*
-inline BOOL isSkinEngineEnabled()
-{
- return ServiceExists(MS_SKINENG_REGISTERPAINTSUB) && !DBGetContactSettingByte(NULL, "ModernData", "DisableEngine", FALSE);
-}
-
-
-inline BOOL isLayeredEnabled()
-{
- return isSkinEngineEnabled() && DBGetContactSettingByte(NULL, "ModernData", "EnableLayering", TRUE);
-}
-
-int __inline SkinEngUpdateImageFrame(HWND hwnd, RECT * rcUpdate, dword dwFlags, void * CallBackData)
-{
- sPaintRequest sr={0};
- sr.dStructSize=sizeof(sPaintRequest);
- sr.hWnd=hwnd;
- if (rcUpdate)
- sr.rcUpdate=*rcUpdate;
- sr.dwFlags=dwFlags;
- sr.CallbackData=CallBackData;
- return CallService(MS_SKINENG_UPTATEFRAMEIMAGE,(WPARAM)hwnd,(LPARAM)&sr);
-}
-
-int __inline SkinEngInvalidateImageFrame(HWND hwnd, CONST RECT * rcUpdate, dword dwFlags, void * CallBackData)
-{
- sPaintRequest sr={0};
- if (hwnd && !isLayeredEnabled()) return InvalidateRect(hwnd,rcUpdate,dwFlags);
- sr.dStructSize=sizeof(sPaintRequest);
- sr.hWnd=hwnd;
- if (rcUpdate)
- sr.rcUpdate=*rcUpdate;
- sr.dwFlags=dwFlags;
- sr.CallbackData=CallBackData;
- return CallService(MS_SKINENG_INVALIDATEFRAMEIMAGE,(WPARAM)hwnd,(LPARAM)&sr);
-}
-
-
-int __inline SkinInvalidateFrame(HWND hWnd, CONST RECT* lpRect,BOOL bErase)
-{
- return SkinEngInvalidateImageFrame(hWnd,lpRect,0,0);
-}
-*)
-// Alpha channel GDI replacements/helpers
-
const
//
// Paints text with correct alpha channel
@@ -372,19 +223,7 @@ type
ARGBcolor:dword;
reserv :array [0..15] of byte;
end;
-(*
-int __inline AlphaText(HDC hDC, LPCTSTR lpString, int nCount, RECT * lpRect, UINT format, dword ARGBcolor)
-{
- AlphaTextOutParams ap={0};
- ap.hDC=hDC;
- ap.lpString=lpString;
- ap.nCount=nCount;
- ap.lpRect=lpRect;
- ap.format=format;
- ap.ARGBcolor=ARGBcolor;
- return CallService(MS_SKINENG_ALPHATEXTOUT,(WPARAM)&ap,0);
-}
-*)
+
type
ImageListFixParam = record
himl :THANDLE; //HIMAGELIST;
@@ -408,22 +247,7 @@ type
const
//wParam - pointer to DrawIconFixParam
MS_SKINENG_DRAWICONEXFIX:PAnsiChar = 'SkinEngine/DrawIconEx_Fix';
-(*
-int __inline mod_DrawIconEx_helper(HDC hdc,int xLeft,int yTop,HICON hIcon,int cxWidth,int cyWidth, UINT istepIfAniCur, HBRUSH hbrFlickerFreeDraw, UINT diFlags)
-{
- DrawIconFixParam p={0};
- p.hdc=hdc;
- p.xLeft=xLeft;
- p.yTop=yTop;
- p.hIcon=hIcon;
- p.cxWidth=cxWidth;
- p.cyWidth=cyWidth;
- p.istepIfAniCur=istepIfAniCur;
- p.hbrFlickerFreeDraw=hbrFlickerFreeDraw;
- p.diFlags=diFlags;
- return CallService(MS_SKINENG_DRAWICONEXFIX,(WPARAM)&p,0);
-}
-*)
+
const
// Register of plugin's user
//
@@ -441,5 +265,4 @@ const
// lParam = 0
ME_BACKGROUNDCONFIG_CHANGED:PAnsiChar = 'ModernBkgrCfg/Changed';
-
{$ENDIF}