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 --- 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 ++++++++++++++++++++++++++++++++ 7 files changed, 124 insertions(+), 124 deletions(-) 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 (limited to 'plugins/BossKeyPlus/src') 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