Skip to content

Commit b1246b9

Browse files
authored
Merge pull request bruderstein#65 from ClaudiaFrank/master
provides feature request 57 functionality
2 parents 2b89775 + 821a926 commit b1246b9

File tree

3 files changed

+14
-2
lines changed

3 files changed

+14
-2
lines changed

PythonScript/src/NotepadPlusWrapper.cpp

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1085,6 +1085,17 @@ bool NotepadPlusWrapper::isSingleView()
10851085
return !IsWindowVisible(splitter_hwnd);
10861086
}
10871087

1088+
void NotepadPlusWrapper::flashWindow(UINT count, DWORD timeout)
1089+
{
1090+
FLASHWINFO flashinfo;
1091+
flashinfo.cbSize = sizeof(flashinfo);
1092+
flashinfo.hwnd = m_nppHandle;
1093+
flashinfo.dwFlags = FLASHW_ALL;
1094+
flashinfo.dwTimeout = timeout;
1095+
flashinfo.uCount = count;
1096+
1097+
FlashWindowEx(&flashinfo);
1098+
}
10881099

10891100
void NotepadPlusWrapper::notAllowedInScintillaCallback(const char *message)
10901101
{

PythonScript/src/NotepadPlusWrapper.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -740,6 +740,7 @@ class NotepadPlusWrapper
740740
boost::python::str getPluginVersion();
741741

742742
bool isSingleView();
743+
void flashWindow(UINT count, DWORD timeout);
743744

744745
protected:
745746
LRESULT callNotepad(UINT message, WPARAM wParam = 0, LPARAM lParam = 0)

PythonScript/src/NotepadPython.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -120,8 +120,8 @@ void export_notepad()
120120
.def("getEnableThemeTextureFunc", &NotepadPlusWrapper::getEnableThemeTextureFunc, "TODO")
121121
.def("triggerTabbarContextMenu", &NotepadPlusWrapper::triggerTabbarContextMenu, boost::python::args("view, index2Activate"), "Activates the context menu for provided view and tab index")
122122
.def("disableAutoUpdate", &NotepadPlusWrapper::disableAutoUpdate, "Disables notepad++ auto update functionality")
123-
.def("isSingleView", &NotepadPlusWrapper::isSingleView, "True if only one view is used, False otherwise");
124-
123+
.def("isSingleView", &NotepadPlusWrapper::isSingleView, "True if only one view is used, False otherwise")
124+
.def("flashWindow", &NotepadPlusWrapper::flashWindow, boost::python::args("count", "timeout"), "Flashes notepad++ for the given count and timeout");
125125
boost::python::enum_<LangType>("LANGTYPE")
126126
.value("TXT", L_TEXT)
127127
.value("PHP", L_PHP)

0 commit comments

Comments
 (0)