Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions PythonScript/src/NotepadPlusWrapper.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1085,6 +1085,17 @@ bool NotepadPlusWrapper::isSingleView()
return !IsWindowVisible(splitter_hwnd);
}

void NotepadPlusWrapper::flashWindow(UINT count, DWORD timeout)
{
FLASHWINFO flashinfo;
flashinfo.cbSize = sizeof(flashinfo);
flashinfo.hwnd = m_nppHandle;
flashinfo.dwFlags = FLASHW_ALL;
flashinfo.dwTimeout = timeout;
flashinfo.uCount = count;

FlashWindowEx(&flashinfo);
}

void NotepadPlusWrapper::notAllowedInScintillaCallback(const char *message)
{
Expand Down
1 change: 1 addition & 0 deletions PythonScript/src/NotepadPlusWrapper.h
Original file line number Diff line number Diff line change
Expand Up @@ -740,6 +740,7 @@ class NotepadPlusWrapper
boost::python::str getPluginVersion();

bool isSingleView();
void flashWindow(UINT count, DWORD timeout);

protected:
LRESULT callNotepad(UINT message, WPARAM wParam = 0, LPARAM lParam = 0)
Expand Down
4 changes: 2 additions & 2 deletions PythonScript/src/NotepadPython.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -120,8 +120,8 @@ void export_notepad()
.def("getEnableThemeTextureFunc", &NotepadPlusWrapper::getEnableThemeTextureFunc, "TODO")
.def("triggerTabbarContextMenu", &NotepadPlusWrapper::triggerTabbarContextMenu, boost::python::args("view, index2Activate"), "Activates the context menu for provided view and tab index")
.def("disableAutoUpdate", &NotepadPlusWrapper::disableAutoUpdate, "Disables notepad++ auto update functionality")
.def("isSingleView", &NotepadPlusWrapper::isSingleView, "True if only one view is used, False otherwise");

.def("isSingleView", &NotepadPlusWrapper::isSingleView, "True if only one view is used, False otherwise")
.def("flashWindow", &NotepadPlusWrapper::flashWindow, boost::python::args("count", "timeout"), "Flashes notepad++ for the given count and timeout");
boost::python::enum_<LangType>("LANGTYPE")
.value("TXT", L_TEXT)
.value("PHP", L_PHP)
Expand Down