bindings: add support for defining and executing commands

This commit is contained in:
Andrzej Rybczak
2012-09-20 04:32:51 +02:00
parent ba0a47668a
commit 07fc58015e
11 changed files with 209 additions and 45 deletions

View File

@@ -71,7 +71,7 @@ namespace Helpers {//
void mpd();
/// called each time user types another character while inside Window::getString
void getString(const std::wstring &);
bool getString(const std::wstring &);
/// called each time user changes current filter (while being inside Window::getString)
struct ApplyFilterImmediately
@@ -79,13 +79,21 @@ struct ApplyFilterImmediately
ApplyFilterImmediately(Filterable *f, const std::wstring &filter)
: m_f(f), m_ws(filter) { }
void operator()(const std::wstring &ws);
bool operator()(const std::wstring &ws);
private:
Filterable *m_f;
std::wstring m_ws;
};
struct TryExecuteImmediateCommand
{
bool operator()(const std::wstring &ws);
private:
std::wstring m_ws;
};
}
}