Go to
the documentation of this file.
00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033
00034
00035
00036
00037
00038
00039
00040
00041
00042 #ifndef QDIRECTPAINTER_QWS_H
00043 #define QDIRECTPAINTER_QWS_H
00044
00045 #include <QtCore/qobject.h>
00046 #include <QtGui/qregion.h>
00047
00048 QT_BEGIN_HEADER
00049
00050 QT_BEGIN_NAMESPACE
00051
00052 QT_MODULE(Gui)
00053
00054 #ifndef QT_NO_DIRECTPAINTER
00055 class QDirectPainterPrivate;
00056 class QWSEmbedEvent;
00057
00058 class Q_GUI_EXPORT QDirectPainter : public QObject {
00059 Q_OBJECT
00060 Q_DECLARE_PRIVATE(QDirectPainter)
00061 public:
00062
00063 enum SurfaceFlag { NonReserved = 0,
00064 Reserved = 1,
00065 ReservedSynchronous = 3 };
00066
00067 explicit QDirectPainter(QObject *parentObject = 0, SurfaceFlag flag = NonReserved);
00068 ~QDirectPainter();
00069
00070 void setRegion(const QRegion&);
00071 QRegion requestedRegion() const;
00072 QRegion allocatedRegion() const;
00073
00074 void setGeometry(const QRect&);
00075 QRect geometry() const;
00076
00077 WId winId() const;
00078 virtual void regionChanged(const QRegion &exposedRegion);
00079
00080 void startPainting(bool lockDisplay = true);
00081 void endPainting();
00082 void endPainting(const QRegion ®ion);
00083 void flush(const QRegion ®ion);
00084
00085 void raise();
00086 void lower();
00087
00088
00089 static QRegion reserveRegion(const QRegion&);
00090 static QRegion reservedRegion();
00091 static QRegion region() { return reservedRegion(); }
00092
00093 static uchar* frameBuffer();
00094 static int screenDepth();
00095 static int screenWidth();
00096 static int screenHeight();
00097 static int linestep();
00098
00099 static void lock();
00100 static void unlock();
00101 private:
00102 friend void qt_directpainter_region(QDirectPainter *dp, const QRegion &alloc, int type);
00103 friend void qt_directpainter_embedevent(QDirectPainter*, const QWSEmbedEvent*);
00104 };
00105
00106 #endif
00107
00108 QT_END_NAMESPACE
00109
00110 QT_END_HEADER
00111
00112 #endif // QDIRECTPAINTER_QWS_H