QWindowKit  1.5.1.0
Cross-platform window customization framework
Loading...
Searching...
No Matches
qwkglobal.h
1// Copyright (C) 2023-present Stdware Collections (https://www.github.com/stdware)
2// Copyright (C) 2021-2023 wangwenx190 (Yuhang Zhao)
3// SPDX-License-Identifier: Apache-2.0
4
5#ifndef QWKGLOBAL_H
6#define QWKGLOBAL_H
7
8#include <functional>
9
10#include <QtCore/QEvent>
11#include <QtGui/QtEvents>
12
13#ifndef QWK_CORE_EXPORT
14# ifdef QWK_CORE_STATIC
15# define QWK_CORE_EXPORT
16# else
17# ifdef QWK_CORE_LIBRARY
18# define QWK_CORE_EXPORT Q_DECL_EXPORT
19# else
20# define QWK_CORE_EXPORT Q_DECL_IMPORT
21# endif
22# endif
23#endif
24
25#if (QT_VERSION >= QT_VERSION_CHECK(6, 0, 0))
26using QT_NATIVE_EVENT_RESULT_TYPE = qintptr;
27using QT_ENTER_EVENT_TYPE = QEnterEvent;
28#else
29using QT_NATIVE_EVENT_RESULT_TYPE = long;
30using QT_ENTER_EVENT_TYPE = QEvent;
31#endif
32
33#ifndef QWINDOWKIT_CONFIG
34# define QWINDOWKIT_CONFIG(feature) ((1 / QWINDOWKIT_##feature) == 1)
35#endif
36
37#if defined(__GNUC__) || defined(__clang__)
38# define QWINDOWKIT_PRINTF_FORMAT(fmtpos, attrpos) \
39 __attribute__((__format__(__printf__, fmtpos, attrpos)))
40#else
41# define QWINDOWKIT_PRINTF_FORMAT(fmtpos, attrpos)
42#endif
43
44namespace QWK {
45
46 using ScreenRectCallback = std::function<QRect(const QSize &)>;
47
48}
49
50#endif // QWKGLOBAL_H
QWindowKit namespace.
Definition abstractwindowcontext.cpp:13