You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
29 lines
610 B
29 lines
610 B
#ifndef COCOAMOUSETAP_H
|
|
#define COCOAMOUSETAP_H
|
|
#include <QThread>
|
|
#include <QSemaphore>
|
|
|
|
#include "mousetap.h"
|
|
|
|
struct MouseEventTapData;
|
|
class QWidget;
|
|
class CocoaMouseTap : public MouseTap, public QThread
|
|
{
|
|
public:
|
|
CocoaMouseTap(QObject *parent = Q_NULLPTR);
|
|
virtual ~CocoaMouseTap();
|
|
|
|
void initMouseEventTap() override;
|
|
void quitMouseEventTap() override;
|
|
void enableMouseEventTap(QWidget* widget, bool enabled) override;
|
|
|
|
protected:
|
|
void run() override;
|
|
|
|
private:
|
|
MouseEventTapData *m_tapData = Q_NULLPTR;
|
|
QSemaphore m_runloopStartedSemaphore;
|
|
};
|
|
|
|
#endif // COCOAMOUSETAP_H
|