diff options
author | Marius Vlad <marius.vlad@collabora.com> | 2020-09-21 15:20:59 +0300 |
---|---|---|
committer | Marius Vlad <marius.vlad@collabora.com> | 2020-09-23 16:31:52 +0300 |
commit | 3a3047e6f2cd4dab84a0a3f047e223ef1bf84b61 (patch) | |
tree | 0c8ac17733fb102712d1116891acc81df9d926d0 | |
parent | 2faeef2e633d51c3e818b7a493e14e072e38cf34 (diff) |
Init homescreen-demo-ci app
Bug-AGL: SPEC-3592
Signed-off-by: Marius Vlad <marius.vlad@collabora.com>
Change-Id: Id58ed059cdd44c2931a7b5d67970cbafd9e25002
-rw-r--r-- | COPYING | 22 | ||||
-rw-r--r-- | README.md | 4 | ||||
-rwxr-xr-x | autobuild/agl/autobuild | 110 | ||||
-rwxr-xr-x | autobuild/linux/autobuild | 110 | ||||
-rw-r--r-- | package/config.xml | 13 | ||||
-rw-r--r-- | package/icon.svg | 279 | ||||
-rw-r--r-- | package/package.pro | 27 | ||||
-rw-r--r-- | shell.pro | 7 | ||||
-rw-r--r-- | shell/README.md | 0 | ||||
-rw-r--r-- | shell/images/DividingLine.svg | 62 | ||||
-rw-r--r-- | shell/images/critical.svg | 146 | ||||
-rw-r--r-- | shell/images/exclamation.svg | 130 | ||||
-rw-r--r-- | shell/images/images.qrc | 10 | ||||
-rw-r--r-- | shell/images/information.svg | 130 | ||||
-rw-r--r-- | shell/images/question.svg | 130 | ||||
-rw-r--r-- | shell/protocol/agl-shell.xml | 117 | ||||
-rw-r--r-- | shell/qml/background.qml | 11 | ||||
-rw-r--r-- | shell/qml/bg.qml | 27 | ||||
-rw-r--r-- | shell/qml/bottom.qml | 13 | ||||
-rw-r--r-- | shell/qml/left.qml | 13 | ||||
-rw-r--r-- | shell/qml/main.qml | 12 | ||||
-rw-r--r-- | shell/qml/qml.qrc | 9 | ||||
-rw-r--r-- | shell/qml/right.qml | 13 | ||||
-rw-r--r-- | shell/qml/top.qml | 13 | ||||
-rw-r--r-- | shell/shell.pro | 22 | ||||
-rw-r--r-- | shell/src/main.cpp | 191 | ||||
-rw-r--r-- | shell/src/shell.cpp | 35 | ||||
-rw-r--r-- | shell/src/shell.h | 45 |
28 files changed, 1701 insertions, 0 deletions
@@ -0,0 +1,22 @@ +Copyright © 2020 Collabora, Ltd. + +Permission is hereby granted, free of charge, to any person obtaining +a copy of this software and associated documentation files (the +"Software"), to deal in the Software without restriction, including +without limitation the rights to use, copy, modify, merge, publish, +distribute, sublicense, and/or sell copies of the Software, and to +permit persons to whom the Software is furnished to do so, subject to +the following conditions: + +The above copyright notice and this permission notice (including the +next paragraph) shall be included in all copies or substantial +portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS +BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN +ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/README.md b/README.md new file mode 100644 index 0000000..843e484 --- /dev/null +++ b/README.md @@ -0,0 +1,4 @@ +homescreen-demo-ci +================== + +demo app for testing the screenshooter and application functionality. diff --git a/autobuild/agl/autobuild b/autobuild/agl/autobuild new file mode 100755 index 0000000..bbbc13e --- /dev/null +++ b/autobuild/agl/autobuild @@ -0,0 +1,110 @@ +#!/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 new file mode 100755 index 0000000..bbbc13e --- /dev/null +++ b/autobuild/linux/autobuild @@ -0,0 +1,110 @@ +#!/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/package/config.xml b/package/config.xml new file mode 100644 index 0000000..63d0d75 --- /dev/null +++ b/package/config.xml @@ -0,0 +1,13 @@ +<?xml version="1.0" encoding="UTF-8"?> +<widget xmlns="http://www.w3.org/ns/widgets" id="homescreen-demo-ci" version="0.1"> + <name>homescreen-demo-ci</name> + <icon src="icon.svg"/> + <content src="bin/homescreen-demo-ci" type="application/vnd.agl.native"/> + <description>This is a demo application for homescreen-demo-ci</description> + <author>NONE</author> + <license>MIT</license> + <feature name="urn:AGL:widget:required-permission"> + <param name="urn:AGL:permission::public:no-htdocs" value="required" /> + <param name="urn:AGL:permission::public:display" value="required" /> + </feature> +</widget> diff --git a/package/icon.svg b/package/icon.svg new file mode 100644 index 0000000..91661a7 --- /dev/null +++ b/package/icon.svg @@ -0,0 +1,279 @@ +<?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 new file mode 100644 index 0000000..eb177fa --- /dev/null +++ b/package/package.pro @@ -0,0 +1,27 @@ +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-demo-ci$${WGT_TYPE}.wgt root + +QMAKE_EXTRA_TARGETS += wgt + +deploy.files = homescreen-demo-ci.wgt +deploy.path = /usr/AGL/apps/autoinstall +INSTALLS += deploy diff --git a/shell.pro b/shell.pro new file mode 100644 index 0000000..c779949 --- /dev/null +++ b/shell.pro @@ -0,0 +1,7 @@ +TEMPLATE = subdirs + +load(configure) + +SUBDIRS = shell package + +package.depends += shell diff --git a/shell/README.md b/shell/README.md new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/shell/README.md diff --git a/shell/images/DividingLine.svg b/shell/images/DividingLine.svg new file mode 100644 index 0000000..788256c --- /dev/null +++ b/shell/images/DividingLine.svg @@ -0,0 +1,62 @@ +<?xml version="1.0" encoding="UTF-8" standalone="no"?> +<!-- Created with Inkscape (http://www.inkscape.org/) --> + +<svg + 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:xlink="http://www.w3.org/1999/xlink" + xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" + xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" + id="svg12699" + version="1.1" + inkscape:version="0.91 r13725" + width="960" + height="1" + viewBox="0 0 960 1" + sodipodi:docname="DividingLine-960.svg"> + <metadata + id="metadata12705"> + <rdf:RDF> + <cc:Work + rdf:about=""> + <dc:format>image/svg+xml</dc:format> + <dc:type + rdf:resource="http://purl.org/dc/dcmitype/StillImage" /> + <dc:title></dc:title> + </cc:Work> + </rdf:RDF> + </metadata> + <defs + id="defs12703" /> + <sodipodi:namedview + pagecolor="#ffffff" + bordercolor="#666666" + borderopacity="1" + objecttolerance="10" + gridtolerance="10" + guidetolerance="10" + inkscape:pageopacity="0" + inkscape:pageshadow="2" + inkscape:window-width="1615" + inkscape:window-height="917" + id="namedview12701" + showgrid="false" + inkscape:zoom="1" + inkscape:cx="403.34338" + inkscape:cy="-3.7733099" + inkscape:window-x="65" + inkscape:window-y="24" + inkscape:window-maximized="1" + inkscape:current-layer="svg12699" /> + <image + width="960" + height="1" + preserveAspectRatio="none" + xlink:href="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAvoAAAABCAIAAAAgt51xAAAAAXNSR0IArs4c6QAAAARnQU1BAACx jwv8YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAAbSURBVEhLY1g2CkbBKBgFo2AUjIJRMIzBsmUA zyfKoJIKS6oAAAAASUVORK5CYII= " + id="image12707" + x="0" + y="1.3877788e-17" /> +</svg> diff --git a/shell/images/critical.svg b/shell/images/critical.svg new file mode 100644 index 0000000..e2df6fc --- /dev/null +++ b/shell/images/critical.svg @@ -0,0 +1,146 @@ +<?xml version="1.0" encoding="UTF-8" standalone="no"?> +<!-- Created with Inkscape (http://www.inkscape.org/) --> + +<svg + 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:xlink="http://www.w3.org/1999/xlink" + xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" + xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" + width="320" + height="320" + viewBox="0 0 320 320.00001" + id="svg5033" + version="1.1" + inkscape:version="0.91 r13725" + sodipodi:docname="critical.svg"> + <defs + id="defs5035"> + <linearGradient + gradientTransform="matrix(1.0123741,0,0,1.0052855,226.82647,753.70831)" + inkscape:collect="always" + xlink:href="#SVGID_36_" + id="linearGradient5005" + x1="-125.27629" + y1="217.50423" + x2="-4.2735882" + y2="57.848095" + gradientUnits="userSpaceOnUse" /> + <linearGradient + id="SVGID_36_" + gradientUnits="userSpaceOnUse" + x1="4.0481" + y1="287.94919" + x2="320.4859" + y2="-15.4029" + gradientTransform="matrix(1,0.00546456,-0.00546456,1,-2.0192,-3.0212)"> + <stop + offset="0" + style="stop-color:#54d187;stop-opacity:0.90588236" + id="stop300" /> + <stop + id="stop9348" + style="stop-color:#12c1bb;stop-opacity:0.65882355" + offset="0.51862437" /> + <stop + offset="1" + style="stop-color:#055658;stop-opacity:0.38431373" + id="stop302" /> + </linearGradient> + </defs> + <sodipodi:namedview + id="base" + pagecolor="#ffa4ff" + bordercolor="#666666" + borderopacity="1.0" + inkscape:pageopacity="0" + inkscape:pageshadow="2" + inkscape:zoom="1.7480469" + inkscape:cx="10.563348" + inkscape:cy="199.74517" + inkscape:document-units="px" + inkscape:current-layer="layer1" + showgrid="false" + inkscape:window-width="1615" + inkscape:window-height="1026" + inkscape:window-x="65" + inkscape:window-y="24" + inkscape:window-maximized="1" + units="px" + showguides="true" + inkscape:guide-bbox="true"> + <sodipodi:guide + position="160,377.00001" + orientation="1,0" + id="guide5666" /> + <sodipodi:guide + position="60,448.00001" + orientation="1,0" + id="guide5668" /> + <sodipodi:guide + position="260,414.00001" + orientation="1,0" + id="guide5670" /> + <sodipodi:guide + position="-44.5,265.00001" + orientation="0,1" + id="guide10700" /> + <sodipodi:guide + position="-36.5,60.000002" + orientation="0,1" + id="guide10702" /> + <sodipodi:guide + position="-133.64318,165.46299" + orientation="0,1" + id="guide10704" /> + </sodipodi:namedview> + <metadata + id="metadata5038"> + <rdf:RDF> + <cc:Work + rdf:about=""> + <dc:format>image/svg+xml</dc:format> + <dc:type + rdf:resource="http://purl.org/dc/dcmitype/StillImage" /> + <dc:title /> + </cc:Work> + </rdf:RDF> + </metadata> + <g + inkscape:label="Layer 1" + inkscape:groupmode="layer" + id="layer1" + transform="translate(0,-732.36216)"> + <path + style="fill:#00ffbd;fill-opacity:1;stroke-width:0;stroke-miterlimit:4;stroke-dasharray:none" + d="M 160.42857,785.99962 A 104.88141,105.22039 0 0 0 55.54771,891.21837 104.88141,105.22039 0 0 0 160.42857,996.43908 104.88141,105.22039 0 0 0 265.30943,891.21837 104.88141,105.22039 0 0 0 160.42857,785.99962 Z m -0.33984,3.38867 A 101.83055,101.66108 0 0 1 261.92076,891.0504 101.83055,101.66108 0 0 1 160.08873,992.71056 101.83055,101.66108 0 0 1 58.25865,891.0504 101.83055,101.66108 0 0 1 160.08873,789.38829 Z" + id="path4374" + inkscape:connector-curvature="0" /> + <ellipse + style="opacity:0.77;fill:url(#linearGradient5005);fill-opacity:1;stroke-width:0;stroke-miterlimit:4;stroke-dasharray:none;fill-rule:nonzero" + id="path4417" + cx="160.24997" + cy="891.04053" + rx="102.26696" + ry="101.89165" /> + <rect + style="fill:#ffffff;fill-opacity:1;stroke-width:0;stroke-miterlimit:4;stroke-dasharray:none" + id="rect4394" + width="166.1017" + height="18.983051" + x="-600.41077" + y="733.77344" + transform="matrix(0.70710678,-0.70710678,0.70710678,0.70710678,0,0)" /> + <rect + style="fill:#ffffff;fill-opacity:1;stroke-width:0;stroke-miterlimit:4;stroke-dasharray:none" + id="rect4394-6" + width="166.1017" + height="18.983051" + x="659.83057" + y="508.15701" + transform="matrix(0.70710678,0.70710678,-0.70710678,0.70710678,0,0)" /> + </g> +</svg> diff --git a/shell/images/exclamation.svg b/shell/images/exclamation.svg new file mode 100644 index 0000000..c43ebdd --- /dev/null +++ b/shell/images/exclamation.svg @@ -0,0 +1,130 @@ +<?xml version="1.0" encoding="UTF-8" standalone="no"?> +<!-- Created with Inkscape (http://www.inkscape.org/) --> + +<svg + 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:xlink="http://www.w3.org/1999/xlink" + xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" + xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" + width="320" + height="320" + viewBox="0 0 320 320.00001" + id="svg5033" + version="1.1" + inkscape:version="0.91 r13725" + sodipodi:docname="exclamation.svg"> + <defs + id="defs5035"> + <linearGradient + gradientTransform="matrix(1.0123741,0,0,1.0052855,226.82647,753.70831)" + inkscape:collect="always" + xlink:href="#SVGID_36_" + id="linearGradient5005" + x1="-125.27629" + y1="217.50423" + x2="-4.2735882" + y2="57.848095" + gradientUnits="userSpaceOnUse" /> + <linearGradient + id="SVGID_36_" + gradientUnits="userSpaceOnUse" + x1="4.0481" + y1="287.94919" + x2="320.4859" + y2="-15.4029" + gradientTransform="matrix(1,0.00546456,-0.00546456,1,-2.0192,-3.0212)"> + <stop + offset="0" + style="stop-color:#54d187;stop-opacity:0.90588236" + id="stop300" /> + <stop + id="stop9348" + style="stop-color:#12c1bb;stop-opacity:0.65882355" + offset="0.51862437" /> + <stop + offset="1" + style="stop-color:#055658;stop-opacity:0.38431373" + id="stop302" /> + </linearGradient> + </defs> + <sodipodi:namedview + id="base" + pagecolor="#ffa4ff" + bordercolor="#666666" + borderopacity="1.0" + inkscape:pageopacity="0" + inkscape:pageshadow="2" + inkscape:zoom="1.6505829" + inkscape:cx="210.27412" + inkscape:cy="19.42679" + inkscape:document-units="px" + inkscape:current-layer="layer1" + showgrid="false" + inkscape:window-width="1615" + inkscape:window-height="1026" + inkscape:window-x="65" + inkscape:window-y="24" + inkscape:window-maximized="1" + units="px" + showguides="true" + inkscape:guide-bbox="true"> + <sodipodi:guide + position="160,377.00001" + orientation="1,0" + id="guide5666" /> + <sodipodi:guide + position="60,448.00001" + orientation="1,0" + id="guide5668" /> + <sodipodi:guide + position="260,414.00001" + orientation="1,0" + id="guide5670" /> + </sodipodi:namedview> + <metadata + id="metadata5038"> + <rdf:RDF> + <cc:Work + rdf:about=""> + <dc:format>image/svg+xml</dc:format> + <dc:type + rdf:resource="http://purl.org/dc/dcmitype/StillImage" /> + <dc:title /> + </cc:Work> + </rdf:RDF> + </metadata> + <g + inkscape:label="Layer 1" + inkscape:groupmode="layer" + id="layer1" + transform="translate(0,-732.36216)"> + <path + style="fill:#00ffbd;fill-opacity:1;stroke-width:0;stroke-miterlimit:4;stroke-dasharray:none" + d="M 160.42857,785.99962 A 104.88141,105.22039 0 0 0 55.54771,891.21837 104.88141,105.22039 0 0 0 160.42857,996.43908 104.88141,105.22039 0 0 0 265.30943,891.21837 104.88141,105.22039 0 0 0 160.42857,785.99962 Z m -0.33984,3.38867 A 101.83055,101.66108 0 0 1 261.92076,891.0504 101.83055,101.66108 0 0 1 160.08873,992.71056 101.83055,101.66108 0 0 1 58.25865,891.0504 101.83055,101.66108 0 0 1 160.08873,789.38829 Z" + id="path4374" + inkscape:connector-curvature="0" /> + <ellipse + style="opacity:0.77;fill:url(#linearGradient5005);fill-opacity:1;stroke-width:0;stroke-miterlimit:4;stroke-dasharray:none;fill-rule:nonzero" + id="path4417" + cx="160.24997" + cy="891.04053" + rx="102.26696" + ry="101.89165" /> + <text + xml:space="preserve" + style="font-style:normal;font-weight:normal;font-size:196.94758606px;line-height:125%;font-family:sans-serif;letter-spacing:0px;word-spacing:0px;fill:#ffffff;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" + x="112.91733" + y="1033.4916" + id="text5620" + sodipodi:linespacing="125%" + transform="scale(1.0772696,0.92827274)"><tspan + sodipodi:role="line" + id="tspan5622" + x="112.91733" + y="1033.4916">!</tspan></text> + </g> +</svg> diff --git a/shell/images/images.qrc b/shell/images/images.qrc new file mode 100644 index 0000000..4b27259 --- /dev/null +++ b/shell/images/images.qrc @@ -0,0 +1,10 @@ +<RCC> + <qresource prefix="/images"> + <file>DividingLine.svg</file> + <file>critical.svg</file> + <file>exclamation.svg</file> + <file>information.svg</file> + <file>question.svg</file> + </qresource> + <qresource prefix="/"/> +</RCC> diff --git a/shell/images/information.svg b/shell/images/information.svg new file mode 100644 index 0000000..44b0ef8 --- /dev/null +++ b/shell/images/information.svg @@ -0,0 +1,130 @@ +<?xml version="1.0" encoding="UTF-8" standalone="no"?> +<!-- Created with Inkscape (http://www.inkscape.org/) --> + +<svg + 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:xlink="http://www.w3.org/1999/xlink" + xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" + xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" + width="320" + height="320" + viewBox="0 0 320 320.00001" + id="svg5033" + version="1.1" + inkscape:version="0.91 r13725" + sodipodi:docname="information.svg"> + <defs + id="defs5035"> + <linearGradient + gradientTransform="matrix(1.0123741,0,0,1.0052855,226.82647,753.70831)" + inkscape:collect="always" + xlink:href="#SVGID_36_" + id="linearGradient5005" + x1="-125.27629" + y1="217.50423" + x2="-4.2735882" + y2="57.848095" + gradientUnits="userSpaceOnUse" /> + <linearGradient + id="SVGID_36_" + gradientUnits="userSpaceOnUse" + x1="4.0481" + y1="287.94919" + x2="320.4859" + y2="-15.4029" + gradientTransform="matrix(1,0.00546456,-0.00546456,1,-2.0192,-3.0212)"> + <stop + offset="0" + style="stop-color:#54d187;stop-opacity:0.90588236" + id="stop300" /> + <stop + id="stop9348" + style="stop-color:#12c1bb;stop-opacity:0.65882355" + offset="0.51862437" /> + <stop + offset="1" + style="stop-color:#055658;stop-opacity:0.38431373" + id="stop302" /> + </linearGradient> + </defs> + <sodipodi:namedview + id="base" + pagecolor="#ffa4ff" + bordercolor="#666666" + borderopacity="1.0" + inkscape:pageopacity="0" + inkscape:pageshadow="2" + inkscape:zoom="2.1606835" + inkscape:cx="150.68658" + inkscape:cy="151.76859" + inkscape:document-units="px" + inkscape:current-layer="layer1" + showgrid="false" + inkscape:window-width="1615" + inkscape:window-height="1026" + inkscape:window-x="65" + inkscape:window-y="24" + inkscape:window-maximized="1" + units="px" + showguides="true" + inkscape:guide-bbox="true"> + <sodipodi:guide + position="160,377.00001" + orientation="1,0" + id="guide5666" /> + <sodipodi:guide + position="59.494972,568.63465" + orientation="1,0" + id="guide5668" /> + <sodipodi:guide + position="259.71844,528.58996" + orientation="1,0" + id="guide5670" /> + </sodipodi:namedview> + <metadata + id="metadata5038"> + <rdf:RDF> + <cc:Work + rdf:about=""> + <dc:format>image/svg+xml</dc:format> + <dc:type + rdf:resource="http://purl.org/dc/dcmitype/StillImage" /> + <dc:title /> + </cc:Work> + </rdf:RDF> + </metadata> + <g + inkscape:label="Layer 1" + inkscape:groupmode="layer" + id="layer1" + transform="translate(0,-732.36216)"> + <path + style="fill:#00ffbd;fill-opacity:1;stroke-width:0;stroke-miterlimit:4;stroke-dasharray:none" + d="M 160.42857,785.99962 A 104.88141,105.22039 0 0 0 55.54771,891.21837 104.88141,105.22039 0 0 0 160.42857,996.43908 104.88141,105.22039 0 0 0 265.30943,891.21837 104.88141,105.22039 0 0 0 160.42857,785.99962 Z m -0.33984,3.38867 A 101.83055,101.66108 0 0 1 261.92076,891.0504 101.83055,101.66108 0 0 1 160.08873,992.71056 101.83055,101.66108 0 0 1 58.25865,891.0504 101.83055,101.66108 0 0 1 160.08873,789.38829 Z" + id="path4374" + inkscape:connector-curvature="0" /> + <ellipse + style="opacity:0.77;fill:url(#linearGradient5005);fill-opacity:1;stroke-width:0;stroke-miterlimit:4;stroke-dasharray:none;fill-rule:nonzero" + id="path4417" + cx="160.24997" + cy="891.04053" + rx="102.26696" + ry="101.89165" /> + <text + xml:space="preserve" + style="font-style:normal;font-weight:normal;font-size:196.94758606px;line-height:125%;font-family:sans-serif;letter-spacing:0px;word-spacing:0px;fill:#ffffff;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" + x="122.20006" + y="1033.4916" + id="text5620" + sodipodi:linespacing="125%" + transform="scale(1.0772696,0.92827274)"><tspan + sodipodi:role="line" + id="tspan5622" + x="122.20006" + y="1033.4916">i</tspan></text> + </g> +</svg> diff --git a/shell/images/question.svg b/shell/images/question.svg new file mode 100644 index 0000000..7d55a46 --- /dev/null +++ b/shell/images/question.svg @@ -0,0 +1,130 @@ +<?xml version="1.0" encoding="UTF-8" standalone="no"?> +<!-- Created with Inkscape (http://www.inkscape.org/) --> + +<svg + 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:xlink="http://www.w3.org/1999/xlink" + xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" + xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" + width="320" + height="320" + viewBox="0 0 320 320.00001" + id="svg5033" + version="1.1" + inkscape:version="0.91 r13725" + sodipodi:docname="question.svg"> + <defs + id="defs5035"> + <linearGradient + gradientTransform="matrix(1.0123741,0,0,1.0052855,226.82647,753.70831)" + inkscape:collect="always" + xlink:href="#SVGID_36_" + id="linearGradient5005" + x1="-125.27629" + y1="217.50423" + x2="-4.2735882" + y2="57.848095" + gradientUnits="userSpaceOnUse" /> + <linearGradient + id="SVGID_36_" + gradientUnits="userSpaceOnUse" + x1="4.0481" + y1="287.94919" + x2="320.4859" + y2="-15.4029" + gradientTransform="matrix(1,0.00546456,-0.00546456,1,-2.0192,-3.0212)"> + <stop + offset="0" + style="stop-color:#54d187;stop-opacity:0.90588236" + id="stop300" /> + <stop + id="stop9348" + style="stop-color:#12c1bb;stop-opacity:0.65882355" + offset="0.51862437" /> + <stop + offset="1" + style="stop-color:#055658;stop-opacity:0.38431373" + id="stop302" /> + </linearGradient> + </defs> + <sodipodi:namedview + id="base" + pagecolor="#ffa4ff" + bordercolor="#666666" + borderopacity="1.0" + inkscape:pageopacity="0" + inkscape:pageshadow="2" + inkscape:zoom="1.2360558" + inkscape:cx="192.682" + inkscape:cy="132.16195" + inkscape:document-units="px" + inkscape:current-layer="layer1" + showgrid="false" + inkscape:window-width="1615" + inkscape:window-height="1026" + inkscape:window-x="65" + inkscape:window-y="24" + inkscape:window-maximized="1" + units="px" + showguides="true" + inkscape:guide-bbox="true"> + <sodipodi:guide + position="160,377.00001" + orientation="1,0" + id="guide5666" /> + <sodipodi:guide + position="60,448.00001" + orientation="1,0" + id="guide5668" /> + <sodipodi:guide + position="260,414.00001" + orientation="1,0" + id="guide5670" /> + </sodipodi:namedview> + <metadata + id="metadata5038"> + <rdf:RDF> + <cc:Work + rdf:about=""> + <dc:format>image/svg+xml</dc:format> + <dc:type + rdf:resource="http://purl.org/dc/dcmitype/StillImage" /> + <dc:title /> + </cc:Work> + </rdf:RDF> + </metadata> + <g + inkscape:label="Layer 1" + inkscape:groupmode="layer" + id="layer1" + transform="translate(0,-732.36216)"> + <path + style="fill:#00ffbd;fill-opacity:1;stroke-width:0;stroke-miterlimit:4;stroke-dasharray:none" + d="M 160.42857,785.99962 A 104.88141,105.22039 0 0 0 55.54771,891.21837 104.88141,105.22039 0 0 0 160.42857,996.43908 104.88141,105.22039 0 0 0 265.30943,891.21837 104.88141,105.22039 0 0 0 160.42857,785.99962 Z m -0.33984,3.38867 A 101.83055,101.66108 0 0 1 261.92076,891.0504 101.83055,101.66108 0 0 1 160.08873,992.71056 101.83055,101.66108 0 0 1 58.25865,891.0504 101.83055,101.66108 0 0 1 160.08873,789.38829 Z" + id="path4374" + inkscape:connector-curvature="0" /> + <ellipse + style="opacity:0.77;fill:url(#linearGradient5005);fill-opacity:1;stroke-width:0;stroke-miterlimit:4;stroke-dasharray:none;fill-rule:nonzero" + id="path4417" + cx="160.24997" + cy="891.04053" + rx="102.26696" + ry="101.89165" /> + <text + xml:space="preserve" + style="font-style:normal;font-weight:normal;font-size:196.94758606px;line-height:125%;font-family:sans-serif;letter-spacing:0px;word-spacing:0px;fill:#ffffff;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" + x="101.77805" + y="1033.4916" + id="text5620" + sodipodi:linespacing="125%" + transform="scale(1.0772696,0.92827274)"><tspan + sodipodi:role="line" + id="tspan5622" + x="101.77805" + y="1033.4916">?</tspan></text> + </g> +</svg> diff --git a/shell/protocol/agl-shell.xml b/shell/protocol/agl-shell.xml new file mode 100644 index 0000000..5e31d98 --- /dev/null +++ b/shell/protocol/agl-shell.xml @@ -0,0 +1,117 @@ +<?xml version="1.0" encoding="UTF-8"?> +<protocol name="agl_shell"> + <copyright> + Copyright © 2019 Collabora, Ltd. + + Permission is hereby granted, free of charge, to any person obtaining a + copy of this software and associated documentation files (the "Software"), + to deal in the Software without restriction, including without limitation + the rights to use, copy, modify, merge, publish, distribute, sublicense, + and/or sell copies of the Software, and to permit persons to whom the + Software is furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice (including the next + paragraph) shall be included in all copies or substantial portions of the + Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL + THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING + FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER + DEALINGS IN THE SOFTWARE. + </copyright> + <interface name="agl_shell" version="1"> + <description summary="user interface for weston-ivi"> + </description> + + <enum name="error"> + <entry name="invalid_argument" value="0"/> + <entry name="background_exists" value="1"/> + <entry name="panel_exists" value="2"/> + </enum> + + <enum name="edge"> + <entry name="top" value="0"/> + <entry name="bottom" value="1"/> + <entry name="left" value="2"/> + <entry name="right" value="3"/> + </enum> + + <request name="ready"> + <description summary="client is ready to be shown"> + Tell the server that this client is ready to be shown. The server + will delay presentation during start-up until all shell clients are + ready to be shown, and will display a black screen instead. + This gives the client an oppurtunity to set up and configure several + surfaces into a coherent interface. + + The client that binds to this interface must send this request, otherwise + they may stall the compositor unnecessarily. + + If this request is called after the compositor has already finished + start-up, no operation is performed. + </description> + </request> + + <request name="set_background"> + <description summary="set surface as output's background"> + Set the surface to act as the background of an output. After this + request, the server will immediately send a configure event with + the dimensions the client should use to cover the entire output. + + The surface must have a "desktop" surface role, as supported by + libweston-desktop. + + Only a single surface may be the background for any output. If a + background surface already exists, a protocol error is raised. + </description> + <arg name="surface" type="object" interface="wl_surface"/> + <arg name="output" type="object" interface="wl_output"/> + </request> + + <request name="set_panel"> + <description summary="set surface as panel"> + Set the surface to act as a panel of an output. The 'edge' argument + says what edge of the output the surface will be anchored to. + After this request, the server will send a configure event with the + correponding width/height that the client should use, and 0 for the + other dimension. E.g. if the edge is 'top', the width will be the + output's width, and the height will be 0. + + The surface must have a "desktop" surface role, as supported by + libweston-desktop. + + The compositor will take the panel's window geometry into account when + positioning other windows, so the panels are not covered. + + XXX: What happens if e.g. both top and left are used at the same time? + Who gets to have the corner? + + Only a single surface may be the panel for an output's edge. If a + surface already exists on an edge, a protocol error is raised. + </description> + <arg name="surface" type="object" interface="wl_surface"/> + <arg name="output" type="object" interface="wl_output"/> + <arg name="edge" type="uint" enum="edge"/> + </request> + + <request name="activate_app"> + <description summary="make client current window"> + Asks the compositor to make a toplevel to become the current/focued + window for window management purposes. + + See xdg_toplevel.set_app_id from the xdg-shell protocol for a + description app_id. + + If multiple toplevels have the same app_id, the result is unspecified. + + XXX: Do we need feedback to say it didn't work? (e.g. client does + not exist) + </description> + <arg name="app_id" type="string"/> + <arg name="output" type="object" interface="wl_output"/> + </request> + </interface> +</protocol> diff --git a/shell/qml/background.qml b/shell/qml/background.qml new file mode 100644 index 0000000..88b95c0 --- /dev/null +++ b/shell/qml/background.qml @@ -0,0 +1,11 @@ +import QtQuick 2.11 +import QtQuick.Window 2.11 + +Window { + id: background + width: Screen.width + height: Screen.height + flags: Qt.FramelessWindowHint + visible: true + color: '#fff000' +} diff --git a/shell/qml/bg.qml b/shell/qml/bg.qml new file mode 100644 index 0000000..9c8aedb --- /dev/null +++ b/shell/qml/bg.qml @@ -0,0 +1,27 @@ +import QtQuick 2.2 +import QtQuick.Window 2.11 +import QtQuick.Layouts 1.1 + +Window { + visible: true + flags: Qt.FramelessWindowHint + + //width: Screen.width + width: 300 + //height: Screen.height + height: 400 + + title: 'HomeScreen bg' + + color: 'red' + + property string appid: 'naq-activate' + + MouseArea { + anchors.fill: parent + onClicked: { + console.log('activating ' + appid) + shell.activate_app(Window.window, appid) + } + } +} diff --git a/shell/qml/bottom.qml b/shell/qml/bottom.qml new file mode 100644 index 0000000..088539a --- /dev/null +++ b/shell/qml/bottom.qml @@ -0,0 +1,13 @@ +import QtQuick 2.2 +import QtQuick.Window 2.11 +import QtQuick.Layouts 1.1 + +Window { + visible: true + flags: Qt.FramelessWindowHint + width: Screen.width + height: 216 + title: 'HomeScreen bottom' + + color: 'green' +} diff --git a/shell/qml/left.qml b/shell/qml/left.qml new file mode 100644 index 0000000..9d1a0c9 --- /dev/null +++ b/shell/qml/left.qml @@ -0,0 +1,13 @@ +import QtQuick 2.2 +import QtQuick.Window 2.11 +import QtQuick.Layouts 1.1 + +Window { + visible: true + flags: Qt.FramelessWindowHint + width: Screen.width * (240.0 / 768.0) + height: Screen.height + title: 'HomeScreen left' + + color: 'yellow' +} diff --git a/shell/qml/main.qml b/shell/qml/main.qml new file mode 100644 index 0000000..f0178a0 --- /dev/null +++ b/shell/qml/main.qml @@ -0,0 +1,12 @@ +import QtQuick 2.2 +import QtQuick.Window 2.11 +import QtQuick.Layouts 1.1 + +Window { + visible: true + flags: Qt.FramelessWindowHint + width: Screen.width + height: Screen.height + title: 'HomeScreen' + color: '#ff00ff00' +} diff --git a/shell/qml/qml.qrc b/shell/qml/qml.qrc new file mode 100644 index 0000000..3804b1b --- /dev/null +++ b/shell/qml/qml.qrc @@ -0,0 +1,9 @@ +<RCC> + <qresource prefix="/"> + <file>bg.qml</file> + <file>top.qml</file> + <file>bottom.qml</file> + <file>left.qml</file> + <file>right.qml</file> + </qresource> +</RCC> diff --git a/shell/qml/right.qml b/shell/qml/right.qml new file mode 100644 index 0000000..1202837 --- /dev/null +++ b/shell/qml/right.qml @@ -0,0 +1,13 @@ +import QtQuick 2.2 +import QtQuick.Window 2.11 +import QtQuick.Layouts 1.1 + +Window { + visible: true + flags: Qt.FramelessWindowHint + width: Screen.width * (240.0 / 768.0) + height: Screen.height + title: 'HomeScreen right' + + color: 'purple' +} diff --git a/shell/qml/top.qml b/shell/qml/top.qml new file mode 100644 index 0000000..22abcfb --- /dev/null +++ b/shell/qml/top.qml @@ -0,0 +1,13 @@ +import QtQuick 2.2 +import QtQuick.Window 2.11 +import QtQuick.Layouts 1.1 + +Window { + visible: true + flags: Qt.FramelessWindowHint + width: Screen.width + height: 216 + title: 'HomeScreen top' + + color: 'blue' +} diff --git a/shell/shell.pro b/shell/shell.pro new file mode 100644 index 0000000..ed22ce0 --- /dev/null +++ b/shell/shell.pro @@ -0,0 +1,22 @@ +TEMPLATE = app +TARGET = homescreen-demo-ci + +QT = qml quick dbus websockets gui-private +CONFIG += c++11 link_pkgconfig wayland-scanner +#DESTDIR = . +DESTDIR = $${OUT_PWD}/../package/root/bin +PKGCONFIG += wayland-client json-c + +CONFIG(release, debug|release) { + QMAKE_POST_LINK = $(STRIP) --strip-unneeded $(TARGET) +} + +SOURCES += src/main.cpp \ + src/shell.cpp + +HEADERS += src/shell.h + +RESOURCES += qml/qml.qrc images/images.qrc + +WAYLANDCLIENTSOURCES += \ + protocol/agl-shell.xml diff --git a/shell/src/main.cpp b/shell/src/main.cpp new file mode 100644 index 0000000..75cb6ec --- /dev/null +++ b/shell/src/main.cpp @@ -0,0 +1,191 @@ +#include <QGuiApplication> +#include <QCommandLineParser> +#include <QtGui/QGuiApplication> +#include <QtQml/QQmlApplicationEngine> +#include <QtQml/QQmlContext> +#include <QtQml/QQmlComponent> +#include <QtQml/qqml.h> +#include <QWindow> +#include <QQuickWindow> +#include <QScreen> +#include <QTimer> +#include <qpa/qplatformnativeinterface.h> + +#include <cstdlib> +#include <cstring> +#include <memory> +#include <wayland-client.h> +#include <time.h> + +#include "wayland-agl-shell-client-protocol.h" +#include "shell.h" + +// QGuiApplication::platformNativeInterface + +static void global_add(void *data, struct wl_registry *reg, uint32_t name, + const char *interface, uint32_t) +{ + struct agl_shell **shell = static_cast<struct agl_shell **>(data); + + if (strcmp(interface, agl_shell_interface.name) == 0) { + *shell = static_cast<struct agl_shell *>( + wl_registry_bind(reg, name, &agl_shell_interface, 1) + ); + } +} + +static void global_remove(void *data, struct wl_registry *reg, uint32_t id) +{ + // Don't care + (void) data; + (void) reg; + (void) id; +} + +static const struct wl_registry_listener registry_listener = { + global_add, + global_remove, +}; + +wl_surface * +getWlSurface(QWindow *window) +{ + QPlatformNativeInterface *native = qApp->platformNativeInterface(); + + //void *surf = QGuiApplication::platformNativeInterface()->nativeResourceForWindow("surface", window); + void *surf = native->nativeResourceForWindow("surface", window); + return static_cast<struct ::wl_surface *>(surf); +} + +struct wl_display * +getWlDisplay(void) +{ + QPlatformNativeInterface *native = qApp->platformNativeInterface(); + + //void *display = QGuiApplication::platformNativeInterface()->nativeResourceForIntegration("display"); + void *display = native->nativeResourceForIntegration("display"); + return static_cast<struct ::wl_display *>(display); +} + +struct wl_compositor * +getWlCompositor(QWindow *window) +{ + QPlatformNativeInterface *native = qApp->platformNativeInterface(); + + //void *compositor = QGuiApplication::platformNativeInterface()->nativeResourceForWindow("compositor", window); + void *compositor = native->nativeResourceForWindow("compositor", window); + return static_cast<struct ::wl_compositor*>(compositor); +} + +struct wl_output * +getWlOutput(QWindow *window) +{ + QPlatformNativeInterface *native = qApp->platformNativeInterface(); + + //void *output = QGuiApplication::platformNativeInterface()->nativeResourceForScreen("output", window->screen()); + void *output = native->nativeResourceForScreen("output", window->screen()); + return static_cast<struct ::wl_output*>(output); +} + +struct wl_output * +getWlOutput(QScreen *screen) +{ + QPlatformNativeInterface *native = qApp->platformNativeInterface(); + + //void *output = QGuiApplication::platformNativeInterface()->nativeResourceForScreen("output", window->screen()); + void *output = native->nativeResourceForScreen("output", screen); + return static_cast<struct ::wl_output*>(output); +} + +static struct wl_surface * +create_component(QQmlComponent *comp, QScreen *screen) +{ + QObject *obj = comp->create(); + obj->setParent(screen); + + QWindow *win = qobject_cast<QWindow *>(obj); + return getWlSurface(win); +} + + +int main(int argc, char *argv[]) +{ + setenv("QT_QPA_PLATFORM", "wayland", 1); + QGuiApplication app(argc, argv); + app.setDesktopFileName("homescreen-demo-ci"); + + QPlatformNativeInterface *native = qApp->platformNativeInterface(); + struct agl_shell *agl_shell = nullptr; + + struct wl_display *wl; + struct wl_registry *registry; + + char *xdgdir = getenv("XDG_RUNTIME_DIR"); + if (xdgdir) { + qInfo() << "xdg runtime dir " << xdgdir; + } + + wl = static_cast<struct wl_display *>(native->nativeResourceForIntegration("display")); + registry = wl_display_get_registry(wl); + + wl_registry_add_listener(registry, ®istry_listener, &agl_shell); + // Roundtrip to get all globals advertised by the compositor + wl_display_roundtrip(wl); + wl_registry_destroy(registry); + + // check if binding to agl shell worked + std::shared_ptr<struct agl_shell> shell{agl_shell, agl_shell_destroy}; + + QQmlApplicationEngine engine; + QQmlContext *context = engine.rootContext(); + + context->setContextProperty("shell", new Shell(shell, &app)); + + QQmlComponent bg_comp(&engine, QUrl("qrc:/bg.qml")); + qInfo() << bg_comp.errors(); + + QQmlComponent top_comp(&engine, QUrl("qrc:/top.qml")); + qInfo() << top_comp.errors(); + + QQmlComponent bot_comp(&engine, QUrl("qrc:/bottom.qml")); + qInfo() << bot_comp.errors(); + + QQmlComponent left_comp(&engine, QUrl("qrc:/left.qml")); + qInfo() << left_comp.errors(); + + QQmlComponent right_comp(&engine, QUrl("qrc:/right.qml")); + qInfo() << right_comp.errors(); + + struct wl_surface *bg, *top, *bot; + struct wl_output *output; + + QScreen *screen = app.primaryScreen(); + qDebug() << "primary screen is " << screen->name(); + + if (qApp->screens().length() > 1) { + for (auto &ss: qApp->screens()) { + bg = create_component(&bg_comp, ss); + output = getWlOutput(ss); + qDebug() << "Seting background to screen " << ss->name(); + agl_shell_set_background(agl_shell, bg, output); + } + } else { + bg = create_component(&bg_comp, screen); + output = getWlOutput(screen); + qDebug() << "Seting background to screen " << screen->name(); + agl_shell_set_background(agl_shell, bg, output); + } + + top = create_component(&top_comp, screen); + bot = create_component(&bot_comp, screen); + + agl_shell_set_panel(agl_shell, bot, output, AGL_SHELL_EDGE_BOTTOM); + agl_shell_set_panel(agl_shell, top, output, AGL_SHELL_EDGE_TOP); + + /* need to wait a bit in order for qtwayland to start dispatching */ + QTimer::singleShot(500, [agl_shell](){ + agl_shell_ready(agl_shell); + }); + + return app.exec(); +} diff --git a/shell/src/shell.cpp b/shell/src/shell.cpp new file mode 100644 index 0000000..15e16c4 --- /dev/null +++ b/shell/src/shell.cpp @@ -0,0 +1,35 @@ +/* + * Copyright (c) 2019 Collabora Ltd. + * + * 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. + */ + +#include <QGuiApplication> +#include <QDebug> +#include "shell.h" +#include <qpa/qplatformnativeinterface.h> +#include <stdio.h> + +void Shell::activate_app(QWindow *win, const QString &app_id) +{ + QPlatformNativeInterface *native = qApp->platformNativeInterface(); + QScreen *screen = win->screen(); + struct wl_output *output; + + output = static_cast<struct wl_output *>(native->nativeResourceForScreen( + "output", const_cast<QScreen *>(screen) + )); + + agl_shell_activate_app(this->shell.get(), + app_id.toStdString().c_str(), output); +} diff --git a/shell/src/shell.h b/shell/src/shell.h new file mode 100644 index 0000000..34dc539 --- /dev/null +++ b/shell/src/shell.h @@ -0,0 +1,45 @@ +/* + * Copyright (c) 2019 Collabora Ltd. + * + * 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 SHELLHANDLER_H +#define SHELLHANDLER_H + +#include <QObject> +#include <QString> +#include <QScreen> +#include <QWindow> +#include <memory> +#include "wayland-agl-shell-client-protocol.h" + +/* + * Basic type to wrap the agl_shell wayland object into a QObject, so that it + * can be used in callbacks from QML. + */ + +class Shell : public QObject +{ +Q_OBJECT + std::shared_ptr<struct agl_shell> shell; + +public: + Shell(std::shared_ptr<struct agl_shell> shell, QObject *parent = nullptr) : + QObject(parent), shell(shell) + {} +public slots: + void activate_app(QWindow *win, const QString &app_id); +}; + +#endif // SHELLHANDLER_H |