summaryrefslogtreecommitdiff
path: root/src/devices/TouchDevice.hpp
blob: 51eb76d47bfb2640700947a902da65b8bf41ecf3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
#pragma once

#include "ITouch.hpp"

class CTouchDevice : public ITouch {
  public:
    static SP<CTouchDevice> create(wlr_touch* touch);

    virtual bool            isVirtual();
    virtual wlr_touch*      wlr();

  private:
    CTouchDevice(wlr_touch* touch);

    wlr_touch* touch = nullptr;

    void       disconnectCallbacks();

    DYNLISTENER(destroy);
    DYNLISTENER(down);
    DYNLISTENER(up);
    DYNLISTENER(motion);
    DYNLISTENER(cancel);
    DYNLISTENER(frame);
};