00001 /**************************************************************************** 00002 ** 00003 ** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). 00004 ** All rights reserved. 00005 ** Contact: Nokia Corporation (qt-info@nokia.com) 00006 ** 00007 ** This file is part of the QtGui module of the Qt Toolkit. 00008 ** 00009 ** $QT_BEGIN_LICENSE:LGPL$ 00010 ** Commercial Usage 00011 ** Licensees holding valid Qt Commercial licenses may use this file in 00012 ** accordance with the Qt Commercial License Agreement provided with the 00013 ** Software or, alternatively, in accordance with the terms contained in 00014 ** a written agreement between you and Nokia. 00015 ** 00016 ** GNU Lesser General Public License Usage 00017 ** Alternatively, this file may be used under the terms of the GNU Lesser 00018 ** General Public License version 2.1 as published by the Free Software 00019 ** Foundation and appearing in the file LICENSE.LGPL included in the 00020 ** packaging of this file. Please review the following information to 00021 ** ensure the GNU Lesser General Public License version 2.1 requirements 00022 ** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. 00023 ** 00024 ** In addition, as a special exception, Nokia gives you certain additional 00025 ** rights. These rights are described in the Nokia Qt LGPL Exception 00026 ** version 1.1, included in the file LGPL_EXCEPTION.txt in this module. 00027 ** 00028 ** GNU General Public License Usage 00029 ** Alternatively, this file may be used under the terms of the GNU 00030 ** General Public License version 3.0 as published by the Free Software 00031 ** Foundation and appearing in the file LICENSE.GPL included in the 00032 ** packaging of this file. Please review the following information to 00033 ** ensure the GNU General Public License version 3.0 requirements will be 00034 ** met: http://www.gnu.org/copyleft/gpl.html. 00035 ** 00036 ** If you have questions regarding the use of this file, please contact 00037 ** Nokia at qt-info@nokia.com. 00038 ** $QT_END_LICENSE$ 00039 ** 00040 ****************************************************************************/ 00041 00042 /**************************************************************************** 00043 ** 00044 ** Copyright (c) 2007-2008, Apple, Inc. 00045 ** 00046 ** All rights reserved. 00047 ** 00048 ** Redistribution and use in source and binary forms, with or without 00049 ** modification, are permitted provided that the following conditions are met: 00050 ** 00051 ** * Redistributions of source code must retain the above copyright notice, 00052 ** this list of conditions and the following disclaimer. 00053 ** 00054 ** * Redistributions in binary form must reproduce the above copyright notice, 00055 ** this list of conditions and the following disclaimer in the documentation 00056 ** and/or other materials provided with the distribution. 00057 ** 00058 ** * Neither the name of Apple, Inc. nor the names of its contributors 00059 ** may be used to endorse or promote products derived from this software 00060 ** without specific prior written permission. 00061 ** 00062 ** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 00063 ** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 00064 ** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 00065 ** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR 00066 ** CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, 00067 ** EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, 00068 ** PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR 00069 ** PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 00070 ** LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 00071 ** NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 00072 ** SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 00073 ** 00074 ****************************************************************************/ 00075 00076 /* 00077 * qmacdefines_mac_p.h 00078 * All the defines you'll ever need for Qt/Mac :-) 00079 */ 00080 00081 /* This is just many defines. Therefore it doesn't need things like: 00082 QT_BEGIN_HEADER 00083 00084 QT_BEGIN_NAMESPACE 00085 00086 QT_MODULE(Gui) 00087 00088 QT_END_NAMESPACE 00089 00090 QT_END_HEADER 00091 00092 Yes, it is an informative comment ;-) 00093 */ 00094 00095 #include <QtCore/qglobal.h> 00096 00097 #undef OLD_DEBUG 00098 #ifdef DEBUG 00099 # define OLD_DEBUG DEBUG 00100 # undef DEBUG 00101 #endif 00102 #define DEBUG 0 00103 #ifdef qDebug 00104 # define old_qDebug qDebug 00105 # undef qDebug 00106 #endif 00107 00108 #ifdef __LP64__ 00109 typedef signed int OSStatus; 00110 #else 00111 typedef signed long OSStatus; 00112 #endif 00113 00114 #ifdef __OBJC__ 00115 # ifdef slots 00116 # define old_slots slots 00117 # undef slots 00118 # endif 00119 #include <Cocoa/Cocoa.h> 00120 # ifdef old_slots 00121 # undef slots 00122 # define slots 00123 # undef old_slots 00124 # endif 00125 #endif 00126 #ifdef QT_MAC_USE_COCOA 00127 typedef struct OpaqueEventHandlerCallRef * EventHandlerCallRef; 00128 typedef struct OpaqueEventRef * EventRef; 00129 typedef struct OpaqueMenuRef * MenuRef; 00130 typedef struct OpaquePasteboardRef* PasteboardRef; 00131 typedef struct OpaqueRgnHandle * RgnHandle; 00132 typedef const struct __HIShape *HIShapeRef; 00133 typedef struct __HIShape *HIMutableShapeRef; 00134 typedef struct CGRect CGRect; 00135 typedef struct CGImage *CGImageRef; 00136 typedef struct CGContext *CGContextRef; 00137 typedef struct GDevice * GDPtr; 00138 typedef GDPtr * GDHandle; 00139 typedef struct OpaqueIconRef * IconRef; 00140 # ifdef __OBJC__ 00141 typedef NSWindow* OSWindowRef; 00142 typedef NSView *OSViewRef; 00143 typedef NSMenu *OSMenuRef; 00144 typedef NSEvent *OSEventRef; 00145 # else 00146 typedef void *OSWindowRef; 00147 typedef void *OSViewRef; 00148 typedef void *OSMenuRef; 00149 typedef void *OSEventRef; 00150 # endif 00151 #else // Carbon 00152 typedef struct OpaqueEventHandlerCallRef * EventHandlerCallRef; 00153 typedef struct OpaqueEventRef * EventRef; 00154 typedef struct OpaqueMenuRef * MenuRef; 00155 typedef struct OpaquePasteboardRef* PasteboardRef; 00156 typedef struct OpaqueRgnHandle * RgnHandle; 00157 typedef const struct __HIShape *HIShapeRef; 00158 typedef struct __HIShape *HIMutableShapeRef; 00159 typedef struct CGRect CGRect; 00160 typedef struct CGImage *CGImageRef; 00161 typedef struct CGContext *CGContextRef; 00162 typedef struct GDevice * GDPtr; 00163 typedef GDPtr * GDHandle; 00164 typedef struct OpaqueIconRef * IconRef; 00165 typedef struct OpaqueWindowPtr * WindowRef; 00166 typedef struct OpaqueControlRef * HIViewRef; 00167 typedef WindowRef OSWindowRef; 00168 typedef HIViewRef OSViewRef; 00169 typedef MenuRef OSMenuRef; 00170 typedef EventRef OSEventRef; 00171 #endif // QT_MAC_USE_COCOA 00172 00173 typedef PasteboardRef OSPasteboardRef; 00174 typedef struct AEDesc AEDescList; 00175 typedef AEDescList AERecord; 00176 typedef AERecord AppleEvent; 00177 00178 #ifdef check 00179 #undef check 00180 #endif 00181 00182 #undef DEBUG 00183 #ifdef OLD_DEBUG 00184 # define DEBUG OLD_DEBUG 00185 # undef OLD_DEBUG 00186 #endif 00187 00188 #ifdef old_qDebug 00189 # undef qDebug 00190 # define qDebug QT_NO_QDEBUG_MACRO 00191 # undef old_qDebug 00192 #endif