Qt 4.8
Functions | Variables
qcocoasharedwindowmethods_mac_p.h File Reference

Go to the source code of this file.

Functions

Qt::MouseButton cocoaButton2QtButton (NSInteger buttonNum)
 
 if (self)
 
 if (!widget) return NO
 
 if (QApplicationPrivate::isBlockedByModal(widget)) return NO
 
 if ([self isSheet]) return NO
 
 if (currentCustomDragTypes==0|| *currentCustomDragTypes !=customTypes)
 
 Q_GLOBAL_STATIC (QPointer< QWidget >, currentDragTarget)
 
const QStringListqEnabledDraggedTypes ()
 
void qt_event_request_window_change (QWidget *)
 
 qt_mac_getTargetForMouseEvent (event, QEvent::Gesture, qlocal, qglobal, 0, &widgetToGetTouch)
 
void qt_mac_send_posted_gl_updates (QWidget *widget)
 
 qt_translateRawTouchEvent (widgetToGetTouch, QTouchEvent::TouchPad, QCocoaTouch::getCurrentTouchPointList(event, all))
 
 return (isPopup||isToolTip)
 
 return (isPopup||isToolTip||isTool)
 

Variables

bool all = widgetToGetTouch->testAttribute(Qt::WA_TouchPadAcceptSingleTouchEvents)
 
void becomeMainWindow
 
BOOL canBecomeKeyWindow
 
BOOL canBecomeMainWindow
 
const QStringListcustomTypes = qEnabledDraggedTypes()
 
void dealloc
 
void drawRectSpecial
 
 if (void) toggleToolbarShown
 
id initWithContentRect
 
bool isPopup = (widget->windowType() == Qt::Popup)
 Use windowType() == Qt::Popup instead. More...
 
bool isTool = (widget->windowType() == Qt::Tool)
 
bool isToolTip = (widget->windowType() == Qt::ToolTip)
 
QPointer< QWidgetqt_button_down
 
void registerDragTypes
 
void removeDropData
 
return self
 
NSToolbar * toolbar = [window toolbar]
 
void touchesCancelledWithEvent
 
void touchesEndedWithEvent
 
void touchesMovedWithEvent
 
QWidgetwidgetToGetTouch = 0
 
NSWindow * window = [id(self) window]
 

Function Documentation

◆ cocoaButton2QtButton()

Qt::MouseButton cocoaButton2QtButton ( NSInteger  buttonNum)

Definition at line 797 of file qt_cocoa_helpers_mac.mm.

798 {
799  if (buttonNum == 0)
800  return Qt::LeftButton;
801  if (buttonNum == 1)
802  return Qt::RightButton;
803  if (buttonNum == 2)
804  return Qt::MidButton;
805  if (buttonNum == 3)
806  return Qt::XButton1;
807  if (buttonNum == 4)
808  return Qt::XButton2;
809  return Qt::NoButton;
810 }

◆ if() [1/5]

if ( self  )

Definition at line 74 of file qcocoasharedwindowmethods_mac_p.h.

74  {
75  currentCustomDragTypes = 0;
76  }

◆ if() [2/5]

if ( widget)

Definition at line 585 of file qcocoasharedwindowmethods_mac_p.h.

