home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / qt3_emx.zip / include / qwindowdefs.h < prev    next >
C/C++ Source or Header  |  2001-10-11  |  5KB  |  190 lines

  1. /****************************************************************************
  2. ** $Id:  qt/qwindowdefs.h   3.0.0   edited Sep 24 06:54 $
  3. **
  4. ** Definition of general window system dependent functions, types and
  5. ** constants
  6. **
  7. ** Created : 931029
  8. **
  9. ** Copyright (C) 1992-2000 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. #include <limits.h>
  49.  
  50. // Class forward definitions
  51.  
  52. class QPaintDevice;
  53. class QPaintDeviceMetrics;
  54. class QWidget;
  55. class QWidgetMapper;
  56. class QDialog;
  57. class QColor;
  58. class QColorGroup;
  59. class QPalette;
  60. class QCursor;
  61. class QPoint;
  62. class QSize;
  63. class QRect;
  64. class QPointArray;
  65. class QPainter;
  66. class QRegion;
  67. class QFont;
  68. class QFontMetrics;
  69. class QFontInfo;
  70. class QPen;
  71. class QBrush;
  72. class QWMatrix;
  73. class QPixmap;
  74. class QBitmap;
  75. class QMovie;
  76. class QImage;
  77. class QImageIO;
  78. class QPicture;
  79. class QPrinter;
  80. class QAccel;
  81. class QTimer;
  82. class QTime;
  83. class QClipboard;
  84.  
  85.  
  86. // Widget list (defined in qwidgetlist.h)
  87.  
  88. class QWidgetList;
  89. class QWidgetListIt;
  90.  
  91.  
  92. // Window system dependent definitions
  93.  
  94. #if defined(Q_WS_MAC)
  95.  
  96. #ifndef QMAC_NO_QUARTZ
  97. typedef struct CGContext *CGContextRef;
  98. #endif
  99. typedef struct OpaqueWindowGroupRef *WindowGroupRef;
  100. typedef struct OpaqueGrafPtr *CGrafPtr;
  101. typedef struct OpaqueMenuHandle *MenuRef;
  102. typedef struct OpaquePMPrintSession *PMPrintSession;
  103. typedef struct OpaquePMPrintSettings *PMPrintSettings;
  104. typedef struct OpaquePMPageFormat *PMPageFormat;
  105. typedef struct Point Point;
  106. typedef struct FSSpec FSSpec;
  107. typedef struct OpaqueEventHandlerRef*   EventHandlerRef;
  108. typedef struct OpaqueEventHandlerCallRef*  EventHandlerCallRef;
  109. typedef struct OpaqueEventLoopTimerRef* EventLoopTimerRef;
  110. typedef struct OpaqueEventRef*          EventRef;
  111. typedef long int OSStatus;
  112. typedef struct OpaqueScrapRef *ScrapRef;
  113. typedef struct OpaqueRgnHandle *RgnHandle;
  114. typedef struct OpaqueWindowPtr *WindowPtr;
  115. typedef WindowPtr WindowRef;
  116. typedef struct OpaqueGrafPtr *GWorldPtr;
  117. typedef GWorldPtr GrafPtr;
  118. typedef struct GDevice **GDHandle;
  119. typedef struct ColorTable ColorTable;
  120. typedef struct BitMap BitMap;
  121. typedef struct EventRecord EventRecord;
  122. typedef void * MSG;
  123. typedef int WId;
  124.  
  125. #endif
  126.  
  127. #if defined(Q_WS_WIN)
  128. #include "qwindowdefs_win.h"
  129. #endif // Q_WS_WIN
  130.  
  131.  
  132. #if defined(Q_WS_X11)
  133.  
  134. typedef struct _XDisplay Display;
  135. typedef union  _XEvent XEvent;
  136. typedef struct _XGC *GC;
  137. typedef struct _XRegion *Region;
  138. typedef unsigned long  WId;
  139.  
  140. Q_EXPORT Display *qt_xdisplay();
  141. Q_EXPORT int     qt_xscreen();
  142. Q_EXPORT WId     qt_xrootwin();
  143. Q_EXPORT GC     qt_xget_readonly_gc( int scrn, bool monochrome );
  144. Q_EXPORT GC     qt_xget_temp_gc( int scrn, bool monochrome );
  145.  
  146. #endif // Q_WS_X11
  147.  
  148. #if defined(Q_WS_QWS)
  149.  
  150. typedef unsigned long  WId;
  151. struct QWSEvent;
  152. class QGfx;
  153.  
  154. #endif // Q_WS_QWS
  155.  
  156. class QApplication;
  157.  
  158. #if defined(NEEDS_QMAIN)
  159. #define main qMain
  160. #endif
  161.  
  162. // Global platform-independent types and functions
  163.  
  164. typedef Q_INT32 QCOORD;                // coordinate type
  165. const QCOORD QCOORD_MAX =  2147483647;
  166. const QCOORD QCOORD_MIN = -QCOORD_MAX - 1;
  167.  
  168. typedef unsigned int QRgb;            // RGB triplet
  169.  
  170. Q_EXPORT const char *qAppName();        // get application name
  171.  
  172. // Misc functions
  173.  
  174. typedef void (*QtCleanUpFunction)();
  175. Q_EXPORT void qAddPostRoutine( QtCleanUpFunction );
  176. Q_EXPORT void qRemovePostRoutine( QtCleanUpFunction );
  177.  
  178. #if !defined(QT_CLEAN_NAMESPACE)
  179. // source compatibility with Qt 2.x
  180. typedef QtCleanUpFunction Q_CleanUpFunction;
  181. #endif
  182.  
  183. // ### remove 3.0
  184. Q_EXPORT void *qt_find_obj_child( QObject *, const char *, const char * );
  185. #define Q_CHILD(parent,type,name) \
  186.     ((type*)qt_find_obj_child(parent,#type,name))
  187.  
  188.  
  189. #endif // QWINDOWDEFS_H
  190.