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 QX11INFO_X11_H
00043 #define QX11INFO_X11_H
00044
00045 #include <QtCore/qnamespace.h>
00046
00047 typedef struct _XDisplay Display;
00048
00049 QT_BEGIN_HEADER
00050
00051 QT_BEGIN_NAMESPACE
00052
00053 QT_MODULE(Gui)
00054
00055 struct QX11InfoData;
00056 class QX11Info;
00057 class QPaintDevice;
00058 class QApplicationPrivate;
00059 class QX11InfoPrivate;
00060 struct QX11WindowAttributes;
00061
00062 void qt_x11_getX11InfoForWindow(QX11Info * xinfo, const QX11WindowAttributes &a);
00063 class Q_GUI_EXPORT QX11Info
00064 {
00065 public:
00066 QX11Info();
00067 ~QX11Info();
00068 QX11Info(const QX11Info &other);
00069 QX11Info &operator=(const QX11Info &other);
00070
00071 static Display *display();
00072 static const char *appClass();
00073 int screen() const;
00074 int depth() const;
00075 int cells() const;
00076 Qt::HANDLE colormap() const;
00077 bool defaultColormap() const;
00078 void *visual() const;
00079 bool defaultVisual() const;
00080
00081 static int appScreen();
00082 static int appDepth(int screen = -1);
00083 static int appCells(int screen = -1);
00084 static Qt::HANDLE appColormap(int screen = -1);
00085 static void *appVisual(int screen = -1);
00086 static Qt::HANDLE appRootWindow(int screen = -1);
00087 static bool appDefaultColormap(int screen = -1);
00088 static bool appDefaultVisual(int screen = -1);
00089 static int appDpiX(int screen = -1);
00090 static int appDpiY(int screen = -1);
00091 static void setAppDpiX(int screen, int dpi);
00092 static void setAppDpiY(int screen, int dpi);
00093 static unsigned long appTime();
00094 static unsigned long appUserTime();
00095 static void setAppTime(unsigned long time);
00096 static void setAppUserTime(unsigned long time);
00097 static bool isCompositingManagerRunning();
00098
00099 protected:
00100 void copyX11Data(const QPaintDevice *);
00101 void cloneX11Data(const QPaintDevice *);
00102 void setX11Data(const QX11InfoData *);
00103 QX11InfoData* getX11Data(bool def = false) const;
00104
00105 QX11InfoData *x11data;
00106
00107 friend class QX11PaintEngine;
00108 friend class QPixmap;
00109 friend class QX11PixmapData;
00110 friend class QWidget;
00111 friend class QWidgetPrivate;
00112 friend class QGLWidget;
00113 friend void qt_init(QApplicationPrivate *priv, int, Display *display, Qt::HANDLE visual,
00114 Qt::HANDLE colormap);
00115 friend void qt_cleanup();
00116 friend void qt_x11_getX11InfoForWindow(QX11Info * xinfo, const QX11WindowAttributes &a);
00117 };
00118
00119 QT_END_NAMESPACE
00120
00121 QT_END_HEADER
00122
00123 #endif // QX11INFO_X11_H