summaryrefslogtreecommitdiffstats
path: root/tools/qmeegographicssystemhelper/qmeegoruntime.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'tools/qmeegographicssystemhelper/qmeegoruntime.cpp')
-rw-r--r--tools/qmeegographicssystemhelper/qmeegoruntime.cpp13
1 files changed, 12 insertions, 1 deletions
diff --git a/tools/qmeegographicssystemhelper/qmeegoruntime.cpp b/tools/qmeegographicssystemhelper/qmeegoruntime.cpp
index 15f9cdf..928d01a 100644
--- a/tools/qmeegographicssystemhelper/qmeegoruntime.cpp
+++ b/tools/qmeegographicssystemhelper/qmeegoruntime.cpp
@@ -75,6 +75,7 @@ typedef void (*QMeeGoInvalidateLiveSurfacesFunc) (void);
typedef void (*QMeeGoSwitchToRasterFunc) (void);
typedef void (*QMeeGoSwitchToMeeGoFunc) (void);
typedef void (*QMeeGoRegisterSwitchCallbackFunc) (void (*callback)(int type, const char *name));
+typedef void (*QMeeGoSetSwitchPolicyFunc) (int policy);
static QMeeGoImageToEglSharedImageFunc qt_meego_image_to_egl_shared_image = NULL;
static QMeeGoPixmapDataFromEglSharedImageFunc qt_meego_pixmapdata_from_egl_shared_image = NULL;
@@ -95,6 +96,7 @@ static QMeeGoInvalidateLiveSurfacesFunc qt_meego_invalidate_live_surfaces = NULL
static QMeeGoSwitchToRasterFunc qt_meego_switch_to_raster = NULL;
static QMeeGoSwitchToMeeGoFunc qt_meego_switch_to_meego = NULL;
static QMeeGoRegisterSwitchCallbackFunc qt_meego_register_switch_callback = NULL;
+static QMeeGoSetSwitchPolicyFunc qt_meego_set_switch_policy = NULL;
extern "C" void handleSwitch(int type, const char *name)
{
@@ -134,6 +136,7 @@ void QMeeGoRuntime::initialize()
qt_meego_switch_to_raster = (QMeeGoSwitchToRasterFunc) library.resolve("qt_meego_switch_to_raster");
qt_meego_switch_to_meego = (QMeeGoSwitchToMeeGoFunc) library.resolve("qt_meego_switch_to_meego");
qt_meego_register_switch_callback = (QMeeGoRegisterSwitchCallbackFunc) library.resolve("qt_meego_register_switch_callback");
+ qt_meego_set_switch_policy = (QMeeGoSetSwitchPolicyFunc) library.resolve("qt_meego_set_switch_policy");
if (qt_meego_image_to_egl_shared_image && qt_meego_pixmapdata_from_egl_shared_image &&
qt_meego_pixmapdata_with_gl_texture && qt_meego_destroy_egl_shared_image && qt_meego_update_egl_shared_image_pixmap &&
@@ -141,7 +144,8 @@ void QMeeGoRuntime::initialize()
qt_meego_pixmapdata_with_new_live_texture && qt_meego_pixmapdata_from_live_texture_handle &&
qt_meego_live_texture_lock && qt_meego_live_texture_release && qt_meego_live_texture_get_handle &&
qt_meego_create_fence_sync && qt_meego_destroy_fence_sync && qt_meego_invalidate_live_surfaces &&
- qt_meego_switch_to_raster && qt_meego_switch_to_meego && qt_meego_register_switch_callback)
+ qt_meego_switch_to_raster && qt_meego_switch_to_meego && qt_meego_register_switch_callback &&
+ qt_meego_set_switch_policy)
{
qDebug("Successfully resolved MeeGo graphics system: %s %s\n", qPrintable(libraryPrivate->fileName), qPrintable(libraryPrivate->fullVersion));
} else {
@@ -289,3 +293,10 @@ void QMeeGoRuntime::enableSwitchEvents()
switchEventsEnabled = true;
}
}
+
+void QMeeGoRuntime::setSwitchPolicy(QMeeGoGraphicsSystemHelper::SwitchPolicy policy)
+{
+ ENSURE_INITIALIZED;
+ Q_ASSERT(qt_meego_set_switch_policy);
+ qt_meego_set_switch_policy(int(policy));
+}