KWin
Loading...
Searching...
No Matches
Classes | Namespaces | Macros | Typedefs | Enumerations | Functions
kwin_wayland_test.h File Reference
#include "core/inputdevice.h"
#include "main.h"
#include "window.h"
#include <QSignalSpy>
#include <QTest>
#include <KWayland/Client/surface.h>
#include <optional>
#include "qwayland-cursor-shape-v1.h"
#include "qwayland-fake-input.h"
#include "qwayland-fractional-scale-v1.h"
#include "qwayland-idle-inhibit-unstable-v1.h"
#include "qwayland-input-method-unstable-v1.h"
#include "qwayland-kde-output-device-v2.h"
#include "qwayland-kde-output-management-v2.h"
#include "qwayland-kde-screen-edge-v1.h"
#include "qwayland-security-context-v1.h"
#include "qwayland-text-input-unstable-v3.h"
#include "qwayland-wlr-layer-shell-unstable-v1.h"
#include "qwayland-xdg-decoration-unstable-v1.h"
#include "qwayland-xdg-shell.h"
#include "qwayland-zkde-screencast-unstable-v1.h"

Go to the source code of this file.

Classes

class  KWin::WaylandTestApplication
 
class  KWin::Test::TextInputManagerV3
 
class  KWin::Test::TextInputV3
 
class  KWin::Test::LayerShellV1
 
class  KWin::Test::LayerSurfaceV1
 
class  KWin::Test::XdgShell
 
class  KWin::Test::XdgSurface
 
class  KWin::Test::XdgToplevel
 
class  KWin::Test::XdgPositioner
 
class  KWin::Test::XdgPopup
 
class  KWin::Test::XdgDecorationManagerV1
 
class  KWin::Test::XdgToplevelDecorationV1
 
class  KWin::Test::IdleInhibitManagerV1
 
class  KWin::Test::IdleInhibitorV1
 
class  KWin::Test::WaylandOutputConfigurationV2
 
class  KWin::Test::WaylandOutputManagementV2
 
class  KWin::Test::WaylandOutputDeviceV2Mode
 
class  KWin::Test::WaylandOutputDeviceV2
 
class  KWin::Test::MockInputMethod
 
class  KWin::Test::FractionalScaleManagerV1
 
class  KWin::Test::FractionalScaleV1
 
class  KWin::Test::ScreenEdgeManagerV1
 
class  KWin::Test::AutoHideScreenEdgeV1
 
class  KWin::Test::CursorShapeManagerV1
 
class  KWin::Test::CursorShapeDeviceV1
 
class  KWin::Test::FakeInput
 
class  KWin::Test::SecurityContextManagerV1
 
class  KWin::Test::VirtualInputDevice
 
struct  KWin::Test::XcbConnectionDeleter
 
class  KWin::Test::ScreencastingStreamV1
 
class  KWin::Test::ScreencastingV1
 
struct  KWin::Test::OutputInfo
 

Namespaces

namespace  KWayland
 
namespace  KWayland::Client
 
namespace  QtWayland
 
namespace  KWin
 
namespace  KWin::Xwl
 
namespace  KWin::Test
 

Macros

#define WAYLANDTEST_MAIN(TestObject)
 

Typedefs

typedef std::unique_ptr< xcb_connection_t, XcbConnectionDeleterKWin::Test::XcbConnectionPtr
 

Enumerations

enum class  KWin::Test::AdditionalWaylandInterface {
  KWin::Test::Seat = 1 << 0 , KWin::Test::PlasmaShell = 1 << 2 , KWin::Test::WindowManagement = 1 << 3 , KWin::Test::PointerConstraints = 1 << 4 ,
  KWin::Test::IdleInhibitV1 = 1 << 5 , KWin::Test::AppMenu = 1 << 6 , KWin::Test::ShadowManager = 1 << 7 , KWin::Test::XdgDecorationV1 = 1 << 8 ,
  KWin::Test::OutputManagementV2 = 1 << 9 , KWin::Test::TextInputManagerV2 = 1 << 10 , KWin::Test::InputMethodV1 = 1 << 11 , KWin::Test::LayerShellV1 = 1 << 12 ,
  KWin::Test::TextInputManagerV3 = 1 << 13 , KWin::Test::OutputDeviceV2 = 1 << 14 , KWin::Test::FractionalScaleManagerV1 = 1 << 15 , KWin::Test::ScreencastingV1 = 1 << 16 ,
  KWin::Test::ScreenEdgeV1 = 1 << 17 , KWin::Test::CursorShapeV1 = 1 << 18 , KWin::Test::FakeInput = 1 << 19 , KWin::Test::SecurityContextManagerV1 = 1 << 20
}
 
