Qt 4.8
Classes | Macros | Enumerations | Functions | Variables
qapplication_mac.mm File Reference
#include <Cocoa/Cocoa.h>
#include "qapplication.h"
#include "qbitarray.h"
#include "qclipboard.h"
#include "qcursor.h"
#include "qdatastream.h"
#include "qdatetime.h"
#include "qdesktopwidget.h"
#include "qdockwidget.h"
#include "qevent.h"
#include "qhash.h"
#include "qlayout.h"
#include "qmenubar.h"
#include "qmessagebox.h"
#include "qmime.h"
#include "qpixmapcache.h"
#include "qpointer.h"
#include "qsessionmanager.h"
#include "qsettings.h"
#include "qsocketnotifier.h"
#include "qstyle.h"
#include "qstylefactory.h"
#include "qtextcodec.h"
#include "qtoolbar.h"
#include "qvariant.h"
#include "qwidget.h"
#include "qcolormap.h"
#include "qdir.h"
#include "qdebug.h"
#include "qtimer.h"
#include "qurl.h"
#include "private/qmacinputcontext_p.h"
#include "private/qpaintengine_mac_p.h"
#include "private/qcursor_p.h"
#include "private/qapplication_p.h"
#include "private/qcolor_p.h"
#include "private/qwidget_p.h"
#include "private/qkeymapper_p.h"
#include "private/qeventdispatcher_mac_p.h"
#include "private/qeventdispatcher_unix_p.h"
#include <private/qcocoamenuloader_mac_p.h>
#include <private/qcocoaapplication_mac_p.h>
#include <private/qcocoaapplicationdelegate_mac_p.h>
#include <private/qt_cocoa_helpers_mac_p.h>
#include <private/qcocoawindow_mac_p.h>
#include <private/qpixmap_mac_p.h>
#include <private/qdesktopwidget_mac_p.h>
#include <qvarlengtharray.h>
#include "qaccessible.h"
#include "qmutex.h"
#include <unistd.h>
#include <string.h>
#include <sys/time.h>
#include <sys/select.h>
#include "qregexp.h"

Go to the source code of this file.

Classes

struct  QMacAppleEventTypeSpec
 

Macros

#define kCMDefaultDeviceNotification   CFSTR("CMDefaultDeviceNotification")
 
#define kCMDefaultDeviceProfileNotification   CFSTR("CMDefaultDeviceProfileNotification")
 
#define kCMDeviceProfilesNotification   CFSTR("CMDeviceProfilesNotification")
 
#define kCMDeviceUnregisteredNotification   CFSTR("CMDeviceUnregisteredNotification")
 
#define kThemeBrushAlternatePrimaryHighlightColor   -5
 
#define QMAC_SPEAK_TO_ME
 
#define qt_mac_debug_palette(x, y, z)
 

Enumerations

enum  { kEventMouseScroll = 11, kEventParamMouseWheelSmoothVerticalDelta = 'saxy', kEventParamMouseWheelSmoothHorizontalDelta = 'saxx' }
 

Functions

void onApplicationChangedActivation (bool activated)
 
void onApplicationWindowChangedActivation (QWidget *widget, bool activated)
 
void qt_cleanup ()
 
void qt_color_profile_changed (CFNotificationCenterRef, void *, CFStringRef, const void *, CFDictionaryRef)
 
void qt_event_activate_timer_callbk (EventLoopTimerRef r, void *)
 
bool qt_event_remove_activate ()
 
void qt_event_request_activate (QWidget *w)
 
static void qt_event_request_context (QWidget *w=0, EventRef *where=0)
 
void qt_event_request_menubarupdate ()
 
void qt_event_request_showsheet (QWidget *w)
 
Q_GUI_EXPORT void qt_event_request_window_change ()
 
Q_GUI_EXPORT void qt_event_request_window_change (QWidget *widget)
 
void qt_event_send_clipboard_changed ()
 
void qt_init (QApplicationPrivate *priv, int)
 
void qt_init_app_proc_handler ()
 
static void qt_init_tablet_proximity_handler ()
 
void qt_mac_beep ()
 
bool qt_mac_can_clickThrough (const QWidget *)
 
void qt_mac_cancel_notification ()
 
void qt_mac_command_set_enabled (MenuRef, UInt32, bool)
 
void qt_mac_display_change_callbk (CGDirectDisplayID, CGDisplayChangeSummaryFlags flags, void *)
 
static void qt_mac_event_release (EventRef &event)
 
static void qt_mac_event_release (QWidget *w, EventRef &event)
 
void qt_mac_event_release (QWidget *w)
 
static bool qt_mac_event_remove (EventRef &event)
 
Q_GUI_EXPORT bool qt_mac_execute_apple_script (const char *script, long script_len, AEDesc *ret)
 
Q_GUI_EXPORT bool qt_mac_execute_apple_script (const char *script, AEDesc *ret)
 
Q_GUI_EXPORT bool qt_mac_execute_apple_script (const QString &script, AEDesc *ret)
 
QWidgetqt_mac_find_window (OSWindowRef)
 
Qt::KeyboardModifiers qt_mac_get_modifiers (int keys)
 
bool qt_mac_is_macdrawer (const QWidget *)
 
bool qt_mac_is_macsheet (const QWidget *)
 
static void qt_mac_read_fontsmoothing_settings ()
 
void qt_mac_send_notification ()
 
void qt_mac_send_posted_gl_updates (QWidget *widget)
 
void qt_mac_set_app_icon (const QPixmap &pixmap)
 
void qt_mac_set_cursor (const QCursor *)
 
Q_GUI_EXPORT void qt_mac_set_dock_menu (QMenu *menu)
 
Q_GUI_EXPORT void qt_mac_set_press_and_hold_context (bool b)
 
static void qt_mac_update_child_gl_widgets (QWidget *widget)
 
void qt_mac_update_cursor ()
 
static void qt_mac_update_intersected_gl_widgets (QWidget *widget)
 
void qt_mac_update_os_settings ()
 
static short qt_mac_window_at (int x, int y, QWidget **w=0)
 
OSWindowRef qt_mac_window_for (const QWidget *)
 
bool qt_nograb ()
 
static void qt_post_window_change_event (QWidget *widget)
 
void qt_release_app_proc_handler ()
 
void qt_release_apple_event_handler ()
 
static void qt_release_tablet_proximity_handler ()
 
bool qt_sendSpontaneousEvent (QObject *obj, QEvent *event)
 
static bool qt_try_modal (QWidget *widget, EventRef event)
 
void qt_updated_rootinfo ()
 
bool qt_wstate_iconified (WId)
 

Variables

struct QMacAppleEventTypeSpec app_apple_events []
 
static bool app_do_modal = false
 
static EventTypeSpec app_events []
 
static AEEventHandlerUPP app_proc_ae_handlerUPP = NULL
 
static EventHandlerRef app_proc_handler = 0
 
static EventHandlerUPP app_proc_handlerUPP = 0
 
static bool appNoGrab = false
 
QWidgetmac_keyboard_grabber
 
QWidgetmac_mouse_grabber
 
int qt_antialiasing_threshold
 
Q_GUI_EXPORT bool qt_applefontsmoothing_enabled
 
QWidgetqt_button_down
 
static bool qt_button_down_in_content
 
QPointer< QWidgetqt_last_mouse_receiver
 
bool qt_mac_app_fullscreen = false
 
static bool qt_mac_collapse_on_dblclick = true
 
struct {
   int   last_button
 
   int   last_modifiers
 
   EventTime   last_time
 
   QPointer< QWidget >   last_widget
 
   int   last_x
 
   int   last_y
 
   bool   use_qt_time_limit
 
qt_mac_dblclick = { false, 0, -1, -1, 0, 0, -2 }
 
static QMenuqt_mac_dock_menu = 0
 
static bool qt_mac_no_click_through_mode = false
 
static NMRec qt_mac_notification = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }
 
static bool qt_mac_previous_press_in_popup_mode = false
 
QPaintDeviceqt_mac_safe_pdev = 0
 
QWidgetListqt_modal_stack
 
bool qt_scrollbar_jump_to_pos = false
 
bool qt_tab_all_widgets
 
struct {
   EventRef   event
 
   EventLoopTimerRef   timer
 
   EventLoopTimerUPP   timerUPP
 
   QPointer< QWidget >   widget
 
request_activate_pending = { 0, 0, 0, 0 }
 
static EventRef request_context_pending = 0
 
static EventRef request_menubarupdate_pending = 0
 
static EventRef request_showsheet_pending = 0
 
static EventRef request_window_change_pending = 0
 
static int tablet_button_state = 0
 
static EventHandlerRef tablet_proximity_handler = 0
 
static EventHandlerUPP tablet_proximity_UPP = 0
 
QPointer< QWidgettopLevelAt_cache = 0
 

Macro Definition Documentation

◆ kCMDefaultDeviceNotification

#define kCMDefaultDeviceNotification   CFSTR("CMDefaultDeviceNotification")

Definition at line 159 of file qapplication_mac.mm.

Referenced by qt_cleanup(), and qt_init().

◆ kCMDefaultDeviceProfileNotification

#define kCMDefaultDeviceProfileNotification   CFSTR("CMDefaultDeviceProfileNotification")

Definition at line 161 of file qapplication_mac.mm.

Referenced by qt_cleanup(), and qt_init().

◆ kCMDeviceProfilesNotification

#define kCMDeviceProfilesNotification   CFSTR("CMDeviceProfilesNotification")

Definition at line 160 of file qapplication_mac.mm.

Referenced by qt_cleanup(), and qt_init().

◆ kCMDeviceUnregisteredNotification

#define kCMDeviceUnregisteredNotification   CFSTR("CMDeviceUnregisteredNotification")

Definition at line 158 of file qapplication_mac.mm.

Referenced by qt_cleanup(), and qt_init().

◆ kThemeBrushAlternatePrimaryHighlightColor

#define kThemeBrushAlternatePrimaryHighlightColor   -5

◆ QMAC_SPEAK_TO_ME

#define QMAC_SPEAK_TO_ME

Definition at line 149 of file qapplication_mac.mm.

◆ qt_mac_debug_palette

#define qt_mac_debug_palette (   x,
  y,
 
)

Enumeration Type Documentation

◆ anonymous enum

anonymous enum
Enumerator
kEventMouseScroll 
kEventParamMouseWheelSmoothVerticalDelta 
kEventParamMouseWheelSmoothHorizontalDelta 

Definition at line 1032 of file qapplication_mac.mm.

Function Documentation

◆ onApplicationChangedActivation()

void onApplicationChangedActivation ( bool  activated)

Definition at line 3127 of file qapplication_mac.mm.

3128 {
3129 #if QT_MAC_USE_COCOA
3130  QApplication *app = qApp;
3131 
3132 //NSLog(@"App Changed Activation\n");
3133 
3134  if ( activated ) {
3137 
3138  if (qt_clipboard) { //manufacture an event so the clipboard can see if it has changed
3141  }
3142 
3143  if (app) {
3145  qt_sendSpontaneousEvent(app, &ev);
3146  }
3147 
3148  if (!app->activeWindow()) {
3149  OSWindowRef wp = [NSApp keyWindow];
3150  if (QWidget *tmp_w = qt_mac_find_window(wp))
3151  app->setActiveWindow(tmp_w);
3152  }
3155  } else { // de-activated
3156  QApplicationPrivate *priv = [[QT_MANGLE_NAMESPACE(QCocoaApplicationDelegate) sharedDelegate] qAppPrivate];
3157  if (priv->inPopupMode())
3158  app->activePopupWidget()->close();
3159  if (app) {
3161  qt_sendSpontaneousEvent(app, &ev);
3162  }
3163  app->setActiveWindow(0);
3164  }
3165 #else
3166  Q_UNUSED(activated);
3167 #endif
3168 }
The QApplication class manages the GUI application&#39;s control flow and main settings.
Definition: qapplication.h:99
bool inPopupMode() const
static QWidget * activeWindow()
Returns the application top-level window that has the keyboard input focus, or 0 if no application wi...
The QWidget class is the base class of all user interface objects.
Definition: qwidget.h:150
void qt_mac_update_cursor()
Definition: qcursor_mac.mm:201
QClipboard * qt_clipboard
WindowRef OSWindowRef
#define qApp
void qt_mac_update_os_settings()
static void setActiveWindow(QWidget *act)
Sets the active window to the active widget in response to a system event.
bool qt_sendSpontaneousEvent(QObject *obj, QEvent *event)
static QWidget * activePopupWidget()
Returns the active popup widget.
QWidget * qt_mac_find_window(OSWindowRef)
Definition: qwidget_mac.mm:391
#define QT_MANGLE_NAMESPACE(name)
Definition: qglobal.h:106
static bool desktopSettingsAware()
Returns true if Qt is set to use the system&#39;s standard colors, fonts, etc.
static const QMetaObjectPrivate * priv(const uint *data)
static bool macUpdateMenuBar()
Definition: qmenu_mac.mm:2055
bool close()
Closes this widget.
Definition: qwidget.cpp:8305
The QEvent class is the base class of all event classes.
Definition: qcoreevent.h:56
#define Q_UNUSED(x)
Indicates to the compiler that the parameter with the specified name is not used in the body of a fun...
Definition: qglobal.h:1729

