TEMPLATE = subdirs
+load(configure)
+qtCompileTest(ivi_layermanagement_api)
+
SUBDIRS = interfaces \
libhomescreen \
HomeScreen \
QT = widgets dbus
include(../interfaces/interfaces.pri)
+include(../ivi_layermanagement_api.pri)
SOURCES += \
src/main.cpp \
MainWindow w;
w.show();
-#ifdef __arm__
+#ifdef HAVE_IVI_LAYERMANAGEMENT_API
// the WindowManager positions the surface correctly
-#endif
-#ifdef __i386__
+#else
w.move(0, 0);
#endif
-
#ifdef __arm__
qDebug("Running on ARM architecture");
#endif
QT = core dbus
include(../interfaces/interfaces.pri)
+include(../ivi_layermanagement_api.pri)
SOURCES += src/main.cpp \
src/homescreenappframeworkbinderagl.cpp
QDBusConnection::sessionBus(),
0);
-#ifdef __arm__
+#ifdef HAVE_IVI_LAYERMANAGEMENT_API
QString runnables = mp_dBusAfmUserProxy->runnables("{\"dummy\": \"entry\"}");
qDebug("runnables: %s", runnables.toStdString().c_str());
m_apps.append(appInfo);
}
-#endif
-#ifdef __i386__
+#else
// for the simulation
/*AppInfo ai;
ai.setName("org.test.app1");
int HomeScreenAppFrameworkBinderAgl::launchApp(const QString &name)
{
int pid = -1;
-#ifdef __arm__
+#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 pid: %d", pid);
-#endif
-#ifdef __i386__
+#else
qDebug("launchApp name: %s", name.toStdString().c_str());
pid = qrand();
#endif
QT = core dbus
include(../interfaces/interfaces.pri)
+include(../ivi_layermanagement_api.pri)
SOURCES += src/main.cpp \
src/windowmanager.cpp
HEADERS += \
src/windowmanager.hpp
-contains(QT_ARCH, arm.*) {
+config_ivi_layermanagement_api {
LIBS += -lilmControl -lilmCommon
}
{
qDebug("-=[start]=-");
mp_layoutAreaToSurfaceIdAssignment = new QMap<int, unsigned int>;
-#ifdef __arm__
+#ifdef HAVE_IVI_LAYERMANAGEMENT_API
ilmErrorTypes err;
err = ilm_init();
{
qDebug("-=[~WindowManager]=-");
delete mp_windowManagerAdaptor;
-#ifdef __arm__
+#ifdef HAVE_IVI_LAYERMANAGEMENT_API
ilm_destroy();
#endif
delete mp_layoutAreaToSurfaceIdAssignment;
}
}
-#ifdef __arm__
+#ifdef HAVE_IVI_LAYERMANAGEMENT_API
void WindowManager::createNewLayer(int layerId)
{
{
qDebug("-=[updateScreen]=-");
-#ifdef __arm__
+#ifdef HAVE_IVI_LAYERMANAGEMENT_API
if (-1 != m_currentLayout)
{
#endif
}
-#ifdef __arm__
+#ifdef HAVE_IVI_LAYERMANAGEMENT_API
void WindowManager::notificationFunc_non_static(ilmObjectType object,
t_ilm_uint id,
t_ilm_bool created)
QList<int> WindowManager::getAllSurfacesOfProcess(int pid)
{
QList<int> result;
-#ifdef __arm__
+#ifdef HAVE_IVI_LAYERMANAGEMENT_API
struct ilmSurfaceProperties surfaceProperties;
for (int i = 0; i < m_surfaces.size(); ++i)
qDebug("-=[hideLayer]=-");
qDebug("layer %d", layer);
-#ifdef __arm__
+#ifdef HAVE_IVI_LAYERMANAGEMENT_API
if (0 == layer)
{
ilm_layerSetVisibility(WINDOWMANAGER_LAYER_POPUP, ILM_FALSE);
qDebug("-=[showLayer]=-");
qDebug("layer %d", layer);
-#ifdef __arm__
+#ifdef HAVE_IVI_LAYERMANAGEMENT_API
if (0 == layer)
{
ilm_layerSetVisibility(WINDOWMANAGER_LAYER_POPUP, ILM_TRUE);
#include "windowmanager_adapter.h"
-#ifdef __arm__
+#ifdef HAVE_IVI_LAYERMANAGEMENT_API
extern "C" {
-#include "ilm/ilm_control.h"
+#include <ilm/ilm_control.h>
}
#endif
void dumpScene();
-#ifdef __arm__
+#ifdef HAVE_IVI_LAYERMANAGEMENT_API
void createNewLayer(int layerId);
void addSurfaceToLayer(int surfaceId, int layerId);
#endif
public:
static void* myThis;
-#ifdef __arm__
+#ifdef HAVE_IVI_LAYERMANAGEMENT_API
// 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)
+}