summaryrefslogtreecommitdiffstats
path: root/sample/template
diff options
context:
space:
mode:
authorwang_zhiqiang <wang_zhiqiang@dl.cn.nexty-ele.com>2018-11-14 11:14:04 +0800
committerwang_zhiqiang <wang_zhiqiang@dl.cn.nexty-ele.com>2018-11-21 16:51:10 +0800
commitc0146077906057bf97688a617870228eaad0cf54 (patch)
tree7d7bcc9a8a58c8c1f137be3872b643566c08e78c /sample/template
parent43452ff8a759da135525678528c159f1e4e68504 (diff)
homescreen-service: add five verbs. 1.showWindow: instead of tap_shortcut and show onscreen. 2.hideWindow: used when want to hide onscreen. 3.replyShowWindow: used when post onscreen reply information to application. 4.showNotification: used by application who want to display notification on homescreen top area. 5.showInformation: used by application who want to display information on homescreen botton area. homescreen: 1.add fullscreen transfer button. 2.display notification and information. Bug-AGL: SPEC-1931 Change-Id: Ie0753fe0656282b1ff8c04dcef625f2a4154edde Signed-off-by: wang_zhiqiang <wang_zhiqiang@dl.cn.nexty-ele.com>
Diffstat (limited to 'sample/template')
-rw-r--r--sample/template/main.cpp27
1 files changed, 13 insertions, 14 deletions
diff --git a/sample/template/main.cpp b/sample/template/main.cpp
index fef270b..848d2c5 100644
--- a/sample/template/main.cpp
+++ b/sample/template/main.cpp
@@ -90,9 +90,7 @@ int main(int argc, char *argv[])
}
// Application should call requestSurface at first
- json_object *obj = json_object_new_object();
- json_object_object_add(obj, wm->kKeyDrawingName, json_object_new_string(app_name.c_str()));
- if (wm->requestSurface(obj) != 0) {
+ if (wm->requestSurface(myname.c_str()) != 0) {
exit(EXIT_FAILURE);
}
@@ -122,11 +120,9 @@ int main(int argc, char *argv[])
json_object_object_get(object, wm->kKeyDrawingName));
const char *area = json_object_get_string(
json_object_object_get(object, wm->kKeyDrawingArea));
- fprintf(stderr, "Surface %s got syncDraw!\n", label);
+ fprintf(stderr, "Surface %s got syncDraw! area: %s.\n", label, area);
// Application should call LibWindowmanager::endDraw() in SyncDraw handler
- json_object *obj = json_object_new_object();
- json_object_object_add(obj, wm->kKeyDrawingName, json_object_new_string(app_name.c_str()));
- wm->endDraw(obj);
+ wm->endDraw(app_name.c_str());
});
wm->set_event_handler(LibWindowmanager::Event_FlushDraw, [wm](json_object *object) {
const char *label = json_object_get_string(
@@ -145,13 +141,16 @@ int main(int argc, char *argv[])
hs->init(port, token.c_str());
// Set event handler
- hs->set_event_handler(LibHomeScreen::Event_TapShortcut, [wm](json_object *object) {
- qDebug("Surface %s got tapShortcut\n", myname.c_str());
- // Application should call LibWindowmanager::endDraw() in TapShortcut handler
- json_object *obj = json_object_new_object();
- json_object_object_add(obj, wm->kKeyDrawingName, json_object_new_string(myname.c_str()));
- json_object_object_add(obj, wm->kKeyDrawingArea, json_object_new_string("normal.full"));
- wm->activateSurface(obj);
+ hs->set_event_handler(LibHomeScreen::Event_ShowWindow, [hs, wm](json_object *object) {
+ qDebug("Surface %s got showWindow\n", myname.c_str());
+ struct json_object *param_obj = json_object_object_get(object, hs->_keyParameter);
+ const char *area = json_object_get_string(
+ json_object_object_get(param_obj, hs->_keyArea));
+ // Application should call LibWindowmanager::activateWindow() in showWindow handler
+ if(area == nullptr)
+ wm->activateWindow(myname.c_str(), hs->_areaNormal);
+ else
+ wm->activateWindow(myname.c_str(), area);
});
/*
d-color: #fff0ff } /* Literal.String.Regex */ .highlight .s1 { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Single */ .highlight .ss { color: #aa6600; background-color: #fff0f0 } /* Literal.String.Symbol */ .highlight .bp { color: #003388 } /* Name.Builtin.Pseudo */ .highlight .fm { color: #0066bb; font-weight: bold } /* Name.Function.Magic */ .highlight .vc { color: #336699 } /* Name.Variable.Class */ .highlight .vg { color: #dd7700 } /* Name.Variable.Global */ .highlight .vi { color: #3333bb } /* Name.Variable.Instance */ .highlight .vm { color: #336699 } /* Name.Variable.Magic */ .highlight .il { color: #0000DD; font-weight: bold } /* Literal.Number.Integer.Long */ }
<?xml version="1.0" encoding="UTF-8"?>
<manifest>

  <!-- remote servers to query -->
  <remote name="agl"
         fetch="https://gerrit.automotivelinux.org/gerrit/"
         review="https://gerrit.automotivelinux.org/gerrit/"
         pushurl="ssh://gerrit.automotivelinux.org:29418"
  />
  <remote name="yocto" fetch="https://git.yoctoproject.org/git/" />
  <remote name="github" fetch="https://github.com/" />
  <remote name="openembedded" fetch="https://git.openembedded.org/" />

  <!-- defaults -->
  <default remote="agl" sync-j="4" revision="refs/tags/lamprey/12.1.2"/>


  <!-- CORE -->
  <!-- use agl revisions/branches here -->

  <!-- AGL things. -->
  <project name="AGL/meta-agl" path="meta-agl" />
  <project name="AGL/meta-agl-demo" path="meta-agl-demo" />
  <project name="AGL/meta-agl-devel" path="meta-agl-devel" />


  <!-- ALL EXTERNAL REPOS BELOW USE A FIXED REVISION ! -->

  <!-- YOCTO & OE -->

  <!-- Yocto/OpenEmbedded things. -->
  <project name="poky" path="external/poky" remote="yocto" revision="3ec873af83c7b09468605d8aadd0933aecbdb56d" upstream="dunfell" />
  <project name="meta-gplv2" path="external/meta-gplv2" remote="yocto" revision="60b251c25ba87e946a0ca4cdc8d17b1cb09292ac" upstream="dunfell" />
  <project name="openembedded/meta-openembedded" path="external/meta-openembedded" remote="github" revision="0722ff6f021df91542b5efa1ff5b5f6269f66add" upstream="dunfell" />


  <!-- UPSTREAM COMPONENTS -->

  <!-- meta-virtualization -->
  <project name="meta-virtualization" path="external/meta-virtualization" remote="yocto" revision="c5f61e547b90aa8058cf816f00902afed9c96f72" upstream="dunfell"/>

  <!-- Qt things -->
  <project name="meta-qt5/meta-qt5" path="external/meta-qt5" remote="github" revision="b4d24d70aca75791902df5cd59a4f4a54aa4a125" upstream="dunfell"/>

  <!-- Updater layers. --> 
  <project name="advancedtelematic/meta-updater" path="external/meta-updater" remote="github" revision="cc1b38310f4ebd0558438057a1edfeb4a3555b16" upstream="dunfell"/>
  <project name="advancedtelematic/meta-updater-qemux86-64" path="external/meta-updater-qemux86-64" remote="github" revision="71e2e2426b09e5aed6eabed72c8d289c0343c2de" upstream="dunfell"/>
  <project name="advancedtelematic/meta-updater-raspberrypi" path="external/meta-updater-raspberrypi" remote="github" revision="3e4795b85861e63c54f6f7c573f8bd13b3024072" upstream="dunfell"/>

  <!-- Security layer -->
  <project name="meta-security" path="external/meta-security" remote="yocto" revision="b76698c788cb8ca632077a972031899ef15025d6" upstream="dunfell"/>

  <!-- meta-codescanner - support for using CodeScanner during the build -->
  <project name="dl9pf/meta-codechecker" path="external/meta-codechecker" remote="github" revision="f27a46feb2291d333744850a82d5c8af303e3bd5" upstream="master"/>

  <!-- meta-spdxscanner - support for fossology -->
  <project name="meta-spdxscanner" path="external/meta-spdxscanner" remote="yocto" revision="23bba6f8dfafc806c187fc58b31fe2466d95772d" upstream="dunfell"/>

  <!-- Alexa Auto SDK layer -->
  <project name="alexa/alexa-auto-sdk" path="external/alexa-auto-sdk" remote="github" revision="e1564482a33648bede36740796c8d69ae3c6f7fb" upstream="2.3"/>

  <!-- IoT SDK layer -->
  <project name="intel-iot-devkit/meta-iot-cloud" path="external/meta-iot-cloud" remote="github" revision="5431f91969087d631972d73cd03b16eed0a61987" upstream="dunfell"/>

  <!-- clang support -->
  <project name="kraj/meta-clang" path="external/meta-clang" remote="github" revision="5ac36e49ab0f4b9bc72a3c747841c1f9e54e640a" upstream="dunfell"/>

  <!-- meta-python2 as stop-gap to allow chromium to build until upstream fixes the dependencies -->
  <project name="meta-python2" path="external/meta-python2" remote="openembedded" revision="b901080cf57d9a7f5476ab4d96e56c30db8170a8" upstream="dunfell" />

  <!-- BSPs -->

  <!-- Renesas Gen3 specific things -->
  <project name="renesas-rcar/meta-renesas" path="bsp/meta-renesas" remote="github" revision="4160ddb33390fa5266635c65c5a5abbed27845f6" upstream="dunfell-dev"/>
  <project name="CogentEmbedded/meta-rcar" path="bsp/meta-rcar" remote="github" revision="fc6201d93336a314c532e063e0abc48969b3b868" upstream="v5.9.0"/>
  <project name="AGL/meta-agl-refhw" path="bsp/meta-agl-refhw" />

  <!-- consolidate on meta-freescale from git.yoctoproject.org -->
  <project name="meta-freescale" path="bsp/meta-freescale" remote="yocto" revision="a6199966375875fdfc295e6687c86a83fb53bf04" upstream="dunfell"/>
  <project name="Freescale/meta-freescale-3rdparty" path="bsp/meta-freescale-3rdparty" remote="github" revision="c52f64973cd4043a5e8be1c7e29bb9690eb4c3e5" upstream="dunfell"/>

  <!-- TI Vayu / Jacinto 6 / DRA7 -->
  <project name="meta-arm" path="bsp/meta-arm" remote="yocto" revision="c4f04f3fb66f8f4365b08b553af8206372e90a63" upstream="dunfell"/>
  <project name="meta-ti" path="bsp/meta-ti" remote="yocto" revision="02a53f48b9bdb242185204610610f2209bc92ca6" upstream="dunfell"/>

  <!-- Raspberry Pi 3, 3B+, and 4 -->
  <project name="meta-raspberrypi" path="bsp/meta-raspberrypi" remote="yocto" revision="934064a01903b2ba9a82be93b3f0efdb4543a0e8" upstream="dunfell"/>

  <!-- DragonBoard 410c specific things -->
  <project name="meta-qcom" path="bsp/meta-qcom" remote="yocto" revision="2778e164cd0427277e37fc03c8ed19179da1613b" upstream="dunfell"/>

  <!-- Sancloud BSP layers -->
  <project name="SanCloudLtd/meta-sancloud" path="bsp/meta-sancloud" remote="github" revision="e220d23c2c01ca18161d3fb0486f295e6e90ba03" upstream="dunfell"/>
  <project name="EmbeddedAndroid/meta-rtlwifi" path="bsp/meta-rtlwifi" remote="github" revision="7b556aa2265cfc41e6e5fda7085619436fe9a385" upstream="dunfell"/>

  <!-- meta-synopsys - support for ARC HSDK board -->
  <project name="foss-for-synopsys-dwc-arc-processors/meta-synopsys" path="bsp/meta-synopsys" remote="github" revision="80656bf6551b2056c8cb02a74510e595e2553048" upstream="dunfell-agl"/>

</manifest>