summaryrefslogtreecommitdiffstats
path: root/src/plugins/gfxdrivers/directfb
diff options
context:
space:
mode:
authorAnders Bakken <anders.bakken@nokia.com>2009-09-14 18:02:11 (GMT)
committerAnders Bakken <anders.bakken@nokia.com>2009-09-15 18:46:10 (GMT)
commit6b359f3bc3b87a7e5e2b971712ec8a4b8afccdc9 (patch)
treebaaf9390fe9d6a70c5fb65d1ccfa68e93117c142 /src/plugins/gfxdrivers/directfb
parentd58494bf7b136c2c41f0fd219038c316f954f76f (diff)
downloadQt-6b359f3bc3b87a7e5e2b971712ec8a4b8afccdc9.zip
Qt-6b359f3bc3b87a7e5e2b971712ec8a4b8afccdc9.tar.gz
Qt-6b359f3bc3b87a7e5e2b971712ec8a4b8afccdc9.tar.bz2
Export two functions for getting a surface in dfb
When building DirectFB as part of QtGui and not as a plugin this patch will export two global functions for getting a surface given a widget. Reviewed-by: Donald Carr <donald.carr@nokia.com>
Diffstat (limited to 'src/plugins/gfxdrivers/directfb')
-rw-r--r--src/plugins/gfxdrivers/directfb/directfb.pro2
-rw-r--r--src/plugins/gfxdrivers/directfb/qdirectfbscreen.cpp13
2 files changed, 14 insertions, 1 deletions
diff --git a/src/plugins/gfxdrivers/directfb/directfb.pro b/src/plugins/gfxdrivers/directfb/directfb.pro
index d397050..0706f01 100644
--- a/src/plugins/gfxdrivers/directfb/directfb.pro
+++ b/src/plugins/gfxdrivers/directfb/directfb.pro
@@ -11,5 +11,5 @@ SOURCES += qdirectfbscreenplugin.cpp
QMAKE_CXXFLAGS += $$QT_CFLAGS_DIRECTFB
LIBS += $$QT_LIBS_DIRECTFB
-DEFINES += $$QT_DEFINES_DIRECTFB
+DEFINES += $$QT_DEFINES_DIRECTFB QT_DIRECTFB_PLUGIN
contains(gfx-plugins, directfb):DEFINES += QT_QWS_DIRECTFB
diff --git a/src/plugins/gfxdrivers/directfb/qdirectfbscreen.cpp b/src/plugins/gfxdrivers/directfb/qdirectfbscreen.cpp
index 4413858..79a401c 100644
--- a/src/plugins/gfxdrivers/directfb/qdirectfbscreen.cpp
+++ b/src/plugins/gfxdrivers/directfb/qdirectfbscreen.cpp
@@ -1687,6 +1687,19 @@ IDirectFBSurface *QDirectFBScreen::subSurfaceForWidget(const QWidget *widget, co
}
#endif
+#ifndef QT_DIRECTFB_PLUGIN
+Q_GUI_EXPORT IDirectFBSurface *qt_directfb_surface_for_widget(const QWidget *widget, QRect *rect)
+{
+ return QDirectFBScreen::instance() ? QDirectFBScreen::instance()->surfaceForWidget(widget, rect) : 0;
+}
+#ifdef QT_DIRECTFB_SUBSURFACE
+Q_GUI_EXPORT IDirectFBSurface *qt_directfb_subsurface_for_widget(const QWidget *widget, const QRect &area)
+{
+ return QDirectFBScreen::instance() ? QDirectFBScreen::instance()->subSurfaceForWidget(widget, area) : 0;
+}
+#endif
+#endif
+
QT_END_NAMESPACE
#include "qdirectfbscreen.moc"