Browse Source

Merge branch 'ticket/13'

closes #13
tickets/12/12/2
rarified 3 years ago
parent
commit
3d3d70fc08
  1. 17
      Sources/Plasma/Apps/plClient/plClient.cpp
  2. 1
      Sources/Plasma/Apps/plClient/plClient.h
  3. 7
      Sources/Plasma/FeatureLib/pfPython/cyMisc.cpp
  4. 9
      Sources/Plasma/FeatureLib/pfPython/cyMisc.h
  5. 4
      Sources/Plasma/FeatureLib/pfPython/cyMiscGlue.cpp
  6. 2
      Sources/Plasma/NucleusLib/pnMessage/plClientMsg.h

17
Sources/Plasma/Apps/plClient/plClient.cpp

@ -777,6 +777,12 @@ hsBool plClient::MsgReceive(plMessage* msg)
} }
break; break;
case plClientMsg::kFlashWindow:
{
FlashWindow();
}
break;
} }
return true; return true;
} }
@ -2458,6 +2464,17 @@ void plClient::WindowActivate(bool active)
fWindowActive = active; fWindowActive = active;
} }
void plClient::FlashWindow()
{
#ifdef HS_BUILD_FOR_WIN32
FLASHWINFO info;
info.cbSize = sizeof(info);
info.dwFlags = FLASHW_TIMERNOFG | FLASHW_ALL;
info.hwnd = fWindowHndl;
info.uCount = -1;
FlashWindowEx(&info);
#endif
}
//============================================================================ //============================================================================
void plClient::IOnAsyncInitComplete () { void plClient::IOnAsyncInitComplete () {

1
Sources/Plasma/Apps/plClient/plClient.h

@ -292,6 +292,7 @@ public:
virtual void WindowActivate(bool active); virtual void WindowActivate(bool active);
virtual hsBool WindowActive() const { return fWindowActive; } virtual hsBool WindowActive() const { return fWindowActive; }
void FlashWindow();
void SetMessagePumpProc( plMessagePumpProc proc ) { fMessagePumpProc = proc; } void SetMessagePumpProc( plMessagePumpProc proc ) { fMessagePumpProc = proc; }
void ResetDisplayDevice(int Width, int Height, int ColorDepth, hsBool Windowed, int NumAASamples, int MaxAnisotropicSamples, hsBool VSync = false); void ResetDisplayDevice(int Width, int Height, int ColorDepth, hsBool Windowed, int NumAASamples, int MaxAnisotropicSamples, hsBool VSync = false);
void ResizeDisplayDevice(int Width, int Height, hsBool Windowed); void ResizeDisplayDevice(int Width, int Height, hsBool Windowed);

7
Sources/Plasma/FeatureLib/pfPython/cyMisc.cpp

@ -722,6 +722,13 @@ void cyMisc::ExcludeRegionSetNow(pyKey& sender, pyKey& exKey, UInt16 state)
plgDispatch::MsgSend( msg ); // whoosh... off it goes plgDispatch::MsgSend( msg ); // whoosh... off it goes
} }
void cyMisc::FlashWindow()
{
plKey clientKey = hsgResMgr::ResMgr()->FindKey(kClient_KEY);
plClientMsg* pMsg = new plClientMsg(plClientMsg::kFlashWindow);
pMsg->Send(clientKey); // whoosh... off it goes
}
#include "hsTimer.h" #include "hsTimer.h"
///////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////
// //

9
Sources/Plasma/FeatureLib/pfPython/cyMisc.h

@ -244,6 +244,15 @@ public:
// //
static hsBool WasLocallyNotified(pyKey &selfkey); static hsBool WasLocallyNotified(pyKey &selfkey);
/////////////////////////////////////////////////////////////////////////////
//
// Function : FlashWindow
// PARAMETERS :
//
// PURPOSE : Flashes the client window if it is not focused
//
static void FlashWindow();
///////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////
// //
// Function : GetClientName // Function : GetClientName

4
Sources/Plasma/FeatureLib/pfPython/cyMiscGlue.cpp

@ -48,6 +48,8 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com
#include <python.h> #include <python.h>
PYTHON_BASIC_GLOBAL_METHOD_DEFINITION(PtFlashWindow, cyMisc::FlashWindow, "Flashes the client window if it is not focused");
PYTHON_GLOBAL_METHOD_DEFINITION_NOARGS(PtGetAgeName, "DEPRECIATED - use ptDniInfoSource instead") PYTHON_GLOBAL_METHOD_DEFINITION_NOARGS(PtGetAgeName, "DEPRECIATED - use ptDniInfoSource instead")
{ {
return PyString_FromString(cyMisc::GetAgeName()); return PyString_FromString(cyMisc::GetAgeName());
@ -496,6 +498,8 @@ PYTHON_GLOBAL_METHOD_DEFINITION(PtDumpLogs, args, "Params: folder\nDumps all cur
void cyMisc::AddPlasmaMethods(std::vector<PyMethodDef> &methods) void cyMisc::AddPlasmaMethods(std::vector<PyMethodDef> &methods)
{ {
PYTHON_GLOBAL_METHOD_NOARGS(methods, PtFlashWindow);
PYTHON_GLOBAL_METHOD_NOARGS(methods, PtGetAgeName); PYTHON_GLOBAL_METHOD_NOARGS(methods, PtGetAgeName);
PYTHON_GLOBAL_METHOD_NOARGS(methods, PtGetAgeInfo); PYTHON_GLOBAL_METHOD_NOARGS(methods, PtGetAgeInfo);
PYTHON_GLOBAL_METHOD_NOARGS(methods, PtGetAgeTime); PYTHON_GLOBAL_METHOD_NOARGS(methods, PtGetAgeTime);

2
Sources/Plasma/NucleusLib/pnMessage/plClientMsg.h

@ -94,6 +94,8 @@ public:
kEnableRenderScene, kEnableRenderScene,
kResetGraphicsDevice, kResetGraphicsDevice,
kSetGraphicsDefaults, kSetGraphicsDefaults,
kFlashWindow,
}; };
// graphics settings fields // graphics settings fields

Loading…
Cancel
Save