Qt 4.8
|
The QX11Info class provides information about the X display configuration. More...
#include <qx11info_x11.h>
Public Functions | |
int | cells () const |
Returns the number of cells. More... | |
Qt::HANDLE | colormap () const |
Returns a handle for the color map. More... | |
bool | defaultColormap () const |
Returns true if there is a default color map; otherwise returns false. More... | |
bool | defaultVisual () const |
Returns true if there is a default visual; otherwise returns false. More... | |
int | depth () const |
Returns the color depth (bits per pixel) of the X display. More... | |
QX11Info & | operator= (const QX11Info &other) |
Assigns other to this object and returns a reference to this object. More... | |
QX11Info () | |
Constructs an empty QX11Info object. More... | |
QX11Info (const QX11Info &other) | |
Constructs a copy of other. More... | |
int | screen () const |
Returns the number of the screen currently in use. More... | |
void * | visual () const |
Returns the current visual. More... | |
~QX11Info () | |
Destroys the QX11Info object. More... | |
Static Public Functions | |
static int | appCells (int screen=-1) |
Returns the number of cells used by the application on the given screen. More... | |
static const char * | appClass () |
Returns the X11 application class. More... | |
static Qt::HANDLE | appColormap (int screen=-1) |
Returns a handle for the application's color map on the given screen. More... | |
static bool | appDefaultColormap (int screen=-1) |
Returns true if the application has a default color map on the given screen; otherwise returns false. More... | |
static bool | appDefaultVisual (int screen=-1) |
Returns true if the application has a default visual on the given screen; otherwise returns false. More... | |
static int | appDepth (int screen=-1) |
Returns the color depth (bits per pixel) used by the application on the given screen. More... | |
static int | appDpiX (int screen=-1) |
Returns the horizontal resolution of the given screen in terms of the number of dots per inch. More... | |
static int | appDpiY (int screen=-1) |
Returns the vertical resolution of the given screen in terms of the number of dots per inch. More... | |
static Qt::HANDLE | appRootWindow (int screen=-1) |
Returns a handle for the applications root window on the given screen. More... | |
static int | appScreen () |
Returns the number of the screen where the application is being displayed. More... | |
static unsigned long | appTime () |
Returns the X11 time. More... | |
static unsigned long | appUserTime () |
Returns the X11 user time. More... | |
static void * | appVisual (int screen=-1) |
Returns the current visual used by the application on the given screen. More... | |
static Display * | display () |
Returns the default display for the application. More... | |
static bool | isCompositingManagerRunning () |
Returns true if there is a compositing manager running. More... | |
static void | setAppDpiX (int screen, int dpi) |
Sets the horizontal resolution of the given screen to the number of dots per inch specified by xdpi. More... | |
static void | setAppDpiY (int screen, int dpi) |
Sets the vertical resolution of the given screen to the number of dots per inch specified by ydpi. More... | |
static void | setAppTime (unsigned long time) |
Sets the X11 time to the value specified by time. More... | |
static void | setAppUserTime (unsigned long time) |
Sets the X11 user time as specified by time. More... | |
Protected Functions | |
void | cloneX11Data (const QPaintDevice *) |
Makes a deep copy of the X11-specific data of fromDevice, if it is not null. More... | |
void | copyX11Data (const QPaintDevice *) |
Makes a shallow copy of the X11-specific data of fromDevice, if it is not null. More... | |
QX11InfoData * | getX11Data (bool def=false) const |
void | setX11Data (const QX11InfoData *) |
Makes a shallow copy of the X11-specific data d and assigns it to this class. More... | |
Protected Variables | |
QX11InfoData * | x11data |
Friends | |
class | QGLWidget |
class | QPixmap |
void | qt_cleanup () |
void | qt_init (QApplicationPrivate *priv, int, Display *display, Qt::HANDLE visual, Qt::HANDLE colormap) |
void | qt_x11_getX11InfoForWindow (QX11Info *xinfo, const QX11WindowAttributes &a) |
class | QWidget |
class | QWidgetPrivate |
class | QX11PaintEngine |
class | QX11PixmapData |
The QX11Info class provides information about the X display configuration.
The class provides two APIs: a set of non-static functions that provide information about a specific widget or pixmap, and a set of static functions that provide the default information for the application.
Definition at line 63 of file qx11info_x11.h.
QX11Info::QX11Info | ( | ) |
Constructs an empty QX11Info object.
Definition at line 73 of file qx11info_x11.cpp.
QX11Info::~QX11Info | ( | ) |
QX11Info::QX11Info | ( | const QX11Info & | other | ) |
|
static |
Returns the number of cells used by the application on the given screen.
The screen argument is an X screen number. Be aware that if the user's system uses Xinerama (as opposed to traditional X11 multiscreen), there is only one X screen. Use QDesktopWidget to query for information about Xinerama screens.
Definition at line 450 of file qx11info_x11.cpp.
Referenced by cells(), QX11PixmapData::convertToARGB32(), QX11PixmapData::fromImage(), getX11Data(), QPaintDevice::qt_x11Info(), QX11PixmapData::resize(), and QX11PixmapData::transformed().
|
static |
Returns the X11 application class.
Definition at line 2820 of file qapplication_x11.cpp.
Referenced by getNetWmState(), and sm_performSaveYourself().
|
static |
Returns a handle for the application's color map on the given screen.
The screen argument is an X screen number. Be aware that if the user's system uses Xinerama (as opposed to traditional X11 multiscreen), there is only one X screen. Use QDesktopWidget to query for information about Xinerama screens.
Definition at line 385 of file qx11info_x11.cpp.
Referenced by colormap(), QX11PixmapData::convertToARGB32(), QX11PixmapData::fromImage(), qt_gl_choose_cmap(), qt_x11_getX11InfoForWindow(), QPaintDevice::qt_x11Info(), QX11PixmapData::resize(), QColor::setColorFromString(), and QX11PixmapData::transformed().
|
static |
Returns true if the application has a default color map on the given screen; otherwise returns false.
The screen argument is an X screen number. Be aware that if the user's system uses Xinerama (as opposed to traditional X11 multiscreen), there is only one X screen. Use QDesktopWidget to query for information about Xinerama screens.
Definition at line 462 of file qx11info_x11.cpp.
Referenced by QX11PixmapData::convertToARGB32(), defaultColormap(), QX11PixmapData::fromImage(), getX11Data(), qstring_to_xtp(), QPaintDevice::qt_x11Info(), QX11PixmapData::resize(), and QX11PixmapData::transformed().
|
static |
Returns true if the application has a default visual on the given screen; otherwise returns false.
The screen argument is an X screen number. Be aware that if the user's system uses Xinerama (as opposed to traditional X11 multiscreen), there is only one X screen. Use QDesktopWidget to query for information about Xinerama screens.
Definition at line 474 of file qx11info_x11.cpp.
Referenced by QX11PixmapData::convertToARGB32(), defaultVisual(), QX11PixmapData::fromImage(), getX11Data(), qstring_to_xtp(), QPaintDevice::qt_x11Info(), QX11PixmapData::resize(), and QX11PixmapData::transformed().
|
static |
Returns the color depth (bits per pixel) used by the application on the given screen.
The screen argument is an X screen number. Be aware that if the user's system uses Xinerama (as opposed to traditional X11 multiscreen), there is only one X screen. Use QDesktopWidget to query for information about Xinerama screens.
Definition at line 434 of file qx11info_x11.cpp.
Referenced by QX11PixmapData::convertToARGB32(), QPixmap::defaultDepth(), depth(), QX11PixmapData::fromImage(), getX11Data(), qt_addPatternProps(), QPaintDevice::qt_x11Info(), QX11PixmapData::resize(), QStyle::standardPalette(), QMotifStyle::standardPalette(), QNativeImage::systemFormat(), QX11PixmapData::transformed(), and QX11PixmapData::x11ConvertToDefaultDepth().
|
static |
Returns the horizontal resolution of the given screen in terms of the number of dots per inch.
The screen argument is an X screen number. Be aware that if the user's system uses Xinerama (as opposed to traditional X11 multiscreen), there is only one X screen. Use QDesktopWidget to query for information about Xinerama screens.
Definition at line 221 of file qx11info_x11.cpp.
Referenced by do_size_hints(), QX11PixmapData::metric(), qt_defaultDpiX(), and QPaintDevice::qt_x11Info().
|
static |
Returns the vertical resolution of the given screen in terms of the number of dots per inch.
The screen argument is an X screen number. Be aware that if the user's system uses Xinerama (as opposed to traditional X11 multiscreen), there is only one X screen. Use QDesktopWidget to query for information about Xinerama screens.
Definition at line 267 of file qx11info_x11.cpp.
Referenced by do_size_hints(), QFontDatabase::loadXlfd(), QX11PixmapData::metric(), QFontDatabase::pointSizes(), qt_defaultDpiY(), qt_FcPatternToQFontDef(), qt_set_x11_resources(), QPaintDevice::qt_x11Info(), and QFontDatabase::smoothSizes().
|
static |
Returns a handle for the applications root window on the given screen.
The screen argument is an X screen number. Be aware that if the user's system uses Xinerama (as opposed to traditional X11 multiscreen), there is only one X screen. Use QDesktopWidget to query for information about Xinerama screens.
Definition at line 417 of file qx11info_x11.cpp.
Referenced by create_wm_client_leader(), QX11PixmapData::createBitmapFromImage(), QX11Data::findClientWindow(), findRealWindow(), QDesktopWidgetPrivate::init(), QSizeGrip::mousePressEvent(), QCursor::QCursor(), qt_get_net_supported(), qt_get_net_virtual_roots(), qt_save_rootinfo(), qt_set_input_encoding(), qt_set_x11_resources(), qt_x11_apply_settings_in_all_apps(), QPaintDevice::qt_x11Info(), QX11EmbedContainerPrivate::rejectClient(), QApplication::syncX(), QSystemTrayIconSys::sysTrayTracker(), QETWidget::translateConfigEvent(), QX11EmbedWidget::x11Event(), and QApplication::x11ProcessEvent().
|
static |
Returns the number of the screen where the application is being displayed.
Definition at line 370 of file qx11info_x11.cpp.
Referenced by QX11PixmapData::fromImage(), getX11Data(), QSystemTrayIconSys::locateSystemTray(), QFontPrivate::QFontPrivate(), qt_x11_getX11InfoForWindow(), qt_x11_set_fallback_font_family(), QPaintDevice::qt_x11Info(), screen(), and QX11PixmapData::transformed().
|
static |
Returns the X11 time.
Definition at line 305 of file qx11info_x11.cpp.
|
static |
Returns the X11 user time.
Definition at line 327 of file qx11info_x11.cpp.
Referenced by QGtkStylePrivate::setupGtkFileChooser().
|
static |
Returns the current visual used by the application on the given screen.
The screen argument is an X screen number. Be aware that if the user's system uses Xinerama (as opposed to traditional X11 multiscreen), there is only one X screen. Use QDesktopWidget to query for information about Xinerama screens.
Definition at line 402 of file qx11info_x11.cpp.
Referenced by QX11PixmapData::convertToARGB32(), QX11PixmapData::fromImage(), getX11Data(), qt_gl_choose_cmap(), qt_init(), qt_transparent_pixel(), qt_x11_getX11InfoForWindow(), QPaintDevice::qt_x11Info(), QX11PixmapData::resize(), QX11PixmapData::transformed(), and visual().
int QX11Info::cells | ( | ) | const |
Returns the number of cells.
Definition at line 505 of file qx11info_x11.cpp.
Referenced by QPaintDevice::qt_x11Info().
|
protected |
Makes a deep copy of the X11-specific data of fromDevice, if it is not null.
Definition at line 141 of file qx11info_x11.cpp.
Qt::HANDLE QX11Info::colormap | ( | ) | const |
Returns a handle for the color map.
Definition at line 514 of file qx11info_x11.cpp.
Referenced by getX11Data(), and QPaintDevice::qt_x11Info().
|
protected |
Makes a shallow copy of the X11-specific data of fromDevice, if it is not null.
Definition at line 120 of file qx11info_x11.cpp.
bool QX11Info::defaultColormap | ( | ) | const |
Returns true if there is a default color map; otherwise returns false.
Definition at line 523 of file qx11info_x11.cpp.
Referenced by QPaintDevice::qt_x11Info().
bool QX11Info::defaultVisual | ( | ) | const |
Returns true if there is a default visual; otherwise returns false.
Definition at line 541 of file qx11info_x11.cpp.
Referenced by QPaintDevice::qt_x11Info().
int QX11Info::depth | ( | ) | const |
Returns the color depth (bits per pixel) of the X display.
Definition at line 496 of file qx11info_x11.cpp.
Referenced by buildSpec(), QRasterWindowSurface::flush(), QX11PixmapData::fromImage(), QRasterWindowSurface::QRasterWindowSurface(), QPaintDevice::qt_x11Info(), QX11WindowSurface::QX11WindowSurface(), QX11PixmapData::resize(), and QNativeImage::systemFormat().
|
static |
Returns the default display for the application.
Definition at line 359 of file qx11info_x11.cpp.
Referenced by QSystemTrayIconSys::addToTray(), QGLContextPrivate::bindTextureFromNativePixmap(), buildSpec(), QEgl::createSurface(), QPixmap::depth(), QGLContextPrivate::destroyGlSurfaceForPixmap(), do_size_hints(), ShivaVGWindowSurfacePrivate::ensureContext(), QX11EmbedWidget::eventFilter(), QX11EmbedContainer::eventFilter(), fontExists(), QSystemTrayIconSys::getSysTrayVisualInfo(), init_gray(), init_indexed(), loadRaw(), QFontDatabase::loadXlfd(), loadXlfds(), QSystemTrayIconSys::locateSystemTray(), QSystemTrayIconSys::paintEvent(), QGLOverlayWidget::paintGL(), QFontPrivate::QFontPrivate(), qgl_use_font(), qglx_getProcAddress(), qt_fillFontDef(), qt_fixXLFD(), qt_format_to_attrib_list(), qt_transparent_pixel(), qt_x11_apply_settings_in_all_apps(), QPaintDevice::qt_x11Info(), query_colormap(), QX11PixmapData::release(), QColor::setColorFromString(), QEglProperties::setVisualFormat(), QSystemTrayIconSys::sysTrayTracker(), QGLContext::tryVisual(), QGLContextPrivate::unbindPixmapFromTexture(), windowInteractsWithPosition(), QX11PixmapData::x11ConvertToDefaultDepth(), QX11EmbedContainer::x11Event(), and QFontEngineXLFD::~QFontEngineXLFD().
|
protected |
In either case the caller is responsible for deleting the returned struct. But notice that the struct is a shared class, so other classes might also have a reference to it. The reference count of the returned QX11Data* is 0.
Definition at line 189 of file qx11info_x11.cpp.
Referenced by QX11PixmapData::convertToARGB32(), QX11PixmapData::fromImage(), qt_x11_getX11InfoForWindow(), QX11PixmapData::resize(), and QX11PixmapData::transformed().
|
static |
Returns true if there is a compositing manager running.
Definition at line 553 of file qx11info_x11.cpp.
Referenced by QWidgetPrivate::mapFromGlobal().
Assigns other to this object and returns a reference to this object.
Definition at line 92 of file qx11info_x11.cpp.
int QX11Info::screen | ( | ) | const |
Returns the number of the screen currently in use.
The return value is an X screen number. Be aware that if the user's system uses Xinerama (as opposed to traditional X11 multiscreen), there is only one X screen. Use QDesktopWidget to query for information about Xinerama screens.
Definition at line 487 of file qx11info_x11.cpp.
Referenced by appCells(), appColormap(), appDefaultColormap(), appDefaultVisual(), appDepth(), appDpiX(), appDpiY(), appVisual(), QGLContextPrivate::bindTextureFromNativePixmap(), buildSpec(), QX11PixmapData::convertToARGB32(), QX11PixmapData::copy(), QEgl::createSurface(), QPixmap::depth(), ShivaVGWindowSurfacePrivate::ensureContext(), QX11PixmapData::fill(), QX11PixmapData::fromImage(), getNetWmState(), QX11GLWindowSurface::grabWidget(), QX11WindowSurface::grabWidget(), QDesktopWidgetPrivate::init(), QWidgetPrivate::isBackgroundInherited(), QX11PixmapData::mask(), QX11PixmapData::metric(), QX11PixmapData::paintEngine(), qCanAllocColors(), QFont::QFont(), QFontMetrics::QFontMetrics(), QFontMetricsF::QFontMetricsF(), qstring_to_xtp(), qt_change_net_wm_state(), qt_format_to_attrib_list(), qt_x11_getX11InfoForWindow(), QPaintDevice::qt_x11Info(), QX11PixmapData::resize(), QWhatsThisPrivate::say(), setAppDpiX(), setAppDpiY(), QX11WindowSurface::setGeometry(), QX11PixmapData::setMask(), QX11PixmapData::toImage(), QX11PixmapData::transformed(), QGLContext::tryVisual(), QApplication::x11ClientMessage(), and QApplication::x11ProcessEvent().
|
static |
Sets the horizontal resolution of the given screen to the number of dots per inch specified by xdpi.
The screen argument is an X screen number. Be aware that if the user's system uses Xinerama (as opposed to traditional X11 multiscreen), there is only one X screen. Use QDesktopWidget to query for information about Xinerama screens.
Definition at line 244 of file qx11info_x11.cpp.
Referenced by QPaintDevice::qt_x11Info().
|
static |
Sets the vertical resolution of the given screen to the number of dots per inch specified by ydpi.
The screen argument is an X screen number. Be aware that if the user's system uses Xinerama (as opposed to traditional X11 multiscreen), there is only one X screen. Use QDesktopWidget to query for information about Xinerama screens.
Definition at line 289 of file qx11info_x11.cpp.
Referenced by QPaintDevice::qt_x11Info().
|
static |
Sets the X11 time to the value specified by time.
Definition at line 315 of file qx11info_x11.cpp.
|
static |
Sets the X11 user time as specified by time.
Definition at line 337 of file qx11info_x11.cpp.
|
protected |
Makes a shallow copy of the X11-specific data d and assigns it to this class.
Definition at line 167 of file qx11info_x11.cpp.
Referenced by cloneX11Data(), QX11PixmapData::convertToARGB32(), copyX11Data(), QX11PixmapData::fromImage(), qt_x11_getX11InfoForWindow(), QX11PixmapData::resize(), and QX11PixmapData::transformed().
void * QX11Info::visual | ( | ) | const |
Returns the current visual.
Definition at line 532 of file qx11info_x11.cpp.
Referenced by buildSpec(), QX11PixmapData::canTakeQImageFromXImage(), QX11PixmapData::copy(), QEgl::createSurface(), QRasterWindowSurface::flush(), QX11PixmapData::fromImage(), getNetWmState(), qCanAllocColors(), qt_renderformat_for_depth(), QPaintDevice::qt_x11Info(), QX11PixmapData::resize(), QEglProperties::setVisualFormat(), QNativeImage::systemFormat(), QX11PixmapData::toImage(), QX11PixmapData::transformed(), and QX11PixmapData::x11ConvertToDefaultDepth().
Definition at line 112 of file qx11info_x11.h.
Definition at line 108 of file qx11info_x11.h.
|
friend |
Definition at line 1328 of file qapplication_mac.mm.
|
friend |
Definition at line 1666 of file qapplication_x11.cpp.
|
friend |
Definition at line 3114 of file qwidget_x11.cpp.
Definition at line 110 of file qx11info_x11.h.
|
friend |
Definition at line 111 of file qx11info_x11.h.
|
friend |
Definition at line 107 of file qx11info_x11.h.
|
friend |
Definition at line 109 of file qx11info_x11.h.
|
protected |
Definition at line 105 of file qx11info_x11.h.
Referenced by cells(), colormap(), defaultColormap(), defaultVisual(), depth(), QX11PixmapData::fromImage(), getX11Data(), operator=(), QX11Info(), screen(), setX11Data(), visual(), and ~QX11Info().