replace #ifdef __arm__ with a definition that comes from availability
test
Change-Id: Id9fa4baefcc9f38acd3e98d40054040fc69029c6
Signed-off-by: Tasuku Suzuki <tasuku.suzuki@qt.io>
+load(configure)
+qtCompileTest(ivi_layermanagement_api)
+
SUBDIRS = interfaces \
libhomescreen \
HomeScreen \
SUBDIRS = interfaces \
libhomescreen \
HomeScreen \
QT = widgets dbus
include(../interfaces/interfaces.pri)
QT = widgets dbus
include(../interfaces/interfaces.pri)
+include(../ivi_layermanagement_api.pri)
SOURCES += \
src/main.cpp \
SOURCES += \
src/main.cpp \
+#ifdef HAVE_IVI_LAYERMANAGEMENT_API
// the WindowManager positions the surface correctly
// the WindowManager positions the surface correctly
#ifdef __arm__
qDebug("Running on ARM architecture");
#endif
#ifdef __arm__
qDebug("Running on ARM architecture");
#endif
QT = core dbus
include(../interfaces/interfaces.pri)
QT = core dbus
include(../interfaces/interfaces.pri)
+include(../ivi_layermanagement_api.pri)
SOURCES += src/main.cpp \
src/homescreenappframeworkbinderagl.cpp
SOURCES += src/main.cpp \
src/homescreenappframeworkbinderagl.cpp
QDBusConnection::sessionBus(),
0);
QDBusConnection::sessionBus(),
0);
+#ifdef HAVE_IVI_LAYERMANAGEMENT_API
QString runnables = mp_dBusAfmUserProxy->runnables("{\"dummy\": \"entry\"}");
qDebug("runnables: %s", runnables.toStdString().c_str());
QString runnables = mp_dBusAfmUserProxy->runnables("{\"dummy\": \"entry\"}");
qDebug("runnables: %s", runnables.toStdString().c_str());
m_apps.append(appInfo);
}
m_apps.append(appInfo);
}
// for the simulation
/*AppInfo ai;
ai.setName("org.test.app1");
// for the simulation
/*AppInfo ai;
ai.setName("org.test.app1");
int HomeScreenAppFrameworkBinderAgl::launchApp(const QString &name)
{
int pid = -1;
int HomeScreenAppFrameworkBinderAgl::launchApp(const QString &name)
{
int pid = -1;
+#ifdef HAVE_IVI_LAYERMANAGEMENT_API
qDebug("launchApp name: %s", name.toStdString().c_str());
QString jsonLaunch = "{\"id\":\"" + name + "\", \"mode\":\"local\"}";
qDebug("jsonLaunch %s", jsonLaunch.toStdString().c_str());
qDebug("launchApp name: %s", name.toStdString().c_str());
QString jsonLaunch = "{\"id\":\"" + name + "\", \"mode\":\"local\"}";
qDebug("jsonLaunch %s", jsonLaunch.toStdString().c_str());
}
qDebug("launchApp pid: %d", pid);
}
qDebug("launchApp pid: %d", pid);
qDebug("launchApp name: %s", name.toStdString().c_str());
pid = qrand();
#endif
qDebug("launchApp name: %s", name.toStdString().c_str());
pid = qrand();
#endif
QT = core dbus
include(../interfaces/interfaces.pri)
QT = core dbus
include(../interfaces/interfaces.pri)
+include(../ivi_layermanagement_api.pri)
SOURCES += src/main.cpp \
src/windowmanager.cpp
SOURCES += src/main.cpp \
src/windowmanager.cpp
HEADERS += \
src/windowmanager.hpp
HEADERS += \
src/windowmanager.hpp
-contains(QT_ARCH, arm.*) {
+config_ivi_layermanagement_api {
LIBS += -lilmControl -lilmCommon
}
LIBS += -lilmControl -lilmCommon
}
{
qDebug("-=[start]=-");
mp_layoutAreaToSurfaceIdAssignment = new QMap<int, unsigned int>;
{
qDebug("-=[start]=-");
mp_layoutAreaToSurfaceIdAssignment = new QMap<int, unsigned int>;
+#ifdef HAVE_IVI_LAYERMANAGEMENT_API
ilmErrorTypes err;
err = ilm_init();
ilmErrorTypes err;
err = ilm_init();
{
qDebug("-=[~WindowManager]=-");
delete mp_windowManagerAdaptor;
{
qDebug("-=[~WindowManager]=-");
delete mp_windowManagerAdaptor;
+#ifdef HAVE_IVI_LAYERMANAGEMENT_API
ilm_destroy();
#endif
delete mp_layoutAreaToSurfaceIdAssignment;
ilm_destroy();
#endif
delete mp_layoutAreaToSurfaceIdAssignment;
+#ifdef HAVE_IVI_LAYERMANAGEMENT_API
void WindowManager::createNewLayer(int layerId)
{
void WindowManager::createNewLayer(int layerId)
{
{
qDebug("-=[updateScreen]=-");
{
qDebug("-=[updateScreen]=-");
+#ifdef HAVE_IVI_LAYERMANAGEMENT_API
if (-1 != m_currentLayout)
{
if (-1 != m_currentLayout)
{
+#ifdef HAVE_IVI_LAYERMANAGEMENT_API
void WindowManager::notificationFunc_non_static(ilmObjectType object,
t_ilm_uint id,
t_ilm_bool created)
void WindowManager::notificationFunc_non_static(ilmObjectType object,
t_ilm_uint id,
t_ilm_bool created)
QList<int> WindowManager::getAllSurfacesOfProcess(int pid)
{
QList<int> result;
QList<int> WindowManager::getAllSurfacesOfProcess(int pid)
{
QList<int> result;
+#ifdef HAVE_IVI_LAYERMANAGEMENT_API
struct ilmSurfaceProperties surfaceProperties;
for (int i = 0; i < m_surfaces.size(); ++i)
struct ilmSurfaceProperties surfaceProperties;
for (int i = 0; i < m_surfaces.size(); ++i)
qDebug("-=[hideLayer]=-");
qDebug("layer %d", layer);
qDebug("-=[hideLayer]=-");
qDebug("layer %d", layer);
+#ifdef HAVE_IVI_LAYERMANAGEMENT_API
if (0 == layer)
{
ilm_layerSetVisibility(WINDOWMANAGER_LAYER_POPUP, ILM_FALSE);
if (0 == layer)
{
ilm_layerSetVisibility(WINDOWMANAGER_LAYER_POPUP, ILM_FALSE);
qDebug("-=[showLayer]=-");
qDebug("layer %d", layer);
qDebug("-=[showLayer]=-");
qDebug("layer %d", layer);
+#ifdef HAVE_IVI_LAYERMANAGEMENT_API
if (0 == layer)
{
ilm_layerSetVisibility(WINDOWMANAGER_LAYER_POPUP, ILM_TRUE);
if (0 == layer)
{
ilm_layerSetVisibility(WINDOWMANAGER_LAYER_POPUP, ILM_TRUE);
#include "windowmanager_adapter.h"
#include "windowmanager_adapter.h"
+#ifdef HAVE_IVI_LAYERMANAGEMENT_API
-#include "ilm/ilm_control.h"
+#include <ilm/ilm_control.h>
+#ifdef HAVE_IVI_LAYERMANAGEMENT_API
void createNewLayer(int layerId);
void addSurfaceToLayer(int surfaceId, int layerId);
#endif
void createNewLayer(int layerId);
void addSurfaceToLayer(int surfaceId, int layerId);
#endif
public:
static void* myThis;
public:
static void* myThis;
+#ifdef HAVE_IVI_LAYERMANAGEMENT_API
// for general notifications
void notificationFunc_non_static(ilmObjectType object,
t_ilm_uint id,
// for general notifications
void notificationFunc_non_static(ilmObjectType object,
t_ilm_uint id,
--- /dev/null
+#include <ilm/ilm_control.h>
+
+int main(int argc,char **argv)
+{
+ return 0;
+}
+
--- /dev/null
+SOURCES = ivi_layermanagement_api.cpp
+
+CONFIG -= qt dylib
+
+LIBS += -lilmControl -lilmCommon
--- /dev/null
+config_ivi_layermanagement_api {
+ DEFINES += HAVE_IVI_LAYERMANAGEMENT_API
+} else {
+ message(HAVE_IVI_LAYERMANAGEMENT_API not available)
+}