Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
Loading...
Searching...
No Matches
qxcbnativepainting.h
Go to the documentation of this file.
1// Copyright (C) 2018 The Qt Company Ltd.
2// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
3// Qt-Security score:significant reason:default
4
5#pragma once
6
7#include <QSharedDataPointer>
8#include "qt_x11_p.h"
9
10typedef struct _FcPattern FcPattern;
11typedef unsigned long XID;
12typedef XID Colormap;
13typedef XID Window;
14typedef struct _XDisplay Display;
15
16QT_BEGIN_NAMESPACE
17
18class QXcbConnection;
19class QPixmap;
20
21void qt_xcb_native_x11_info_init(QXcbConnection *conn);
23
24class QXcbX11InfoData;
26{
27public:
29 ~QXcbX11Info();
30 QXcbX11Info(const QXcbX11Info &other);
31 QXcbX11Info &operator=(const QXcbX11Info &other);
32
33 static QXcbX11Info fromScreen(int screen);
34 static Display *display();
35
36 int depth() const;
37 void setDepth(int depth);
38
39 int screen() const;
40 Colormap colormap() const;
41
42 void *visual() const;
43 void setVisual(void *visual);
44
45 static int appScreen();
46 static int appDepth(int screen = -1);
47 static int appCells(int screen = -1);
48 static Colormap appColormap(int screen = -1);
49 static void *appVisual(int screen = -1);
50 static Window appRootWindow(int screen = -1);
51 static bool appDefaultColormap(int screen = -1);
52 static bool appDefaultVisual(int screen = -1);
53 static int appDpiX(int screen = -1);
54 static int appDpiY(int screen = -1);
55
56private:
57 QSharedDataPointer<QXcbX11InfoData> d;
58
59 friend class QX11PaintEngine;
60 friend class QX11PlatformPixmap;
61 friend void qt_x11SetScreen(QPixmap &pixmap, int screen);
62};
63
64QT_END_NAMESPACE
\inmodule QtGui
Definition qwindow.h:63
qreal devicePixelRatio() const override
bool isBackingStore() const
void copy(const QPlatformPixmap *data, const QRect &rect) override
QBitmap mask() const override
QPlatformPixmap * createCompatiblePlatformPixmap() const override
Drawable handle() const
void setIsBackingStore(bool on)
static XID createBitmapFromImage(const QImage &image)
Pixmap x11ConvertToDefaultDepth()
void fromImage(const QImage &img, Qt::ImageConversionFlags flags) override
QImage toImage() const override
QPaintEngine * paintEngine() const override
QX11PlatformPixmap(PixelType pixelType)
const QXcbX11Info * x11_info() const
void fill(const QColor &fillColor) override
Picture x11PictureHandle() const
void resize(int width, int height) override
void setMask(const QBitmap &mask) override
QImage toImage(const QRect &rect) const override
friend const QXcbX11Info & qt_x11Info(const QPixmap &pixmap)
void setDevicePixelRatio(qreal scaleFactor) override
bool hasAlphaChannel() const override
bool scroll(int dx, int dy, const QRect &rect) override
int metric(QPaintDevice::PaintDeviceMetric metric) const override
QPixmap transformed(const QTransform &matrix, Qt::TransformationMode mode) const override
void beginPaint(const QRegion &region) override
This function is called before painting onto the surface begins, with the region in which the paintin...
QXcbNativeBackingStore(QWindow *window)
void flush(QWindow *window, const QRegion &region, const QPoint &offset) override
Flushes the given region from the specified window.
QImage toImage() const override
Implemented in subclasses to return the content of the backingstore as a QImage.
QPaintDevice * paintDevice() override
Implement this function to return the appropriate paint device.
void resize(const QSize &size, const QRegion &staticContents) override
bool scroll(const QRegion &area, int dx, int dy) override
Scrolls the given area dx pixels to the right and dy downward; both dx and dy may be negative.
void setDepth(int depth)
static bool appDefaultVisual(int screen=-1)
static int appScreen()
static QXcbX11Info fromScreen(int screen)
static Colormap appColormap(int screen=-1)
static Window appRootWindow(int screen=-1)
static bool appDefaultColormap(int screen=-1)
friend void qt_x11SetScreen(QPixmap &pixmap, int screen)
static int appDepth(int screen=-1)
void setVisual(void *visual)
void * visual() const
static Display * display()
Colormap colormap() const
static int appDpiY(int screen=-1)
QXcbX11Info & operator=(const QXcbX11Info &other)
static int appCells(int screen=-1)
static void * appVisual(int screen=-1)
QXcbX11Info(const QXcbX11Info &other)
static int appDpiX(int screen=-1)
XID Picture
XID Pixmap
Pixmap qt_x11PixmapHandle(const QPixmap &pixmap)
Picture qt_x11PictureHandle(const QPixmap &pixmap)
QX11PlatformPixmap * qt_x11Pixmap(const QPixmap &pixmap)
int qt_x11SetDefaultScreen(int screen)
XID Colormap
unsigned long XID
QList< XRectangle > qt_region_to_xrectangles(const QRegion &r)
XID Window
struct _FcPattern FcPattern
void qt_xcb_native_x11_info_init(QXcbConnection *conn)