From 83cfbb9fe4bcc17f6b00c8a25aa3eb8c2c850ac0 Mon Sep 17 00:00:00 2001 From: Tasuku Suzuki Date: Mon, 21 Nov 2016 14:40:40 +0900 Subject: check ivi-layermanagement-api availability replace #ifdef __arm__ with a definition that comes from availability test Change-Id: Id9fa4baefcc9f38acd3e98d40054040fc69029c6 Signed-off-by: Tasuku Suzuki --- WindowManager/WindowManager.pro | 3 ++- WindowManager/src/windowmanager.cpp | 16 ++++++++-------- WindowManager/src/windowmanager.hpp | 8 ++++---- 3 files changed, 14 insertions(+), 13 deletions(-) (limited to 'WindowManager') diff --git a/WindowManager/WindowManager.pro b/WindowManager/WindowManager.pro index 51fc972..6f33e13 100644 --- a/WindowManager/WindowManager.pro +++ b/WindowManager/WindowManager.pro @@ -17,6 +17,7 @@ TARGET = WindowManager QT = core dbus include(../interfaces/interfaces.pri) +include(../ivi_layermanagement_api.pri) SOURCES += src/main.cpp \ src/windowmanager.cpp @@ -24,7 +25,7 @@ SOURCES += src/main.cpp \ HEADERS += \ src/windowmanager.hpp -contains(QT_ARCH, arm.*) { +config_ivi_layermanagement_api { LIBS += -lilmControl -lilmCommon } diff --git a/WindowManager/src/windowmanager.cpp b/WindowManager/src/windowmanager.cpp index 054c43c..047734f 100644 --- a/WindowManager/src/windowmanager.cpp +++ b/WindowManager/src/windowmanager.cpp @@ -60,7 +60,7 @@ void WindowManager::start() { qDebug("-=[start]=-"); mp_layoutAreaToSurfaceIdAssignment = new QMap; -#ifdef __arm__ +#ifdef HAVE_IVI_LAYERMANAGEMENT_API ilmErrorTypes err; err = ilm_init(); @@ -80,7 +80,7 @@ WindowManager::~WindowManager() { qDebug("-=[~WindowManager]=-"); delete mp_windowManagerAdaptor; -#ifdef __arm__ +#ifdef HAVE_IVI_LAYERMANAGEMENT_API ilm_destroy(); #endif delete mp_layoutAreaToSurfaceIdAssignment; @@ -110,7 +110,7 @@ void WindowManager::dumpScene() } } -#ifdef __arm__ +#ifdef HAVE_IVI_LAYERMANAGEMENT_API void WindowManager::createNewLayer(int layerId) { @@ -220,7 +220,7 @@ void WindowManager::updateScreen() { qDebug("-=[updateScreen]=-"); -#ifdef __arm__ +#ifdef HAVE_IVI_LAYERMANAGEMENT_API if (-1 != m_currentLayout) { @@ -283,7 +283,7 @@ void WindowManager::updateScreen() #endif } -#ifdef __arm__ +#ifdef HAVE_IVI_LAYERMANAGEMENT_API void WindowManager::notificationFunc_non_static(ilmObjectType object, t_ilm_uint id, t_ilm_bool created) @@ -483,7 +483,7 @@ QList WindowManager::getAllLayouts() QList WindowManager::getAllSurfacesOfProcess(int pid) { QList result; -#ifdef __arm__ +#ifdef HAVE_IVI_LAYERMANAGEMENT_API struct ilmSurfaceProperties surfaceProperties; for (int i = 0; i < m_surfaces.size(); ++i) @@ -548,7 +548,7 @@ void WindowManager::hideLayer(int layer) qDebug("-=[hideLayer]=-"); qDebug("layer %d", layer); -#ifdef __arm__ +#ifdef HAVE_IVI_LAYERMANAGEMENT_API if (0 == layer) { ilm_layerSetVisibility(WINDOWMANAGER_LAYER_POPUP, ILM_FALSE); @@ -627,7 +627,7 @@ void WindowManager::showLayer(int layer) qDebug("-=[showLayer]=-"); qDebug("layer %d", layer); -#ifdef __arm__ +#ifdef HAVE_IVI_LAYERMANAGEMENT_API if (0 == layer) { ilm_layerSetVisibility(WINDOWMANAGER_LAYER_POPUP, ILM_TRUE); diff --git a/WindowManager/src/windowmanager.hpp b/WindowManager/src/windowmanager.hpp index a4d9d4f..30affd6 100644 --- a/WindowManager/src/windowmanager.hpp +++ b/WindowManager/src/windowmanager.hpp @@ -24,9 +24,9 @@ #include "windowmanager_adapter.h" -#ifdef __arm__ +#ifdef HAVE_IVI_LAYERMANAGEMENT_API extern "C" { -#include "ilm/ilm_control.h" +#include } #endif @@ -49,7 +49,7 @@ private: void dumpScene(); -#ifdef __arm__ +#ifdef HAVE_IVI_LAYERMANAGEMENT_API void createNewLayer(int layerId); void addSurfaceToLayer(int surfaceId, int layerId); #endif @@ -59,7 +59,7 @@ private: public: static void* myThis; -#ifdef __arm__ +#ifdef HAVE_IVI_LAYERMANAGEMENT_API // for general notifications void notificationFunc_non_static(ilmObjectType object, t_ilm_uint id, -- cgit 1.2.3-korg