Changeset 8 for trunk/include
- Timestamp:
- Nov 16, 2005, 8:36:46 PM (20 years ago)
- Location:
- trunk/include
- Files:
-
- 2 added
- 19 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/include/qapplication.h
r7 r8 42 42 #include "qdesktopwidget.h" 43 43 #include "qasciidict.h" 44 #include "qpalette.h" 45 #include "qtranslator.h" 44 //@@TODO (dmik): later 45 //#include "qpalette.h" 46 //#include "qtranslator.h" 46 47 #include "qstrlist.h" 47 48 #include "qstringlist.h" … … 234 235 virtual bool winEventFilter( MSG * ); 235 236 #endif 237 #if defined(Q_WS_PM) 238 virtual bool pmEventFilter( QMSG * ); 239 #endif 236 240 #if defined(Q_WS_X11) 237 241 virtual bool x11EventFilter( XEvent * ); … … 254 258 static MacintoshVersion macVersion(); 255 259 #endif 260 //@@TODO (dmik): os2Version?? 256 261 #if defined(Q_WS_WIN) 257 262 void winFocus( QWidget *, bool ); 258 263 static void winMouseButtonUp(); 264 #elif defined(Q_WS_PM) 265 void pmFocus( QWidget *, bool ); 259 266 #endif 260 267 … … 401 408 friend class QEventLoop; 402 409 friend Q_EXPORT void qt_ucm_initialize( QApplication * ); 403 #if defined(Q_WS_WIN) 410 #if defined(Q_WS_WIN) || defined(Q_WS_PM) 404 411 friend bool qt_sendSpontaneousEvent( QObject*, QEvent* ); 405 412 #endif -
trunk/include/qcolor.h
r7 r8 134 134 static HPALETTE hPal() { return hpal; } 135 135 static uint realizePal( QWidget * ); 136 #endif 137 #if defined(Q_WS_PM) 138 static const QRgb* palette( int* numEntries = 0 ); 139 static int setPaletteEntries( const QRgb* entries, int numEntries, 140 int base = -1 ); 141 static HPAL hPal() { return hpal; } 142 //@@TODO (dmik): this seems not to be used anywhere 143 // static uint realizePal( QWidget * ); 136 144 #endif 137 145 … … 153 161 #if defined(Q_WS_WIN) 154 162 static HPALETTE hpal; 163 #endif 164 #if defined(Q_WS_PM) 165 static HPAL hpal; 155 166 #endif 156 167 static enum ColorModel { d8, d32 } colormodel; -
trunk/include/qcursor.h
r7 r8 89 89 HCURSOR handle() const; 90 90 QCursor( HCURSOR ); 91 #elif defined(Q_WS_PM) 92 HPOINTER handle() const; 93 QCursor( HPOINTER ); 91 94 #elif defined(Q_WS_X11) 92 95 HANDLE handle() const; -
trunk/include/qdragobject.h
r7 r8 219 219 220 220 #ifndef QT_NO_DRAGANDDROP 221 222 // QDragManager is not part of the public API. It is defined in a 223 // header file simply so different .cpp files can implement different 224 // member functions. 225 // 226 227 class Q_EXPORT QDragManager: public QObject { 228 Q_OBJECT 229 230 private: 231 QDragManager(); 232 ~QDragManager(); 233 // only friend classes can use QDragManager. 234 friend class QDragObject; 235 friend class QDragMoveEvent; 236 friend class QDropEvent; 237 friend class QApplication; 238 239 bool eventFilter( QObject *, QEvent * ); 240 void timerEvent( QTimerEvent* ); 241 242 bool drag( QDragObject *, QDragObject::DragMode ); 243 244 void cancel( bool deleteSource = TRUE ); 245 void move( const QPoint & ); 246 void drop(); 247 void updatePixmap(); 248 249 private: 250 QDragObject * object; 251 void updateMode( ButtonState newstate ); 252 void updateCursor(); 253 254 QWidget * dragSource; 255 QWidget * dropWidget; 256 bool beingCancelled; 257 bool restoreCursor; 258 bool willDrop; 259 260 QPixmap *pm_cursor; 261 int n_cursor; 262 #if defined(Q_DISABLE_COPY) // Disabled copy constructor and operator= 263 QDragManager( const QDragManager & ); 264 QDragManager &operator=( const QDragManager & ); 265 #endif 266 }; 267 221 //@@TODO (dmik): no QDragManager yet (MOC ignores preprocessor macros) 222 // 223 //// QDragManager is not part of the public API. It is defined in a 224 //// header file simply so different .cpp files can implement different 225 //// member functions. 226 //// 227 // 228 //class Q_EXPORT QDragManager: public QObject { 229 // Q_OBJECT 230 // 231 //private: 232 // QDragManager(); 233 // ~QDragManager(); 234 // // only friend classes can use QDragManager. 235 // friend class QDragObject; 236 // friend class QDragMoveEvent; 237 // friend class QDropEvent; 238 // friend class QApplication; 239 // 240 // bool eventFilter( QObject *, QEvent * ); 241 // void timerEvent( QTimerEvent* ); 242 // 243 // bool drag( QDragObject *, QDragObject::DragMode ); 244 // 245 // void cancel( bool deleteSource = TRUE ); 246 // void move( const QPoint & ); 247 // void drop(); 248 // void updatePixmap(); 249 // 250 //private: 251 // QDragObject * object; 252 // void updateMode( ButtonState newstate ); 253 // void updateCursor(); 254 // 255 // QWidget * dragSource; 256 // QWidget * dropWidget; 257 // bool beingCancelled; 258 // bool restoreCursor; 259 // bool willDrop; 260 // 261 // QPixmap *pm_cursor; 262 // int n_cursor; 263 //#if defined(Q_DISABLE_COPY) // Disabled copy constructor and operator= 264 // QDragManager( const QDragManager & ); 265 // QDragManager &operator=( const QDragManager & ); 266 //#endif 267 //}; 268 // 268 269 #endif 269 270 -
trunk/include/qfeatures.h
r7 r8 639 639 640 640 // Properties 641 #if !defined(QT_NO_PROPERTIES) && (defined(QT_NO_VARIANT) || defined(QT_NO_STRINGLIST) || defined(QT_NO_ICONSET) )641 #if !defined(QT_NO_PROPERTIES) && (defined(QT_NO_VARIANT) || defined(QT_NO_STRINGLIST) || defined(QT_NO_ICONSET) || defined(QT_NO_CURSOR)) 642 642 #define QT_NO_PROPERTIES 643 643 #endif -
trunk/include/qfont.h
r7 r8 163 163 164 164 165 #if def Q_WS_WIN165 #if defined (Q_WS_WIN) 166 166 HFONT handle() const; 167 #else // !Q_WS_WIN 167 #elif defined (Q_WS_PM) 168 //@@TODO (dmik): do we actually need any handle? 169 // PFATTRS handle() const; 170 void selectTo( HPS hps ) const; 171 #else // !Q_WS_WIN && !Q_WS_PM 168 172 Qt::HANDLE handle() const; 169 173 #endif // Q_WS_WIN -
trunk/include/qfontdatabase.h
r7 r8 116 116 117 117 private: 118 #if defined(Q_WS_X11) || defined(Q_WS_WIN) 118 #if defined(Q_WS_X11) || defined(Q_WS_WIN) || defined(Q_WS_PM) 119 119 static QFontEngine *findFont( QFont::Script script, const QFontPrivate *fp, 120 120 const QFontDef &request, int force_encoding_id = -1 ); 121 #endif // Q_WS_X11 122 121 #endif // Q_WS_X11 || Q_WS_WIN || Q_WS_PM 122 123 #ifdef Q_WS_PM 124 // a dummy method for compatibility with platform independent 125 // parts of QFontDatabase 126 static void load( const QString &/*family*/ = QString::null, int = -1 ) { } 127 #else 123 128 static void createDatabase(); 129 #endif 124 130 125 131 static void parseFontName(const QString &name, QString &foundry, QString &family); -
trunk/include/qglobal.h
r7 r8 93 93 # define Q_OS_MSDOS 94 94 #elif defined(__OS2__) 95 # if defined(__EMX__) 95 # if defined(__EMX__) && !defined(__INNOTEK_LIBC__) 96 96 # define Q_OS_OS2EMX 97 97 # else … … 532 532 WIN32 - Windows 533 533 X11 - X Window System 534 PM - unsupported534 PM - OS/2 Presentation Manager 535 535 WIN16 - unsupported 536 536 */ … … 550 550 #elif defined(Q_OS_OS2) 551 551 # define Q_WS_PM 552 # error "Qt does not work with OS/2 Presentation Manager or Workplace Shell"553 552 #elif defined(Q_OS_UNIX) 554 553 # if defined(QWS) -
trunk/include/qlistview.h
r7 r8 185 185 bool activatedPos( QPoint & ); 186 186 #ifndef QT_NO_DRAGANDDROP 187 virtual void dropped( QDropEvent *e ); 187 //@@TODO (dmik): no QDropEvent yet (MOC ignores preprocessor macros) 188 // virtual void dropped( QDropEvent *e ); 188 189 #endif 189 190 virtual void dragEntered(); … … 391 392 void collapsed( QListViewItem *item ); 392 393 #ifndef QT_NO_DRAGANDDROP 393 void dropped( QDropEvent *e ); 394 //@@TODO (dmik): no QDropEvent yet (MOC ignores preprocessor macros) 395 // void dropped( QDropEvent *e ); 394 396 #endif 395 397 void itemRenamed( QListViewItem *item, int col, const QString & ); … … 403 405 void contentsContextMenuEvent( QContextMenuEvent * e ); 404 406 #ifndef QT_NO_DRAGANDDROP 405 void contentsDragEnterEvent( QDragEnterEvent *e ); 406 void contentsDragMoveEvent( QDragMoveEvent *e ); 407 void contentsDragLeaveEvent( QDragLeaveEvent *e ); 408 void contentsDropEvent( QDropEvent *e ); 409 virtual QDragObject *dragObject(); 410 virtual void startDrag(); 407 //@@TODO (dmik): no QDrag* and QDrop* classes yet (MOC ignores preprocessor macros) 408 // void contentsDragEnterEvent( QDragEnterEvent *e ); 409 // void contentsDragMoveEvent( QDragMoveEvent *e ); 410 // void contentsDragLeaveEvent( QDragLeaveEvent *e ); 411 // void contentsDropEvent( QDropEvent *e ); 412 // virtual QDragObject *dragObject(); 413 // virtual void startDrag(); 411 414 #endif 412 415 -
trunk/include/qmime.h
r7 r8 155 155 }; 156 156 157 #endif 157 #endif // Q_WS_WIN 158 159 #if defined(Q_WS_PM) 160 161 #ifndef QT_H 162 #include "qptrlist.h" // down here for GCC 2.7.* compatibility 163 #endif // QT_H 164 165 /* 166 Encapsulation of conversion between MIME and OS/2 PM clipboard formats. 167 Not need on X11, as the underlying protocol uses the MIME standard 168 directly. 169 */ 170 171 class Q_EXPORT QPMMime { 172 public: 173 enum { CFI_Storage = CFI_POINTER & CFI_HANDLE }; 174 175 QPMMime(); 176 virtual ~QPMMime(); 177 178 static void initialize(); 179 180 static QPtrList<QPMMime> all(); 181 static QPMMime* convertor( const char* mime, ulong cf ); 182 static const char* cfToMime( ulong cf ); 183 184 static ulong registerMimeType( const char *mime ); 185 186 virtual const char* convertorName() = 0; 187 virtual int countCf() = 0; 188 virtual ulong cf( int index ) = 0; 189 virtual ulong flFor( ulong cf ) = 0; 190 virtual ulong cfFor( const char* ) = 0; 191 virtual const char* mimeFor( ulong cf ) = 0; 192 virtual bool canConvert( const char* mime, ulong cf ) = 0; 193 virtual QByteArray convertToMime( QByteArray data, const char *mime, ulong cf ) = 0; 194 virtual QByteArray convertFromMime( QByteArray data, const char *mime, ulong cf ) = 0; 195 }; 196 197 #endif // Q_WS_PM 198 158 199 #if defined(Q_WS_MAC) 159 200 -
trunk/include/qnamespace.h
r7 r8 888 888 #elif defined(Q_WS_WIN) 889 889 typedef void *HANDLE; 890 #elif defined(Q_WS_PM) 891 typedef unsigned long HANDLE; 890 892 #elif defined(Q_WS_X11) 891 893 typedef unsigned long HANDLE; -
trunk/include/qpaintdevice.h
r7 r8 95 95 #if defined(Q_WS_WIN) 96 96 virtual HDC handle() const; 97 #elif defined(Q_WS_PM) 98 virtual HPS handle() const; 97 99 #elif defined(Q_WS_X11) 98 100 virtual Qt::HANDLE handle() const; … … 213 215 #if defined(Q_WS_WIN) 214 216 HDC hdc; // device context 217 #elif defined(Q_WS_PM) 218 HPS hps; // presentation space handle 215 219 #elif defined(Q_WS_X11) 216 220 Qt::HANDLE hd; // handle to drawable -
trunk/include/qpainter.h
r7 r8 279 279 #if defined(Q_WS_WIN) 280 280 HDC handle() const; 281 #elif defined(Q_WS_PM) 282 HPS handle() const; 281 283 #elif defined(Q_WS_X11) || defined(Q_WS_MAC) 282 284 HANDLE handle() const; … … 301 303 void mapInv( int, int, int *, int * ) const; 302 304 void mapInv( int, int, int, int, int *, int *, int *, int * ) const; 305 #if defined(Q_WS_PM) 306 void drawPolyInternal( const QPointArray &, bool close=TRUE, 307 bool winding=FALSE, int index=0, int npoints=-1, 308 bool disjoint=FALSE ); 309 enum ArcClose { CloseNone, CloseChord, ClosePie }; 310 void drawArcInternal( int x, int y, int w, int h, int a = 0, 311 int alen = 360*16, ArcClose close = CloseChord ); 312 void drawWinFocusRectInternal( int x, int y, int w, int h, 313 const QColor &bgCol, bool xormode ); 314 void drawRectInternal( int x, int y, int w, int h, int wRnd, int hRnd ); 315 #else 303 316 void drawPolyInternal( const QPointArray &, bool close=TRUE ); 317 #endif 304 318 void drawWinFocusRect( int x, int y, int w, int h, bool xorPaint, 305 319 const QColor &penColor ); … … 368 382 #endif 369 383 384 #if !defined(Q_WS_PM) 370 385 void *penRef; // pen cache ref 371 386 void *brushRef; // brush cache ref 387 #endif 372 388 void *ps_stack; 373 389 void *wm_stack; … … 383 399 friend class QFontEngineBox; 384 400 QT_WIN_PAINTER_MEMBERS 401 #elif defined(Q_WS_PM) 402 bool setNativeXForm( bool assumeYNegation ); 403 void clearNativeXForm(); 404 friend class QFontEnginePM; 405 HPS hps; 406 HPAL holdpal; 407 HRGN holdrgn; 408 HBITMAP hbrushbm; 409 uint nocolBrush : 1; 410 uint pixmapBrush : 1; 411 int devh; 412 QRegion repaintRgn; 385 413 #elif defined(Q_WS_X11) 386 414 friend class QFontEngineXLFD; … … 545 573 return hdc; 546 574 } 575 #elif defined(Q_WS_PM) 576 inline HPS QPainter::handle() const 577 { 578 return hps; 579 } 547 580 #elif defined(Q_WS_X11) || defined(Q_WS_MAC) 548 581 inline Qt::HANDLE QPainter::handle() const -
trunk/include/qpixmap.h
r7 r8 139 139 #if defined(Q_WS_WIN) 140 140 HBITMAP hbm() const; 141 #elif defined(Q_WS_PM) 142 HBITMAP hbm() const; 141 143 #endif 142 144 … … 209 211 uchar* ppvBits; // Pointer to DIBSection bits 210 212 #endif 213 #elif defined(Q_WS_PM) 214 HBITMAP hbm; 215 HBITMAP maskedHbm; // pixmap precomposed for masking 216 //@@TODO (dmik): need this? 217 uchar *realAlphaBits; 211 218 #elif defined(Q_WS_X11) 212 219 void *ximage; … … 243 250 const QPixmap *src, int sx, int sy, 244 251 int sw, int sh, bool useDstAlpha ); 252 #elif defined(Q_WS_PM) 253 void prepareForMasking( bool prepare ); 254 void attachHandle( HBITMAP hbm ); 255 HBITMAP detachHandle(); 256 friend class QPMMimeImage; 245 257 #endif 246 258 static Optimization defOptim; … … 298 310 return data->mcp ? 0 : data->hbm_or_mcpi.hbm; 299 311 } 312 #elif defined(Q_WS_PM) 313 inline HBITMAP QPixmap::hbm() const 314 { 315 return data->hbm; 316 } 300 317 #endif 301 318 -
trunk/include/qregion.h
r7 r8 94 94 { return !(operator==(r)); } 95 95 96 #if defined(Q_WS_WIN) 97 HRGN handle() const { return data->rgn; }96 #if defined(Q_WS_WIN) || defined(Q_WS_PM) 97 HRGN handle() const { if (! data->rgn ) update(); return data->rgn; } 98 98 #elif defined(Q_WS_X11) 99 99 Region handle() const { if(!data->rgn) updateX11Region(); return data->rgn; } … … 115 115 #if defined(Q_WS_WIN) 116 116 QRegion winCombine( const QRegion &, int ) const; 117 #endif 118 #if defined(Q_WS_X11) 117 #elif defined(Q_WS_PM) 118 QRegion pmCombine( const QRegion &, int ) const; 119 void update() const; 120 #elif defined(Q_WS_X11) 119 121 void updateX11Region() const; 120 122 void *clipRectangles( int &num ) const; … … 123 125 void exec( const QByteArray &, int ver = 0 ); 124 126 struct QRegionData : public QShared { 125 #if defined(Q_WS_WIN) 127 #if defined(Q_WS_WIN) || defined(Q_WS_PM) 126 128 HRGN rgn; 127 129 #elif defined(Q_WS_X11) … … 145 147 #elif defined(Q_WS_WIN) 146 148 friend class QETWidget; 149 #elif defined(Q_WS_PM) 150 friend class QETWidget; 151 friend class QPainter; 152 friend void qt_set_paintevent_clipping( QPaintDevice*, const QRegion& ); 147 153 #endif 148 154 -
trunk/include/qscrollview.h
r7 r8 61 61 Q_PROPERTY( int contentsY READ contentsY ) 62 62 #ifndef QT_NO_DRAGANDDROP 63 Q_PROPERTY( bool dragAutoScroll READ dragAutoScroll WRITE setDragAutoScroll ) 63 //@@TODO (dmik): no QDrag* and QDrop* classes yet (MOC ignores preprocessor macros) 64 // Q_PROPERTY( bool dragAutoScroll READ dragAutoScroll WRITE setDragAutoScroll ) 64 65 #endif 65 66 … … 175 176 virtual void contentsMouseMoveEvent( QMouseEvent* ); 176 177 #ifndef QT_NO_DRAGANDDROP 177 virtual void contentsDragEnterEvent( QDragEnterEvent * ); 178 virtual void contentsDragMoveEvent( QDragMoveEvent * ); 179 virtual void contentsDragLeaveEvent( QDragLeaveEvent * ); 180 virtual void contentsDropEvent( QDropEvent * ); 178 //@@TODO (dmik): no QDrag* and QDrop* classes yet (MOC ignores preprocessor macros) 179 // virtual void contentsDragEnterEvent( QDragEnterEvent * ); 180 // virtual void contentsDragMoveEvent( QDragMoveEvent * ); 181 // virtual void contentsDragLeaveEvent( QDragLeaveEvent * ); 182 // virtual void contentsDropEvent( QDropEvent * ); 181 183 #endif 182 184 #ifndef QT_NO_WHEELEVENT … … 193 195 virtual void viewportMouseMoveEvent( QMouseEvent* ); 194 196 #ifndef QT_NO_DRAGANDDROP 195 virtual void viewportDragEnterEvent( QDragEnterEvent * ); 196 virtual void viewportDragMoveEvent( QDragMoveEvent * ); 197 virtual void viewportDragLeaveEvent( QDragLeaveEvent * ); 198 virtual void viewportDropEvent( QDropEvent * ); 197 //@@TODO (dmik): no QDrag* and QDrop* classes yet (MOC ignores preprocessor macros) 198 // virtual void viewportDragEnterEvent( QDragEnterEvent * ); 199 // virtual void viewportDragMoveEvent( QDragMoveEvent * ); 200 // virtual void viewportDragLeaveEvent( QDragLeaveEvent * ); 201 // virtual void viewportDropEvent( QDropEvent * ); 199 202 #endif 200 203 #ifndef QT_NO_WHEELEVENT … … 245 248 void vbarIsReleased(); 246 249 #ifndef QT_NO_DRAGANDDROP 247 void doDragAutoScroll(); 248 void startDragAutoScroll(); 249 void stopDragAutoScroll(); 250 //@@TODO (dmik): no QDrag* and QDrop* classes yet (MOC ignores preprocessor macros) 251 // void doDragAutoScroll(); 252 // void startDragAutoScroll(); 253 // void stopDragAutoScroll(); 250 254 #endif 251 255 -
trunk/include/qstring.h
r7 r8 1093 1093 #endif 1094 1094 1095 1096 1095 #if defined(Q_OS_WIN32) 1097 1096 extern Q_EXPORT QString qt_winQString(void*); … … 1102 1101 #endif 1103 1102 1103 #if defined(Q_OS_OS2) 1104 typedef void *LocaleObject; 1105 typedef void *UconvObject; 1106 extern Q_EXPORT const LocaleObject qt_os2DefLocaleObj(); 1107 extern Q_EXPORT const UconvObject qt_os2DefUconvObj(); 1108 extern Q_EXPORT QCString qt_os2QString2MB( const QString& s, int len=-1 ); 1109 extern Q_EXPORT QString qt_os2MB2QString( const char* mb, int len=-1 ); 1110 #endif 1111 1104 1112 #define Q_DEFINED_QSTRING 1105 1113 #include "qwinexport.h" -
trunk/include/qwidget.h
r7 r8 465 465 #endif 466 466 #endif 467 #if defined(Q_WS_PM) 468 WId winFId(); 469 #endif 467 470 468 471 void setWindowOpacity(double level); … … 510 513 #if defined(Q_WS_WIN) 511 514 virtual bool winEvent( MSG * ); 515 #endif 516 #if defined(Q_WS_PM) 517 virtual bool pmEvent( QMSG * ); 512 518 #endif 513 519 #if defined(Q_WS_X11) … … 940 946 uint opacity : 8; // Stores opacity level on Windows/Mac OS X. 941 947 #endif 948 //@@TODO (dmik): savedFlags seems not to be used by OS/2 version. enclose it with ifndef? 942 949 uint savedFlags; // Save widgetflags while showing fullscreen 943 950 short basew, baseh; // base sizes … … 963 970 #if defined(Q_WS_WIN) 964 971 HICON winIcon; // internal Windows icon 972 #endif 973 #if defined(Q_WS_PM) 974 WId fId; // frame window handle 975 HSWITCH swEntry; // window list entry handle 965 976 #endif 966 977 QRect normalGeometry; // used by showMin/maximized/FullScreen -
trunk/include/qwindowdefs.h
r7 r8 132 132 #endif // Q_WS_WIN 133 133 134 #if defined(Q_WS_PM) 135 #include "qwindowdefs_pm.h" 136 #endif // Q_WS_PM 134 137 135 138 #if defined(Q_OS_TEMP)
Note:
See TracChangeset
for help on using the changeset viewer.