00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024 #ifndef QX11INFO_X11_H
00025 #define QX11INFO_X11_H
00026
00027 #include <QtCore/qnamespace.h>
00028
00029 QT_BEGIN_HEADER
00030
00031 QT_MODULE(Gui)
00032
00033 struct QX11InfoData;
00034 class QPaintDevice;
00035 class QApplicationPrivate;
00036 class QX11InfoPrivate;
00037
00038 typedef struct _XDisplay Display;
00039
00040 class Q_GUI_EXPORT QX11Info
00041 {
00042 public:
00043 QX11Info();
00044 ~QX11Info();
00045 QX11Info(const QX11Info &other);
00046 QX11Info &operator=(const QX11Info &other);
00047
00048 static Display *display();
00049 static const char *appClass();
00050 int screen() const;
00051 int depth() const;
00052 int cells() const;
00053 Qt::HANDLE colormap() const;
00054 bool defaultColormap() const;
00055 void *visual() const;
00056 bool defaultVisual() const;
00057
00058 static int appScreen();
00059 static int appDepth(int screen = -1);
00060 static int appCells(int screen = -1);
00061 static Qt::HANDLE appColormap(int screen = -1);
00062 static void *appVisual(int screen = -1);
00063 static Qt::HANDLE appRootWindow(int screen = -1);
00064 static bool appDefaultColormap(int screen = -1);
00065 static bool appDefaultVisual(int screen = -1);
00066 static int appDpiX(int screen = -1);
00067 static int appDpiY(int screen = -1);
00068 static void setAppDpiX(int screen, int dpi);
00069 static void setAppDpiY(int screen, int dpi);
00070 static unsigned long appTime();
00071 static unsigned long appUserTime();
00072 static void setAppTime(unsigned long time);
00073 static void setAppUserTime(unsigned long time);
00074
00075 protected:
00076 void copyX11Data(const QPaintDevice *);
00077 void cloneX11Data(const QPaintDevice *);
00078 void setX11Data(const QX11InfoData *);
00079 QX11InfoData* getX11Data(bool def = false) const;
00080
00081 QX11InfoData *x11data;
00082
00083 friend class QX11PaintEngine;
00084 friend class QPixmap;
00085 friend class QWidget;
00086 friend class QWidgetPrivate;
00087 friend class QGLWidget;
00088 friend void qt_init(QApplicationPrivate *priv, int, Display *display, Qt::HANDLE visual,
00089 Qt::HANDLE colormap);
00090 friend void qt_cleanup();
00091 };
00092
00093 QT_END_HEADER
00094
00095 #endif // QX11INFO_X11_H