Commit 4d2f2ff23409527863937df129d28fc3efd6859a
- Diff rendering mode:
- inline
- side by side
src/corelib/global/qglobal.h
(4 / 0)
|   | |||
| 180 | 180 | # if defined(TARGET_OS_IPHONE) && TARGET_OS_IPHONE == 1 | |
| 181 | 181 | # define Q_OS_IPHONE | |
| 182 | 182 | # define Q_OS_BSD4 | |
| 183 | # define QT_NO_TABLET | ||
| 183 | 184 | # else | |
| 184 | 185 | # define Q_OS_DARWIN | |
| 185 | 186 | # define Q_OS_BSD4 | |
| … | … | ||
| 776 | 776 | /* | |
| 777 | 777 | The window system, must be one of: (Q_WS_x) | |
| 778 | 778 | ||
| 779 | IPHONE - iPhone | ||
| 779 | 780 | MACX - Mac OS X | |
| 780 | 781 | MAC9 - Mac OS 9 | |
| 781 | 782 | QWS - Qt for Embedded Linux | |
| … | … | ||
| 815 | 815 | # elif defined(Q_OS_MAC32) | |
| 816 | 816 | # define Q_WS_MAC32 | |
| 817 | 817 | # endif | |
| 818 | # elif defined(Q_OS_IPHONE) | ||
| 819 | # define Q_WS_IPHONE | ||
| 818 | 820 | # elif defined(Q_OS_SYMBIAN) | |
| 819 | 821 | # if (defined(__SERIES60_31__) || defined(__S60_32__) || defined(__S60_50__)) && !defined(QT_NO_S60) | |
| 820 | 822 | # define Q_WS_S60 |
|   | |||
| 1533 | 1533 | ||
| 1534 | 1534 | #if defined(Q_WS_MAC) | |
| 1535 | 1535 | typedef void * HANDLE; | |
| 1536 | #elif defined(Q_WS_IPHONE) | ||
| 1537 | typedef void *HANDLE; | ||
| 1536 | 1538 | #elif defined(Q_WS_WIN) | |
| 1537 | 1539 | typedef void *HANDLE; | |
| 1538 | 1540 | #elif defined(Q_WS_X11) |
src/gui/gui.pro
(2 / 1)
|   | |||
| 4 | 4 | DEFINES += QT_BUILD_GUI_LIB QT_NO_USING_NAMESPACE | |
| 5 | 5 | win32-msvc*|win32-icc:QMAKE_LFLAGS += /BASE:0x65000000 | |
| 6 | 6 | ||
| 7 | !win32:!embedded:!mac:!symbian:CONFIG += x11 | ||
| 7 | !win32:!embedded:!mac:!symbian:!iphone:CONFIG += x11 | ||
| 8 | 8 | ||
| 9 | 9 | unix:QMAKE_PKGCONFIG_REQUIRES = QtCore | |
| 10 | 10 | ||
| … | … | ||
| 15 | 15 | #platforms | |
| 16 | 16 | x11:include(kernel/x11.pri) | |
| 17 | 17 | mac:include(kernel/mac.pri) | |
| 18 | iphone:include(kernel/iphone.pri) | ||
| 18 | 19 | win32:include(kernel/win.pri) | |
| 19 | 20 | embedded:include(embedded/embedded.pri) | |
| 20 | 21 | symbian { |
|   | |||
| 123 | 123 | friend void qt_mac_cgimage_data_free(void *, const void*, size_t); | |
| 124 | 124 | friend IconRef qt_mac_create_iconref(const QPixmap&); | |
| 125 | 125 | friend CGContextRef qt_mac_cg_context(const QPaintDevice*); | |
| 126 | #ifndef Q_WS_IPHONE | ||
| 126 | 127 | friend QColor qcolorForThemeTextColor(ThemeTextColor themeColor); | |
| 128 | #endif | ||
| 127 | 129 | }; | |
| 128 | 130 | ||
| 129 | 131 | QT_END_NAMESPACE |
|   | |||
| 50 | 50 | #if defined(Q_WS_WIN) || defined(Q_OS_SYMBIAN) | |
| 51 | 51 | # include <private/qpixmap_raster_p.h> | |
| 52 | 52 | #endif | |
| 53 | #ifdef Q_WS_MAC | ||
| 53 | #if defined(Q_WS_MAC) || defined(Q_WS_IPHONE) | ||
| 54 | 54 | # include <private/qpixmap_mac_p.h> | |
| 55 | 55 | #endif | |
| 56 | 56 | ||
| … | … | ||
| 77 | 77 | return new QX11PixmapData(type); | |
| 78 | 78 | #elif defined(Q_WS_WIN) || defined(Q_OS_SYMBIAN) | |
| 79 | 79 | return new QRasterPixmapData(type); | |
| 80 | #elif defined(Q_WS_MAC) | ||
| 80 | #elif defined(Q_WS_MAC) || defined(Q_WS_IPHONE) | ||
| 81 | 81 | return new QMacPixmapData(type); | |
| 82 | 82 | #else | |
| 83 | 83 | #error QSimplePixmapDataFactory::create() not implemented |
src/gui/kernel/iphone.pri
(3 / 0)
|   | |||
| 1 | !x11:!embedded:iphone { | ||
| 2 | LIBS_PRIVATE += -framework CoreFoundation -lz | ||
| 3 | } |
src/gui/kernel/kernel.pri
(1 / 1)
|   | |||
| 181 | 181 | ||
| 182 | 182 | } | |
| 183 | 183 | ||
| 184 | !embedded:!x11:mac { | ||
| 184 | !embedded:!x11:mac:iphone { | ||
| 185 | 185 | SOURCES += \ | |
| 186 | 186 | kernel/qclipboard_mac.cpp \ | |
| 187 | 187 | kernel/qmime_mac.cpp \ |
|   | |||
| 499 | 499 | static Qt::NavigationMode navigationMode; | |
| 500 | 500 | #endif | |
| 501 | 501 | ||
| 502 | #if defined(Q_WS_MAC) || defined(Q_WS_X11) | ||
| 502 | #if defined(Q_WS_MAC) || defined(Q_WS_IPHONE) || defined(Q_WS_X11) | ||
| 503 | 503 | void _q_alertTimeOut(); | |
| 504 | 504 | QHash<QWidget *, QTimer *> alertTimerHash; | |
| 505 | 505 | #endif |
|   | |||
| 115 | 115 | ||
| 116 | 116 | QT_BEGIN_NAMESPACE | |
| 117 | 117 | Qt::MouseButtons qt_mac_get_buttons(int buttons); | |
| 118 | #ifndef Q_WS_IPHONE | ||
| 118 | 119 | Qt::MouseButton qt_mac_get_button(EventMouseButton button); | |
| 120 | #endif | ||
| 119 | 121 | void macWindowFade(void * /*OSWindowRef*/ window, float durationSeconds = 0); | |
| 120 | 122 | bool macWindowIsTextured(void * /*OSWindowRef*/ window); | |
| 121 | 123 | void macWindowToolbarShow(const QWidget *widget, bool show ); | |
| … | … | ||
| 145 | 145 | bool qt_mac_handleMouseEvent(void * /*QCocoaView * */view, void * /*NSEvent * */event, QEvent::Type eventType, Qt::MouseButton button); | |
| 146 | 146 | bool qt_mac_handleTabletEvent(void * /*QCocoaView * */view, void * /*NSEvent * */event); | |
| 147 | 147 | inline QApplication *qAppInstance() { return static_cast<QApplication *>(QCoreApplication::instance()); } | |
| 148 | #ifndef Q_WS_IPHONE | ||
| 148 | 149 | struct ::TabletProximityRec; | |
| 149 | 150 | void qt_dispatchTabletProximityEvent(const ::TabletProximityRec &proxRec); | |
| 151 | #endif | ||
| 150 | 152 | Qt::KeyboardModifiers qt_cocoaModifiers2QtModifiers(ulong modifierFlags); | |
| 151 | 153 | Qt::KeyboardModifiers qt_cocoaDragOperation2QtModifiers(uint dragOperations); | |
| 152 | 154 | QPixmap qt_mac_convert_iconref(const IconRef icon, int width, int height); |
src/gui/kernel/qt_mac_p.h
(10 / 2)
|   | |||
| 59 | 59 | #include <Cocoa/Cocoa.h> | |
| 60 | 60 | #endif | |
| 61 | 61 | ||
| 62 | #include <CoreServices/CoreServices.h> | ||
| 62 | #ifndef Q_WS_IPHONE | ||
| 63 | # include <CoreServices/CoreServices.h> | ||
| 64 | # include <Carbon/Carbon.h> | ||
| 65 | #else | ||
| 66 | # include <CoreGraphics/CoreGraphics.h> | ||
| 67 | #endif | ||
| 63 | 68 | ||
| 64 | 69 | #include "QtCore/qglobal.h" | |
| 65 | 70 | #include "QtCore/qvariant.h" | |
| … | … | ||
| 75 | 75 | ||
| 76 | 76 | #include "QtGui/qpainter.h" | |
| 77 | 77 | ||
| 78 | #include <Carbon/Carbon.h> | ||
| 79 | 78 | ||
| 80 | 79 | QT_BEGIN_NAMESPACE | |
| 81 | 80 | class QWidget; | |
| … | … | ||
| 225 | 225 | uchar mime_type; | |
| 226 | 226 | mutable QPointer<QMimeData> mime; | |
| 227 | 227 | mutable bool mac_mime_source; | |
| 228 | #ifndef Q_WS_IPHONE | ||
| 228 | 229 | static OSStatus promiseKeeper(OSPasteboardRef, PasteboardItemID, CFStringRef, void *); | |
| 230 | #endif | ||
| 229 | 231 | void clear_helper(); | |
| 230 | 232 | public: | |
| 231 | 233 | QMacPasteboard(OSPasteboardRef p, uchar mime_type=0); | |
| … | … | ||
| 260 | 260 | # undef check | |
| 261 | 261 | #endif | |
| 262 | 262 | ||
| 263 | #ifndef Q_WS_IPHONE | ||
| 263 | 264 | QFont qfontForThemeFont(ThemeFontID themeID); | |
| 264 | 265 | ||
| 265 | 266 | QColor qcolorForTheme(ThemeBrush brush); | |
| 266 | 267 | ||
| 267 | 268 | QColor qcolorForThemeTextColor(ThemeTextColor themeColor); | |
| 269 | #endif | ||
| 268 | 270 | ||
| 269 | 271 | struct QMacDndAnswerRecord { | |
| 270 | 272 | QRect rect; |
src/gui/kernel/qwidget_p.h
(8 / 4)
|   | |||
| 77 | 77 | #include <private/qt_mac_p.h> | |
| 78 | 78 | #endif | |
| 79 | 79 | ||
| 80 | #ifdef Q_WS_IPHONE | ||
| 81 | #include <private/qt_mac_p.h> | ||
| 82 | #endif | ||
| 83 | |||
| 80 | 84 | #if defined(Q_WS_QWS) | |
| 81 | 85 | #include "QtGui/qinputcontext.h" | |
| 82 | 86 | #include "QtGui/qscreen_qws.h" | |
| … | … | ||
| 102 | 102 | #if defined(Q_WS_QWS) | |
| 103 | 103 | class QWSManager; | |
| 104 | 104 | #endif | |
| 105 | #if defined(Q_WS_MAC) | ||
| 105 | #if defined(Q_WS_MAC) || defined(Q_WS_IPHONE) | ||
| 106 | 106 | class QCoreGraphicsPaintEnginePrivate; | |
| 107 | 107 | #endif | |
| 108 | 108 | class QPaintEngine; | |
| … | … | ||
| 163 | 163 | #elif defined(Q_WS_WIN) // <--------------------------------------------------------- WIN | |
| 164 | 164 | HICON winIconBig; // internal big Windows icon | |
| 165 | 165 | HICON winIconSmall; // internal small Windows icon | |
| 166 | #elif defined(Q_WS_MAC) // <--------------------------------------------------------- MAC | ||
| 166 | #elif defined(Q_WS_MAC) || defined(Q_WS_IPHONE) // <--------------------------------- MAC | ||
| 167 | 167 | uint resizer : 4; | |
| 168 | 168 | uint isSetGeometry : 1; | |
| 169 | 169 | uint isMove : 1; | |
| 170 | 170 | quint32 wattr; | |
| 171 | 171 | quint32 wclass; | |
| 172 | WindowGroupRef group; | ||
| 172 | //WindowGroupRef group; | ||
| 173 | 173 | IconRef windowIcon; // the current window icon, if set with setWindowIcon_sys. | |
| 174 | 174 | quint32 savedWindowAttributesFromMaximized; // Saved attributes from when the calling updateMaximizeButton_sys() | |
| 175 | 175 | #elif defined(Q_WS_QWS) // <--------------------------------------------------------- QWS | |
| … | … | ||
| 225 | 225 | #elif defined(Q_WS_X11) // <--------------------------------------------------------- X11 | |
| 226 | 226 | uint compress_events : 1; | |
| 227 | 227 | WId xDndProxy; // XDND forwarding to embedded windows | |
| 228 | #elif defined(Q_WS_MAC) // <------------------------------------------------------ MAC | ||
| 228 | #elif defined(Q_WS_MAC) || defined(Q_WS_IPHONE) // <--------------------------------- MAC | ||
| 229 | 229 | #ifdef QT_MAC_USE_COCOA | |
| 230 | 230 | // Cocoa Mask stuff | |
| 231 | 231 | QImage maskBits; |
src/gui/kernel/qwindowdefs.h
(2 / 2)
|   | |||
| 94 | 94 | ||
| 95 | 95 | // Window system dependent definitions | |
| 96 | 96 | ||
| 97 | #if defined(Q_WS_MAC) && !defined(Q_WS_QWS) | ||
| 97 | #if defined(Q_WS_MAC) || defined(Q_WS_IPHONE) && !defined(Q_WS_QWS) | ||
| 98 | 98 | ||
| 99 | 99 | #include <QtGui/qmacdefines_mac.h> | |
| 100 | 100 | ||
| 101 | #ifdef Q_WS_MAC32 | ||
| 101 | #if defined(Q_WS_MAC32) || defined(Q_WS_IPHONE) | ||
| 102 | 102 | typedef int WId; | |
| 103 | 103 | #else | |
| 104 | 104 | typedef long WId; |
|   | |||
| 47 | 47 | #if defined(Q_WS_WIN) || defined(Q_OS_SYMBIAN) | |
| 48 | 48 | # include <private/qpixmap_raster_p.h> | |
| 49 | 49 | #endif | |
| 50 | #ifdef Q_WS_MAC | ||
| 50 | #if defined(Q_WS_MAC) || defined(Q_WS_IPHONE) | ||
| 51 | 51 | # include <private/qpixmap_mac_p.h> | |
| 52 | 52 | #endif | |
| 53 | 53 | ||
| … | … | ||
| 66 | 66 | return new QX11PixmapData(type); | |
| 67 | 67 | #elif defined(Q_WS_WIN) || defined(Q_OS_SYMBIAN) | |
| 68 | 68 | return new QRasterPixmapData(type); | |
| 69 | #elif defined(Q_WS_MAC) | ||
| 69 | #elif defined(Q_WS_MAC) || defined(Q_WS_IPHONE) | ||
| 70 | 70 | return new QMacPixmapData(type); | |
| 71 | 71 | #elif !defined(Q_WS_QWS) | |
| 72 | 72 | #error QGraphicsSystem::createDefaultPixmapData() not implemented |
src/gui/painting/qregion.h
(4 / 4)
|   | |||
| 59 | 59 | template <class T> class QVector; | |
| 60 | 60 | class QVariant; | |
| 61 | 61 | ||
| 62 | #if defined(Q_WS_QWS) || defined(Q_WS_X11) || defined(Q_WS_MAC) || defined(Q_WS_WIN) || defined(Q_OS_SYMBIAN) | ||
| 62 | #if defined(Q_WS_QWS) || defined(Q_WS_X11) || defined(Q_WS_MAC) || defined(Q_WS_IPHONE) || defined(Q_WS_WIN) || defined(Q_OS_SYMBIAN) | ||
| 63 | 63 | struct QRegionPrivate; | |
| 64 | 64 | #endif | |
| 65 | 65 | ||
| … | … | ||
| 145 | 145 | inline HRGN handle() const { ensureHandle(); return d->rgn; } | |
| 146 | 146 | #elif defined(Q_WS_X11) | |
| 147 | 147 | inline Region handle() const { if(!d->rgn) updateX11Region(); return d->rgn; } | |
| 148 | #elif defined(Q_WS_MAC) | ||
| 148 | #elif defined(Q_WS_MAC) || defined(Q_WS_IPHONE) | ||
| 149 | 149 | #if defined Q_WS_MAC32 | |
| 150 | 150 | RgnHandle toQDRgn() const; | |
| 151 | 151 | RgnHandle toQDRgnForUpdate_sys() const; | |
| … | … | ||
| 179 | 179 | void updateX11Region() const; | |
| 180 | 180 | void *clipRectangles(int &num) const; | |
| 181 | 181 | friend void *qt_getClipRects(const QRegion &r, int &num); | |
| 182 | #elif defined(Q_WS_MAC) | ||
| 182 | #elif defined(Q_WS_MAC) || defined(Q_WS_IPHONE) | ||
| 183 | 183 | static OSStatus shape2QRegionHelper(int inMessage, HIShapeRef inShape, | |
| 184 | 184 | const CGRect *inRect, void *inRefcon); | |
| 185 | 185 | #endif | |
| … | … | ||
| 200 | 200 | #elif defined(Q_WS_MAC) && !defined(QT_MAC_USE_COCOA) | |
| 201 | 201 | mutable RgnHandle unused; // Here for binary compatability reasons. ### Qt 5 remove. | |
| 202 | 202 | #endif | |
| 203 | #if defined(Q_WS_QWS) || defined(Q_WS_X11) || defined(Q_WS_MAC) || defined(Q_WS_WIN) || defined(Q_OS_SYMBIAN) | ||
| 203 | #if defined(Q_WS_QWS) || defined(Q_WS_X11) || defined(Q_WS_MAC) || defined(Q_WS_IPHONE) || defined(Q_WS_WIN) || defined(Q_OS_SYMBIAN) | ||
| 204 | 204 | QRegionPrivate *qt_rgn; | |
| 205 | 205 | #endif | |
| 206 | 206 | }; |
src/gui/styles/styles.pri
(5 / 0)
|   | |||
| 41 | 41 | styles += gtk | |
| 42 | 42 | } | |
| 43 | 43 | ||
| 44 | iphone{ | ||
| 45 | styles -= mac | ||
| 46 | DEFINES += QT_NO_STYLE_MAC | ||
| 47 | } | ||
| 48 | |||
| 44 | 49 | contains( styles, mac ) { | |
| 45 | 50 | HEADERS += \ | |
| 46 | 51 | styles/qmacstyle_mac.h \ |
|   | |||
| 404 | 404 | bool writingSystemCheck : 1; | |
| 405 | 405 | bool loaded : 1; | |
| 406 | 406 | #endif | |
| 407 | #if !defined(QWS) && defined(Q_OS_MAC) | ||
| 407 | #if !defined(QWS) && (defined(Q_OS_MAC) || defined(Q_OS_IPHONE)) | ||
| 408 | 408 | bool fixedPitchComputed : 1; | |
| 409 | 409 | #endif | |
| 410 | 410 | #ifdef Q_WS_X11 | |
| … | … | ||
| 431 | 431 | QtFontFoundry *foundry(const QString &f, bool = false); | |
| 432 | 432 | }; | |
| 433 | 433 | ||
| 434 | #if !defined(QWS) && defined(Q_OS_MAC) | ||
| 434 | #if !defined(QWS) && (defined(Q_OS_MAC) || defined(Q_OS_IPHONE)) | ||
| 435 | 435 | inline static void qt_mac_get_fixed_pitch(QtFontFamily *f) | |
| 436 | 436 | { | |
| 437 | 437 | if(f && !f->fixedPitchComputed) { | |
| … | … | ||
| 640 | 640 | HANDLE handle; | |
| 641 | 641 | bool memoryFont; | |
| 642 | 642 | QVector<FONTSIGNATURE> signatures; | |
| 643 | #elif defined(Q_WS_MAC) | ||
| 643 | #elif defined(Q_WS_MAC) || defined(Q_WS_IPHONE) | ||
| 644 | 644 | ATSFontContainerRef handle; | |
| 645 | 645 | #endif | |
| 646 | 646 | QStringList families; | |
| … | … | ||
| 1035 | 1035 | QT_BEGIN_INCLUDE_NAMESPACE | |
| 1036 | 1036 | #if defined(Q_WS_X11) | |
| 1037 | 1037 | # include "qfontdatabase_x11.cpp" | |
| 1038 | #elif defined(Q_WS_MAC) | ||
| 1038 | #elif defined(Q_WS_MAC) || defined(Q_WS_IPHONE) | ||
| 1039 | 1039 | # include "qfontdatabase_mac.cpp" | |
| 1040 | 1040 | #elif defined(Q_WS_WIN) | |
| 1041 | 1041 | # include "qfontdatabase_win.cpp" | |
| … | … | ||
| 1127 | 1127 | } | |
| 1128 | 1128 | #endif // Q_WS_X11 | |
| 1129 | 1129 | ||
| 1130 | #if !defined(Q_WS_MAC) | ||
| 1130 | #if !(defined(Q_WS_MAC) || defined(Q_WS_IPHONE)) | ||
| 1131 | 1131 | static | |
| 1132 | 1132 | unsigned int bestFoundry(int script, unsigned int score, int styleStrategy, | |
| 1133 | 1133 | const QtFontFamily *family, const QString &foundry_name, |
src/qbase.pri
(4 / 4)
|   | |||
| 8 | 8 | } else { | |
| 9 | 9 | VERSION=$${QT_MAJOR_VERSION}.$${QT_MINOR_VERSION}.$${QT_PATCH_VERSION} | |
| 10 | 10 | } | |
| 11 | mac:!contains(QMAKE_EXT_C, .mm):QMAKE_EXT_C += .mm | ||
| 11 | iphone|mac:!contains(QMAKE_EXT_C, .mm):QMAKE_EXT_C += .mm | ||
| 12 | 12 | ||
| 13 | 13 | #load up the headers info | |
| 14 | 14 | CONFIG += qt_install_headers | |
| … | … | ||
| 35 | 35 | CONFIG += qt warn_on depend_includepath | |
| 36 | 36 | CONFIG += qmake_cache target_qt | |
| 37 | 37 | CONFIG -= fix_output_dirs | |
| 38 | win32|mac:!macx-xcode:CONFIG += debug_and_release | ||
| 38 | win32|mac|iphone:!macx-xcode:CONFIG += debug_and_release | ||
| 39 | 39 | linux-g++*:QMAKE_LFLAGS += $$QMAKE_LFLAGS_NOUNDEF | |
| 40 | 40 | ||
| 41 | 41 | contains(QT_CONFIG, reduce_exports):CONFIG += hide_symbols | |
| … | … | ||
| 43 | 43 | contains(QT_CONFIG, largefile):CONFIG += largefile | |
| 44 | 44 | ||
| 45 | 45 | #mac frameworks | |
| 46 | mac:!static:contains(QT_CONFIG, qt_framework) { | ||
| 46 | iphone|mac:!static:contains(QT_CONFIG, qt_framework) { | ||
| 47 | 47 | #QMAKE_FRAMEWORK_VERSION = 4.0 | |
| 48 | 48 | CONFIG += lib_bundle qt_no_framework_direct_includes qt_framework | |
| 49 | 49 | CONFIG(debug, debug|release) { | |
| … | … | ||
| 65 | 65 | } | |
| 66 | 66 | } | |
| 67 | 67 | ||
| 68 | mac { | ||
| 68 | iphone|mac { | ||
| 69 | 69 | CONFIG += explicitlib | |
| 70 | 70 | macx-g++ { | |
| 71 | 71 | QMAKE_CFLAGS += -fconstant-cfstrings |

