Cosmetic changes to code.

This commit is contained in:
Birunthan Mohanathas
2011-03-29 19:21:57 +00:00
parent 5882f12c49
commit a92bdd9b18
65 changed files with 1642 additions and 1642 deletions

View File

@ -24,43 +24,43 @@
This plugin aims to give Rainmeter skins access to various virtual desktop
managers through a common interface. The following VDMs are supported:
* Dexpot
* VirtuaWin
* Dexpot
* VirtuaWin
To add support for another virtual desktop manager,
1) implement a new class derived from VDMeasure
2) include its header file below
3) add a new case for the "VDManager" config string in the Initialize
funtion below
1) implement a new class derived from VDMeasure
2) include its header file below
3) add a new case for the "VDManager" config string in the Initialize
funtion below
Different types of measures are identified using the "VDMeasureType" config
string, i.e.
[VirtualDesktopsMeasure]
Measure=Plugin
Plugin=VirtualDesktops.dll
VDManager=SomeVDM
VDMeasureType=...
[VirtualDesktopsMeasure]
Measure=Plugin
Plugin=VirtualDesktops.dll
VDManager=SomeVDM
VDMeasureType=...
The following basic measure types have to be implemented:
* VDMActive: returns 1 when the VDM is running, 0 otherwise
* VDMActive: returns 1 when the VDM is running, 0 otherwise
* DesktopCount: returns the number of virtual desktops available; when
"VDDesktopCount=X" or "VDDesktopCount=Y" is given, returns
the number of columns or rows, respectively, in a grid of
desktops
* DesktopCount: returns the number of virtual desktops available; when
"VDDesktopCount=X" or "VDDesktopCount=Y" is given, returns
the number of columns or rows, respectively, in a grid of
desktops
* CurrentDesktop: returns the number of the currently active desktop
* CurrentDesktop: returns the number of the currently active desktop
* SwitchDesktop: when sent a desktop number as a bang, switches to the
corresponding desktop
* SwitchDesktop: when sent a desktop number as a bang, switches to the
corresponding desktop
You're welcome to add any other measure types that suit the feature set of
the virtual desktop manager in question. Examples can be found in the
existing implementations.
*/
#include "DexpotMeasure.h"
@ -92,29 +92,29 @@ UINT Initialize(HMODULE instance, LPCTSTR iniFile, LPCTSTR section, UINT id)
{
VDMeasure *Measure = NULL;
LPCTSTR VDManager = ReadConfigString(section, _T("VDManager"), _T(""));
if(_tcsicmp(VDManager, _T("Dexpot")) == 0)
if (_tcsicmp(VDManager, _T("Dexpot")) == 0)
{
Measure = DexpotMeasure::CreateMeasure(instance, id, iniFile, section);
}
else if(_tcsicmp(VDManager, _T("VirtuaWin")) == 0)
else if (_tcsicmp(VDManager, _T("VirtuaWin")) == 0)
{
Measure = new VirtuaWinMeasure(instance, id);
}
if(Measure)
if (Measure)
{
Measures.insert(std::make_pair(id, Measure));
return Measure->Initialize(iniFile, section);
}
return 0;
}
UINT Update(UINT id)
{
std::map<UINT, VDMeasure*>::iterator i = Measures.find(id);
if(i != Measures.end())
if (i != Measures.end())
{
return i->second->Update();
}
@ -125,7 +125,7 @@ UINT Update(UINT id)
LPCTSTR GetString(UINT id, UINT flags)
{
std::map<UINT, VDMeasure*>::iterator i = Measures.find(id);
if(i != Measures.end())
if (i != Measures.end())
{
return i->second->GetString(flags);
}
@ -136,7 +136,7 @@ LPCTSTR GetString(UINT id, UINT flags)
void ExecuteBang(LPCTSTR args, UINT id)
{
std::map<UINT, VDMeasure*>::iterator i = Measures.find(id);
if(i != Measures.end())
if (i != Measures.end())
{
i->second->ExecuteBang(args);
}
@ -145,7 +145,7 @@ void ExecuteBang(LPCTSTR args, UINT id)
void Finalize(HMODULE instance, UINT id)
{
std::map<UINT, VDMeasure*>::iterator i = Measures.find(id);
if(i != Measures.end())
if (i != Measures.end())
{
i->second->Finalize();
delete i->second;