From e31dc98a3f7f03e1eff934f2772caa4b177d00ac Mon Sep 17 00:00:00 2001 From: Kirill Volinsky Date: Wed, 27 Feb 2013 19:08:36 +0000 Subject: removed not used headers added version info git-svn-id: http://svn.miranda-ng.org/main/trunk@3798 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- plugins/KeyboardNotify/KeyboardNotify_10.vcxproj | 2 + .../KeyboardNotify_10.vcxproj.filters | 6 + plugins/KeyboardNotify/KeyboardNotify_11.vcxproj | 2 + .../KeyboardNotify_11.vcxproj.filters | 6 + .../KeyboardNotify/docs/keyboardnotify_readme.txt | 159 ++++++++++-------- plugins/KeyboardNotify/res/Version.rc | 38 +++++ plugins/KeyboardNotify/res/resources.rc | 7 +- plugins/KeyboardNotify/src/AggressiveOptimize.h | 165 ------------------- plugins/KeyboardNotify/src/Common.h | 33 ++-- plugins/KeyboardNotify/src/Version.h | 14 ++ plugins/KeyboardNotify/src/main.cpp | 179 ++------------------- 11 files changed, 183 insertions(+), 428 deletions(-) create mode 100644 plugins/KeyboardNotify/res/Version.rc delete mode 100644 plugins/KeyboardNotify/src/AggressiveOptimize.h create mode 100644 plugins/KeyboardNotify/src/Version.h (limited to 'plugins/KeyboardNotify') diff --git a/plugins/KeyboardNotify/KeyboardNotify_10.vcxproj b/plugins/KeyboardNotify/KeyboardNotify_10.vcxproj index 9e96a120c3..298d20895e 100644 --- a/plugins/KeyboardNotify/KeyboardNotify_10.vcxproj +++ b/plugins/KeyboardNotify/KeyboardNotify_10.vcxproj @@ -186,6 +186,7 @@ + @@ -203,6 +204,7 @@ + diff --git a/plugins/KeyboardNotify/KeyboardNotify_10.vcxproj.filters b/plugins/KeyboardNotify/KeyboardNotify_10.vcxproj.filters index c3af05e4ea..f6a0fb7af4 100644 --- a/plugins/KeyboardNotify/KeyboardNotify_10.vcxproj.filters +++ b/plugins/KeyboardNotify/KeyboardNotify_10.vcxproj.filters @@ -39,6 +39,9 @@ Header Files + + Header Files + @@ -76,5 +79,8 @@ Resource Files + + Resource Files + \ No newline at end of file diff --git a/plugins/KeyboardNotify/KeyboardNotify_11.vcxproj b/plugins/KeyboardNotify/KeyboardNotify_11.vcxproj index a69613cc35..4cacaf6ef3 100644 --- a/plugins/KeyboardNotify/KeyboardNotify_11.vcxproj +++ b/plugins/KeyboardNotify/KeyboardNotify_11.vcxproj @@ -190,6 +190,7 @@ + @@ -207,6 +208,7 @@ + diff --git a/plugins/KeyboardNotify/KeyboardNotify_11.vcxproj.filters b/plugins/KeyboardNotify/KeyboardNotify_11.vcxproj.filters index c3af05e4ea..f6a0fb7af4 100644 --- a/plugins/KeyboardNotify/KeyboardNotify_11.vcxproj.filters +++ b/plugins/KeyboardNotify/KeyboardNotify_11.vcxproj.filters @@ -39,6 +39,9 @@ Header Files + + Header Files + @@ -76,5 +79,8 @@ Resource Files + + Resource Files + \ No newline at end of file diff --git a/plugins/KeyboardNotify/docs/keyboardnotify_readme.txt b/plugins/KeyboardNotify/docs/keyboardnotify_readme.txt index c7dfaa5c77..04d6938376 100644 --- a/plugins/KeyboardNotify/docs/keyboardnotify_readme.txt +++ b/plugins/KeyboardNotify/docs/keyboardnotify_readme.txt @@ -135,82 +135,113 @@ Heartbeat (created by sir_qwerty): 00000000000000000000000000000000303 Note: remember that when the sequence is finished the plugin will go back to the beginning until it has to stop due to 'until when' settings. -Thanks ------- -- Pete for the numerous patches he sent, actively helping to improve the code and functionality -- UnregistereD for great help in solving problem with Windows activity detection -- Slacktarn, Sir_qwerty and Tweety for giving great help with ideas (most of the new features included in this plugin were suggested by them) and testing -- The authors of AAA, PopUp+, KeyScrollNotify, original KeyboardNotify, Neweventnotify, IEView, NGEventNotify for part of their code used in this plugin. -- Vampik fot the InTurn flashing option -- Miranda IM developers for this amazing program -- all other people from Miranda community - - -History -------- -1.5.7.6: + Description + ----------- + This plugin for Miranda-IM notifies user of specified events (as incoming messages, + incoming files, incoming URLs or other events). This plugin is based on the original one + by Martin Öberg (aka strickz) and Std's modifications (mainly the idea of using direct + port handling using a driver). + It has many options allowing: + a) To select on which events to react + b) Under which conditions (eg: fullscreen mode, ScreenSaver running, workstation locked) + c) To act only if the protocol receiving the event is under specified status + d) For message events you can choose to be notified if the message window is open or not + e) A notification feature allowing to be notified of pending events (unopen events) + after specified period of time + f) To select method for stopping the blinking (after x secs, if Miranda is re-attended, + if Windows is re-attended, if all notified events are opened or when the notify conditions + end) + g) And several flashing options: select leds to blink, effects (all at the same time, + in turn, in sequence and like KITT!), preview button + It was designed to be flexible and performing several different tasks. It can be + configured to act like the original one and has several functions from other Miranda's + keyboard notifier plugins. + It also provides a service to allow third party plugins use its notifier abilities. + + Options + ------- + Options page Options->Plugins->Keyboard Flash. Tabbed: Protocols, Rules (when), Flashing (how), Themes and Ignore. + + Thanks + ------ + - Pete for the numerous patches he sent, actively helping to improve the code and + functionality + - UnregistereD for great help in solving problem with Windows activity detection + - Slacktarn, Sir_qwerty and Tweety for giving great help with ideas (most of the new + features included in this plugin were suggested by them) and testing + - The authors of AAA, PopUp+, KeyScrollNotify, original KeyboardNotify, Neweventnotify, + IEView, NGEventNotify for part of their code used in this plugin. + - Vampik fot the InTurn flashing option + - Miranda IM developers for this amazing program + - all other people from Miranda community + + History + ------- + 1.5.7.7: + [!] Added support for Miranda 0.8.x.x. + 1.5.7.6: [!] Fixed bug in Ignore module. -1.5.7.5: + 1.5.7.5: [!] Updated TriggerPlugin support for latest version. -1.5.7.4: + 1.5.7.4: [*] Updated screenshot - [*] Minor code cleaning -1.5.7.3: + [*] Minor code cleaning + 1.5.7.3: [+] Added xstatus support -1.5.7.2: + 1.5.7.2: [+] Added per contact Ignore options -1.5.7.1: - [+] Fix in Options for themes under WinXP+ (really essential feature) -1.5.7.0: + 1.5.7.1: + [!] Fix in Options for themes under WinXP+ (really essential feature) + 1.5.7.0: [+] Added support for Trigger plugin -1.5.6.3: - [-] Removed device presence validation: it is not needed now that the plugin works on USB (thanks Nick, aka Aestetic). + 1.5.6.3: + [-] Removed device presence validation: it is not needed now that the plugin works on USB (thanks Nick, aka Aestetic) [+] Added a new service to the API for 'normalizing' a custom flashing sequence string [-] Simplified the API (the extended version of the start blink service is no longer needed). -1.5.6.2: + 1.5.6.2: [!] Fixed problem while trying to detect if message window is in foreground. -1.5.6.1: + 1.5.6.1: [!] Fixed bug with keypress emulation and "until Windows is re-attended" option. -1.5.6.0: + 1.5.6.0: [+] Option to emulate keypresses (for the USB people) [*] Changed the emergency key (to make it stop with PAUSE instead of SCROLL LOCK key). -1.5.5.4: + 1.5.5.4: [*] Improved ListView control handling [*] Changed the default values (for the sake of new users). -1.5.5.3: + 1.5.5.3: [*] More code optimization. -1.5.5.2: + 1.5.5.2: [+] Support for Update plugin. -1.5.5.1: + 1.5.5.1: [!] Minor source fixes. -1.5.5.0: + 1.5.5.0: [+] New 'notify when' option: while defined programs are running (just like gamerstatus) - [+] Extended the API to add two new services to disable and re-enable keyboards notifications (for use by bosskey plugin). -1.5.4.4: + [+] Extended the API to add two new services to disable and re-enable keyboard notifications (for use by bosskey plugin). + 1.5.4.4: [!] Fixed (hopefully) problems with some system configurations (with PS2 keyboards) where the KeyboardClass0 device was not the apropriate one (thanks pete!) [+] Extended the plugin API (requested bt tweety). -1.5.4.3: + 1.5.4.3: [!] Fixed some compatibility issues with nconvers++ (thank you donatas for your help). -1.5.4.2: + 1.5.4.2: [!] Fixed problem with Windows' activity detection under Win9X when using other plugins that do the same. [!] Fixed crash caused by incoming authorisation requests when metacontacts was enabled. -1.5.4.1: + 1.5.4.1: [!] Some corrections on third party plugins events handling (now they are more assimilated to the 'other events') [*] Some code cleaning [!] Fixed problem with first message in Metacontacts recognition while checking for pending events (thank you again NirG) -1.5.4.0: + 1.5.4.0: [+] New plugin API (thank you CriS for your ideas and great help) [!] Added Offline status to status check list (thank you Slaktarn for finding it). -1.5.3.4: + 1.5.3.4: [!] Fixed Metacontacts recognition in checking and counting of pending events (thank you NirG for finding the problem) [!] Fixed problems with multiple instances of the plugin running (thank you tweety for reporting and testing). -1.5.3.3: + 1.5.3.3: [!] Changed behaviour of Preview button to make it independent of the rules' options. -1.5.3.2: + 1.5.3.2: [+] New dialog to asign leds to specific events for the trillian-like sequences. -1.5.3.1: + 1.5.3.1: [!] Fixed bug of loosing any other until setting when selecting 'Events are opened'. -1.5.3.0: + 1.5.3.0: [+] Applied pete's patches (thank you very much for your great work) - Use of GetLastInputInfo when possible for detecting Windows' activity - Made Windows' mouse hooks also aware of mouse clicking @@ -222,31 +253,24 @@ History [+] Possibility of choosing more than one flash until option at the same time [+] New flashing effect to make the leds blink accordingly to number of events [+] Possibility of selecting/unselecting protocols (requested by tweety, usuful to avoid flashing on some protocols as rss) - -1.5.2.2: + 1.5.2.2: [!] scriver's message window detection (thanks D46MD for your great help) [!] corrected 'flash until' checking accordingly to pete's patch (thank you) - -1.5.2.1: - [!] fixed nconvers++'s message window detection and checked window detection for srmm, scriver, sramm and srmm_mod - [!] checking of 'notify when' and statuses added for API events - -1.5.2.0: - [+] Themes support (another of Slaktarn's ideas: thank you *g*) - [-] History dropdown list for the custom order string - -1.5.1.0: - [+] Custom effects using 'flashing language' (thank you very much Slaktarn for this very nice idea!) - [+] History dropdown list for the custom order string - -1.5.0.0: (unreleased) + 1.5.2.1: + [!] nconvers++'s message window detection + [!] checked window detection for srmm, scriver, sramm and srmm_mod + 1.5.2.0: + [+] Custom theme support + [-] Custom order history + 1.5.1.0: + [+] Custom order effect + [+] Custom order history + 1.5.0.0: [+] Drivers aren't needed anymore [+] Status selection option [+] Miranda/Windows activity detection (thank you Peter Boon) [+] 'Opened events' stop method - [+] 'End of notify when conditions' stop method - [+] 'Miranda/Windows are re-attended' stop method - [+] 'x seconds' stop method + [+] x seconds stop method [+] Hooking database event for detecting incoming events [+] Notifier option for pending events [+] Checkbox for enabling disabling open messages notification @@ -255,20 +279,16 @@ History [+] Tabbed options [!] Several corrections/improvements in options page [!] Not selected leds will preserve their original state - -1.4.1.0: (by me and Vampik) + 1.4.1.0: (by me and Vampik) [+] Notify on fullscreen, screensaver, worksation locked [!] Try to improve Win98 keysimulation routines [+] Added InTurn effect (thank you Vampik) [!] Corrected speed of blinking (thank you Vampik) - -1.4.0.0: (by Std, unreleased) + 1.4.0.0: (by Std, unreleased) [+] Added direct port handling using PortTalk.sys driver - -1.3.0.0: (by Martin Öberg) + 1.3.0.0: (by strickz) This is strickz' final release. It still uses keypress simulation. It was nice (thanks *g*) - TODO: ----- - I consider the plugin feature finished. :-D @@ -290,3 +310,4 @@ along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. ===================================================================== + diff --git a/plugins/KeyboardNotify/res/Version.rc b/plugins/KeyboardNotify/res/Version.rc new file mode 100644 index 0000000000..5bfbab4754 --- /dev/null +++ b/plugins/KeyboardNotify/res/Version.rc @@ -0,0 +1,38 @@ +// Microsoft Visual C++ generated resource script. +// +#ifdef APSTUDIO_INVOKED +#error this file is not editable by Microsoft Visual C++ +#endif //APSTUDIO_INVOKED + +#include "afxres.h" +#include "..\src\version.h" + +VS_VERSION_INFO VERSIONINFO + FILEVERSION __FILEVERSION_STRING + PRODUCTVERSION __FILEVERSION_STRING + FILEFLAGSMASK 0x17L +#ifdef _DEBUG + FILEFLAGS 0x1L +#else + FILEFLAGS 0x0L +#endif + FILEOS 0x4L + FILETYPE 0x0L + FILESUBTYPE 0x0L +BEGIN + BLOCK "StringFileInfo" + BEGIN + BLOCK "000004b0" + BEGIN + VALUE "FileDescription", __DESCRIPTION + VALUE "InternalName", __PLUGIN_NAME + VALUE "LegalCopyright", __COPYRIGHT + VALUE "OriginalFilename", __FILENAME + VALUE "ProductName", __PLUGIN_NAME + END + END + BLOCK "VarFileInfo" + BEGIN + VALUE "Translation", 0x0, 1200 + END +END diff --git a/plugins/KeyboardNotify/res/resources.rc b/plugins/KeyboardNotify/res/resources.rc index e0d0a3398c..f29b2dd687 100644 --- a/plugins/KeyboardNotify/res/resources.rc +++ b/plugins/KeyboardNotify/res/resources.rc @@ -244,10 +244,6 @@ BEGIN RIGHTMARGIN, 317 END - IDD_PROTO_OPTIONS, DIALOG - BEGIN - END - IDD_BASIC_OPTIONS, DIALOG BEGIN BOTTOMMARGIN, 220 @@ -328,5 +324,4 @@ END ///////////////////////////////////////////////////////////////////////////// -#endif // not APSTUDIO_INVOKED - +#endif // not APSTUDIO_INVOKED \ No newline at end of file diff --git a/plugins/KeyboardNotify/src/AggressiveOptimize.h b/plugins/KeyboardNotify/src/AggressiveOptimize.h deleted file mode 100644 index 34c6074320..0000000000 --- a/plugins/KeyboardNotify/src/AggressiveOptimize.h +++ /dev/null @@ -1,165 +0,0 @@ -////////////////////////////// -// Version 1.40 -// October 22nd, 2002 - .NET (VC7, _MSC_VER=1300) support! -// Version 1.30 -// Nov 24th, 2000 -// Version 1.20 -// Jun 9th, 2000 -// Version 1.10 -// Jan 23rd, 2000 -// Version 1.00 -// May 20th, 1999 -// Todd C. Wilson, Fresh Ground Software -// (todd@nopcode.com) -// This header file will kick in settings for Visual C++ 5 and 6 that will (usually) -// result in smaller exe's. -// The "trick" is to tell the compiler to not pad out the function calls; this is done -// by not using the /O1 or /O2 option - if you do, you implicitly use /Gy, which pads -// out each and every function call. In one single 500k dll, I managed to cut out 120k -// by this alone! -// The other two "tricks" are telling the Linker to merge all data-type segments together -// in the exe file. The relocation, read-only (constants) data, and code section (.text) -// sections can almost always be merged. Each section merged can save 4k in exe space, -// since each section is padded out to 4k chunks. This is very noticeable with smaller -// exes, since you could have only 700 bytes of data, 300 bytes of code, 94 bytes of -// strings - padded out, this could be 12k of runtime, for 1094 bytes of stuff! For larger -// programs, this is less overall, but can save at least 4k. -// Note that if you're using MFC static or some other 3rd party libs, you may get poor -// results with merging the readonly (.rdata) section - the exe may grow larger. -// To use this feature, define _MERGE_RDATA_ in your project or before this header is used. -// With Visual C++ 5, the program uses a file alignment of 512 bytes, which results -// in a small exe. Under VC6, the program instead uses 4k, which is the same as the -// section size. The reason (from what I understand) is that 4k is the chunk size of -// the virtual memory manager, and that WinAlign (an end-user tuning tool for Win98) -// will re-align the programs on this boundary. The problem with this is that all of -// Microsoft's system exes and dlls are *NOT* tuned like this, and using 4k causes serious -// exe bloat. This is very noticeable for smaller programs. -// The "trick" for this is to use the undocumented FILEALIGN linker parm to change the -// padding from 4k to 1/2k, which results in a much smaller exe - anywhere from 20%-75% -// depending on the size. Note that this is the same as using /OPT:NOWIN98, which *is* -// a previously documented switch, but was left out of the docs for some reason in VC6 and -// all of the current MSDN's - see KB:Q235956 for more information. -// Microsoft does say that using the 4k alignment will "speed up process loading", -// but I've been unable to notice a difference, even on my P180, with a very large (4meg) exe. -// Please note, however, that this will probably not change the size of the COMPRESSED -// file (either in a .zip file or in an install archive), since this 4k is all zeroes and -// gets compressed away. -// Also, the /ALIGN:4096 switch will "magically" do the same thing, even though this is the -// default setting for this switch. Apparently this sets the same values as the above two -// switches do. We do not use this in this header, since it smacks of a bug and not a feature. -// Thanks to Michael Geary for some additional tips! -// -// Notes about using this header in .NET -// First off, VC7 does not allow a lot of the linker command options in pragma's. There is no -// honest or good reason why Microsoft decided to make this change, it just doesn't. -// So that is why there are a lot of <1300 #if's in the header. -// If you want to take full advantage of the VC7 linker options, you will need to do it on a -// PER PROJECT BASIS; you can no longer use a global header file like this to make it better. -// Items I strongly suggest putting in all your VC7 project linker options command line settings: -// /ignore:4078 /RELEASE -// Compiler options: -// /GL (Whole Program Optimization) -// If you're making an .EXE and not a .DLL, consider adding in: -// /GA (Optimize for Windows Application) -// Some items to consider using in your VC7 projects (not VC6): -// Link-time Code Generation - whole code optimization. Put this in your exe/dll project link settings. -// /LTCG:NOSTATUS -// The classic no-padding and no-bloat compiler C/C++ switch: -// /opt:nowin98 -// -// (C++ command line options: /GL /opt:nowin98 and /GA for .exe files) -// (Link command line options: /ignore:4078 /RELEASE /LTCG:NOSTATUS) -// -// Now, notes on using these options in VC7 vs VC6. -// VC6 consistently, for me, produces smaller code from C++ the exact same sources, -// with or without this header. On average, VC6 produces 5% smaller binaries compared -// to VC7 compiling the exact same project, *without* this header. With this header, VC6 -// will make a 13k file, while VC7 will make a 64k one. VC7 is just bloaty, pure and -// simple - all that managed/unmanaged C++ runtimes, and the CLR stuff must be getting -// in the way of code generation. However, template support is better, so there. -// Both VC6 and VC7 show the same end kind of end result savings - larger binary output -// will shave about 2% off, where as smaller projects (support DLL's, cpl's, -// activex controls, ATL libs, etc) get the best result, since the padding is usually -// more than the actual usable code. But again, VC7 does not compile down as small as VC6. -// -// The argument can be made that doing this is a waste of time, since the "zero bytes" -// will be compressed out in a zip file or install archive. Not really - it doesn't matter -// if the data is a string of zeroes or ones or 85858585 - it will still take room (20 bytes -// in a zip file, 29 bytes if only *4* of them 4k bytes are not the same) and time to -// compress that data and decompress it. Also, 20k of zeros is NOT 20k on disk - it's the -// size of the cluster slop- for Fat32 systems, 20k can be 32k, NTFS could make it 24k if you're -// just 1 byte over (round up). Most end users do not have the dual P4 Xeon systems with -// two gigs of RDram and a Raid 0+1 of Western Digital 120meg Special Editions that all -// worthy developers have (all six of us), so they will need any space and LOADING TIME -// savings they will need; taking an extra 32k or more out of your end user's 64megs of -// ram on Windows 98 is Not a Good Thing. -// -// Now, as a ADDED BONUS at NO EXTRA COST TO YOU! Under VC6, using the /merge:.text=.data -// pragma will cause the output file to be un-disassembleable! (is that a word?) At least, -// with the normal tools - WinDisam, DumpBin, and the like will not work. Try it - use the -// header, compile release, and then use DUMPBIN /DISASM filename.exe - no code! -// Thanks to Gëzim Pani for discovering this gem - for a full writeup on -// this issue and the ramifactions of it, visit www.nopcode.com for the Aggressive Optimize -// article. - -#ifndef _AGGRESSIVEOPTIMIZE_H_ -#define _AGGRESSIVEOPTIMIZE_H_ - -#pragma warning(disable:4711) - -#ifdef NDEBUG -// /Og (global optimizations), /Os (favor small code), /Oy (no frame pointers) -#pragma optimize("gsy",on) - -#if (_MSC_VER<1300) - #pragma comment(linker,"/RELEASE") -#endif - -// Note that merging the .rdata section will result in LARGER exe's if you using -// MFC (esp. static link). If this is desirable, define _MERGE_RDATA_ in your project. -//#ifdef _MERGE_RDATA_ -//#pragma comment(linker,"/merge:.rdata=.data") -//#endif // _MERGE_RDATA_ - -//#pragma comment(linker,"/merge:.text=.data") -//#if (_MSC_VER<1300) - // In VC7, this causes problems with the relocation and data tables, so best to not merge them -// #pragma comment(linker,"/merge:.reloc=.data") -//#endif - -// Merging sections with different attributes causes a linker warning, so -// turn off the warning. From Michael Geary. Undocumented, as usual! -#if (_MSC_VER<1300) - // In VC7, you will need to put this in your project settings - #pragma comment(linker,"/ignore:4078") -#endif - -// With Visual C++ 5, you already get the 512-byte alignment, so you will only need -// it for VC6, and maybe later. -#if _MSC_VER >= 1000 - -// Option #1: use /filealign -// Totally undocumented! And if you set it lower than 512 bytes, the program crashes. -// Either leave at 0x200 or 0x1000 -//#pragma comment(linker,"/FILEALIGN:0x200") - -// Option #2: use /opt:nowin98 -// See KB:Q235956 or the READMEVC.htm in your VC directory for info on this one. -// This is our currently preferred option, since it is fully documented and unlikely -// to break in service packs and updates. -#if (_MSC_VER<1300) - // In VC7, you will need to put this in your project settings - #pragma comment(linker,"/opt:nowin98") -#else - -// Option #3: use /align:4096 -// A side effect of using the default align value is that it turns on the above switch. -// Does nothing under Vc7 that /opt:nowin98 doesn't already give you -// #pragma comment(linker,"/ALIGN:512") -#endif - -#endif // _MSC_VER >= 1000 - -#endif // NDEBUG - -#endif // _AGGRESSIVEOPTIMIZE_H_ diff --git a/plugins/KeyboardNotify/src/Common.h b/plugins/KeyboardNotify/src/Common.h index 20b2f13d17..d8cef2f67c 100644 --- a/plugins/KeyboardNotify/src/Common.h +++ b/plugins/KeyboardNotify/src/Common.h @@ -20,44 +20,39 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. #define _WIN32_WINNT 0x0500 #define _CRT_SECURE_NO_WARNINGS -#include -#include #include +#include #include #include #include #include #include -#include "flash.h" -#include "ignore.h" -#include "keyboard.h" -#include "trigger.h" -#include "constants.h" -#include "protolist.h" -#include "EnumProc.h" -#include "utils.h" -#include "keypresses.h" -#include "resource.h" - #include #include #include #include -#include #include -#include #include -#include #include -#include #include #include #include #include #include -#include "m_kbdnotify.h" +#include #include -#include "m_trigger.h" +#include +#include "flash.h" +#include "ignore.h" +#include "keyboard.h" +#include "trigger.h" +#include "constants.h" +#include "protolist.h" +#include "EnumProc.h" +#include "utils.h" +#include "keypresses.h" +#include "resource.h" +#include "Version.h" diff --git a/plugins/KeyboardNotify/src/Version.h b/plugins/KeyboardNotify/src/Version.h new file mode 100644 index 0000000000..ffa5549e2d --- /dev/null +++ b/plugins/KeyboardNotify/src/Version.h @@ -0,0 +1,14 @@ +#define __MAJOR_VERSION 1 +#define __MINOR_VERSION 5 +#define __RELEASE_NUM 7 +#define __BUILD_NUM 7 + +#define __FILEVERSION_STRING __MAJOR_VERSION,__MINOR_VERSION,__RELEASE_NUM,__BUILD_NUM + +#define __PLUGIN_NAME "Keyboard notify ext." +#define __FILENAME "KeyboardNotify.dll" +#define __DESCRIPTION "Flashes your keyboard LEDs when a message has arrived." +#define __AUTHOR "TioDuke" +#define __AUTHOREMAIL "tioduke@yahoo.ca" +#define __AUTHORWEB "http://miranda-ng.org/" +#define __COPYRIGHT "© 2002-2003 Martin \xd6" "berg, 2004 Std, 2005-2008 TioDuke" diff --git a/plugins/KeyboardNotify/src/main.cpp b/plugins/KeyboardNotify/src/main.cpp index 3cafe2dd30..b3bdaea314 100644 --- a/plugins/KeyboardNotify/src/main.cpp +++ b/plugins/KeyboardNotify/src/main.cpp @@ -20,163 +20,6 @@ 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. - - - Description - ----------- - This plugin for Miranda-IM notifies user of specified events (as incoming messages, - incoming files, incoming URLs or other events). This plugin is based on the original one - by Martin Öberg (aka strickz) and Std's modifications (mainly the idea of using direct - port handling using a driver). - It has many options allowing: - a) To select on which events to react - b) Under which conditions (eg: fullscreen mode, ScreenSaver running, workstation locked) - c) To act only if the protocol receiving the event is under specified status - d) For message events you can choose to be notified if the message window is open or not - e) A notification feature allowing to be notified of pending events (unopen events) - after specified period of time - f) To select method for stopping the blinking (after x secs, if Miranda is re-attended, - if Windows is re-attended, if all notified events are opened or when the notify conditions - end) - g) And several flashing options: select leds to blink, effects (all at the same time, - in turn, in sequence and like KITT!), preview button - It was designed to be flexible and performing several different tasks. It can be - configured to act like the original one and has several functions from other Miranda's - keyboard notifier plugins. - It also provides a service to allow third party plugins use its notifier abilities. - - Options - ------- - Options page Options->Plugins->Keyboard Flash. Tabbed: Protocols, Rules (when), Flashing (how), Themes and Ignore. - - Thanks - ------ - - Pete for the numerous patches he sent, actively helping to improve the code and - functionality - - UnregistereD for great help in solving problem with Windows activity detection - - Slacktarn, Sir_qwerty and Tweety for giving great help with ideas (most of the new - features included in this plugin were suggested by them) and testing - - The authors of AAA, PopUp+, KeyScrollNotify, original KeyboardNotify, Neweventnotify, - IEView, NGEventNotify for part of their code used in this plugin. - - Vampik fot the InTurn flashing option - - Miranda IM developers for this amazing program - - all other people from Miranda community - - History - ------- - 1.5.7.7: - [!] Added support for Miranda 0.8.x.x. - 1.5.7.6: - [!] Fixed bug in Ignore module. - 1.5.7.5: - [!] Updated TriggerPlugin support for latest version. - 1.5.7.4: - [*] Updated screenshot - [*] Minor code cleaning - 1.5.7.3: - [+] Added xstatus support - 1.5.7.2: - [+] Added per contact Ignore options - 1.5.7.1: - [!] Fix in Options for themes under WinXP+ (really essential feature) - 1.5.7.0: - [+] Added support for Trigger plugin - 1.5.6.3: - [-] Removed device presence validation: it is not needed now that the plugin works on USB (thanks Nick, aka Aestetic) - [+] Added a new service to the API for 'normalizing' a custom flashing sequence string - [-] Simplified the API (the extended version of the start blink service is no longer needed). - 1.5.6.2: - [!] Fixed problem while trying to detect if message window is in foreground. - 1.5.6.1: - [!] Fixed bug with keypress emulation and "until Windows is re-attended" option. - 1.5.6.0: - [+] Option to emulate keypresses (for the USB people) - [*] Changed the emergency key (to make it stop with PAUSE instead of SCROLL LOCK key). - 1.5.5.4: - [*] Improved ListView control handling - [*] Changed the default values (for the sake of new users). - 1.5.5.3: - [*] More code optimization. - 1.5.5.2: - [+] Support for Update plugin. - 1.5.5.1: - [!] Minor source fixes. - 1.5.5.0: - [+] New 'notify when' option: while defined programs are running (just like gamerstatus) - [+] Extended the API to add two new services to disable and re-enable keyboard notifications (for use by bosskey plugin). - 1.5.4.4: - [!] Fixed (hopefully) problems with some system configurations (with PS2 keyboards) where the KeyboardClass0 device was not the apropriate one (thanks pete!) - [+] Extended the plugin API (requested bt tweety). - 1.5.4.3: - [!] Fixed some compatibility issues with nconvers++ (thank you donatas for your help). - 1.5.4.2: - [!] Fixed problem with Windows' activity detection under Win9X when using other plugins that do the same. - [!] Fixed crash caused by incoming authorisation requests when metacontacts was enabled. - 1.5.4.1: - [!] Some corrections on third party plugins events handling (now they are more assimilated to the 'other events') - [*] Some code cleaning - [!] Fixed problem with first message in Metacontacts recognition while checking for pending events (thank you again NirG) - 1.5.4.0: - [+] New plugin API (thank you CriS for your ideas and great help) - [!] Added Offline status to status check list (thank you Slaktarn for finding it). - 1.5.3.4: - [!] Fixed Metacontacts recognition in checking and counting of pending events (thank you NirG for finding the problem) - [!] Fixed problems with multiple instances of the plugin running (thank you tweety for reporting and testing). - 1.5.3.3: - [!] Changed behaviour of Preview button to make it independent of the rules' options. - 1.5.3.2: - [+] New dialog to asign leds to specific events for the trillian-like sequences. - 1.5.3.1: - [!] Fixed bug of loosing any other until setting when selecting 'Events are opened'. - 1.5.3.0: - [+] Applied pete's patches (thank you very much for your great work) - - Use of GetLastInputInfo when possible for detecting Windows' activity - - Made Windows' mouse hooks also aware of mouse clicking - - Made Miranda re-attended option react on windows restoring and ignoring mouse hovering an unfocused window - - New option for message events to avoid blinking if message window is focused - - Made the plugin handle metacontact's special issues - [!] Use of the new message API for windows detection when possible - [+] New message event option to check last message timestamp (requested by D46MD) - [+] Possibility of choosing more than one flash until option at the same time - [+] New flashing effect to make the leds blink accordingly to number of events - [+] Possibility of selecting/unselecting protocols (requested by tweety, usuful to avoid flashing on some protocols as rss) - 1.5.2.2: - [!] scriver's message window detection (thanks D46MD for your great help) - [!] corrected 'flash until' checking accordingly to pete's patch (thank you) - 1.5.2.1: - [!] nconvers++'s message window detection - [!] checked window detection for srmm, scriver, sramm and srmm_mod - 1.5.2.0: - [+] Custom theme support - [-] Custom order history - 1.5.1.0: - [+] Custom order effect - [+] Custom order history - 1.5.0.0: - [+] Drivers aren't needed anymore - [+] Status selection option - [+] Miranda/Windows activity detection (thank you Peter Boon) - [+] 'Opened events' stop method - [+] x seconds stop method - [+] Hooking database event for detecting incoming events - [+] Notifier option for pending events - [+] Checkbox for enabling disabling open messages notification - [+] In sequence and KIT flashing effects - [+] Preview button - [+] Tabbed options - [!] Several corrections/improvements in options page - [!] Not selected leds will preserve their original state - 1.4.1.0: (by me and Vampik) - [+] Notify on fullscreen, screensaver, worksation locked - [!] Try to improve Win98 keysimulation routines - [+] Added InTurn effect (thank you Vampik) - [!] Corrected speed of blinking (thank you Vampik) - 1.4.0.0: (by Std, unreleased) - [+] Added direct port handling using PortTalk.sys driver - 1.3.0.0: (by strickz) - This is strickz' final release. It still uses keypress simulation. It was nice (thanks *g*) - - */ #include "Common.h" @@ -219,14 +62,11 @@ HHOOK hMirandaKeyBoardHook = NULL; HHOOK hMirandaWndProcHook = NULL; UINT hReminderTimer = 0; -#pragma data_seg("Shared") HHOOK hMouseHook = NULL; HHOOK hKeyBoardHook = NULL; BYTE bEmulateKeypresses = 0; DWORD dwLastInput = 0; POINT lastGlobalMousePos = {0, 0}; -#pragma data_seg() -#pragma comment(linker, "/section:Shared,rws") static BOOL (WINAPI * MyGetLastInputInfo)(PLASTINPUTINFO); @@ -278,15 +118,16 @@ BYTE bMetaProtoEnabled = 0; PLUGININFOEX pluginInfo={ sizeof(PLUGININFOEX), - "Keyboard Notify Ext.", - PLUGIN_MAKE_VERSION(1,5,7,7), - "Flashes your keyboard LEDs when a message has arrived.", - "TioDuke", - "tioduke@yahoo.ca", - "© 2002-2003 M.Öberg, 2004 Std, 2005-2008 TioDuke", - "http://miranda-ng.org/", - UNICODE_AWARE, //doesn't replace anything built-in - {0x119d7288, 0x2050, 0x448d, { 0x99, 0x00, 0xd8, 0x6a, 0xc7, 0x04, 0x26, 0xbf }} //{119D7288-2050-448d-9900-D86AC70426BF} + __PLUGIN_NAME, + PLUGIN_MAKE_VERSION(__MAJOR_VERSION, __MINOR_VERSION, __RELEASE_NUM, __BUILD_NUM), + __DESCRIPTION, + __AUTHOR, + __AUTHOREMAIL, + __COPYRIGHT, + __AUTHORWEB, + UNICODE_AWARE, + //{119D7288-2050-448D-9900-D86AC70426BF} + {0x119d7288, 0x2050, 0x448d, {0x99, 0x00, 0xd8, 0x6a, 0xc7, 0x04, 0x26, 0xbf}} }; -- cgit v1.2.3