summaryrefslogtreecommitdiff
path: root/src/KeyboardDevice.h
blob: 1cdd6e10abb87568c2ea7a2e09550850fe00c693 (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
26
27
28
29
30
31
32
33
34
35
36
37
38
#ifndef __KEYBOARDDEVICE_H__
#define __KEYBOARDDEVICE_H__

#include<X11/Xlib.h>
#include<X11/extensions/XInput2.h>
#include<string>
#include<vector>
#include "DeviceError.h"
#include "logger.h"
#include "XConn.h"

using namespace std;

class Manager;
class PointerDevice;

class KeyboardDevice
{
    public:
        static int counter;

    private:
        int kbdID;
        XConn* x11;
        int id;
        string name;
        XDevice* dev;
        PointerDevice* paired;

    public:
        KeyboardDevice(XIDeviceInfo* device, XConn* x11, Manager* manager);
        int getID() { return id; }
        string getName() { return name; }
        void setPaired(PointerDevice* ptr) { paired = ptr; }
        PointerDevice* getPaired() { return paired; }
};

#endif