Changeset View
Changeset View
Standalone View
Standalone View
kcms/input/backends/x11/x11_libinput_backend.cpp
- This file was added.
1 | /* | ||||
---|---|---|---|---|---|
2 | * Copyright 2018 Roman Gilg <subdiff@gmail.com> | ||||
3 | * | ||||
4 | * This program is free software; you can redistribute it and/or modify | ||||
5 | * it under the terms of the GNU General Public License as published by | ||||
6 | * the Free Software Foundation; either version 2 of the License, or | ||||
7 | * (at your option) any later version. | ||||
8 | * | ||||
9 | * This program is distributed in the hope that it will be useful, | ||||
10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||||
11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||||
12 | * GNU General Public License for more details. | ||||
13 | * | ||||
14 | * You should have received a copy of the GNU General Public License | ||||
15 | * along with this program; if not, write to the Free Software | ||||
16 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. | ||||
17 | */ | ||||
18 | | ||||
19 | #include "x11_libinput_backend.h" | ||||
20 | #include "x11_libinput_dummydevice.h" | ||||
21 | | ||||
22 | X11LibinputBackend::X11LibinputBackend(QObject *parent) : | ||||
23 | X11Backend(parent) | ||||
24 | { | ||||
25 | m_mode = InputBackendMode::XLibinput; | ||||
26 | m_device = new X11LibinputDummyDevice(this, m_dpy); | ||||
27 | } | ||||
28 | | ||||
29 | bool X11LibinputBackend::applyConfig() | ||||
30 | { | ||||
31 | return static_cast<X11LibinputDummyDevice*>(m_device)->applyConfig(); | ||||
32 | } | ||||
33 | | ||||
34 | bool X11LibinputBackend::getConfig() | ||||
35 | { | ||||
36 | return static_cast<X11LibinputDummyDevice*>(m_device)->getConfig(); | ||||
37 | } | ||||
38 | | ||||
39 | bool X11LibinputBackend::getDefaultConfig() | ||||
40 | { | ||||
41 | return static_cast<X11LibinputDummyDevice*>(m_device)->getDefaultConfig(); | ||||
42 | } | ||||
43 | | ||||
44 | bool X11LibinputBackend::isChangedConfig() const | ||||
45 | { | ||||
46 | return static_cast<X11LibinputDummyDevice*>(m_device)->isChangedConfig(); | ||||
47 | } | ||||
48 | | ||||
49 | void X11LibinputBackend::kcmInit() | ||||
50 | { | ||||
51 | getConfig(); | ||||
52 | applyConfig(); | ||||
53 | X11Backend::kcmInit(); | ||||
54 | } |