diff options
author | Qt Continuous Integration System <qt-info@nokia.com> | 2011-12-13 11:14:49 (GMT) |
---|---|---|
committer | Qt Continuous Integration System <qt-info@nokia.com> | 2011-12-13 11:14:49 (GMT) |
commit | 0e0a3883675ed2943af9810b8354ed406075a6ee (patch) | |
tree | 8e97a2917bc3002722d0cd9b995ceb4a652c4615 /src/plugins/platforms/directfb/qdirectfbconvenience.h | |
parent | ca6db4b5b89f627a970e9f4ea489eae38d771f66 (diff) | |
parent | c614e71cdd4047bb49ccde2f94c9d622f5071fc3 (diff) | |
download | Qt-0e0a3883675ed2943af9810b8354ed406075a6ee.zip Qt-0e0a3883675ed2943af9810b8354ed406075a6ee.tar.gz Qt-0e0a3883675ed2943af9810b8354ed406075a6ee.tar.bz2 |
Merge branch 'master' of git://scm.dev.nokia.troll.no/qt/qt-fire-team
* 'master' of git://scm.dev.nokia.troll.no/qt/qt-fire-team:
directfb: Backport the work from QtBase to Qt 4.8
[blitter] Work on tst_QPixmap::clear()
[blitter] Use QScopedPointer for the engine and blittable
[blitter] Generate a new serial number when resizing the
[blitter] Fix memory leak in the blitter paintengine
Revert "Fix memory leaks in OpenVG and OpenGL resource pools"
Fix window surface config on OpenGL graphics system.
Symbian: Fix a case sensitivity issue with QMAKE_EXTRA_COMPILERS
Symbian: Fix double deletion of selected text when using predictive
tests: fixed compile of qscriptextensionplugin test with high -jN
Symbian: improving diagnostics for QWaitCondition
Updated WebKit to 83439de78841f9569ad78e3a84b7b888337b5d18
Symbian: Fix language mappings for localize_deployment
Symbian: Only localize the application .rss that needs it, not all .rss
Revert "Fix sqlite driver memory eating due to close failure"
Revert "Fix sqlite driver memory eating due to close failure"
tests: make tests compile or disable those which don't compile
Reduce unnecessary QtCore DLL loads during Symbian app thread creation
Fix HarfBuzz Thai character SARA AM handling
Diffstat (limited to 'src/plugins/platforms/directfb/qdirectfbconvenience.h')
-rw-r--r-- | src/plugins/platforms/directfb/qdirectfbconvenience.h | 44 |
1 files changed, 43 insertions, 1 deletions
diff --git a/src/plugins/platforms/directfb/qdirectfbconvenience.h b/src/plugins/platforms/directfb/qdirectfbconvenience.h index c82bea8..d009393 100644 --- a/src/plugins/platforms/directfb/qdirectfbconvenience.h +++ b/src/plugins/platforms/directfb/qdirectfbconvenience.h @@ -49,6 +49,11 @@ #include <directfb.h> +QT_BEGIN_NAMESPACE + +class QDirectFbScreen; +class QPlatformScreen; + class QDirectFbKeyMap: public QHash<DFBInputDeviceKeySymbol, Qt::Key> { public: @@ -67,7 +72,7 @@ public: static IDirectFB *dfbInterface(); static IDirectFBDisplayLayer *dfbDisplayLayer(int display = DLID_PRIMARY); - static IDirectFBSurface *dfbSurfaceForPixmapData(QPixmapData *); + static IDirectFBSurface *dfbSurfaceForPlatformPixmap(QPixmapData *); static Qt::MouseButton mouseButton(DFBInputDeviceButtonIdentifier identifier); static Qt::MouseButtons mouseButtons(DFBInputDeviceButtonMask mask); @@ -81,4 +86,41 @@ private: friend class QDirectFbIntegration; }; +template <typename T> struct QDirectFBInterfaceCleanupHandler +{ + static void cleanup(T *t) + { + if (!t) + return; + t->Release(t); + } +}; + +template <typename T> +class QDirectFBPointer : public QScopedPointer<T, QDirectFBInterfaceCleanupHandler<T> > +{ +public: + QDirectFBPointer(T *t = 0) + : QScopedPointer<T, QDirectFBInterfaceCleanupHandler<T> >(t) + {} + + T** outPtr() + { + this->reset(0); + return &this->d; + } +}; + +// Helper conversions from internal to DFB types +QDirectFbScreen *toDfbScreen(QWidget *window); +IDirectFBDisplayLayer *toDfbLayer(QPlatformScreen *screen); + +#define QDFB_STRINGIFY(x) #x +#define QDFB_TOSTRING(x) QDFB_STRINGIFY(x) +#define QDFB_PRETTY \ + (__FILE__ ":" QDFB_TOSTRING(__LINE__)) + +QT_END_NAMESPACE + + #endif // QDIRECTFBCONVENIENCE_H |