-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Github Issue #75: Added an abstract class and a concrete class to cal…
…l Windows api to register windows event hook for low level keyboard events, which will be used to hide/show Remini using just keyboard shortcuts
- Loading branch information
1 parent
854a8d8
commit 48020ea
Showing
4 changed files
with
60 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
#ifndef IWINDOWAPI_H | ||
#define IWINDOWAPI_H | ||
|
||
|
||
class IWindowApi{ | ||
public: | ||
using HHOOK = void*; | ||
using HOOKPROC = long long (*)(int, unsigned long, long); | ||
using HINSTANCE = void*; | ||
using DWORD = unsigned long; | ||
|
||
public: | ||
IWindowApi(){}; | ||
virtual ~IWindowApi()=default; | ||
virtual void SetWindowsHookExInvoke(int idHook, | ||
HOOKPROC lpfn, | ||
HINSTANCE hmod, | ||
DWORD dwThreadId)=0; | ||
|
||
}; | ||
|
||
#endif // IWINDOWAPI_H |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
#include "windowapi.h" | ||
|
||
WindowApi::WindowApi() | ||
{ | ||
|
||
} | ||
|
||
WindowApi::~WindowApi() | ||
{ | ||
|
||
} | ||
|
||
void WindowApi::SetWindowsHookExInvoke(int idHook, HOOKPROC lpfn, HINSTANCE hmod, DWORD dwThreadId) | ||
{ | ||
// keyboardEventHook= SetWindowsHookEx(idHook, lpfn, hmod, dwThreadId); | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
#ifndef WINDOWAPI_H | ||
#define WINDOWAPI_H | ||
|
||
#include "iwindowapi.h" | ||
#include "Windows.h" | ||
|
||
class WindowApi : public IWindowApi | ||
{ | ||
public: | ||
WindowApi(); | ||
~WindowApi(); | ||
|
||
// IWindowApi interface | ||
public: | ||
void SetWindowsHookExInvoke(int idHook, HOOKPROC lpfn, HINSTANCE hmod, DWORD dwThreadId) override; | ||
}; | ||
|
||
#endif // WINDOWAPI_H |