#include <string>
#include <vector>
#include <map>
Go to the source code of this file.
Data Structures | |
struct | SearchResult |
When you want to add an index item to Launchy, a SearchResult is used. More... | |
Typedefs | |
typedef unsigned int | uint |
Functions | |
void | FreeSearchResult (SearchResult *sr) |
Internally used by Launchy to free results after you have returned them. | |
SearchResult | makeResult (wstring DisplayString, wstring FullPath, wstring Location, HICON icon) |
Use this function to quickly build SearchResults. | |
SearchResult * | ResultVectorToArray (vector< SearchResult > results) |
Convert a vector of SearchResults into a C SearchResult array. | |
vector< wstring > | TCHARListToVector (int numStrings, const TCHAR *Strings) |
Convert a list of TCHAR strings to a vector of wstrings. | |
TCHAR * | string2TCHAR (wstring str) |
Convert a wstring to a TCHAR*. | |
TCHAR * | StringVectorToTCHAR (vector< wstring > &Strings) |
Convert a vector of wstrings to a TCHAR*. | |
unsigned long | GenerateID (wstring str) |
Create a generated ID number from your plugin name. | |
TCHAR * | SerializeStringMap (map< wstring, wstring > m) |
Convert a map of string->string into a TCHAR*. | |
void | StoreString (wstring name, wstring value) |
Have Launchy store a string value in its archive. | |
wstring | RetrieveString (wstring name) |
Have Launchy retrieve a string value from its archive. | |
void | StoreInt (wstring name, int value) |
Have Launchy store an int into its archive. | |
int | RetrieveInt (wstring name, bool &exists) |
Have Launchy retrieve an int from its archive. | |
void | StoreFloat (wstring name, float value) |
Have Launchy store a float into its archive. | |
float | RetrieveFloat (wstring name, bool &exists) |
Have Launchy retrieve a float from its archive. | |
void | PluginSaveOptions () |
This event is called when Launchy is about to archive its options If you have not yet performed your StoreInt/Float/String functions this is the time to do so. | |
SearchResult * | PluginGetIdentifiers (int *iNumResults) |
Every time Launchy reindexes it clears the list of Plugin provided files and asks for them again This function is where you tell Launchy what "files" you would like it to index. | |
SearchResult * | PluginUpdateSearch (int NumStrings, const TCHAR *Strings, const TCHAR *FinalString, int *NumResults) |
If your plugin would like to add some items to the main Launchy index, such as "Google" or "Amazon" then this is the place to do it.PluginGetIdentifiers() is called at plugin initialization time and each time the index is reloaded. | |
SearchResult * | PluginFileOptions (const TCHAR *FullPath, int NumStrings, const TCHAR *Strings, const TCHAR *FinalString, int *NumResults) |
When a user presses TAB on a file owned by the normal Launchy index, Launchy asks each of the plugins if they would like to provide SearchResults for this file. | |
void | PluginDoAction (int NumStrings, const TCHAR *Strings, const TCHAR *FinalString, const TCHAR *FullPath) |
This is called when the user has pressed enter on a SearchResult that this plugin created It is up to the plugin to do something with the file, such as execute it. | |
TCHAR * | PluginGetRegexs (int *iNumResults) |
If your plugin would like to claim ownership of all user input that matches a regular expression, then provide Launchy with a list of regular expressions here An example is Weby which owns all searches that include www or http The regular expressions are PERL regular expressions to be interpreted by the BOOST regex library. | |
TCHAR * | PluginGetSeparator () |
The character used to separate input items when the user hits the TAB key, typically L'|'. | |
void | PluginFreeResults (SearchResult *, int num) |
This is used interally by Launchy to free the SearchResults that you have returned. | |
void | PluginFreeStrings (TCHAR *str) |
This is used internally by Launchy to free any strings that you have returned. | |
TCHAR * | PluginGetName () |
This is called at load when Launchy would like to know the name of your plugin. | |
TCHAR * | PluginGetDescription () |
Launchy will list a brief description of your plugin in the "Plugins" dialog, this is where Launchy gets that description. | |
void | PluginInitialize () |
This function is called when the plugin is first loaded. | |
void | PluginClose () |
This function is called just before the plugin is unloaded. | |
void | PluginCallOptionsDlg (HWND hwnd) |
This function is called when the user has pressed the "plugin options" button on your plugin You should create a dialog window to interface with this user from this function An example plugin that has such a dialog is Runny. | |
void | PluginGetStorage (int *NumItems, TCHAR **ItemNames, TCHAR **ItemValues) |
Called from Launchy when it wants the plugin's information to be archived. | |
void | PluginSetStorage (int NumItems, TCHAR *ItemNames, TCHAR *ItemValues) |
Called from Launchy when it wants to tell the plugin what information it has archived. | |
bool | PluginHasOptionsDlg (void) |
Used by Launchy to determine if it should call your plugin's PluginCallOptionsDlg function. | |
Variables | |
map< wstring, wstring > | Storage |
Internal structure used for storage of plugin defined options. |
typedef unsigned int uint |
Definition at line 13 of file LaunchyPlugin.h.
void FreeSearchResult | ( | SearchResult * | sr | ) |
Internally used by Launchy to free results after you have returned them.
SearchResult makeResult | ( | wstring | DisplayString, | |
wstring | FullPath, | |||
wstring | Location, | |||
HICON | icon | |||
) |
Use this function to quickly build SearchResults.
DisplayString | The shortened string that Launchy will search on | |
FullPath | The full path (including filename) of the file pointed at if it is a file. Important: Make sure that FullPath is unique, e.g. append ".YourPluginName" to DisplayString otherwise multiple files with the same name will get confused by Launchy | |
Location | The location of your file, set to your Plugin Name if it is not for a file | |
icon | Currently unused |
SearchResult* ResultVectorToArray | ( | vector< SearchResult > | results | ) |
Convert a vector of SearchResults into a C SearchResult array.
results | The vector of search results to convert |
vector<wstring> TCHARListToVector | ( | int | numStrings, | |
const TCHAR * | Strings | |||
) |
Convert a list of TCHAR strings to a vector of wstrings.
numStrings | The number of strings in the TCHAR to convert | |
Strings | The TCHAR* to convert |
TCHAR* string2TCHAR | ( | wstring | str | ) |
Convert a wstring to a TCHAR*.
str | The wstring to convert |
TCHAR* StringVectorToTCHAR | ( | vector< wstring > & | Strings | ) |
Convert a vector of wstrings to a TCHAR*.
Strings | The vector of wstrings to convert |
unsigned long GenerateID | ( | wstring | str | ) |
Create a generated ID number from your plugin name.
str | Your plugin name |
TCHAR* SerializeStringMap | ( | map< wstring, wstring > | m | ) |
Convert a map of string->string into a TCHAR*.
m | The map to convert |
void StoreString | ( | wstring | name, | |
wstring | value | |||
) |
Have Launchy store a string value in its archive.
name | The identifier of the value to store | |
value | The value of the identifier |
wstring RetrieveString | ( | wstring | name | ) |
Have Launchy retrieve a string value from its archive.
name | The identifier of the value to retrieve |
void StoreInt | ( | wstring | name, | |
int | value | |||
) |
Have Launchy store an int into its archive.
name | The identifier of the value to store | |
value | The value of the identifier |
int RetrieveInt | ( | wstring | name, | |
bool & | exists | |||
) |
Have Launchy retrieve an int from its archive.
name | The identifier of the value to retrieve | |
exists | This value is set to whether or not the identifier was found in the archive |
void StoreFloat | ( | wstring | name, | |
float | value | |||
) |
Have Launchy store a float into its archive.
name | The identifier of the value to store | |
value | The value of the identifier |
float RetrieveFloat | ( | wstring | name, | |
bool & | exists | |||
) |
Have Launchy retrieve a float from its archive.
name | The identifier of the value to retrieve | |
exists | This value is set to whether or not the identifier was found in the archive |
void PluginSaveOptions | ( | ) |
This event is called when Launchy is about to archive its options If you have not yet performed your StoreInt/Float/String functions this is the time to do so.
SearchResult* PluginGetIdentifiers | ( | int * | iNumResults | ) |
Every time Launchy reindexes it clears the list of Plugin provided files and asks for them again This function is where you tell Launchy what "files" you would like it to index.
iNumResults | Be sure to set the value of iNumResults to the number of results you have returned in the SearchResult* |
SearchResult* PluginUpdateSearch | ( | int | NumStrings, | |
const TCHAR * | Strings, | |||
const TCHAR * | FinalString, | |||
int * | NumResults | |||
) |
If your plugin would like to add some items to the main Launchy index, such as "Google" or "Amazon" then this is the place to do it.PluginGetIdentifiers() is called at plugin initialization time and each time the index is reloaded.
NumStrings | The number of strings in parameter "Strings" | |
Strings | Each time the user hits the TAB key the user's current string is appended to Strings | |
FinalString | This is the user's current string, e.g. for "Google | Launchy" "Google" would be in Strings and FinalString would equal "Launchy" | |
NumResults | Set this value to the number of SearchResults that you are returning |
SearchResult* PluginFileOptions | ( | const TCHAR * | FullPath, | |
int | NumStrings, | |||
const TCHAR * | Strings, | |||
const TCHAR * | FinalString, | |||
int * | NumResults | |||
) |
When a user presses TAB on a file owned by the normal Launchy index, Launchy asks each of the plugins if they would like to provide SearchResults for this file.
For instance, Explory will return results if the file in question is a .lnk to a directory such as My Documents
NumStrings | The number of strings in parameter "Strings" | |
Strings | Each time the user hits the TAB key the user's current string is appended to Strings | |
FinalString | This is the user's current string, e.g. for "Google | Launchy" "Google" would be in Strings and FinalString would equal "Launchy" | |
NumResults | Set this value to the number of SearchResults that you are returning | |
FullPath | The FullPath of the SearchResult in question |
void PluginDoAction | ( | int | NumStrings, | |
const TCHAR * | Strings, | |||
const TCHAR * | FinalString, | |||
const TCHAR * | FullPath | |||
) |
This is called when the user has pressed enter on a SearchResult that this plugin created It is up to the plugin to do something with the file, such as execute it.
makeResults()
NumStrings | The number of strings in parameter "Strings" | |
Strings | Each time the user hits the TAB key the user's current string is appended to Strings | |
FinalString | This is the user's current string, e.g. for "Google | Launchy" "Google" would be in Strings and FinalString would equal "Launchy" | |
FullPath | This is the FullPath value of the SearchResult supplied by the plugin |
TCHAR* PluginGetRegexs | ( | int * | iNumResults | ) |
If your plugin would like to claim ownership of all user input that matches a regular expression, then provide Launchy with a list of regular expressions here An example is Weby which owns all searches that include www or http The regular expressions are PERL regular expressions to be interpreted by the BOOST regex library.
iNumResults | The number of regular expressions you are returning |
TCHAR* PluginGetSeparator | ( | ) |
The character used to separate input items when the user hits the TAB key, typically L'|'.
void PluginFreeResults | ( | SearchResult * | , | |
int | num | |||
) |
This is used interally by Launchy to free the SearchResults that you have returned.
void PluginFreeStrings | ( | TCHAR * | str | ) |
This is used internally by Launchy to free any strings that you have returned.
TCHAR* PluginGetName | ( | ) |
This is called at load when Launchy would like to know the name of your plugin.
as other known plugins
TCHAR* PluginGetDescription | ( | ) |
Launchy will list a brief description of your plugin in the "Plugins" dialog, this is where Launchy gets that description.
void PluginInitialize | ( | ) |
This function is called when the plugin is first loaded.
void PluginClose | ( | ) |
This function is called just before the plugin is unloaded.
void PluginCallOptionsDlg | ( | HWND | hwnd | ) |
This function is called when the user has pressed the "plugin options" button on your plugin You should create a dialog window to interface with this user from this function An example plugin that has such a dialog is Runny.
hwnd | This is Launchy's hwnd and should be the parent window of your window |
void PluginGetStorage | ( | int * | NumItems, | |
TCHAR ** | ItemNames, | |||
TCHAR ** | ItemValues | |||
) |
Called from Launchy when it wants the plugin's information to be archived.
void PluginSetStorage | ( | int | NumItems, | |
TCHAR * | ItemNames, | |||
TCHAR * | ItemValues | |||
) |
Called from Launchy when it wants to tell the plugin what information it has archived.
bool PluginHasOptionsDlg | ( | void | ) |
Used by Launchy to determine if it should call your plugin's PluginCallOptionsDlg function.
map<wstring,wstring> Storage |
Internal structure used for storage of plugin defined options.