Qt 4.8
qopenkodeintegration.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 plugins 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 QGRAPHICSSYSTEM_OPENKODE_H
43 #define QGRAPHICSSYSTEM_OPENKODE_H
44 
46 
47 #include <QtCore/qsemaphore.h>
48 
49 #include <QtGui/QPlatformIntegration>
50 #include <QtGui/QPlatformScreen>
51 #include <QtGui/QPlatformGLContext>
52 #include <QtGui/QPlatformFontDatabase>
53 
54 #include <GLES2/gl2.h>
55 #include <EGL/egl.h>
56 
59 
60 struct KDDesktopNV;
61 struct KDDisplayNV;
62 class QOpenKODECursor;
63 
65 {
66  Q_OBJECT
67 public:
68  QOpenKODEScreen(KDDisplayNV *kdDisplay, KDDesktopNV *kdDesktop);
70 
71  QRect geometry() const { return mGeometry; }
72  int depth() const { return mDepth; }
73  QImage::Format format() const { return mFormat; }
74 
75  EGLDisplay eglDisplay() { return mEglDisplay; }
76 
77  bool isFullScreen() const {return mIsFullScreen;}
78  void setFullScreen(bool fullscreen) { mIsFullScreen = fullscreen; }
79 private:
81  int mDepth;
83  EGLDisplay mEglDisplay;
85 };
86 
88 {
89 public:
92 
93  bool hasCapability(QPlatformIntegration::Capability cap) const;
94 
95  QPixmapData *createPixmapData(QPixmapData::PixelType type) const;
96  QPlatformWindow *createPlatformWindow(QWidget *widget, WId winId = 0) const;
97  QWindowSurface *createWindowSurface(QWidget *widget, WId winId) const;
98 
99  QPlatformEventLoopIntegration *createEventLoopIntegration() const;
100 
101  QPlatformFontDatabase *fontDatabase() const;
102 
103  virtual QList<QPlatformScreen *> screens() const { return mScreens; }
104 
105  static GLuint blitterProgram();
106 
107  void setMainGLContext(QEGLPlatformContext *ctx) { mMainGlContext = ctx; }
108  void mainGLContext() const { return mMainGlContext; }
109 
110 private:
115 };
116 
119 
120 #endif
int depth() const
Reimplement in subclass to return current depth of the screen.
Format
The following image formats are available in Qt.
Definition: qimage.h:91
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
QImage::Format mFormat
QPointer< QWidget > widget
QEGLPlatformContext * mMainGlContext
The QPlatformScreen class provides an abstraction for visual displays.
#define QT_BEGIN_HEADER
Definition: qglobal.h:136
The QWidget class is the base class of all user interface objects.
Definition: qwidget.h:150
QOpenKODEScreen(KDDisplayNV *kdDisplay, KDDesktopNV *kdDesktop)
The QPlatformWindow class provides an abstraction for top-level windows.
QRect geometry() const
Reimplement in subclass to return the pixel geometry of the screen.
#define QT_BEGIN_NAMESPACE
This macro expands to.
Definition: qglobal.h:89
QOpenKODEEventLoopIntegration * mEventLoopIntegration
QList< QPlatformScreen * > mScreens
void setMainGLContext(QEGLPlatformContext *ctx)
QImage::Format format() const
Reimplement in subclass to return the image format which corresponds to the screen format...
#define Q_OBJECT
Definition: qobjectdefs.h:157
The QWindowSurface class provides the drawing area for top-level windows.
The QPlatformIntegration class is the entry for WindowSystem specific functionality.
virtual QList< QPlatformScreen * > screens() const
Accessor function to a list of all the screens on the current system.
#define ctx
Definition: qgl.cpp:6094
The QRect class defines a rectangle in the plane using integer precision.
Definition: qrect.h:58
The QPlatformFontDatabase class makes it possible to customize how fonts are discovered and how they ...
bool isFullScreen() const
void setFullScreen(bool fullscreen)
#define QT_END_HEADER
Definition: qglobal.h:137
QPlatformFontDatabase * mFontDb
The QList class is a template class that provides lists.
Definition: qdatastream.h:62
EGLDisplay eglDisplay()