◆ onApplicationWindowChangedActivation()

void onApplicationWindowChangedActivation ( QWidget widget,
bool  activated 
)

Definition at line 3101 of file qapplication_mac.mm.

3102 {
3103 #if QT_MAC_USE_COCOA
3104  if (!widget)
3105  return;
3106 
3107  if (activated) {
3109  QEvent ev(QEvent::Style);
3111  }
3112  qApp->setActiveWindow(widget);
3113  } else { // deactivated
3114  if (QApplicationPrivate::active_window == widget)
3115  qApp->setActiveWindow(0);
3116  }
3117 
3120 #else
3121  Q_UNUSED(widget);
3122  Q_UNUSED(activated);
3123 #endif
3124 }
static QWidget * active_window
void qt_mac_update_cursor()
Definition: qcursor_mac.mm:201
#define qApp
static QStyle * app_style
bool qt_sendSpontaneousEvent(QObject *obj, QEvent *event)
static bool macUpdateMenuBar()
Definition: qmenu_mac.mm:2055
The QEvent class is the base class of all event classes.
Definition: qcoreevent.h:56
#define Q_UNUSED(x)
Indicates to the compiler that the parameter with the specified name is not used in the body of a fun...
Definition: qglobal.h:1729

◆ qt_cleanup()

void qt_cleanup ( )

Definition at line 1328 of file qapplication_mac.mm.

1329 {
1330  CGDisplayRemoveReconfigurationCallback(qt_mac_display_change_callbk, 0);
1331  CFNotificationCenterRef center = CFNotificationCenterGetDistributedCenter();
1332  CFNotificationCenterRemoveObserver(center, qApp, kCMDeviceUnregisteredNotification, 0);
1333  CFNotificationCenterRemoveObserver(center, qApp, kCMDefaultDeviceNotification, 0);
1334  CFNotificationCenterRemoveObserver(center, qApp, kCMDeviceProfilesNotification, 0);
1335  CFNotificationCenterRemoveObserver(center, qApp, kCMDefaultDeviceProfileNotification, 0);
1336 
1337 #ifndef QT_MAC_USE_COCOA
1339  if (app_proc_handlerUPP) {
1340  DisposeEventHandlerUPP(app_proc_handlerUPP);
1341  app_proc_handlerUPP = 0;
1342  }
1343 #endif
1345 
1346 #ifdef QT_MAC_USE_COCOA
1347  qt_resetNSApplicationSendEvent();
1348 #endif
1349 
1352  DisposeEventHandlerUPP(tablet_proximity_UPP);
1353 
1355  if (qt_is_gui_used) {
1356 #ifndef QT_NO_ACCESSIBILITY
1358 #endif
1359 #ifndef QT_NO_IM
1361 #endif
1363  QFont::cleanup();
1365  if (qt_mac_safe_pdev) {
1366  delete qt_mac_safe_pdev;
1367  qt_mac_safe_pdev = 0;
1368  }
1369  extern void qt_mac_unregister_widget(); // qapplication_mac.cpp
1371  }
1372 }
#define kCMDefaultDeviceNotification
void qt_mac_unregister_widget()
#define kCMDeviceProfilesNotification
static void cleanup()
Internal function that cleans up the font system.
Definition: qfont_mac.cpp:93
static EventHandlerUPP tablet_proximity_UPP
static void cleanup()
QTextStream & center(QTextStream &stream)
Calls QTextStream::setFieldAlignment(QTextStream::AlignCenter) on stream and returns stream...
void qt_release_app_proc_handler()
#define qApp
static void clear()
Removes all pixmaps from the cache.
#define kCMDefaultDeviceProfileNotification
QPaintDevice * qt_mac_safe_pdev
static EventHandlerUPP app_proc_handlerUPP
#define kCMDeviceUnregisteredNotification
static void qt_release_tablet_proximity_handler()
void qt_release_apple_event_handler()
void qt_mac_display_change_callbk(CGDirectDisplayID, CGDisplayChangeSummaryFlags flags, void *)
static void cleanup()
Definition: qcursor.cpp:402
bool qt_is_gui_used
static void cleanup()

◆ qt_color_profile_changed()

void qt_color_profile_changed ( CFNotificationCenterRef  ,
void *  ,
CFStringRef  ,
const void *  ,
CFDictionaryRef   
)

Definition at line 1122 of file qapplication_mac.mm.

Referenced by qt_init().

◆ qt_event_activate_timer_callbk()

void qt_event_activate_timer_callbk ( EventLoopTimerRef  r,
void *   
)

Definition at line 895 of file qapplication_mac.mm.

Referenced by qt_event_request_activate().

896 {
897  EventLoopTimerRef otc = request_activate_pending.timer;
899  if (r == otc && !request_activate_pending.widget.isNull()) {
900  const QWidget *tlw = request_activate_pending.widget->window();
901  Qt::WindowType wt = tlw->windowType();
902  if (tlw->isVisible()
903  && ((wt != Qt::Desktop && wt != Qt::Popup && wt != Qt::Tool) || tlw->isModal())) {
904  CreateEvent(0, kEventClassQt, kEventQtRequestActivate, GetCurrentEventTime(),
905  kEventAttributeUserEvent, &request_activate_pending.event);
906  PostEventToQueue(GetMainEventQueue(), request_activate_pending.event, kEventPriorityHigh);
907  }
908  }
909 }
bool isModal() const
Definition: qwidget.h:951
bool qt_event_remove_activate()
bool isVisible() const
Definition: qwidget.h:1005
The QWidget class is the base class of all user interface objects.
Definition: qwidget.h:150
static struct @193 request_activate_pending
WindowType
Definition: qnamespace.h:270
const UInt32 kEventClassQt
Definition: qt_mac_p.h:92
Qt::WindowType windowType() const
Returns the window type of this widget.
Definition: qwidget.h:937

◆ qt_event_remove_activate()

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().

885 {
886  if (request_activate_pending.timer) {
887  RemoveEventLoopTimer(request_activate_pending.timer);
888  request_activate_pending.timer = 0;
889  }
890  if (request_activate_pending.event)
892  return true;
893 }
static struct @193 request_activate_pending
static void qt_mac_event_release(EventRef &event)

◆ qt_event_request_activate()

void qt_event_request_activate ( QWidget w)

Definition at line 911 of file qapplication_mac.mm.

Referenced by QWidgetPrivate::hide_sys(), and QWidgetPrivate::show_sys().

912 {
913  if (w == request_activate_pending.widget)
914  return;
915 
916  /* We put these into a timer because due to order of events being sent we need to be sure this
917  comes from inside of the event loop */
919  if (!request_activate_pending.timerUPP)
920  request_activate_pending.timerUPP = NewEventLoopTimerUPP(qt_event_activate_timer_callbk);
921  request_activate_pending.widget = w;
922  InstallEventLoopTimer(GetMainEventLoop(), 0, 0, request_activate_pending.timerUPP, 0, &request_activate_pending.timer);
923 }
bool qt_event_remove_activate()
static struct @193 request_activate_pending
void qt_event_activate_timer_callbk(EventLoopTimerRef r, void *)

◆ qt_event_request_context()

static void qt_event_request_context ( QWidget w = 0,
EventRef where = 0 
)
static

Definition at line 954 of file qapplication_mac.mm.

Referenced by QApplicationPrivate::globalEventProcessor().

955 {
956  if (!where)
957  where = &request_context_pending;
958  if (*where)
959  return;
960  CreateEvent(0, kEventClassQt, kEventQtRequestContext, GetCurrentEventTime(),
961  kEventAttributeUserEvent, where);
962  if (w)
963  SetEventParameter(*where, kEventParamQWidget, typeQWidget, sizeof(w), &w);
964  PostEventToQueue(GetMainEventQueue(), *where, kEventPriorityStandard);
965 }
static EventRef request_context_pending
const UInt32 kEventClassQt
Definition: qt_mac_p.h:92

◆ qt_event_request_menubarupdate()

void qt_event_request_menubarupdate ( )

Definition at line 930 of file qapplication_mac.mm.

Referenced by QApplicationPrivate::enterModal_sys(), QApplicationPrivate::leaveModal_sys(), QMenuBarPrivate::macCreateMenuBar(), and QMenuBarPrivate::macDestroyMenuBar().

931 {
932 #ifndef QT_MAC_USE_COCOA
934  if (IsEventInQueue(GetMainEventQueue(), request_menubarupdate_pending))
935  return;
936 #ifdef DEBUG_DROPPED_EVENTS
937  qDebug("%s:%d Whoa, we dropped an event on the floor!", __FILE__, __LINE__);
938 #endif
939  }
940 
941  CreateEvent(0, kEventClassQt, kEventQtRequestMenubarUpdate, GetCurrentEventTime(),
942  kEventAttributeUserEvent, &request_menubarupdate_pending);
943  PostEventToQueue(GetMainEventQueue(), request_menubarupdate_pending, kEventPriorityHigh);
944 #else
945  // Just call this. The request has the benefit that we don't call this multiple times, but
946  // we can optimize this.
948 #endif
949 }
Q_CORE_EXPORT void qDebug(const char *,...)
static EventRef request_menubarupdate_pending
const UInt32 kEventClassQt
Definition: qt_mac_p.h:92
static bool macUpdateMenuBar()
Definition: qmenu_mac.mm:2055

◆ qt_event_request_showsheet()

void qt_event_request_showsheet ( QWidget w)

Definition at line 748 of file qapplication_mac.mm.

Referenced by QWidgetPrivate::show_sys().

749 {
751 #ifdef QT_MAC_USE_COCOA
752  w->repaint();
753  [NSApp beginSheet:qt_mac_window_for(w) modalForWindow:qt_mac_window_for(w->parentWidget())
754  modalDelegate:nil didEndSelector:nil contextInfo:0];
755 #else
757  CreateEvent(0, kEventClassQt, kEventQtRequestShowSheet, GetCurrentEventTime(),
758  kEventAttributeUserEvent, &request_showsheet_pending);
759  SetEventParameter(request_showsheet_pending, kEventParamQWidget, typeQWidget, sizeof(w), &w);
760  PostEventToQueue(GetMainEventQueue(), request_showsheet_pending, kEventPriorityStandard);
761 #endif
762 }
QWidget * parentWidget() const
Returns the parent of this widget, or 0 if it does not have any parent widget.
Definition: qwidget.h:1035
static EventRef request_showsheet_pending
#define Q_ASSERT(cond)
Definition: qglobal.h:1823
OSWindowRef qt_mac_window_for(const QWidget *)
Definition: qwidget_mac.mm:484
void repaint()
Repaints the widget directly by calling paintEvent() immediately, unless updates are disabled or the ...
Definition: qwidget.cpp:10761
const UInt32 kEventClassQt
Definition: qt_mac_p.h:92
bool qt_mac_is_macsheet(const QWidget *)
Definition: qwidget_mac.mm:295
static bool qt_mac_event_remove(EventRef &event)

◆ qt_event_request_window_change() [1/2]

Q_GUI_EXPORT void qt_event_request_window_change ( )

Definition at line 846 of file qapplication_mac.mm.

Referenced by qt_event_request_window_change().

847 {
849  return;
850 
851  CreateEvent(0, kEventClassQt, kEventQtRequestWindowChange, GetCurrentEventTime(),
852  kEventAttributeUserEvent, &request_window_change_pending);
853  PostEventToQueue(GetMainEventQueue(), request_window_change_pending, kEventPriorityHigh);
854 }
const UInt32 kEventClassQt
Definition: qt_mac_p.h:92
static EventRef request_window_change_pending

◆ qt_event_request_window_change() [2/2]

Q_GUI_EXPORT void qt_event_request_window_change ( QWidget widget)

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().

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 }
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_event_send_clipboard_changed()

void qt_event_send_clipboard_changed ( )

Definition at line 978 of file qapplication_mac.mm.

979 {
980 #ifndef QT_MAC_USE_COCOA
981  AppleEvent ae;
982  if (AECreateAppleEvent(kEventClassQt, typeAEClipboardChanged, 0, kAutoGenerateReturnID, kAnyTransactionID, &ae) != noErr)
983  qDebug("Can't happen!!");
984  AppleEvent reply;
985  AESend(&ae, &reply, kAENoReply, kAENormalPriority, kAEDefaultTimeout, 0, 0);
986 #endif
987 }
Q_CORE_EXPORT void qDebug(const char *,...)
AERecord AppleEvent
const UInt32 kEventClassQt
Definition: qt_mac_p.h:92

◆ qt_init()

void qt_init ( QApplicationPrivate priv,
int   
)

Definition at line 1128 of file qapplication_mac.mm.

