Changeset View
Changeset View
Standalone View
Standalone View
autotests/integration/kwin_wayland_test.h
Show All 36 Lines | |||||
37 | class Compositor; | 37 | class Compositor; | ||
38 | class IdleInhibitManager; | 38 | class IdleInhibitManager; | ||
39 | class PlasmaShell; | 39 | class PlasmaShell; | ||
40 | class PlasmaWindowManagement; | 40 | class PlasmaWindowManagement; | ||
41 | class PointerConstraints; | 41 | class PointerConstraints; | ||
42 | class Seat; | 42 | class Seat; | ||
43 | class ServerSideDecorationManager; | 43 | class ServerSideDecorationManager; | ||
44 | class ShadowManager; | 44 | class ShadowManager; | ||
45 | class Shell; | | |||
46 | class ShellSurface; | | |||
47 | class ShmPool; | 45 | class ShmPool; | ||
48 | class SubCompositor; | 46 | class SubCompositor; | ||
49 | class SubSurface; | 47 | class SubSurface; | ||
50 | class Surface; | 48 | class Surface; | ||
51 | class XdgDecorationManager; | 49 | class XdgDecorationManager; | ||
52 | } | 50 | } | ||
53 | } | 51 | } | ||
54 | 52 | | |||
▲ Show 20 Lines • Show All 56 Lines • ▼ Show 20 Line(s) | |||||
111 | * @see setupWaylandConnection | 109 | * @see setupWaylandConnection | ||
112 | */ | 110 | */ | ||
113 | void destroyWaylandConnection(); | 111 | void destroyWaylandConnection(); | ||
114 | 112 | | |||
115 | KWayland::Client::ConnectionThread *waylandConnection(); | 113 | KWayland::Client::ConnectionThread *waylandConnection(); | ||
116 | KWayland::Client::Compositor *waylandCompositor(); | 114 | KWayland::Client::Compositor *waylandCompositor(); | ||
117 | KWayland::Client::SubCompositor *waylandSubCompositor(); | 115 | KWayland::Client::SubCompositor *waylandSubCompositor(); | ||
118 | KWayland::Client::ShadowManager *waylandShadowManager(); | 116 | KWayland::Client::ShadowManager *waylandShadowManager(); | ||
119 | KWayland::Client::Shell *waylandShell(); | | |||
120 | KWayland::Client::ShmPool *waylandShmPool(); | 117 | KWayland::Client::ShmPool *waylandShmPool(); | ||
121 | KWayland::Client::Seat *waylandSeat(); | 118 | KWayland::Client::Seat *waylandSeat(); | ||
122 | KWayland::Client::ServerSideDecorationManager *waylandServerSideDecoration(); | 119 | KWayland::Client::ServerSideDecorationManager *waylandServerSideDecoration(); | ||
123 | KWayland::Client::PlasmaShell *waylandPlasmaShell(); | 120 | KWayland::Client::PlasmaShell *waylandPlasmaShell(); | ||
124 | KWayland::Client::PlasmaWindowManagement *waylandWindowManagement(); | 121 | KWayland::Client::PlasmaWindowManagement *waylandWindowManagement(); | ||
125 | KWayland::Client::PointerConstraints *waylandPointerConstraints(); | 122 | KWayland::Client::PointerConstraints *waylandPointerConstraints(); | ||
126 | KWayland::Client::IdleInhibitManager *waylandIdleInhibitManager(); | 123 | KWayland::Client::IdleInhibitManager *waylandIdleInhibitManager(); | ||
127 | KWayland::Client::AppMenuManager *waylandAppMenuManager(); | 124 | KWayland::Client::AppMenuManager *waylandAppMenuManager(); | ||
128 | KWayland::Client::XdgDecorationManager *xdgDecorationManager(); | 125 | KWayland::Client::XdgDecorationManager *xdgDecorationManager(); | ||
129 | 126 | | |||
130 | bool waitForWaylandPointer(); | 127 | bool waitForWaylandPointer(); | ||
131 | bool waitForWaylandTouch(); | 128 | bool waitForWaylandTouch(); | ||
132 | bool waitForWaylandKeyboard(); | 129 | bool waitForWaylandKeyboard(); | ||
133 | 130 | | |||
134 | void flushWaylandConnection(); | 131 | void flushWaylandConnection(); | ||
135 | 132 | | |||
136 | KWayland::Client::Surface *createSurface(QObject *parent = nullptr); | 133 | KWayland::Client::Surface *createSurface(QObject *parent = nullptr); | ||
137 | KWayland::Client::SubSurface *createSubSurface(KWayland::Client::Surface *surface, | 134 | KWayland::Client::SubSurface *createSubSurface(KWayland::Client::Surface *surface, | ||
138 | KWayland::Client::Surface *parentSurface, QObject *parent = nullptr); | 135 | KWayland::Client::Surface *parentSurface, QObject *parent = nullptr); | ||
139 | enum class ShellSurfaceType { | 136 | enum class XdgShellSurfaceType { | ||
140 | WlShell, | | |||
141 | XdgShellV5, | 137 | XdgShellV5, | ||
142 | XdgShellV6, | 138 | XdgShellV6, | ||
143 | XdgShellStable | 139 | XdgShellStable | ||
144 | }; | 140 | }; | ||
145 | 141 | | |||
146 | enum class CreationSetup { | 142 | enum class CreationSetup { | ||
147 | CreateOnly, | 143 | CreateOnly, | ||
148 | CreateAndConfigure, /// commit and wait for the configure event, making this surface ready to commit buffers | 144 | CreateAndConfigure, /// commit and wait for the configure event, making this surface ready to commit buffers | ||
149 | }; | 145 | }; | ||
150 | 146 | | |||
151 | /** | 147 | KWayland::Client::XdgShellSurface *createXdgShellSurface(XdgShellSurfaceType type, | ||
152 | * Creates either a ShellSurface * or XdgShellSurface * as defined by @arg type | | |||
153 | * For XDG top levels this method will block for a configure event, make this surface ready to commit buffers | | |||
154 | */ | | |||
155 | QObject *createShellSurface(ShellSurfaceType type, KWayland::Client::Surface *surface, QObject *parent = nullptr); | | |||
156 | | ||||
157 | KWayland::Client::XdgShellSurface *createXdgShellSurface(ShellSurfaceType type, | | |||
158 | KWayland::Client::Surface *surface, | 148 | KWayland::Client::Surface *surface, | ||
159 | QObject *parent = nullptr, | 149 | QObject *parent = nullptr, | ||
160 | CreationSetup creationSetup = CreationSetup::CreateAndConfigure); | 150 | CreationSetup creationSetup = CreationSetup::CreateAndConfigure); | ||
161 | 151 | | |||
162 | KWayland::Client::ShellSurface *createShellSurface(KWayland::Client::Surface *surface, | | |||
163 | QObject *parent = nullptr); | | |||
164 | KWayland::Client::XdgShellSurface *createXdgShellV5Surface(KWayland::Client::Surface *surface, | 152 | KWayland::Client::XdgShellSurface *createXdgShellV5Surface(KWayland::Client::Surface *surface, | ||
165 | QObject *parent = nullptr, | 153 | QObject *parent = nullptr, | ||
166 | CreationSetup = CreationSetup::CreateAndConfigure); | 154 | CreationSetup = CreationSetup::CreateAndConfigure); | ||
167 | KWayland::Client::XdgShellSurface *createXdgShellV6Surface(KWayland::Client::Surface *surface, | 155 | KWayland::Client::XdgShellSurface *createXdgShellV6Surface(KWayland::Client::Surface *surface, | ||
168 | QObject *parent = nullptr, | 156 | QObject *parent = nullptr, | ||
169 | CreationSetup = CreationSetup::CreateAndConfigure); | 157 | CreationSetup = CreationSetup::CreateAndConfigure); | ||
170 | KWayland::Client::XdgShellSurface *createXdgShellStableSurface(KWayland::Client::Surface *surface, | 158 | KWayland::Client::XdgShellSurface *createXdgShellStableSurface(KWayland::Client::Surface *surface, | ||
171 | QObject *parent = nullptr, | 159 | QObject *parent = nullptr, | ||
▲ Show 20 Lines • Show All 51 Lines • ▼ Show 20 Line(s) | |||||
223 | * @returns @c true if the screen could be unlocked, @c false otherwise | 211 | * @returns @c true if the screen could be unlocked, @c false otherwise | ||
224 | */ | 212 | */ | ||
225 | bool unlockScreen(); | 213 | bool unlockScreen(); | ||
226 | } | 214 | } | ||
227 | 215 | | |||
228 | } | 216 | } | ||
229 | 217 | | |||
230 | Q_DECLARE_OPERATORS_FOR_FLAGS(KWin::Test::AdditionalWaylandInterfaces) | 218 | Q_DECLARE_OPERATORS_FOR_FLAGS(KWin::Test::AdditionalWaylandInterfaces) | ||
231 | Q_DECLARE_METATYPE(KWin::Test::ShellSurfaceType) | 219 | Q_DECLARE_METATYPE(KWin::Test::XdgShellSurfaceType) | ||
232 | 220 | | |||
233 | #define WAYLANDTEST_MAIN_HELPER(TestObject, DPI, OperationMode) \ | 221 | #define WAYLANDTEST_MAIN_HELPER(TestObject, DPI, OperationMode) \ | ||
234 | int main(int argc, char *argv[]) \ | 222 | int main(int argc, char *argv[]) \ | ||
235 | { \ | 223 | { \ | ||
236 | setenv("QT_QPA_PLATFORM", "wayland-org.kde.kwin.qpa", true); \ | 224 | setenv("QT_QPA_PLATFORM", "wayland-org.kde.kwin.qpa", true); \ | ||
237 | setenv("QT_QPA_PLATFORM_PLUGIN_PATH", QFileInfo(QString::fromLocal8Bit(argv[0])).absolutePath().toLocal8Bit().constData(), true); \ | 225 | setenv("QT_QPA_PLATFORM_PLUGIN_PATH", QFileInfo(QString::fromLocal8Bit(argv[0])).absolutePath().toLocal8Bit().constData(), true); \ | ||
238 | setenv("KWIN_FORCE_OWN_QPA", "1", true); \ | 226 | setenv("KWIN_FORCE_OWN_QPA", "1", true); \ | ||
239 | qunsetenv("KDE_FULL_SESSION"); \ | 227 | qunsetenv("KDE_FULL_SESSION"); \ | ||
Show All 17 Lines |