From 79ba3ba4e2dff36fb4f76217c6f6ea63a256dff2 Mon Sep 17 00:00:00 2001 From: Vadim Dashevskiy Date: Sat, 25 Apr 2015 11:33:35 +0000 Subject: BossKey - common project git-svn-id: http://svn.miranda-ng.org/main/trunk@13131 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- bin10/mir_dev.sln | 2 +- bin10/mir_full.sln | 2 +- bin10/mir_full_pro.sln | 2 +- bin12/mir_dev.sln | 2 +- bin12/mir_full.sln | 2 +- plugins/BossKeyPlus/BossKey.vcxproj | 33 ++++ plugins/BossKeyPlus/BossKey.vcxproj.filters | 4 + plugins/BossKeyPlus/BossKey_10.vcxproj | 205 ------------------------ plugins/BossKeyPlus/BossKey_10.vcxproj.filters | 55 ------- plugins/BossKeyPlus/BossKey_12.vcxproj | 208 ------------------------- plugins/BossKeyPlus/BossKey_12.vcxproj.filters | 50 ------ plugins/BossKeyPlus/src/BossKey.cpp | 2 +- plugins/BossKeyPlus/src/BossKey.h | 103 ------------ plugins/BossKeyPlus/src/BossKeyIdle.cpp | 2 +- plugins/BossKeyPlus/src/Options.cpp | 2 +- plugins/BossKeyPlus/src/stdafx.cpp | 18 --- plugins/BossKeyPlus/src/stdafx.cxx | 18 +++ plugins/BossKeyPlus/src/stdafx.h | 103 ++++++++++++ 18 files changed, 166 insertions(+), 647 deletions(-) create mode 100644 plugins/BossKeyPlus/BossKey.vcxproj create mode 100644 plugins/BossKeyPlus/BossKey.vcxproj.filters delete mode 100644 plugins/BossKeyPlus/BossKey_10.vcxproj delete mode 100644 plugins/BossKeyPlus/BossKey_10.vcxproj.filters delete mode 100644 plugins/BossKeyPlus/BossKey_12.vcxproj delete mode 100644 plugins/BossKeyPlus/BossKey_12.vcxproj.filters delete mode 100644 plugins/BossKeyPlus/src/BossKey.h delete mode 100644 plugins/BossKeyPlus/src/stdafx.cpp create mode 100644 plugins/BossKeyPlus/src/stdafx.cxx create mode 100644 plugins/BossKeyPlus/src/stdafx.h diff --git a/bin10/mir_dev.sln b/bin10/mir_dev.sln index 0794f985ab..f2094d5163 100644 --- a/bin10/mir_dev.sln +++ b/bin10/mir_dev.sln @@ -45,7 +45,7 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "AuthState", "..\plugins\Aut EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Boltun", "..\plugins\Boltun\Boltun_10.vcxproj", "{98DF7761-41D7-4C5C-9FFE-E5CCB3997783}" EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "BossKey", "..\plugins\BossKeyPlus\BossKey_10.vcxproj", "{88E47CF7-7B40-4312-A35A-9B28885FFED9}" +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "BossKey", "..\plugins\BossKeyPlus\BossKey.vcxproj", "{88E47CF7-7B40-4312-A35A-9B28885FFED9}" EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "BuddyExpectator", "..\plugins\BuddyExpectator\BuddyExpectator_10.vcxproj", "{8CEBD7AC-CD02-4BEC-B889-A7243F3E5DD8}" EndProject diff --git a/bin10/mir_full.sln b/bin10/mir_full.sln index f74f085829..6a5bc2c0aa 100644 --- a/bin10/mir_full.sln +++ b/bin10/mir_full.sln @@ -45,7 +45,7 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "AuthState", "..\plugins\Aut EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Boltun", "..\plugins\Boltun\Boltun_10.vcxproj", "{98DF7761-41D7-4C5C-9FFE-E5CCB3997783}" EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "BossKey", "..\plugins\BossKeyPlus\BossKey_10.vcxproj", "{88E47CF7-7B40-4312-A35A-9B28885FFED9}" +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "BossKey", "..\plugins\BossKeyPlus\BossKey.vcxproj", "{88E47CF7-7B40-4312-A35A-9B28885FFED9}" EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "BuddyExpectator", "..\plugins\BuddyExpectator\BuddyExpectator_10.vcxproj", "{8CEBD7AC-CD02-4BEC-B889-A7243F3E5DD8}" EndProject diff --git a/bin10/mir_full_pro.sln b/bin10/mir_full_pro.sln index ed5f8c5314..ff45896819 100644 --- a/bin10/mir_full_pro.sln +++ b/bin10/mir_full_pro.sln @@ -45,7 +45,7 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "AuthState", "..\plugins\Aut EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Boltun", "..\plugins\Boltun\Boltun_10.vcxproj", "{98DF7761-41D7-4C5C-9FFE-E5CCB3997783}" EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "BossKey", "..\plugins\BossKeyPlus\BossKey_10.vcxproj", "{88E47CF7-7B40-4312-A35A-9B28885FFED9}" +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "BossKey", "..\plugins\BossKeyPlus\BossKey.vcxproj", "{88E47CF7-7B40-4312-A35A-9B28885FFED9}" EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "BuddyExpectator", "..\plugins\BuddyExpectator\BuddyExpectator_10.vcxproj", "{8CEBD7AC-CD02-4BEC-B889-A7243F3E5DD8}" EndProject diff --git a/bin12/mir_dev.sln b/bin12/mir_dev.sln index 619fbec5ba..530f145505 100644 --- a/bin12/mir_dev.sln +++ b/bin12/mir_dev.sln @@ -47,7 +47,7 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "AuthState", "..\plugins\Aut EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Boltun", "..\plugins\Boltun\Boltun_12.vcxproj", "{98DF7761-41D7-4C5C-9FFE-E5CCB3997783}" EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "BossKey", "..\plugins\BossKeyPlus\BossKey_12.vcxproj", "{88E47CF7-7B40-4312-A35A-9B28885FFED9}" +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "BossKey", "..\plugins\BossKeyPlus\BossKey.vcxproj", "{88E47CF7-7B40-4312-A35A-9B28885FFED9}" EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "BuddyExpectator", "..\plugins\BuddyExpectator\BuddyExpectator_12.vcxproj", "{8CEBD7AC-CD02-4BEC-B889-A7243F3E5DD8}" EndProject diff --git a/bin12/mir_full.sln b/bin12/mir_full.sln index b321e48f9e..56318d1270 100644 --- a/bin12/mir_full.sln +++ b/bin12/mir_full.sln @@ -47,7 +47,7 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "AuthState", "..\plugins\Aut EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Boltun", "..\plugins\Boltun\Boltun_12.vcxproj", "{98DF7761-41D7-4C5C-9FFE-E5CCB3997783}" EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "BossKey", "..\plugins\BossKeyPlus\BossKey_12.vcxproj", "{88E47CF7-7B40-4312-A35A-9B28885FFED9}" +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "BossKey", "..\plugins\BossKeyPlus\BossKey.vcxproj", "{88E47CF7-7B40-4312-A35A-9B28885FFED9}" EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "BuddyExpectator", "..\plugins\BuddyExpectator\BuddyExpectator_12.vcxproj", "{8CEBD7AC-CD02-4BEC-B889-A7243F3E5DD8}" EndProject diff --git a/plugins/BossKeyPlus/BossKey.vcxproj b/plugins/BossKeyPlus/BossKey.vcxproj new file mode 100644 index 0000000000..6cb61cbfe8 --- /dev/null +++ b/plugins/BossKeyPlus/BossKey.vcxproj @@ -0,0 +1,33 @@ + + + + + Debug + Win32 + + + Debug + x64 + + + Release + Win32 + + + Release + x64 + + + + BossKey + {88E47CF7-7B40-4312-A35A-9B28885FFED9} + + + + + + + Wtsapi32.lib;%(AdditionalDependencies) + + + \ No newline at end of file diff --git a/plugins/BossKeyPlus/BossKey.vcxproj.filters b/plugins/BossKeyPlus/BossKey.vcxproj.filters new file mode 100644 index 0000000000..de5ad9f66c --- /dev/null +++ b/plugins/BossKeyPlus/BossKey.vcxproj.filters @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/plugins/BossKeyPlus/BossKey_10.vcxproj b/plugins/BossKeyPlus/BossKey_10.vcxproj deleted file mode 100644 index ae89a3be97..0000000000 --- a/plugins/BossKeyPlus/BossKey_10.vcxproj +++ /dev/null @@ -1,205 +0,0 @@ - - - - - Debug - Win32 - - - Debug - x64 - - - Release - Win32 - - - Release - x64 - - - - BossKey - {88E47CF7-7B40-4312-A35A-9B28885FFED9} - - - - DynamicLibrary - Unicode - - - DynamicLibrary - Unicode - true - - - DynamicLibrary - Unicode - - - DynamicLibrary - Unicode - true - - - - - - - - - - - - - - - - - - - <_ProjectFileVersion>10.0.30319.1 - $(SolutionDir)$(Configuration)\Plugins\ - $(SolutionDir)$(Configuration)\Obj\$(ProjectName)\ - $(SolutionDir)$(Configuration)\Plugins\ - $(SolutionDir)$(Configuration)\Obj\$(ProjectName)\ - $(SolutionDir)$(Configuration)64\Plugins\ - $(SolutionDir)$(Configuration)64\Obj\$(ProjectName)\ - $(SolutionDir)$(Configuration)64\Plugins\ - $(SolutionDir)$(Configuration)64\Obj\$(ProjectName)\ - true - - - - Full - Size - ..\..\include;..\ExternalAPI;%(AdditionalIncludeDirectories) - NDEBUG;_WINDOWS;_USRDLL;%(PreprocessorDefinitions) - true - true - Level3 - false - Use - BossKey.h - - - NDEBUG;%(PreprocessorDefinitions) - ..\..\include\msapi - - - 0x32270000 - false - $(IntDir)$(TargetName).lib - true - true - true - Windows - $(ProfileDir)..\..\bin10\lib - /PDBALTPATH:%_PDB% - Wtsapi32.lib;%(AdditionalDependencies) - - - - - Disabled - ..\..\include;..\ExternalAPI;%(AdditionalIncludeDirectories) - _DEBUG;_WINDOWS;_USRDLL;%(PreprocessorDefinitions) - EnableFastChecks - MultiThreadedDebugDLL - Level3 - EditAndContinue - false - Use - BossKey.h - - - _DEBUG;%(PreprocessorDefinitions) - ..\..\include\msapi - - - true - false - $(IntDir)$(TargetName).lib - Windows - 0x32270000 - $(ProfileDir)..\..\bin10\lib - Wtsapi32.lib;%(AdditionalDependencies) - - - - - Full - Size - ..\..\include;..\ExternalAPI;%(AdditionalIncludeDirectories) - NDEBUG;_WINDOWS;_USRDLL;%(PreprocessorDefinitions) - true - true - Level3 - false - Use - BossKey.h - - - NDEBUG;%(PreprocessorDefinitions) - ..\..\include\msapi - - - true - 0x32270000 - false - $(IntDir)$(TargetName).lib - true - true - Windows - $(ProfileDir)..\..\bin10\lib - /PDBALTPATH:%_PDB% - Wtsapi32.lib;%(AdditionalDependencies) - - - - - Disabled - ..\..\include;..\ExternalAPI;%(AdditionalIncludeDirectories) - _DEBUG;_WINDOWS;_USRDLL;%(PreprocessorDefinitions) - EnableFastChecks - MultiThreadedDebugDLL - Level3 - false - Use - BossKey.h - - - _DEBUG;%(PreprocessorDefinitions) - ..\..\include\msapi - - - true - false - $(IntDir)$(TargetName).lib - 0x32270000 - Windows - $(ProfileDir)..\..\bin10\lib - Wtsapi32.lib;%(AdditionalDependencies) - - - - - - - - Create - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/plugins/BossKeyPlus/BossKey_10.vcxproj.filters b/plugins/BossKeyPlus/BossKey_10.vcxproj.filters deleted file mode 100644 index 7293dc0a91..0000000000 --- a/plugins/BossKeyPlus/BossKey_10.vcxproj.filters +++ /dev/null @@ -1,55 +0,0 @@ - - - - - {ef0a7df3-a4ae-4d85-b81c-6ba0e28ee632} - cpp;c;cxx;rc;def;r;odl;idl;hpj;bat - - - {a39ebad9-1d2a-4e20-8c0b-3c69872752da} - h;hpp;hxx;hm;inl - - - {f092abde-7f4f-4d83-b851-f71159a4dee8} - ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe - - - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - - - Header Files - - - Header Files - - - Header Files - - - - - Resource Files - - - Resource Files - - - - - Resource Files - - - \ No newline at end of file diff --git a/plugins/BossKeyPlus/BossKey_12.vcxproj b/plugins/BossKeyPlus/BossKey_12.vcxproj deleted file mode 100644 index 47932e7987..0000000000 --- a/plugins/BossKeyPlus/BossKey_12.vcxproj +++ /dev/null @@ -1,208 +0,0 @@ - - - - - Debug - Win32 - - - Debug - x64 - - - Release - Win32 - - - Release - x64 - - - - BossKey - {88E47CF7-7B40-4312-A35A-9B28885FFED9} - - - - DynamicLibrary - Unicode - v120_xp - - - DynamicLibrary - Unicode - true - v120_xp - - - DynamicLibrary - Unicode - v120_xp - - - DynamicLibrary - Unicode - true - v120_xp - - - - - - - - - - - - - - - - - - - <_ProjectFileVersion>10.0.30319.1 - $(SolutionDir)$(Configuration)\Plugins\ - $(SolutionDir)$(Configuration)\Obj\$(ProjectName)\ - $(SolutionDir)$(Configuration)\Plugins\ - $(SolutionDir)$(Configuration)\Obj\$(ProjectName)\ - $(SolutionDir)$(Configuration)64\Plugins\ - $(SolutionDir)$(Configuration)64\Obj\$(ProjectName)\ - $(SolutionDir)$(Configuration)64\Plugins\ - $(SolutionDir)$(Configuration)64\Obj\$(ProjectName)\ - true - - - - Full - Size - ..\..\include;..\ExternalAPI;%(AdditionalIncludeDirectories) - NDEBUG;_WINDOWS;_USRDLL;%(PreprocessorDefinitions) - true - true - Level4 - false - Use - BossKey.h - - - NDEBUG;%(PreprocessorDefinitions) - ..\..\include\msapi - - - 0x32270000 - false - $(IntDir)$(TargetName).lib - true - true - true - Windows - $(ProfileDir)..\..\bin12\lib - Wtsapi32.lib;%(AdditionalDependencies) - - - - - Disabled - ..\..\include;..\ExternalAPI;%(AdditionalIncludeDirectories) - _DEBUG;_WINDOWS;_USRDLL;%(PreprocessorDefinitions) - EnableFastChecks - MultiThreadedDebugDLL - Level4 - EditAndContinue - false - Use - BossKey.h - - - _DEBUG;%(PreprocessorDefinitions) - ..\..\include\msapi - - - true - false - $(IntDir)$(TargetName).lib - Windows - 0x32270000 - $(ProfileDir)..\..\bin12\lib - false - Wtsapi32.lib;%(AdditionalDependencies) - - - - - Full - Size - ..\..\include;..\ExternalAPI;%(AdditionalIncludeDirectories) - NDEBUG;_WINDOWS;_USRDLL;%(PreprocessorDefinitions) - true - true - Level4 - false - Use - BossKey.h - - - NDEBUG;%(PreprocessorDefinitions) - ..\..\include\msapi - - - true - 0x32270000 - false - $(IntDir)$(TargetName).lib - true - true - Windows - $(ProfileDir)..\..\bin12\lib - Wtsapi32.lib;%(AdditionalDependencies) - - - - - Disabled - ..\..\include;..\ExternalAPI;%(AdditionalIncludeDirectories) - _DEBUG;_WINDOWS;_USRDLL;%(PreprocessorDefinitions) - EnableFastChecks - MultiThreadedDebugDLL - Level4 - false - Use - BossKey.h - - - _DEBUG;%(PreprocessorDefinitions) - ..\..\include\msapi - - - true - false - $(IntDir)$(TargetName).lib - 0x32270000 - Windows - $(ProfileDir)..\..\bin12\lib - Wtsapi32.lib;%(AdditionalDependencies) - - - - - - - - Create - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/plugins/BossKeyPlus/BossKey_12.vcxproj.filters b/plugins/BossKeyPlus/BossKey_12.vcxproj.filters deleted file mode 100644 index 7fe41a705c..0000000000 --- a/plugins/BossKeyPlus/BossKey_12.vcxproj.filters +++ /dev/null @@ -1,50 +0,0 @@ - - - - - {ef0a7df3-a4ae-4d85-b81c-6ba0e28ee632} - cpp;c;cxx;rc;def;r;odl;idl;hpj;bat - - - {a39ebad9-1d2a-4e20-8c0b-3c69872752da} - h;hpp;hxx;hm;inl - - - {f092abde-7f4f-4d83-b851-f71159a4dee8} - ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe - - - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - - - Header Files - - - Header Files - - - Header Files - - - - - Resource Files - - - Resource Files - - - \ No newline at end of file diff --git a/plugins/BossKeyPlus/src/BossKey.cpp b/plugins/BossKeyPlus/src/BossKey.cpp index 9d29063eee..20f798a081 100644 --- a/plugins/BossKeyPlus/src/BossKey.cpp +++ b/plugins/BossKeyPlus/src/BossKey.cpp @@ -17,7 +17,7 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ -#include "BossKey.h" +#include "stdafx.h" HINSTANCE g_hInstance; CLIST_INTERFACE *pcli; diff --git a/plugins/BossKeyPlus/src/BossKey.h b/plugins/BossKeyPlus/src/BossKey.h deleted file mode 100644 index 293c028078..0000000000 --- a/plugins/BossKeyPlus/src/BossKey.h +++ /dev/null @@ -1,103 +0,0 @@ -/* - BossKey - Hide Miranda from your boss :) - Copyright (C) 2002-2003 Goblineye Entertainment, (C) 2007-2010 Billy_Bons - - 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 - */ - -#pragma once - -#define WIN32_LEAN_AND_MEAN -#define _CRT_SECURE_NO_DEPRECATE - -#define BOSSKEY_LISTEN_INFO _T("MY6BossKey_Param") - -#include -#include -#include - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include -#include -#include - -#include "resource.h" -#include "version.h" - -#define MOD_NAME "BossKey" -#define KEY_DOWN(key) ((GetAsyncKeyState(key) & 0x8000) ? (true) : (false)) -#define MAXPASSLEN 16 -#define DEFAULTSETTING (OPT_SETONLINEBACK | OPT_DISABLESNDS | OPT_ONLINEONLY | OPT_USEDEFMSG) - -#define OLD_SOUND 1 -#define OLD_POPUP 2 -#define OLD_FLTCONT 4 -#define OLD_WASHIDDEN 128 - -#define OPT_SETONLINEBACK 1 -#define OPT_CHANGESTATUS 2 -#define OPT_DISABLESNDS 8 -#define OPT_REQPASS 16 -#define OPT_ONLINEONLY 32 -#define OPT_USEDEFMSG 128 -#define OPT_TRAYICON 256 - -#define OPT_HIDEIFLOCK 1 -#define OPT_HIDEIFWINIDLE 2 -#define OPT_HIDEIFMIRIDLE 4 -#define OPT_HIDEIFSCRSVR 8 -#define OPT_MENUITEM 16 -#define OPT_HIDEONSTART 32 -#define OPT_RESTORE 64 - -#define MS_BOSSKEY_HIDE "BossKey/HideMiranda" -#define MS_BOSSKEY_ISMIRANDAHIDDEN "BossKey/IsMirandaHidden" - -const unsigned STATUS_ARR_TO_ID[8] = { ID_STATUS_OFFLINE, ID_STATUS_ONLINE, ID_STATUS_AWAY, ID_STATUS_NA, ID_STATUS_OCCUPIED, ID_STATUS_DND, ID_STATUS_FREECHAT, ID_STATUS_INVISIBLE }; -extern bool g_fOptionsOpen; // options dialog is open. be sure not to hide anything while we're there. -extern WORD g_wMask, g_wMaskAdv; -extern HINSTANCE g_hInstance; -extern bool g_bWindowHidden; -extern UINT minutes; - -int OptsDlgInit(WPARAM wParam, LPARAM lParam); -INT_PTR BossKeyHideMiranda(WPARAM wParam, LPARAM lParam); -void BossKeyMenuItemInit(void); -void BossKeyMenuItemUnInit(void); -static TCHAR *GetBossKeyText(void); -void InitIdleTimer(void); -void UninitIdleTimer(void); -TCHAR* GetDefStatusMsg(unsigned uMode, const char* szProto); - -// I never really liked STL's vector... hmm this is nicer anyway, more flexible -typedef struct HWND_ITEM_TYPE -{ - HWND hWnd; - HWND_ITEM_TYPE *next; -} HWND_ITEM; - -typedef HRESULT(WINAPI *PFNDwmIsCompositionEnabled)(BOOL *); diff --git a/plugins/BossKeyPlus/src/BossKeyIdle.cpp b/plugins/BossKeyPlus/src/BossKeyIdle.cpp index 065b621429..a69b491181 100644 --- a/plugins/BossKeyPlus/src/BossKeyIdle.cpp +++ b/plugins/BossKeyPlus/src/BossKeyIdle.cpp @@ -22,7 +22,7 @@ along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ -#include "BossKey.h" +#include "stdafx.h" POINT mousepos; UINT_PTR hTimer; diff --git a/plugins/BossKeyPlus/src/Options.cpp b/plugins/BossKeyPlus/src/Options.cpp index 3708d3fe25..74e44af6b3 100644 --- a/plugins/BossKeyPlus/src/Options.cpp +++ b/plugins/BossKeyPlus/src/Options.cpp @@ -17,7 +17,7 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ -#include "BossKey.h" +#include "stdafx.h" bool g_fOptionsOpen; bool g_fReqRass; diff --git a/plugins/BossKeyPlus/src/stdafx.cpp b/plugins/BossKeyPlus/src/stdafx.cpp deleted file mode 100644 index 0995640758..0000000000 --- a/plugins/BossKeyPlus/src/stdafx.cpp +++ /dev/null @@ -1,18 +0,0 @@ -/* -Copyright (C) 2012-15 Miranda NG project (http://miranda-ng.org) - -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 version 2 -of the License. - -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, see . -*/ - -#include "BossKey.h" \ No newline at end of file diff --git a/plugins/BossKeyPlus/src/stdafx.cxx b/plugins/BossKeyPlus/src/stdafx.cxx new file mode 100644 index 0000000000..6fb37564b7 --- /dev/null +++ b/plugins/BossKeyPlus/src/stdafx.cxx @@ -0,0 +1,18 @@ +/* +Copyright (C) 2012-15 Miranda NG project (http://miranda-ng.org) + +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 version 2 +of the License. + +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, see . +*/ + +#include "stdafx.h" \ No newline at end of file diff --git a/plugins/BossKeyPlus/src/stdafx.h b/plugins/BossKeyPlus/src/stdafx.h new file mode 100644 index 0000000000..293c028078 --- /dev/null +++ b/plugins/BossKeyPlus/src/stdafx.h @@ -0,0 +1,103 @@ +/* + BossKey - Hide Miranda from your boss :) + Copyright (C) 2002-2003 Goblineye Entertainment, (C) 2007-2010 Billy_Bons + + 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 + */ + +#pragma once + +#define WIN32_LEAN_AND_MEAN +#define _CRT_SECURE_NO_DEPRECATE + +#define BOSSKEY_LISTEN_INFO _T("MY6BossKey_Param") + +#include +#include +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include +#include + +#include "resource.h" +#include "version.h" + +#define MOD_NAME "BossKey" +#define KEY_DOWN(key) ((GetAsyncKeyState(key) & 0x8000) ? (true) : (false)) +#define MAXPASSLEN 16 +#define DEFAULTSETTING (OPT_SETONLINEBACK | OPT_DISABLESNDS | OPT_ONLINEONLY | OPT_USEDEFMSG) + +#define OLD_SOUND 1 +#define OLD_POPUP 2 +#define OLD_FLTCONT 4 +#define OLD_WASHIDDEN 128 + +#define OPT_SETONLINEBACK 1 +#define OPT_CHANGESTATUS 2 +#define OPT_DISABLESNDS 8 +#define OPT_REQPASS 16 +#define OPT_ONLINEONLY 32 +#define OPT_USEDEFMSG 128 +#define OPT_TRAYICON 256 + +#define OPT_HIDEIFLOCK 1 +#define OPT_HIDEIFWINIDLE 2 +#define OPT_HIDEIFMIRIDLE 4 +#define OPT_HIDEIFSCRSVR 8 +#define OPT_MENUITEM 16 +#define OPT_HIDEONSTART 32 +#define OPT_RESTORE 64 + +#define MS_BOSSKEY_HIDE "BossKey/HideMiranda" +#define MS_BOSSKEY_ISMIRANDAHIDDEN "BossKey/IsMirandaHidden" + +const unsigned STATUS_ARR_TO_ID[8] = { ID_STATUS_OFFLINE, ID_STATUS_ONLINE, ID_STATUS_AWAY, ID_STATUS_NA, ID_STATUS_OCCUPIED, ID_STATUS_DND, ID_STATUS_FREECHAT, ID_STATUS_INVISIBLE }; +extern bool g_fOptionsOpen; // options dialog is open. be sure not to hide anything while we're there. +extern WORD g_wMask, g_wMaskAdv; +extern HINSTANCE g_hInstance; +extern bool g_bWindowHidden; +extern UINT minutes; + +int OptsDlgInit(WPARAM wParam, LPARAM lParam); +INT_PTR BossKeyHideMiranda(WPARAM wParam, LPARAM lParam); +void BossKeyMenuItemInit(void); +void BossKeyMenuItemUnInit(void); +static TCHAR *GetBossKeyText(void); +void InitIdleTimer(void); +void UninitIdleTimer(void); +TCHAR* GetDefStatusMsg(unsigned uMode, const char* szProto); + +// I never really liked STL's vector... hmm this is nicer anyway, more flexible +typedef struct HWND_ITEM_TYPE +{ + HWND hWnd; + HWND_ITEM_TYPE *next; +} HWND_ITEM; + +typedef HRESULT(WINAPI *PFNDwmIsCompositionEnabled)(BOOL *); -- cgit v1.2.3