Qt 4.8
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>
48 #include <QtGui/qplatformscreen_qpa.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 
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
static QWaylandClipboard * clipboard
unsigned long WId
Definition: qwindowdefs.h:119
int type
Definition: qmetatype.cpp:239
#define QT_END_NAMESPACE
This macro expands to.
Definition: qglobal.h:90
QPointer< QWidget > widget
#define QT_MODULE(x)
Definition: qglobal.h:2783
#define QT_BEGIN_HEADER
Definition: qglobal.h:136
#define Q_GUI_EXPORT
Definition: qglobal.h:1450
The QWidget class is the base class of all user interface objects.
Definition: qwidget.h:150
The QPlatformWindow class provides an abstraction for top-level windows.
NSWindow * window
#define QT_BEGIN_NAMESPACE
This macro expands to.
Definition: qglobal.h:89
virtual bool isVirtualDesktop()
Returns if the current windowing system configuration defines all the screens to be one desktop(virtu...
The QWindowSurface class provides the drawing area for top-level windows.
The QPlatformIntegration class is the entry for WindowSystem specific functionality.
The QPlatformFontDatabase class makes it possible to customize how fonts are discovered and how they ...
The QPixmap class is an off-screen image representation that can be used as a paint device...
Definition: qpixmap.h:71
virtual void moveToScreen(QWidget *window, int screen)
This function is called when a QWidget is displayed on screen, or the QWidget is to be displayed on a...
#define QT_END_HEADER
Definition: qglobal.h:137
#define Q_UNUSED(x)
Indicates to the compiler that the parameter with the specified name is not used in the body of a fun...
Definition: qglobal.h:1729
The QList class is a template class that provides lists.
Definition: qdatastream.h:62