1129 {
1130  if (qt_is_gui_used) {
1131  CGDisplayRegisterReconfigurationCallback(qt_mac_display_change_callbk, 0);
1132  CFNotificationCenterRef center = CFNotificationCenterGetDistributedCenter();
1133  CFNotificationCenterAddObserver(center, qApp, qt_color_profile_changed,
1135  CFNotificationSuspensionBehaviorDeliverImmediately);
1136  CFNotificationCenterAddObserver(center, qApp, qt_color_profile_changed,
1138  CFNotificationSuspensionBehaviorDeliverImmediately);
1139  CFNotificationCenterAddObserver(center, qApp, qt_color_profile_changed,
1141  CFNotificationSuspensionBehaviorDeliverImmediately);
1142  CFNotificationCenterAddObserver(center, qApp, qt_color_profile_changed,
1144  CFNotificationSuspensionBehaviorDeliverImmediately);
1145  ProcessSerialNumber psn;
1146  if (GetCurrentProcess(&psn) == noErr) {
1147  // Jambi needs to transform itself since most people aren't "used"
1148  // to putting things in bundles, but other people may actually not
1149  // want to tranform the process (running as a helper or something)
1150  // so don't do that for them. This means checking both LSUIElement
1151  // and LSBackgroundOnly. If you set them both... well, you
1152  // shouldn't do that.
1153 
1154  bool forceTransform = true;
1155  CFTypeRef value = CFBundleGetValueForInfoDictionaryKey(CFBundleGetMainBundle(),
1156  CFSTR("LSUIElement"));
1157  if (value) {
1158  CFTypeID valueType = CFGetTypeID(value);
1159  // Officially it's supposed to be a string, a boolean makes sense, so we'll check.
1160  // A number less so, but OK.
1161  if (valueType == CFStringGetTypeID())
1162  forceTransform = !(QCFString::toQString(static_cast<CFStringRef>(value)).toInt());
1163  else if (valueType == CFBooleanGetTypeID())
1164  forceTransform = !CFBooleanGetValue(static_cast<CFBooleanRef>(value));
1165  else if (valueType == CFNumberGetTypeID()) {
1166  int valueAsInt;
1167  CFNumberGetValue(static_cast<CFNumberRef>(value), kCFNumberIntType, &valueAsInt);
1168  forceTransform = !valueAsInt;
1169  }
1170  }
1171 
1172  if (forceTransform) {
1173  value = CFBundleGetValueForInfoDictionaryKey(CFBundleGetMainBundle(),
1174  CFSTR("LSBackgroundOnly"));
1175  if (value) {
1176  CFTypeID valueType = CFGetTypeID(value);
1177  if (valueType == CFBooleanGetTypeID())
1178  forceTransform = !CFBooleanGetValue(static_cast<CFBooleanRef>(value));
1179  else if (valueType == CFStringGetTypeID())
1180  forceTransform = !(QCFString::toQString(static_cast<CFStringRef>(value)).toInt());
1181  else if (valueType == CFNumberGetTypeID()) {
1182  int valueAsInt;
1183  CFNumberGetValue(static_cast<CFNumberRef>(value), kCFNumberIntType, &valueAsInt);
1184  forceTransform = !valueAsInt;
1185  }
1186  }
1187  }
1188 
1189 
1190  if (forceTransform) {
1191  TransformProcessType(&psn, kProcessTransformToForegroundApplication);
1192  }
1193  }
1194  }
1195 
1196  char **argv = priv->argv;
1197 
1198  // Get command line params
1199  if (int argc = priv->argc) {
1200  int i, j = 1;
1201  QString passed_psn;
1202  for(i=1; i < argc; i++) {
1203  if (argv[i] && *argv[i] != '-') {
1204  argv[j++] = argv[i];
1205  continue;
1206  }
1207  QByteArray arg(argv[i]);
1208 #if defined(QT_DEBUG)
1209  if (arg == "-nograb")
1210  appNoGrab = !appNoGrab;
1211  else
1212 #endif // QT_DEBUG
1213  if (arg.left(5) == "-psn_") {
1214  passed_psn = QString::fromLatin1(arg.mid(6));
1215  } else {
1216  argv[j++] = argv[i];
1217  }
1218  }
1219  if (j < priv->argc) {
1220  priv->argv[j] = 0;
1221  priv->argc = j;
1222  }
1223 
1224  //special hack to change working directory (for an app bundle) when running from finder
1225  if (!passed_psn.isNull() && QDir::currentPath() == QLatin1String("/")) {
1226  QCFType<CFURLRef> bundleURL(CFBundleCopyBundleURL(CFBundleGetMainBundle()));
1227  QString qbundlePath = QCFString(CFURLCopyFileSystemPath(bundleURL,
1228  kCFURLPOSIXPathStyle));
1229  if (qbundlePath.endsWith(QLatin1String(".app")))
1230  QDir::setCurrent(qbundlePath.section(QLatin1Char('/'), 0, -2));
1231  }
1232  }
1233 
1235 
1236  qApp->setObjectName(priv->appName());
1237  if (qt_is_gui_used) {
1242 #ifndef QT_NO_ACCESSIBILITY
1244 #endif
1245 #ifndef QT_NO_IM
1248 #endif
1251 #ifndef QT_MAC_USE_COCOA
1252  if (!app_proc_handler) {
1255  }
1256 
1257 #endif
1260  for(uint i = 0; i < sizeof(app_apple_events) / sizeof(QMacAppleEventTypeSpec); ++i) {
1261  // Install apple event handler, but avoid overwriting an already
1262  // existing handler (it means a 3rd party application has installed one):
1263  SRefCon refCon = 0;
1264  AEEventHandlerUPP current_handler = NULL;
1265  AEGetEventHandler(app_apple_events[i].mac_class, app_apple_events[i].mac_id, &current_handler, &refCon, false);
1266  if (!current_handler)
1267  AEInstallEventHandler(app_apple_events[i].mac_class, app_apple_events[i].mac_id,
1268  app_proc_ae_handlerUPP, SRefCon(qApp), false);
1269  }
1270  }
1271 
1273  QEvent ev(QEvent::Style);
1275  }
1276  }
1279 
1280  // Cocoa application delegate
1281 #ifdef QT_MAC_USE_COCOA
1282  NSApplication *cocoaApp = [QT_MANGLE_NAMESPACE(QNSApplication) sharedApplication];
1283  qt_redirectNSApplicationSendEvent();
1284 
1286  id oldDelegate = [cocoaApp delegate];
1287  QT_MANGLE_NAMESPACE(QCocoaApplicationDelegate) *newDelegate = [QT_MANGLE_NAMESPACE(QCocoaApplicationDelegate) sharedDelegate];
1288  Q_ASSERT(newDelegate);
1289  [newDelegate setQtPrivate:priv];
1290  // Only do things that make sense to do once, otherwise we crash.
1291  if (oldDelegate != newDelegate && !QApplication::testAttribute(Qt::AA_MacPluginApplication)) {
1292  [newDelegate setReflectionDelegate:oldDelegate];
1293  [cocoaApp setDelegate:newDelegate];
1294 
1295  QT_MANGLE_NAMESPACE(QCocoaMenuLoader) *qtMenuLoader = [[QT_MANGLE_NAMESPACE(QCocoaMenuLoader) alloc] init];
1296  qt_mac_loadMenuNib(qtMenuLoader);
1297 
1298  [cocoaApp setMenu:[qtMenuLoader menu]];
1299  [newDelegate setMenuLoader:qtMenuLoader];
1300  }
1301 #endif
1302  // Register for Carbon tablet proximity events on the event monitor target.
1303  // This means that we should receive proximity events even when we aren't the active application.
1304  if (!tablet_proximity_handler) {
1307  }
1308  priv->native_modal_dialog_active = false;
1309 
1311 }
QString section(QChar sep, int start, int end=-1, SectionFlags flags=SectionDefault) const
This function returns a section of the string.
Definition: qstring.h:781
static void qt_init_tablet_proximity_handler()
static EventHandlerRef app_proc_handler
int toInt(bool *ok=0, int base=10) const
Returns the string converted to an int using base base, which is 10 by default and must be between 2 ...
Definition: qstring.cpp:6090
#define kCMDefaultDeviceNotification
The QByteArray class provides an array of bytes.
Definition: qbytearray.h:135
#define kCMDeviceProfilesNotification
static void initialize()
This is an internal function.
Definition: qmime_mac.cpp:1162
static OSStatus tabletProximityCallback(EventHandlerCallRef, EventRef, void *)
static QString toQString(CFStringRef cfstr)
Definition: qcore_mac.cpp:47
QLatin1String(DBUS_INTERFACE_DBUS))) Q_GLOBAL_STATIC_WITH_ARGS(QString
QString appName() const
The QString class provides a Unicode character string.
Definition: qstring.h:83
static EventHandlerUPP tablet_proximity_UPP
static QString currentPath()
Returns the absolute path of the application&#39;s current directory.
Definition: qdir.cpp:1875
#define Q_ASSERT(cond)
Definition: qglobal.h:1823
static OSStatus globalEventProcessor(EventHandlerCallRef, EventRef, void *)
static bool appNoGrab
static void initialize()
QTextStream & center(QTextStream &stream)
Calls QTextStream::setFieldAlignment(QTextStream::AlignCenter) on stream and returns stream...
static void initialize()
Internal function that initializes the font system.
Definition: qfont_mac.cpp:131
#define qApp
static bool init
void qt_init_app_proc_handler()
#define kCMDefaultDeviceProfileNotification
unsigned int uint
Definition: qglobal.h:996
The QLatin1String class provides a thin wrapper around an US-ASCII/Latin-1 encoded string literal...
Definition: qstring.h:654
static QStyle * app_style
void qt_mac_update_os_settings()
const void * CFTypeRef
static bool qt_mac_apply_settings()
static EventHandlerRef tablet_proximity_handler
static EventHandlerUPP app_proc_handlerUPP
bool qt_sendSpontaneousEvent(QObject *obj, QEvent *event)
bool isNull() const
Returns true if this string is null; otherwise returns false.
Definition: qstring.h:505
static QInputContext * inputContext
#define kCMDeviceUnregisteredNotification
#define QT_MANGLE_NAMESPACE(name)
Definition: qglobal.h:106
static QString fromLatin1(const char *, int size=-1)
Returns a QString initialized with the first size characters of the Latin-1 string str...
Definition: qstring.cpp:4188
static void initialize()
static bool desktopSettingsAware()
Returns true if Qt is set to use the system&#39;s standard colors, fonts, etc.
static const QMetaObjectPrivate * priv(const uint *data)
static bool native_modal_dialog_active
void qt_mac_display_change_callbk(CGDirectDisplayID, CGDisplayChangeSummaryFlags flags, void *)
static void initialize()
Definition: qcursor.cpp:417
struct QMacAppleEventTypeSpec app_apple_events[]
bool qt_is_gui_used
static bool testAttribute(Qt::ApplicationAttribute attribute)
Returns true if attribute attribute is set; otherwise returns false.
static void qt_mac_read_fontsmoothing_settings()
void qt_color_profile_changed(CFNotificationCenterRef, void *, CFStringRef, const void *, CFDictionaryRef)
bool endsWith(const QString &s, Qt::CaseSensitivity cs=Qt::CaseSensitive) const
Returns true if the string ends with s; otherwise returns false.
Definition: qstring.cpp:3796
The QEvent class is the base class of all event classes.
Definition: qcoreevent.h:56
static AEEventHandlerUPP app_proc_ae_handlerUPP
The QLatin1Char class provides an 8-bit ASCII/Latin-1 character.
Definition: qchar.h:55
static bool setCurrent(const QString &path)
Sets the application&#39;s current working directory to path.
Definition: qdir.cpp:1851
static OSStatus globalAppleEventProcessor(const AppleEvent *, AppleEvent *, long)

◆ qt_init_app_proc_handler()

void qt_init_app_proc_handler ( )

Definition at line 1077 of file qapplication_mac.mm.

Referenced by qt_init().

1078 {
1079  InstallEventHandler(GetApplicationEventTarget(), app_proc_handlerUPP,
1080  GetEventTypeCount(app_events), app_events, (void *)qApp,
1081  &app_proc_handler);
1082 }
static EventHandlerRef app_proc_handler
#define qApp
static EventHandlerUPP app_proc_handlerUPP
static EventTypeSpec app_events[]

◆ qt_init_tablet_proximity_handler()

static void qt_init_tablet_proximity_handler ( )
static

Definition at line 1085 of file qapplication_mac.mm.

Referenced by qt_init().

1086 {
1087  EventTypeSpec tabletProximityEvent = { kEventClassTablet, kEventTabletProximity };
1088  InstallEventHandler(GetEventMonitorTarget(), tablet_proximity_UPP,
1089  1, &tabletProximityEvent, qApp, &tablet_proximity_handler);
1090 }
static EventHandlerUPP tablet_proximity_UPP
#define qApp
static EventHandlerRef tablet_proximity_handler

◆ qt_mac_beep()

void qt_mac_beep ( )

Definition at line 53 of file qsound_mac.mm.

Referenced by QApplication::beep().

54 {
55  NSBeep();
56 }

◆ qt_mac_can_clickThrough()

bool qt_mac_can_clickThrough ( const QWidget )

Definition at line 280 of file qwidget_mac.mm.

Referenced by QApplicationPrivate::globalEventProcessor(), QStyleOption::init(), and QWidget::setForegroundRole().

281 {
282  static int qt_mac_carbon_clickthrough = -1;
283  if (qt_mac_carbon_clickthrough < 0)
284  qt_mac_carbon_clickthrough = !qgetenv("QT_MAC_NO_COCOA_CLICKTHROUGH").isEmpty();
285  bool ret = !qt_mac_carbon_clickthrough;
286  for ( ; w; w = w->parentWidget()) {
287  if (w->testAttribute(Qt::WA_MacNoClickThrough)) {
288  ret = false;
289  break;
290  }
291  }
292  return ret;
293 }
Q_CORE_EXPORT QByteArray qgetenv(const char *varName)
bool isEmpty() const
Returns true if the byte array has size 0; otherwise returns false.
Definition: qbytearray.h:421

◆ qt_mac_cancel_notification()

void qt_mac_cancel_notification ( )

Definition at line 410 of file qapplication_mac.mm.

Referenced by QApplicationPrivate::_q_alertTimeOut().

411 {
412 #ifndef QT_MAC_USE_COCOA
413  NMRemove(&qt_mac_notification);
414 #else
416  [[NSApplication sharedApplication] cancelUserAttentionRequest:NSInformationalRequest];
417 #endif
418 }
static NMRec qt_mac_notification

◆ qt_mac_command_set_enabled()

void qt_mac_command_set_enabled ( MenuRef  ,
UInt32  ,
bool   
)

◆ qt_mac_display_change_callbk()

void qt_mac_display_change_callbk ( CGDirectDisplayID  ,
CGDisplayChangeSummaryFlags  flags,
void *   
)

Definition at line 352 of file qapplication_mac.mm.

Referenced by qt_cleanup(), and qt_init().

353 {
354 #if (MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_5)
355  const bool resized = flags & kCGDisplayDesktopShapeChangedFlag;
356 #else
357  Q_UNUSED(flags);
358  const bool resized = true;
359 #endif
360  if (resized && qApp) {
361  if (QDesktopWidget *dw = qApp->desktop()) {
362  QResizeEvent *re = new QResizeEvent(dw->size(), dw->size());
363  QApplication::postEvent(dw, re);
365  }
366  }
367 }
static void postEvent(QObject *receiver, QEvent *event)
Adds the event event, with the object receiver as the receiver of the event, to an event queue and re...
#define qApp
The QResizeEvent class contains event parameters for resize events.
Definition: qevent.h:349
#define Q_UNUSED(x)
Indicates to the compiler that the parameter with the specified name is not used in the body of a fun...
Definition: qglobal.h:1729

◆ qt_mac_event_release() [1/3]

static void qt_mac_event_release ( EventRef event)
static

Definition at line 713 of file qapplication_mac.mm.

Referenced by QApplicationPrivate::globalEventProcessor(), qt_event_remove_activate(), qt_mac_event_release(), and qt_mac_event_remove().

714 {
715  ReleaseEvent(event);
716  event = 0;
717 }
EventRef event

◆ qt_mac_event_release() [2/3]

static void qt_mac_event_release ( QWidget w,
EventRef event 
)
static

Definition at line 719 of file qapplication_mac.mm.

720 {
721  if (event) {
722  QWidget *widget = 0;
723  if (GetEventParameter(event, kEventParamQWidget, typeQWidget, 0, sizeof(widget), 0, &widget) == noErr
724  && w == widget) {
725  if (IsEventInQueue(GetMainEventQueue(), event))
726  RemoveEventFromQueue(GetMainEventQueue(), event);
728  }
729  }
730 }
EventRef event
QPointer< QWidget > widget
The QWidget class is the base class of all user interface objects.
Definition: qwidget.h:150
static void qt_mac_event_release(EventRef &event)

◆ qt_mac_event_release() [3/3]

void qt_mac_event_release ( QWidget w)

Definition at line 1002 of file qapplication_mac.mm.

Referenced by QWidget::destroy(), and QWidgetPrivate::hide_sys().

1003 {
1004  if (w) {
1005 #ifndef QT_MAC_USE_COCOA
1008 #endif
1009  if (w == qt_mac_dock_menu) {
1010  qt_mac_dock_menu = 0;
1011 #ifndef QT_MAC_USE_COCOA
1012  SetApplicationDockTileMenu(0);
1013 #else
1014  [NSApp setDockMenu:0];
1015 #endif
1016  }
1017  }
1018 }
static EventRef request_showsheet_pending
static void qt_mac_event_release(EventRef &event)
static EventRef request_context_pending
static QMenu * qt_mac_dock_menu

◆ qt_mac_event_remove()

static bool qt_mac_event_remove ( EventRef event)
static

Definition at line 732 of file qapplication_mac.mm.

Referenced by qt_event_request_showsheet().

733 {
734  if (event) {
735  if (IsEventInQueue(GetMainEventQueue(), event))
736  RemoveEventFromQueue(GetMainEventQueue(), event);
738  return true;
739  }
740  return false;
741 }
EventRef event
static void qt_mac_event_release(EventRef &event)

◆ qt_mac_execute_apple_script() [1/3]

Q_GUI_EXPORT bool qt_mac_execute_apple_script ( const char *  script,
long  script_len,
AEDesc *  ret 
)

Definition at line 291 of file qapplication_mac.mm.

Referenced by qt_mac_execute_apple_script().

291  {
292  OSStatus err;
293  AEDesc scriptTextDesc;
294  ComponentInstance theComponent = 0;
295  OSAID scriptID = kOSANullScript, resultID = kOSANullScript;
296 
297  // set up locals to a known state
298  AECreateDesc(typeNull, 0, 0, &scriptTextDesc);
299  scriptID = kOSANullScript;
300  resultID = kOSANullScript;
301 
302  // open the scripting component
303  theComponent = OpenDefaultComponent(kOSAComponentType, typeAppleScript);
304  if (!theComponent) {
305  err = paramErr;
306  goto bail;
307  }
308 
309  // put the script text into an aedesc
310  err = AECreateDesc(typeUTF8Text, script, script_len, &scriptTextDesc);
311  if (err != noErr)
312  goto bail;
313 
314  // compile the script
315  err = OSACompile(theComponent, &scriptTextDesc, kOSAModeNull, &scriptID);
316  if (err != noErr)
317  goto bail;
318 
319  // run the script
320  err = OSAExecute(theComponent, scriptID, kOSANullScript, kOSAModeNull, &resultID);
321 
322  // collect the results - if any
323  if (ret) {
324  AECreateDesc(typeNull, 0, 0, ret);
325  if (err == errOSAScriptError)
326  OSAScriptError(theComponent, kOSAErrorMessage, typeChar, ret);
327  else if (err == noErr && resultID != kOSANullScript)
328  OSADisplay(theComponent, resultID, typeChar, kOSAModeNull, ret);
329  }
330 bail:
331  AEDisposeDesc(&scriptTextDesc);
332  if (scriptID != kOSANullScript)
333  OSADispose(theComponent, scriptID);
334  if (resultID != kOSANullScript)
335  OSADispose(theComponent, resultID);
336  if (theComponent)
337  CloseComponent(theComponent);
338  return err == noErr;
339 }
signed long OSStatus
Q_CORE_EXPORT int QT_FASTCALL script(uint ucs4)

◆ qt_mac_execute_apple_script() [2/3]

Q_GUI_EXPORT bool qt_mac_execute_apple_script ( const char *  script,
AEDesc *  ret 
)

Definition at line 341 of file qapplication_mac.mm.

342 {
344 }
Q_CORE_EXPORT int QT_FASTCALL script(uint ucs4)
uint qstrlen(const char *str)
Definition: qbytearray.h:79
Q_GUI_EXPORT bool qt_mac_execute_apple_script(const char *script, long script_len, AEDesc *ret)

◆ qt_mac_execute_apple_script() [3/3]

Q_GUI_EXPORT bool qt_mac_execute_apple_script ( const QString script,
AEDesc *  ret 
)

Definition at line 346 of file qapplication_mac.mm.

Referenced by QSystemTrayIconPrivate::showMessage_sys().

347 {
348  const QByteArray l = script.toUtf8(); return qt_mac_execute_apple_script(l.constData(), l.size(), ret);
349 }
QByteArray toUtf8() const Q_REQUIRED_RESULT
Returns a UTF-8 representation of the string as a QByteArray.
Definition: qstring.cpp:4074
The QByteArray class provides an array of bytes.
Definition: qbytearray.h:135
const char * constData() const
Returns a pointer to the data stored in the byte array.
Definition: qbytearray.h:433
QFactoryLoader * l
int size() const
Returns the number of bytes in this byte array.
Definition: qbytearray.h:402
Q_GUI_EXPORT bool qt_mac_execute_apple_script(const char *script, long script_len, AEDesc *ret)

◆ qt_mac_find_window()

QWidget* qt_mac_find_window ( OSWindowRef  )

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().

392 {
393 #ifdef QT_MAC_USE_COCOA
394  return [window QT_MANGLE_NAMESPACE(qt_qwidget)];
395 #else
396  if(!window)
397  return 0;
398 
399  QWidget *ret;
400  if(GetWindowProperty(window, kWidgetCreatorQt, kWidgetPropertyQWidget, sizeof(ret), 0, &ret) == noErr)
401  return ret;
402  return 0;
403 #endif
404 }
const UInt32 kWidgetCreatorQt
Definition: qwidget_mac.mm:148
The QWidget class is the base class of all user interface objects.
Definition: qwidget.h:150
NSWindow * window
#define QT_MANGLE_NAMESPACE(name)
Definition: qglobal.h:106

◆ qt_mac_get_modifiers()

Qt::KeyboardModifiers qt_mac_get_modifiers ( int  keys)

Definition at line 150 of file qkeymapper_mac.cpp.

Referenced by QApplicationPrivate::globalEventProcessor(), qt_mac_send_modifiers_changed(), QApplication::queryKeyboardModifiers(), and translateKeyEventInternal().

151 {
152 #ifdef DEBUG_KEY_BINDINGS_MODIFIERS
153  qDebug("Qt: internal: **Mapping modifiers: %d (0x%04x)", keys, keys);
154 #endif
155  Qt::KeyboardModifiers ret = Qt::NoModifier;
156  for (int i = 0; qt_mac_modifier_symbols[i].qt_code; i++) {
157  if (keys & qt_mac_modifier_symbols[i].mac_code) {
158 #ifdef DEBUG_KEY_BINDINGS_MODIFIERS
159  qDebug("Qt: internal: got modifier: %s", qt_mac_modifier_symbols[i].desc);
160 #endif
162  }
163  }
164  if (qApp->testAttribute(Qt::AA_MacDontSwapCtrlAndMeta)) {
165  Qt::KeyboardModifiers oldModifiers = ret;
167  if (oldModifiers & Qt::ControlModifier)
168  ret |= Qt::MetaModifier;
169  if (oldModifiers & Qt::MetaModifier)
170  ret |= Qt::ControlModifier;
171  }
172  return ret;
173 }
KeyboardModifier
Definition: qnamespace.h:127
QStringList keys
Q_CORE_EXPORT void qDebug(const char *,...)
#define qApp
static qt_mac_enum_mapper qt_mac_modifier_symbols[]

◆ qt_mac_is_macdrawer()

bool qt_mac_is_macdrawer ( const QWidget )

◆ qt_mac_is_macsheet()

bool qt_mac_is_macsheet ( const QWidget )

Definition at line 295 of file qwidget_mac.mm.

Referenced by QApplicationPrivate::enterModal_sys(), QApplicationPrivate::globalEventProcessor(), QApplicationPrivate::leaveModal_sys(), qt_event_request_showsheet(), and QApplicationPrivate::tryModalHelper_sys().

296 {
297  if (!w)
298  return false;
299 
300  Qt::WindowModality modality = w->windowModality();
301  if (modality == Qt::ApplicationModal)
302  return false;
303  return w->parentWidget() && (modality == Qt::WindowModal || w->windowType() == Qt::Sheet);
304 }
WindowModality
Definition: qnamespace.h:1683

◆ qt_mac_read_fontsmoothing_settings()

static void qt_mac_read_fontsmoothing_settings ( )
static

Definition at line 264 of file qapplication_mac.mm.

Referenced by qt_init().

265 {
267  int w = 10, h = 10;
268  QImage image(w, h, QImage::Format_RGB32);
269  image.fill(0xffffffff);
270  QPainter p(&image);
271  p.drawText(0, h, "X\\");
272  p.end();
273 
274  const int *bits = (const int *) ((const QImage &) image).bits();
275  int bpl = image.bytesPerLine() / 4;
276  for (int y=0; y<w; ++y) {
277  for (int x=0; x<h; ++x) {
278  int r = qRed(bits[x]);
279  int g = qGreen(bits[x]);
280  int b = qBlue(bits[x]);
281  if (r != g || r != b) {
283  return;
284  }
285  }
286  bits += bpl;
287  }
289 }
The QPainter class performs low-level painting on widgets and other paint devices.
Definition: qpainter.h:86
Q_GUI_EXPORT bool qt_applefontsmoothing_enabled
int qRed(QRgb rgb)
Returns the red component of the ARGB quadruplet rgb.
Definition: qrgb.h:57
The QImage class provides a hardware-independent image representation that allows direct access to th...
Definition: qimage.h:87
int qGreen(QRgb rgb)
Returns the green component of the ARGB quadruplet rgb.
Definition: qrgb.h:60
int qBlue(QRgb rgb)
Returns the blue component of the ARGB quadruplet rgb.
Definition: qrgb.h:63

◆ qt_mac_send_notification()

void qt_mac_send_notification ( )

Definition at line 397 of file qapplication_mac.mm.

Referenced by QApplication::alert().

398 {
399 #ifndef QT_MAC_USE_COCOA
400  //send it
401  qt_mac_notification.nmMark = 1; //non-zero magic number
402  qt_mac_notification.qType = nmType;
403  NMInstall(&qt_mac_notification);
404 #else
406  [[NSApplication sharedApplication] requestUserAttention:NSInformationalRequest];
407 #endif
408 }
static NMRec qt_mac_notification

◆ 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_mac_set_app_icon()

void qt_mac_set_app_icon ( const QPixmap pixmap)

Definition at line 451 of file qapplication_mac.mm.

Referenced by QApplication::setWindowIcon().

452 {
453 #ifndef QT_MAC_USE_COCOA
454  if(pixmap.isNull()) {
455  RestoreApplicationDockTileImage();
456  } else {
457  CGImageRef img = (CGImageRef)pixmap.macCGHandle();
458  SetApplicationDockTileImage(img);
459  CGImageRelease(img);
460  }
461 #else
463  NSImage *image = NULL;
464  if (pixmap.isNull()) {
465  // Get Application icon from bundle
466  image = [[NSImage imageNamed:@"NSApplicationIcon"] retain]; // released below
467  } else {
468  image = static_cast<NSImage *>(qt_mac_create_nsimage(pixmap));
469  }
470 
471  [NSApp setApplicationIconImage:image];
472  [image release];
473 #endif
474 }
struct CGImage * CGImageRef
void * qt_mac_create_nsimage(const QPixmap &pm)
bool isNull() const
Returns true if this is a null pixmap; otherwise returns false.
Definition: qpixmap.cpp:615

◆ qt_mac_set_cursor()

void qt_mac_set_cursor ( const QCursor )

Definition at line 108 of file qcursor_mac.mm.

Referenced by QApplicationPrivate::globalEventProcessor(), qt_mac_mouse_inside_answer_rect(), QApplication::restoreOverrideCursor(), and QApplication::setOverrideCursor().

109 {
110 #ifdef QT_MAC_USE_COCOA
112  [static_cast<NSCursor *>(qt_mac_nsCursorForQCursor(*c)) set];
113 #else
114  if (!c) {
115  currentCursor = 0;
116  return;
117  }
118  c->handle(); //force the cursor to get loaded, if it's not
119 
120  if(currentCursor && currentCursor->type == QCursorData::TYPE_ThemeCursor
121  && currentCursor->curs.tc.anim)
122  currentCursor->curs.tc.anim->stop();
123  if(c->d->type == QCursorData::TYPE_ImageCursor) {
124  [static_cast<NSCursor *>(c->d->curs.cp.nscursor) set];
125  } else if(c->d->type == QCursorData::TYPE_ThemeCursor) {
126  if(SetAnimatedThemeCursor(c->d->curs.tc.curs, 0) == themeBadCursorIndexErr) {
127  SetThemeCursor(c->d->curs.tc.curs);
128  } else {
129  if(!c->d->curs.tc.anim)
130  c->d->curs.tc.anim = new QMacAnimateCursor;
131  c->d->curs.tc.anim->start(c->d->curs.tc.curs);
132  }
133  }
134 
135  currentCursor = c->d;
136 #endif
137 }
unsigned char c[8]
Definition: qnumeric_p.h:62
void * qt_mac_nsCursorForQCursor(const QCursor &c)
Definition: qcursor_mac.mm:100
static QCursorData * currentCursor
Definition: qcursor_mac.mm:106

◆ qt_mac_set_dock_menu()

Q_GUI_EXPORT void qt_mac_set_dock_menu ( QMenu menu)

Definition at line 991 of file qapplication_mac.mm.

992 {
993  qt_mac_dock_menu = menu;
994 #ifdef QT_MAC_USE_COCOA
995  [NSApp setDockMenu:menu->macMenu()];
996 #else
997  SetApplicationDockTileMenu(menu->macMenu());
998 #endif
999 }
OSMenuRef macMenu(OSMenuRef merge=0)
Definition: qmenu_mac.mm:1610
static QMenu * qt_mac_dock_menu

◆ qt_mac_set_press_and_hold_context()

Q_GUI_EXPORT void qt_mac_set_press_and_hold_context ( bool  b)

Definition at line 476 of file qapplication_mac.mm.

477 {
478  Q_UNUSED(b);
479  qWarning("qt_mac_set_press_and_hold_context: This functionality is no longer available");
480 }
Q_CORE_EXPORT void qWarning(const char *,...)
#define Q_UNUSED(x)
Indicates to the compiler that the parameter with the specified name is not used in the body of a fun...
Definition: qglobal.h:1729

◆ qt_mac_update_child_gl_widgets()

static void qt_mac_update_child_gl_widgets ( QWidget widget)
static

Definition at line 774 of file qapplication_mac.mm.

Referenced by qt_event_request_window_change().

775 {
776  // Update all OpenGL child widgets for the given widget.
777  QList<QWidgetPrivate::GlWidgetInfo> &glWidgets = qt_widget_private(widget)->glWidgets;
780 
781  for (;it != end; ++it) {
782  qt_post_window_change_event(it->widget);
783  }
784 }
#define it(className, varName)
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
The QList::iterator class provides an STL-style non-const iterator for QList and QQueue.
Definition: qlist.h:181
static void qt_post_window_change_event(QWidget *widget)
Q_GUI_EXPORT QWidgetPrivate * qt_widget_private(QWidget *widget)
Definition: qwidget.cpp:12920
static const KeyPair *const end
The QList class is a template class that provides lists.
Definition: qdatastream.h:62

◆ qt_mac_update_cursor()

void qt_mac_update_cursor ( )

Definition at line 201 of file qcursor_mac.mm.

Referenced by QApplicationPrivate::globalEventProcessor(), onApplicationChangedActivation(), onApplicationWindowChangedActivation(), QApplication::restoreOverrideCursor(), and QApplication::setOverrideCursor().

202 {
203  // This function is similar to qt_mac_updateCursorWithWidgetUnderMouse
204  // except that is clears the optimization cache, and finds the widget
205  // under mouse itself. Clearing the cache is useful in cases where the
206  // application has been deactivated/activated etc.
207  // NB: since we dont have any true native widget, the call to
208  // qt_mac_getTargetForMouseEvent will fail when the mouse is over QMacNativeWidgets.
209 #ifdef QT_MAC_USE_COCOA
212  QWidget *widgetUnderMouse = 0;
213 
214  if (qt_button_down) {
215  widgetUnderMouse = qt_button_down;
216  } else {
217  QPoint localPoint;
218  QPoint globalPoint;
219  qt_mac_getTargetForMouseEvent(0, QEvent::None, localPoint, globalPoint, 0, &widgetUnderMouse);
220  }
221  qt_mac_updateCursorWithWidgetUnderMouse(widgetUnderMouse);
222 #else
224 #endif
225 }
void qt_mac_updateCursorWithWidgetUnderMouse(QWidget *widgetUnderMouse)
Definition: qcursor_mac.mm:144
static QPointer< QWidget > lastWidgetUnderMouse
Definition: qcursor_mac.mm:139
static QPointer< QWidget > lastMouseCursorWidget
Definition: qcursor_mac.mm:140
The QWidget class is the base class of all user interface objects.
Definition: qwidget.h:150
static QWidget * widgetAt(const QPoint &p)
Returns the widget at global screen position point, or 0 if there is no Qt widget there...
The QPoint class defines a point in the plane using integer precision.
Definition: qpoint.h:53
QPointer< QWidget > qt_button_down
static QPoint pos()
Returns the position of the cursor (hot spot) in global screen coordinates.
Definition: qcursor_mac.mm:310
qt_mac_getTargetForMouseEvent(event, QEvent::Gesture, qlocal, qglobal, 0, &widgetToGetTouch)

◆ qt_mac_update_intersected_gl_widgets()

static void qt_mac_update_intersected_gl_widgets ( QWidget widget)
static

Definition at line 807 of file qapplication_mac.mm.

Referenced by qt_event_request_window_change().

808 {
809 #ifndef QT_MAC_USE_COCOA
810  QList<QWidgetPrivate::GlWidgetInfo> &glWidgets = qt_widget_private(widget->window())->glWidgets;
811  if (glWidgets.isEmpty())
812  return;
813 
814  // Exit if the window has not been created yet (mapToGlobal/size will force create it)
815  if (widget->testAttribute(Qt::WA_WState_Created) == false || HIViewGetWindow(qt_mac_nativeview_for(widget)) == 0)
816  return;
817 
818  const QRect globalWidgetRect = QRect(widget->mapToGlobal(QPoint(0, 0)), widget->size());
819 
822 
823  for (;it != end; ++it){
824  QWidget *glWidget = it->widget;
825  const QRect globalGlWidgetRect = QRect(glWidget->mapToGlobal(QPoint(0, 0)), glWidget->size());
826  if (globalWidgetRect.intersects(globalGlWidgetRect)) {
827  qt_post_window_change_event(glWidget);
828  it->lastUpdateWidget = widget;
829  } else if (it->lastUpdateWidget == widget) {
830  // Update the gl wigets that the widget intersected the last time around,
831  // and that we are not intersecting now. This prevents paint errors when the
832  // intersecting widget leaves a gl widget.
833  qt_post_window_change_event(glWidget);
834  it->lastUpdateWidget = 0;
835  }
836  }
837 #else
838  Q_UNUSED(widget);
839 #endif
840 }
QPointer< QWidget > widget
#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
bool isEmpty() const
Returns true if the list contains no items; otherwise returns false.
Definition: qlist.h:152
bool testAttribute(Qt::WidgetAttribute) const
Returns true if attribute attribute is set on this widget; otherwise returns false.
Definition: qwidget.h:1041
iterator end()
Returns an STL-style iterator pointing to the imaginary item after the last item in the list...
Definition: qlist.h:270
QSize size
the size of the widget excluding any window frame
Definition: qwidget.h:165
The QList::iterator class provides an STL-style non-const iterator for QList and QQueue.
Definition: qlist.h:181
The QPoint class defines a point in the plane using integer precision.
Definition: qpoint.h:53
The QRect class defines a rectangle in the plane using integer precision.
Definition: qrect.h:58
OSViewRef qt_mac_nativeview_for(const QWidget *)
Definition: qwidget_mac.mm:419
QWidget * window() const
Returns the window for this widget, i.e.
Definition: qwidget.cpp:4492
bool intersects(const QRect &r) const
Returns true if this rectangle intersects with the given rectangle (i.
Definition: qrect.cpp:1429
static void qt_post_window_change_event(QWidget *widget)
Q_GUI_EXPORT QWidgetPrivate * qt_widget_private(QWidget *widget)
Definition: qwidget.cpp:12920
static const KeyPair *const end
#define Q_UNUSED(x)
Indicates to the compiler that the parameter with the specified name is not used in the body of a fun...
Definition: qglobal.h:1729
QPoint mapToGlobal(const QPoint &) const
Translates the widget coordinate pos to global screen coordinates.
The QList class is a template class that provides lists.
Definition: qdatastream.h:62

◆ qt_mac_update_os_settings()

void qt_mac_update_os_settings ( )

Definition at line 491 of file qapplication_mac.mm.

Referenced by QApplicationPrivate::globalEventProcessor(), onApplicationChangedActivation(), and qt_init().

492 {
493  if (!qApp)
494  return;
495  if (!QApplication::startingUp()) {
496  static bool needToPolish = true;
497  if (needToPolish) {
499  needToPolish = false;
500  }
501  }
502  //focus mode
503  /* First worked as of 10.2.3 */
504  QSettings appleSettings(QLatin1String("apple.com"));
505  QVariant appleValue = appleSettings.value(QLatin1String("AppleKeyboardUIMode"), 0);
506  qt_tab_all_widgets = (appleValue.toInt() & 0x2);
507  //paging mode
508  /* First worked as of 10.2.3 */
509  appleValue = appleSettings.value(QLatin1String("AppleScrollerPagingBehavior"), false);
510  qt_scrollbar_jump_to_pos = appleValue.toBool();
511  //collapse
512  /* First worked as of 10.3.3 */
513  appleValue = appleSettings.value(QLatin1String("AppleMiniaturizeOnDoubleClick"), true);
514  qt_mac_collapse_on_dblclick = appleValue.toBool();
515 
516  // Anti-aliasing threshold
517  appleValue = appleSettings.value(QLatin1String("AppleAntiAliasingThreshold"));
518  if (appleValue.isValid())
519  qt_antialiasing_threshold = appleValue.toInt();
520 
521 #ifdef DEBUG_PLATFORM_SETTINGS
522  qDebug("qt_mac_update_os_settings *********************************************************************");
523 #endif
524  { // setup the global palette
525  QColor qc;
526  (void) QApplication::style(); // trigger creation of application style and system palettes
528 
529  pal.setBrush( QPalette::Active, QPalette::Highlight, qcolorForTheme(kThemeBrushPrimaryHighlightColor) );
530  pal.setBrush( QPalette::Inactive, QPalette::Highlight, qcolorForTheme(kThemeBrushSecondaryHighlightColor) );
531 
532  pal.setBrush( QPalette::Disabled, QPalette::Highlight, qcolorForTheme(kThemeBrushSecondaryHighlightColor) );
533  pal.setBrush( QPalette::Active, QPalette::Shadow, qcolorForTheme(kThemeBrushButtonActiveDarkShadow) );
534 
535  pal.setBrush( QPalette::Inactive, QPalette::Shadow, qcolorForTheme(kThemeBrushButtonInactiveDarkShadow) );
536  pal.setBrush( QPalette::Disabled, QPalette::Shadow, qcolorForTheme(kThemeBrushButtonInactiveDarkShadow) );
537 
538  qc = qcolorForThemeTextColor(kThemeTextColorDialogActive);
542 
543  qc = qcolorForThemeTextColor(kThemeTextColorDialogInactive);
550  pal.setBrush(QPalette::ToolTipBase, QColor(255, 255, 199));
551 
555  }
556 #ifdef DEBUG_PLATFORM_SETTINGS
557  qt_mac_debug_palette(pal, QApplication::palette(), "Global Palette");
558 #endif
559  }
560 
561  QFont fnt = qfontForThemeFont(kThemeApplicationFont);
562 #ifdef DEBUG_PLATFORM_SETTINGS
563  qDebug("qt-internal: Font for Application [%s::%d::%d::%d]",
564  fnt.family().toLatin1().constData(), fnt.pointSize(), fnt.bold(), fnt.italic());
565 #endif
568 
569  { //setup the fonts
570  struct FontMap {
571  FontMap(const char *qc, short fk) : qt_class(qc), font_key(fk) { }
572  const char *const qt_class;
573  short font_key;
574  } mac_widget_fonts[] = {
575  FontMap("QPushButton", kThemePushButtonFont),
576  FontMap("QListView", kThemeViewsFont),
577  FontMap("QListBox", kThemeViewsFont),
578  FontMap("QTitleBar", kThemeWindowTitleFont),
579  FontMap("QMenuBar", kThemeMenuTitleFont),
580  FontMap("QMenu", kThemeMenuItemFont),
581  FontMap("QComboMenuItem", kThemeSystemFont),
582  FontMap("QHeaderView", kThemeSmallSystemFont),
583  FontMap("Q3Header", kThemeSmallSystemFont),
584  FontMap("QTipLabel", kThemeSmallSystemFont),
585  FontMap("QLabel", kThemeSystemFont),
586  FontMap("QToolButton", kThemeSmallSystemFont),
587  FontMap("QMenuItem", kThemeMenuItemFont), // It doesn't exist, but its unique.
588  FontMap("QComboLineEdit", kThemeViewsFont), // It doesn't exist, but its unique.
589  FontMap("QSmallFont", kThemeSmallSystemFont), // It doesn't exist, but its unique.
590  FontMap("QMiniFont", kThemeMiniSystemFont), // It doesn't exist, but its unique.
591  FontMap(0, 0) };
592  for(int i = 0; mac_widget_fonts[i].qt_class; i++) {
593  QFont fnt = qfontForThemeFont(mac_widget_fonts[i].font_key);
594  bool set_font = true;
596  if (!hash->isEmpty()) {
598  = hash->constFind(mac_widget_fonts[i].qt_class);
599  if (it != hash->constEnd())
600  set_font = (fnt != *it);
601  }
602  if (set_font) {
603  QApplication::setFont(fnt, mac_widget_fonts[i].qt_class);
604 #ifdef DEBUG_PLATFORM_SETTINGS
605  qDebug("qt-internal: Font for %s [%s::%d::%d::%d]", mac_widget_fonts[i].qt_class,
606  fnt.family().toLatin1().constData(), fnt.pointSize(), fnt.bold(), fnt.italic());
607 #endif
608  }
609  }
610  }
612 #ifdef DEBUG_PLATFORM_SETTINGS
613  qDebug("qt_mac_update_os_settings END !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!");
614 #endif
615 }
The QVariant class acts like a union for the most common Qt data types.
Definition: qvariant.h:92
The QColor class provides colors based on RGB, HSV or CMYK values.
Definition: qcolor.h:67
static uint hash(const uchar *p, int n)
Definition: qhash.cpp:68
The QHash::const_iterator class provides an STL-style const iterator for QHash and QMultiHash...
Definition: qhash.h:395
static void setPalette(const QPalette &, const char *className=0)
Changes the default application palette to palette.
#define it(className, varName)
The QSettings class provides persistent platform-independent application settings.
Definition: qsettings.h:73
bool qt_scrollbar_jump_to_pos
static void initializeWidgetPaletteHash()
QLatin1String(DBUS_INTERFACE_DBUS))) Q_GLOBAL_STATIC_WITH_ARGS(QString
bool toBool() const
Returns the variant as a bool if the variant has type() Bool.
Definition: qvariant.cpp:2691
static QPalette palette()
Returns the application palette.
static QStyle * style()
Returns the application&#39;s style object.
#define qt_mac_debug_palette(x, y, z)
The QHash class is a template class that provides a hash-table-based dictionary.
Definition: qdatastream.h:66
static QFont * sys_font
int toInt(bool *ok=0) const
Returns the variant as an int if the variant has type() Int , Bool , ByteArray , Char ...
Definition: qvariant.cpp:2625
Q_CORE_EXPORT void qDebug(const char *,...)
static bool qt_mac_collapse_on_dblclick
static void setSystemFont(const QFont &font)
void setBrush(ColorRole cr, const QBrush &brush)
Sets the brush for the given color role to the specified brush for all groups in the palette...
Definition: qpalette.h:206
#define qApp
bool isEmpty() const
Returns true if the hash contains no items; otherwise returns false.
Definition: qhash.h:297
QFont qfontForThemeFont(ThemeFontID themeID)
Definition: qt_mac.cpp:56
int qt_antialiasing_threshold
const_iterator constFind(const Key &key) const
Returns an iterator pointing to the item with the key in the hash.
Definition: qhash.h:859
FontHash * qt_app_fonts_hash()
static QPalette * sys_pal
QByteArray toLatin1() const Q_REQUIRED_RESULT
Returns a Latin-1 representation of the string as a QByteArray.
Definition: qstring.cpp:3993
static bool startingUp()
Returns true if an application object has not been created yet; otherwise returns false...
const char * constData() const
Returns a pointer to the data stored in the byte array.
Definition: qbytearray.h:433
bool bold() const
Returns true if weight() is a value greater than QFont::Normal ; otherwise returns false...
Definition: qfont.h:348
const_iterator constEnd() const
Returns a const STL-style iterator pointing to the imaginary item after the last item in the hash...
Definition: qhash.h:469
The QFont class specifies a font used for drawing text.
Definition: qfont.h:64
QString family() const
Returns the requested font family name, i.e.
Definition: qfont.cpp:906
QColor qcolorForThemeTextColor(ThemeTextColor themeColor)
Definition: qt_mac.cpp:128
bool qt_tab_all_widgets
void setColor(ColorGroup cg, ColorRole cr, const QColor &color)
Sets the color in the specified color group, used for the given color role, to the specified solid co...
Definition: qpalette.h:201
QColor qcolorForTheme(ThemeBrush brush)
Definition: qt_mac.cpp:110
static void setSystemPalette(const QPalette &pal)
virtual void polish(QWidget *)
Initializes the appearance of the given widget.
Definition: qstyle.cpp:390
bool italic() const
Returns true if the style() of the font is not QFont::StyleNormal.
Definition: qfont.h:355
int pointSize() const
Returns the point size of the font.
Definition: qfont.cpp:981
T value() const
Returns the stored value converted to the template type T.
Definition: qvariant.h:332
bool isValid() const
Returns true if the storage type of this variant is not QVariant::Invalid; otherwise returns false...
Definition: qvariant.h:485
static void setFont(const QFont &, const char *className=0)
Changes the default application font to font.
The QPalette class contains color groups for each widget state.
Definition: qpalette.h:61

◆ qt_mac_window_at()

static short qt_mac_window_at ( int  x,
int  y,
QWidget **  w = 0 
)
static

Definition at line 422 of file qapplication_mac.mm.

Referenced by QApplicationPrivate::globalEventProcessor(), and QApplication::topLevelAt().

423 {
424  Point p;
425  p.h = x;
426  p.v = y;
427  OSWindowRef wp;
428  WindowPartCode wpc;
429  OSStatus err = FindWindowOfClass(&p, kAllWindowClasses, &wp, &wpc);
430  if(err != noErr) {
431  if(w)
432  (*w) = 0;
433  return wpc;
434  }
435  if(w) {
436  if(wp) {
437  *w = qt_mac_find_window(wp);
438 #if 0
439  if(!*w)
440  qWarning("QApplication: qt_mac_window_at: Couldn't find %d",(int)wp);
441 #endif
442  } else {
443  *w = 0;
444  }
445  }
446  return wpc;
447 }
WindowRef OSWindowRef
Q_CORE_EXPORT void qWarning(const char *,...)
signed long OSStatus
QWidget * qt_mac_find_window(OSWindowRef)
Definition: qwidget_mac.mm:391

◆ qt_mac_window_for()

OSWindowRef qt_mac_window_for ( const QWidget )

Definition at line 484 of file qwidget_mac.mm.

Referenced by QMainWindowLayout::cleanUpMacToolbarItems(), QPrintDialogPrivate::closeCarbonPrintPanel(), QFileDialogPrivate::createNavServicesDialog(), flipPoint(), QMacWindowSurface::flush(), QRasterWindowSurface::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().

485 {
486  if (OSViewRef hiview = qt_mac_effectiveview_for(w)) {
488  if (window)
489  return window;
490 
491  if (qt_isGenuineQWidget(hiview)) {
492  // This is a workaround for NSToolbar. When a widget is hidden
493  // by clicking the toolbar button, Cocoa reparents the widgets
494  // to another window (but Qt doesn't know about it).
495  // When we start showing them, it reparents back,
496  // but at this point it's window is nil, but the window it's being brought
497  // into (the Qt one) is for sure created.
498  // This stops the hierarchy moving under our feet.
499  QWidget *toplevel = w->window();
500  if (toplevel != w) {
501  hiview = qt_mac_nativeview_for(toplevel);
502  if (OSWindowRef w = qt_mac_window_for(hiview))
503  return w;
504  }
505 
506  toplevel->d_func()->createWindow_sys();
507  // Reget the hiview since "create window" could potentially move the view (I guess).
508  hiview = qt_mac_nativeview_for(toplevel);
509  return qt_mac_window_for(hiview);
510  }
511  }
512  return 0;
513 }
Q_GUI_EXPORT OSWindowRef qt_mac_window_for(OSViewRef view)
Definition: qwidget_mac.mm:453
The QWidget class is the base class of all user interface objects.
Definition: qwidget.h:150
NSWindow * window
static bool qt_isGenuineQWidget(OSViewRef ref)
Definition: qwidget_mac.mm:464
WindowRef OSWindowRef
Q_GUI_EXPORT OSViewRef qt_mac_nativeview_for(const QWidget *w)
Definition: qwidget_mac.mm:419
QWidget * window() const
Returns the window for this widget, i.e.
Definition: qwidget.cpp:4492
HIViewRef OSViewRef
Q_GUI_EXPORT OSViewRef qt_mac_effectiveview_for(const QWidget *w)
Definition: qwidget_mac.mm:424

◆ qt_nograb()

bool qt_nograb ( )

Definition at line 482 of file qapplication_mac.mm.

Referenced by qJournalRecordProc().

483 {
484 #if defined(QT_DEBUG)
485  return appNoGrab;
486 #else
487  return false;
488 #endif
489 }
static bool appNoGrab

◆ qt_post_window_change_event()

static void qt_post_window_change_event ( QWidget widget)
static

Definition at line 764 of file qapplication_mac.mm.

Referenced by qt_event_request_window_change(), qt_mac_update_child_gl_widgets(), and qt_mac_update_intersected_gl_widgets().

765 {
766  qt_widget_private(widget)->needWindowChange = true;
767  QEvent *glWindowChangeEvent = new QEvent(QEvent::MacGLWindowChange);
768  QApplication::postEvent(widget, glWindowChangeEvent);
769 }
static void postEvent(QObject *receiver, QEvent *event)
Adds the event event, with the object receiver as the receiver of the event, to an event queue and re...
Q_GUI_EXPORT QWidgetPrivate * qt_widget_private(QWidget *widget)
Definition: qwidget.cpp:12920
The QEvent class is the base class of all event classes.
Definition: qcoreevent.h:56

◆ qt_release_app_proc_handler()

void qt_release_app_proc_handler ( )

Definition at line 1112 of file qapplication_mac.mm.

Referenced by qt_cleanup().

1113 {
1114 #ifndef QT_MAC_USE_COCOA
1115  if (app_proc_handler) {
1116  RemoveEventHandler(app_proc_handler);
1117  app_proc_handler = 0;
1118  }
1119 #endif
1120 }
static EventHandlerRef app_proc_handler

◆ qt_release_apple_event_handler()

void qt_release_apple_event_handler ( )

Definition at line 1313 of file qapplication_mac.mm.

Referenced by qt_cleanup().

1314 {
1316  for(uint i = 0; i < sizeof(app_apple_events) / sizeof(QMacAppleEventTypeSpec); ++i)
1317  AERemoveEventHandler(app_apple_events[i].mac_class, app_apple_events[i].mac_id,
1318  app_proc_ae_handlerUPP, true);
1319  DisposeAEEventHandlerUPP(app_proc_ae_handlerUPP);
1321  }
1322 }
unsigned int uint
Definition: qglobal.h:996
struct QMacAppleEventTypeSpec app_apple_events[]
static AEEventHandlerUPP app_proc_ae_handlerUPP

