Qt
Internal/Contributor docs for the Qt SDK. <b>Note:</b> These are NOT official API docs; those are found <a href='https://doc.qt.io/'>here</a>.
|
Singleton container for all relevant information. More...
#include <qwindowscontext.h>
Public Types | |
enum | SystemInfoFlags { SI_RTL_Extensions = 0x1 , SI_SupportsTouch = 0x2 , SI_SupportsPointer = 0x4 } |
using | HandleBaseWindowHash = QHash<HWND, QWindowsWindow *> |
Static Public Attributes | |
static int | verbose = 0 |
Singleton container for all relevant information.
Holds state information formerly stored in qapplication_win.cpp
.
Definition at line 47 of file qwindowscontext.h.
using QWindowsContext::HandleBaseWindowHash = QHash<HWND, QWindowsWindow *> |
Definition at line 51 of file qwindowscontext.h.
Enumerator | |
---|---|
SI_RTL_Extensions | |
SI_SupportsTouch | |
SI_SupportsPointer |
Definition at line 53 of file qwindowscontext.h.
|
explicit |
Definition at line 179 of file qwindowscontext.cpp.
References QString::fromLocal8Bit(), qgetenv(), and QLoggingCategory::setFilterRules().
QWindowsContext::~QWindowsContext | ( | ) |
Definition at line 192 of file qwindowscontext.cpp.
References QWindowsScreenManager::clearScreens(), QWindowsContextPrivate::m_displayContext, QWindowsContextPrivate::m_oleInitializeResult, QWindowsContextPrivate::m_powerDummyWindow, QWindowsContextPrivate::m_powerNotification, and QWindowsContextPrivate::m_screenManager.
void QWindowsContext::addWindow | ( | HWND | hwnd, |
QWindowsWindow * | w ) |
Definition at line 676 of file qwindowscontext.cpp.
References QHash< Key, T >::insert(), and QWindowsContextPrivate::m_windows.
bool QWindowsContext::asyncExpose | ( | ) | const |
Definition at line 1468 of file qwindowscontext.cpp.
References QWindowsContextPrivate::m_asyncExpose.
|
static |
Definition at line 521 of file qwindowscontext.cpp.
References QLibraryInfo::isDebugBuild(), and str.
Referenced by createDummyWindow(), createTrayIconMessageWindow(), QWindowsScreenManager::initialize(), and registerWindowClass().
void QWindowsContext::clearWindowUnderMouse | ( | ) |
Definition at line 735 of file qwindowscontext.cpp.
References QWindowsMouseHandler::clearWindowUnderMouse(), QWindowsPointerHandler::clearWindowUnderMouse(), QWindowsContextPrivate::m_mouseHandler, QWindowsContextPrivate::m_pointerHandler, QWindowsContextPrivate::m_systemInfo, and SI_SupportsPointer.
HWND QWindowsContext::createDummyWindow | ( | const QString & | classNameIn, |
const wchar_t * | windowName, | ||
WNDPROC | wndProc = nullptr, | ||
DWORD | style = WS_OVERLAPPED ) |
Convenience to create a non-visible, message-only dummy window for example used as clipboard watcher or for GL.
Definition at line 862 of file qwindowscontext.cpp.
References className, classNamePrefix(), and registerWindowClass().
Referenced by initPowerNotificationHandler().
int QWindowsContext::defaultDPI | ( | ) | const |
Definition at line 501 of file qwindowscontext.cpp.
References QWindowsContextPrivate::m_defaultDPI.
HDC QWindowsContext::displayContext | ( | ) | const |
Definition at line 506 of file qwindowscontext.cpp.
References QWindowsContextPrivate::m_displayContext.
bool QWindowsContext::disposeTablet | ( | ) |
Definition at line 267 of file qwindowscontext.cpp.
|
static |
|
static |
QWindowsWindow * QWindowsContext::findClosestPlatformWindow | ( | HWND | hwnd | ) | const |
Definition at line 705 of file qwindowscontext.cpp.
References QWindowsContextPrivate::m_windows, QHash< Key, T >::value(), and window().
QWindowsWindow * QWindowsContext::findPlatformWindow | ( | const QWindowsMenuBar * | mb | ) | const |
Definition at line 691 of file qwindowscontext.cpp.
References QHash< Key, T >::cbegin(), QHash< Key, T >::cend(), it, and QWindowsContextPrivate::m_windows.
QWindowsWindow * QWindowsContext::findPlatformWindow | ( | HWND | hwnd | ) | const |
Definition at line 700 of file qwindowscontext.cpp.
References QWindowsContextPrivate::m_windows, and QHash< Key, T >::value().
Referenced by findPlatformWindowAt(), findWindow(), and windowsProc().
QWindowsWindow * QWindowsContext::findPlatformWindowAt | ( | HWND | parent, |
const QPoint & | screenPoint, | ||
unsigned | cwex_flags ) const |
Definition at line 791 of file qwindowscontext.cpp.
References findPlatformWindow(), findPlatformWindowHelper(), and window().
QWindow * QWindowsContext::findWindow | ( | HWND | hwnd | ) | const |
Definition at line 722 of file qwindowscontext.cpp.
References findPlatformWindow().
|
static |
Definition at line 876 of file qwindowscontext.cpp.
Referenced by QWindowsMenuBar::install(), and QWindowsWindow::updateFullFrameMargins().
bool QWindowsContext::initPointer | ( | unsigned | integrationOptions | ) |
Definition at line 277 of file qwindowscontext.cpp.
References QWindowsIntegration::DontUseWMPointer, QWindowsContextPrivate::m_systemInfo, and SI_SupportsPointer.
Referenced by QWindowsIntegrationPrivate::parseOptions().
bool QWindowsContext::initPowerNotificationHandler | ( | ) |
Definition at line 317 of file qwindowscontext.cpp.
References createDummyWindow(), QWindowsContextPrivate::m_powerDummyWindow, QWindowsContextPrivate::m_powerNotification, QStringLiteral, and qWindowsPowerWindowProc().
Referenced by QWindowsIntegrationPrivate::parseOptions().
bool QWindowsContext::initTablet | ( | ) |
Definition at line 257 of file qwindowscontext.cpp.
References QWindowsTabletSupport::create().
Referenced by QWindowsIntegrationPrivate::parseOptions().
bool QWindowsContext::initTouch | ( | ) |
Definition at line 218 of file qwindowscontext.cpp.
References initTouch(), and QWindowsIntegration::instance().
Referenced by initTouch(), QWindowsIntegrationPrivate::parseOptions(), and windowsProc().
bool QWindowsContext::initTouch | ( | unsigned | integrationOptions | ) |
Definition at line 223 of file qwindowscontext.cpp.
References QWindowsPointerHandler::createTouchDevice(), QWindowsIntegration::DontPassOsMouseEventsSynthesizedFromTouch, QWindowsContextPrivate::m_mouseHandler, QWindowsContextPrivate::m_pointerHandler, QWindowsContextPrivate::m_systemInfo, QWindowSystemInterface::registerInputDevice(), registerTouchWindows(), QWindowsMouseHandler::setTouchDevice(), QWindowsPointerHandler::setTouchDevice(), SI_SupportsPointer, SI_SupportsTouch, QWindowsMouseHandler::touchDevice(), and QWindowsPointerHandler::touchDevice().
|
static |
Definition at line 464 of file qwindowscontext.cpp.
Referenced by QWindowsWindow::QWindowsWindow(), applyNewCursor(), QWindowsApplication::asyncExpose(), QWindowsWindow::checkForScreenChanged(), QWindowsCursor::clearOverrideCursor(), QWindowsTabletSupport::create(), WindowCreationData::create(), QWindowsOleDropSource::createCursors(), createDummyGLWindow(), QWindowsApplication::createMessageWindow(), createTrayIconMessageWindow(), QWindowsOleDropTarget::DragLeave(), QWindowsOleDataObject::EnumFormatEtc(), QWindowsInternalMimeData::formats_sys(), QWindowsGeometryHint::frame(), QWindowsGeometryHint::frame(), QWindowsOleDataObject::GetData(), QWindowsTheme::handleSettingsChanged(), QWindowsWindow::handleWmPaint(), QWindowsInternalMimeData::hasFormat_sys(), QWindowsScreenManager::initialize(), QWindowsWindow::initialize(), QWindowsScreenManager::isSingleScreen(), QWindowsApplication::isWinTabEnabled(), qDisplayChangeObserverWndProc(), QWindowsOleDataObject::QueryGetData(), qWindowsTabletSupportWndProc(), QWindowsApplication::registerMime(), QWindowsWindow::registerTouchWindow(), QWindowsClipboard::registerViewer(), QWindowsInternalMimeData::retrieveData_sys(), QWindowsApplication::setAsyncExpose(), QWindowsWindow::setKeyboardGrabEnabled(), QWindowsApplication::setTouchWindowTouchType(), QWindowsApplication::setWinTabEnabled(), startDoDragDrop(), QWindowsTheme::themeHint(), QWindowsWindow::topLevelOf(), QWindowsMouseHandler::translateMouseEvent(), QWindowsPointerHandler::translateMouseEvent(), QWindowsTabletSupport::translateTabletPacketEvent(), QWindowsMouseHandler::translateTouchEvent(), QWindowsApplication::unregisterMime(), QWindowsScreen::virtualSiblings(), QWindowsScreen::windowAt(), windowPlacementOffset(), and QWindowsSystemTrayIcon::winEvent().
|
static |
Definition at line 807 of file qwindowscontext.cpp.
References info.
Referenced by QWindowsClipboard::setMimeData().
QWindow * QWindowsContext::keyGrabber | ( | ) | const |
Definition at line 511 of file qwindowscontext.cpp.
References QWindowsKeyMapper::keyGrabber(), and QWindowsContextPrivate::m_keyMapper.
QPlatformKeyMapper * QWindowsContext::keyMapper | ( | ) | const |
Definition at line 479 of file qwindowscontext.cpp.
References QWindowsContextPrivate::m_keyMapper.
Referenced by QWindowsIntegration::keyMapper().
QWindowsMimeRegistry & QWindowsContext::mimeConverter | ( | ) | const |
Definition at line 838 of file qwindowscontext.cpp.
References QWindowsContextPrivate::m_mimeConverter.
|
static |
Definition at line 904 of file qwindowscontext.cpp.
References systemParametersInfo().
Referenced by nonClientMetricsForScreen(), and QWindowsTheme::refreshFonts().
|
static |
Definition at line 911 of file qwindowscontext.cpp.
References nonClientMetrics(), qRound(), and screen.
Referenced by nonClientMetricsForWindow().
|
static |
Definition at line 918 of file qwindowscontext.cpp.
References nonClientMetricsForScreen(), QWidget::screen(), and win.
|
static |
Definition at line 376 of file qwindowscontext.cpp.
References context, and dpiAwarenessContextToQtDpiAwareness().
Referenced by QWindowsIntegrationPrivate::parseOptions(), and setProcessDpiAwareness().
|
static |
Definition at line 1478 of file qwindowscontext.cpp.
References QWinRegistryKey::dwordValue().
Referenced by QWindowsNativeFileDialogBase::setMode(), and QWindowsSystemTrayIcon::supportsMessages().
void QWindowsContext::registerTouchWindows | ( | ) |
Definition at line 248 of file qwindowscontext.cpp.
References QCoreApplicationPrivate::is_app_running, QWindowsContextPrivate::m_systemInfo, QWindowsContextPrivate::m_windows, and SI_SupportsTouch.
Referenced by initTouch().
Definition at line 542 of file qwindowscontext.cpp.
References classNamePrefix(), CS_DROPSHADOW, Qt::Dialog, icon, Qt::MSWindowsOwnDC, Qt::NoDropShadowWindowHint, QSurface::OpenGLSurface, Qt::Popup, Q_ASSERT, qWindowsWndProc(), registerWindowClass(), Qt::Tool, Qt::ToolTip, Qt::WindowSystemMenuHint, and Qt::WindowType_Mask.
Referenced by createDummyWindow(), and registerWindowClass().
QString QWindowsContext::registerWindowClass | ( | QString | cname, |
WNDPROC | proc, | ||
unsigned | style = 0, | ||
HBRUSH | brush = nullptr, | ||
bool | icon = false ) |
Definition at line 598 of file qwindowscontext.cpp.
References QSet< T >::contains(), QUuid::createUuid(), Qt::dec(), Qt::hex(), icon, QSet< T >::insert(), QWindowsContextPrivate::m_registeredWindowClassNames, qCDebug, qErrnoWarning(), and qPrintable.
void QWindowsContext::removeWindow | ( | HWND | hwnd | ) |
Definition at line 681 of file qwindowscontext.cpp.
References QHash< Key, T >::end(), QHash< Key, T >::erase(), QHash< Key, T >::find(), it, QHash< HWND, QWindowsWindow * >::iterator, QWindowsKeyMapper::keyGrabber(), QWindowsContextPrivate::m_keyMapper, QWindowsContextPrivate::m_windows, and QWindowsKeyMapper::setKeyGrabber().
int QWindowsContext::screenDepth | ( | ) | const |
Definition at line 671 of file qwindowscontext.cpp.
References QWindowsContextPrivate::m_displayContext.
QWindowsScreenManager & QWindowsContext::screenManager | ( | ) |
Definition at line 843 of file qwindowscontext.cpp.
References QWindowsContextPrivate::m_screenManager.
Referenced by QWindowsIntegration::QWindowsIntegration().
void QWindowsContext::setAsyncExpose | ( | bool | value | ) |
Definition at line 1473 of file qwindowscontext.cpp.
References QWindowsContextPrivate::m_asyncExpose.
void QWindowsContext::setDetectAltGrModifier | ( | bool | a | ) |
Definition at line 344 of file qwindowscontext.cpp.
References QWindowsContextPrivate::m_keyMapper, and QWindowsKeyMapper::setDetectAltGrModifier().
Referenced by QWindowsIntegration::QWindowsIntegration().
Definition at line 516 of file qwindowscontext.cpp.
References QWindowsContextPrivate::m_keyMapper, and QWindowsKeyMapper::setKeyGrabber().
|
static |
Definition at line 439 of file qwindowscontext.cpp.
References context, QWindowsContextPrivate::m_v2DpiAware, QtWindows::PerMonitorVersion2, processDpiAwareness(), qCDebug, qCWarning, and qtDpiAwarenessToDpiAwarenessContext().
Referenced by QWindowsIntegrationPrivate::parseOptions().
|
static |
Definition at line 335 of file qwindowscontext.cpp.
References Q_UNUSED, and QWindowsTabletSupport::setAbsoluteRange().
Referenced by QWindowsIntegrationPrivate::parseOptions().
QSharedPointer< QWindowCreationContext > QWindowsContext::setWindowCreationContext | ( | const QSharedPointer< QWindowCreationContext > & | ctx | ) |
Definition at line 489 of file qwindowscontext.cpp.
References QWindowsContextPrivate::m_creationContext.
|
static |
Definition at line 928 of file qwindowscontext.cpp.
References QWindowsWindow::embeddedNativeParentHandleProperty, QOpenGLContext::LibGL, QWindowsContextPrivate::m_v2DpiAware, QOpenGLContext::openGLModuleType(), QSurface::OpenGLSurface, and window().
Referenced by QWindowsIntegration::createPlatformWindow(), QWindowsGeometryHint::frame(), and windowsProc().
unsigned QWindowsContext::systemInfo | ( | ) | const |
Definition at line 469 of file qwindowscontext.cpp.
References QWindowsContextPrivate::m_systemInfo.
|
static |
Definition at line 883 of file qwindowscontext.cpp.
References out.
Referenced by nonClientMetrics(), and systemParametersInfoForScreen().
|
static |
Definition at line 892 of file qwindowscontext.cpp.
References out, screen, and systemParametersInfo().
Referenced by systemParametersInfoForWindow().
|
static |
Definition at line 898 of file qwindowscontext.cpp.
References out, QWidget::screen(), systemParametersInfoForScreen(), and win.
QWindowsTabletSupport * QWindowsContext::tabletSupport | ( | ) | const |
Definition at line 848 of file qwindowscontext.cpp.
bool QWindowsContext::useRTLExtensions | ( | ) | const |
Definition at line 474 of file qwindowscontext.cpp.
References QWindowsContextPrivate::m_keyMapper, and QWindowsKeyMapper::useRTLExtensions().
Referenced by QWindowsIntegration::styleHint().
QSharedPointer< QWindowCreationContext > QWindowsContext::windowCreationContext | ( | ) | const |
Definition at line 496 of file qwindowscontext.cpp.
References QWindowsContextPrivate::m_creationContext.
|
static |
Definition at line 368 of file qwindowscontext.cpp.
References context, dpiAwarenessContextToQtDpiAwareness(), and QtWindows::Invalid.
Referenced by enableNonClientDpiScaling().
QWindowsContext::HandleBaseWindowHash & QWindowsContext::windows | ( | ) |
Definition at line 484 of file qwindowscontext.cpp.
References QWindowsContextPrivate::m_windows.
|
inline |
Main windows procedure registered for windows.
Definition at line 991 of file qwindowscontext.cpp.
References QCoreApplicationPrivate::aboutToQuitEmitted, QtWindows::AccessibleObjectFromWindowRequest, QtWindows::ActivateWindowEvent, QtWindows::AppCommandEvent, QWindowCreationContext::applyToMinMaxInfo(), QWindowsWindow::BlockedByModal, QtWindows::CalculateSize, QWindowsThemeCache::clearThemeCache(), clientToScreen(), QtWindows::ClipboardEvent, QtWindows::CloseEvent, QGuiApplicationPrivate::commitData(), QtWindows::CompositionSettingsChanged, QtWindows::ContextMenu, QtWindows::CursorEvent, QWindowCreationContext::customMargins, QtWindows::DestroyEvent, QtWindows::DeviceChangeEvent, QtWindows::DpiChangedAfterParentEvent, QtWindows::DpiChangedEvent, QtWindows::DpiScaledSizeEvent, enableNonClientDpiScaling(), QtWindows::EndSessionApplicationEvent, QWindowsCursor::enforceOverrideCursor(), QtWindows::EnterSizeMoveEvent, QtWindows::ExitSizeMoveEvent, QtWindows::ExposeEvent, filterNativeEvent(), findPlatformWindow(), QtWindows::FocusInEvent, QtWindows::FocusOutEvent, QtWindows::GeometryChangingEvent, QtWindows::GestureEvent, QObjectPrivate::get(), QWindowsGeometryHint::handleCalculateSize(), QWindowSystemInterface::handleCloseEvent(), QWindowsWindow::handleGeometryChangingMessage(), QWindowsScreenManager::handleScreenChanges(), QWindowsTheme::handleSettingsChanged(), QWindowsCursor::hasOverrideCursor(), QtWindows::HideEvent, initTouch(), QtWindows::InputLanguageChangeEvent, QtWindows::InputMethodCloseCandidateWindowEvent, QtWindows::InputMethodCompositionEvent, QtWindows::InputMethodEndCompositionEvent, QtWindows::InputMethodEventFlag, QtWindows::InputMethodKeyDownEvent, QtWindows::InputMethodKeyEvent, QtWindows::InputMethodOpenCandidateWindowEvent, QtWindows::InputMethodRequest, QtWindows::InputMethodStartCompositionEvent, QWindowsIntegration::instance(), QWindowsTheme::instance(), QMetaObject::InvokeMetaMethod, isInputMessage(), QSharedPointer< T >::isNull(), QtWindows::KeyDownEvent, QtWindows::KeyEvent, QtWindows::LeaveEvent, QWindowsContextPrivate::m_creationContext, QWindowsContextPrivate::m_keyMapper, QWindowsContextPrivate::m_mouseHandler, QWindowsContextPrivate::m_pointerHandler, QWindowsContextPrivate::m_screenManager, QWindowsContextPrivate::m_systemInfo, QWindowsContextPrivate::m_v2DpiAware, QWindowCreationContext::margins, QtWindows::MenuAboutToShowEvent, QtWindows::MenuCommandEvent, QGuiApplication::modalWindow(), QtWindows::MouseActivateWindowEvent, QtWindows::MouseEvent, QtWindows::MouseEventFlag, QtWindows::MouseWheelEvent, QtWindows::MoveEvent, QtWindows::NonClientCreate, QtWindows::NonClientEventFlag, QtWindows::NonClientHitTest, QtWindows::NonClientMouseEvent, QtWindows::NonClientPointerEvent, QWindowsPopupMenu::notifyAboutToShow(), QWindowsPopupMenu::notifyTriggered(), QWindowCreationContext::obtainedPos, QWindowCreationContext::obtainedSize, QtWindows::PointerActivateWindowEvent, QtWindows::PointerEvent, Q_ASSERT, Q_FALLTHROUGH, qApp, qCDebug, QtWindows::QueryEndSessionApplicationEvent, QtWindows::QuerySizeHints, QCoreApplication::quit(), qWarning, QtWindows::ResizeEvent, QWindowsWindow::ResizeMoveActive, QtWindows::ScrollEvent, sessionManagerInteractionBlocked(), QtWindows::SettingChangedEvent, QWindowsWindow::settingsChanged(), QWindowsInputContext::setWindowsImeEnabled(), shouldHaveNonClientDpiScaling(), QtWindows::ShowEventOnParentRestoring, SI_SupportsPointer, SI_SupportsTouch, QtWindows::TaskbarButtonCreated, QtWindows::ThemeChanged, QtWindows::TouchEvent, QWindowsMouseHandler::translateGestureEvent(), QWindowsKeyMapper::translateKeyEvent(), QWindowsMouseHandler::translateMouseEvent(), QWindowsPointerHandler::translateMouseEvent(), QWindowsPointerHandler::translatePointerEvent(), QWindowsMouseHandler::translateScrollEvent(), QWindowsMouseHandler::translateTouchEvent(), QtWindows::UnknownEvent, verbose, QtWindows::WhatsThisEvent, QWindowCreationContext::window, window(), Qt::WindowDoesNotAcceptFocus, windowsInputContext(), QWindowsGuiEventDispatcher::windowsMessageName(), QWindowsWindow::windowsWindowOf(), Qt::WindowTransparentForInput, and QWindowsWindow::WithinDestroy.
QWindow * QWindowsContext::windowUnderMouse | ( | ) | const |
Definition at line 729 of file qwindowscontext.cpp.
References QWindowsContextPrivate::m_mouseHandler, QWindowsContextPrivate::m_pointerHandler, QWindowsContextPrivate::m_systemInfo, SI_SupportsPointer, QWindowsMouseHandler::windowUnderMouse(), and QWindowsPointerHandler::windowUnderMouse().
|
static |
Definition at line 61 of file qwindowscontext.h.
Referenced by QWindowsGLContext::QWindowsGLContext(), QWindowsOleEnumFmtEtc::QWindowsOleEnumFmtEtc(), QWindowsOleEnumFmtEtc::QWindowsOleEnumFmtEtc(), QWindowsMimeRegistry::allMimesForFormats(), QWindowsBackingStore::beginPaint(), QWindowsClipboard::clipboardViewerWndProc(), QWindowsGLContext::doneCurrent(), QWindowsOleDataObject::EnumFormatEtc(), QWindowsBackingStore::flush(), QWindowsOleDataObject::GetData(), QWindowsGLContext::getProcAddress(), QWindowsGLContext::makeCurrent(), operator<<(), parseOptions(), QWindowsOleDropSource::QueryContinueDrag(), QWindowsOleDataObject::QueryGetData(), QWindowsBackingStore::resize(), QWindowsInternalMimeData::retrieveData_sys(), QWindowsClipboardRetrievalMimeData::retrieveDataObject(), QWindowsOleDataObject::SetData(), QWindowsGLContext::swapBuffers(), QWindowsScreen::topLevelAt(), QWindowsTabletSupport::translateTabletPacketEvent(), QWindowsScreen::windowAt(), and windowsProc().