KWindowSystem

types.h
1/*
2 SPDX-FileCopyrightText: 2024 Nicolas Fella <nicolas.fella@gmx.de>
3
4 SPDX-License-Identifier: LGPL-2.1-or-later
5*/
6
7#ifndef KWINDOWSYSTEM_QML_TYPES_H
8#define KWINDOWSYSTEM_QML_TYPES_H
9
10#include <QQmlEngine>
11
12#include <KWindowSystem>
13
14#include <config-kwindowsystem.h>
15#if KWINDOWSYSTEM_HAVE_X11
16#include <KX11Extras>
17#endif
18
19struct KWindowSystemForeign {
20 Q_GADGET
21 QML_NAMED_ELEMENT(KWindowSystem)
22 QML_SINGLETON
23 QML_FOREIGN(KWindowSystem)
24
25public:
26 static KWindowSystem *create(QQmlEngine *, QJSEngine *)
27 {
29 return KWindowSystem::self();
30 }
31};
32
33#if KWINDOWSYSTEM_HAVE_X11
34struct KX11ExtrasForeign {
35 Q_GADGET
36 QML_NAMED_ELEMENT(KX11Extras)
37 QML_SINGLETON
38 QML_FOREIGN(KX11Extras)
39
40public:
41 static KX11Extras *create(QQmlEngine *, QJSEngine *)
42 {
44 return KX11Extras::self();
45 }
46};
47#endif
48
49#endif
Convenience access to certain properties and features of window systems.
static KWindowSystem * self()
Access to the singleton instance.
A collection of functions to obtain information from and manipulate X11 windows.
Definition kx11extras.h:29
void setObjectOwnership(QObject *object, ObjectOwnership ownership)
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Sat Dec 21 2024 17:06:21 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.