585  {
586  // There is no toolbar, we have to draw a line on top of the line drawn by Cocoa.
587  macDrawRectOnTop((void *)window);
588  } else {
NSWindow * window

◆ if() [3/5]

◆ if() [4/5]

if ( )

◆ if() [5/5]

if ( currentCustomDragTypes  = = 0 || *currentCustomDragTypes != customTypes)

Definition at line 274 of file qcocoasharedwindowmethods_mac_p.h.

274  {
275  if (currentCustomDragTypes == 0)
276  currentCustomDragTypes = new QStringList();
277  *currentCustomDragTypes = customTypes;
278  const NSString* mimeTypeGeneric = @"com.trolltech.qt.MimeTypeName";
279  NSMutableArray *supportedTypes = [NSMutableArray arrayWithObjects:NSColorPboardType,
280  NSFilenamesPboardType, NSStringPboardType,
281  NSFilenamesPboardType, NSPostScriptPboardType, NSTIFFPboardType,
282  NSRTFPboardType, NSTabularTextPboardType, NSFontPboardType,
283  NSRulerPboardType, NSFileContentsPboardType, NSColorPboardType,
284  NSRTFDPboardType, NSHTMLPboardType, NSPICTPboardType,
285  NSURLPboardType, NSPDFPboardType, NSVCardPboardType,
286  NSFilesPromisePboardType, NSInkTextPboardType,
287  NSMultipleTextSelectionPboardType, mimeTypeGeneric, nil];
288  // Add custom types supported by the application.
289  for (int i = 0; i < customTypes.size(); i++) {
290  [supportedTypes addObject:qt_mac_QStringToNSString(customTypes[i])];
291  }
292  [self registerForDraggedTypes:supportedTypes];
293  }
const QStringList & customTypes
The QStringList class provides a list of strings.
Definition: qstringlist.h:66
int size() const
Returns the number of items in the list.
Definition: qlist.h:137

◆ Q_GLOBAL_STATIC()

Q_GLOBAL_STATIC ( QPointer< QWidget ,
currentDragTarget   
)

◆ qEnabledDraggedTypes()

const QStringList& qEnabledDraggedTypes ( )

Definition at line 114 of file qmime_mac.cpp.

115 {
116  return (*globalDraggedTypesList());
117 }

◆ qt_event_request_window_change()

void qt_event_request_window_change ( QWidget )

Definition at line 858 of file qapplication_mac.mm.

859 {
860  if (!widget)
861  return;
862 
863  // Post a kEventQtRequestWindowChange event. This event is semi-public,
864  // don't remove this line!
866 
867  // Post update request on gl widgets unconditionally.
868  if (qt_widget_private(widget)->isGLWidget == true) {
870  return;
871  }
872 
875 }
QPointer< QWidget > widget
static void qt_mac_update_intersected_gl_widgets(QWidget *widget)
static void qt_post_window_change_event(QWidget *widget)
Q_GUI_EXPORT QWidgetPrivate * qt_widget_private(QWidget *widget)
Definition: qwidget.cpp:12920
static void qt_mac_update_child_gl_widgets(QWidget *widget)
Q_GUI_EXPORT void qt_event_request_window_change()

◆ qt_mac_getTargetForMouseEvent()

qt_mac_getTargetForMouseEvent ( event  ,
QEvent::Gesture  ,
qlocal  ,
qglobal  ,
,
widgetToGetTouch 
)

◆ qt_mac_send_posted_gl_updates()

void qt_mac_send_posted_gl_updates ( QWidget widget)

Definition at line 789 of file qapplication_mac.mm.

Referenced by make_widget_eventUPP().

790 {
791  QList<QWidgetPrivate::GlWidgetInfo> &glWidgets = qt_widget_private(widget)->glWidgets;
794 
795  for (;it != end; ++it) {
796  QWidget *glWidget = it->widget;
797  if (qt_widget_private(glWidget)->needWindowChange) {
798  QEvent glChangeEvent(QEvent::MacGLWindowChange);
799  QApplication::sendEvent(glWidget, &glChangeEvent);
800  }
801  }
802 }
#define it(className, varName)
The QWidget class is the base class of all user interface objects.
Definition: qwidget.h:150
iterator begin()
Returns an STL-style iterator pointing to the first item in the list.
Definition: qlist.h:267
iterator end()
Returns an STL-style iterator pointing to the imaginary item after the last item in the list...
Definition: qlist.h:270
static bool sendEvent(QObject *receiver, QEvent *event)
Sends event event directly to receiver receiver, using the notify() function.
The QList::iterator class provides an STL-style non-const iterator for QList and QQueue.
Definition: qlist.h:181
Q_GUI_EXPORT QWidgetPrivate * qt_widget_private(QWidget *widget)
Definition: qwidget.cpp:12920
static const KeyPair *const end
The QEvent class is the base class of all event classes.
Definition: qcoreevent.h:56
The QList class is a template class that provides lists.
Definition: qdatastream.h:62

◆ qt_translateRawTouchEvent()

qt_translateRawTouchEvent ( widgetToGetTouch  ,
QTouchEvent::TouchPad  ,
QCocoaTouch::getCurrentTouchPointList(event, all  
)

◆ return() [1/2]

return ( isPopup||  isToolTip)

◆ return() [2/2]

return ( isPopup||isToolTip||  isTool)

Variable Documentation

◆ all

◆ becomeMainWindow

void becomeMainWindow
Initial value:

Definition at line 114 of file qcocoasharedwindowmethods_mac_p.h.

◆ canBecomeKeyWindow

BOOL canBecomeKeyWindow
Initial value:
{
QWidget *widget = [self qt_qwidget ]
QPointer< QWidget > widget
The QWidget class is the base class of all user interface objects.
Definition: qwidget.h:150

Definition at line 87 of file qcocoasharedwindowmethods_mac_p.h.

◆ canBecomeMainWindow

BOOL canBecomeMainWindow
Initial value:
{
QWidget *widget = [self qt_qwidget ]
QPointer< QWidget > widget
The QWidget class is the base class of all user interface objects.
Definition: qwidget.h:150

Definition at line 100 of file qcocoasharedwindowmethods_mac_p.h.

◆ customTypes

const QStringList& customTypes = qEnabledDraggedTypes()

◆ dealloc

void dealloc
Initial value:
{
delete currentCustomDragTypes

Definition at line 81 of file qcocoasharedwindowmethods_mac_p.h.

◆ drawRectSpecial

void drawRectSpecial

◆ if

if
Initial value:
{
QPoint qlocal, qglobal
The QPoint class defines a point in the plane using integer precision.
Definition: qpoint.h:53

Definition at line 220 of file qcocoasharedwindowmethods_mac_p.h.

Referenced by QMenu::actionEvent(), QAxServerBase::ActiveXProc(), QIcdEngine::addConfiguration(), QGraphicsScene::addItem(), QFontEngineMulti::addOutlineToPath(), QDeclarativeParticleMotionWander::advance(), QDeclarativePropertyCache::append(), QTextHtmlParser::applyAttributes(), QDeclarativeContext::baseUrl(), QDeclarativePropertyPrivate::binding(), blend_color_argb(), blend_color_rgb16(), blendColor(), QTextEngine::boundingBox(), QPicture::boundingRect(), QTextEngine::calculateTabWidth(), QRegExpEngine::Box::cat(), QTextCursor::charFormat(), QGLContext::choosePixelFormat(), QMYSQLResult::cleanup(), QNetworkConfigurationManagerPrivate::configurationFromIdentifier(), QLinuxFbScreen::connect(), QLinuxFbIntegration::connect(), QDirectFBScreen::connect(), QDeclarativeVMEMetaObject::connectAliasSignal(), constructWindowTitleFromFilePath(), convert_RGB_to_Indexed8(), QUtf16::convertToUnicode(), QFileDialogPrivate::createNavServicesDialog(), QDeclarativeOpenMetaObjectType::createProperty(), QTextLine::cursorToX(), QScriptBreakpointsModel::data(), QDeclarativePaintedItem::dirtyCache(), dither_to_Mono(), DndParseClientMessage(), do_size_hints(), QTextDocumentLayout::documentChanged(), QDragManager::dragCursor(), QTableViewPrivate::drawCell(), QWindowsXPStyle::drawComplexControl(), QMotifStyle::drawControl(), QMacStyle::drawControl(), QStyleSheetStyle::drawControl(), QGtkStyle::drawPrimitive(), QMacStyle::drawPrimitive(), QTreeView::drawRow(), QGL2PaintEngineEx::drawStaticTextItem(), QDBusMessage::errorMessage(), QX11EmbedContainer::eventFilter(), QMdiArea::eventFilter(), QNetworkAccessHttpBackend::fetchCacheMetaData(), QGL2PaintEngineExPrivate::fill(), QImageTextureGlyphCache::fillTexture(), QEventDispatcherMac::flush(), QAudioOutputPrivate::freeBlocks(), QTextLineItemIterator::getSelectionBounds(), QMacStylePrivate::getSliderInfo(), QComboMenuDelegate::getStyleOption(), QToolBarAreaLayout::getStyleOptionInfo(), QDeclarativeXmlQueryEngine::getValuesOfKeyRoles(), gray_raster_render(), gray_render_span(), gray_sweep(), handle_xdnd_status(), QMacStyle::hitTestComplexControl(), QWSDisplay::Data::init(), QDesktopWidgetPrivate::init(), QWindowsSystemProxy::init(), QDeclarativePropertyPrivate::initProperty(), QToolButton::initStyleOption(), QMenu::initStyleOption(), QTabBar::initStyleOption(), QLineEdit::initStyleOption(), QGraphicsItemPrivate::initStyleOption(), QTextEngine::justify(), QTextLine::layout_helper(), QTextDocumentLayoutPrivate::layoutFlow(), QTextDocumentLayoutPrivate::layoutFrame(), QTextDocumentLayoutPrivate::layoutTable(), QCss::ValueExtractor::lengthValue(), QCompletionModel::mapToSource(), QDeclarativeMouseArea::mouseMoveEvent(), QDBusConnection::objectRegisteredAt(), QFontDef::operator<(), operator<<(), QScrollBar::paintEvent(), QListView::paintEvent(), paintSep(), QScriptDebuggerAgent::positionChange(), QPainterReplayer::process(), QDeclarativePropertyCache::property(), q_getTimeFromASN1(), qDeleteQGLContext(), QFontEngineQPF1::QFontEngineQPF1(), QScriptDebuggerValue::QScriptDebuggerValue(), qstring_to_xtp(), qt_blend_color_argb_x86(), qt_blit_setup(), qt_fetch_linear_gradient(), qt_fill_input_buffer(), qt_init(), qt_mac_unregister_widget(), qt_skip_input_data(), qt_socket_getPortAndAddress(), qt_solidFill_setup(), qt_sync_request_scanner(), qt_term_source(), qt_win_read_back_PRINTDLGEX(), qt_win_setup_PRINTDLGEX(), qt_wince_maximize(), QProcess::readData(), QDB2Driver::record(), QDeclarativePathView::refill(), QHeaderView::resizeSection(), QHeaderView::sectionsInserted(), QNetworkAccessManager::setCookieJar(), QDeclarativePathView::setCurrentIndex(), QDeclarativeVisualDataModel::setModel(), QDBusAbstractInterfacePrivate::setProperty(), QMessageBox::setStandardButtons(), QTextEngine::shapeText(), QTextEngine::shapeTextWithHarfbuzz(), QAction::shortcuts(), QAbstractItemView::startDrag(), QFontEngineDirectWrite::stringToCMap(), QCleanlooksStyle::styleHint(), QMenuPrivate::QMacMenuPrivate::syncAction(), QAccessibleWidget::text(), QTextEngine::tightBoundingBox(), QX11PixmapData::transformed(), QDeclarativePropertyAction::transition(), QDeclarativePropertyAnimation::transition(), QETWidget::translateConfigEvent(), QString::trimmed(), QDBusMetaType::typeToSignature(), QAccessible::updateAccessibility(), QPainterPrivate::updateEmulationSpecifier(), QDeclarativeTimeLinePrivate::value(), VARIANTToQVariant(), QWidget::windowSurface(), QApplication::x11ClientMessage(), QX11EmbedWidget::x11Event(), QX11EmbedContainer::x11Event(), QX11Data::xdndHandleFinished(), and xic_draw_callback().

◆ initWithContentRect

id initWithContentRect

◆ isPopup

bool QWidget::isPopup = (widget->windowType() == Qt::Popup)

Use windowType() == Qt::Popup instead.

Definition at line 95 of file qcocoasharedwindowmethods_mac_p.h.

Referenced by QGraphicsWidget::setWindowFlags().

◆ isTool

bool isTool = (widget->windowType() == Qt::Tool)

Definition at line 109 of file qcocoasharedwindowmethods_mac_p.h.

Referenced by QGtkStyle::drawPrimitive().

◆ isToolTip

bool isToolTip = (widget->windowType() == Qt::ToolTip)

Definition at line 94 of file qcocoasharedwindowmethods_mac_p.h.

◆ qt_button_down

QPointer<QWidget> qt_button_down

Definition at line 188 of file qapplication_mac.mm.

◆ registerDragTypes

void registerDragTypes

◆ removeDropData

void removeDropData

Definition at line 297 of file qcocoasharedwindowmethods_mac_p.h.

◆ self

return self

◆ toolbar

NSToolbar* toolbar = [window toolbar]

◆ touchesCancelledWithEvent

void touchesCancelledWithEvent

Definition at line 255 of file qcocoasharedwindowmethods_mac_p.h.

◆ touchesEndedWithEvent

void touchesEndedWithEvent

Definition at line 243 of file qcocoasharedwindowmethods_mac_p.h.

◆ touchesMovedWithEvent

void touchesMovedWithEvent

Definition at line 231 of file qcocoasharedwindowmethods_mac_p.h.

◆ widgetToGetTouch

QWidget * widgetToGetTouch = 0

Definition at line 222 of file qcocoasharedwindowmethods_mac_p.h.

◆ window

NSWindow* window = [id(self) window]

Definition at line 583 of file qcocoasharedwindowmethods_mac_p.h.

Referenced by QWidget::activateWindow(), QBBScreen::activateWindowGroup(), QBBScreen::addWindow(), QApplication::alert(), QXlibCursor::changeCursor(), QMainWindowLayout::cleanUpMacToolbarItems(), QEglFSScreen::createAndSetPlatformContext(), QEgl::createSurface(), QWidget::destroy(), DndFillClientMessage(), EAGLPaintDevice::EAGLPaintDevice(), effectiveState(), QWidgetBackingStore::endPaint(), QApplicationPrivate::enterModal(), QBBScreen::findWindow(), QBBWindow::findWindow(), findXdndAwareParent(), flipPoint(), flipYCoordinate(), QEventDispatcherMac::flush(), QETWidget::forceUpdate(), QNSStatusItem::geometry, getNetWmState(), QWaylandEglWindow::glContext(), QApplicationPrivate::globalEventProcessor(), QDirectFbInput::globalPoint(), QXlibIntegration::grabWindow(), QXlibScreen::grabWindow(), QBBScreenEventHandler::handleCloseEvent(), QBBScreenEventHandler::handleCreateEvent(), QDirectFbInput::handleMouseEvents(), QBBWindow::hasBuffers(), QDirectFBScreenCursor::hide(), QWidgetPrivate::hide_sys(), if(), QXcbShmImage::image(), QAccessibleMdiArea::indexOfChild(), QAccessibleWorkspace::indexOfChild(), QStyleOption::init(), QWaylandInputDevice::inputHandleButton(), QWaylandInputDevice::inputHandleKey(), QWaylandInputDevice::inputHandleKeyboardFocus(), QWaylandInputDevice::inputHandleMotion(), QWaylandInputDevice::inputHandlePointerFocus(), QMainWindowLayout::insertIntoMacToolbar(), QWidget::internalWinId(), isServerProcess(), QPlatformIntegration::isVirtualDesktop(), kdProcessMouseEvents(), QApplicationPrivate::leaveModal(), QWidgetPrivate::lower_sys(), QBBScreen::lowerWindow(), QCoreGraphicsPaintEngine::macDisplayColorSpace(), macStartInterceptWindowTitle(), macWindowFade(), macWindowFlush(), macWindowIsTextured(), macWindowSetHasShadow(), macWindowToolbarIsVisible(), macWindowToolbarSet(), make_win_eventUPP(), QWidget::mapToGlobal(), mdiAreaNavigate(), QDirectFBScreenCursor::move(), QBBNativeInterface::nativeResourceForWidget(), QWaylandEglWindow::newSurfaceCreated(), QDirectFBPointer< IDirectFBSurface >::outPtr(), QXlibClipboard::owner(), QDummyWindowSurface::paintDevice(), QMacWindowFader::performFade(), QXlibScreen::physicalSize(), QMdiAreaPrivate::place(), QPlatformScreen::platformScreenForWidget(), QXcbConnection::processXcbEvents(), QXcbShmImage::put(), q_createNativeChildrenAndSetParent(), qAppInstance(), QDirectFBScreenCursor::QDirectFBScreenCursor(), qstring_to_xtp(), qt_grab_cursor(), qt_mac_checkForNativeSizeGrip(), qt_mac_create_window(), qt_mac_desktopSize(), qt_mac_destructView(), qt_mac_destructWindow(), qt_mac_handleTabletEvent(), qt_mac_insideKeyWindow(), qt_mac_post_retranslateAppMenu(), qt_mac_QStringListToNSMutableArrayVoid(), qt_mac_set_drawer_preferred_edge(), qt_mac_unregister_widget(), qt_mac_update_widget_position(), qt_mac_updateContentBorderMetricts(), qt_mac_updateToolBarButtonHint(), qt_mac_window_for(), qt_tablet_cleanup_wce(), QXlibWindow::QXlibWindow(), QWidgetPrivate::raise_sys(), QBBScreen::raiseWindow(), QBBScreen::removeWindow(), QXlibClipboard::requestor(), QXlibWindowSurface::resizeShmImage(), QDirectFBScreenCursor::set(), QApplication::setActiveWindow(), QWidgetPrivate::setConstraints_sys(), QWidgetPrivate::setFocus_sys(), QWidgetPrivate::setGeometry_sys(), QXlibClipboard::setOwner(), QBBWindow::setParent(), QWidgetPrivate::setParent_sys(), QXlibClipboard::setRequestor(), QmlJSDebugger::AbstractViewInspector::setShowAppOnTop(), QWidgetPrivate::setWindowOpacity_sys(), QWidget::setWindowState(), QDirectFBScreenCursor::show(), QWidgetPrivate::show_sys(), QWSWindow::shuttingDown(), QApplication::syncX(), QWindowsVistaStylePrivate::timerEvent(), QApplication::topLevelAt(), QWidget::topLevelWidget(), QX11PixmapData::transformed(), QETWidget::translateMouseEvent(), QApplicationPrivate::translateRawTouchEvent(), QETWidget::translateWheelEvent(), QTabBarPrivate::updateMacBorderMetrics(), QGLContext::updatePaintDevice(), updateRedirectedToGraphicsProxyWidget(), QApplication::widgetAt(), QBBScreen::windowGroupName(), QBBScreen::windowGroupStateChanged(), QWSServer::windowList(), QCocoaFontPanelDelegate::windowShouldClose:, QCocoaFontPanelDelegate::windowWillResize:toSize:, QWSWindowSurface::winId(), and QApplication::x11ProcessEvent().