1// qwindow.sip generated by MetaSIP 2// 3// This file is part of the QtGui Python extension module. 4// 5// Copyright (c) 2021 Riverbank Computing Limited <info@riverbankcomputing.com> 6// 7// This file is part of PyQt5. 8// 9// This file may be used under the terms of the GNU General Public License 10// version 3.0 as published by the Free Software Foundation and appearing in 11// the file LICENSE included in the packaging of this file. Please review the 12// following information to ensure the GNU General Public License version 3.0 13// requirements will be met: http://www.gnu.org/copyleft/gpl.html. 14// 15// If you do not wish to use this file under the terms of the GPL version 3.0 16// then you may purchase a commercial license. For more information contact 17// info@riverbankcomputing.com. 18// 19// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE 20// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. 21 22 23class QWindow : QObject, QSurface 24{ 25%TypeHeaderCode 26#include <qwindow.h> 27%End 28 29public: 30 explicit QWindow(QScreen *screen = 0); 31 explicit QWindow(QWindow *parent /TransferThis/); 32 virtual ~QWindow(); 33 void setSurfaceType(QSurface::SurfaceType surfaceType); 34 virtual QSurface::SurfaceType surfaceType() const; 35 bool isVisible() const; 36 void create(); 37 WId winId() const; 38 QWindow *parent() const; 39 void setParent(QWindow *parent /Transfer/); 40 bool isTopLevel() const; 41 bool isModal() const; 42 Qt::WindowModality modality() const; 43 void setModality(Qt::WindowModality modality); 44 void setFormat(const QSurfaceFormat &format); 45 virtual QSurfaceFormat format() const; 46 QSurfaceFormat requestedFormat() const; 47 void setFlags(Qt::WindowFlags flags); 48 Qt::WindowFlags flags() const; 49 Qt::WindowType type() const; 50 QString title() const; 51 void setOpacity(qreal level); 52 53public slots: 54 void requestActivate(); 55 56public: 57 bool isActive() const; 58 void reportContentOrientationChange(Qt::ScreenOrientation orientation); 59 Qt::ScreenOrientation contentOrientation() const; 60 qreal devicePixelRatio() const; 61 Qt::WindowState windowState() const; 62 void setWindowState(Qt::WindowState state); 63 void setTransientParent(QWindow *parent); 64 QWindow *transientParent() const; 65 66 enum AncestorMode 67 { 68 ExcludeTransients, 69 IncludeTransients, 70 }; 71 72 bool isAncestorOf(const QWindow *child, QWindow::AncestorMode mode = QWindow::IncludeTransients) const; 73 bool isExposed() const; 74 int minimumWidth() const; 75 int minimumHeight() const; 76 int maximumWidth() const; 77 int maximumHeight() const; 78 QSize minimumSize() const; 79 QSize maximumSize() const; 80 QSize baseSize() const; 81 QSize sizeIncrement() const; 82 void setMinimumSize(const QSize &size); 83 void setMaximumSize(const QSize &size); 84 void setBaseSize(const QSize &size); 85 void setSizeIncrement(const QSize &size); 86 void setGeometry(int posx, int posy, int w, int h); 87 void setGeometry(const QRect &rect); 88 QRect geometry() const; 89 QMargins frameMargins() const; 90 QRect frameGeometry() const; 91 QPoint framePosition() const; 92 void setFramePosition(const QPoint &point); 93 int width() const; 94 int height() const; 95 int x() const; 96 int y() const; 97 virtual QSize size() const; 98 QPoint position() const; 99 void setPosition(const QPoint &pt); 100 void setPosition(int posx, int posy); 101 void resize(const QSize &newSize); 102 void resize(int w, int h); 103 void setFilePath(const QString &filePath); 104 QString filePath() const; 105 void setIcon(const QIcon &icon); 106 QIcon icon() const; 107 void destroy(); 108 bool setKeyboardGrabEnabled(bool grab); 109 bool setMouseGrabEnabled(bool grab); 110 QScreen *screen() const; 111 void setScreen(QScreen *screen); 112 virtual QObject *focusObject() const; 113 QPoint mapToGlobal(const QPoint &pos) const; 114 QPoint mapFromGlobal(const QPoint &pos) const; 115 QCursor cursor() const; 116 void setCursor(const QCursor &); 117 void unsetCursor(); 118 119public slots: 120 void setVisible(bool visible); 121 void show() /ReleaseGIL/; 122 void hide(); 123 void showMinimized() /ReleaseGIL/; 124 void showMaximized() /ReleaseGIL/; 125 void showFullScreen() /ReleaseGIL/; 126 void showNormal() /ReleaseGIL/; 127 bool close(); 128 void raise() /PyName=raise_/; 129 void lower(); 130 void setTitle(const QString &); 131 void setX(int arg); 132 void setY(int arg); 133 void setWidth(int arg); 134 void setHeight(int arg); 135 void setMinimumWidth(int w); 136 void setMinimumHeight(int h); 137 void setMaximumWidth(int w); 138 void setMaximumHeight(int h); 139%If (Qt_5_1_0 -) 140 void alert(int msec); 141%End 142%If (Qt_5_5_0 -) 143 void requestUpdate(); 144%End 145 146signals: 147 void screenChanged(QScreen *screen); 148 void modalityChanged(Qt::WindowModality modality); 149 void windowStateChanged(Qt::WindowState windowState); 150 void xChanged(int arg); 151 void yChanged(int arg); 152 void widthChanged(int arg); 153 void heightChanged(int arg); 154 void minimumWidthChanged(int arg); 155 void minimumHeightChanged(int arg); 156 void maximumWidthChanged(int arg); 157 void maximumHeightChanged(int arg); 158 void visibleChanged(bool arg); 159 void contentOrientationChanged(Qt::ScreenOrientation orientation); 160 void focusObjectChanged(QObject *object); 161%If (Qt_5_3_0 -) 162 void windowTitleChanged(const QString &title); 163%End 164 165protected: 166 virtual void exposeEvent(QExposeEvent *); 167 virtual void resizeEvent(QResizeEvent *); 168 virtual void moveEvent(QMoveEvent *); 169 virtual void focusInEvent(QFocusEvent *); 170 virtual void focusOutEvent(QFocusEvent *); 171 virtual void showEvent(QShowEvent *); 172 virtual void hideEvent(QHideEvent *); 173 virtual bool event(QEvent *); 174 virtual void keyPressEvent(QKeyEvent *); 175 virtual void keyReleaseEvent(QKeyEvent *); 176 virtual void mousePressEvent(QMouseEvent *); 177 virtual void mouseReleaseEvent(QMouseEvent *); 178 virtual void mouseDoubleClickEvent(QMouseEvent *); 179 virtual void mouseMoveEvent(QMouseEvent *); 180 virtual void wheelEvent(QWheelEvent *); 181 virtual void touchEvent(QTouchEvent *); 182 virtual void tabletEvent(QTabletEvent *); 183 184public: 185%If (Qt_5_1_0 -) 186 187 enum Visibility 188 { 189 Hidden, 190 AutomaticVisibility, 191 Windowed, 192 Minimized, 193 Maximized, 194 FullScreen, 195 }; 196 197%End 198%If (Qt_5_1_0 -) 199 QWindow::Visibility visibility() const; 200%End 201%If (Qt_5_1_0 -) 202 void setVisibility(QWindow::Visibility v); 203%End 204%If (Qt_5_1_0 -) 205 qreal opacity() const; 206%End 207%If (Qt_5_1_0 -) 208 void setMask(const QRegion ®ion); 209%End 210%If (Qt_5_1_0 -) 211 QRegion mask() const; 212%End 213%If (Qt_5_1_0 -) 214 static QWindow *fromWinId(WId id); 215%End 216 217signals: 218%If (Qt_5_1_0 -) 219 void visibilityChanged(QWindow::Visibility visibility); 220%End 221%If (Qt_5_1_0 -) 222 void activeChanged(); 223%End 224%If (Qt_5_1_0 -) 225 void opacityChanged(qreal opacity); 226%End 227 228public: 229%If (Qt_5_9_0 -) 230 QWindow *parent(QWindow::AncestorMode mode) const; 231%End 232%If (Qt_5_9_0 -) 233 void setFlag(Qt::WindowType, bool on = true); 234%End 235%If (Qt_5_10_0 -) 236 Qt::WindowStates windowStates() const; 237%End 238%If (Qt_5_10_0 -) 239 void setWindowStates(Qt::WindowStates states); 240%End 241 242public slots: 243%If (Qt_5_15_0 -) 244 bool startSystemResize(Qt::Edges edges); 245%End 246%If (Qt_5_15_0 -) 247 bool startSystemMove(); 248%End 249}; 250