source: trunk/include/qwindowdefs.h@ 7

Last change on this file since 7 was 2, checked in by dmik, 20 years ago

Imported xplatform parts of the official release 3.3.1 from Trolltech

  • Property svn:keywords set to Id
File size: 5.2 KB
Line 
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
50class QPaintDevice;
51class QPaintDeviceMetrics;
52class QWidget;
53class QWidgetMapper;
54class QDialog;
55class QColor;
56class QColorGroup;
57class QPalette;
58class QCursor;
59class QPoint;
60class QSize;
61class QRect;
62class QPointArray;
63class QPainter;
64class QRegion;
65class QFont;
66class QFontMetrics;
67class QFontInfo;
68class QPen;
69class QBrush;
70class QWMatrix;
71class QPixmap;
72class QBitmap;
73class QMovie;
74class QImage;
75class QImageIO;
76class QPicture;
77class QPrinter;
78class QAccel;
79class QTimer;
80class QTime;
81class QClipboard;
82
83
84// Widget list (defined in qwidgetlist.h)
85
86class QWidgetList;
87class QWidgetListIt;
88
89
90// Window system dependent definitions
91
92#if defined(Q_WS_MAC)
93#if QT_MACOSX_VERSION < 0x1020
94typedef struct OpaqueEventLoopTimerRef* EventLoopTimerRef;
95typedef struct OpaqueMenuHandle *MenuRef;
96#else
97typedef struct __EventLoopTimer* EventLoopTimerRef;
98typedef struct OpaqueMenuRef* MenuRef;
99#endif
100
101#ifndef Q_WS_MACX
102typedef struct CGContext *CGContextRef;
103#endif
104typedef struct OpaqueWindowGroupRef *WindowGroupRef;
105typedef struct OpaqueGrafPtr *CGrafPtr;
106typedef struct OpaquePMPrintSession *PMPrintSession;
107typedef struct OpaquePMPrintSettings *PMPrintSettings;
108typedef struct OpaquePMPageFormat *PMPageFormat;
109typedef struct Point Point;
110typedef struct OpaqueEventHandlerRef* EventHandlerRef;
111typedef struct OpaqueEventHandlerCallRef* EventHandlerCallRef;
112typedef struct OpaqueEventRef* EventRef;
113typedef long int OSStatus;
114typedef struct OpaqueScrapRef *ScrapRef;
115typedef struct OpaqueRgnHandle *RgnHandle;
116typedef struct OpaqueWindowPtr *WindowPtr;
117typedef WindowPtr WindowRef;
118typedef struct OpaqueGrafPtr *GWorldPtr;
119typedef GWorldPtr GrafPtr;
120typedef struct GDevice **GDHandle;
121typedef struct ColorTable ColorTable;
122typedef struct BitMap BitMap;
123typedef struct EventRecord EventRecord;
124typedef void * MSG;
125typedef int WId;
126typedef 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
141typedef struct _XDisplay Display;
142typedef union _XEvent XEvent;
143typedef struct _XGC *GC;
144typedef struct _XRegion *Region;
145typedef unsigned long WId;
146
147Q_EXPORT Display *qt_xdisplay();
148Q_EXPORT int qt_xscreen();
149Q_EXPORT WId qt_xrootwin(); // ### REMOVE 4.0
150Q_EXPORT WId qt_xrootwin( int scrn ); // ### 4.0 add default arg of -1
151Q_EXPORT GC qt_xget_readonly_gc( int scrn, bool monochrome );
152Q_EXPORT GC qt_xget_temp_gc( int scrn, bool monochrome );
153
154Q_EXPORT const char *qAppClass(); // get application class
155
156#endif // Q_WS_X11
157
158#if defined(Q_WS_QWS)
159
160typedef unsigned long WId;
161struct QWSEvent;
162class QGfx;
163
164#endif // Q_WS_QWS
165
166class QApplication;
167
168#if defined(NEEDS_QMAIN)
169#define main qMain
170#endif
171
172// Global platform-independent types and functions
173
174typedef Q_INT32 QCOORD; // coordinate type
175const QCOORD QCOORD_MAX = 2147483647;
176const QCOORD QCOORD_MIN = -QCOORD_MAX - 1;
177
178typedef unsigned int QRgb; // RGB triplet
179
180Q_EXPORT const char *qAppName(); // get application name
181
182// Misc functions
183
184typedef void (*QtCleanUpFunction)();
185Q_EXPORT void qAddPostRoutine( QtCleanUpFunction );
186Q_EXPORT void qRemovePostRoutine( QtCleanUpFunction );
187
188#if !defined(QT_CLEAN_NAMESPACE)
189// source compatibility with Qt 2.x
190typedef QtCleanUpFunction Q_CleanUpFunction;
191#endif
192
193
194#endif // QWINDOWDEFS_H
Note: See TracBrowser for help on using the repository browser.