From 48540940b6c28bb4378abfeb500ec45a625b37b6 Mon Sep 17 00:00:00 2001 From: Vadim Dashevskiy Date: Tue, 15 May 2012 10:38:20 +0000 Subject: initial commit git-svn-id: http://svn.miranda-ng.org/main/trunk@2 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- .../ExtFrames/modern_ext_frames_extern.c | 99 ++++++++++++++++++++++ 1 file changed, 99 insertions(+) create mode 100644 plugins/modernb/_disabled_src/ExtFrames/modern_ext_frames_extern.c (limited to 'plugins/modernb/_disabled_src/ExtFrames/modern_ext_frames_extern.c') diff --git a/plugins/modernb/_disabled_src/ExtFrames/modern_ext_frames_extern.c b/plugins/modernb/_disabled_src/ExtFrames/modern_ext_frames_extern.c new file mode 100644 index 0000000000..fb5f8b2847 --- /dev/null +++ b/plugins/modernb/_disabled_src/ExtFrames/modern_ext_frames_extern.c @@ -0,0 +1,99 @@ +/**************************************************************************\ + +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 -- cgit v1.2.3