| 1 |
// Copyright (C) 2018 The Qt Company Ltd. |
| 2 |
// SPDX-License-Identifier: LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only |
| 3 |
|
| 4 |
#ifndef QXCBNATIVEPAINTING_H |
| 5 |
#define QXCBNATIVEPAINTING_H |
| 6 |
|
| 7 |
#include <QSharedDataPointer> |
| 8 |
#include "qt_x11_p.h" |
| 9 |
|
| 10 |
typedef struct _FcPattern FcPattern; |
| 11 |
typedef unsigned long XID; |
| 12 |
typedef XID Colormap; |
| 13 |
typedef XID Window; |
| 14 |
typedef struct _XDisplay Display; |
| 15 |
|
| 16 |
QT_BEGIN_NAMESPACE |
| 17 |
|
| 18 |
class QXcbConnection; |
| 19 |
class QPixmap; |
| 20 |
|
| 21 |
void qt_xcb_native_x11_info_init(QXcbConnection *conn); |
| 22 |
QList<XRectangle> qt_region_to_xrectangles(const QRegion &r); |
| 23 |
|
| 24 |
class QXcbX11InfoData; |
| 25 |
class QXcbX11Info |
| 26 |
{ |
| 27 |
public: |
| 28 |
QXcbX11Info(); |
| 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 |
|
| 56 |
private: |
| 57 |
QSharedDataPointer<QXcbX11InfoData> d; |
| 58 |
|
| 59 |
friend class QX11PaintEngine; |
| 60 |
friend class QX11PlatformPixmap; |
| 61 |
friend void qt_x11SetScreen(QPixmap &pixmap, int screen); |
| 62 |
}; |
| 63 |
|
| 64 |
QT_END_NAMESPACE |
| 65 |
|
| 66 |
#endif // QXCBNATIVEPAINTING_H |