Reintegrated 2.3 branch into trunk

This commit is contained in:
Birunthan Mohanathas
2012-01-08 17:35:29 +00:00
parent c3335adec5
commit c3ed2e5fa3
87 changed files with 5379 additions and 2732 deletions

View File

@ -17,39 +17,17 @@
*/
#include <windows.h>
#include <string>
#include "../../Library/Export.h" // Rainmeter's exported functions
#include "../../Library/DisableThreadLibraryCalls.h" // contains DllMain entry point
/* The exported functions */
extern "C"
{
__declspec( dllexport ) UINT Update(UINT id);
__declspec( dllexport ) UINT GetPluginVersion();
__declspec( dllexport ) LPCTSTR GetPluginAuthor();
__declspec( dllexport ) void ExecuteBang(LPCTSTR args, UINT id);
}
void SendKey(WORD key);
/*
This function is called when new value should be measured.
The function returns the new value.
*/
UINT Update(UINT id)
{
return 0;
}
void SendKey(WORD key)
{
KEYBDINPUT kbi;
kbi.wVk = key; // Provide your own
kbi.wVk = key;
kbi.wScan = 0;
kbi.dwFlags = 0; // See docs for flags (mm keys may need Extended key flag)
kbi.dwFlags = 0;
kbi.time = 0;
kbi.dwExtraInfo = (ULONG_PTR) GetMessageExtraInfo();
kbi.dwExtraInfo = (ULONG_PTR)GetMessageExtraInfo();
INPUT input;
input.type = INPUT_KEYBOARD;
@ -58,7 +36,7 @@ void SendKey(WORD key)
SendInput(1, &input, sizeof(INPUT));
}
void ExecuteBang(LPCTSTR args, UINT id)
PLUGIN_EXPORT void ExecuteBang(LPCTSTR args, UINT id)
{
if (_wcsicmp(args, L"NextTrack") == 0)
{
@ -90,16 +68,6 @@ void ExecuteBang(LPCTSTR args, UINT id)
}
else
{
LSLog(LOG_WARNING, NULL, L"MediaKey.dll: Unknown bang");
RmLog(LOG_WARNING, L"MediaKey.dll: Unknown bang");
}
}
UINT GetPluginVersion()
{
return 1000;
}
LPCTSTR GetPluginAuthor()
{
return L"Birunthan Mohanathas (www.poiru.net)";
}

View File

@ -1,10 +1,5 @@
// Microsoft Developer Studio generated resource script.
//
#include <windows.h>
#include "../../Version.h"
#define APSTUDIO_READONLY_SYMBOLS
#include "windows.h"
#undef APSTUDIO_READONLY_SYMBOLS
/////////////////////////////////////////////////////////////////////////////
//
@ -18,7 +13,7 @@ VS_VERSION_INFO VERSIONINFO
#ifdef _DEBUG
FILEFLAGS VS_FF_DEBUG
#else
FILEFLAGS 0x0L
FILEFLAGS 0x0L
#endif
FILEOS VOS_NT_WINDOWS32
FILETYPE VFT_DLL
@ -28,11 +23,9 @@ BEGIN
BEGIN
BLOCK "040904E4"
BEGIN
VALUE "FileDescription", "MediaKey Plugin for Rainmeter"
VALUE "FileVersion", "1.0.0.0"
VALUE "InternalName", "PluginMediaKey"
VALUE "LegalCopyright", "Copyright (C) 2010 - Birunthan Mohanathas"
VALUE "OriginalFilename", "PluginMediaKey.dll"
VALUE "LegalCopyright", "<22> 2010 - Birunthan Mohanathas"
VALUE "OriginalFilename", "MediaKey.dll"
VALUE "ProductName", "Rainmeter"
#ifdef _WIN64
VALUE "ProductVersion", STRPRODUCTVER " (64-bit)"
@ -45,4 +38,4 @@ BEGIN
BEGIN
VALUE "Translation", 0x409, 1252
END
END
END

View File

@ -68,10 +68,10 @@
<_ProjectFileVersion>10.0.30319.1</_ProjectFileVersion>
<OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(SolutionDir)TestBench\x32\$(Configuration)\Plugins\</OutDir>
<IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">.\x32\$(Configuration)\</IntDir>
<LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">false</LinkIncremental>
<LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</LinkIncremental>
<OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(SolutionDir)TestBench\x64\$(Configuration)\Plugins\</OutDir>
<IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">.\x64\$(Configuration)\</IntDir>
<LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">false</LinkIncremental>
<LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</LinkIncremental>
<OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(SolutionDir)TestBench\x32\$(Configuration)\Plugins\</OutDir>
<IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">.\x32\$(Configuration)\</IntDir>
<LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</LinkIncremental>