Qt 4.8
Functions
qpaintdevice_x11.cpp File Reference
#include "qpaintdevice.h"
#include "qpainter.h"
#include "qwidget.h"
#include "qbitmap.h"
#include "qapplication.h"
#include <private/qt_x11_p.h>
#include "qx11info_x11.h"

Go to the source code of this file.

Functions

Drawable Q_GUI_EXPORT qt_x11Handle (const QPaintDevice *pd)
 Returns the X11 Drawable of the paint device. More...
 

Function Documentation

◆ qt_x11Handle()

Drawable Q_GUI_EXPORT qt_x11Handle ( const QPaintDevice pd)

Returns the X11 Drawable of the paint device.

Warning
This function is not part of the public interface.

0 is returned if it can't be obtained.

Definition at line 61 of file qpaintdevice_x11.cpp.

Referenced by QX11PaintEngine::begin(), and buildSpec().

62 {
63  if (!pd) return 0;
64  if (pd->devType() == QInternal::Widget)
65  return static_cast<const QWidget *>(pd)->handle();
66  else if (pd->devType() == QInternal::Pixmap)
67  return static_cast<const QPixmap *>(pd)->handle();
68  return 0;
69 }
virtual int devType() const
Definition: qpaintdevice.h:167