◆ qt_release_tablet_proximity_handler()

static void qt_release_tablet_proximity_handler ( )
static

Definition at line 1092 of file qapplication_mac.mm.

Referenced by qt_cleanup().

1093 {
1094  RemoveEventHandler(tablet_proximity_handler);
1095 }
static EventHandlerRef tablet_proximity_handler

◆ qt_sendSpontaneousEvent()

bool qt_sendSpontaneousEvent ( QObject obj,
QEvent event 
)

Definition at line 5779 of file qapplication.cpp.

Referenced by onApplicationChangedActivation(), onApplicationWindowChangedActivation(), and qt_init().

5780 {
5781  return QCoreApplication::sendSpontaneousEvent(receiver, event);
5782 }
static bool sendSpontaneousEvent(QObject *receiver, QEvent *event)

◆ qt_try_modal()

static bool qt_try_modal ( QWidget widget,
EventRef  event 
)
static

Definition at line 1583 of file qapplication_mac.mm.

Referenced by QApplicationPrivate::globalEventProcessor().

1584 {
1585  QWidget * top = 0;
1586 
1587  if (QApplicationPrivate::tryModalHelper(widget, &top))
1588  return true;
1589 
1590  // INVARIANT: widget is modally shaddowed within its
1591  // window, and should therefore not handle the event.
1592  // However, if the window is not active, the event
1593  // might suggest that we should bring it to front:
1594 
1595  bool block_event = false;
1596 
1597  if (event) {
1598  switch (GetEventClass(event)) {
1599  case kEventClassMouse:
1600  case kEventClassKeyboard:
1601  block_event = true;
1602  break;
1603  }
1604  }
1605 
1607  if ((!activeWidget || QApplicationPrivate::isBlockedByModal(activeWidget)) &&
1609  top->raise();
1610 
1611 #ifdef DEBUG_MODAL_EVENTS
1612  qDebug("%s:%d -- final decision! (%s)", __FILE__, __LINE__, block_event ? "false" : "true");
1613 #endif
1614  return !block_event;
1615 }
EventRef event
bool isWindow() const
Returns true if the widget is an independent window, otherwise returns false.
Definition: qwidget.h:945
static QWidget * activeWindow()
Returns the application top-level window that has the keyboard input focus, or 0 if no application wi...
The QWidget class is the base class of all user interface objects.
Definition: qwidget.h:150
Q_CORE_EXPORT void qDebug(const char *,...)
void raise()
Raises this widget to the top of the parent widget&#39;s stack.
Definition: qwidget.cpp:11901
static bool tryModalHelper(QWidget *widget, QWidget **rettop=0)
static bool isBlockedByModal(QWidget *widget)
Returns true if widget is blocked by a modal window.
static bool native_modal_dialog_active
static QWidget * activeWidget

◆ qt_updated_rootinfo()

void qt_updated_rootinfo ( )

Definition at line 1377 of file qapplication_mac.mm.

1378 {
1379 }

◆ qt_wstate_iconified()

bool qt_wstate_iconified ( WId  )

Definition at line 1381 of file qapplication_mac.mm.

1382 {
1383  return false;
1384 }

Variable Documentation

◆ app_apple_events

struct QMacAppleEventTypeSpec app_apple_events[]
Initial value:
= {
{ kCoreEventClass, kAEQuitApplication },
{ kCoreEventClass, kAEOpenDocuments },
{ kInternetEventClass, kAEGetURL },
}

Referenced by qt_init(), and qt_release_apple_event_handler().

◆ app_do_modal

bool app_do_modal = false
static

◆ app_events

EventTypeSpec app_events[]
static

Definition at line 1041 of file qapplication_mac.mm.

◆ app_proc_ae_handlerUPP

AEEventHandlerUPP app_proc_ae_handlerUPP = NULL
static

Definition at line 203 of file qapplication_mac.mm.

Referenced by qt_init(), and qt_release_apple_event_handler().

◆ app_proc_handler

EventHandlerRef app_proc_handler = 0
static

◆ app_proc_handlerUPP

EventHandlerUPP app_proc_handlerUPP = 0
static

Definition at line 201 of file qapplication_mac.mm.

Referenced by qt_cleanup(), qt_init(), and qt_init_app_proc_handler().

◆ appNoGrab

bool appNoGrab = false
static

Definition at line 197 of file qapplication_mac.mm.

Referenced by qt_init(), and qt_nograb().

◆ event

EventRef event

Definition at line 880 of file qapplication_mac.mm.

Referenced by QAbstractItemViewPrivate::_q_headerDataChanged(), QGraphicsScenePrivate::_q_polishItems(), QEventDispatcherWin32Private::activateEventNotifier(), QComboBox::addItems(), QListWidget::addItems(), QGraphicsScenePrivate::addPopup(), bpsIOHandler(), QTriangulator< T >::ComplexToSimple::calculateIntersections(), QCalendarPopup::calendarWidget(), QMacDndAnswerRecord::clear(), clipboardData(), QXlibClipboard::clipboardReadIncrementalProperty(), QMainWindowLayout::createQToolBarInHIToolbarItem(), QMeeGoGraphicsSystemSwitchHandler::eventFilter(), QWSEvent::factory(), QGraphicsScenePrivate::filterEvent(), flipPoint(), QWSWindow::focus(), QXcbWindow::format(), QGraphicsItemPrivate::get(), QXcbWindow::handleClientMessageEvent(), QXlibClipboard::handleSelectionRequest(), QWidgetPrivate::handleSoftwareInputPanel(), handleTopLevelUIElementAttribute(), handleWindowAttribute(), QSystemTrayIcon::hide(), QWinInputContext::identifierName(), QCoeFepInputContext::identifierName(), QWSClient::identity(), QDesktopWidgetPrivate::init(), QCoreApplication::instance(), QGraphicsScene::invalidate(), QToolBar::isAreaAllowed(), QDockWidget::isAreaAllowed(), QSocketNotifier::isEnabled(), QApplication::isLeftToRight(), QCalendarWidget::isNavigationBarVisible(), QDeclarativePathViewPrivate::isValid(), kdProcessMouseEvents(), QCalendarView::keyboardSearch(), make_widget_eventUPP(), make_win_eventUPP(), QX11Data::motifdndHandle(), QShortcutMap::nextState(), QWSWindow::operation(), QTriangulator< T >::ComplexToSimple::Event::operator<(), QMacWindowFader::performFade(), QEventDispatcherMac::processEvents(), qAppInstance(), QGraphicsProxyWidgetPrivate::QGraphicsProxyWidgetPrivate(), QMdiAreaTabBar::QMdiAreaTabBar(), qt_init_timestamp_scanner(), qt_internal_proc(), qt_mac_send_event(), qt_mac_waitForMoreEvents(), qt_tabletMotion_scanner(), qt_try_modal(), qt_xfixes_scanner(), qt_XTranslateKey(), QOpenKODEEventLoopIntegration::qtNeedsToProcessEvents(), QWizardHeader::QWizardHeader(), qwsEventSourceDispatch(), QApplication::qwsProcessEvent(), QPanGestureRecognizer::recognize(), QWinNativePanGestureRecognizer::recognize(), QMacSwipeGestureRecognizer::recognize(), QPinchGestureRecognizer::recognize(), QMacPinchGestureRecognizer::recognize(), QSwipeGestureRecognizer::recognize(), QTapGestureRecognizer::recognize(), QTapAndHoldGestureRecognizer::recognize(), QGraphicsItemPrivate::remapItemPos(), QGraphicsScenePrivate::removePopup(), QCoreApplicationPrivate::removePostedTimerEvent(), QGraphicsProxyWidgetPrivate::removeSubFocusHelper(), QTriangulator< T >::ComplexToSimple::removeUnwantedEdgesAndConnect(), QMacPinchGestureRecognizer::reset(), QWidget::resetInputContext(), QIntKeyboardListenThread::run(), QGraphicsItem::sceneEvent(), QListViewPrivate::selectionAllowed(), QGraphicsScenePrivate::sendHoverEvent(), sendUpdateRequest(), sendWindowSystemEvents(), QGraphicsScenePrivate::setActivePanelHelper(), QGraphicsScenePrivate::setFocusItemHelper(), QLineControl::setFont(), QWidgetPrivate::setModal_sys(), QListModeViewBase::setRowCount(), QWidget::setShown(), QXcbWindow::setVisible(), QMdiSubWindowPrivate::showButtonsInMenuBar(), socketNotifierSourceDispatch(), QOpenKODEEventLoopIntegration::startEventLoop(), QAccessibleHeader::text(), QGraphicsScenePrivate::ungrabKeyboard(), QGraphicsScenePrivate::ungrabMouse(), update_toolbar_style(), QGraphicsWidgetPrivate::updateFont(), QGraphicsScenePrivate::updateFont(), QGraphicsWidgetPrivate::updatePalette(), QGraphicsScenePrivate::updatePalette(), updateWidgets(), userEventSourceDispatch(), x11EventFilter(), x11EventSourceDispatch(), QApplication::x11ProcessEvent(), QDeclarativeTextInputPrivate::xToPos(), QAbstractPlatformMenuBar::~QAbstractPlatformMenuBar(), QScriptDebuggerEventHandlerInterface::~QScriptDebuggerEventHandlerInterface(), and QWSSoundServerPrivate::~QWSSoundServerPrivate().

◆ last_button

int last_button

Definition at line 177 of file qapplication_mac.mm.

◆ last_modifiers

int last_modifiers

Definition at line 177 of file qapplication_mac.mm.

◆ last_time

EventTime last_time

Definition at line 178 of file qapplication_mac.mm.

◆ last_widget

QPointer<QWidget> last_widget

Definition at line 175 of file qapplication_mac.mm.

◆ last_x

int last_x

Definition at line 176 of file qapplication_mac.mm.

Referenced by QPdfBaseEnginePrivate::drawTextItem().

◆ last_y

int last_y

Definition at line 176 of file qapplication_mac.mm.

Referenced by QPdfBaseEnginePrivate::drawTextItem().

◆ mac_keyboard_grabber

QWidget* mac_keyboard_grabber

◆ mac_mouse_grabber

QWidget* mac_mouse_grabber

◆ qt_antialiasing_threshold

int qt_antialiasing_threshold

Definition at line 495 of file qapplication.cpp.

Referenced by qt_mac_update_os_settings().

◆ qt_applefontsmoothing_enabled

Q_GUI_EXPORT bool qt_applefontsmoothing_enabled

◆ qt_button_down

QWidget* qt_button_down

Definition at line 188 of file qapplication_mac.mm.

Referenced by QApplicationPrivate::globalEventProcessor().

◆ qt_button_down_in_content

bool qt_button_down_in_content
static

Definition at line 191 of file qapplication_mac.mm.

Referenced by QApplicationPrivate::globalEventProcessor().

◆ qt_last_mouse_receiver

QPointer<QWidget> qt_last_mouse_receiver

Definition at line 189 of file qapplication_mac.mm.

Referenced by QApplicationPrivate::globalEventProcessor().

◆ qt_mac_app_fullscreen

bool qt_mac_app_fullscreen = false

◆ qt_mac_collapse_on_dblclick

bool qt_mac_collapse_on_dblclick = true
static

◆ qt_mac_dblclick

struct { ... } qt_mac_dblclick

◆ qt_mac_dock_menu

QMenu* qt_mac_dock_menu = 0
static

Definition at line 990 of file qapplication_mac.mm.

◆ qt_mac_no_click_through_mode

bool qt_mac_no_click_through_mode = false
static

Definition at line 193 of file qapplication_mac.mm.

Referenced by QApplicationPrivate::globalEventProcessor().

◆ qt_mac_notification

NMRec qt_mac_notification = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }
static

