Qt 4.8
Classes | Typedefs | Functions
qx11info_x11.h File Reference
#include <QtCore/qnamespace.h>

Go to the source code of this file.

Classes

class  QX11Info
 The QX11Info class provides information about the X display configuration. More...
 

Typedefs

typedef struct _XDisplay Display
 

Functions

void qt_x11_getX11InfoForWindow (QX11Info *xinfo, const QX11WindowAttributes &a)
 

Typedef Documentation

◆ Display

typedef struct _XDisplay Display

Definition at line 47 of file qx11info_x11.h.

Function Documentation

◆ qt_x11_getX11InfoForWindow()

void qt_x11_getX11InfoForWindow ( QX11Info xinfo,
const QX11WindowAttributes a 
)

Definition at line 3114 of file qwidget_x11.cpp.

3115 {
3116  QX11InfoData* xd = xinfo->getX11Data(true);
3117  const XWindowAttributes &a = *(att.att);
3118  // find which screen the window is on...
3119  xd->screen = QX11Info::appScreen(); // by default, use the default :)
3120  int i;
3121  for (i = 0; i < ScreenCount(X11->display); i++) {
3122  if (RootWindow(X11->display, i) == a.root) {
3123  xd->screen = i;
3124  break;
3125  }
3126  }
3127 
3128  xd->depth = a.depth;
3129  xd->cells = DisplayCells(X11->display, xd->screen);
3130  xd->visual = a.visual;
3131  xd->defaultVisual = (XVisualIDFromVisual((Visual *) a.visual) ==
3132  XVisualIDFromVisual((Visual *) QX11Info::appVisual(xinfo->screen())));
3133  xd->colormap = a.colormap;
3134  xd->defaultColormap = (a.colormap == QX11Info::appColormap(xinfo->screen()));
3135  xinfo->setX11Data(xd);
3136 }
static int appScreen()
Returns the number of the screen where the application is being displayed.
#define X11
Definition: qt_x11_p.h:724
QX11InfoData * getX11Data(bool def=false) const
static Qt::HANDLE appColormap(int screen=-1)
Returns a handle for the application&#39;s color map on the given screen.
Visual * visual
Definition: qt_x11_p.h:318
static void * appVisual(int screen=-1)
Returns the current visual used by the application on the given screen.
Colormap colormap
Definition: qt_x11_p.h:317
void setX11Data(const QX11InfoData *)
Makes a shallow copy of the X11-specific data d and assigns it to this class.
bool defaultColormap
Definition: qt_x11_p.h:319
int screen() const
Returns the number of the screen currently in use.
bool defaultVisual
Definition: qt_x11_p.h:320