Page tree
Skip to end of metadata
Go to start of metadata

Building Wayland ivi extension related components

Pre-Requisites

You need to build wayland/weston and check if these component works correctly by referinghttp://wayland.freedesktop.org/ubuntu12.04.html.
This link would help you to set up

Which branches shall be used for a set of wayland-ivi-extension and weston-ivi-shell?

A set of them is listed in Blog. Blogs

Building weston-ivi-shell

Weston-ivi-shell applys several patches to build ivi-shell on Weston:http://cgit.freedesktop.org/wayland/weston/.
The way to build it is the same as standard weston. After installation, you can find additional modules; hmi-controller.so, ivi-layout.so, and ivi-shell.so in $(INSTALL_DIR)/lib/weston.

Building wayland-ivi-extension

$ git clone https://github.com/GENIVI/wayland-ivi-extension.git
$ mkdir build-wayland-ivi-extension
$ cd build-wayland-ivi-extension
$ cmake ./ -DBUILD_ILM_API_TESTS=1 ../wayland-ivi-extension
$ make
$ make install

After installation, you can find an additional modules,

  • ivi-controller.so in $(INSTALL_DIR)/lib/weston.
  • libilmClient.so, libilmCommon.so, and libilmControl.so in $(INSTALL_DIR)/lib
  • EGLWLMockNavigation and LayerManagerControl in $(INSTALL_DIR)/bin

   Starting Wayland-ivi-extension

Wayland IVI Extension is loaded as ivi-module in ivi-shell + Weston. These modules are configured to be loaded by using weston.ini.

ivi-input is enabled when ivi-input.so is added after ivi-controll.so in weston.ini. Without ivi-input, input handling is done the same as a normal desktop; a top, focused surface will receive the input event. 

Weston.ini example to enable ivi-shell can be found in $(BUILD DIR)/ivi-shell/weston.ini.

[core]
shell=ivi-shell.so
modules=ivi-controller.so

[ivi-shell]
ivi-input-module=ivi-input-controller.so

$ export XDG_RUNTIME_DIR=/var/run/user/1000
$ weston &
$ LayerManagerControl create layer 1000 600 400
$ LayerManagerControl set layer 1000 render order 10
$ LayerManagerControl set surface 10 source region 0 0 600 400
$ LayerManagerControl set surface 10 destination region 0 0 600 400
$ LayerManagerControl set screen 0 render order 1000
$ LayerManagerControl set layer 1000 visibility 1
$ LayerManagerControl set surface 10 visibility 1

Weston will load ivi-shell.so to enable ivi features. ivi-shell.so will load ivi-controller.so which implements server side of ivi-controller.xml protocol.
Screenshot when EGLWLMockNavigation successfully starts with "LayerManagerControl" to create a layer for adding surface of MockNavi.

Conformance Testing

Wayland ivi extension provides conformance test to verify IVI layer manager APIs

$ export XDG_RUNTIME_DIR=/var/run/user/1000
$ cd $(BUILD_DIR)/ivi-layermanagement-api/test
$ ./ivi-layermanagement-api-test

Input tests are passing when a keyboard and a pointer device are plugged in.

Optional features

Weston helper client

Currently in weston, the surface content will not be cleared from the screen (even after setting the visibility as false) if there is no surface present in the background

to the hidden surface and the weston doesn't have the support to show a cursor image for the mouse pointer on its own, the application has to render a cursor image if needed.


For these cases a new weston helper client (with the name simple-weston-client) is added which is responsible for creating a background surface and a mouse pointer.

This client will be started by the weston during startup. For this client,  the following configuration parameters are added in weston.ini under the ivi-shell section.

  1. ivi-client-name: binary name of the client, if it is not mentioned the client will not be started
  2. bkgnd-surface-id: surface id to be used for this bkgnd surface, this surface id should not be used for any other application surfaces
  3. bkgnd-color: color in ARGB format which will be the bkgnd color, make sure the alpha value is greater than zero

Example weston.ini:

[core]
shell=ivi-shell.so
modules=ivi-controller.so
require-input=false

[ivi-shell]
ivi-input-module=ivi-input-controller.so
ivi-client-name=/usr/bin/simple-weston-client
bkgnd-surface-id=1000000
bkgnd-color=0xFF000000


This feature is available only after wayland-ivi-extension/commit/3e1f6015eaee452c08c72a65aaeb011672d01428

Reference User interface of weston-ivi-shell

Weston ivi shell provides a reference user interfaces by using ivi-layout library. With following weston.ini configuration, reference user interface is invoked.
Overview of weston-ivi-shell:

Diagram has one semantic issue: the ivi-controller.xml removed and we have ivi-wm.xml instead the ivi-controller.so is still there

The following key needs to be updated for enabling hmi-controller.

[core]
shell=ivi-shell.so
modules=hmi-controller.so

[ivi-shell]
ivi-shell-user-interface=$(BUILD_DIR)/weston-ivi-shell-user-interface
#Show cursor
cursor-theme=default
cursor-size=32
#Define which layer id is used to logically group surfaces
base-layer-id=1000
workspace-background-layer-id=2000
workspace-layer-id=3000
application-layer-id=4000
#Path to png file and define surface id to be decoded.
background-image=$(INSTALL_DIR)/data/background.png
background-id=1001
panel-image$(INSTALL_DIR)/data/panel.png
panel-id=1002
tiling-image$(INSTALL_DIR)/data/tiling.png
tiling-id=1003
sidebyside-image$(INSTALL_DIR)/data/sidebyside.png
sidebyside-id=1004
fullscreen-image=$(INSTALL_DIR)/data/fullscreen.png
fullscreen-id=1005
random-image$(INSTALL_DIR)/data/random.png
random-id=1006
home-image=$(INSTALL_DIR)/data/home.png
home-id=1007
#Color of background and define surface id to paint the color.
workspace-background-color=0x99000000
workspace-background-id=2001
[input-method]
path=$(INSTALL_DIR)/libexec/weston-keyboard
#To add launcher to the workspace.
#workspce-id: which workspace a laucher icon is added.
#icon-id: surface id to draw icon image.
#icon: patch to icon image
#path: path to program to be invoked by this launcher.
[ivi-launcher]
workspace-id=0
icon-id=4001
icon=/home/user/review/build-ivi-shell/data/icon_ivi_flower.png
path=/home/user/review/build-ivi-shell/weston-flower
[ivi-launcher]
workspace-id=1
icon-id=4002
icon=/home/user/review/build-ivi-shell/data/icon_ivi_smoke.png
path=/home/user/review/build-ivi-shell/weston-smoke
  • No labels