From ab734942de075bf5af260cd83f6e0b3f4de15f1a Mon Sep 17 00:00:00 2001 From: Kirill Volinsky Date: Fri, 24 Jul 2015 09:24:35 +0000 Subject: HwHotKeys: common project git-svn-id: http://svn.miranda-ng.org/main/trunk@14667 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- plugins/HwHotKeys/src/HwHotKeys.cpp | 23 -------- plugins/HwHotKeys/src/HwHotKeys.h | 87 ----------------------------- plugins/HwHotKeys/src/HwHotKeys_Dlg.cpp | 2 +- plugins/HwHotKeys/src/HwHotKeys_DllMain.cpp | 2 +- plugins/HwHotKeys/src/HwHotKeys_KbdHook.cpp | 2 +- plugins/HwHotKeys/src/HwHotKeys_KeyName.cpp | 2 +- plugins/HwHotKeys/src/HwHotKeys_Util.cpp | 2 +- plugins/HwHotKeys/src/stdafx.cpp | 18 ------ plugins/HwHotKeys/src/stdafx.cxx | 18 ++++++ plugins/HwHotKeys/src/stdafx.h | 87 +++++++++++++++++++++++++++++ 10 files changed, 110 insertions(+), 133 deletions(-) delete mode 100644 plugins/HwHotKeys/src/HwHotKeys.cpp delete mode 100644 plugins/HwHotKeys/src/HwHotKeys.h delete mode 100644 plugins/HwHotKeys/src/stdafx.cpp create mode 100644 plugins/HwHotKeys/src/stdafx.cxx create mode 100644 plugins/HwHotKeys/src/stdafx.h (limited to 'plugins/HwHotKeys/src') diff --git a/plugins/HwHotKeys/src/HwHotKeys.cpp b/plugins/HwHotKeys/src/HwHotKeys.cpp deleted file mode 100644 index a922fd80ba..0000000000 --- a/plugins/HwHotKeys/src/HwHotKeys.cpp +++ /dev/null @@ -1,23 +0,0 @@ -// HwHotKeys.cpp: определяет экспортированные функции для приложения DLL. -// - -#include "stdafx.h" -#include "HwHotKey.h" - - - -// Пример экспортированной переменной -HWHOTKEYS_API int nHwHotKeys=0; - -// Пример экспортированной функции. -HWHOTKEYS_API int fnHwHotKeys(void) -{ - return 42; -} - -// Конструктор для экспортированного класса. -// см. определение класса в HwHotKeys.h -CHwHotKeys::CHwHotKeys() -{ - return; -} diff --git a/plugins/HwHotKeys/src/HwHotKeys.h b/plugins/HwHotKeys/src/HwHotKeys.h deleted file mode 100644 index 162b14a481..0000000000 --- a/plugins/HwHotKeys/src/HwHotKeys.h +++ /dev/null @@ -1,87 +0,0 @@ -/* ============================================================================ -Hardware HotKeys plugin for Miranda NG. -Copyright © Eugene f2065, http://f2065.narod.ru, f2065 mail.ru, ICQ 35078112 - -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. -============================================================================ */ - -#include -#include - -#include -#include -#include -#include -#include - -#include - -#include "resource.h" -#include "Version.h" - -int initializeOptions(WPARAM, LPARAM); -INT_PTR CALLBACK OptDlgProc(HWND, UINT, WPARAM, LPARAM); -VOID HwHotKeys_PrintFullKeyname(DWORD); -BOOL HwHotKeys_CompareCurrentScancode(DWORD); -LRESULT CALLBACK key_hook(INT, WPARAM, LPARAM); -extern CLIST_INTERFACE *pcli; - - -extern HINSTANCE hInstance; -extern INT hLangpack; -extern HWND hDialogWnd; // глобально используется для вывода туда в реалтайме сканкодов клавы, из хука -extern HHOOK hHook; - -extern DWORD code_Close_tmp; -extern DWORD code_HideShow_tmp; -extern DWORD code_ReadMsg_tmp; -extern DWORD code_Close; -extern DWORD code_HideShow; -extern DWORD code_ReadMsg; - -extern DWORD key_code; -extern DWORD key_code_raw; -extern DWORD key_code_assign; - - -extern CHAR key_name_buffer[150]; -extern const CHAR *key_tab[0x200]; - -extern const CHAR *t_CL; -extern const CHAR *t_CR; -extern const CHAR *t_CC; -extern const CHAR *t_AL; -extern const CHAR *t_AR; -extern const CHAR *t_AA; -extern const CHAR *t_WL; -extern const CHAR *t_WR; -extern const CHAR *t_WW; -extern const CHAR *t_SL; -extern const CHAR *t_SR; -extern const CHAR *t_SS; - -// значения связаны с битами в HwHotKeys_CompareCurrentScancode -enum : DWORD { key_flag_sr = 0x01000000 }; -enum : DWORD { key_flag_cr = 0x02000000 }; -enum : DWORD { key_flag_ar = 0x04000000 }; -enum : DWORD { key_flag_wr = 0x08000000 }; -enum : DWORD { key_flag_sl = 0x10000000 }; -enum : DWORD { key_flag_cl = 0x20000000 }; -enum : DWORD { key_flag_al = 0x40000000 }; -enum : DWORD { key_flag_wl = 0x80000000 }; -enum : DWORD { key_flag_ss = 0x00100000 }; -enum : DWORD { key_flag_cc = 0x00200000 }; -enum : DWORD { key_flag_aa = 0x00400000 }; -enum : DWORD { key_flag_ww = 0x00800000 }; diff --git a/plugins/HwHotKeys/src/HwHotKeys_Dlg.cpp b/plugins/HwHotKeys/src/HwHotKeys_Dlg.cpp index c159acc2d8..3f59ff7712 100644 --- a/plugins/HwHotKeys/src/HwHotKeys_Dlg.cpp +++ b/plugins/HwHotKeys/src/HwHotKeys_Dlg.cpp @@ -17,7 +17,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 "HwHotKeys.h" +#include "stdafx.h" INT_PTR CALLBACK OptDlgProc(HWND hDlg, UINT msg, WPARAM wParam, LPARAM lParam) { diff --git a/plugins/HwHotKeys/src/HwHotKeys_DllMain.cpp b/plugins/HwHotKeys/src/HwHotKeys_DllMain.cpp index dadc8f49b4..f7af3c9ccc 100644 --- a/plugins/HwHotKeys/src/HwHotKeys_DllMain.cpp +++ b/plugins/HwHotKeys/src/HwHotKeys_DllMain.cpp @@ -19,7 +19,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111 - 1307, USA. -#include "HwHotKeys.h" +#include "stdafx.h" HINSTANCE hInstance; int hLangpack; diff --git a/plugins/HwHotKeys/src/HwHotKeys_KbdHook.cpp b/plugins/HwHotKeys/src/HwHotKeys_KbdHook.cpp index ac80b69036..0d2c95114a 100644 --- a/plugins/HwHotKeys/src/HwHotKeys_KbdHook.cpp +++ b/plugins/HwHotKeys/src/HwHotKeys_KbdHook.cpp @@ -17,7 +17,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 "HwHotKeys.h" +#include "stdafx.h" LRESULT CALLBACK key_hook(int nCode, WPARAM wParam, LPARAM lParam) // https://msdn.microsoft.com/en-us/library/windows/desktop/ms644985%28v=vs.85%29.aspx { diff --git a/plugins/HwHotKeys/src/HwHotKeys_KeyName.cpp b/plugins/HwHotKeys/src/HwHotKeys_KeyName.cpp index dda752fc4b..ef116b6b5d 100644 --- a/plugins/HwHotKeys/src/HwHotKeys_KeyName.cpp +++ b/plugins/HwHotKeys/src/HwHotKeys_KeyName.cpp @@ -17,7 +17,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 "HwHotKeys.h" +#include "stdafx.h" // тут описаны известные имена кнопок по аппаратным сканкодам (KbdLLHookStruct.scanCode & 0xFF) и ((LOBYTE(KbdLLHookStruct.flags)&1) // и по VK-кодам (KbdLLHookStruct.vkCode) diff --git a/plugins/HwHotKeys/src/HwHotKeys_Util.cpp b/plugins/HwHotKeys/src/HwHotKeys_Util.cpp index cc22aeae7c..39b299d758 100644 --- a/plugins/HwHotKeys/src/HwHotKeys_Util.cpp +++ b/plugins/HwHotKeys/src/HwHotKeys_Util.cpp @@ -17,7 +17,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 "HwHotKeys.h" +#include "stdafx.h" diff --git a/plugins/HwHotKeys/src/stdafx.cpp b/plugins/HwHotKeys/src/stdafx.cpp deleted file mode 100644 index 93782795d3..0000000000 --- a/plugins/HwHotKeys/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 "HwHotKeys.h" \ No newline at end of file diff --git a/plugins/HwHotKeys/src/stdafx.cxx b/plugins/HwHotKeys/src/stdafx.cxx new file mode 100644 index 0000000000..6fb37564b7 --- /dev/null +++ b/plugins/HwHotKeys/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/HwHotKeys/src/stdafx.h b/plugins/HwHotKeys/src/stdafx.h new file mode 100644 index 0000000000..162b14a481 --- /dev/null +++ b/plugins/HwHotKeys/src/stdafx.h @@ -0,0 +1,87 @@ +/* ============================================================================ +Hardware HotKeys plugin for Miranda NG. +Copyright © Eugene f2065, http://f2065.narod.ru, f2065 mail.ru, ICQ 35078112 + +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. +============================================================================ */ + +#include +#include + +#include +#include +#include +#include +#include + +#include + +#include "resource.h" +#include "Version.h" + +int initializeOptions(WPARAM, LPARAM); +INT_PTR CALLBACK OptDlgProc(HWND, UINT, WPARAM, LPARAM); +VOID HwHotKeys_PrintFullKeyname(DWORD); +BOOL HwHotKeys_CompareCurrentScancode(DWORD); +LRESULT CALLBACK key_hook(INT, WPARAM, LPARAM); +extern CLIST_INTERFACE *pcli; + + +extern HINSTANCE hInstance; +extern INT hLangpack; +extern HWND hDialogWnd; // глобально используется для вывода туда в реалтайме сканкодов клавы, из хука +extern HHOOK hHook; + +extern DWORD code_Close_tmp; +extern DWORD code_HideShow_tmp; +extern DWORD code_ReadMsg_tmp; +extern DWORD code_Close; +extern DWORD code_HideShow; +extern DWORD code_ReadMsg; + +extern DWORD key_code; +extern DWORD key_code_raw; +extern DWORD key_code_assign; + + +extern CHAR key_name_buffer[150]; +extern const CHAR *key_tab[0x200]; + +extern const CHAR *t_CL; +extern const CHAR *t_CR; +extern const CHAR *t_CC; +extern const CHAR *t_AL; +extern const CHAR *t_AR; +extern const CHAR *t_AA; +extern const CHAR *t_WL; +extern const CHAR *t_WR; +extern const CHAR *t_WW; +extern const CHAR *t_SL; +extern const CHAR *t_SR; +extern const CHAR *t_SS; + +// значения связаны с битами в HwHotKeys_CompareCurrentScancode +enum : DWORD { key_flag_sr = 0x01000000 }; +enum : DWORD { key_flag_cr = 0x02000000 }; +enum : DWORD { key_flag_ar = 0x04000000 }; +enum : DWORD { key_flag_wr = 0x08000000 }; +enum : DWORD { key_flag_sl = 0x10000000 }; +enum : DWORD { key_flag_cl = 0x20000000 }; +enum : DWORD { key_flag_al = 0x40000000 }; +enum : DWORD { key_flag_wl = 0x80000000 }; +enum : DWORD { key_flag_ss = 0x00100000 }; +enum : DWORD { key_flag_cc = 0x00200000 }; +enum : DWORD { key_flag_aa = 0x00400000 }; +enum : DWORD { key_flag_ww = 0x00800000 }; -- cgit v1.2.3