The home screen application provides the User Interface (UI) to control the Infotainment System.
The current requirements are listed in the AGL image spec v1.0.
This document contains the documentation for the following application:
The main focus is on the Home Screen application. The other applications were created to enable functionality that is provided by already existing components (like Tizen app framework) or that are not available by default (InputEventManager, WindowManager).
The License for the source code is Apache 2.0.
Copyright (C) 2016 Mentor Graphics Development (Deutschland) GmbH Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
The Home Screen application is the main visual interface to the user. Its main functionalities:
All applications are written in C++, using Qt 5.5.1.
This diagram shows which class is instantiated and who the owner is. It also shows the interfaces of the classes. The graphical representations of the classes (UI-files) are shown on the right side.
The current choice is D-Bus. HSA uses the Qt D-Bus binder. For system wide events like Day/Night Mode, signals are used, for direct communication like popup requests, methods are used. To generate the D-Bus adapter and proxy source code, qdbusxml2cpp is used.
To only allow one instance, uncomment this in the main.cpp:
// allow only one instance of this application QSharedMemory appInstance; appInstance.setKey("AGLHomeScreenApp"); if (!appInstance.create(1)) { qDebug("Only one instance of the Home Screen App allowed!"); exit(-1); }
The control bar has thee entries right now.
This widget is shown as soon as a showPopup request in incoming. Right now, only text can be displayed.
This widget is used to set up HomeScreen settings. Right now, the language and the color scheme can be configured.
HSA uses the QTranslator class to support multiple languages.
Applications settings that are needed for the development are stored via QSettings. Therefore some QCoreApplication values are set:
// used for application settings (QSettings) QCoreApplication::setOrganizationDomain("LinuxFoundation"); QCoreApplication::setOrganizationName("AutomotiveGradeLinux"); QCoreApplication::setApplicationName("HomeScreen"); QCoreApplication::setApplicationVersion("0.x.x");
These are stored on the developer OS in the file ~/.config/AutomotiveGradeLinux/HomeScreen.conf
The binder is used to access the systems application framework functionalities, like
The binder can be used as blueprint for other app framework binders.
This binder uses AUL and the pkgmgr-info API of the Tizen application framework.
pkgmgr_info::pkgmgrinfo_pkginfo_get_list(…)
AUL:: aul_launch_app(…)
The binder implements the org.agl.appframework interface.
<node> <interface name="org.agl.appframework"> <method name="getAvailableAppNames"> <arg name="names" type="as" direction="out"/> </method> <method name="launchApp"> <arg name="name" type="s" direction="in"/> <arg name="pid" type="i" direction="out"/> </method> </interface> </node>
This application is meant to run on the developer PC to inject events into the HomeScreen application. For example, to use D-Bus interfaces exposed by the HomeScreen app.
The Simulator app uses the D-Bus interface org.agl.statusbar to get and set the status bar info. The status bar is the green bar at the very top of the app.
The Simulator app uses the D-Bus interface org.agl.popup to display a popup.
<node> <interface name="org.agl.popup"> <method name="showPopup"> <arg name="type" type="i" direction="in"/> <arg name="text" type="s" direction="in"/> </method> </interface> </node>
The Simulator app uses the D-Bus interface org.agl.daynightmode to switch the color schemes between day and night.
<node> <interface name="org.agl.daynightmode"> <signal name="dayNightMode"> <arg name="mode" type="i" direction="out"/> </signal> </interface> </node>
These will be implemented as soon as the features are available.
The event manager can receive high level events, like hard key presses and distributes them to the corresponding component.
Therefore it implements org.agl.inputevent
<node> <interface name="org.agl.inputevent"> <method name="hardKeyPressed"> <arg name="key" type="i" direction="in"/> </method> </interface> </node>
Right now it uses the org.agl.homescreen interface to distribute keys to the HSA:
<node> <interface name="org.agl.homescreen"> <method name="hardKeyPressed"> <arg name="key" type="i" direction="in"/> <!-- using the inputevent.hpp InputEvent::HardKey type --> </method> </interface> </node>
This app demonstrates how to use the org.agl.statusbar interface. ==== Functionality It shows the current time in the first available status bar placeholder.
The WindowManager is the interface to the wayland compositor. It will use the IVI-shell to receive information about the display and the available surfaces.
The Window Manager will implement a logic to decide between different app surface render layouts. Therefore it will access the app framework to receive information like preferred app resolutions and so on.
The Home Screen application is written in C++, using Qt 5.5.1.
The x86 build includes a simulator for system settings and events like day/night mode, clamp 15 (ignition) and reverse gear.
The source code is located here: https://gerrit.automotivelinux.org/gerrit/gitweb?p=staging/HomeScreen.git