49 #include <xcb/xcb_image.h> 94 XCB_IMAGE_FORMAT_Z_PIXMAP,
108 qWarning() <<
"QXcbWindowSurface: Unable to attach to shared memory segment";
112 if (shmctl(
m_shm_info.shmid, IPC_RMID, 0) == -1)
113 qWarning() <<
"QXcbWindowSurface: Error while marking the shared memory segment to be destroyed";
174 , m_syncingResize(false)
200 p.fillRect(*
it, blank);
224 for (
int i = 0; i < rects.
size(); ++i)
239 if (size == QWindowSurface::size())
243 QWindowSurface::resize(size);
265 for (
int i = 0; i < rects.
size(); ++i)
The QPainter class performs low-level painting on widgets and other paint devices.
The QColor class provides colors based on RGB, HSV or CMYK values.
QRect geometry() const
Returns the currently allocated area on the screen.
Format
The following image formats are available in Qt.
void beginPaint(const QRegion &)
This function is called before painting onto the surface begins, with the region in which the paintin...
QPointer< QWidget > widget
QXcbWindowSurface(QWidget *widget, bool setDefaultSurface=true)
QRect rect(const QWidget *widget) const
Returns the rectangle for widget in the coordinates of this window surface.
#define it(className, varName)
bool isNull() const
Returns true if it is a null image, otherwise returns false.
xcb_connection_t * xcb_connection() const
void endPaint(const QRegion &)
This function is called after painting onto the surface has ended, with the region in which the paint...
void put(xcb_window_t window, const QPoint &dst, const QRect &source)
void preparePaint(const QRegion ®ion)
void setConnection(QXcbConnection *connection)
QRect translated(int dx, int dy) const
Returns a copy of the rectangle that is translated dx along the x axis and dy along the y axis...
int width() const
Returns the width of the rectangle.
virtual QPoint offset(const QWidget *widget) const
Returns the offset of widget in the coordinates of this window surface.
bool hasAlphaChannel() const
Returns true if the image has a format that respects the alpha channel, otherwise returns false...
QRect boundingRect() const
Returns the bounding rectangle of this region.
int height() const
Returns the height of the rectangle.
QXcbConnection * connection() const
iterator end()
Returns an STL-style iterator pointing to the imaginary item after the last item in the vector...
xcb_shm_segment_info_t m_shm_info
int width() const
Returns the width.
xcb_image_t * m_xcb_image
static bool isEmpty(const char *str)
Q_CORE_EXPORT void qWarning(const char *,...)
The QImage class provides a hardware-independent image representation that allows direct access to th...
void qt_scrollRectInImage(QImage &img, const QRect &rect, const QPoint &offset)
The QRegion class specifies a clip region for a painter.
QImage::Format format() const
The QWindowSurface class provides the drawing area for top-level windows.
const T & at(int i) const
Returns the item at index position i in the vector.
void setCompositionMode(CompositionMode mode)
Sets the composition mode to the given mode.
iterator begin()
Returns an STL-style iterator pointing to the first item in the vector.
int y() const
Returns the y-coordinate of the rectangle's top edge.
xcb_window_t window() const
int x() const
Returns the x-coordinate of the rectangle's left edge.
The QPoint class defines a point in the plane using integer precision.
QVector< QRect > rects() const
Returns an array of non-overlapping rectangles that make up the region.
int height() const
Returns the height.
The QRect class defines a rectangle in the plane using integer precision.
int y() const
Returns the y coordinate of this point.
bool scroll(const QRegion &area, int dx, int dy)
Scrolls the given area dx pixels to the right and dy downward; both dx and dy may be negative...
bool intersects(const QRegion &r) const
Returns true if this region intersects with region, otherwise returns false.
The QSize class defines the size of a two-dimensional object using integer point precision.
int x() const
Returns the x coordinate of this point.
void resize(const QSize &size)
void flush(QWidget *widget, const QRegion ®ion, const QPoint &offset)
Flushes the given region from the specified widget onto the screen.
int size() const
Returns the number of items in the vector.
QXcbShmImage(QXcbScreen *connection, const QSize &size, uint depth, QImage::Format format)
QWidget * window() const
Returns a pointer to the top-level window associated with this surface.
static int area(const QSize &s)
QPaintDevice * paintDevice()
Implement this function to return the appropriate paint device.
QPoint topLeft() const
Returns the position of the rectangle's top-left corner.
void updateSyncRequestCounter()