Qt 6.x
The Qt SDK
Loading...
Searching...
No Matches
qandroidplatformwindow.h
Go to the documentation of this file.
1// Copyright (C) 2014 BogDan Vatra <bogdan@kde.org>
2// Copyright (C) 2016 The Qt Company Ltd.
3// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
4
5#ifndef ANDROIDPLATFORMWINDOW_H
6#define ANDROIDPLATFORMWINDOW_H
7#include <qobject.h>
8#include <qrect.h>
9#include <qpa/qplatformwindow.h>
10
12
15
17{
18public:
20
21 void lower() override;
22 void raise() override;
23
24 void setVisible(bool visible) override;
25
26 void setWindowState(Qt::WindowStates state) override;
27 void setWindowFlags(Qt::WindowFlags flags) override;
28 Qt::WindowFlags windowFlags() const;
29 void setParent(const QPlatformWindow *window) override;
30 WId winId() const override { return m_windowId; }
31
32 bool setMouseGrabEnabled(bool grab) override { Q_UNUSED(grab); return false; }
33 bool setKeyboardGrabEnabled(bool grab) override { Q_UNUSED(grab); return false; }
34
36
37 QMargins safeAreaMargins() const override;
38
39 void propagateSizeHints() override;
40 void requestActivateWindow() override;
42 inline bool isRaster() const {
43 if (isForeignWindow())
44 return false;
45
48 }
49 bool isExposed() const override;
50
52
55
56 virtual void repaint(const QRegion &) { }
57
58protected:
59 void setGeometry(const QRect &rect) override;
60
61protected:
62 Qt::WindowFlags m_windowFlags;
63 Qt::WindowStates m_windowState;
64
66
68};
69
71#endif // ANDROIDPLATFORMWINDOW_H
void propagateSizeHints() override
Reimplement to propagate the size hints of the QWindow.
virtual void applicationStateChanged(Qt::ApplicationState)
void setWindowFlags(Qt::WindowFlags flags) override
Requests setting the window flags of this surface to flags.
void setWindowState(Qt::WindowStates state) override
Requests setting the window state of this surface to type.
bool isExposed() const override
Returns if this window is exposed in the windowing system.
QAndroidPlatformScreen * platformScreen() const
Qt::WindowFlags windowFlags() const
void requestActivateWindow() override
Reimplement to let Qt be able to request activation/focus for a window.
virtual void repaint(const QRegion &)
bool setKeyboardGrabEnabled(bool grab) override
void setBackingStore(QAndroidPlatformBackingStore *store)
QAndroidPlatformBackingStore * m_backingStore
void setVisible(bool visible) override
Reimplemented in subclasses to show the surface if visible is true, and hide it if visible is false.
void setParent(const QPlatformWindow *window) override
This function is called to enable native child window in QPA.
void lower() override
Reimplement to be able to let Qt lower windows to the bottom of the desktop.
bool setMouseGrabEnabled(bool grab) override
WId winId() const override
Reimplement in subclasses to return a handle to the native window.
QAndroidPlatformBackingStore * backingStore() const
void raise() override
Reimplement to be able to let Qt raise windows to the top of the desktop.
void setGeometry(const QRect &rect) override
This function is called by Qt whenever a window is moved or resized using the QWindow API.
QMargins safeAreaMargins() const override
The safe area margins of a window represent the area that is safe to place content within,...
\inmodule QtCore
Definition qmargins.h:23
The QPlatformWindow class provides an abstraction for top-level windows.
QWindow * window() const
Returns the window which belongs to the QPlatformWindow.
virtual bool isForeignWindow() const
\inmodule QtCore\reentrant
Definition qrect.h:30
The QRegion class specifies a clip region for a painter.
Definition qregion.h:27
@ RasterGLSurface
Definition qsurface.h:33
@ RasterSurface
Definition qsurface.h:31
\inmodule QtGui
Definition qwindow.h:63
SurfaceType surfaceType() const override
Returns the surface type of the window.
Definition qwindow.cpp:628
rect
[4]
else opt state
[0]
Combined button and popup list for selecting options.
ApplicationState
Definition qnamespace.h:261
GLbitfield flags
#define Q_UNUSED(x)