Changeset View
Changeset View
Standalone View
Standalone View
autotests/integration/kwin_wayland_test.h
Show First 20 Lines • Show All 52 Lines • ▼ Show 20 Line(s) | |||||
53 | namespace KWin | 53 | namespace KWin | ||
54 | { | 54 | { | ||
55 | namespace Xwl | 55 | namespace Xwl | ||
56 | { | 56 | { | ||
57 | class Xwayland; | 57 | class Xwayland; | ||
58 | } | 58 | } | ||
59 | 59 | | |||
60 | class AbstractClient; | 60 | class AbstractClient; | ||
61 | class XdgShellClient; | | |||
62 | 61 | | |||
63 | class WaylandTestApplication : public ApplicationWaylandAbstract | 62 | class WaylandTestApplication : public ApplicationWaylandAbstract | ||
64 | { | 63 | { | ||
65 | Q_OBJECT | 64 | Q_OBJECT | ||
66 | public: | 65 | public: | ||
67 | WaylandTestApplication(OperationMode mode, int &argc, char **argv); | 66 | WaylandTestApplication(OperationMode mode, int &argc, char **argv); | ||
68 | ~WaylandTestApplication() override; | 67 | ~WaylandTestApplication() override; | ||
69 | 68 | | |||
▲ Show 20 Lines • Show All 106 Lines • ▼ Show 20 Line(s) | |||||
176 | void render(KWayland::Client::Surface *surface, const QSize &size, const QColor &color, const QImage::Format &format = QImage::Format_ARGB32_Premultiplied); | 175 | void render(KWayland::Client::Surface *surface, const QSize &size, const QColor &color, const QImage::Format &format = QImage::Format_ARGB32_Premultiplied); | ||
177 | 176 | | |||
178 | /** | 177 | /** | ||
179 | * Creates a shared memory buffer using the supplied image @p img and attaches it to the @p surface | 178 | * Creates a shared memory buffer using the supplied image @p img and attaches it to the @p surface | ||
180 | */ | 179 | */ | ||
181 | void render(KWayland::Client::Surface *surface, const QImage &img); | 180 | void render(KWayland::Client::Surface *surface, const QImage &img); | ||
182 | 181 | | |||
183 | /** | 182 | /** | ||
184 | * Waits till a new XdgShellClient is shown and returns the created XdgShellClient. | 183 | * Waits till a new AbstractClient is shown and returns the created AbstractClient. | ||
185 | * If no XdgShellClient gets shown during @p timeout @c null is returned. | 184 | * If no AbstractClient gets shown during @p timeout @c null is returned. | ||
186 | */ | 185 | */ | ||
187 | XdgShellClient *waitForWaylandWindowShown(int timeout = 5000); | 186 | AbstractClient *waitForWaylandWindowShown(int timeout = 5000); | ||
188 | 187 | | |||
189 | /** | 188 | /** | ||
190 | * Combination of @link{render} and @link{waitForWaylandWindowShown}. | 189 | * Combination of @link{render} and @link{waitForWaylandWindowShown}. | ||
191 | */ | 190 | */ | ||
192 | XdgShellClient *renderAndWaitForShown(KWayland::Client::Surface *surface, const QSize &size, const QColor &color, const QImage::Format &format = QImage::Format_ARGB32, int timeout = 5000); | 191 | AbstractClient *renderAndWaitForShown(KWayland::Client::Surface *surface, const QSize &size, const QColor &color, const QImage::Format &format = QImage::Format_ARGB32, int timeout = 5000); | ||
193 | 192 | | |||
194 | /** | 193 | /** | ||
195 | * Waits for the @p client to be destroyed. | 194 | * Waits for the @p client to be destroyed. | ||
196 | */ | 195 | */ | ||
197 | bool waitForWindowDestroyed(AbstractClient *client); | 196 | bool waitForWindowDestroyed(AbstractClient *client); | ||
198 | 197 | | |||
199 | /** | 198 | /** | ||
200 | * Locks the screen and waits till the screen is locked. | 199 | * Locks the screen and waits till the screen is locked. | ||
Show All 40 Lines |