diff options
40 files changed, 143 insertions, 1148 deletions
diff --git a/README.md b/README.md deleted file mode 100644 index 2c04a91..0000000 --- a/README.md +++ /dev/null @@ -1,58 +0,0 @@ -This project contains: - -HomeScreen: AGL Home Screen reference implementation - -**AGL repo for source code** - -``` -$ mkdir WORK -$ cd WORK -$ repo init -b dab -m dab_4.0.0_xml -u https://gerrit.automotivelinux.org/gerrit/AGL/AGL-repo -$ repo sync -$ git clone git clone https://gerrit.automotivelinux.org/gerrit/staging/meta-hmi-framework - -``` - -Then you can get the following recipe. - -* `meta-agl-demo/recipes-demo-hmi/homescreen` - - -**Bitbake** - -``` -$ source meta-agl/scripts/aglsetup.sh -m m3ulcb agl-demo agl-devel agl-appfw-smack agl-hmi-framework -$ bitbake homescreen -``` - -Instructions for building HomeScreen app ----------------------------------------- - -The HomeScreen app is part of the -packagegroup-agl-demo-platform -packagegroup. - -This also includes the following apps: -- WindowManager -- HomeScreen Binder - -And the library -- libhomescreen -- libwindowmanager - - -To build all the above, follow the instrucions on the AGL -documentation website: -http://docs.automotivelinux.org/docs/getting_started/en/dev/reference/source-code.html#features-supported-by-aglsetup - -Please activate the "agl-demo" feature when running the aglsetup script: -http://docs.automotivelinux.org/docs/getting_started/en/dev/reference/source-code.html#features-supported-by-aglsetup - - -Launch HomeScreen App: - -Usage: - -``` -afm-util start homescreen -``` diff --git a/autobuild/agl/autobuild b/autobuild/agl/autobuild deleted file mode 100755 index bbbc13e..0000000 --- a/autobuild/agl/autobuild +++ /dev/null @@ -1,110 +0,0 @@ -#!/usr/bin/make -f -# Copyright (C) 2015 - 2018 "IoT.bzh" -# Copyright (C) 2020 Konsulko Group -# Author "Romain Forlot" <romain.forlot@iot.bzh> -# -# 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. - -THISFILE := $(lastword $(MAKEFILE_LIST)) -ROOT_DIR := $(abspath $(dir $(THISFILE))/../..) - -# Build directories -# Note that the debug directory is defined in relation to the release -# directory (BUILD_DIR), this needs to be kept in mind if over-riding -# it and building that widget types, the specific widget type variable -# (e.g. BUILD_DIR_DEBUG) may also need to be specified to yield the -# desired output hierarchy. -BUILD_DIR = $(ROOT_DIR)/build -BUILD_DIR_DEBUG = $(abspath $(BUILD_DIR)/../build-debug) - -# Output directory variable for use in pattern rules. -# This is intended for internal use only, hence the explicit override -# definition. -override OUTPUT_DIR = $(BUILD_DIR) - -# Final install directory for widgets -DEST = $(OUTPUT_DIR) - -# Default build type for release builds -BUILD_TYPE = release - -.PHONY: all help update install distclean -.PHONY: clean clean-release clean-debug clean-all -.PHONY: configure configure-release configure-debug -.PHONY: build build-release build-debug build-all -.PHONY: package package-release package-debug package-all - -help: - @echo "List of targets available:" - @echo "" - @echo "- all" - @echo "- help" - @echo "- clean" - @echo "- distclean" - @echo "- configure" - @echo "- build: compilation, link and prepare files for package into a widget" - @echo "- package: output a widget file '*.wgt'" - @echo "- install: install in $(DEST) directory" - @echo "" - @echo "Usage: ./autobuild/agl/autobuild package DEST=${HOME}/opt" - @echo "Don't use your build dir as DEST as wgt file is generated at this location" - -all: package-all - -# Target specific variable over-rides so static pattern rules can be -# used for the various type-specific targets. - -configure-debug build-debug package-debug clean-debug: OUTPUT_DIR = $(BUILD_DIR_DEBUG) -configure-debug build-debug package-debug: BUILD_TYPE = debug - -clean-release clean-debug: - @if [ -d $(OUTPUT_DIR) ]; then \ - $(MAKE) -C $(OUTPUT_DIR) $(CLEAN_ARGS) clean; \ - else \ - echo Nothing to clean; \ - fi - -clean: clean-release - -clean-all: clean-release clean-debug - -distclean: clean-all - -configure-release configure-debug: - @mkdir -p $(OUTPUT_DIR) - @if [ ! -f $(OUTPUT_DIR)/Makefile ]; then \ - (cd $(OUTPUT_DIR) && qmake CONFIG+=$(BUILD_TYPE) $(CONFIGURE_ARGS) $(ROOT_DIR)); \ - fi - -configure: configure-release - -build-release build-debug: build-%: configure-% - @$(MAKE) -C $(OUTPUT_DIR) $(BUILD_ARGS) all - -build: build-release - -build-all: build-release build-debug - -package-release package-debug: package-%: build-% - @cp $(OUTPUT_DIR)/package/*.wgt $(OUTPUT_DIR)/ - @if [ "$(abspath $(DEST))" != "$(abspath $(OUTPUT_DIR))" ]; then \ - mkdir -p $(DEST) && cp $(OUTPUT_DIR)/*.wgt $(DEST); \ - fi - - -package: package-release - -package-all: package-release package-debug - -install: build - @$(MAKE) -C $(BUILD_DIR) $(INSTALL_ARGS) install diff --git a/autobuild/linux/autobuild b/autobuild/linux/autobuild deleted file mode 100755 index bbbc13e..0000000 --- a/autobuild/linux/autobuild +++ /dev/null @@ -1,110 +0,0 @@ -#!/usr/bin/make -f -# Copyright (C) 2015 - 2018 "IoT.bzh" -# Copyright (C) 2020 Konsulko Group -# Author "Romain Forlot" <romain.forlot@iot.bzh> -# -# 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. - -THISFILE := $(lastword $(MAKEFILE_LIST)) -ROOT_DIR := $(abspath $(dir $(THISFILE))/../..) - -# Build directories -# Note that the debug directory is defined in relation to the release -# directory (BUILD_DIR), this needs to be kept in mind if over-riding -# it and building that widget types, the specific widget type variable -# (e.g. BUILD_DIR_DEBUG) may also need to be specified to yield the -# desired output hierarchy. -BUILD_DIR = $(ROOT_DIR)/build -BUILD_DIR_DEBUG = $(abspath $(BUILD_DIR)/../build-debug) - -# Output directory variable for use in pattern rules. -# This is intended for internal use only, hence the explicit override -# definition. -override OUTPUT_DIR = $(BUILD_DIR) - -# Final install directory for widgets -DEST = $(OUTPUT_DIR) - -# Default build type for release builds -BUILD_TYPE = release - -.PHONY: all help update install distclean -.PHONY: clean clean-release clean-debug clean-all -.PHONY: configure configure-release configure-debug -.PHONY: build build-release build-debug build-all -.PHONY: package package-release package-debug package-all - -help: - @echo "List of targets available:" - @echo "" - @echo "- all" - @echo "- help" - @echo "- clean" - @echo "- distclean" - @echo "- configure" - @echo "- build: compilation, link and prepare files for package into a widget" - @echo "- package: output a widget file '*.wgt'" - @echo "- install: install in $(DEST) directory" - @echo "" - @echo "Usage: ./autobuild/agl/autobuild package DEST=${HOME}/opt" - @echo "Don't use your build dir as DEST as wgt file is generated at this location" - -all: package-all - -# Target specific variable over-rides so static pattern rules can be -# used for the various type-specific targets. - -configure-debug build-debug package-debug clean-debug: OUTPUT_DIR = $(BUILD_DIR_DEBUG) -configure-debug build-debug package-debug: BUILD_TYPE = debug - -clean-release clean-debug: - @if [ -d $(OUTPUT_DIR) ]; then \ - $(MAKE) -C $(OUTPUT_DIR) $(CLEAN_ARGS) clean; \ - else \ - echo Nothing to clean; \ - fi - -clean: clean-release - -clean-all: clean-release clean-debug - -distclean: clean-all - -configure-release configure-debug: - @mkdir -p $(OUTPUT_DIR) - @if [ ! -f $(OUTPUT_DIR)/Makefile ]; then \ - (cd $(OUTPUT_DIR) && qmake CONFIG+=$(BUILD_TYPE) $(CONFIGURE_ARGS) $(ROOT_DIR)); \ - fi - -configure: configure-release - -build-release build-debug: build-%: configure-% - @$(MAKE) -C $(OUTPUT_DIR) $(BUILD_ARGS) all - -build: build-release - -build-all: build-release build-debug - -package-release package-debug: package-%: build-% - @cp $(OUTPUT_DIR)/package/*.wgt $(OUTPUT_DIR)/ - @if [ "$(abspath $(DEST))" != "$(abspath $(OUTPUT_DIR))" ]; then \ - mkdir -p $(DEST) && cp $(OUTPUT_DIR)/*.wgt $(DEST); \ - fi - - -package: package-release - -package-all: package-release package-debug - -install: build - @$(MAKE) -C $(BUILD_DIR) $(INSTALL_ARGS) install diff --git a/homescreen.pro b/homescreen.pro index 4f29853..db6ee41 100644 --- a/homescreen.pro +++ b/homescreen.pro @@ -16,8 +16,4 @@ TEMPLATE = subdirs load(configure) -SUBDIRS = \ - homescreen \ - package - -package.depends += homescreen +SUBDIRS = homescreen diff --git a/homescreen/docs/api-services-book.yml b/homescreen/docs/api-services-book.yml deleted file mode 100644 index 5a0d43a..0000000 --- a/homescreen/docs/api-services-book.yml +++ /dev/null @@ -1,12 +0,0 @@ -type: books -books: -- - id: homescreen - title: HomeScreen (old) - description: Homescreen documentation - keywords: - author: "TOYOTA MOTOR CORPORATION" - version: master - chapters: - - url: homescreen_api.md - name: HomeScreen API
\ No newline at end of file diff --git a/homescreen/docs/homescreen-book.yml b/homescreen/docs/homescreen-book.yml deleted file mode 100644 index acc740d..0000000 --- a/homescreen/docs/homescreen-book.yml +++ /dev/null @@ -1,12 +0,0 @@ -type: books -books: -- - id: homescreen - title: HomeScreen - description: HomeScreen documentation - keywords: - author: - version: master - chapters: - - url: index.md - name: Overview diff --git a/homescreen/docs/homescreen_api.md b/homescreen/docs/homescreen_api.md deleted file mode 100644 index 8f7b8f4..0000000 --- a/homescreen/docs/homescreen_api.md +++ /dev/null @@ -1,186 +0,0 @@ -# HomeScreen API
-The HomeScreen app provides an own interface for some special use cases concerning the surfaces and user inputs.
-
-The interface is implemented as D-Bus interface.
-This is the introspection, describing the interface:
-
-```
-<node>
- <interface name="org.agl.homescreen">
- <method name="hardKeyPressed">
- <arg name="key" type="i" direction="in"/>
- </method>
- <method name="getSurfaceStatus">
- <arg name="surfaceId" type="i" direction="in"/>
- <arg name="status" type="i" direction="out"/>
- </method>
- <method name="requestSurfaceIdToFullScreen">
- <arg name="surfaceId" type="i" direction="in"/>
- </method>
- <method name="getAllSurfacesOfProcess">
- <arg name="pid" type="i" direction="in"/>
- <arg name="surfaceIds" type="ai" direction="out"/>
- <annotation name="org.qtproject.QtDBus.QtTypeName.Out0" value="QList<int>"/>
- </method>
- <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>
- <method name="renderSurfaceToAreaAllowed">
- <arg name="surfaceId" type="i" direction="in"/>
- <arg name="layoutArea" type="i" direction="in"/>
- <arg name="allowed" type="b" direction="out"/>
- </method>
- <method name="renderSurfaceToArea">
- <arg name="surfaceId" type="i" direction="in"/>
- <arg name="layoutArea" type="i" direction="in"/>
- </method>
- </interface>
-</node>
-```
-
-These interface will change during further development, so check back frequently.
-
-## User Input Events API calls
-
-### hardKeyPressed
-
-Use hardKeyPressed to inject hard key press events into the HomeScreen app.
-This Interface call can be used by applications like the InputEventManager to inject hard keys into the HomeScreen application.
-
-#### Example
-
-if someone presses the Hard Key “NAV” on the target, this key may be injected using this interface to make the HomeScreen launch the navigation application.
-Right now, only a few keys are defined (in inputevent.hpp):
-
-```
-namespace InputEvent {
- typedef enum HardKey
- {
- HARDKEY_UNDEFINED,
- HARDKEY_NAV,
- HARDKEY_MEDIA
- } eHardKey;
-}
-```
-
-This will change in the future.
-
-![hardKeyPressed](pictures/api_hardKeyPressed.png)
-
-A “normal” application would not need to call this API.
-
-## Surface control API calls
-
-The normal use case when starting an application is:
-The user presses a hard key or uses the app launcher to start an app. The app is then started and is shown full screen.
-The org.agl.homescreen API provides some methods to get information about some status and some methods to show surfaces on the screen.
-
-### getSurfaceStatus
-
-A surface can be visible or invisible (please do not confuse “visible” and “visibility”). This function allows to request the current status.
-
-```
-<method name="getSurfaceStatus">
- <arg name="surfaceId" type="i" direction="in"/>
- <arg name="status" type="i" direction="out"/>
-</method>
-```
-
-Right now an application has to pull this information.
-This is not optimal and will change in the future. There are two options:
-
- - The homescreen API will provide a signal that is emitted every time the visible status of surfaces changes. This would be way more efficient, because it would save time and avoid a re-occurring API call. __UPDATE:__ There is a D-Bus signal implemented in this API
- - For Qt, there is already a patch available that provides this information as a base class property. See https://codereview.qt-project.org/#/c/176211/ This would be optimal for Qt widget applications. But not useful for other languages, e.g. Java. __UPDATE:__ This patch got reverted in AGL!
-
-#### Current implementation
-
-![getSurfaceStatus](pictures/api_getSurfaceStatus_1.png)
-
-#### Option 1
-
-![getSurfaceStatus](pictures/api_getSurfaceStatus_2.png)
-
-#### Option 2
-
-![getSurfaceStatus](pictures/api_getSurfaceStatus_3.png)
-
-### requestSurfaceIdToFullScreen
-
-This function will set the given surface to full screen.
-
-```
-<method name="requestSurfaceIdToFullScreen">
- <arg name="surfaceId" type="i" direction="in"/>
-</method>
-```
-
-It will hide all other surfaces.
-
-![requestSurfaceIdToFullScreen](pictures/api_requestSurfaceIdToFullScreen.png)
-
-### getAllSurfacesOfProcess
-
-This returns all surfaces that are created by the given process ID.
-
-```
-<method name="getAllSurfacesOfProcess">
- <arg name="pid" type="i" direction="in"/>
- <arg name="surfaceIds" type="ai" direction="out"/>
- <annotation name="org.qtproject.QtDBus.QtTypeName.Out0" value="QList<int>"/>
-</method>
-```
-
-A process can create more than one surface. By default, the surface with the lowest surface ID is shown on the screen. If an application wants to know all surfaces that were created by an application, this method will provide them.
-
-![getAllSurfacesOfProcess](pictures/api_getAllSurfacesOfProcess.png)
-
-### renderSurfaceToAreaAllowed
-
-Before calling renderSurfaceToArea, an application can request, if it is allowed to render the surface to this area. This makes sense for an application that would begin to allocate resources to render. But if it is not allowed to render the surface, the application could avoid allocating the resources.
-
-```
-<method name="renderSurfaceToAreaAllowed">
- <arg name="surfaceId" type="i" direction="in"/>
- <arg name="layoutArea" type="i" direction="in"/>
- <arg name="allowed" type="b" direction="out"/>
-</method>
-```
-
-The call will not affect the current setup, it will only request if it is allowed or not.
-
-![renderSurfaceToAreaAllowed](pictures/api_renderSurfaceToAreaAllowed.png)
-
-### renderSurfaceToArea
-
-By default, the HomeScreen application decides, where to render an applications surface. The concept of Layouts defines this. This API call can override the default behavior. An app can request to render a surface in a specific Layout Area.
-
-```
-<method name="renderSurfaceToArea">
- <arg name="surfaceId" type="i" direction="in"/>
- <arg name="layoutArea" type="i" direction="in"/>
-</method>
-```
-
-The surface that was previously rendered in this Layout are will be hidden.
-
-![renderSurfaceToArea](pictures/api_renderSurfaceToArea.png)
-
-The homescreen interface functionality is not fully implemented, but the API is available. For example using the libhomescreen.so.
-
-### surfaceVisibilityChanged
-
-Whenever the visibility property of a surface changes, this signal is emitted.
-
-```
-<signal name="surfaceVisibilityChanged">
- <arg name="surfaceId" type="i"/>
- <arg name="visible" type="b"/>
-</signal>
-```
-
-Visibility here means visible. The name of the signal is from the Weston surface property “visibility”.
-See here for reference: https://github.com/ntanibata/wayland-ivi-extension/blob/master/ivi-layermanagement-api/ilmCommon/include/ilm_types.h
-
-![surfaceVisibilityChanged](pictures/api_surfaceVisibilityChanged.png)
diff --git a/homescreen/docs/index.md b/homescreen/docs/index.md deleted file mode 100644 index 4322255..0000000 --- a/homescreen/docs/index.md +++ /dev/null @@ -1,31 +0,0 @@ -# Welcome to your AGL system! -When booting up an AGL system, the first thing that your eyes will spot is this: - -![AGL HomeScreen Application Launcher](pictures/homescreen_applauncher.png) - -**The AGL HomeScreen!** - -Intended to be used with touch presses, the reference HMI provides access to all pre-installed AGL demo applications as well as in the future access to user installed apps. The list of demo apps contains some automotive applications like HVAC-control, Navigation or Dashboard, as well as some infotainment apps. Radio, Multimedia, Phone... -This applications are already available and were presented at CES 2017. - -## Here are some screenshots of the pre-installed demo applications: - -## HVAC - -![AGL HVAC](pictures/hvac.png) - -## Phone - -![AGL Phone](pictures/phone.png) - -## Dashboard - -![AGL Dashboard](pictures/dashboard.png) - -## Settings - -![AGL Settings](pictures/settings.png) - -#### Note: -* All current demos (including HomeScreen) are optimized for landscape full HD resolution (1080x1920). - diff --git a/homescreen/docs/pictures/api_getAllSurfacesOfProcess.png b/homescreen/docs/pictures/api_getAllSurfacesOfProcess.png Binary files differdeleted file mode 100644 index 5c862d7..0000000 --- a/homescreen/docs/pictures/api_getAllSurfacesOfProcess.png +++ /dev/null diff --git a/homescreen/docs/pictures/api_getSurfaceStatus_1.png b/homescreen/docs/pictures/api_getSurfaceStatus_1.png Binary files differdeleted file mode 100644 index 1e18fcf..0000000 --- a/homescreen/docs/pictures/api_getSurfaceStatus_1.png +++ /dev/null diff --git a/homescreen/docs/pictures/api_getSurfaceStatus_2.png b/homescreen/docs/pictures/api_getSurfaceStatus_2.png Binary files differdeleted file mode 100644 index e66d708..0000000 --- a/homescreen/docs/pictures/api_getSurfaceStatus_2.png +++ /dev/null diff --git a/homescreen/docs/pictures/api_getSurfaceStatus_3.png b/homescreen/docs/pictures/api_getSurfaceStatus_3.png Binary files differdeleted file mode 100644 index 50a3b10..0000000 --- a/homescreen/docs/pictures/api_getSurfaceStatus_3.png +++ /dev/null diff --git a/homescreen/docs/pictures/api_hardKeyPressed.png b/homescreen/docs/pictures/api_hardKeyPressed.png Binary files differdeleted file mode 100644 index a8a3660..0000000 --- a/homescreen/docs/pictures/api_hardKeyPressed.png +++ /dev/null diff --git a/homescreen/docs/pictures/api_renderSurfaceToArea.png b/homescreen/docs/pictures/api_renderSurfaceToArea.png Binary files differdeleted file mode 100644 index a61fc2f..0000000 --- a/homescreen/docs/pictures/api_renderSurfaceToArea.png +++ /dev/null diff --git a/homescreen/docs/pictures/api_renderSurfaceToAreaAllowed.png b/homescreen/docs/pictures/api_renderSurfaceToAreaAllowed.png Binary files differdeleted file mode 100644 index 35dbbcf..0000000 --- a/homescreen/docs/pictures/api_renderSurfaceToAreaAllowed.png +++ /dev/null diff --git a/homescreen/docs/pictures/api_requestSurfaceIdToFullScreen.png b/homescreen/docs/pictures/api_requestSurfaceIdToFullScreen.png Binary files differdeleted file mode 100644 index 6d2f712..0000000 --- a/homescreen/docs/pictures/api_requestSurfaceIdToFullScreen.png +++ /dev/null diff --git a/homescreen/docs/pictures/api_surfaceVisibilityChanged.png b/homescreen/docs/pictures/api_surfaceVisibilityChanged.png Binary files differdeleted file mode 100644 index f519757..0000000 --- a/homescreen/docs/pictures/api_surfaceVisibilityChanged.png +++ /dev/null diff --git a/homescreen/docs/pictures/dashboard.png b/homescreen/docs/pictures/dashboard.png Binary files differdeleted file mode 100644 index 527386d..0000000 --- a/homescreen/docs/pictures/dashboard.png +++ /dev/null diff --git a/homescreen/docs/pictures/full/dashboard.png b/homescreen/docs/pictures/full/dashboard.png Binary files differdeleted file mode 100644 index e947734..0000000 --- a/homescreen/docs/pictures/full/dashboard.png +++ /dev/null diff --git a/homescreen/docs/pictures/full/homescreen_applauncher.png b/homescreen/docs/pictures/full/homescreen_applauncher.png Binary files differdeleted file mode 100644 index b61884a..0000000 --- a/homescreen/docs/pictures/full/homescreen_applauncher.png +++ /dev/null diff --git a/homescreen/docs/pictures/full/hvac.png b/homescreen/docs/pictures/full/hvac.png Binary files differdeleted file mode 100644 index 7e0399a..0000000 --- a/homescreen/docs/pictures/full/hvac.png +++ /dev/null diff --git a/homescreen/docs/pictures/full/phone.png b/homescreen/docs/pictures/full/phone.png Binary files differdeleted file mode 100644 index f4cc547..0000000 --- a/homescreen/docs/pictures/full/phone.png +++ /dev/null diff --git a/homescreen/docs/pictures/full/settings.png b/homescreen/docs/pictures/full/settings.png Binary files differdeleted file mode 100644 index a115ef4..0000000 --- a/homescreen/docs/pictures/full/settings.png +++ /dev/null diff --git a/homescreen/docs/pictures/homescreen_applauncher.png b/homescreen/docs/pictures/homescreen_applauncher.png Binary files differdeleted file mode 100644 index e168668..0000000 --- a/homescreen/docs/pictures/homescreen_applauncher.png +++ /dev/null diff --git a/homescreen/docs/pictures/hvac.png b/homescreen/docs/pictures/hvac.png Binary files differdeleted file mode 100644 index f9a6030..0000000 --- a/homescreen/docs/pictures/hvac.png +++ /dev/null diff --git a/homescreen/docs/pictures/phone.png b/homescreen/docs/pictures/phone.png Binary files differdeleted file mode 100644 index e087594..0000000 --- a/homescreen/docs/pictures/phone.png +++ /dev/null diff --git a/homescreen/docs/pictures/settings.png b/homescreen/docs/pictures/settings.png Binary files differdeleted file mode 100644 index c92d835..0000000 --- a/homescreen/docs/pictures/settings.png +++ /dev/null diff --git a/homescreen/homescreen.pro b/homescreen/homescreen.pro index 7e65d56..c5d3ac8 100644 --- a/homescreen/homescreen.pro +++ b/homescreen/homescreen.pro @@ -17,35 +17,51 @@ TEMPLATE = app TARGET = HomeScreen QT = qml quick websockets gui-private CONFIG += c++11 link_pkgconfig wayland-scanner -DESTDIR = $${OUT_PWD}/../package/root/bin -PKGCONFIG += qtappfw-weather qtappfw-network qtappfw-bt afb-helpers-qt wayland-client json-c +#DESTDIR = $${OUT_PWD}/../package/root/bin +DESTDIR = $${OUT_PWD} +#PKGCONFIG += qtappfw-weather qtappfw-network qtappfw-bt afb-helpers-qt wayland-client json-c +PKGCONFIG += wayland-client json-c -LIBS += -lhomescreen +#LIBS += -lhomescreen CONFIG(release, debug|release) { QMAKE_POST_LINK = $(STRIP) --strip-unneeded $(TARGET) } +#SOURCES += \ +# src/main.cpp \ +# src/statusbarmodel.cpp \ +# src/statusbarserver.cpp \ +# src/applicationlauncher.cpp \ +# src/mastervolume.cpp \ +# src/homescreenhandler.cpp \ +# src/shell.cpp \ +# src/aglsocketwrapper.cpp \ +# src/chromecontroller.cpp + SOURCES += \ src/main.cpp \ - src/statusbarmodel.cpp \ - src/statusbarserver.cpp \ src/applicationlauncher.cpp \ - src/mastervolume.cpp \ src/homescreenhandler.cpp \ src/shell.cpp \ src/aglsocketwrapper.cpp \ - src/chromecontroller.cpp + +#HEADERS += \ +# src/statusbarmodel.h \ +# src/statusbarserver.h \ +# src/applicationlauncher.h \ +# src/mastervolume.h \ +# src/homescreenhandler.h \ +# src/shell.h \ +# src/aglsocketwrapper.h \ +# src/chromecontroller.h \ +# src/constants.h HEADERS += \ - src/statusbarmodel.h \ - src/statusbarserver.h \ src/applicationlauncher.h \ - src/mastervolume.h \ src/homescreenhandler.h \ src/shell.h \ src/aglsocketwrapper.h \ - src/chromecontroller.h \ src/constants.h OTHER_FILES += \ diff --git a/homescreen/qml/MediaArea.qml b/homescreen/qml/MediaArea.qml index 88eaf1e..0f0efb2 100644 --- a/homescreen/qml/MediaArea.qml +++ b/homescreen/qml/MediaArea.qml @@ -25,13 +25,13 @@ StackView { initialItem: blank Component { - id: blank + id: blank MediaAreaBlank { // MouseArea { // anchors.fill: parent // onClicked: root.push(mouse.x < 540 ? music : radio) // } - } + } } Component { diff --git a/homescreen/qml/MediaAreaBlank.qml b/homescreen/qml/MediaAreaBlank.qml index c971f6e..cdaa1a0 100644 --- a/homescreen/qml/MediaAreaBlank.qml +++ b/homescreen/qml/MediaAreaBlank.qml @@ -18,8 +18,8 @@ import QtQuick 2.2 import QtQuick.Layouts 1.1 import QtQuick.Controls 2.0 -import AGL.Demo.Controls 1.0 -import MasterVolume 1.0 +//import AGL.Demo.Controls 1.0 +//import MasterVolume 1.0 Image { anchors.fill: parent @@ -55,13 +55,11 @@ Image { PropertyChanges { target: master_volume; opacity: 1.0 } PropertyChanges { target: slider; enabled: true } PropertyChanges { target: logo_image; opacity: 0.0 } - PropertyChanges { target: speech_chrome; visible: false } }, State { when: !displayVolume; PropertyChanges { target: master_volume; opacity: 0.0 } PropertyChanges { target: slider; enabled: false } PropertyChanges { target: logo_image; opacity: 1.0 } - PropertyChanges { target: speech_chrome; visible: speech_chrome.agentPresent } } ] @@ -69,13 +67,18 @@ Image { NumberAnimation { property: "opacity"; duration: 500} } - MasterVolume { - id: mv - objectName: "mv" - onVolumeChanged: slider.value = volume - Component.onCompleted: { - mv.open(bindingAddress); - } + //MasterVolume { + // id: mv + // objectName: "mv" + // onVolumeChanged: slider.value = volume + // Component.onCompleted: { + // mv.open(bindingAddress); + // } + //} + + Item { + id: mv + property double volume: 0 } Item { @@ -123,11 +126,11 @@ Image { } } - SpeechChrome { - id: speech_chrome - anchors.left: parent.left - anchors.right: parent.right - anchors.bottom: parent.bottom - height: parent.height - } + //SpeechChrome { + // id: speech_chrome + // anchors.left: parent.left + // anchors.right: parent.right + // anchors.bottom: parent.bottom + // height: parent.height + //} } diff --git a/homescreen/qml/StatusArea.qml b/homescreen/qml/StatusArea.qml index 4a8fbc0..44ca5c7 100644 --- a/homescreen/qml/StatusArea.qml +++ b/homescreen/qml/StatusArea.qml @@ -18,7 +18,7 @@ import QtQuick 2.2 import QtQuick.Layouts 1.1 -import HomeScreen 1.0 +//import HomeScreen 1.0 Item { id: root diff --git a/homescreen/qml/TopArea.qml b/homescreen/qml/TopArea.qml index 19bed91..c5f1759 100644 --- a/homescreen/qml/TopArea.qml +++ b/homescreen/qml/TopArea.qml @@ -34,12 +34,12 @@ Image { Layout.fillHeight: true Layout.preferredWidth: 775 } - StatusArea { - id: statusArea - Layout.fillWidth: true - Layout.fillHeight: true - Layout.preferredWidth: 291 - } + //StatusArea { + // id: statusArea + // Layout.fillWidth: true + // Layout.fillHeight: true + // Layout.preferredWidth: 291 + //} } Timer { diff --git a/homescreen/src/applicationlauncher.cpp b/homescreen/src/applicationlauncher.cpp index 6bb0729..48560e6 100644 --- a/homescreen/src/applicationlauncher.cpp +++ b/homescreen/src/applicationlauncher.cpp @@ -20,8 +20,6 @@ #include "applicationlauncher.h" -#include "hmi-debug.h" - ApplicationLauncher::ApplicationLauncher(QObject *parent) : QObject(parent) , m_launching(false) diff --git a/homescreen/src/hmi-debug.h b/homescreen/src/hmi-debug.h deleted file mode 100644 index 47ae1f7..0000000 --- a/homescreen/src/hmi-debug.h +++ /dev/null @@ -1,79 +0,0 @@ -/* - * Copyright (c) 2017 TOYOTA MOTOR CORPORATION - * - * 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. - */ - -#ifndef __HMI_DEBUG_H__ -#define __HMI_DEBUG_H__ - -#include <time.h> -#include <stdio.h> -#include <stdarg.h> -#include <string.h> -#include <stdlib.h> - -enum LOG_LEVEL{ - LOG_LEVEL_NONE = 0, - LOG_LEVEL_ERROR, - LOG_LEVEL_WARNING, - LOG_LEVEL_NOTICE, - LOG_LEVEL_INFO, - LOG_LEVEL_DEBUG, - LOG_LEVEL_MAX = LOG_LEVEL_DEBUG -}; - -#define __FILENAME__ (strrchr(__FILE__, '/') ? strrchr(__FILE__, '/') + 1 : __FILE__) - -#define HMI_ERROR(prefix, args,...) _HMI_LOG(LOG_LEVEL_ERROR, __FILENAME__, __FUNCTION__, __LINE__, prefix, args, ##__VA_ARGS__) -#define HMI_WARNING(prefix, args,...) _HMI_LOG(LOG_LEVEL_WARNING, __FILENAME__, __FUNCTION__,__LINE__, prefix, args,##__VA_ARGS__) -#define HMI_NOTICE(prefix, args,...) _HMI_LOG(LOG_LEVEL_NOTICE, __FILENAME__, __FUNCTION__,__LINE__, prefix, args,##__VA_ARGS__) -#define HMI_INFO(prefix, args,...) _HMI_LOG(LOG_LEVEL_INFO, __FILENAME__, __FUNCTION__,__LINE__, prefix, args,##__VA_ARGS__) -#define HMI_DEBUG(prefix, args,...) _HMI_LOG(LOG_LEVEL_DEBUG, __FILENAME__, __FUNCTION__,__LINE__, prefix, args,##__VA_ARGS__) - -static char ERROR_FLAG[6][20] = {"NONE", "ERROR", "WARNING", "NOTICE", "INFO", "DEBUG"}; - -static void _HMI_LOG(enum LOG_LEVEL level, const char* file, const char* func, const int line, const char* prefix, const char* log, ...) -{ - char *message; - struct timespec tp; - uint32_t time; - va_list args; - int ret; - const int log_level = (getenv("USE_HMI_DEBUG") == NULL) ? LOG_LEVEL_ERROR : atoi(getenv("USE_HMI_DEBUG")); - - if(log_level < level) { - return; - } - - va_start(args, log); - if (vasprintf(&message, log, args) < 0) { - fprintf(stderr, "Warning: message is NULL\n"); - vfprintf(stderr, log, args); - fprintf(stderr, "\n"); - message = NULL; - } - - clock_gettime(CLOCK_REALTIME, &tp); - time = (tp.tv_sec * 1000000L) + (tp.tv_nsec / 1000); - if (tp.tv_nsec % 1000 >= 500) { - time++; - } - - fprintf(stderr, "[%10.3f] [%s %s] [%s, %s(), Line:%d] >>> %s \n", time / 1000.0, prefix, ERROR_FLAG[level], file, func, line, message); - - va_end(args); - free(message); -} - -#endif //__HMI_DEBUG_H__ diff --git a/homescreen/src/homescreenhandler.cpp b/homescreen/src/homescreenhandler.cpp index e31f122..6d7941e 100644 --- a/homescreen/src/homescreenhandler.cpp +++ b/homescreen/src/homescreenhandler.cpp @@ -18,71 +18,24 @@ #include <QFileInfo> #include "homescreenhandler.h" #include <functional> -#include "hmi-debug.h" #include <qpa/qplatformnativeinterface.h> void* HomescreenHandler::myThis = 0; HomescreenHandler::HomescreenHandler(Shell *_aglShell, ApplicationLauncher *launcher, QObject *parent) : - QObject(parent), - aglShell(_aglShell) + QObject(parent), + aglShell(_aglShell) { - mp_launcher = launcher; + mp_launcher = launcher; } HomescreenHandler::~HomescreenHandler() { - if (mp_hs != NULL) { - delete mp_hs; - } } -void HomescreenHandler::init(int port, const char *token) +void HomescreenHandler::init() { - mp_hs = new LibHomeScreen(); - mp_hs->init(port, token); - - myThis = this; - - - mp_hs->registerCallback(nullptr, HomescreenHandler::onRep_static); - - mp_hs->set_event_handler(LibHomeScreen::Event_OnScreenMessage, [this](json_object *object){ - const char *display_message = json_object_get_string( - json_object_object_get(object, "display_message")); - HMI_DEBUG("HomeScreen","set_event_handler Event_OnScreenMessage display_message = %s", display_message); - }); - - // should be handled in the top panel - mp_hs->set_event_handler(LibHomeScreen::Event_ShowNotification,[this](json_object *object){ - json_object *p_obj = json_object_object_get(object, "parameter"); - const char *icon = json_object_get_string( - json_object_object_get(p_obj, "icon")); - const char *text = json_object_get_string( - json_object_object_get(p_obj, "text")); - const char *app_id = json_object_get_string( - json_object_object_get(p_obj, "caller")); - HMI_DEBUG("HomeScreen","Event_ShowNotification icon=%s, text=%s, caller=%s", icon, text, app_id); - QFileInfo icon_file(icon); - QString icon_path; - if (icon_file.isFile() && icon_file.exists()) { - icon_path = QString(QLatin1String(icon)); - } else { - icon_path = "./images/Utility_Logo_Grey-01.svg"; - } - - emit showNotification(QString(QLatin1String(app_id)), icon_path, QString(QLatin1String(text))); - }); - - // should be handled in the bottom panel - mp_hs->set_event_handler(LibHomeScreen::Event_ShowInformation,[this](json_object *object){ - json_object *p_obj = json_object_object_get(object, "parameter"); - const char *info = json_object_get_string( - json_object_object_get(p_obj, "info")); - - emit showInformation(QString(QLatin1String(info))); - }); } static struct wl_output * @@ -94,19 +47,11 @@ getWlOutput(QPlatformNativeInterface *native, QScreen *screen) void HomescreenHandler::tapShortcut(QString application_id) { - HMI_DEBUG("HomeScreen","tapShortcut %s", application_id.toStdString().c_str()); - - struct json_object* j_json = json_object_new_object(); - struct json_object* value; - struct agl_shell *agl_shell = aglShell->shell.get(); QPlatformNativeInterface *native = qApp->platformNativeInterface(); struct wl_output *output = getWlOutput(native, qApp->screens().first()); - value = json_object_new_string("normal.full"); - json_object_object_add(j_json, "area", value); - - mp_hs->showWindow(application_id.toStdString().c_str(), j_json); + // start the application here, or do in the WM! // this works (and it is redundant the first time), due to the default // policy engine installed which actives the application, when starting @@ -114,6 +59,7 @@ void HomescreenHandler::tapShortcut(QString application_id) // require calling 'agl_shell_activate_app' agl_shell_activate_app(agl_shell, application_id.toStdString().c_str(), output); + // keep this for having animations working if (mp_launcher) { mp_launcher->setCurrent(application_id); } @@ -121,30 +67,22 @@ void HomescreenHandler::tapShortcut(QString application_id) void HomescreenHandler::onRep_static(struct json_object* reply_contents) { - static_cast<HomescreenHandler*>(HomescreenHandler::myThis)->onRep(reply_contents); + (void) reply_contents; } void HomescreenHandler::onEv_static(const string& event, struct json_object* event_contents) { - static_cast<HomescreenHandler*>(HomescreenHandler::myThis)->onEv(event, event_contents); + (void) event; + (void) event_contents; } void HomescreenHandler::onRep(struct json_object* reply_contents) { - const char* str = json_object_to_json_string(reply_contents); - HMI_DEBUG("HomeScreen","HomeScreen onReply %s", str); + (void) reply_contents; } void HomescreenHandler::onEv(const string& event, struct json_object* event_contents) { - const char* str = json_object_to_json_string(event_contents); - HMI_DEBUG("HomeScreen","HomeScreen onEv %s, contents: %s", event.c_str(), str); - - if (event.compare("homescreen/on_screen_message") == 0) { - struct json_object *json_data = json_object_object_get(event_contents, "data"); - struct json_object *json_display_message = json_object_object_get(json_data, "display_message"); - const char* display_message = json_object_get_string(json_display_message); - - HMI_DEBUG("HomeScreen","display_message = %s", display_message); - } + (void) event; + (void) event_contents; } diff --git a/homescreen/src/homescreenhandler.h b/homescreen/src/homescreenhandler.h index 790c4fd..9cdccba 100644 --- a/homescreen/src/homescreenhandler.h +++ b/homescreen/src/homescreenhandler.h @@ -19,7 +19,6 @@ #include <QObject> -#include <libhomescreen.hpp> #include "applicationlauncher.h" #include "shell.h" @@ -34,7 +33,7 @@ public: explicit HomescreenHandler(Shell *aglShell, ApplicationLauncher *launcher = 0, QObject *parent = 0); ~HomescreenHandler(); - void init(int port, const char* token); + void init(); Q_INVOKABLE void tapShortcut(QString application_id); @@ -49,7 +48,6 @@ signals: void showNotification(QString application_id, QString icon_path, QString text); void showInformation(QString info); private: - LibHomeScreen *mp_hs; ApplicationLauncher *mp_launcher; Shell *aglShell; }; diff --git a/homescreen/src/main.cpp b/homescreen/src/main.cpp index 376644f..98f6c93 100644 --- a/homescreen/src/main.cpp +++ b/homescreen/src/main.cpp @@ -26,14 +26,13 @@ #include <QQuickWindow> #include <QTimer> -#include <weather.h> -#include <bluetooth.h> +//#include <weather.h> +//#include <bluetooth.h> #include "applicationlauncher.h" -#include "statusbarmodel.h" -#include "mastervolume.h" +//#include "statusbarmodel.h" +//#include "mastervolume.h" #include "homescreenhandler.h" -#include "hmi-debug.h" -#include "chromecontroller.h" +//#include "chromecontroller.h" #include <qpa/qplatformnativeinterface.h> #include <wayland-client.h> @@ -137,7 +136,7 @@ find_screen(const char *screen_name) static void load_agl_shell_app(QPlatformNativeInterface *native, QQmlApplicationEngine *engine, - struct agl_shell *agl_shell, QUrl &bindingAddress, + struct agl_shell *agl_shell, const char *screen_name, bool is_demo) { struct wl_surface *bg, *top, *bottom; @@ -184,11 +183,11 @@ load_agl_shell_app(QPlatformNativeInterface *native, /* engine.rootObjects() works only if we had a load() */ - StatusBarModel *statusBar = qobj_top->findChild<StatusBarModel *>("statusBar"); - if (statusBar) { - qDebug() << "got statusBar objectname, doing init()"; - statusBar->init(bindingAddress, engine->rootContext()); - } + //StatusBarModel *statusBar = qobj_top->findChild<StatusBarModel *>("statusBar"); + //if (statusBar) { + // qDebug() << "got statusBar objectname, doing init()"; + // statusBar->init(bindingAddress, engine->rootContext()); + //} agl_shell_set_panel(agl_shell, top, output, AGL_SHELL_EDGE_TOP); agl_shell_set_panel(agl_shell, bottom, output, AGL_SHELL_EDGE_BOTTOM); @@ -205,92 +204,65 @@ load_agl_shell_app(QPlatformNativeInterface *native, int main(int argc, char *argv[]) { - setenv("QT_QPA_PLATFORM", "wayland", 1); - QGuiApplication a(argc, argv); - const char *screen_name; - bool is_demo_val = false; - - QPlatformNativeInterface *native = qApp->platformNativeInterface(); - struct agl_shell *agl_shell = nullptr; - screen_name = getenv("HOMESCREEN_START_SCREEN"); - - const char *is_demo = getenv("HOMESCREEN_DEMO_CI"); - if (is_demo && strcmp(is_demo, "1") == 0) - is_demo_val = true; - - QCoreApplication::setOrganizationDomain("LinuxFoundation"); - QCoreApplication::setOrganizationName("AutomotiveGradeLinux"); - QCoreApplication::setApplicationName("HomeScreen"); - QCoreApplication::setApplicationVersion("0.7.0"); - /* we need to have an app_id */ - a.setDesktopFileName("homescreen"); - - QCommandLineParser parser; - parser.addPositionalArgument("port", a.translate("main", "port for binding")); - parser.addPositionalArgument("secret", a.translate("main", "secret for binding")); - parser.addHelpOption(); - parser.addVersionOption(); - parser.process(a); - QStringList positionalArguments = parser.positionalArguments(); - - int port = 1700; - QString token = "wm"; - QString graphic_role = "homescreen"; // defined in layers.json in Window Manager - - if (positionalArguments.length() == 2) { - port = positionalArguments.takeFirst().toInt(); - token = positionalArguments.takeFirst(); - } - - HMI_DEBUG("HomeScreen","port = %d, token = %s", port, token.toStdString().c_str()); - - agl_shell = register_agl_shell(native); - if (!agl_shell) { - fprintf(stderr, "agl_shell extension is not advertised. " - "Are you sure that agl-compositor is running?\n"); - exit(EXIT_FAILURE); - } - - std::shared_ptr<struct agl_shell> shell{agl_shell, agl_shell_destroy}; - Shell *aglShell = new Shell(shell, &a); - - // import C++ class to QML - qmlRegisterType<StatusBarModel>("HomeScreen", 1, 0, "StatusBarModel"); - qmlRegisterType<MasterVolume>("MasterVolume", 1, 0, "MasterVolume"); - qmlRegisterUncreatableType<ChromeController>("SpeechChrome", 1, 0, "SpeechChromeController", - QLatin1String("SpeechChromeController is uncreatable.")); - - ApplicationLauncher *launcher = new ApplicationLauncher(); - launcher->setCurrent(QStringLiteral("launcher")); - HomescreenHandler* homescreenHandler = new HomescreenHandler(aglShell, launcher); - homescreenHandler->init(port, token.toStdString().c_str()); - - QUrl bindingAddress; - bindingAddress.setScheme(QStringLiteral("ws")); - bindingAddress.setHost(QStringLiteral("localhost")); - bindingAddress.setPort(port); - bindingAddress.setPath(QStringLiteral("/api")); - - QUrlQuery query; - query.addQueryItem(QStringLiteral("token"), token); - bindingAddress.setQuery(query); - - QQmlApplicationEngine engine; - QQmlContext *context = engine.rootContext(); - context->setContextProperty("bindingAddress", bindingAddress); - - context->setContextProperty("homescreenHandler", homescreenHandler); - context->setContextProperty("launcher", launcher); - context->setContextProperty("weather", new Weather(bindingAddress)); - context->setContextProperty("bluetooth", new Bluetooth(bindingAddress, context)); - context->setContextProperty("speechChromeController", new ChromeController(bindingAddress, &engine)); - // we add it here even if we don't use it - context->setContextProperty("shell", aglShell); - - /* instead of loading main.qml we load one-by-one each of the QMLs, - * divided now between several surfaces: panels, background. - */ - load_agl_shell_app(native, &engine, agl_shell, bindingAddress, screen_name, is_demo_val); - - return a.exec(); + // keep this as we're not going not going to have the appfw + setenv("QT_QPA_PLATFORM", "wayland", 1); + + QGuiApplication a(argc, argv); + const char *screen_name; + bool is_demo_val = false; + + QPlatformNativeInterface *native = qApp->platformNativeInterface(); + struct agl_shell *agl_shell = nullptr; + screen_name = getenv("HOMESCREEN_START_SCREEN"); + + // could be removed only for CI + const char *is_demo = getenv("HOMESCREEN_DEMO_CI"); + if (is_demo && strcmp(is_demo, "1") == 0) + is_demo_val = true; + + QCoreApplication::setOrganizationDomain("LinuxFoundation"); + QCoreApplication::setOrganizationName("AutomotiveGradeLinux"); + QCoreApplication::setApplicationName("HomeScreen"); + QCoreApplication::setApplicationVersion("0.7.0"); + + // we need to have an app_id + a.setDesktopFileName("homescreen"); + + agl_shell = register_agl_shell(native); + if (!agl_shell) { + fprintf(stderr, "agl_shell extension is not advertised. " + "Are you sure that agl-compositor is running?\n"); + exit(EXIT_FAILURE); + } + + std::shared_ptr<struct agl_shell> shell{agl_shell, agl_shell_destroy}; + Shell *aglShell = new Shell(shell, &a); + + // import C++ class to QML + //qmlRegisterType<StatusBarModel>("HomeScreen", 1, 0, "StatusBarModel"); + //qmlRegisterType<MasterVolume>("MasterVolume", 1, 0, "MasterVolume"); + //qmlRegisterUncreatableType<ChromeController>("SpeechChrome", 1, 0, "SpeechChromeController", QLatin1String("SpeechChromeController is uncreatable.")); + + ApplicationLauncher *launcher = new ApplicationLauncher(); + launcher->setCurrent(QStringLiteral("launcher")); + HomescreenHandler* homescreenHandler = new HomescreenHandler(aglShell, launcher); + homescreenHandler->init(); + + QQmlApplicationEngine engine; + QQmlContext *context = engine.rootContext(); + + context->setContextProperty("homescreenHandler", homescreenHandler); + context->setContextProperty("launcher", launcher); + //context->setContextProperty("weather", new Weather(bindingAddress)); + //context->setContextProperty("bluetooth", new Bluetooth(bindingAddress, context)); + //context->setContextProperty("speechChromeController", new ChromeController(bindingAddress, &engine)); + + // we add it here even if we don't use it + context->setContextProperty("shell", aglShell); + + /* instead of loading main.qml we load one-by-one each of the QMLs, + * divided now between several surfaces: panels, background. */ + load_agl_shell_app(native, &engine, agl_shell, screen_name, is_demo_val); + + return a.exec(); } diff --git a/package/config.xml b/package/config.xml deleted file mode 100644 index 0586a12..0000000 --- a/package/config.xml +++ /dev/null @@ -1,22 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<widget xmlns="http://www.w3.org/ns/widgets" id="homescreen" version="0.1"> - <name>homescreen</name> - <icon src="icon.svg"/> - <content src="bin/HomeScreen" type="application/vnd.agl.native"/> - <description>This is a demo application for homescreen</description> - <author>TOYOTA</author> - <license>APL 2.0</license> - <feature name="urn:AGL:widget:required-api"> - <param name="homescreen" value="ws" /> - <param name="network-manager" value="ws" /> - <param name="weather" value="ws" /> - <param name="Bluetooth-Manager" value="ws" /> - <param name="audiomixer" value="ws" /> - <param name="vshl-core" value="ws" /> - </feature> - <feature name="urn:AGL:widget:required-permission"> - <param name="urn:AGL:permission::public:no-htdocs" value="required" /> - <param name="urn:AGL:permission::system:run-by-default" value="required" /> - <param name="urn:AGL:permission::public:display" value="required" /> - </feature> -</widget> diff --git a/package/icon.svg b/package/icon.svg deleted file mode 100644 index 91661a7..0000000 --- a/package/icon.svg +++ /dev/null @@ -1,279 +0,0 @@ -<?xml version="1.0" encoding="UTF-8" standalone="no"?> -<!-- Generator: Adobe Illustrator 21.0.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) --> - -<svg - xmlns:i="&ns_ai;" - xmlns:dc="http://purl.org/dc/elements/1.1/" - xmlns:cc="http://creativecommons.org/ns#" - xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" - xmlns:svg="http://www.w3.org/2000/svg" - xmlns="http://www.w3.org/2000/svg" - xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" - xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" - version="1.1" - x="0px" - y="0px" - viewBox="0 0 320 320" - style="enable-background:new 0 0 320 320;" - xml:space="preserve" - id="svg2" - inkscape:version="0.91 r13725" - sodipodi:docname="icon.svg"><metadata - id="metadata1292"><rdf:RDF><cc:Work - rdf:about=""><dc:format>image/svg+xml</dc:format><dc:type - rdf:resource="http://purl.org/dc/dcmitype/StillImage" /></cc:Work></rdf:RDF></metadata><defs - id="defs1290" /><sodipodi:namedview - pagecolor="#ffffff" - bordercolor="#666666" - borderopacity="1" - objecttolerance="10" - gridtolerance="10" - guidetolerance="10" - inkscape:pageopacity="0" - inkscape:pageshadow="2" - inkscape:window-width="2560" - inkscape:window-height="1464" - id="namedview1288" - showgrid="false" - inkscape:zoom="0.7375" - inkscape:cx="-572.20339" - inkscape:cy="160" - inkscape:window-x="0" - inkscape:window-y="0" - inkscape:window-maximized="1" - inkscape:current-layer="svg2" /><style - type="text/css" - id="style4"> - .st0{display:none;} - .st1{display:inline;} - .st2{opacity:0.4;fill:url(#SVGID_1_);} - .st3{fill:url(#SVGID_2_);} - .st4{fill:#FFFFFF;} - .st5{font-family:'Roboto-Regular';} - .st6{font-size:25px;} - .st7{letter-spacing:6;} - .st8{fill:url(#SVGID_3_);} - .st9{fill:url(#SVGID_4_);} - .st10{fill:url(#SVGID_5_);} - .st11{fill:url(#SVGID_6_);} - .st12{fill:url(#SVGID_7_);} - .st13{fill:url(#SVGID_8_);} - .st14{fill:url(#SVGID_9_);} - .st15{fill:url(#SVGID_10_);} - .st16{fill:url(#SVGID_11_);} - .st17{fill:url(#SVGID_12_);} - .st18{fill:url(#SVGID_13_);} - .st19{fill:url(#SVGID_14_);} - .st20{fill:url(#SVGID_15_);} - .st21{fill:url(#SVGID_16_);} - .st22{fill:url(#SVGID_17_);} - .st23{fill:url(#SVGID_18_);} - .st24{opacity:0.29;} - .st25{fill:url(#SVGID_19_);} - .st26{fill:url(#SVGID_20_);} - .st27{fill:url(#SVGID_21_);} - .st28{fill:url(#SVGID_22_);} - .st29{fill:url(#SVGID_23_);} - .st30{fill:url(#SVGID_24_);} - .st31{fill:url(#SVGID_25_);} - .st32{fill:url(#SVGID_26_);} - .st33{fill:url(#SVGID_27_);} - .st34{fill:url(#SVGID_28_);} - .st35{fill:url(#SVGID_29_);} - .st36{fill:url(#SVGID_30_);} - .st37{fill:url(#SVGID_31_);} - .st38{fill:url(#SVGID_32_);} - .st39{fill:url(#SVGID_33_);} - .st40{fill:url(#SVGID_34_);} - .st41{fill:url(#SVGID_35_);} - .st42{fill:url(#SVGID_36_);} - .st43{opacity:0.4;fill:url(#SVGID_37_);} - .st44{fill:url(#SVGID_38_);} - .st45{fill:url(#SVGID_39_);} - .st46{fill:url(#SVGID_40_);} - .st47{fill:url(#SVGID_41_);} - .st48{fill:url(#SVGID_42_);} - .st49{fill:url(#SVGID_43_);} - .st50{fill:url(#SVGID_44_);} - .st51{display:inline;opacity:0.29;} - .st52{display:inline;fill:url(#SVGID_45_);} - .st53{display:inline;fill:url(#SVGID_46_);} - .st54{display:inline;fill:#FFFFFF;} - .st55{display:inline;fill:url(#SVGID_47_);} - .st56{display:inline;fill:url(#SVGID_48_);} - .st57{display:inline;fill:url(#SVGID_49_);} - .st58{display:inline;fill:url(#SVGID_50_);} - .st59{display:inline;fill:url(#SVGID_51_);} - .st60{display:inline;fill:url(#SVGID_52_);} - .st61{opacity:0.4;fill:url(#SVGID_53_);} - .st62{fill:url(#SVGID_54_);} - .st63{fill:url(#SVGID_55_);} - .st64{fill:url(#SVGID_56_);} - .st65{fill:url(#SVGID_57_);} - .st66{fill:url(#SVGID_58_);} - .st67{opacity:0.4;fill:url(#SVGID_59_);} - .st68{fill:url(#SVGID_60_);} - .st69{fill:url(#SVGID_61_);} - .st70{fill:url(#SVGID_62_);} - .st71{fill:url(#SVGID_63_);} - .st72{fill:url(#SVGID_64_);} - .st73{fill:url(#SVGID_65_);} - .st74{fill:url(#SVGID_66_);} - .st75{fill:url(#SVGID_67_);} - .st76{fill:url(#SVGID_68_);} - .st77{fill:url(#SVGID_69_);} - .st78{fill:url(#SVGID_70_);} - .st79{fill:url(#SVGID_71_);} - .st80{fill:url(#SVGID_72_);} - .st81{fill:url(#SVGID_73_);} - .st82{fill:url(#SVGID_74_);} - .st83{fill:url(#SVGID_75_);} - .st84{fill:url(#SVGID_76_);} - .st85{fill:url(#SVGID_77_);} - .st86{fill:url(#SVGID_78_);} - .st87{fill:url(#SVGID_79_);} - .st88{fill:url(#SVGID_80_);} - .st89{fill:url(#SVGID_81_);} - .st90{fill:url(#SVGID_82_);} - .st91{fill:url(#SVGID_83_);} - .st92{fill:url(#SVGID_84_);} - .st93{fill:url(#SVGID_85_);} - .st94{fill:url(#SVGID_86_);} - .st95{opacity:0.4;fill:url(#SVGID_87_);} - .st96{fill:url(#SVGID_88_);} - .st97{fill:url(#SVGID_89_);} - .st98{fill:url(#SVGID_90_);} - .st99{fill:url(#SVGID_91_);} - .st100{fill:url(#SVGID_92_);} - .st101{fill:url(#SVGID_93_);} - .st102{fill:url(#SVGID_94_);} - .st103{opacity:0.4;fill:url(#SVGID_95_);} - .st104{fill:url(#SVGID_96_);} - .st105{fill:url(#SVGID_97_);} - .st106{fill:url(#SVGID_98_);} - .st107{fill:url(#SVGID_99_);} - .st108{fill:url(#SVGID_100_);} - .st109{fill:url(#SVGID_101_);} - .st110{display:inline;fill:url(#SVGID_102_);} - .st111{display:inline;fill:url(#SVGID_103_);} - .st112{fill:url(#SVGID_104_);} - .st113{fill:url(#SVGID_105_);} - .st114{fill:url(#SVGID_106_);} - .st115{fill:url(#SVGID_107_);} - .st116{fill:url(#SVGID_108_);} - .st117{opacity:0.4;fill:url(#SVGID_109_);} - .st118{fill:url(#SVGID_110_);} - .st119{fill:url(#SVGID_111_);} - .st120{fill:url(#SVGID_112_);} - .st121{fill:url(#SVGID_113_);} - .st122{fill:url(#SVGID_114_);} - .st123{opacity:0.4;fill:url(#SVGID_115_);} - .st124{fill:url(#SVGID_116_);} - .st125{fill:url(#SVGID_117_);} - .st126{fill:url(#SVGID_118_);} - .st127{display:inline;fill:url(#SVGID_119_);} - .st128{display:inline;fill:url(#SVGID_120_);} - .st129{fill:url(#SVGID_121_);} - .st130{fill:url(#SVGID_122_);} -</style><switch - id="switch6"><g - i:extraneous="self" - id="g8"><g - id="Multimedia_Inactive_copy"><circle - class="st24" - cx="159.7" - cy="133.4" - r="101.9" - id="circle884" /><linearGradient - id="SVGID_91_" - gradientUnits="userSpaceOnUse" - x1="115.9317" - y1="254.1836" - x2="256.3852" - y2="-133.5267"><stop - offset="0" - style="stop-color:#8BC53F" - id="stop887" /><stop - offset="2.015080e-02" - style="stop-color:#7CCB56;stop-opacity:0.9678" - id="stop889" /><stop - offset="6.089833e-02" - style="stop-color:#62D67D;stop-opacity:0.9028" - id="stop891" /><stop - offset="0.1057" - style="stop-color:#4BDFA0;stop-opacity:0.8312" - id="stop893" /><stop - offset="0.1543" - style="stop-color:#38E7BE;stop-opacity:0.7537" - id="stop895" /><stop - offset="0.2077" - style="stop-color:#28EED6;stop-opacity:0.6684" - id="stop897" /><stop - offset="0.2681" - style="stop-color:#1CF3E8;stop-opacity:0.572" - id="stop899" /><stop - offset="0.3394" - style="stop-color:#13F6F5;stop-opacity:0.4581" - id="stop901" /><stop - offset="0.4323" - style="stop-color:#0EF8FD;stop-opacity:0.3098" - id="stop903" /><stop - offset="0.6264" - style="stop-color:#0DF9FF;stop-opacity:0" - id="stop905" /></linearGradient><circle - class="st99" - cx="159.7" - cy="133.4" - r="101.9" - id="circle907" /><linearGradient - id="SVGID_92_" - gradientUnits="userSpaceOnUse" - x1="4.0481" - y1="287.9492" - x2="320.4859" - y2="-15.4029" - gradientTransform="matrix(1 5.464556e-03 -5.464556e-03 1 -2.0192 -3.0212)"><stop - offset="0" - style="stop-color:#59FF7F" - id="stop910" /><stop - offset="1" - style="stop-color:#6BFBFF" - id="stop912" /></linearGradient><path - class="st100" - d="M160,238.8c-0.2,0-0.4,0-0.6,0c-58-0.3-104.9-47.7-104.6-105.7C55.2,75.3,102.3,28.5,160,28.5 c0.2,0,0.4,0,0.6,0c58,0.3,104.9,47.7,104.6,105.7l0,0C264.8,192,217.7,238.8,160,238.8z M160,32.2 c-55.7,0-101.2,45.2-101.5,100.9c-0.3,55.9,45,101.7,100.9,102c0.2,0,0.4,0,0.6,0c55.7,0,101.2-45.2,101.5-100.9 c0.3-55.9-45-101.7-100.9-102C160.4,32.2,160.2,32.2,160,32.2z" - id="path914" /><g - id="g916"><text - transform="matrix(1 0 0 1 53.5841 284.7119)" - class="st4 st5 st6 st7" - id="text918">MULTIMEDIA</text> -<linearGradient - id="SVGID_93_" - gradientUnits="userSpaceOnUse" - x1="140.5445" - y1="202.2363" - x2="186.8444" - y2="68.7049"><stop - offset="0" - style="stop-color:#59FF7F" - id="stop921" /><stop - offset="1" - style="stop-color:#6BFBFF" - id="stop923" /></linearGradient><path - class="st101" - d="M114.5,190.9c-6.4,0-12-2.6-14.8-7.5c-2.9-4.9-5.4-14.5,9.6-23.2c4.8-2.8,17.1-3.9,20.8-4l0.1,3.6 c-4.6,0.1-15.5,1.4-19.1,3.5c-9.4,5.4-12.1,11.5-8.3,18.3c3.8,6.6,14.6,7.6,24,2.2c6.6-3.8,10.6-10.5,10.7-17.9l-0.1-0.7V95.4 l71.9-14.2l0.1,71.3c0,6.7-3.3,16.4-12.5,21.8c-11.1,6.4-24.1,4.8-28.9-3.5c-2.9-4.9-5.4-14.5,9.6-23.2 c4.4-2.5,14.4-3.8,18.8-3.9l0.1,3.6c-4.2,0.1-13.5,1.4-17.1,3.5c-6.4,3.7-13.1,9.9-8.3,18.3c3.8,6.6,14.6,7.6,24,2.2 c7.9-4.5,10.7-12.8,10.7-18.5l-0.1-0.8V85.6l-64.7,12.7v66.8l0.1,0.7c0,8.7-4.7,16.6-12.5,21.1 C123.9,189.6,119,190.9,114.5,190.9z" - id="path925" /><linearGradient - id="SVGID_94_" - gradientUnits="userSpaceOnUse" - x1="145.3286" - y1="203.8951" - x2="191.6285" - y2="70.3637"><stop - offset="0" - style="stop-color:#59FF7F" - id="stop928" /><stop - offset="1" - style="stop-color:#6BFBFF" - id="stop930" /></linearGradient><polygon - class="st102" - points="155.6,123.3 154.8,119.8 195.5,110.2 196.3,113.7 " - id="polygon932" /></g></g></g></switch></svg>
\ No newline at end of file diff --git a/package/package.pro b/package/package.pro deleted file mode 100644 index 1035088..0000000 --- a/package/package.pro +++ /dev/null @@ -1,27 +0,0 @@ -DISTFILES = icon.svg config.xml - -copy_icon.target = $$OUT_PWD/root/icon.svg -copy_icon.depends = $$_PRO_FILE_PWD_/icon.svg -copy_icon.commands = $(COPY_FILE) \"$$replace(copy_icon.depends, /, $$QMAKE_DIR_SEP)\" \"$$replace(copy_icon.target, /, $$QMAKE_DIR_SEP)\" -QMAKE_EXTRA_TARGETS += copy_icon -PRE_TARGETDEPS += $$copy_icon.target - -copy_config.target = $$OUT_PWD/root/config.xml -copy_config.depends = $$_PRO_FILE_PWD_/config.xml -copy_config.commands = $(COPY_FILE) \"$$replace(copy_config.depends, /, $$QMAKE_DIR_SEP)\" \"$$replace(copy_config.target, /, $$QMAKE_DIR_SEP)\" -QMAKE_EXTRA_TARGETS += copy_config -PRE_TARGETDEPS += $$copy_config.target - -WGT_TYPE = -CONFIG(debug, debug|release) { - WGT_TYPE = -debug -} - -wgt.target = package -wgt.commands = wgtpkg-pack -f -o homescreen$${WGT_TYPE}.wgt root - -QMAKE_EXTRA_TARGETS += wgt - -deploy.files = homescreen.wgt -deploy.path = /usr/AGL/apps/autoinstall -INSTALLS += deploy |