Spaces:
Running
Running
PerceptionLabPortable
/
python_embed
/Lib
/site-packages
/PyQt6
/bindings
/QtGui
/qguiapplication.sip
| // qguiapplication.sip generated by MetaSIP | |
| // | |
| // This file is part of the QtGui Python extension module. | |
| // | |
| // Copyright (c) 2025 Riverbank Computing Limited <info@riverbankcomputing.com> | |
| // | |
| // This file is part of PyQt6. | |
| // | |
| // This file may be used under the terms of the GNU General Public License | |
| // version 3.0 as published by the Free Software Foundation and appearing in | |
| // the file LICENSE included in the packaging of this file. Please review the | |
| // following information to ensure the GNU General Public License version 3.0 | |
| // requirements will be met: http://www.gnu.org/copyleft/gpl.html. | |
| // | |
| // If you do not wish to use this file under the terms of the GPL version 3.0 | |
| // then you may purchase a commercial license. For more information contact | |
| // info@riverbankcomputing.com. | |
| // | |
| // This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE | |
| // WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. | |
| class QGuiApplication : public QCoreApplication | |
| { | |
| %TypeHeaderCode | |
| %End | |
| %ConvertToSubClassCode | |
| static struct class_graph { | |
| const char *name; | |
| sipTypeDef **type; | |
| int yes, no; | |
| } graph[] = { | |
| {sipName_QAbstractTextDocumentLayout, | |
| {sipName_QAccessibilityHints, | |
| {0, 0, -1, 2}, | |
| {sipName_QAction, | |
| {sipName_QActionGroup, | |
| {sipName_QClipboard, | |
| {sipName_QValidator, | |
| {sipName_QDrag, | |
| {sipName_QFileSystemModel, | |
| {sipName_QGuiApplication, | |
| {sipName_QInputDevice, | |
| {sipName_QInputMethod, | |
| {sipName_QMovie, | |
| {sipName_QOffscreenSurface, | |
| {sipName_QOpenGLContext, | |
| {0, 0, -1, 14}, | |
| {sipName_QOpenGLContextGroup, | |
| {0, 0, -1, 15}, | |
| {sipName_QWindow, | |
| {sipName_QPdfWriter, | |
| {sipName_QScreen, | |
| {sipName_QSessionManager, | |
| {0, 0, -1, 19}, | |
| {sipName_QShortcut, | |
| {sipName_QStandardItemModel, | |
| {sipName_QStyleHints, | |
| {sipName_QSyntaxHighlighter, | |
| {sipName_QTextObject, | |
| {sipName_QTextDocument, | |
| {sipName_QUndoGroup, | |
| {sipName_QUndoStack, | |
| {sipName_QDoubleValidator, | |
| {sipName_QIntValidator, | |
| {sipName_QRegularExpressionValidator, | |
| {sipName_QPointingDevice, | |
| {sipName_QPaintDeviceWindow, | |
| {sipName_QRasterWindow, | |
| {sipName_QTextBlockGroup, | |
| {sipName_QTextFrame, | |
| {sipName_QTextList, | |
| {sipName_QTextTable, | |
| }; | |
| int i = 0; | |
| sipType = NULL; | |
| do | |
| { | |
| struct class_graph *cg = | |
| if (cg->name != NULL | |
| { | |
| sipType = *cg->type; | |
| i = cg->yes; | |
| } | |
| else | |
| i = cg->no; | |
| } | |
| while (i >= 0); | |
| %End | |
| public: | |
| QGuiApplication(SIP_PYLIST argv /TypeHint="List[str]"/) /PostHook=__pyQtQAppHook__/ [(int | |
| %MethodCode | |
| // The Python interface is a list of argument strings that is modified. | |
| int argc; | |
| char **argv; | |
| // Convert the list. | |
| if ((argv = pyqt6_qtgui_from_argv_list(a0, argc)) == NULL) | |
| sipIsErr = 1; | |
| else | |
| { | |
| // Create it now the arguments are right. | |
| static int nargc; | |
| nargc = argc; | |
| Py_BEGIN_ALLOW_THREADS | |
| sipCpp = new sipQGuiApplication(nargc, argv, QT_VERSION); | |
| Py_END_ALLOW_THREADS | |
| // Now modify the original list. | |
| pyqt6_qtgui_update_argv_list(a0, argc, argv); | |
| } | |
| %End | |
| virtual ~QGuiApplication() /ReleaseGIL/; | |
| %MethodCode | |
| pyqt6_qtgui_cleanup_qobjects(); | |
| %End | |
| static QWindowList allWindows(); | |
| static QWindowList topLevelWindows(); | |
| static QWindow *topLevelAt(const QPoint | |
| static QString platformName(); | |
| static QWindow *focusWindow(); | |
| static QObject *focusObject(); | |
| static QScreen *primaryScreen(); | |
| static QList<QScreen *> screens(); | |
| static QCursor *overrideCursor(); | |
| static void setOverrideCursor(const QCursor | |
| static void changeOverrideCursor(const QCursor | |
| static void restoreOverrideCursor(); | |
| static QFont font(); | |
| static void setFont(const QFont | |
| static QClipboard *clipboard(); | |
| static QPalette palette(); | |
| static void setPalette(const QPalette | |
| static Qt::KeyboardModifiers keyboardModifiers(); | |
| static Qt::KeyboardModifiers queryKeyboardModifiers(); | |
| static Qt::MouseButtons mouseButtons(); | |
| static void setLayoutDirection(Qt::LayoutDirection direction); | |
| static Qt::LayoutDirection layoutDirection(); | |
| static bool isRightToLeft(); | |
| static bool isLeftToRight(); | |
| static void setDesktopSettingsAware(bool on); | |
| static bool desktopSettingsAware(); | |
| static void setQuitOnLastWindowClosed(bool quit); | |
| static bool quitOnLastWindowClosed(); | |
| static int exec() /PostHook=__pyQtPostEventLoopHook__,PreHook=__pyQtPreEventLoopHook__,ReleaseGIL/; | |
| virtual bool notify(QObject *, QEvent *); | |
| signals: | |
| void fontDatabaseChanged(); | |
| void screenAdded(QScreen *screen); | |
| void lastWindowClosed(); | |
| void focusObjectChanged(QObject *focusObject); | |
| %If (PyQt_SessionManager) | |
| void commitDataRequest(QSessionManager | |
| %End | |
| %If (PyQt_SessionManager) | |
| void saveStateRequest(QSessionManager | |
| %End | |
| void focusWindowChanged(QWindow *focusWindow); | |
| void applicationStateChanged(Qt::ApplicationState state); | |
| void applicationDisplayNameChanged(); | |
| public: | |
| static void setApplicationDisplayName(const QString | |
| static QString applicationDisplayName(); | |
| static QWindow *modalWindow(); | |
| static QStyleHints *styleHints(); | |
| static QInputMethod *inputMethod(); | |
| qreal devicePixelRatio() const; | |
| %If (PyQt_SessionManager) | |
| bool isSessionRestored() const; | |
| %End | |
| %If (PyQt_SessionManager) | |
| QString sessionId() const; | |
| %End | |
| %If (PyQt_SessionManager) | |
| QString sessionKey() const; | |
| %End | |
| %If (PyQt_SessionManager) | |
| bool isSavingSession() const; | |
| %End | |
| static Qt::ApplicationState applicationState(); | |
| static void sync(); | |
| static void setWindowIcon(const QIcon | |
| static QIcon windowIcon(); | |
| signals: | |
| void screenRemoved(QScreen *screen); | |
| void layoutDirectionChanged(Qt::LayoutDirection direction); | |
| void primaryScreenChanged(QScreen *screen); | |
| public: | |
| static void setDesktopFileName(const QString | |
| static QString desktopFileName(); | |
| static QScreen *screenAt(const QPoint | |
| static void setHighDpiScaleFactorRoundingPolicy(Qt::HighDpiScaleFactorRoundingPolicy policy); | |
| static Qt::HighDpiScaleFactorRoundingPolicy highDpiScaleFactorRoundingPolicy(); | |
| %If (Qt_6_5_0 -) | |
| void setBadgeNumber(qint64 number); | |
| %End | |
| SIP_PYOBJECT nativeInterface(SIP_PYTYPE platform) const; | |
| %MethodCode | |
| bool handled = false; | |
| if (a0 == (PyObject *)sipTypeAsPyTypeObject(sipType_QNativeInterface_QWaylandApplication)) | |
| { | |
| auto *iface = sipCpp->nativeInterface<QNativeInterface::QWaylandApplication>(); | |
| if (iface) | |
| { | |
| sipRes = sipConvertFromType(iface, sipType_QNativeInterface_QWaylandApplication, SIP_NULLPTR); | |
| handled = true; | |
| } | |
| } | |
| if (a0 == (PyObject *)sipTypeAsPyTypeObject(sipType_QNativeInterface_QX11Application)) | |
| { | |
| auto *iface = sipCpp->nativeInterface<QNativeInterface::QX11Application>(); | |
| if (iface) | |
| { | |
| sipRes = sipConvertFromType(iface, sipType_QNativeInterface_QX11Application, SIP_NULLPTR); | |
| handled = true; | |
| } | |
| } | |
| if (!handled) | |
| { | |
| sipRes = Py_None; | |
| Py_INCREF(sipRes); | |
| } | |
| %End | |
| protected: | |
| virtual bool event(QEvent *); | |
| }; | |
| %ModuleHeaderCode | |
| // Imports from QtCore. | |
| typedef void (*pyqt6_qtgui_cleanup_qobjects_t)(); | |
| extern pyqt6_qtgui_cleanup_qobjects_t pyqt6_qtgui_cleanup_qobjects; | |
| typedef char **(*pyqt6_qtgui_from_argv_list_t)(PyObject *, int | |
| extern pyqt6_qtgui_from_argv_list_t pyqt6_qtgui_from_argv_list; | |
| typedef void (*pyqt6_qtgui_update_argv_list_t)(PyObject *, int, char **); | |
| extern pyqt6_qtgui_update_argv_list_t pyqt6_qtgui_update_argv_list; | |
| %End | |
| %ModuleCode | |
| // Imports from QtCore. | |
| pyqt6_qtgui_cleanup_qobjects_t pyqt6_qtgui_cleanup_qobjects; | |
| pyqt6_qtgui_from_argv_list_t pyqt6_qtgui_from_argv_list; | |
| pyqt6_qtgui_update_argv_list_t pyqt6_qtgui_update_argv_list; | |
| // Forward declarations not in any header files but are part of the API. | |
| void qt_set_sequence_auto_mnemonic(bool enable); | |
| %End | |
| %InitialisationCode | |
| // Export our own helpers. | |
| sipExportSymbol("qtgui_wrap_ancestors", (void *)qtgui_wrap_ancestors); | |
| %End | |
| %PostInitialisationCode | |
| // Imports from QtCore. | |
| pyqt6_qtgui_cleanup_qobjects = (pyqt6_qtgui_cleanup_qobjects_t)sipImportSymbol("pyqt6_cleanup_qobjects"); | |
| Q_ASSERT(pyqt6_qtgui_cleanup_qobjects); | |
| pyqt6_qtgui_from_argv_list = (pyqt6_qtgui_from_argv_list_t)sipImportSymbol("pyqt6_from_argv_list"); | |
| Q_ASSERT(pyqt6_qtgui_from_argv_list); | |
| pyqt6_qtgui_update_argv_list = (pyqt6_qtgui_update_argv_list_t)sipImportSymbol("pyqt6_update_argv_list"); | |
| Q_ASSERT(pyqt6_qtgui_update_argv_list); | |
| %End | |