Definition at line 395 of file qapplication_mac.mm.

◆ qt_mac_previous_press_in_popup_mode

bool qt_mac_previous_press_in_popup_mode = false
static

Definition at line 192 of file qapplication_mac.mm.

Referenced by QApplicationPrivate::globalEventProcessor().

◆ qt_mac_safe_pdev

QPaintDevice* qt_mac_safe_pdev = 0

Definition at line 166 of file qapplication_mac.mm.

Referenced by getTabDirection(), and qt_cleanup().

◆ qt_modal_stack

QWidgetList* qt_modal_stack

Definition at line 564 of file qapplication.cpp.

Referenced by QApplicationPrivate::leaveModal_sys().

◆ qt_scrollbar_jump_to_pos

bool qt_scrollbar_jump_to_pos = false

Definition at line 185 of file qapplication_mac.mm.

Referenced by qt_mac_update_os_settings(), and QMacStyle::styleHint().

◆ qt_tab_all_widgets

bool qt_tab_all_widgets

Definition at line 493 of file qapplication.cpp.

Referenced by qt_mac_update_os_settings().

◆ request_activate_pending

struct { ... } request_activate_pending

◆ request_context_pending

EventRef request_context_pending = 0
static

Definition at line 953 of file qapplication_mac.mm.

Referenced by qt_event_request_context().

