[2] | 1 | /****************************************************************************
|
---|
| 2 | ** $Id: qwindowdefs.h 8 2005-11-16 19:36:46Z dmik $
|
---|
| 3 | **
|
---|
| 4 | ** Definition of general window system dependent functions, types and
|
---|
| 5 | ** constants
|
---|
| 6 | **
|
---|
| 7 | ** Created : 931029
|
---|
| 8 | **
|
---|
| 9 | ** Copyright (C) 1992-2002 Trolltech AS. All rights reserved.
|
---|
| 10 | **
|
---|
| 11 | ** This file is part of the kernel module of the Qt GUI Toolkit.
|
---|
| 12 | **
|
---|
| 13 | ** This file may be distributed under the terms of the Q Public License
|
---|
| 14 | ** as defined by Trolltech AS of Norway and appearing in the file
|
---|
| 15 | ** LICENSE.QPL included in the packaging of this file.
|
---|
| 16 | **
|
---|
| 17 | ** This file may be distributed and/or modified under the terms of the
|
---|
| 18 | ** GNU General Public License version 2 as published by the Free Software
|
---|
| 19 | ** Foundation and appearing in the file LICENSE.GPL included in the
|
---|
| 20 | ** packaging of this file.
|
---|
| 21 | **
|
---|
| 22 | ** Licensees holding valid Qt Enterprise Edition or Qt Professional Edition
|
---|
| 23 | ** licenses may use this file in accordance with the Qt Commercial License
|
---|
| 24 | ** Agreement provided with the Software.
|
---|
| 25 | **
|
---|
| 26 | ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
|
---|
| 27 | ** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
|
---|
| 28 | **
|
---|
| 29 | ** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for
|
---|
| 30 | ** information about Qt Commercial License Agreements.
|
---|
| 31 | ** See http://www.trolltech.com/qpl/ for QPL licensing information.
|
---|
| 32 | ** See http://www.trolltech.com/gpl/ for GPL licensing information.
|
---|
| 33 | **
|
---|
| 34 | ** Contact info@trolltech.com if any conditions of this licensing are
|
---|
| 35 | ** not clear to you.
|
---|
| 36 | **
|
---|
| 37 | **********************************************************************/
|
---|
| 38 |
|
---|
| 39 | #ifndef QWINDOWDEFS_H
|
---|
| 40 | #define QWINDOWDEFS_H
|
---|
| 41 |
|
---|
| 42 | #ifndef QT_H
|
---|
| 43 | #include "qobjectdefs.h"
|
---|
| 44 | #include "qstring.h"
|
---|
| 45 | #include "qnamespace.h"
|
---|
| 46 | #endif // QT_H
|
---|
| 47 |
|
---|
| 48 | // Class forward definitions
|
---|
| 49 |
|
---|
| 50 | class QPaintDevice;
|
---|
| 51 | class QPaintDeviceMetrics;
|
---|
| 52 | class QWidget;
|
---|
| 53 | class QWidgetMapper;
|
---|
| 54 | class QDialog;
|
---|
| 55 | class QColor;
|
---|
| 56 | class QColorGroup;
|
---|
| 57 | class QPalette;
|
---|
| 58 | class QCursor;
|
---|
| 59 | class QPoint;
|
---|
| 60 | class QSize;
|
---|
| 61 | class QRect;
|
---|
| 62 | class QPointArray;
|
---|
| 63 | class QPainter;
|
---|
| 64 | class QRegion;
|
---|
| 65 | class QFont;
|
---|
| 66 | class QFontMetrics;
|
---|
| 67 | class QFontInfo;
|
---|
| 68 | class QPen;
|
---|
| 69 | class QBrush;
|
---|
| 70 | class QWMatrix;
|
---|
| 71 | class QPixmap;
|
---|
| 72 | class QBitmap;
|
---|
| 73 | class QMovie;
|
---|
| 74 | class QImage;
|
---|
| 75 | class QImageIO;
|
---|
| 76 | class QPicture;
|
---|
| 77 | class QPrinter;
|
---|
| 78 | class QAccel;
|
---|
| 79 | class QTimer;
|
---|
| 80 | class QTime;
|
---|
| 81 | class QClipboard;
|
---|
| 82 |
|
---|
| 83 |
|
---|
| 84 | // Widget list (defined in qwidgetlist.h)
|
---|
| 85 |
|
---|
| 86 | class QWidgetList;
|
---|
| 87 | class QWidgetListIt;
|
---|
| 88 |
|
---|
| 89 |
|
---|
| 90 | // Window system dependent definitions
|
---|
| 91 |
|
---|
| 92 | #if defined(Q_WS_MAC)
|
---|
| 93 | #if QT_MACOSX_VERSION < 0x1020
|
---|
| 94 | typedef struct OpaqueEventLoopTimerRef* EventLoopTimerRef;
|
---|
| 95 | typedef struct OpaqueMenuHandle *MenuRef;
|
---|
| 96 | #else
|
---|
| 97 | typedef struct __EventLoopTimer* EventLoopTimerRef;
|
---|
| 98 | typedef struct OpaqueMenuRef* MenuRef;
|
---|
| 99 | #endif
|
---|
| 100 |
|
---|
| 101 | #ifndef Q_WS_MACX
|
---|
| 102 | typedef struct CGContext *CGContextRef;
|
---|
| 103 | #endif
|
---|
| 104 | typedef struct OpaqueWindowGroupRef *WindowGroupRef;
|
---|
| 105 | typedef struct OpaqueGrafPtr *CGrafPtr;
|
---|
| 106 | typedef struct OpaquePMPrintSession *PMPrintSession;
|
---|
| 107 | typedef struct OpaquePMPrintSettings *PMPrintSettings;
|
---|
| 108 | typedef struct OpaquePMPageFormat *PMPageFormat;
|
---|
| 109 | typedef struct Point Point;
|
---|
| 110 | typedef struct OpaqueEventHandlerRef* EventHandlerRef;
|
---|
| 111 | typedef struct OpaqueEventHandlerCallRef* EventHandlerCallRef;
|
---|
| 112 | typedef struct OpaqueEventRef* EventRef;
|
---|
| 113 | typedef long int OSStatus;
|
---|
| 114 | typedef struct OpaqueScrapRef *ScrapRef;
|
---|
| 115 | typedef struct OpaqueRgnHandle *RgnHandle;
|
---|
| 116 | typedef struct OpaqueWindowPtr *WindowPtr;
|
---|
| 117 | typedef WindowPtr WindowRef;
|
---|
| 118 | typedef struct OpaqueGrafPtr *GWorldPtr;
|
---|
| 119 | typedef GWorldPtr GrafPtr;
|
---|
| 120 | typedef struct GDevice **GDHandle;
|
---|
| 121 | typedef struct ColorTable ColorTable;
|
---|
| 122 | typedef struct BitMap BitMap;
|
---|
| 123 | typedef struct EventRecord EventRecord;
|
---|
| 124 | typedef void * MSG;
|
---|
| 125 | typedef int WId;
|
---|
| 126 | typedef struct AEDesc AppleEvent;
|
---|
| 127 |
|
---|
| 128 | #endif // Q_WS_MAC
|
---|
| 129 |
|
---|
| 130 | #if defined(Q_WS_WIN)
|
---|
| 131 | #include "qwindowdefs_win.h"
|
---|
| 132 | #endif // Q_WS_WIN
|
---|
| 133 |
|
---|
[8] | 134 | #if defined(Q_WS_PM)
|
---|
| 135 | #include "qwindowdefs_pm.h"
|
---|
| 136 | #endif // Q_WS_PM
|
---|
[2] | 137 |
|
---|
| 138 | #if defined(Q_OS_TEMP)
|
---|
| 139 | #include "qwinfunctions_wce.h"
|
---|
| 140 | #endif // Q_OS_TEMP
|
---|
| 141 |
|
---|
| 142 | #if defined(Q_WS_X11)
|
---|
| 143 |
|
---|
| 144 | typedef struct _XDisplay Display;
|
---|
| 145 | typedef union _XEvent XEvent;
|
---|
| 146 | typedef struct _XGC *GC;
|
---|
| 147 | typedef struct _XRegion *Region;
|
---|
| 148 | typedef unsigned long WId;
|
---|
| 149 |
|
---|
| 150 | Q_EXPORT Display *qt_xdisplay();
|
---|
| 151 | Q_EXPORT int qt_xscreen();
|
---|
| 152 | Q_EXPORT WId qt_xrootwin(); // ### REMOVE 4.0
|
---|
| 153 | Q_EXPORT WId qt_xrootwin( int scrn ); // ### 4.0 add default arg of -1
|
---|
| 154 | Q_EXPORT GC qt_xget_readonly_gc( int scrn, bool monochrome );
|
---|
| 155 | Q_EXPORT GC qt_xget_temp_gc( int scrn, bool monochrome );
|
---|
| 156 |
|
---|
| 157 | Q_EXPORT const char *qAppClass(); // get application class
|
---|
| 158 |
|
---|
| 159 | #endif // Q_WS_X11
|
---|
| 160 |
|
---|
| 161 | #if defined(Q_WS_QWS)
|
---|
| 162 |
|
---|
| 163 | typedef unsigned long WId;
|
---|
| 164 | struct QWSEvent;
|
---|
| 165 | class QGfx;
|
---|
| 166 |
|
---|
| 167 | #endif // Q_WS_QWS
|
---|
| 168 |
|
---|
| 169 | class QApplication;
|
---|
| 170 |
|
---|
| 171 | #if defined(NEEDS_QMAIN)
|
---|
| 172 | #define main qMain
|
---|
| 173 | #endif
|
---|
| 174 |
|
---|
| 175 | // Global platform-independent types and functions
|
---|
| 176 |
|
---|
| 177 | typedef Q_INT32 QCOORD; // coordinate type
|
---|
| 178 | const QCOORD QCOORD_MAX = 2147483647;
|
---|
| 179 | const QCOORD QCOORD_MIN = -QCOORD_MAX - 1;
|
---|
| 180 |
|
---|
| 181 | typedef unsigned int QRgb; // RGB triplet
|
---|
| 182 |
|
---|
| 183 | Q_EXPORT const char *qAppName(); // get application name
|
---|
| 184 |
|
---|
| 185 | // Misc functions
|
---|
| 186 |
|
---|
| 187 | typedef void (*QtCleanUpFunction)();
|
---|
| 188 | Q_EXPORT void qAddPostRoutine( QtCleanUpFunction );
|
---|
| 189 | Q_EXPORT void qRemovePostRoutine( QtCleanUpFunction );
|
---|
| 190 |
|
---|
| 191 | #if !defined(QT_CLEAN_NAMESPACE)
|
---|
| 192 | // source compatibility with Qt 2.x
|
---|
| 193 | typedef QtCleanUpFunction Q_CleanUpFunction;
|
---|
| 194 | #endif
|
---|
| 195 |
|
---|
| 196 |
|
---|
| 197 | #endif // QWINDOWDEFS_H
|
---|