aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--HomeScreen/src/homescreencontrolinterface.cpp18
-rw-r--r--HomeScreen/src/homescreencontrolinterface.h11
-rw-r--r--HomeScreen/src/layouthandler.cpp9
-rw-r--r--HomeScreen/src/layouthandler.h4
-rw-r--r--HomeScreen/src/main.cpp2
-rw-r--r--HomeScreen/src/mainwindow.cpp5
-rw-r--r--HomeScreenAppFrameworkBinderTizen/src/main.cpp2
-rw-r--r--HomeScreenSimulator/resources/mainwindow.ui18
-rw-r--r--HomeScreenSimulator/src/main.cpp2
-rw-r--r--HomeScreenSimulator/src/mainwindow.cpp5
-rw-r--r--HomeScreenSimulator/src/mainwindow.h2
-rw-r--r--InputEventManager/src/main.cpp2
-rw-r--r--SampleAppTimeDate/src/main.cpp2
-rw-r--r--SampleHomeScreenInterfaceApp/src/main.cpp12
-rw-r--r--SampleHomeScreenInterfaceApp/src/sampleclass.cpp15
-rw-r--r--SampleHomeScreenInterfaceApp/src/sampleclass.hpp4
-rw-r--r--WindowManager/src/main.cpp2
-rw-r--r--interfaces/homescreen.xml43
-rw-r--r--libhomescreen/include/libhomescreen.hpp12
-rw-r--r--libhomescreen/src/libhomescreen.cpp57
20 files changed, 177 insertions, 50 deletions
diff --git a/HomeScreen/src/homescreencontrolinterface.cpp b/HomeScreen/src/homescreencontrolinterface.cpp
index 057e742..bc66e53 100644
--- a/HomeScreen/src/homescreencontrolinterface.cpp
+++ b/HomeScreen/src/homescreencontrolinterface.cpp
@@ -24,6 +24,12 @@ HomeScreenControlInterface::~HomeScreenControlInterface()
delete mp_homeScreenAdaptor;
}
+QRect HomeScreenControlInterface::getLayoutRenderAreaForSurfaceId(int surfaceId)
+{
+ qDebug("getLayoutRenderAreaForSurfaceId %d", surfaceId);
+ return newRequestGetLayoutRenderAreaForSurfaceId(surfaceId);
+}
+
void HomeScreenControlInterface::hardKeyPressed(int key)
{
int pid = -1;
@@ -42,8 +48,14 @@ void HomeScreenControlInterface::hardKeyPressed(int key)
}
}
-void HomeScreenControlInterface::toggleFullScreen()
+void HomeScreenControlInterface::renderSurfaceToArea(int surfaceId, const QRect &renderArea)
+{
+ qDebug("requestSurfaceIdToFullScreen %d", surfaceId);
+ newRequestRenderSurfaceToArea(surfaceId, renderArea);
+}
+
+void HomeScreenControlInterface::requestSurfaceIdToFullScreen(int surfaceId)
{
- qDebug("toggleFullScreen");
- newRequestsToggleFullscreen();
+ qDebug("requestSurfaceIdToFullScreen %d", surfaceId);
+ newRequestSurfaceIdToFullScreen(surfaceId);
}
diff --git a/HomeScreen/src/homescreencontrolinterface.h b/HomeScreen/src/homescreencontrolinterface.h
index e341758..3203088 100644
--- a/HomeScreen/src/homescreencontrolinterface.h
+++ b/HomeScreen/src/homescreencontrolinterface.h
@@ -15,15 +15,18 @@ public:
~HomeScreenControlInterface();
signals:
-
-signals:
void newRequestsToBeVisibleApp(int pid);
- void newRequestsToggleFullscreen();
+
+ QRect newRequestGetLayoutRenderAreaForSurfaceId(int surfaceId);
+ void newRequestRenderSurfaceToArea(int surfaceId, const QRect &renderArea);
+ void newRequestSurfaceIdToFullScreen(int surfaceId);
//from homescreen_adapter.h
public Q_SLOTS: // METHODS
+ QRect getLayoutRenderAreaForSurfaceId(int surfaceId);
void hardKeyPressed(int key);
- void toggleFullScreen();
+ void renderSurfaceToArea(int surfaceId, const QRect &renderArea);
+ void requestSurfaceIdToFullScreen(int surfaceId);
private:
HomescreenAdaptor *mp_homeScreenAdaptor;
diff --git a/HomeScreen/src/layouthandler.cpp b/HomeScreen/src/layouthandler.cpp
index 3bfe533..0dac24f 100644
--- a/HomeScreen/src/layouthandler.cpp
+++ b/HomeScreen/src/layouthandler.cpp
@@ -169,9 +169,14 @@ void LayoutHandler::makeMeVisible(int surfaceId)
}
}
-void LayoutHandler::toggleFullscreen()
+void LayoutHandler::requestRenderSurfaceToArea(int surfaceId, const QRect &renderArea)
{
- qDebug("toggleFullscreen");
+ qDebug("requestRenderSurfaceToArea %d %d,%d,%d,%d", surfaceId, renderArea.x(), renderArea.y(), renderArea.width(), renderArea.height());
+}
+
+void LayoutHandler::requestSurfaceIdToFullScreen(int surfaceId)
+{
+ qDebug("requestSurfaceIdToFullScreen %d", surfaceId);
}
void LayoutHandler::setLayoutByName(QString layoutName)
diff --git a/HomeScreen/src/layouthandler.h b/HomeScreen/src/layouthandler.h
index 5763d44..ee400b7 100644
--- a/HomeScreen/src/layouthandler.h
+++ b/HomeScreen/src/layouthandler.h
@@ -18,7 +18,9 @@ signals:
public slots:
void makeMeVisible(int surfaceId);
- void toggleFullscreen();
+
+ void requestRenderSurfaceToArea(int surfaceId, const QRect &renderArea);
+ void requestSurfaceIdToFullScreen(int surfaceId);
void setLayoutByName(QString layoutName);
private:
diff --git a/HomeScreen/src/main.cpp b/HomeScreen/src/main.cpp
index a623fff..f1f5a22 100644
--- a/HomeScreen/src/main.cpp
+++ b/HomeScreen/src/main.cpp
@@ -36,7 +36,7 @@ int main(int argc, char *argv[])
QCoreApplication::setOrganizationDomain("LinuxFoundation");
QCoreApplication::setOrganizationName("AutomotiveGradeLinux");
QCoreApplication::setApplicationName("HomeScreen");
- QCoreApplication::setApplicationVersion("0.3.4");
+ QCoreApplication::setApplicationVersion("0.4.0");
qDebug("%s, v%s", QCoreApplication::applicationName().toStdString().c_str(), QCoreApplication::applicationVersion().toStdString().c_str());
diff --git a/HomeScreen/src/mainwindow.cpp b/HomeScreen/src/mainwindow.cpp
index c15cca5..f8dfe89 100644
--- a/HomeScreen/src/mainwindow.cpp
+++ b/HomeScreen/src/mainwindow.cpp
@@ -89,6 +89,7 @@ MainWindow::MainWindow(QWidget *parent) :
QObject::connect(mp_applauncherwidget, SIGNAL(newRequestsToBeVisibleApp(int)), mp_layoutHandler, SLOT(makeMeVisible(int)));
+
// apply color scheme
updateColorScheme();
@@ -100,7 +101,9 @@ MainWindow::MainWindow(QWidget *parent) :
mp_homeScreenControlInterface = new HomeScreenControlInterface(this);
QObject::connect(mp_homeScreenControlInterface, SIGNAL(newRequestsToBeVisibleApp(int)), mp_layoutHandler, SLOT(makeMeVisible(int)));
- QObject::connect(mp_homeScreenControlInterface, SIGNAL(newRequestsToggleFullscreen()), mp_layoutHandler, SLOT(toggleFullscreen()));
+ QObject::connect(mp_homeScreenControlInterface, SIGNAL(newRequestSurfaceIdToFullScreen(int)), mp_layoutHandler, SLOT(requestSurfaceIdToFullScreen(int)));
+ QObject::connect(mp_homeScreenControlInterface, SIGNAL(newRequestRenderSurfaceToArea(int, QRect)), mp_layoutHandler, SLOT(requestRenderSurfaceToArea(int,QRect)));
+ QObject::connect(mp_homeScreenControlInterface, SIGNAL(newRequestSurfaceIdToFullScreen(int)), mp_layoutHandler, SLOT(requestSurfaceIdToFullScreen(int)));
QObject::connect(mp_popupWidget, SIGNAL(comboBoxResult(QString)), mp_layoutHandler, SLOT(setLayoutByName(QString)));
}
diff --git a/HomeScreenAppFrameworkBinderTizen/src/main.cpp b/HomeScreenAppFrameworkBinderTizen/src/main.cpp
index f1e1af1..8a3c11c 100644
--- a/HomeScreenAppFrameworkBinderTizen/src/main.cpp
+++ b/HomeScreenAppFrameworkBinderTizen/src/main.cpp
@@ -27,7 +27,7 @@ int main(int argc, char *argv[])
QCoreApplication::setOrganizationDomain("LinuxFoundation");
QCoreApplication::setOrganizationName("AutomotiveGradeLinux");
QCoreApplication::setApplicationName("HomeScreenAppFrameworkBinderTizen");
- QCoreApplication::setApplicationVersion("0.3.0");
+ QCoreApplication::setApplicationVersion("0.4.0");
qDebug("%s, v%s", QCoreApplication::applicationName().toStdString().c_str(), QCoreApplication::applicationVersion().toStdString().c_str());
diff --git a/HomeScreenSimulator/resources/mainwindow.ui b/HomeScreenSimulator/resources/mainwindow.ui
index dcdf2e7..4f7ccf8 100644
--- a/HomeScreenSimulator/resources/mainwindow.ui
+++ b/HomeScreenSimulator/resources/mainwindow.ui
@@ -214,24 +214,6 @@
</property>
</widget>
</widget>
- <widget class="QWidget" name="tab_FullScreen">
- <attribute name="title">
- <string>FullScreen</string>
- </attribute>
- <widget class="QPushButton" name="pushButton_ToggleFullScreen">
- <property name="geometry">
- <rect>
- <x>80</x>
- <y>50</y>
- <width>161</width>
- <height>27</height>
- </rect>
- </property>
- <property name="text">
- <string>Toggle full screen</string>
- </property>
- </widget>
- </widget>
<widget class="QWidget" name="tab_FutureFeatures">
<attribute name="title">
<string>Future features</string>
diff --git a/HomeScreenSimulator/src/main.cpp b/HomeScreenSimulator/src/main.cpp
index c4d794c..101eedc 100644
--- a/HomeScreenSimulator/src/main.cpp
+++ b/HomeScreenSimulator/src/main.cpp
@@ -36,7 +36,7 @@ int main(int argc, char *argv[])
QCoreApplication::setOrganizationDomain("LinuxFoundation");
QCoreApplication::setOrganizationName("AutomotiveGradeLinux");
QCoreApplication::setApplicationName("HomeScreenSimulator");
- QCoreApplication::setApplicationVersion("0.3.1");
+ QCoreApplication::setApplicationVersion("0.4.0");
qDebug("%s, v%s", QCoreApplication::applicationName().toStdString().c_str(), QCoreApplication::applicationVersion().toStdString().c_str());
diff --git a/HomeScreenSimulator/src/mainwindow.cpp b/HomeScreenSimulator/src/mainwindow.cpp
index 272adfc..6c0dc2f 100644
--- a/HomeScreenSimulator/src/mainwindow.cpp
+++ b/HomeScreenSimulator/src/mainwindow.cpp
@@ -177,8 +177,3 @@ void MainWindow::on_checkBox_ObjectDetected_clicked()
{
mp_dBusProximityProxy->setObjectDetected(Qt::Checked == mp_ui->checkBox_ObjectDetected->checkState());
}
-
-void MainWindow::on_pushButton_ToggleFullScreen_clicked()
-{
- mp_dBusHomeScreenProxy->toggleFullScreen();
-}
diff --git a/HomeScreenSimulator/src/mainwindow.h b/HomeScreenSimulator/src/mainwindow.h
index ca368f0..3b1855c 100644
--- a/HomeScreenSimulator/src/mainwindow.h
+++ b/HomeScreenSimulator/src/mainwindow.h
@@ -63,8 +63,6 @@ private slots:
void on_checkBox_ObjectDetected_clicked();
- void on_pushButton_ToggleFullScreen_clicked();
-
private:
Ui::MainWindow *mp_ui;
DaynightmodeAdaptor *mp_dBusDayNightModeAdapter;
diff --git a/InputEventManager/src/main.cpp b/InputEventManager/src/main.cpp
index 03270db..b609693 100644
--- a/InputEventManager/src/main.cpp
+++ b/InputEventManager/src/main.cpp
@@ -25,7 +25,7 @@ int main(int argc, char *argv[])
QCoreApplication::setOrganizationDomain("LinuxFoundation");
QCoreApplication::setOrganizationName("AutomotiveGradeLinux");
QCoreApplication::setApplicationName("InputEventManager");
- QCoreApplication::setApplicationVersion("0.3.0");
+ QCoreApplication::setApplicationVersion("0.4.0");
qDebug("%s, v%s", QCoreApplication::applicationName().toStdString().c_str(), QCoreApplication::applicationVersion().toStdString().c_str());
diff --git a/SampleAppTimeDate/src/main.cpp b/SampleAppTimeDate/src/main.cpp
index 7cd51c0..cb23e80 100644
--- a/SampleAppTimeDate/src/main.cpp
+++ b/SampleAppTimeDate/src/main.cpp
@@ -9,7 +9,7 @@ int main(int argc, char *argv[])
QCoreApplication::setOrganizationDomain("LinuxFoundation");
QCoreApplication::setOrganizationName("AutomotiveGradeLinux");
QCoreApplication::setApplicationName("SampleAppTimeDate");
- QCoreApplication::setApplicationVersion("0.3.0");
+ QCoreApplication::setApplicationVersion("0.4.0");
qDebug("%s, v%s", QCoreApplication::applicationName().toStdString().c_str(), QCoreApplication::applicationVersion().toStdString().c_str());
diff --git a/SampleHomeScreenInterfaceApp/src/main.cpp b/SampleHomeScreenInterfaceApp/src/main.cpp
index 1e83d80..b9b3efa 100644
--- a/SampleHomeScreenInterfaceApp/src/main.cpp
+++ b/SampleHomeScreenInterfaceApp/src/main.cpp
@@ -6,13 +6,25 @@ using namespace std;
int main()
{
cout << "SampleHomeScreenInterfaceApp" << endl;
+ cout << "v0.4.0" << endl;
SampleClass *sampleClass = new SampleClass();
+ //sRectangle test = sampleClass->getLayoutRenderAreaForSurfaceId(1);
+
sampleClass->hardKeyPressed(100);
sampleClass->hardKeyPressed(101);
sampleClass->hardKeyPressed(102);
+ /*sRectangle renderArea;
+ renderArea.x = 0;
+ renderArea.y = 1;
+ renderArea.width = 12;
+ renderArea.height = 13;
+ sampleClass->renderSurfaceToArea(1, renderArea);*/
+
+ //sampleClass->requestSurfaceIdToFullScreen(1);
+
delete sampleClass;
return 0;
diff --git a/SampleHomeScreenInterfaceApp/src/sampleclass.cpp b/SampleHomeScreenInterfaceApp/src/sampleclass.cpp
index 0d373d1..6a46f2b 100644
--- a/SampleHomeScreenInterfaceApp/src/sampleclass.cpp
+++ b/SampleHomeScreenInterfaceApp/src/sampleclass.cpp
@@ -11,12 +11,23 @@ SampleClass::~SampleClass()
delete mp_libHomeScreen;
}
+
+sRectangle SampleClass::getLayoutRenderAreaForSurfaceId(int surfaceId)
+{
+ mp_libHomeScreen->getLayoutRenderAreaForSurfaceId(surfaceId);
+}
+
void SampleClass::hardKeyPressed(int key)
{
mp_libHomeScreen->hardKeyPressed(key);
}
-void SampleClass::toggleFullScreen()
+void SampleClass::renderSurfaceToArea(int surfaceId, const sRectangle &renderArea)
+{
+ mp_libHomeScreen->renderSurfaceToArea(surfaceId, renderArea);
+}
+
+void SampleClass::requestSurfaceIdToFullScreen(int surfaceId)
{
- mp_libHomeScreen->toggleFullScreen();
+ mp_libHomeScreen->requestSurfaceIdToFullScreen(surfaceId);
}
diff --git a/SampleHomeScreenInterfaceApp/src/sampleclass.hpp b/SampleHomeScreenInterfaceApp/src/sampleclass.hpp
index aa5f376..acffcf6 100644
--- a/SampleHomeScreenInterfaceApp/src/sampleclass.hpp
+++ b/SampleHomeScreenInterfaceApp/src/sampleclass.hpp
@@ -9,8 +9,10 @@ public:
SampleClass();
~SampleClass();
+ sRectangle getLayoutRenderAreaForSurfaceId(int surfaceId);
void hardKeyPressed(int key);
- void toggleFullScreen();
+ void renderSurfaceToArea(int surfaceId, const sRectangle &renderArea);
+ void requestSurfaceIdToFullScreen(int surfaceId);
private:
LibHomeScreen *mp_libHomeScreen;
diff --git a/WindowManager/src/main.cpp b/WindowManager/src/main.cpp
index 455361c..c0d6d69 100644
--- a/WindowManager/src/main.cpp
+++ b/WindowManager/src/main.cpp
@@ -25,7 +25,7 @@ int main(int argc, char *argv[])
QCoreApplication::setOrganizationDomain("LinuxFoundation");
QCoreApplication::setOrganizationName("AutomotiveGradeLinux");
QCoreApplication::setApplicationName("WindowManager");
- QCoreApplication::setApplicationVersion("0.3.1");
+ QCoreApplication::setApplicationVersion("0.4.0");
qDebug("%s, v%s", QCoreApplication::applicationName().toStdString().c_str(), QCoreApplication::applicationVersion().toStdString().c_str());
diff --git a/interfaces/homescreen.xml b/interfaces/homescreen.xml
index a405555..b317306 100644
--- a/interfaces/homescreen.xml
+++ b/interfaces/homescreen.xml
@@ -29,7 +29,48 @@
<method name="hardKeyPressed">
<arg name="key" type="i" direction="in"/>
</method>
- <method name="toggleFullScreen">
+ <!--
+ requestSurfaceIdToFullScreen:
+ @surfaceId: The surface that request to be shown fullscreen.
+
+ This allows an application to set a surface to full screen.
+ -->
+ <method name="requestSurfaceIdToFullScreen">
+ <arg name="surfaceId" type="i" direction="in"/>
+ </method>
+ <!--
+ getLayoutRenderAreaForSurfaceId:
+ @surfaceId: The surface that is requested.
+ @renderArea: The layout render area in which the given surface is located.
+
+ Before an application uses renderSurfaceToArea to render a surface into an area inside a layout area,
+ this method should be used to get the dimension of the layout area, in which the surface
+ currently is positioned.
+ -->
+ <method name="getLayoutRenderAreaForSurfaceId">
+ <arg name="surfaceId" type="i" direction="in"/>
+ <arg name="renderArea" type="(iiii)" direction="out"/>
+ <annotation name="org.qtproject.QtDBus.QtTypeName.Out0" value="QRect"/>
+ </method>
+ <!--
+ renderSurfaceToArea:
+ @surfaceId: The surface that is requested.
+ @renderArea: The render area inside the current layout area.
+
+ This is a special case. In the normal use case, one layout area is always filled completely
+ with one surface. By using this function, an app can request to position a surface in the
+ layout area.
+ Example:
+ If the layout area is 500x500 pixel in size, the normal use case qould be, that a surface
+ is positioned at x=0, y=0 with a width and a size of 500. With this function, an application can position surfaces
+ free in this area.
+ E.g.: Position surface 101 at x=10, y=30, width=300, height=100 and
+ surface 104 at x=100, y=130, width=30, height=10
+ -->
+ <method name="renderSurfaceToArea">
+ <arg name="surfaceId" type="i" direction="in"/>
+ <arg name="renderArea" type="(iiii)" direction="in"/>
+ <annotation name="org.qtproject.QtDBus.QtTypeName.In1" value="QRect"/>
</method>
</interface>
</node>
diff --git a/libhomescreen/include/libhomescreen.hpp b/libhomescreen/include/libhomescreen.hpp
index f92e190..db6ca2d 100644
--- a/libhomescreen/include/libhomescreen.hpp
+++ b/libhomescreen/include/libhomescreen.hpp
@@ -5,6 +5,14 @@
struct _LibHomeScreenHomescreen;
typedef struct _LibHomeScreenHomescreen LibHomeScreenHomescreen;
+typedef struct
+{
+ int x;
+ int y;
+ int width;
+ int height;
+} sRectangle;
+
class LibHomeScreen
{
public:
@@ -12,8 +20,10 @@ public:
~LibHomeScreen();
// these are representing the D-Bus methods:
+ sRectangle getLayoutRenderAreaForSurfaceId(int surfaceId);
void hardKeyPressed(int key);
- void toggleFullScreen();
+ void renderSurfaceToArea(int surfaceId, const sRectangle &renderArea);
+ void requestSurfaceIdToFullScreen(int surfaceId);
private:
LibHomeScreenHomescreen *mp_libHomeScreenHomescreen_Proxy;
diff --git a/libhomescreen/src/libhomescreen.cpp b/libhomescreen/src/libhomescreen.cpp
index 978a42c..39af1c3 100644
--- a/libhomescreen/src/libhomescreen.cpp
+++ b/libhomescreen/src/libhomescreen.cpp
@@ -1,4 +1,6 @@
+extern "C" {
#include "homescreen.h" // generated from xml
+}
#include "include/libhomescreen.hpp"
#include <stdio.h>
@@ -27,6 +29,30 @@ LibHomeScreen::~LibHomeScreen()
g_object_unref(mp_libHomeScreenHomescreen_Proxy);
}
+sRectangle LibHomeScreen::getLayoutRenderAreaForSurfaceId(int surfaceId)
+{
+ sRectangle result;
+ GError *err = NULL;
+
+ GVariant *out_renderArea;
+
+ lib_home_screen_homescreen_call_get_layout_render_area_for_surface_id_sync(
+ mp_libHomeScreenHomescreen_Proxy,
+ surfaceId,
+ &out_renderArea,
+ NULL,
+ &err);
+
+ if (NULL != err)
+ {
+ fprintf(stderr, "Unable to call getLayoutRenderAreaForSurfaceId: %s\n", err->message);
+ }
+
+ g_variant_get(out_renderArea, "(iiii)", result.x, result.y, result.width, result.height);
+
+ return result;
+}
+
void LibHomeScreen::hardKeyPressed(int key)
{
GError *err = NULL;
@@ -43,17 +69,42 @@ void LibHomeScreen::hardKeyPressed(int key)
}
}
-void LibHomeScreen::toggleFullScreen()
+void LibHomeScreen::renderSurfaceToArea(int surfaceId, const sRectangle &renderArea)
+{
+ GError *err = NULL;
+
+ GVariant *variant;
+ GVariantBuilder *builder;
+ builder = g_variant_builder_new(G_VARIANT_TYPE("(iiii)"));
+ g_variant_builder_add(builder, "(iiii)", renderArea.x, renderArea.y, renderArea.width, renderArea.height);
+ variant = g_variant_new("(iiii)", builder);
+ g_variant_builder_unref(builder);
+
+ lib_home_screen_homescreen_call_render_surface_to_area_sync(
+ mp_libHomeScreenHomescreen_Proxy,
+ surfaceId,
+ variant,
+ NULL,
+ &err);
+
+ if (NULL != err)
+ {
+ fprintf(stderr, "Unable to call renderSurfaceToArea: %s\n", err->message);
+ }
+}
+
+void LibHomeScreen::requestSurfaceIdToFullScreen(int surfaceId)
{
GError *err = NULL;
- lib_home_screen_homescreen_call_toggle_full_screen_sync(
+ lib_home_screen_homescreen_call_request_surface_id_to_full_screen_sync(
mp_libHomeScreenHomescreen_Proxy,
+ surfaceId,
NULL,
&err);
if (NULL != err)
{
- fprintf(stderr, "Unable to call toggleFullScreen: %s\n", err->message);
+ fprintf(stderr, "Unable to call requestSurfaceIdToFullScreen: %s\n", err->message);
}
}