QtGui/qplatformintegration_qpa.h Source File

qplatformintegration_qpa.h
Go to the documentation of this file.
1 /****************************************************************************
2 **
3 ** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies).
4 ** Contact: http://www.qt-project.org/legal
5 **
6 ** This file is part of the QtGui module of the Qt Toolkit.
7 **
8 ** $QT_BEGIN_LICENSE:LGPL$
9 ** Commercial License Usage
10 ** Licensees holding valid commercial Qt licenses may use this file in
11 ** accordance with the commercial license agreement provided with the
12 ** Software or, alternatively, in accordance with the terms contained in
13 ** a written agreement between you and Digia. For licensing terms and
14 ** conditions see http://qt.digia.com/licensing. For further information
15 ** use the contact form at http://qt.digia.com/contact-us.
16 **
17 ** GNU Lesser General Public License Usage
18 ** Alternatively, this file may be used under the terms of the GNU Lesser
19 ** General Public License version 2.1 as published by the Free Software
20 ** Foundation and appearing in the file LICENSE.LGPL included in the
21 ** packaging of this file. Please review the following information to
22 ** ensure the GNU Lesser General Public License version 2.1 requirements
23 ** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
24 **
25 ** In addition, as a special exception, Digia gives you certain additional
26 ** rights. These rights are described in the Digia Qt LGPL Exception
27 ** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
28 **
29 ** GNU General Public License Usage
30 ** Alternatively, this file may be used under the terms of the GNU
31 ** General Public License version 3.0 as published by the Free Software
32 ** Foundation and appearing in the file LICENSE.GPL included in the
33 ** packaging of this file. Please review the following information to
34 ** ensure the GNU General Public License version 3.0 requirements will be
35 ** met: http://www.gnu.org/copyleft/gpl.html.
36 **
37 **
38 ** $QT_END_LICENSE$
39 **
40 ****************************************************************************/
41 
42 #ifndef QPLATFORMINTEGRATION_H
43 #define QPLATFORMINTEGRATION_H
44 
45 #include <QtGui/qwindowdefs.h>
46 #include <QtGui/private/qwindowsurface_p.h>
47 #include <QtGui/private/qpixmapdata_p.h>
49 
51 
53 
54 QT_MODULE(Gui)
55 
56 class QPlatformWindow;
57 class QWindowSurface;
58 class QBlittable;
59 class QWidget;
62 class QPlatformClipboard;
64 
65 class Q_GUI_EXPORT QPlatformIntegration
66 {
67 public:
68  enum Capability {
69  ThreadedPixmaps = 1,
70  OpenGL = 2
71  };
72 
73  virtual ~QPlatformIntegration() { }
74 
75  virtual bool hasCapability(Capability cap) const;
76 
77 // GraphicsSystem functions
78  virtual QPixmapData *createPixmapData(QPixmapData::PixelType type) const = 0;
79  virtual QPlatformWindow *createPlatformWindow(QWidget *widget, WId winId = 0) const = 0;
80  virtual QWindowSurface *createWindowSurface(QWidget *widget, WId winId) const = 0;
81 
82 // Window System functions
83  virtual QList<QPlatformScreen *> screens() const = 0;
84  virtual void moveToScreen(QWidget *window, int screen) {Q_UNUSED(window); Q_UNUSED(screen);}
85  virtual bool isVirtualDesktop() { return false; }
86  virtual QPixmap grabWindow(WId window, int x, int y, int width, int height) const;
87 
88 //Deeper window system integrations
89  virtual QPlatformFontDatabase *fontDatabase() const;
90 #ifndef QT_NO_CLIPBOARD
91  virtual QPlatformClipboard *clipboard() const;
92 #endif
93 
94 // Experimental in mainthread eventloop integration
95 // This should only be used if it is only possible to do window system event processing in
96 // the gui thread. All of the functions in QWindowSystemInterface are thread safe.
97  virtual QPlatformEventLoopIntegration *createEventLoopIntegration() const;
98 
99 // Access native handles. The window handle is already available from Wid;
100  virtual QPlatformNativeInterface *nativeInterface() const;
101 };
102 
104 
106 
107 #endif // QPLATFORMINTEGRATION_H
GLuint GLuint GLsizei GLenum type
Definition: GLee.h:872
virtual void moveToScreen(QWidget *window, int screen)
GLenum GLint GLint y
Definition: GLee.h:876
unsigned long WId
Definition: qwindowdefs.h:119
#define QT_END_NAMESPACE
Definition: qglobal.h:128
#define QT_BEGIN_HEADER
Definition: qglobal.h:141
int screen
Definition: GLee.h:10533
GLenum GLsizei width
Definition: GLee.h:873
#define QT_BEGIN_NAMESPACE
Definition: qglobal.h:127
GLenum GLsizei GLsizei height
Definition: GLee.h:883
GLenum GLint x
Definition: GLee.h:876
GLenum cap
Definition: GLee.h:7211
Window window
Definition: GLee.h:10520
#define QT_END_HEADER
Definition: qglobal.h:142