Qt 4.8
|
#include <private/qt_mac_p.h>
#include <private/qeventdispatcher_mac_p.h>
#include "qapplication.h"
#include "qapplication_p.h"
#include "qbitmap.h"
#include "qcursor.h"
#include "qdesktopwidget.h"
#include "qevent.h"
#include "qfileinfo.h"
#include "qimage.h"
#include "qlayout.h"
#include "qmenubar.h"
#include <private/qbackingstore_p.h>
#include <private/qwindowsurface_mac_p.h>
#include <private/qpaintengine_mac_p.h>
#include "qpainter.h"
#include "qstyle.h"
#include "qtimer.h"
#include "qfocusframe.h"
#include "qdebug.h"
#include <private/qmainwindowlayout_p.h>
#include <private/qabstractscrollarea_p.h>
#include <qabstractscrollarea.h>
#include <ApplicationServices/ApplicationServices.h>
#include <limits.h>
#include <private/qt_cocoa_helpers_mac_p.h>
#include <private/qcocoaview_mac_p.h>
#include <private/qcocoawindow_mac_p.h>
#include <private/qcocoawindowdelegate_mac_p.h>
#include <private/qcocoapanel_mac_p.h>
#include "qwidget_p.h"
#include "qevent_p.h"
#include "qdnd_p.h"
#include <QtGui/qgraphicsproxywidget.h>
#include "qmainwindow.h"
Go to the source code of this file.
Classes | |
struct | QPaintEngineCleanupHandler |
Macros | |
#define | HIViewInstallEventHandler(target, handler, numTypes, list, userData, outHandlerRef) InstallEventHandler( HIObjectGetEventTarget( (HIObjectRef) (target) ), (handler), (numTypes), (list), (userData), (outHandlerRef) ) |
#define | kHIViewFeatureIgnoresClicks kHIViewIgnoresClicks |
#define | kHIViewScrollRectAdjustInvalid 1 |
#define | kHIViewScrollRectDontInvalidateRevealedArea 2 |
#define | ReleaseWindowGroup(x) Are you sure you wanted to do that? (you wanted qt_mac_release_window_group) |
#define | S "com.trolltech.qt-" S0(QT_NAMESPACE) ".widget" |
#define | S0(x) SS(x) |
#define | SF(x) ((x > max_f) ? max_f : x) |
#define | SS(x) #x |
#define | WRECT_MAX 8191 |
#define | XCOORD_MAX 16383 |
Typedefs | |
typedef QHash< Qt::WindowFlags, WindowGroupRef > | WindowGroupHash |
Enumerations | |
enum | { kWidgetPropertyQWidget = 'QWId' } |
enum | { kEventClassGesture = 'gest', kEventGestureStarted = 1, kEventGestureEnded = 2, kEventGestureMagnify = 4, kEventGestureSwipe = 5, kEventGestureRotate = 6, kEventParamRotationAmount = 'rota', kEventParamSwipeDirection = 'swip', kEventParamMagnificationAmount = 'magn' } |
Variables | |
static CFStringRef | kObjectQWidget = CFSTR(S) |
const UInt32 | kWidgetCreatorQt = kEventClassQt |
QWidget * | mac_keyboard_grabber = 0 |
QWidget * | mac_mouse_grabber = 0 |
static EventHandlerUPP | mac_widget_eventUPP = 0 |
static EventHandlerUPP | mac_win_eventUPP = 0 |
QPointer< QWidget > | qt_button_down |
QPointer< QWidget > | qt_last_mouse_receiver |
QPointer< QWidget > | qt_last_native_mouse_receiver |
static bool | qt_mac_raise_process = true |
static OSWindowRef | qt_root_win = 0 |
QPointer< QWidget > | topLevelAt_cache |
static HIObjectClassRef | widget_class = 0 |
static EventTypeSpec | widget_events [] |
static EventTypeSpec | window_events [] |
#define HIViewInstallEventHandler | ( | target, | |
handler, | |||
numTypes, | |||
list, | |||
userData, | |||
outHandlerRef | |||
) | InstallEventHandler( HIObjectGetEventTarget( (HIObjectRef) (target) ), (handler), (numTypes), (list), (userData), (outHandlerRef) ) |
Referenced by QWidgetPrivate::create_sys().
#define kHIViewFeatureIgnoresClicks kHIViewIgnoresClicks |
Referenced by QWidgetPrivate::setModal_sys().
#define kHIViewScrollRectAdjustInvalid 1 |
Definition at line 129 of file qwidget_mac.mm.
Referenced by QWidgetPrivate::scroll_sys().
#define kHIViewScrollRectDontInvalidateRevealedArea 2 |
Definition at line 130 of file qwidget_mac.mm.
#define ReleaseWindowGroup | ( | x | ) | Are you sure you wanted to do that? (you wanted qt_mac_release_window_group) |
Definition at line 536 of file qwidget_mac.mm.
Referenced by qt_mac_release_window_group().
#define S "com.trolltech.qt-" S0(QT_NAMESPACE) ".widget" |
Definition at line 165 of file qwidget_mac.mm.
Referenced by _qdtoa().
#define S0 | ( | x | ) | SS(x) |
Definition at line 164 of file qwidget_mac.mm.
#define SF | ( | x | ) | ((x > max_f) ? max_f : x) |
Referenced by qt_mac_update_widget_position().
#define SS | ( | x | ) | #x |
Definition at line 163 of file qwidget_mac.mm.
#define WRECT_MAX 8191 |
Definition at line 121 of file qwidget_mac.mm.
Referenced by qt_mac_update_widget_position().
#define XCOORD_MAX 16383 |
Definition at line 120 of file qwidget_mac.mm.
Referenced by qt_mac_update_widget_position().
typedef QHash<Qt::WindowFlags, WindowGroupRef> WindowGroupHash |
Definition at line 146 of file qwidget_mac.mm.
anonymous enum |
Enumerator | |
---|---|
kWidgetPropertyQWidget |
Definition at line 149 of file qwidget_mac.mm.
anonymous enum |
Definition at line 803 of file qwidget_mac.mm.
OSStatus _HIViewScrollRectWithOptions | ( | HIViewRef | , |
const HIRect * | , | ||
CGFloat | , | ||
CGFloat | , | ||
OptionBits | |||
) |
Referenced by QWidgetPrivate::scroll_sys().
|
static |
|
static |
NSComparisonResult compareViews2Lower | ( | id | view1, |
id | view2, | ||
void * | context | ||
) |
Definition at line 4005 of file qwidget_mac.mm.
Referenced by QWidgetPrivate::lower_sys().
NSComparisonResult compareViews2Raise | ( | id | view1, |
id | view2, | ||
void * | context | ||
) |
Definition at line 3927 of file qwidget_mac.mm.
Referenced by QWidgetPrivate::raise_sys().
NSComparisonResult compareViews2StackUnder | ( | id | view1, |
id | view2, | ||
void * | context | ||
) |
Definition at line 4041 of file qwidget_mac.mm.
Referenced by QWidgetPrivate::stackUnder_sys().
|
static |
Definition at line 1232 of file qwidget_mac.mm.
Referenced by QWidgetPrivate::create_sys(), and qt_mac_create_widget().
|
static |
Definition at line 846 of file qwidget_mac.mm.
Referenced by qt_mac_unregister_widget().
bool qt_event_remove_activate | ( | ) |
Definition at line 884 of file qapplication_mac.mm.
Referenced by QWidget::activateWindow(), qt_event_activate_timer_callbk(), and qt_event_request_activate().
void qt_event_request_activate | ( | QWidget * | ) |
Definition at line 911 of file qapplication_mac.mm.
Referenced by QWidgetPrivate::hide_sys(), and QWidgetPrivate::show_sys().
void qt_event_request_showsheet | ( | QWidget * | ) |
Definition at line 748 of file qapplication_mac.mm.
Referenced by QWidgetPrivate::show_sys().
void qt_event_request_window_change | ( | QWidget * | ) |
Definition at line 858 of file qapplication_mac.mm.
Referenced by QWidgetPrivate::hide_sys(), QWidgetPrivate::lower_sys(), make_widget_eventUPP(), make_win_eventUPP(), QWidgetPrivate::raise_sys(), QWidgetPrivate::scroll_sys(), QWidgetPrivate::setGeometry_sys(), QWidgetPrivate::setParent_sys(), QWidget::setWindowState(), QWidgetPrivate::show_sys(), and QWidgetPrivate::stackUnder_sys().
|
static |
Definition at line 464 of file qwidget_mac.mm.
Referenced by make_widget_eventUPP(), qt_isGenuineQWidget(), qt_mac_window_for(), and QWidgetPrivate::setParent_sys().
bool qt_isGenuineQWidget | ( | const QWidget * | window | ) |
Definition at line 473 of file qwidget_mac.mm.
Referenced by QApplicationPrivate::globalEventProcessor().
bool qt_mac_can_clickThrough | ( | const QWidget * | w | ) |
Definition at line 280 of file qwidget_mac.mm.
Referenced by QApplicationPrivate::globalEventProcessor(), QStyleOption::init(), and QWidget::setForegroundRole().
Referenced by make_widget_eventUPP(), and qt_mac_unregister_widget().
CGImageRef qt_mac_create_cgimage | ( | const QPixmap & | , |
bool | |||
) |
Definition at line 1109 of file qpixmap_mac.cpp.
Referenced by QWidgetPrivate::setWindowIcon_sys().
OSViewRef qt_mac_create_widget | ( | QWidget * | widget, |
QWidgetPrivate * | widgetPrivate, | ||
OSViewRef | parent | ||
) |
Definition at line 1602 of file qwidget_mac.mm.
Referenced by QWidgetPrivate::create_sys(), QMacNativeWidget::QMacNativeWidget(), and qt_mac_unregister_widget().
|
static |
Definition at line 778 of file qwidget_mac.mm.
Referenced by qt_mac_unregister_widget(), and updateRedirectedToGraphicsProxyWidget().
|
static |
Definition at line 203 of file qwidget_mac.mm.
Referenced by QWidgetPrivate::create_sys(), and qt_mac_unregister_widget().
|
static |
Definition at line 270 of file qwidget_mac.mm.
Referenced by QWidget::destroy(), and QWidgetPrivate::setParent_sys().
|
static |
Definition at line 235 of file qwidget_mac.mm.
Referenced by QWidgetPrivate::create_sys(), QWidget::destroy(), and QWidgetPrivate::setParent_sys().
|
static |
Definition at line 253 of file qwidget_mac.mm.
Referenced by QWidget::destroy(), qt_mac_unregister_widget(), and QWidgetPrivate::setParent_sys().
Q_GUI_EXPORT OSViewRef qt_mac_effectiveview_for | ( | const QWidget * | w | ) |
Definition at line 424 of file qwidget_mac.mm.
Referenced by flipPoint(), QMacWindowFader::performFade(), qt_mac_window_for(), QWidgetPrivate::registerDropSite(), and QWidgetPrivate::setFocus_sys().
void qt_mac_event_release | ( | QWidget * | w | ) |
Definition at line 1002 of file qapplication_mac.mm.
Referenced by QWidget::destroy(), and QWidgetPrivate::hide_sys().
QWidget* qt_mac_find_window | ( | OSWindowRef | window | ) |
Definition at line 391 of file qwidget_mac.mm.
Referenced by QApplicationPrivate::globalEventProcessor(), QWidgetPrivate::hide_sys(), make_win_eventUPP(), onApplicationChangedActivation(), qt_mac_window_at(), and QApplicationPrivate::tryModalHelper_sys().
Q_GUI_EXPORT OSViewRef qt_mac_get_contentview_for | ( | OSWindowRef | w | ) |
Definition at line 431 of file qwidget_mac.mm.
Referenced by QWidgetPrivate::create_sys(), qt_mac_unregister_widget(), and QWidgetPrivate::show_sys().
SInt32 qt_mac_get_group_level | ( | WindowClass | wclass | ) |
Definition at line 538 of file qwidget_mac.mm.
Referenced by qt_mac_set_window_group_to_popup(), qt_mac_set_window_group_to_stays_on_top(), and qt_mac_set_window_group_to_tooltip().
RgnHandle qt_mac_get_rgn | ( | ) |
Referenced by qt_mac_unregister_widget().
bool qt_mac_insideKeyWindow | ( | const QWidget * | w | ) |
Definition at line 311 of file qwidget_mac.mm.
Referenced by QWidget::previousInFocusChain().
bool qt_mac_is_macdrawer | ( | const QWidget * | w | ) |
Definition at line 306 of file qwidget_mac.mm.
Referenced by QWidget::activateWindow(), QMainWindow::addDockWidget(), QWidget::destroy(), QApplicationPrivate::globalEventProcessor(), QWidgetPrivate::hide_sys(), QWidget::previousInFocusChain(), qt_mac_set_drawer_preferred_edge(), qt_mac_unregister_widget(), QDockAreaLayoutInfo::restoreState(), QWidgetPrivate::setParent_sys(), QWidgetPrivate::show_sys(), and IsWindowAndNotDrawerOrSheetTest::test().
bool qt_mac_is_macsheet | ( | const QWidget * | w | ) |
Definition at line 295 of file qwidget_mac.mm.
Referenced by QFileDialogPrivate::createNavServicesDialog(), QApplicationPrivate::enterModal_sys(), QApplicationPrivate::globalEventProcessor(), QWidgetPrivate::hide_sys(), QFileDialogPrivate::hideCarbonNavServicesDialog(), QApplicationPrivate::leaveModal_sys(), make_win_eventUPP(), qt_event_request_showsheet(), qt_mac_unregister_widget(), QWidgetPrivate::show_sys(), QFontDialogPrivate::showCocoaFontPanel(), IsWindowAndNotDrawerOrSheetTest::test(), and QApplicationPrivate::tryModalHelper_sys().
Definition at line 3576 of file qwidget_mac.mm.
Referenced by QWidgetPrivate::childAtRecursiveHelper().
Q_GUI_EXPORT OSViewRef qt_mac_nativeview_for | ( | const QWidget * | w | ) |
Definition at line 419 of file qwidget_mac.mm.
Referenced by QMenuPrivate::QMacMenuPrivate::addAction(), QWidgetPrivate::create_sys(), QWidget::destroy(), QWidgetPrivate::hide_sys(), QWidgetPrivate::lower_sys(), make_widget_eventUPP(), make_win_eventUPP(), QWidget::mapFromGlobal(), QWidget::mapToGlobal(), QWidget::metric(), qt_mac_dispatchPendingUpdateRequests(), qt_mac_handleTabletEvent(), qt_mac_nativeMapFromParent(), qt_mac_post_retranslateAppMenu(), qt_mac_tablet_hash(), qt_mac_unregister_widget(), qt_mac_update_intersected_gl_widgets(), qt_mac_update_mouseTracking(), qt_mac_update_widget_position(), qt_mac_window_for(), QWidgetPrivate::raise_sys(), QWidgetPrivate::registerDropSite(), QWidgetPrivate::scroll_sys(), QWidgetPrivate::setFocus_sys(), QWidgetPrivate::setGeometry_sys(), QWidgetPrivate::setMask_sys(), QWidgetPrivate::setModal_sys(), QWidgetPrivate::setParent_sys(), QWidgetPrivate::show_sys(), QWidgetPrivate::stackUnder_sys(), QGLContext::updatePaintDevice(), and updateRedirectedToGraphicsProxyWidget().
Q_GUI_EXPORT QPoint qt_mac_posInWindow | ( | const QWidget * | w | ) |
Definition at line 380 of file qwidget_mac.mm.
Referenced by make_widget_eventUPP(), and qt_mac_get_widget_rgn().
|
static |
Definition at line 518 of file qwidget_mac.mm.
Referenced by qt_mac_release_window_group().
|
static |
Definition at line 530 of file qwidget_mac.mm.
Referenced by QWidgetPrivate::deleteTLSysExtra(), and qt_mac_unregister_widget().
Definition at line 448 of file qwidget_mac.mm.
Referenced by flipPoint(), qt_dispatchKeyEvent(), and qt_mac_handleTabletEvent().
bool qt_mac_set_drawer_preferred_edge | ( | QWidget * | w, |
Qt::DockWidgetArea | where | ||
) |
Definition at line 321 of file qwidget_mac.mm.
Referenced by QMainWindow::addDockWidget(), and QDockAreaLayoutInfo::restoreState().
|
inlinestatic |
Definition at line 406 of file qwidget_mac.mm.
Referenced by QWidget::activateWindow(), QWidgetPrivate::hide_sys(), and QWidget::setWindowState().
void Q_GUI_EXPORT qt_mac_set_raise_process | ( | bool | b | ) |
Definition at line 202 of file qwidget_mac.mm.
|
static |
Definition at line 549 of file qwidget_mac.mm.
Referenced by qt_mac_set_window_group_to_popup(), qt_mac_set_window_group_to_stays_on_top(), and qt_mac_set_window_group_to_tooltip().
|
inlinestatic |
Definition at line 582 of file qwidget_mac.mm.
Referenced by qt_mac_unregister_widget().
|
inlinestatic |
Definition at line 564 of file qwidget_mac.mm.
Referenced by qt_mac_unregister_widget().
|
inlinestatic |
Definition at line 573 of file qwidget_mac.mm.
Referenced by qt_mac_unregister_widget().
void qt_mac_setMouseGrabCursor | ( | bool | set, |
QCursor * | cursor = 0 |
||
) |
Definition at line 227 of file qcursor_mac.mm.
Referenced by QWidget::grabMouse(), and QWidget::releaseMouse().
void qt_mac_unregister_widget | ( | ) |
void qt_mac_update_cursor | ( | ) |
Definition at line 201 of file qcursor_mac.mm.
Referenced by QWidgetPrivate::hide_sys(), qt_mac_setMouseGrabCursor(), QWidgetPrivate::setCursor_sys(), QWidgetPrivate::show_sys(), and QWidgetPrivate::unsetCursor_sys().
Definition at line 4092 of file qwidget_mac.mm.
void qt_mac_updateParentUnderAlienWidget | ( | QWidget * | alienWidget | ) |
Definition at line 2740 of file qwidget_mac.mm.
Referenced by QWidget::destroy(), and QWidgetPrivate::hide_sys().
Q_GUI_EXPORT OSWindowRef qt_mac_window_for | ( | OSViewRef | view | ) |
Definition at line 453 of file qwidget_mac.mm.
Referenced by QWidget::activateWindow(), QWidgetPrivate::create_sys(), QWidget::destroy(), QWidgetPrivate::hide_sys(), QWidgetPrivate::lower_sys(), make_widget_eventUPP(), QWidget::mapFromGlobal(), QWidget::mapToGlobal(), qt_mac_set_drawer_preferred_edge(), qt_mac_unregister_widget(), qt_mac_update_widget_position(), qt_mac_window_for(), QWidgetPrivate::raise_sys(), QWidgetPrivate::registerDropSite(), QWidgetPrivate::setConstraints_sys(), QWidgetPrivate::setFocus_sys(), QWidgetPrivate::setGeometry_sys(), QWidgetPrivate::setMask_sys(), QWidgetPrivate::setModal_sys(), QWidgetPrivate::setParent_sys(), QWidgetPrivate::setWindowIcon_sys(), QWidgetPrivate::setWindowIconText_sys(), QWidgetPrivate::setWindowOpacity_sys(), QWidget::setWindowState(), QWidgetPrivate::setWindowTitle_sys(), QWidgetPrivate::show_sys(), QWidgetPrivate::updateFrameStrut(), and updateRedirectedToGraphicsProxyWidget().
Q_GUI_EXPORT OSWindowRef qt_mac_window_for | ( | const QWidget * | w | ) |
Definition at line 484 of file qwidget_mac.mm.
Referenced by QMainWindowLayout::cleanUpMacToolbarItems(), QPrintDialogPrivate::closeCarbonPrintPanel(), QFileDialogPrivate::createNavServicesDialog(), QCoreGraphicsPaintEngine::end(), flipPoint(), QMacWindowSurface::flush(), QRasterWindowSurface::flush(), QEventDispatcherMac::flush(), QApplicationPrivate::globalEventProcessor(), QToolBarPrivate::init(), QMainWindowLayout::insertIntoMacToolbar(), macWindowToolbarShow(), QPageSetupDialogPrivate::openCarbonPageLayout(), QPrintDialogPrivate::openCarbonPrintPanel(), QMacWindowFader::performFade(), qt_event_request_showsheet(), qt_mac_grabScreenRect_10_3(), qt_mac_graphicsContextFor(), qt_mac_is_metal(), qt_mac_post_retranslateAppMenu(), QMainWindowLayout::removeFromMacToolbar(), QMainWindowLayout::toggleToolBarsVisible(), QApplicationPrivate::tryModalHelper_sys(), QMainWindowLayout::updateHIToolBarStatus(), and QTabBarPrivate::updateMacBorderMetrics().
QMainWindowLayout * qt_mainwindow_layout | ( | const QMainWindow * | window | ) |
Definition at line 111 of file qmainwindow.cpp.
Referenced by QMainWindowLayoutState::apply(), qt_mac_unregister_widget(), QWidgetPrivate::setModal_sys(), and QWidgetPrivate::setParent_sys().
bool qt_nograb | ( | ) |
Definition at line 482 of file qapplication_mac.mm.
Referenced by QWidget::grabKeyboard(), QWidget::grabMouse(), QWidget::releaseKeyboard(), and QWidget::releaseMouse().
|
inlinestatic |
Definition at line 592 of file qwidget_mac.mm.
Referenced by QWidgetPrivate::createDefaultWindowSurface_sys().
|
inlinestatic |
Definition at line 609 of file qwidget_mac.mm.
|
static |
Definition at line 167 of file qwidget_mac.mm.
Referenced by make_widget_eventUPP(), qt_isGenuineQWidget(), and qt_mac_create_widget().
const UInt32 kWidgetCreatorQt = kEventClassQt |
Definition at line 148 of file qwidget_mac.mm.
Referenced by macWindowFade(), qt_mac_destructWindow(), qt_mac_find_window(), and qt_mac_unregister_widget().
QWidget* mac_keyboard_grabber = 0 |
Definition at line 157 of file qwidget_mac.mm.
Referenced by QApplicationPrivate::globalEventProcessor(), QWidget::keyboardGrabber(), and qt_wstate_iconified().
QWidget* mac_mouse_grabber = 0 |
Definition at line 156 of file qwidget_mac.mm.
Referenced by flipPoint(), QApplicationPrivate::globalEventProcessor(), QWidget::mouseGrabber(), QMacWindowFader::performFade(), and qt_wstate_iconified().
|
static |
Definition at line 1226 of file qwidget_mac.mm.
Referenced by cleanup_widget_eventUPP(), and make_widget_eventUPP().
|
static |
Definition at line 840 of file qwidget_mac.mm.
Referenced by cleanup_win_eventUPP(), and make_win_eventUPP().
Definition at line 188 of file qapplication_mac.mm.
Referenced by QApplicationPrivate::globalEventProcessor(), QETWidget::translateMouseEvent(), and QETWidget::translateTabletEvent().
Definition at line 189 of file qapplication_mac.mm.
Referenced by flipPoint().
|
static |
Definition at line 154 of file qwidget_mac.mm.
Referenced by qt_mac_set_raise_process(), and QWidgetPrivate::raise_sys().
|
static |
Definition at line 155 of file qwidget_mac.mm.
Referenced by QWidgetPrivate::create_sys(), QWidget::destroy(), qt_mac_unregister_widget(), and updateRedirectedToGraphicsProxyWidget().
Definition at line 168 of file qapplication_mac.mm.
|
static |
Definition at line 1202 of file qwidget_mac.mm.
Referenced by qt_mac_create_widget(), and qt_mac_unregister_widget().
|
static |
Definition at line 1203 of file qwidget_mac.mm.
Referenced by QWidgetPrivate::create_sys(), and qt_mac_create_widget().
|
static |
Definition at line 818 of file qwidget_mac.mm.
Referenced by qt_mac_unregister_widget().