Changeset View
Changeset View
Standalone View
Standalone View
tests/libinputtest.cpp
Show First 20 Lines • Show All 69 Lines • ▼ Show 20 Line(s) | 69 | QObject::connect(conn, &Connection::pointerButtonChanged, | |||
---|---|---|---|---|---|
70 | [](uint32_t button, KWin::InputRedirection::PointerButtonState state) { | 70 | [](uint32_t button, KWin::InputRedirection::PointerButtonState state) { | ||
71 | std::cout << "Got pointer button event" << std::endl; | 71 | std::cout << "Got pointer button event" << std::endl; | ||
72 | if (button == BTN_MIDDLE && state == KWin::InputRedirection::PointerButtonReleased) { | 72 | if (button == BTN_MIDDLE && state == KWin::InputRedirection::PointerButtonReleased) { | ||
73 | QCoreApplication::instance()->quit(); | 73 | QCoreApplication::instance()->quit(); | ||
74 | } | 74 | } | ||
75 | } | 75 | } | ||
76 | ); | 76 | ); | ||
77 | QObject::connect(conn, &Connection::pointerMotion, | 77 | QObject::connect(conn, &Connection::pointerMotion, | ||
78 | [](QPointF delta) { | 78 | [](const QSizeF &delta) { | ||
79 | std::cout << "Got pointer motion: " << delta.x() << "/" << delta.y() << std::endl; | 79 | std::cout << "Got pointer motion: " << delta.width() << "/" << delta.height() << std::endl; | ||
80 | } | 80 | } | ||
81 | ); | 81 | ); | ||
82 | QObject::connect(conn, &Connection::pointerAxisChanged, | 82 | QObject::connect(conn, &Connection::pointerAxisChanged, | ||
83 | [](KWin::InputRedirection::PointerAxis axis, qreal delta) { | 83 | [](KWin::InputRedirection::PointerAxis axis, qreal delta) { | ||
84 | std::cout << "Axis: " << axis << " with delta" << delta << std::endl; | 84 | std::cout << "Axis: " << axis << " with delta" << delta << std::endl; | ||
85 | } | 85 | } | ||
86 | ); | 86 | ); | ||
87 | QObject::connect(conn, &Connection::touchDown, | 87 | QObject::connect(conn, &Connection::touchDown, | ||
Show All 30 Lines |