enum class  KWin::Test::CreationSetup { KWin::Test::CreateOnly , KWin::Test::CreateAndConfigure }
 

Functions

void KWin::Test::keyboardKeyPressed (quint32 key, quint32 time)
 
void KWin::Test::keyboardKeyReleased (quint32 key, quint32 time)
 
void KWin::Test::pointerAxisHorizontal (qreal delta, quint32 time, qint32 discreteDelta=0, InputRedirection::PointerAxisSource source=InputRedirection::PointerAxisSourceUnknown)
 
void KWin::Test::pointerAxisVertical (qreal delta, quint32 time, qint32 discreteDelta=0, InputRedirection::PointerAxisSource source=InputRedirection::PointerAxisSourceUnknown)
 
void KWin::Test::pointerButtonPressed (quint32 button, quint32 time)
 
void KWin::Test::pointerButtonReleased (quint32 button, quint32 time)
 
void KWin::Test::pointerMotion (const QPointF &position, quint32 time)
 
void KWin::Test::pointerMotionRelative (const QPointF &delta, quint32 time)
 
void KWin::Test::touchCancel ()
 
void KWin::Test::touchDown (qint32 id, const QPointF &pos, quint32 time)
 
void KWin::Test::touchMotion (qint32 id, const QPointF &pos, quint32 time)
 
void KWin::Test::touchUp (qint32 id, quint32 time)
 
bool KWin::Test::setupWaylandConnection (AdditionalWaylandInterfaces flags=AdditionalWaylandInterfaces())
 
void KWin::Test::destroyWaylandConnection ()
 
KWayland::Client::ConnectionThread * KWin::Test::waylandConnection ()
 
KWayland::Client::Compositor * KWin::Test::waylandCompositor ()
 
KWayland::Client::SubCompositor * KWin::Test::waylandSubCompositor ()
 
KWayland::Client::ShadowManager * KWin::Test::waylandShadowManager ()
 
KWayland::Client::ShmPool * KWin::Test::waylandShmPool ()
 
KWayland::Client::Seat * KWin::Test::waylandSeat ()
 
KWayland::Client::PlasmaShell * KWin::Test::waylandPlasmaShell ()
 
KWayland::Client::PlasmaWindowManagement * KWin::Test::waylandWindowManagement ()
 
KWayland::Client::PointerConstraints * KWin::Test::waylandPointerConstraints ()
 
KWayland::Client::AppMenuManager * KWin::Test::waylandAppMenuManager ()
 
WaylandOutputManagementV2KWin::Test::waylandOutputManagementV2 ()
 
KWayland::Client::TextInputManager * KWin::Test::waylandTextInputManager ()
 
QList< KWayland::Client::Output * > KWin::Test::waylandOutputs ()
 
KWayland::Client::Output * KWin::Test::waylandOutput (const QString &name)
 
ScreencastingV1KWin::Test::screencasting ()
 
QList< WaylandOutputDeviceV2 * > KWin::Test::waylandOutputDevicesV2 ()
 
FakeInputKWin::Test::waylandFakeInput ()
 
SecurityContextManagerV1KWin::Test::waylandSecurityContextManagerV1 ()
 
bool KWin::Test::waitForWaylandSurface (Window *window)
 
bool KWin::Test::waitForWaylandPointer ()
 
bool KWin::Test::waitForWaylandTouch ()
 
bool KWin::Test::waitForWaylandKeyboard ()
 
void KWin::Test::flushWaylandConnection ()
 
bool KWin::Test::waylandSync ()
 
std::unique_ptr< KWayland::Client::Surface > KWin::Test::createSurface ()
 
KWayland::Client::SubSurface * KWin::Test::createSubSurface (KWayland::Client::Surface *surface, KWayland::Client::Surface *parentSurface, QObject *parent=nullptr)
 