◆ request_menubarupdate_pending

EventRef request_menubarupdate_pending = 0
static

Definition at line 928 of file qapplication_mac.mm.

◆ request_showsheet_pending

EventRef request_showsheet_pending = 0
static

Definition at line 746 of file qapplication_mac.mm.

◆ request_window_change_pending

EventRef request_window_change_pending = 0
static

Definition at line 845 of file qapplication_mac.mm.

◆ tablet_button_state

int tablet_button_state = 0
static

Definition at line 194 of file qapplication_mac.mm.

Referenced by QApplicationPrivate::globalEventProcessor().

◆ tablet_proximity_handler

EventHandlerRef tablet_proximity_handler = 0
static

◆ tablet_proximity_UPP

EventHandlerUPP tablet_proximity_UPP = 0
static

Definition at line 205 of file qapplication_mac.mm.

Referenced by qt_cleanup(), qt_init(), and qt_init_tablet_proximity_handler().

◆ timer

EventLoopTimerRef timer

◆ timerUPP

EventLoopTimerUPP timerUPP

Definition at line 882 of file qapplication_mac.mm.

◆ topLevelAt_cache

QPointer<QWidget> topLevelAt_cache = 0

Definition at line 168 of file qapplication_mac.mm.

◆ use_qt_time_limit

