From 911239601768bacf9420ab9cfeffed7e861844ac Mon Sep 17 00:00:00 2001 From: Brad Davis Date: Thu, 4 Sep 2014 15:26:04 -0700 Subject: Adding OSX 0.4.2 files --- LibOVR/Src/Displays/OVR_OSX_FocusObserver.h | 47 +++++++++++++++++++++++++++++ 1 file changed, 47 insertions(+) create mode 100644 LibOVR/Src/Displays/OVR_OSX_FocusObserver.h (limited to 'LibOVR/Src/Displays/OVR_OSX_FocusObserver.h') diff --git a/LibOVR/Src/Displays/OVR_OSX_FocusObserver.h b/LibOVR/Src/Displays/OVR_OSX_FocusObserver.h new file mode 100644 index 0000000..66ed12f --- /dev/null +++ b/LibOVR/Src/Displays/OVR_OSX_FocusObserver.h @@ -0,0 +1,47 @@ +#ifndef OVR_OSX_FocusObserver_h +#define OVR_OSX_FocusObserver_h + +#include "../Kernel/OVR_Threads.h" +#include "../Kernel/OVR_System.h" +#include "../Kernel/OVR_Lockless.h" + +#include "../Service/Service_NetServer.h" + +namespace OVR { namespace OSX{ + + struct FocusReaderImpl; + +class AppFocusObserver : public SystemSingletonBase +{ + OVR_DECLARE_SINGLETON(AppFocusObserver); + +public: + Lock ListLock; + Array AppList; + Service::NetServerListener *listener; + FocusReaderImpl* impl; + + void OnProcessFocus(pid_t pid); + void SetListener(Service::NetServerListener *_listener); + + pid_t LastProcessId; + pid_t ActiveProcessId; + void AddProcess(pid_t pid); + void nextProcess(); + void RemoveProcess(pid_t pid); + + +protected: + void onAppFocus(pid_t pid); + + pid_t LastAppFocus; + +}; + + + +}} // namespace OVR, OSX + + +#endif /* defined(__OVR_OSX_FocusReader__OVR_OSX_FocusObserver__) */ + -- cgit v1.2.3