Changeset View
Changeset View
Standalone View
Standalone View
autotests/integration/kwin_wayland_test.h
Show First 20 Lines • Show All 118 Lines • ▼ Show 20 Line(s) | |||||
119 | enum class ShellSurfaceType { | 119 | enum class ShellSurfaceType { | ||
120 | WlShell, | 120 | WlShell, | ||
121 | XdgShellV5 | 121 | XdgShellV5 | ||
122 | }; | 122 | }; | ||
123 | QObject *createShellSurface(ShellSurfaceType type, KWayland::Client::Surface *surface, QObject *parent = nullptr); | 123 | QObject *createShellSurface(ShellSurfaceType type, KWayland::Client::Surface *surface, QObject *parent = nullptr); | ||
124 | KWayland::Client::ShellSurface *createShellSurface(KWayland::Client::Surface *surface, QObject *parent = nullptr); | 124 | KWayland::Client::ShellSurface *createShellSurface(KWayland::Client::Surface *surface, QObject *parent = nullptr); | ||
125 | KWayland::Client::XdgShellSurface *createXdgShellV5Surface(KWayland::Client::Surface *surface, QObject *parent = nullptr); | 125 | KWayland::Client::XdgShellSurface *createXdgShellV5Surface(KWayland::Client::Surface *surface, QObject *parent = nullptr); | ||
126 | 126 | | |||
127 | | ||||
127 | /** | 128 | /** | ||
128 | * Creates a shared memory buffer of @p size in @p color and attaches it to the @p surface. | 129 | * Creates a shared memory buffer of @p size in @p color and attaches it to the @p surface. | ||
129 | * The @p surface gets damaged and committed, thus it's rendered. | 130 | * The @p surface gets damaged and committed, thus it's rendered. | ||
130 | **/ | 131 | **/ | ||
131 | void render(KWayland::Client::Surface *surface, const QSize &size, const QColor &color, const QImage::Format &format = QImage::Format_ARGB32); | 132 | void render(KWayland::Client::Surface *surface, const QSize &size, const QColor &color, const QImage::Format &format = QImage::Format_ARGB32); | ||
132 | 133 | | |||
133 | /** | 134 | /** | ||
135 | * Creates a shared memory buffer using the supplied image @p img and attaches it to the @p surface | ||||
136 | */ | ||||
137 | void render(KWayland::Client::Surface *surface, const QImage &img); | ||||
138 | | ||||
139 | /** | ||||
134 | * Waits till a new ShellClient is shown and returns the created ShellClient. | 140 | * Waits till a new ShellClient is shown and returns the created ShellClient. | ||
135 | * If no ShellClient gets shown during @p timeout @c null is returned. | 141 | * If no ShellClient gets shown during @p timeout @c null is returned. | ||
136 | **/ | 142 | **/ | ||
137 | ShellClient *waitForWaylandWindowShown(int timeout = 5000); | 143 | ShellClient *waitForWaylandWindowShown(int timeout = 5000); | ||
138 | 144 | | |||
139 | /** | 145 | /** | ||
140 | * Combination of @link{render} and @link{waitForWaylandWindowShown}. | 146 | * Combination of @link{render} and @link{waitForWaylandWindowShown}. | ||
141 | **/ | 147 | **/ | ||
▲ Show 20 Lines • Show All 41 Lines • Show Last 20 Lines |