bool use_qt_time_limit

Definition at line 174 of file qapplication_mac.mm.

◆ widget

QPointer<QWidget> widget

Definition at line 879 of file qapplication_mac.mm.

Referenced by QMenuPrivate::_q_actionTriggered(), QDeclarativeLoaderPrivate::_q_updateSize(), QToolBar::actionAt(), QMenu::actionEvent(), QMenuPrivate::activateAction(), QMenuPrivate::activateCausedStack(), QMenuPrivate::QMacMenuPrivate::addAction(), QGridLayoutPrivate::addData(), QDeclarativeAnchorsPrivate::addDepend(), QGraphicsScene::addItem(), QListWidget::addItems(), QStatusBar::addPermanentWidget(), QGraphicsScenePrivate::addPopup(), QMdiArea::addSubWindow(), QMeeGoGraphicsSystemSwitchHandler::addWidget(), alert_widget(), QWidgetAnimator::animate(), QMacStylePrivate::animateSpeed(), QToolBarAreaLayout::apply(), QWidgetPrivate::assignedInputContext(), QPainterPrivate::attachPainterPrivate(), axc_FilterProc(), QStylePainter::begin(), QPainter::begin(), buddyString(), buildSpec(), QGLGlyphCache::cacheGlyphs(), QMenuPrivate::calcCausedStack(), QGestureManager::cancelGesturesForChildren(), QItemDelegate::check(), QAbstractItemViewPrivate::checkPersistentEditorFocus(), QInputDialogPrivate::chooseRightTextInputWidget(), QDesktopWidgetPrivate::cleanup(), QGLGlobalShareWidget::cleanup(), closestAcceptableSize(), QScreen::colorCount(), QMainWindowLayoutState::contains(), CompatAccessibleFactory::create(), AccessibleFactory::create(), QGLGraphicsSystem::createWindowSurface(), QGLWindowSurface::deleted(), QStyleSheetStyle::deref(), QGLGlobalShareWidget::destroy(), QWidgetBackingStore::dirtyOnScreenWidgetsRemoveAll(), QWidgetBackingStore::dirtyWidgetsRemoveAll(), DllCanUnloadNow(), QDockWidgetItem::dockWidgetLayout(), QItemDelegate::doLayout(), QFbScreen::doRedraw(), drawArrow(), QItemDelegate::drawCheck(), QWindowsVistaStyle::drawComplexControl(), QCommonStyle::drawComplexControl(), QWindowsVistaStyle::drawControl(), QItemDelegate::drawDisplay(), QItemDelegate::drawFocus(), QGraphicsScenePrivate::drawItemHelper(), QGraphicsScenePrivate::drawItems(), QGraphicsView::drawItems(), QWindowsVistaStyle::drawPrimitive(), QStyledItemDelegate::editorEvent(), QApplicationPrivate::enterModal_sys(), QUIKitSoftwareInputHandler::eventFilter(), QMeeGoGraphicsSystemSwitchHandler::eventFilter(), QWindowsStyle::eventFilter(), QPlastiqueStyle::eventFilter(), QCalendarWidget::eventFilter(), QComboBoxPrivateContainer::eventFilter(), find_child(), QMenuBarPrivate::QMacMenuBarPrivate::findAction(), QX11Data::findClientWindow(), ShivaVGWindowSurface::flush(), QVGWindowSurface::flush(), QWidgetBackingStore::flush(), QGLWindowSurface::flush(), QEventDispatcherMac::flush(), QGraphicsScene::focusNextPrevChild(), QWidgetPrivate::frameStrut(), QFbScreen::generateRects(), QGestureManager::getGestureTargets(), QAxClientSite::GetIDsOfNames(), getNamedAttribute(), QSplitterLayoutStruct::getWidgetSize(), QApplicationPrivate::giveFocusAccordingToFocusPolicy(), QMacInputContext::globalEventProcessor(), QApplicationPrivate::globalEventProcessor(), QXlibIntegration::grabWindow(), QPixmap::grabWindow(), QApplicationPrivate::graphicsSystem(), QGtkStylePrivate::gtkWidget(), QGtkStylePrivate::gtkWidgetMap(), QXlibScreen::handleEvent(), QWidgetPrivate::hideChildren(), QAInterface::hiObject(), QLayout::indexOf(), QDockAreaLayoutInfo::indexOf(), QDockAreaLayoutInfo::info(), QDesktopWidgetPrivate::init(), QPageSetupDialogPrivate::init(), QPainter::initFrom(), QDeclarativeLoaderPrivate::initResize(), QNSView::initWithWidget:, QWidget::internalWinId(), QKeyMapperPrivate::isADeadKey(), QToolBar::isAreaAllowed(), QApplicationPrivate::isBlockedByModal(), QCoeFepInputContext::isComposing(), QDockWidget::isFloating(), isTransient(), QWSYellowSurface::isValid(), QGraphicsScene::itemAt(), QGraphicsSceneIndexPrivate::itemCollidesWithPath(), QDialogButtonBoxPrivate::layoutButtons(), QApplicationPrivate::leaveModal_sys(), macWindowFade(), make_widget_eventUPP(), mdiAreaNavigate(), QCustomRasterPaintDevice::metric(), QGraphicsTextItem::mouseReleaseEvent(), QTest::QTouchEventSequence::move(), QBBNativeInterface::nativeResourceForWidget(), QApplication::notify(), QApplicationPrivate::notify_helper(), QStyledItemDelegate::paint(), QEglFSWindowSurface::paintDevice(), QBBGLWindowSurface::paintDevice(), QFbWindowSurface::paintDevice(), QMacScrollOptimization::performDelayedScroll(), QMacWindowFader::performFade(), QXlibScreen::physicalSize(), QPlatformScreen::physicalSize(), QCDEStyle::pixelMetric(), QMacStyle::pixelMetric(), platformWindowFromId(), QMainWindowLayout::plug(), QPlatformCursor::pointerEvent(), QPlastiqueStyle::polish(), QGtkStyle::polish(), QTest::QTouchEventSequence::press(), ptr(), PvrEglScreenSurfaceFunctions::PvrEglScreenSurfaceFunctions(), PvrEglWindowSurface::PvrEglWindowSurface(), q_createNativeChildrenAndSetParent(), qDeleteQGLContext(), QMacWindowSurface::QMacWindowSurface(), qPRCleanup(), qPRCreate(), qt_gl_share_context(), qt_mac_activate_action(), qt_mac_create_widget(), qt_mac_desktopSize(), qt_mac_event_release(), qt_mac_menu_event(), qt_mac_tablet_hash(), qt_mac_update_intersected_gl_widgets(), qt_mac_widget_in_menu_eventHandler(), qt_mainwindow_layout(), qt_tablet_cleanup(), qt_try_modal(), QToolBoxPrivate::QToolBoxPrivate(), QtWndProc(), QAccessible::queryAccessibleInterface(), QUIKitSoftwareInputHandler::QUIKitSoftwareInputHandler(), QWSGraphicsSystem::QWSGraphicsSystem(), QApplication::qwsProcessEvent(), QApplication::qwsSetCustomColors(), QX11WindowSurface::QX11WindowSurface(), QMdi::RegularTiler::rearrange(), QMdi::SimpleCascader::rearrange(), QMdi::IconTiler::rearrange(), QAccessibleTitleBar::rect(), QDecoration::region(), QTest::QTouchEventSequence::release(), QDeclarativeAnchorsPrivate::remDepend(), QGraphicsScenePrivate::removeItemHelper(), QMdiArea::removeSubWindow(), QLayout::removeWidget(), QAxClientSite::reset(), QPainter::restoreRedirected(), QDockAreaLayoutInfo::restoreState(), QMainWindowLayout::revert(), QDeclarativeVME::run(), QToolBarAreaLayout::saveState(), screenForDevice(), QDesktopWidget::screenGeometry(), QDeclarativeTextInputPrivate::sendMouseEventToInputContext(), QWizardPrivate::setButtonLayout(), QMainWindow::setCentralWidget(), QAbstractScrollArea::setCornerWidget(), QMenuPrivate::setCurrentAction(), QWidgetAction::setDefaultWidget(), QPlatformScreen::setDirty(), QBBInputContext::setFocusWidget(), QInputContext::setFocusWidget(), QWidgetPrivate::setFont_helper(), QRuntimeGraphicsSystem::setGraphicsSystem(), QInputDialog::setInputMode(), QInputDialogPrivate::setInputWidget(), QTreeWidget::setItemWidget(), QGraphicsWidgetPrivate::setLayoutDirection_helper(), QGraphicsLineItem::setLine(), QLayout::setMenuBar(), PvrEglScreen::setMode(), QCursor::setPos(), QColumnViewPreviewColumn::setPreviewWidget(), QColumnViewPrivate::setPreviewWidget(), QColumnView::setResizeGripsVisible(), QDeclarativeView::setRootObject(), QWizard::setSideWidget(), QWatermarkLabel::setSideWidget(), QGraphicsScene::setStyle(), QGraphicsWidgetStyles::setStyleForWidget(), QTabBar::setTabButton(), QGraphicsItem::setTransformOriginPoint(), QFormLayoutPrivate::setupVerticalLayoutData(), QmlJSDebugger::QDeclarativeViewInspectorPrivate::setViewport(), QAbstractScrollArea::setViewport(), QGraphicsItemPrivate::setVisibleHelper(), QCalendarTextNavigator::setWidget(), QMacStyle::setWidgetSizePolicy(), QGLGlobalShareWidget::shareWidget(), ShivaVGWindowSurfacePrivate::ShivaVGWindowSurfacePrivate(), QWidgetPrivate::showChildren(), showToolTip(), QMacStyle::sizeFromContents(), QStyledItemDelegate::sizeHint(), QMdiArea::sizeHint(), QWindowsVistaStylePrivate::stopAnimation(), QWindowsXPStyle::styleHint(), QWindowsStyle::styleHint(), QCommonStyle::subElementRect(), QDirectFBScreen::surfaceForWidget(), QPixmap::swap(), QApplication::syncX(), QNativeImage::systemFormat(), IsWindowAndNotDrawerOrSheetTest::test(), QWindowsVistaStylePrivate::timerEvent(), QTextControl::toHtml(), QApplication::topLevelAt(), QTest::touchEvent(), QAxClientSite::translateKeyEvent(), QETWidget::translateMouseEvent(), QApplicationPrivate::translateRawTouchEvent(), uniqueName(), QMacStyle::unpolish(), QPlastiqueStyle::unpolish(), update_toolbar_style(), QAccessible::updateAccessibility(), QMenuPrivate::updateActionRects(), QStyledItemDelegate::updateEditorGeometry(), QGraphicsViewPrivate::updateInputMethodSensitivity(), QUIKitScreen::updateInterfaceOrientation(), updateRedirectedToGraphicsProxyWidget(), QGtkStyleUpdateScheduler::updateTheme(), updateWidgets(), QCommonStylePrivate::viewItemDrawText(), QCommonStylePrivate::viewItemLayout(), QCommonStylePrivate::viewItemSize(), QFormLayoutItem::vStretch(), QWindowsVistaStylePrivate::widgetAnimation(), QVGEGLWindowSurfacePrivate::windowSurfaceSize(), QDecorationDefault::windowTitleFor(), QApplication::x11ProcessEvent(), QFormLayoutPrivate::~QFormLayoutPrivate(), QGraphicsWidget::~QGraphicsWidget(), QMenu::~QMenu(), QPlatformIntegration::~QPlatformIntegration(), and QWindowsXPStylePrivate::~QWindowsXPStylePrivate().