LayerSurfaceV1KWin::Test::createLayerSurfaceV1 (KWayland::Client::Surface *surface, const QString &scope, KWayland::Client::Output *output=nullptr, LayerShellV1::layer layer=LayerShellV1::layer_top)
 
TextInputManagerV3KWin::Test::waylandTextInputManagerV3 ()
 
QtWayland::zwp_input_panel_surface_v1 * KWin::Test::createInputPanelSurfaceV1 (KWayland::Client::Surface *surface, KWayland::Client::Output *output, MockInputMethod::Mode mode)
 
FractionalScaleV1KWin::Test::createFractionalScaleV1 (KWayland::Client::Surface *surface)
 
XdgToplevelKWin::Test::createXdgToplevelSurface (KWayland::Client::Surface *surface, QObject *parent=nullptr)
 
XdgToplevelKWin::Test::createXdgToplevelSurface (KWayland::Client::Surface *surface, CreationSetup configureMode, QObject *parent=nullptr)
 
XdgPositionerKWin::Test::createXdgPositioner ()
 
XdgPopupKWin::Test::createXdgPopupSurface (KWayland::Client::Surface *surface, XdgSurface *parentSurface, XdgPositioner *positioner, CreationSetup configureMode=CreationSetup::CreateAndConfigure, QObject *parent=nullptr)
 
XdgToplevelDecorationV1KWin::Test::createXdgToplevelDecorationV1 (XdgToplevel *toplevel, QObject *parent=nullptr)
 
IdleInhibitorV1KWin::Test::createIdleInhibitorV1 (KWayland::Client::Surface *surface)
 
AutoHideScreenEdgeV1KWin::Test::createAutoHideScreenEdgeV1 (KWayland::Client::Surface *surface, uint32_t border)
 
CursorShapeDeviceV1KWin::Test::createCursorShapeDeviceV1 (KWayland::Client::Pointer *pointer)
 
void KWin::Test::render (KWayland::Client::Surface *surface, const QSize &size, const QColor &color, const QImage::Format &format=QImage::Format_ARGB32_Premultiplied)
 
void KWin::Test::render (KWayland::Client::Surface *surface, const QImage &img)
 
WindowKWin::Test::waitForWaylandWindowShown (int timeout=5000)
 
WindowKWin::Test::renderAndWaitForShown (KWayland::Client::Surface *surface, const QSize &size, const QColor &color, const QImage::Format &format=QImage::Format_ARGB32, int timeout=5000)
 
WindowKWin::Test::renderAndWaitForShown (KWayland::Client::Surface *surface, const QImage &img, int timeout=5000)
 
bool KWin::Test::waitForWindowClosed (Window *window)
 
bool KWin::Test::lockScreen ()
 
bool KWin::Test::unlockScreen ()
 
bool KWin::Test::renderNodeAvailable ()
 
XcbConnectionPtr KWin::Test::createX11Connection ()
 
MockInputMethodKWin::Test::inputMethod ()
 
KWayland::Client::Surface * KWin::Test::inputPanelSurface ()
 
void KWin::Test::setOutputConfig (const QList< QRect > &geometries)
 
void KWin::Test::setOutputConfig (const QList< OutputInfo > &infos)
 

Macro Definition Documentation

◆ WAYLANDTEST_MAIN

#define WAYLANDTEST_MAIN ( TestObject)
Value:
int main(int argc, char *argv[]) \
{ \
setenv("QT_QPA_PLATFORM", "wayland-org.kde.kwin.qpa", true); \
setenv("QT_QPA_PLATFORM_PLUGIN_PATH", QFileInfo(QString::fromLocal8Bit(argv[0])).absolutePath().toLocal8Bit().constData(), true); \
setenv("KWIN_FORCE_OWN_QPA", "1", true); \
qunsetenv("KDE_FULL_SESSION"); \
qunsetenv("KDE_SESSION_VERSION"); \
qunsetenv("XDG_SESSION_DESKTOP"); \
qunsetenv("XDG_CURRENT_DESKTOP"); \
app.setAttribute(Qt::AA_Use96Dpi, true); \
TestObject tc; \
return QTest::qExec(&tc, argc, argv); \
}
@ OperationModeXwayland
KWin uses Wayland and controls a nested Xwayland server.
Definition main.h:95

Definition at line 869 of file kwin_wayland_test.h.