NDEVR
API Documentation
WinKeyBlocker.h
1#pragma once
2#ifdef _WIN32
3#define WIN32_LEAN_AND_MEAN
4#include <windows.h>
5
6#include <QObject>
7#include <QWidget>
8namespace NDEVR
9{
15 class NDEVR_WIDGETS_API WinKeyBlocker final : public QObject
16 {
17
18 public:
21 explicit WinKeyBlocker(QObject* parent = nullptr);
22 ~WinKeyBlocker() override;
26 bool start(QWidget* window);
28 void stop();
31 void setEnabled(bool enabled);
34 bool isEnabled() const;
37 HHOOK hook() const { return m_hook; }
40 HWND target() const { return m_target; }
41 private:
42 HHOOK m_hook = nullptr;
43 HWND m_target = nullptr;
44 bool m_enabled = true;
45 };
46}
47#endif
The primary namespace for the NDEVR SDK.