Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
Loading...
Searching...
No Matches
qohoswindowutils_p.h
Go to the documentation of this file.
1// Copyright (C) 2026 The Qt Company Ltd.
2// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
3
4#ifndef QOHOSWINDOWUTILS_P_H
5#define QOHOSWINDOWUTILS_P_H
6
7//
8// W A R N I N G
9// -------------
10//
11// This file is not part of the Qt API. It exists purely as an
12// implementation detail. This header file may change from version to
13// version without notice, or even be removed.
14//
15// We mean it.
16//
17
18#include <QtGui/qcolor.h>
19#include <QtGui/qscreen.h>
20#include <QtGui/qwindow.h>
21#include <QtOhosAppKit/private/qtohosappkitglobal_p.h>
22#include <QtWidgets/qwidget.h>
23#include <optional>
24
25QT_BEGIN_NAMESPACE
26
27namespace QtOhosAppKit {
28
29namespace Window {
30
31Q_NAMESPACE
32
39Q_ENUM_NS(WindowGeometryPersistenceHint)
40
41Q_OHOSAPPKIT_EXPORT void setShowWindowAsFloatWindowHint(QWindow *window, bool showAsFloatWindow);
42Q_OHOSAPPKIT_EXPORT void setShowWindowAsFloatWindowHint(QWidget *widget, bool showAsFloatWindow);
43
44Q_OHOSAPPKIT_EXPORT void setWindowPrivacyMode(QWindow *window, bool privacyModeEnabled);
45
46Q_OHOSAPPKIT_EXPORT void setSurfaceBackgroundColor(QWindow *window, const QColor &color);
47Q_OHOSAPPKIT_EXPORT void setSurfaceBackgroundColor(QWidget *widget, const QColor &color);
48
49Q_OHOSAPPKIT_EXPORT void setWindowCornerRadius(QWindow *window, double radius);
50Q_OHOSAPPKIT_EXPORT void setWindowCornerRadius(QWidget *widget, double radius);
51
52Q_OHOSAPPKIT_EXPORT void setWindowKeepScreenOn(QWindow *window, bool keepScreenOn);
53Q_OHOSAPPKIT_EXPORT void setWindowKeepScreenOn(QWidget *widget, bool keepScreenOn);
54
55Q_OHOSAPPKIT_EXPORT void setWindowDragResizable(QWindow *window, bool dragResizable);
56Q_OHOSAPPKIT_EXPORT void setWindowDragResizable(QWidget *widget, bool dragResizable);
57
59
60}
61
63
65
66}
67
68QT_END_NAMESPACE
69
70#endif // QOHOSWINDOWUTILS_P_H
Combined button and popup list for selecting options.
void setWindowKeepScreenOn(QWindow *window, bool keepScreenOn)
Sets or unsets a given window to keep the screen on according to keepScreenOn.
void setSurfaceBackgroundColor(QWindow *window, const QColor &color)
Sets a given color as the background color of the window inner native layer.
void setShowWindowAsFloatWindowHint(QWindow *window, bool showAsFloatWindow)
Sets or unsets a given window as a floating window according to showAsFloatWindow.
void setWindowPrivacyMode(QWindow *window, bool privacyModeEnabled)
Changes the privacy mode of window according to privacyModeEnabled.
void setWindowCornerRadius(QWindow *window, double radius)
Sets the corner radius of a window.
void setMainWindowGeometryPersistenceHint(WindowGeometryPersistenceHint hint)
Sets whether the application's main window restores its last geometry on startup according to hint.
void setWindowDragResizable(QWindow *window, bool dragResizable)
Enables or disables resizing of window by dragging its edges according to dragResizable.
std::optional< double > tryGetNativeWindowId(QWindow *window)
std::optional< double > tryGetScreenDisplayId(QScreen *screen)