6#ifndef QWINDOWKIT_LINUX_H
7#define QWINDOWKIT_LINUX_H
18#include <QtCore/qglobal.h>
20#if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0)
21#include <qguiapplication_platform.h>
24using Atom =
unsigned long;
26using XID =
unsigned long;
30using XEvent =
union _XEvent;
38 LinuxX11API() =
default;
39 Q_DISABLE_COPY(LinuxX11API)
41 using XInternAtomFn = Atom (*)(Display *,
const char *, Bool);
42 using XSendEventFn = int (*)(Display *, Window, Bool, long, XEvent *);
43 using XFlushFn = int (*)(Display *);
44 using XUngrabPointerFn = int (*)(Display *,
unsigned long);
46 XInternAtomFn XInternAtom =
nullptr;
47 XSendEventFn XSendEvent =
nullptr;
48 XFlushFn XFlush =
nullptr;
49 XUngrabPointerFn XUngrabPointer =
nullptr;
51 inline bool isValid()
const {
52 return XInternAtom && XSendEvent && XFlush && XUngrabPointer;
56 struct LinuxWaylandAPI {
57 LinuxWaylandAPI() =
default;
58 Q_DISABLE_COPY(LinuxWaylandAPI)
60 using wl_display_flush_fn = int (*)(
struct wl_display *);
61 using wl_proxy_marshal_flags_fn = void (*)(
struct wl_proxy *, uint32_t,
62 const struct wl_interface *, uint32_t,
64 using wl_proxy_get_version_fn = int (*)(
struct wl_proxy *);
66 wl_display_flush_fn wl_display_flush =
nullptr;
67 wl_proxy_marshal_flags_fn wl_proxy_marshal_flags =
nullptr;
68 wl_proxy_get_version_fn wl_proxy_get_version =
nullptr;
70 inline bool isValid()
const {
71 return wl_display_flush && wl_proxy_marshal_flags && wl_proxy_get_version;
76 bool isWaylandPlatform();
80 const LinuxX11API &x11API();
82 const LinuxWaylandAPI &waylandAPI();
QWindowKit namespace.
Definition abstractwindowcontext.cpp:13