1 | /****************************************************************************
|
---|
2 | ** $Id: qwindowdefs.h 2 2005-11-16 15:49:26Z 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 |
|
---|
134 |
|
---|
135 | #if defined(Q_OS_TEMP)
|
---|
136 | #include "qwinfunctions_wce.h"
|
---|
137 | #endif // Q_OS_TEMP
|
---|
138 |
|
---|
139 | #if defined(Q_WS_X11)
|
---|
140 |
|
---|
141 | typedef struct _XDisplay Display;
|
---|
142 | typedef union _XEvent XEvent;
|
---|
143 | typedef struct _XGC *GC;
|
---|
144 | typedef struct _XRegion *Region;
|
---|
145 | typedef unsigned long WId;
|
---|
146 |
|
---|
147 | Q_EXPORT Display *qt_xdisplay();
|
---|
148 | Q_EXPORT int qt_xscreen();
|
---|
149 | Q_EXPORT WId qt_xrootwin(); // ### REMOVE 4.0
|
---|
150 | Q_EXPORT WId qt_xrootwin( int scrn ); // ### 4.0 add default arg of -1
|
---|
151 | Q_EXPORT GC qt_xget_readonly_gc( int scrn, bool monochrome );
|
---|
152 | Q_EXPORT GC qt_xget_temp_gc( int scrn, bool monochrome );
|
---|
153 |
|
---|
154 | Q_EXPORT const char *qAppClass(); // get application class
|
---|
155 |
|
---|
156 | #endif // Q_WS_X11
|
---|
157 |
|
---|
158 | #if defined(Q_WS_QWS)
|
---|
159 |
|
---|
160 | typedef unsigned long WId;
|
---|
161 | struct QWSEvent;
|
---|
162 | class QGfx;
|
---|
163 |
|
---|
164 | #endif // Q_WS_QWS
|
---|
165 |
|
---|
166 | class QApplication;
|
---|
167 |
|
---|
168 | #if defined(NEEDS_QMAIN)
|
---|
169 | #define main qMain
|
---|
170 | #endif
|
---|
171 |
|
---|
172 | // Global platform-independent types and functions
|
---|
173 |
|
---|
174 | typedef Q_INT32 QCOORD; // coordinate type
|
---|
175 | const QCOORD QCOORD_MAX = 2147483647;
|
---|
176 | const QCOORD QCOORD_MIN = -QCOORD_MAX - 1;
|
---|
177 |
|
---|
178 | typedef unsigned int QRgb; // RGB triplet
|
---|
179 |
|
---|
180 | Q_EXPORT const char *qAppName(); // get application name
|
---|
181 |
|
---|
182 | // Misc functions
|
---|
183 |
|
---|
184 | typedef void (*QtCleanUpFunction)();
|
---|
185 | Q_EXPORT void qAddPostRoutine( QtCleanUpFunction );
|
---|
186 | Q_EXPORT void qRemovePostRoutine( QtCleanUpFunction );
|
---|
187 |
|
---|
188 | #if !defined(QT_CLEAN_NAMESPACE)
|
---|
189 | // source compatibility with Qt 2.x
|
---|
190 | typedef QtCleanUpFunction Q_CleanUpFunction;
|
---|
191 | #endif
|
---|
192 |
|
---|
193 |
|
---|
194 | #endif // QWINDOWDEFS_H
|
---|