Changeset View
Changeset View
Standalone View
Standalone View
autotests/integration/kwin_wayland_test.h
Show First 20 Lines • Show All 131 Lines • ▼ Show 20 Line(s) | |||||
132 | 132 | | |||
133 | KWayland::Client::Surface *createSurface(QObject *parent = nullptr); | 133 | KWayland::Client::Surface *createSurface(QObject *parent = nullptr); | ||
134 | enum class ShellSurfaceType { | 134 | enum class ShellSurfaceType { | ||
135 | WlShell, | 135 | WlShell, | ||
136 | XdgShellV5, | 136 | XdgShellV5, | ||
137 | XdgShellV6, | 137 | XdgShellV6, | ||
138 | XdgShellStable | 138 | XdgShellStable | ||
139 | }; | 139 | }; | ||
140 | | ||||
141 | enum class CreationSetup { | ||||
142 | CreateOnly, | ||||
143 | CreateAndConfigure, /// commit and wait for the configure event, making this surface ready to commit buffers | ||||
144 | }; | ||||
145 | | ||||
146 | /** | ||||
147 | * Creates either a ShellSurface * or XdgShellSurface * as defined by @arg type | ||||
148 | * For XDG top levels this method will block for a configure event, make this surface ready to commit buffers | ||||
149 | */ | ||||
140 | QObject *createShellSurface(ShellSurfaceType type, KWayland::Client::Surface *surface, QObject *parent = nullptr); | 150 | QObject *createShellSurface(ShellSurfaceType type, KWayland::Client::Surface *surface, QObject *parent = nullptr); | ||
141 | KWayland::Client::ShellSurface *createShellSurface(KWayland::Client::Surface *surface, QObject *parent = nullptr); | 151 | | ||
142 | KWayland::Client::XdgShellSurface *createXdgShellV5Surface(KWayland::Client::Surface *surface, QObject *parent = nullptr); | 152 | KWayland::Client::ShellSurface *createShellSurface(KWayland::Client::Surface *surface, | ||
143 | KWayland::Client::XdgShellSurface *createXdgShellV6Surface(KWayland::Client::Surface *surface, QObject *parent = nullptr); | 153 | QObject *parent = nullptr); | ||
144 | KWayland::Client::XdgShellSurface *createXdgShellStableSurface(KWayland::Client::Surface *surface, QObject *parent = nullptr); | 154 | KWayland::Client::XdgShellSurface *createXdgShellV5Surface(KWayland::Client::Surface *surface, | ||
145 | KWayland::Client::XdgShellPopup *createXdgShellStablePopup(KWayland::Client::Surface *surface, KWayland::Client::XdgShellSurface *parentSurface, const KWayland::Client::XdgPositioner &positioner, QObject *parent = nullptr); | 155 | QObject *parent = nullptr, | ||
156 | CreationSetup = CreationSetup::CreateAndConfigure); | ||||
157 | KWayland::Client::XdgShellSurface *createXdgShellV6Surface(KWayland::Client::Surface *surface, | ||||
158 | QObject *parent = nullptr, | ||||
159 | CreationSetup = CreationSetup::CreateAndConfigure); | ||||
160 | KWayland::Client::XdgShellSurface *createXdgShellStableSurface(KWayland::Client::Surface *surface, | ||||
161 | QObject *parent = nullptr, | ||||
162 | CreationSetup = CreationSetup::CreateAndConfigure); | ||||
163 | KWayland::Client::XdgShellPopup *createXdgShellStablePopup(KWayland::Client::Surface *surface, | ||||
164 | KWayland::Client::XdgShellSurface *parentSurface, | ||||
165 | const KWayland::Client::XdgPositioner &positioner, | ||||
166 | QObject *parent = nullptr, | ||||
167 | CreationSetup = CreationSetup::CreateAndConfigure); | ||||
168 | | ||||
169 | | ||||
170 | /** | ||||
171 | * Commits the XdgShellSurface to the given surface, and waits for the configure event from the compositor | ||||
172 | */ | ||||
173 | void initXdgShellSurface(KWayland::Client::Surface *surface, KWayland::Client::XdgShellSurface *shellSurface); | ||||
174 | void initXdgShellPopup(KWayland::Client::Surface *surface, KWayland::Client::XdgShellPopup *popup); | ||||
175 | | ||||
176 | | ||||
146 | 177 | | |||
147 | /** | 178 | /** | ||
148 | * Creates a shared memory buffer of @p size in @p color and attaches it to the @p surface. | 179 | * Creates a shared memory buffer of @p size in @p color and attaches it to the @p surface. | ||
149 | * The @p surface gets damaged and committed, thus it's rendered. | 180 | * The @p surface gets damaged and committed, thus it's rendered. | ||
150 | **/ | 181 | **/ | ||
151 | void render(KWayland::Client::Surface *surface, const QSize &size, const QColor &color, const QImage::Format &format = QImage::Format_ARGB32_Premultiplied); | 182 | void render(KWayland::Client::Surface *surface, const QSize &size, const QColor &color, const QImage::Format &format = QImage::Format_ARGB32_Premultiplied); | ||
152 | 183 | | |||
153 | /** | 184 | /** | ||
▲ Show 20 Lines • Show All 62 Lines • Show Last 20 Lines |