summaryrefslogtreecommitdiffstats
path: root/shell
diff options
context:
space:
mode:
authorMarius Vlad <marius.vlad@collabora.com>2020-09-21 15:20:59 +0300
committerMarius Vlad <marius.vlad@collabora.com>2020-09-23 16:31:52 +0300
commit3a3047e6f2cd4dab84a0a3f047e223ef1bf84b61 (patch)
tree0c8ac17733fb102712d1116891acc81df9d926d0 /shell
parent2faeef2e633d51c3e818b7a493e14e072e38cf34 (diff)
Init homescreen-demo-ci app
Bug-AGL: SPEC-3592 Signed-off-by: Marius Vlad <marius.vlad@collabora.com> Change-Id: Id58ed059cdd44c2931a7b5d67970cbafd9e25002
Diffstat (limited to 'shell')
-rw-r--r--shell/README.md0
-rw-r--r--shell/images/DividingLine.svg62
-rw-r--r--shell/images/critical.svg146
-rw-r--r--shell/images/exclamation.svg130
-rw-r--r--shell/images/images.qrc10
-rw-r--r--shell/images/information.svg130
-rw-r--r--shell/images/question.svg130
-rw-r--r--shell/protocol/agl-shell.xml117
-rw-r--r--shell/qml/background.qml11
-rw-r--r--shell/qml/bg.qml27
-rw-r--r--shell/qml/bottom.qml13
-rw-r--r--shell/qml/left.qml13
-rw-r--r--shell/qml/main.qml12
-rw-r--r--shell/qml/qml.qrc9
-rw-r--r--shell/qml/right.qml13
-rw-r--r--shell/qml/top.qml13
-rw-r--r--shell/shell.pro22
-rw-r--r--shell/src/main.cpp191
-rw-r--r--shell/src/shell.cpp35
-rw-r--r--shell/src/shell.h45
20 files changed, 1129 insertions, 0 deletions
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, &registry_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