From d472416d3e24ecc00083369d0a91c2ce1144f295 Mon Sep 17 00:00:00 2001 From: Kirill Volinsky Date: Thu, 7 Jun 2012 11:59:59 +0000 Subject: removed not needed files git-svn-id: http://svn.miranda-ng.org/main/trunk@354 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- .../_disabled_src/ExtFrames/modern_ext_frames.c | 54 --- .../ExtFrames/modern_ext_frames_extern.c | 99 ------ .../ExtFrames/modern_ext_frames_intern.c | 195 ----------- .../ExtFrames/modern_ext_frames_opt.c | 346 ------------------ .../ExtFrames/modern_ext_frames_private.h | 132 ------- .../ExtFrames/modern_ext_frames_services.c | 386 --------------------- 6 files changed, 1212 deletions(-) delete mode 100644 plugins/Modernb/_disabled_src/ExtFrames/modern_ext_frames.c delete mode 100644 plugins/Modernb/_disabled_src/ExtFrames/modern_ext_frames_extern.c delete mode 100644 plugins/Modernb/_disabled_src/ExtFrames/modern_ext_frames_intern.c delete mode 100644 plugins/Modernb/_disabled_src/ExtFrames/modern_ext_frames_opt.c delete mode 100644 plugins/Modernb/_disabled_src/ExtFrames/modern_ext_frames_private.h delete mode 100644 plugins/Modernb/_disabled_src/ExtFrames/modern_ext_frames_services.c (limited to 'plugins/Modernb/_disabled_src/ExtFrames') diff --git a/plugins/Modernb/_disabled_src/ExtFrames/modern_ext_frames.c b/plugins/Modernb/_disabled_src/ExtFrames/modern_ext_frames.c deleted file mode 100644 index f43402138d..0000000000 --- a/plugins/Modernb/_disabled_src/ExtFrames/modern_ext_frames.c +++ /dev/null @@ -1,54 +0,0 @@ -/**************************************************************************\ - -Miranda IM: the free IM client for Microsoft* Windows* - -Copyright 2000-2008 Miranda ICQ/IM project, -all portions of this code base are copyrighted to Artem Shpynov and/or -the people listed in contributors.txt. - -This program is free software; you can redistribute it and/or -modify it under the terms of the GNU General Public License -as published by the Free Software Foundation; either version 2 -of the License, or (at your option) any later version. - -This program is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU General Public License for more details. - -You should have received a copy of the GNU General Public License -along with this program; if not, write to the Free Software -Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. - -**************************************************************************** - -Created: Mar 19, 2007 - -Author and Copyright: Artem Shpynov aka FYR: ashpynov@gmail.com - -**************************************************************************** - -File contains implementation of vertical and horizontal frames layout -Module will substitute existed CLUIFrames feature - -The goal is to be: -1. Back compatibable with CLUIFrames services -2. Support Transparent frames -3. Be able to create Horizontal and Vertical layouted frames -4. Implement fast and unflicker resizing (one pass batch resizing) including during autoresize -5. Support snapped to its edges frames, and probably other windows - -\**************************************************************************/ - -#include "..\commonheaders.h" - -#define __modern_ext_frames_c__include_c_file - -#include "modern_ext_frames_private.h" //static definitions -#include "modern_ext_frames_extern.c" //external available procedures -#include "modern_ext_frames_intern.c" //static internal procedures -#include "modern_ext_frames_services.c" //services -#include "modern_ext_frames_opt.c" //options - -#undef __modern_ext_frames_c__include_c_file - diff --git a/plugins/Modernb/_disabled_src/ExtFrames/modern_ext_frames_extern.c b/plugins/Modernb/_disabled_src/ExtFrames/modern_ext_frames_extern.c deleted file mode 100644 index fb5f8b2847..0000000000 --- a/plugins/Modernb/_disabled_src/ExtFrames/modern_ext_frames_extern.c +++ /dev/null @@ -1,99 +0,0 @@ -/**************************************************************************\ - -Miranda IM: the free IM client for Microsoft* Windows* - -Copyright 2000-2008 Miranda ICQ/IM project, -all portions of this code base are copyrighted to Artem Shpynov and/or -the people listed in contributors.txt. - -This program is free software; you can redistribute it and/or -modify it under the terms of the GNU General Public License -as published by the Free Software Foundation; either version 2 -of the License, or (at your option) any later version. - -This program is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU General Public License for more details. - -You should have received a copy of the GNU General Public License -along with this program; if not, write to the Free Software -Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. - -**************************************************************************** - -Created: Mar 19, 2007 - -Author and Copyright: Artem Shpynov aka FYR: ashpynov@gmail.com - -**************************************************************************** - -File contains realization of externaly available procedures -for modern_ext_frames.c module. - -This file have to be excluded from compilation and need to be adde to project via -#include preprocessor derective in modern_ext_frames.c - -\**************************************************************************/ - -#include "..\commonheaders.h" //only for precompiled headers - -#ifdef __modern_ext_frames_c__include_c_file //protection from adding to compilation -int ExtFrames_Init() -{ - if (ExtFrames.bModuleActive) return 0; - InitializeCriticalSection(&ExtFrames.CS); - ExtFrames.List=li.List_Create(0,1); - ExtFrames.List->sortFunc=_ExtFramesUtils_CopmareFrames; - _ExtFrames_InitServices(); - ExtFrames.bModuleActive = TRUE; - return 1; -} - -int ExtFrames_Uninit() -{ - efcheck 0; - eflock; - { - ExtFrames.bModuleActive = FALSE; - _ExtFrames_UninitServices(); - li_ListDestruct(ExtFrames.List, _ExtFrames_DestructorOf_EXTFRAMEWND); - ExtFrames.bModuleActive = FALSE; - } - efunlock; - DeleteCriticalSection(&ExtFrames.CS); - return 1; -} -int ExtFrames_GetMinWindowSize( OUT SIZE * size ) -{ - int minCX=0; - int minCY=0; - - efcheck 0; - eflock; - minCY=_ExtFrames_GetMinParentSize(ExtFrames.List, size); - efunlock; - return minCY; -} - -int ExtFrames_GetMaxCLCHeight( IN int iMaxDueDesk ) -{ - int maxHeight=iMaxDueDesk; - efcheck 0; - eflock; - { - int i=ExtFrames.List->realCount-1; - maxHeight=max(iMaxDueDesk, _ExtFrames_GetMinParentSize(ExtFrames.List,NULL)); - for (; i>0; --i) - { - EXTFRAMEWND * extFrame=(EXTFRAMEWND *)ExtFrames.List->items[i]; - if (extFrame && (extFrame->efrm.dwFlags&F_VISIBLE) && !extFrame->efrm.bFloat && !extFrame->efrm.bNotRegistered) - if (extFrame->efrm.nType==EFT_HORIZONTAL) - maxHeight-=extFrame->efrm.minCY; - } - } - efunlock; - return maxHeight; -} - -#endif \ No newline at end of file diff --git a/plugins/Modernb/_disabled_src/ExtFrames/modern_ext_frames_intern.c b/plugins/Modernb/_disabled_src/ExtFrames/modern_ext_frames_intern.c deleted file mode 100644 index 4eed16663a..0000000000 --- a/plugins/Modernb/_disabled_src/ExtFrames/modern_ext_frames_intern.c +++ /dev/null @@ -1,195 +0,0 @@ -/**************************************************************************\ - -Miranda IM: the free IM client for Microsoft* Windows* - -Copyright 2000-2008 Miranda ICQ/IM project, -all portions of this code base are copyrighted to Artem Shpynov and/or -the people listed in contributors.txt. - -This program is free software; you can redistribute it and/or -modify it under the terms of the GNU General Public License -as published by the Free Software Foundation; either version 2 -of the License, or (at your option) any later version. - -This program is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU General Public License for more details. - -You should have received a copy of the GNU General Public License -along with this program; if not, write to the Free Software -Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. - -**************************************************************************** - -Created: Mar 19, 2007 - -Author and Copyright: Artem Shpynov aka FYR: ashpynov@gmail.com - -**************************************************************************** - -File contains realization of internal only available procedures -for modern_ext_frames.c module. - -This file have to be excluded from compilation and need to be adde to project via -#include preprocessor derective in modern_ext_frames.c - -\**************************************************************************/ - -#include "..\commonheaders.h" //only for precompiled headers - -#ifdef __modern_ext_frames_c__include_c_file //protection from adding to compilation -// Closed module methods -static int _ExtFrames_GetMinParentSize(IN SortedList* pList, OUT SIZE * size ) -{ - EXTFRAME * clcFrame=(EXTFRAME *) pList->items[pList->realCount-1]; - int minCX=clcFrame->minCX; - int minCY=clcFrame->minCY; - int i=pList->realCount-1; - for (; i>0; --i) - { - EXTFRAME * extFrame=(EXTFRAME *)pList->items[i]; - if (extFrame && (extFrame->dwFlags&F_VISIBLE) && !extFrame->bFloat && !extFrame->bNotRegistered) - { - if (extFrame->nType==EFT_VERTICAL) - { - minCX+=extFrame->minCX; - minCY=max( minCY, extFrame->minCY ); - } - else - { - minCY+=extFrame->minCY; - minCX=max( minCX,extFrame->minCX ); - } - } - } - if (size) - { - size->cx=minCX; - size->cy=minCY; - } - return minCY; -} - -static int _ExtFrames_CalcFramesRect(IN SortedList* pList, IN int width, IN int height, OUT RECT * pOutRect ) -{ - int outHeight=height; - int i; - SIZE size; - RECT outRect={0}; - int frmCount=pList->realCount-1; - EXTFRAME * clcFrame=(EXTFRAME *)pList->items[frmCount]; - if (ExtFrames_GetMinWindowSize(&size)) //ensure that we provide normal size - { - width=max(size.cx,width); - height=max(size.cy,height); - } - outRect.right=width; - outRect.bottom=height; - - for (i=0; iitems[i]; - if (extFrame && (extFrame->dwFlags&F_VISIBLE) && !extFrame->bFloat && !extFrame->bNotRegistered) - { - extFrame->rcFrameRect=outRect; - switch(extFrame->nEdge) - { - case EFP_LEFT: - extFrame->rcFrameRect.right=extFrame->rcFrameRect.left+extFrame->minCX; - outRect.left+=extFrame->minCX; - break; - case EFP_RIGHT: - extFrame->rcFrameRect.left=extFrame->rcFrameRect.right-extFrame->minCX; - outRect.right-=extFrame->minCX; - break; - case EFP_TOP: - extFrame->rcFrameRect.bottom=extFrame->rcFrameRect.top+extFrame->minCY; - outRect.top+=extFrame->minCY; - break; - case EFP_BOTTOM: - extFrame->rcFrameRect.top=extFrame->rcFrameRect.bottom-extFrame->minCY; - outRect.bottom-=extFrame->minCY; - break; - } - } - } - clcFrame->rcFrameRect=outRect; - if (pOutRect) - { - pOutRect->top=0; - pOutRect->left=0; - pOutRect->right=width; - pOutRect->bottom=height; - } - outHeight=height; - return height; -} - -static void _ExtFrames_DestructorOf_EXTFRAMEWND(void * extFrame) -{ - EXTFRAMEWND * pExtFrameWnd = (EXTFRAMEWND *) extFrame; - if (!pExtFrameWnd) return; //early exit - if ( pExtFrameWnd->efrm.szFrameNameID ) mir_free( pExtFrameWnd->efrm.szFrameNameID ); - mir_free( pExtFrameWnd ); - return; -} - -static void _ExtFrames_GetFrameDBOption(EXTFRAMEWND * pExtFrm) -{ - // Each known frame order per 1 000 000 - // Each Unknown frame but absent during saving per 10 000 - // Each new unknown per 100 - static DWORD NextUnknownOrder=100; - char szKey[100]={0}; - DWORD dwOrderInDB; - if (!mir_strcmpi(pExtFrm->efrm.szFrameNameID,"My Contacts")) - dwOrderInDB=0xFFFFFFFF; - else - { - _snprintf(szKey,sizeof(szKey), EXTFRAMEORDERDBPREFIX "%s",pExtFrm->efrm.szFrameNameID); - dwOrderInDB=DBGetContactSettingDword(NULL,EXTFRAMEMODULE,szKey,0); - if (!dwOrderInDB) - { - dwOrderInDB=NextUnknownOrder; - NextUnknownOrder+=100; - } - else - NextUnknownOrder = dwOrderInDB + 100; - } - pExtFrm->efrm.dwOrder=dwOrderInDB; - -} -static int _ExtFramesUtils_CopmareFrames(void * first, void * last) -{ - EXTFRAMEWND * pExtFrmWnd1=(EXTFRAMEWND *)first; - EXTFRAMEWND * pExtFrmWnd2=(EXTFRAMEWND *)last; - if (!pExtFrmWnd1 || ! pExtFrmWnd2) return 0; - return pExtFrmWnd1->efrm.dwOrder-pExtFrmWnd2->efrm.dwOrder; -} -static void _ExtFramesUtils_CheckAlighment(EXTFRAMEWND * pExtFrm) -{ - if (!(pExtFrm->efrm.dwFlags&F_CANBEVERTICAL) && pExtFrm->efrm.nType == EFT_VERTICAL) - { - //issue have not be ever Vertical - int minsize = pExtFrm->efrm.minCX; - pExtFrm->efrm.minCX = pExtFrm->efrm.minCY; - pExtFrm->efrm.minCY = minsize; - - pExtFrm->efrm.nType = EFT_HORIZONTAL; - pExtFrm->efrm.nEdge&=(~alVertFrameMask); - - } - else if (pExtFrm->efrm.dwFlags&F_CANBEVERTICAL && !(pExtFrm->efrm.dwFlags&F_CANNOTBEHORIZONTAL) && (pExtFrm->efrm.nType == EFT_HORIZONTAL)) - { - //issue have not be Horizontal - int minsize = pExtFrm->efrm.minCX; - pExtFrm->efrm.minCX = pExtFrm->efrm.minCY; - pExtFrm->efrm.minCY = minsize; - - pExtFrm->efrm.nType=EFT_VERTICAL; - pExtFrm->efrm.nEdge|=alVertFrameMask; - } -} - -#endif \ No newline at end of file diff --git a/plugins/Modernb/_disabled_src/ExtFrames/modern_ext_frames_opt.c b/plugins/Modernb/_disabled_src/ExtFrames/modern_ext_frames_opt.c deleted file mode 100644 index 7930530a84..0000000000 --- a/plugins/Modernb/_disabled_src/ExtFrames/modern_ext_frames_opt.c +++ /dev/null @@ -1,346 +0,0 @@ -/**************************************************************************\ - -Miranda IM: the free IM client for Microsoft* Windows* - -Copyright 2000-2008 Miranda ICQ/IM project, -all portions of this code base are copyrighted to Artem Shpynov and/or -the people listed in contributors.txt. - -This program is free software; you can redistribute it and/or -modify it under the terms of the GNU General Public License -as published by the Free Software Foundation; either version 2 -of the License, or (at your option) any later version. - -This program is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU General Public License for more details. - -You should have received a copy of the GNU General Public License -along with this program; if not, write to the Free Software -Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. - -**************************************************************************** - -Created: Mar 19, 2007 - -Author and Copyright: Artem Shpynov aka FYR: ashpynov@gmail.com - -**************************************************************************** - -File contains realization of options procedures -for modern_ext_frames.c module. - -This file have to be excluded from compilation and need to be adde to project via -#include preprocessor derective in modern_ext_frames.c - -\**************************************************************************/ - -#include "..\commonheaders.h" //only for precompiled headers - -#ifdef __modern_ext_frames_c__include_c_file //protection from adding to compilation - -static SortedList * extFrmOptList=NULL; - -static int _ExtFrames_OptionsDlgInit(WPARAM wParam,LPARAM lParam) -{ - OPTIONSDIALOGPAGE odp; - efcheck 0; - if (MirandaExiting()) return 0; - ZeroMemory(&odp,sizeof(odp)); - odp.cbSize=sizeof(odp); - odp.position=0; - odp.hInstance=g_hInst; - //odp.ptszGroup=TranslateT("Contact List"); - odp.pszTemplate=MAKEINTRESOURCEA(IDD_OPT_EXTFRAMES); - odp.ptszTitle=LPGENT("Contact List"); - odp.pfnDlgProc=_ExtFrames_DlgProcFrameOpts; - odp.ptszTab=LPGENT("Frames"); - odp.flags=ODPF_BOLDGROUPS|ODPF_EXPERTONLY|ODPF_TCHAR; -#ifdef _DEBUG - CallService(MS_OPT_ADDPAGE,wParam,(LPARAM)&odp); -#endif - return 0; -} - -static int _ExtFramesOptUtils_enumdb_Frames (const char *szSetting,LPARAM lParam) -{ - EXTFRAMEOPTDBENUMERATION * params=(EXTFRAMEOPTDBENUMERATION *)lParam; - char * szName=NULL; - - if (wildcmpi((char*)szSetting,EXTFRAMEORDERDBPREFIX "?*")) - { - char szDBKey[100]; - DWORD nOrder; - EXTFRAMEWND * pExtFrame; - szName=(char*)szSetting+SIZEOF(EXTFRAMEORDERDBPREFIX)-1; - - _snprintf(szDBKey, SIZEOF(szDBKey), EXTFRAMEORDERDBPREFIX"%s", szName); - nOrder=DBGetContactSettingDword(NULL, EXTFRAMEMODULE, szDBKey, 0); - - pExtFrame=mir_alloc(sizeof(EXTFRAMEWND)); - memset(pExtFrame, 0, sizeof(EXTFRAMEWND)); - - pExtFrame->efrm.szFrameNameID = mir_strdup(szName); - pExtFrame->efrm.bNotRegistered = TRUE; - pExtFrame->efrm.dwOrder = nOrder; - li.List_Insert(params->pFrameList, pExtFrame, params->pFrameList->realCount); - } - return 0; -} - -static void _ExtFramesOptUtils_FillListOfFrames(HWND hwndDlg, SortedList * pFrameList) -{ - DBCONTACTENUMSETTINGS dbces; - EXTFRAMEOPTDBENUMERATION params={0}; - int i, j; - - //firstly add all known frames from db as not registered - params.hwndDlg=hwndDlg; - params.pFrameList=pFrameList; - dbces.pfnEnumProc=_ExtFramesOptUtils_enumdb_Frames; - dbces.szModule=EXTFRAMEMODULE; - dbces.ofsSettings=0; - dbces.lParam=(LPARAM)¶ms; - CallService(MS_DB_CONTACT_ENUMSETTINGS,0,(LPARAM)&dbces); - - //now lets check registered frames and if it in list - set registered if not set add - efcheck; - eflock; - { - for (i=0; irealCount; i++) - { - EXTFRAMEWND * pRegExtFrm=(EXTFRAMEWND *)ExtFrames.List->items[i]; - EXTFRAMEWND * pKnownFrm=NULL; - for (j=0; jrealCount; j++) - { - EXTFRAMEWND * pFrm=(EXTFRAMEWND *)pFrameList->items[j]; - if (!mir_strcmpi(pFrm->efrm.szFrameNameID, pRegExtFrm->efrm.szFrameNameID)) - { - pKnownFrm=pFrm; - break; - } - } - if (!pKnownFrm) - { - pKnownFrm=mir_alloc(sizeof(EXTFRAMEWND)); - memset(pKnownFrm, 0, sizeof(EXTFRAMEWND)); - li.List_Insert(pFrameList, pKnownFrm, pFrameList->realCount); - } - if (pKnownFrm->efrm.szFrameNameID) mir_free(pKnownFrm->efrm.szFrameNameID); - *pKnownFrm=*pRegExtFrm; - pKnownFrm->efrm.szFrameNameID = mir_strdup(pRegExtFrm->efrm.szFrameNameID); - } - } - efunlock; - li_SortList(pFrameList,NULL); - //now lets add all Registered and visible frames to frame list - for (i=0; irealCount; i++) - { - EXTFRAMEWND * pFrm=(EXTFRAMEWND *)pFrameList->items[i]; - TCHAR * name=mir_a2t(pFrm->efrm.szFrameNameID); - int idx=SendDlgItemMessage(hwndDlg, IDC_EXTRAORDER, LB_ADDSTRING, 0, (LPARAM)TranslateTS(name)); - mir_free(name); - SendDlgItemMessage(hwndDlg, IDC_EXTRAORDER, LB_SETITEMDATA, idx, (LPARAM) pFrm); - } -} -static void _ExtFramesOptUtils_RenderPreview(HWND hwndDlg, SortedList * pList, HDC hDC) -{ - int i; - RECT rcCLUIWindow; - RECT rcPreviewWindow; - RECT outRect={0}; - float scaleX=1, scaleY=1; - HFONT hFont = (HFONT)SendMessage(hwndDlg,WM_GETFONT,0,0); - LOGFONT lf; - HFONT hNewFont; - void * pCurrSelected=NULL; - int idx=SendDlgItemMessage(hwndDlg, IDC_EXTRAORDER, LB_GETCURSEL, 0,0); - int Num=0; - if (idx>=0) - pCurrSelected=(void*)SendDlgItemMessage(hwndDlg, IDC_EXTRAORDER, LB_GETITEMDATA, idx,0); - GetObject(hFont, sizeof(lf), &lf); - - GetWindowRect(pcli->hwndContactList,&rcCLUIWindow); - OffsetRect(&rcCLUIWindow,-rcCLUIWindow.left, -rcCLUIWindow.top); - - GetWindowRect(GetDlgItem(hwndDlg,IDC_PREVIEW),&rcPreviewWindow); - OffsetRect(&rcPreviewWindow,-rcPreviewWindow.left, -rcPreviewWindow.top); - - _ExtFrames_CalcFramesRect(pList, rcCLUIWindow.right, rcCLUIWindow.bottom, &outRect ); - OffsetRect(&outRect,-outRect.left, -outRect.top); - - if (rcCLUIWindow.right) scaleX=((float)rcPreviewWindow.right/outRect.right); - if (rcCLUIWindow.bottom) scaleY=((float)rcPreviewWindow.bottom/outRect.bottom); - - Rectangle(hDC,0,0,rcPreviewWindow.right,rcPreviewWindow.bottom); - for (i=0; irealCount; i++) - { - EXTFRAMEWND * pExtFrm=(EXTFRAMEWND *)pList->items[i]; - - if (pExtFrm->efrm.dwFlags&F_VISIBLE && !pExtFrm->efrm.bNotRegistered && !pExtFrm->efrm.bFloat) - { - if (pExtFrm->efrm.nType&EFT_VERTICAL) - lf.lfEscapement=900; - else - lf.lfEscapement=0; - if (pCurrSelected==pExtFrm) - { - SelectObject(hDC,GetSysColorBrush(COLOR_HIGHLIGHT)); - SetTextColor(hDC,GetSysColor(COLOR_HIGHLIGHTTEXT)); - SetBkColor(hDC,GetSysColor(COLOR_HIGHLIGHT)); - } else { - SelectObject(hDC,GetSysColorBrush(COLOR_WINDOW)); - SetTextColor(hDC,GetSysColor(COLOR_WINDOWTEXT)); - SetBkColor(hDC,GetSysColor(COLOR_WINDOW)); - } - hNewFont=CreateFontIndirect(&lf); - SelectObject(hDC,hNewFont); - - outRect=pExtFrm->efrm.rcFrameRect; - outRect.left=(int)(scaleX*outRect.left); - outRect.top=(int)(scaleY*outRect.top); - outRect.right=(int)(scaleX*outRect.right); - outRect.bottom=(int)(scaleY*outRect.bottom); - Rectangle(hDC,outRect.left,outRect.top,outRect.right,outRect.bottom); - { - char szText[100]; - Num++; - _snprintf(szText,SIZEOF(szText),"%d. <%s>",Num, Translate(pExtFrm->efrm.szFrameNameID)); - DrawTextA(hDC,szText,-1,&outRect,DT_VCENTER|DT_CENTER|DT_NOPREFIX|DT_SINGLELINE); - } - SelectObject(hDC,GetStockObject(SYSTEM_FONT)); - DeleteObject(hNewFont); - } - } - -} - -static void _ExtFramesOptUtils_UpdateFrameOptControl(HWND hwndDlg, SortedList * pList) -{ - int idx=SendDlgItemMessage(hwndDlg, IDC_EXTRAORDER, LB_GETCURSEL, 0,0); - int count=SendDlgItemMessage(hwndDlg, IDC_EXTRAORDER, LB_GETCOUNT, 0,0); - RECT rcCLUIWindow; - GetWindowRect(pcli->hwndContactList,&rcCLUIWindow); - OffsetRect(&rcCLUIWindow,-rcCLUIWindow.left, -rcCLUIWindow.top); - - EnableWindow(GetDlgItem(hwndDlg,IDC_BUTTON_UP),(idx>0 && idx=0 && idxrealCount; i++) - { - if (afterFrame && pList->items[i]==pFrm2) break; - if (afterFrame) - { - EXTFRAMEWND * pFrm=(EXTFRAMEWND *)pList->items[i]; - if (pFrm->efrm.bNotRegistered) pFrm->efrm.dwOrder=newOrder++; - else break; - } - if (pList->items[i]==pFrm1) - afterFrame=TRUE; - } - -} - -static void _ExtFramesOptUtils_ExchangeItems(HWND hwndDlg, SortedList * pList, int fst, int scnd) -{ - int first,second; - first=min(fst,scnd); - second=max(fst,scnd); - if (first>=0 && second>=0 && first!=second) - { - EXTFRAMEWND * pFrm1=(EXTFRAMEWND *)SendDlgItemMessage(hwndDlg, IDC_EXTRAORDER, LB_GETITEMDATA, first, 0); - EXTFRAMEWND * pFrm2=(EXTFRAMEWND *)SendDlgItemMessage(hwndDlg, IDC_EXTRAORDER, LB_GETITEMDATA, second, 0); - int len=SendDlgItemMessage(hwndDlg, IDC_EXTRAORDER, LB_GETTEXTLEN, second, 0); - TCHAR * secondText=mir_alloc(len*sizeof(TCHAR)); - int idx; - SendDlgItemMessage(hwndDlg, IDC_EXTRAORDER, LB_GETTEXT, second, (LPARAM)secondText); - SendDlgItemMessage(hwndDlg, IDC_EXTRAORDER, LB_DELETESTRING, second, 0); - idx=SendDlgItemMessage(hwndDlg, IDC_EXTRAORDER, LB_INSERTSTRING, first, (LPARAM)secondText); - SendDlgItemMessage(hwndDlg, IDC_EXTRAORDER, LB_SETITEMDATA, idx, (LPARAM) pFrm2); - //TO DO: change order in li.list - { - int newFirstOrder=pFrm2->efrm.dwOrder; - int newSecondOrder=pFrm1->efrm.dwOrder; - - pFrm1->efrm.dwOrder=newFirstOrder; - pFrm2->efrm.dwOrder=newSecondOrder; - _ExtFramesOptUtils_UpdateNotRegisteredFrames(pList,newFirstOrder, pFrm1, pFrm2 ); - _ExtFramesOptUtils_UpdateNotRegisteredFrames(pList,newSecondOrder, pFrm2, pFrm1 ); - li_SortList(pList,NULL); - } - SendDlgItemMessage(hwndDlg, IDC_EXTRAORDER, LB_SETCURSEL, fst, 0); - _ExtFramesOptUtils_UpdateFrameOptControl(hwndDlg,pList); - } -} - -static BOOL CALLBACK _ExtFrames_DlgProcFrameOpts(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lParam) -{ - switch (msg) - { - case WM_DRAWITEM: - if (wParam==IDC_PREVIEW) - { - DRAWITEMSTRUCT * lpDrawItem=(DRAWITEMSTRUCT *)lParam; - _ExtFramesOptUtils_RenderPreview(hwndDlg,extFrmOptList,lpDrawItem->hDC); - return TRUE; - } - break; - case WM_INITDIALOG: - { - TranslateDialogDefault(hwndDlg); - extFrmOptList=li.List_Create(0,1); - extFrmOptList->sortFunc=_ExtFramesUtils_CopmareFrames; - _ExtFramesOptUtils_FillListOfFrames(hwndDlg,extFrmOptList); - _ExtFramesOptUtils_UpdateFrameOptControl(hwndDlg,extFrmOptList); - return TRUE; - } - case WM_COMMAND: - { - if (LOWORD(wParam)==IDC_EXTRAORDER && - (HIWORD(wParam)==LBN_SELCHANGE || HIWORD(wParam)==LBN_SELCANCEL ) ) - { - _ExtFramesOptUtils_UpdateFrameOptControl(hwndDlg, extFrmOptList); - return TRUE; - } - else if (HIWORD(wParam)==BN_CLICKED && - (LOWORD(wParam)==IDC_BUTTON_UP || LOWORD(wParam)==IDC_BUTTON_DOWN)) - { - int idx=SendDlgItemMessage(hwndDlg, IDC_EXTRAORDER, LB_GETCURSEL, 0,0); - if (LOWORD(wParam)==IDC_BUTTON_UP) - _ExtFramesOptUtils_ExchangeItems(hwndDlg, extFrmOptList, idx-1, idx); - else - _ExtFramesOptUtils_ExchangeItems(hwndDlg, extFrmOptList, idx+1, idx); - return TRUE; - } - - break; - } - case WM_DESTROY: - { - li_ListDestruct(extFrmOptList,_ExtFrames_DestructorOf_EXTFRAMEWND); - extFrmOptList=NULL; - } - return TRUE; - case 0: - switch (((LPNMHDR)lParam)->code) - { - case PSN_APPLY: - { - - } - return TRUE; - } - } - return FALSE; -} - -#endif \ No newline at end of file diff --git a/plugins/Modernb/_disabled_src/ExtFrames/modern_ext_frames_private.h b/plugins/Modernb/_disabled_src/ExtFrames/modern_ext_frames_private.h deleted file mode 100644 index 03f8e725a3..0000000000 --- a/plugins/Modernb/_disabled_src/ExtFrames/modern_ext_frames_private.h +++ /dev/null @@ -1,132 +0,0 @@ -/**************************************************************************\ - -Miranda IM: the free IM client for Microsoft* Windows* - -Copyright 2000-2008 Miranda ICQ/IM project, -all portions of this code base are copyrighted to Artem Shpynov and/or -the people listed in contributors.txt. - -This program is free software; you can redistribute it and/or -modify it under the terms of the GNU General Public License -as published by the Free Software Foundation; either version 2 -of the License, or (at your option) any later version. - -This program is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU General Public License for more details. - -You should have received a copy of the GNU General Public License -along with this program; if not, write to the Free Software -Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. - -**************************************************************************** - -Created: Mar 19, 2007 - -Author and Copyright: Artem Shpynov aka FYR: ashpynov@gmail.com - -\**************************************************************************/ - -#define eflock EnterCriticalSection(&ExtFrames.CS) -#define efunlock LeaveCriticalSection(&ExtFrames.CS) -#define efcheck if (!ExtFrames.bModuleActive) return - -#define EFT_VERTICAL 1 -#define EFT_HORIZONTAL 0 - -#define EFP_LEFT alLeft -#define EFP_TOP alTop -#define EFP_RIGHT alRight -#define EFP_BOTTOM alBottom - -#define EXTFRAMEMODULE "ExtFrames" -#define EXTFRAMEORDERDBPREFIX "FrameOrder/" - -typedef struct tagExtFrameRectDef -{ - DWORD dwOrder; - /* Used in both for frames and for options */ - int minCX; - int minCY; - BYTE nType; - BYTE nEdge; - BOOL bInPrevious; - RECT rcFrameRect; - char *szFrameNameID; //to be dealloced in destructor - - /* Used for real frames and faked in options */ - DWORD dwFlags; - BOOL bFloat; - BOOL bNotRegistered; // for options means frame is Not Registered -} EXTFRAME; - -typedef struct tagExtFrameWndDef -{ - EXTFRAME efrm; //have to be first element - //EXTFRAMEWND* can be directly type casted to EXTFRAME* - - /* Used Only for real frames */ - HWND hwndFrame; - HWND hwndTitle; - DWORD dwFrameID; - -} EXTFRAMEWND; - -typedef struct tagExtFrameModule -{ - CRITICAL_SECTION CS; - BOOL bModuleActive; - SortedList * List; - HANDLE hookSBShowTooltip; // ME_CLIST_FRAMES_SB_SHOW_TOOLTIP - HANDLE hookSBHideTooltip; // ME_CLIST_FRAMES_SB_HIDE_TOOLTIP - HANDLE hookPrebuildFrameMenu; // ME_CLIST_PREBUILDFRAMEMENU - DWORD dwNextFrameID; // unique number of registered frames -}EXTFRAMESMODULE; - -typedef struct tagExtFramesOptDBEnumeration -{ - HWND hwndDlg; - SortedList * pFrameList; -}EXTFRAMEOPTDBENUMERATION; - -////////////////////////////////////////////////////////////////////////// -// Static Declarations - -// modern_ext_frames_intern.c -static void _ExtFrames_DestructorOf_EXTFRAMEWND(void * extFrame); -static int _ExtFrames_CalcFramesRect( IN SortedList* pList, IN int width, IN int height, OUT RECT * pWndRect ); -static int _ExtFrames_GetMinParentSize( IN SortedList* pList, OUT SIZE * size ); -static void _ExtFrames_GetFrameDBOption( IN OUT EXTFRAMEWND * pExtFrm ); -static void _ExtFramesUtils_CheckAlighment( IN OUT EXTFRAMEWND * extFrame ); -static int _ExtFramesUtils_CopmareFrames(void * first, void * last); - - -// modern_ext_frames_services.c -static void _ExtFrames_InitServices(); -static void _ExtFrames_UninitServices(); - -// modern_ext_frames_opt.c -static int _ExtFrames_OptionsDlgInit(WPARAM wParam,LPARAM lParam); -static BOOL CALLBACK _ExtFrames_DlgProcFrameOpts(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lParam); - -// -/**static*/ int _ExtFramesSrv_AddFrame(WPARAM wParam, LPARAM lParam); -static int _ExtFramesSrv_RemoveFrame(WPARAM wParam, LPARAM lParam); -static int _ExtFramesSrv_ShowAllFrames(WPARAM wParam, LPARAM lParam); -static int _ExtFramesSrv_ShowAllFramesTB(WPARAM wParam, LPARAM lParam); -static int _ExtFramesSrv_HideAllFramesTB(WPARAM wParam, LPARAM lParam); -static int _ExtFramesSrv_SHFrame(WPARAM wParam, LPARAM lParam); -static int _ExtFramesSrv_SHFrameTitleBar(WPARAM wParam, LPARAM lParam); -static int _ExtFramesSrv_ULFrame(WPARAM wParam, LPARAM lParam); -static int _ExtFramesSrv_UCollFrame(WPARAM wParam, LPARAM lParam); -static int _ExtFramesSrv_SetUnBorder(WPARAM wParam, LPARAM lParam); -static int _ExtFramesSrv_UpdateFrame(WPARAM wParam, LPARAM lParam); -static int _ExtFramesSrv_GetFrameOptions(WPARAM wParam, LPARAM lParam); -static int _ExtFramesSrv_SetFrameOptions(WPARAM wParam, LPARAM lParam); - - - -////////////////////////////////////////////////////////////////////////// -// Static Local Global Variable -static EXTFRAMESMODULE ExtFrames={0}; \ No newline at end of file diff --git a/plugins/Modernb/_disabled_src/ExtFrames/modern_ext_frames_services.c b/plugins/Modernb/_disabled_src/ExtFrames/modern_ext_frames_services.c deleted file mode 100644 index e56be79255..0000000000 --- a/plugins/Modernb/_disabled_src/ExtFrames/modern_ext_frames_services.c +++ /dev/null @@ -1,386 +0,0 @@ -/**************************************************************************\ - -Miranda IM: the free IM client for Microsoft* Windows* - -Copyright 2000-2008 Miranda ICQ/IM project, -all portions of this code base are copyrighted to Artem Shpynov and/or -the people listed in contributors.txt. - -This program is free software; you can redistribute it and/or -modify it under the terms of the GNU General Public License -as published by the Free Software Foundation; either version 2 -of the License, or (at your option) any later version. - -This program is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU General Public License for more details. - -You should have received a copy of the GNU General Public License -along with this program; if not, write to the Free Software -Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. - -**************************************************************************** - -Created: Mar 19, 2007 - -Author and Copyright: Artem Shpynov aka FYR: ashpynov@gmail.com - -**************************************************************************** - -File contains realization of service procedures -for modern_ext_frames.c module. - -This file have to be excluded from compilation and need to be adde to project via -#include preprocessor derective in modern_ext_frames.c - -\**************************************************************************/ - -#include "..\commonheaders.h" //only for precompiled headers - -#ifdef __modern_ext_frames_c__include_c_file //protection from adding to compilation - -static void _ExtFrames_InitServices() -{ - //Create services here - /* - CreateServiceFunction( MS_CLIST_FRAMES_ADDFRAME, _ExtFramesSrv_AddFrame ); - CreateServiceFunction( MS_CLIST_FRAMES_REMOVEFRAME, _ExtFramesSrv_RemoveFrame ); - CreateServiceFunction( MS_CLIST_FRAMES_SHOWALLFRAMES, _ExtFramesSrv_ShowAllFrames ); - CreateServiceFunction( MS_CLIST_FRAMES_SHOWALLFRAMESTB, _ExtFramesSrv_ShowAllFramesTB ); - CreateServiceFunction( MS_CLIST_FRAMES_HIDEALLFRAMESTB, _ExtFramesSrv_HideAllFramesTB ); - CreateServiceFunction( MS_CLIST_FRAMES_SHFRAME, _ExtFramesSrv_SHFrame ); - CreateServiceFunction( MS_CLIST_FRAMES_SHFRAMETITLEBAR, _ExtFramesSrv_SHFrameTitleBar ); - CreateServiceFunction( MS_CLIST_FRAMES_ULFRAME, _ExtFramesSrv_ULFrame ); - CreateServiceFunction( MS_CLIST_FRAMES_UCOLLFRAME, _ExtFramesSrv_UCollFrame ); - CreateServiceFunction( MS_CLIST_FRAMES_SETUNBORDER, _ExtFramesSrv_SetUnBorder ); - CreateServiceFunction( MS_CLIST_FRAMES_UPDATEFRAME, _ExtFramesSrv_UpdateFrame ); - CreateServiceFunction( MS_CLIST_FRAMES_GETFRAMEOPTIONS, _ExtFramesSrv_GetFrameOptions ); - CreateServiceFunction( MS_CLIST_FRAMES_SETFRAMEOPTIONS, _ExtFramesSrv_SetFrameOptions ); - - //TODO Frame menu stuff services - - //register event hook here - ExtFrames.hookSBShowTooltip = CreateHookableEvent( ME_CLIST_FRAMES_SB_SHOW_TOOLTIP ); - ExtFrames.hookSBHideTooltip = CreateHookableEvent( ME_CLIST_FRAMES_SB_HIDE_TOOLTIP ); - ExtFrames.hookPrebuildFrameMenu = CreateHookableEvent( ME_CLIST_PREBUILDFRAMEMENU ); - */ - - //Hook other events - HookEvent(ME_OPT_INITIALISE,_ExtFrames_OptionsDlgInit); -} - -static void _ExtFrames_UninitServices() -{ - if (ExtFrames.hookSBShowTooltip) UnhookEvent( ExtFrames.hookSBShowTooltip ); - if (ExtFrames.hookSBHideTooltip) UnhookEvent( ExtFrames.hookSBHideTooltip ); - if (ExtFrames.hookPrebuildFrameMenu) UnhookEvent( ExtFrames.hookPrebuildFrameMenu ); - - ExtFrames.hookSBShowTooltip = NULL; - ExtFrames.hookSBHideTooltip = NULL; - ExtFrames.hookPrebuildFrameMenu = NULL; -} - -////////////////////////////////////////////////////////////////////////// -//want show tooltip for statusbar -//wparam=(char *)protocolname -//lparam=0 -//#define ME_CLIST_FRAMES_SB_SHOW_TOOLTIP "CListFrames/StatusBarShowToolTip" - -////////////////////////////////////////////////////////////////////////// -//want hide tooltip for statusbar -//wparam=lparam=0 -//#define ME_CLIST_FRAMES_SB_HIDE_TOOLTIP "CListFrames/StatusBarHideToolTip" - -////////////////////////////////////////////////////////////////////////// -//adds a frame window -//wParam=(CLISTFrame*) -//lParam=0 -//returns an integer, the frame id. -//#define MS_CLIST_FRAMES_ADDFRAME "CListFrames/AddFrame" -/**static*/ int _ExtFramesSrv_AddFrame(WPARAM wParam, LPARAM lParam) -{ - CLISTFrame *clfrm=(CLISTFrame *)wParam; - int frameId = -1; - - // the clfrm->name is used as id in DB and frames without it will not be supported - if ( !clfrm || pcli->hwndContactList == NULL || clfrm->cbSize!=sizeof(CLISTFrame) || clfrm->name==NULL) - return frameId; - - efcheck frameId; - eflock; - { - EXTFRAMEWND * pExtFrm=(EXTFRAMEWND *)mir_alloc(sizeof(EXTFRAMEWND)); - memset(pExtFrm,0,sizeof(EXTFRAMEWND)); - pExtFrm->dwFrameID = ExtFrames.dwNextFrameID++; - pExtFrm->hwndFrame = clfrm->hWnd; - pExtFrm->efrm.szFrameNameID = mir_strdup(clfrm->name); - - //fill frame info by caller provided values - pExtFrm->efrm.dwFlags = clfrm->Flags; - // frame alignment - pExtFrm->efrm.nEdge = clfrm->align; - pExtFrm->efrm.nType = (clfrm->align&alVertFrameMask) ? EFT_VERTICAL : EFT_HORIZONTAL; - - if (pExtFrm->efrm.nType == EFT_VERTICAL) - pExtFrm->efrm.minCX = clfrm->minSize; - else - pExtFrm->efrm.minCY = clfrm->minSize; - - _ExtFrames_GetFrameDBOption(pExtFrm); - _ExtFramesUtils_CheckAlighment(pExtFrm); - li.List_Insert(ExtFrames.List, pExtFrm, 0); - //clfrm->hIcon - //clfrm->TBname - - frameId=pExtFrm->dwFrameID; - } - efunlock; - return frameId; //frame id -} -////////////////////////////////////////////////////////////////////////// -// remove frame. It does not destroy your window -// -//#define MS_CLIST_FRAMES_REMOVEFRAME "CListFrames/RemoveFrame" -static int _ExtFramesSrv_RemoveFrame(WPARAM wParam, LPARAM lParam) -{ - efcheck 0; - eflock; - { - // DO HERE - } - efunlock; - return 0; -} -////////////////////////////////////////////////////////////////////////// -//shows all frames -//wParam=lParam=0 -//returns 0 on success, -1 on failure -//#define MS_CLIST_FRAMES_SHOWALLFRAMES "CListFrames/ShowALLFrames" -static int _ExtFramesSrv_ShowAllFrames(WPARAM wParam, LPARAM lParam) -{ - efcheck -1; - eflock; - { - // DO HERE - } - efunlock; - return 0; -} -////////////////////////////////////////////////////////////////////////// -//shows the titlebars of all frames -//wParam=lParam=0 -//returns 0 on success, -1 on failure -//#define MS_CLIST_FRAMES_SHOWALLFRAMESTB "CListFrames/ShowALLFramesTB" -static int _ExtFramesSrv_ShowAllFramesTB(WPARAM wParam, LPARAM lParam) -{ - efcheck -1; - eflock; - { - // DO HERE - } - efunlock; - return 0; -} - -////////////////////////////////////////////////////////////////////////// -//hides the titlebars of all frames -//wParam=lParam=0 -//returns 0 on success, -1 on failure -//#define MS_CLIST_FRAMES_HIDEALLFRAMESTB "CListFrames/HideALLFramesTB" -static int _ExtFramesSrv_HideAllFramesTB(WPARAM wParam, LPARAM lParam) -{ - efcheck -1; - eflock; - { - // DO HERE - } - efunlock; - return 0; -} -////////////////////////////////////////////////////////////////////////// -//shows the frame if it is hidden, -//hides the frame if it is shown -//wParam=FrameId -//lParam=0 -//returns 0 on success, -1 on failure -//#define MS_CLIST_FRAMES_SHFRAME "CListFrames/SHFrame" -static int _ExtFramesSrv_SHFrame(WPARAM wParam, LPARAM lParam) -{ - efcheck -1; - eflock; - { - // DO HERE - } - efunlock; - return 0; -} -////////////////////////////////////////////////////////////////////////// -//shows the frame titlebar if it is hidden, -//hides the frame titlebar if it is shown -//wParam=FrameId -//lParam=0 -//returns 0 on success, -1 on failure -//#define MS_CLIST_FRAMES_SHFRAMETITLEBAR "CListFrame/SHFrameTitleBar" -static int _ExtFramesSrv_SHFrameTitleBar(WPARAM wParam, LPARAM lParam) -{ - efcheck -1; - eflock; - { - // DO HERE - } - efunlock; - return 0; -} - -////////////////////////////////////////////////////////////////////////// -//locks the frame if it is unlocked, -//unlock the frame if it is locked -//wParam=FrameId -//lParam=0 -//returns 0 on success, -1 on failure -//#define MS_CLIST_FRAMES_ULFRAME "CListFrame/ULFrame" -static int _ExtFramesSrv_ULFrame(WPARAM wParam, LPARAM lParam) -{ - efcheck -1; - eflock; - { - // DO HERE - } - efunlock; - return 0; -} -////////////////////////////////////////////////////////////////////////// -//collapses the frame if it is uncollapsed, -//uncollapses the frame if it is collapsed -//wParam=FrameId -//lParam=0 -//returns 0 on success, -1 on failure -//#define MS_CLIST_FRAMES_UCOLLFRAME "CListFrame/UCOLLFrame" -static int _ExtFramesSrv_UCollFrame(WPARAM wParam, LPARAM lParam) -{ - efcheck -1; - eflock; - { - // DO HERE - } - efunlock; - return 0; -} -////////////////////////////////////////////////////////////////////////// -//trigger border flags -//wparam=frameid -//lparam=0 -//#define MS_CLIST_FRAMES_SETUNBORDER "CListFrame/SetUnBorder" -static int _ExtFramesSrv_SetUnBorder(WPARAM wParam, LPARAM lParam) -{ - efcheck -1; - eflock; - { - // DO HERE - } - efunlock; - return 0; -} - -////////////////////////////////////////////////////////////////////////// -//redraws the frame -//wParam=FrameId, -1 for all frames -//lparam=FU_flags -//returns a pointer to option, -1 on failure -//#define MS_CLIST_FRAMES_UPDATEFRAME "CListFrame/UpdateFrame" -static int _ExtFramesSrv_UpdateFrame(WPARAM wParam, LPARAM lParam) -{ - int ret=-1; - efcheck ret; - eflock; - { - // DO HERE - } - efunlock; - return ret; -} -////////////////////////////////////////////////////////////////////////// -//gets the frame options -//(HIWORD)wParam=FrameId -//(LOWORD)wParam=FO_flag -//lParam=0 -//returns a pointer to option, -1 on failure -//#define MS_CLIST_FRAMES_GETFRAMEOPTIONS "CListFrame/GetFrameOptions" -static int _ExtFramesSrv_GetFrameOptions(WPARAM wParam, LPARAM lParam) -{ - int ret=-1; - efcheck ret; - eflock; - { - // DO HERE - } - efunlock; - return ret; -} -//sets the frame options -//(HIWORLD)wParam=FrameId -//(LOWORD)wParam=FO_flag -//lParam=value -//returns 0 on success, -1 on failure -//#define MS_CLIST_FRAMES_SETFRAMEOPTIONS "CListFrame/SetFrameOptions" -static int _ExtFramesSrv_SetFrameOptions(WPARAM wParam, LPARAM lParam) -{ - int ret=-1; - efcheck ret; - eflock; - { - // DO HERE - } - efunlock; - return ret; -} -////////////////////////////////////////////////////////////////////////// -//Frames related menu stuff -////////////////////////////////////////////////////////////////////////// - -////////////////////////////////////////////////////////////////////////// -//add a new item to the context frame menu -//wParam=0 -//lParam=(LPARAM)(CLISTMENUITEM*)&mi -//returns a handle to the new item -//popupposition=frameid -//contactowner=advanced parameter -//#define MS_CLIST_ADDCONTEXTFRAMEMENUITEM "CList/AddContextFrameMenuItem" - -////////////////////////////////////////////////////////////////////////// -//remove a item from context frame menu -//wParam=hMenuItem returned by MS_CLIST_ADDCONTACTMENUITEM -//lParam=0 -//returns 0 on success, nonzero on failure -//#define MS_CLIST_REMOVECONTEXTFRAMEMENUITEM "CList/RemoveContextFrameMenuItem" - -////////////////////////////////////////////////////////////////////////// -//builds the context menu for a frame -//wparam=frameid -//lParam=0 -//returns a HMENU on success, or NULL on failure -//#define MS_CLIST_MENUBUILDFRAMECONTEXT "CList/BuildContextFrameMenu" - -////////////////////////////////////////////////////////////////////////// -// the frame menu is about to be built -// wparam=frameid -// lparam= -// -1 for build from titlebar, -// use -// MS_CLIST_ADDCONTEXTFRAMEMENUITEM -// MS_CLIST_REMOVECONTEXTFRAMEMENUITEM -// -// >0 for build in main menu, -// must be popupname=lparam to place your items in right popup of main menu. -// use -// MS_CLIST_ADDMAINMENUITEM -// MS_CLIST_REMOVEMAINMENUITEM -// -//#define ME_CLIST_PREBUILDFRAMEMENU "CList/PreBuildFrameMenu" - -////////////////////////////////////////////////////////////////////////// -//needed by cluiframes module to add frames menu to main menu. -//it just calls NotifyEventHooks(hPreBuildFrameMenuEvent,wParam,lParam); -//#define MS_CLIST_FRAMEMENUNOTIFY "CList/ContextFrameMenuNotify" -#endif \ No newline at end of file -- cgit v1.2.3