From c70a286d01728bd2fa01103191c9da23ad3f8be2 Mon Sep 17 00:00:00 2001 From: Sine Striker <trueful@163.com> Date: 周五, 23 2月 2024 22:03:56 +0800 Subject: [PATCH] Delay filtering the native events --- src/core/qwkglobal.h | 28 +++++++++++++++++++++++++++- 1 files changed, 27 insertions(+), 1 deletions(-) diff --git a/src/core/qwkglobal.h b/src/core/qwkglobal.h index f5e0fb3..ded26b5 100644 --- a/src/core/qwkglobal.h +++ b/src/core/qwkglobal.h @@ -1,10 +1,26 @@ +// Copyright (C) 2023-2024 Stdware Collections (https://www.github.com/stdware) +// Copyright (C) 2021-2023 wangwenx190 (Yuhang Zhao) +// SPDX-License-Identifier: Apache-2.0 + #ifndef QWKGLOBAL_H #define QWKGLOBAL_H + +#include <functional> #include <QtCore/QEvent> #include <QtGui/QtEvents> -#include <QWKCore/qwkcoreglobal.h> +#ifndef QWK_CORE_EXPORT +# ifdef QWK_CORE_STATIC +# define QWK_CORE_EXPORT +# else +# ifdef QWK_CORE_LIBRARY +# define QWK_CORE_EXPORT Q_DECL_EXPORT +# else +# define QWK_CORE_EXPORT Q_DECL_IMPORT +# endif +# endif +#endif #if (QT_VERSION >= QT_VERSION_CHECK(6, 0, 0)) using QT_NATIVE_EVENT_RESULT_TYPE = qintptr; @@ -14,4 +30,14 @@ using QT_ENTER_EVENT_TYPE = QEvent; #endif +#ifndef QWINDOWKIT_CONFIG +# define QWINDOWKIT_CONFIG(feature) ((1 / QWINDOWKIT_##feature) == 1) +#endif + +namespace QWK { + + using ScreenRectCallback = std::function<QRect(const QSize &)>; + +} + #endif // QWKGLOBAL_H -- Gitblit v1.9.1