Wayland ivi-shell

From Tizen Wiki
Jump to: navigation, search

Weston IVI-Shell is a GENIVI alternative shell for the Weston compositor, targeting IVI (Embedded Vehicle) devices.

http://projects.genivi.org/wayland-ivi-extension/

ICO is a GUI interface depending on it.

Features

Implementation examples

With wl_shell or xdg_shell, we create a wl_shell_surface on top of a wl_surface :

 struct wl_shell_surface *shell_surface;
 shell_surface = wl_shell_get_shell_surface (wl_shell, wl_surface);

Similarly, we create a xdg_surface on top of a wl_surface.

 struct xdg_surface *xdg_surface;
 xdg_surface = xdg_shell_get_xdg_surface (xdg_shell, wl_surface);

ivi-shell supports ivi_surface for ivi style shell on top of a wl_surface.

 struct ivi_surface *ivi_surface;
 uint32_t id_ivisurf; // Global numeric ID to identify a surface to be managed.
 ivi_surface = ivi_application_surface_create(id_ivisurf, wl_surface);

User can implement own window manager as ivi module, e.g. hmi-controller.so in the below link, which will be loaded on weston. For window manager, ivi-shell provides ivi-layout.so.

https://github.com/Tarnyko/weston-ivi-shell

Extension features for TIZEN IVI

Additional features on weston-ivi-shell: https://review.tizen.org/gerrit/gitweb?p=profile%2Fivi%2Fweston-ivi-shell.git;a=summary

  • wl_shell
  • wl_shell_surface partially: to support wl_shell application can works on ivi-shell
 * pong
 * configure
 * set_title
 * set_class
  • ivi_application
 * wl_shell_info

Additional features on Wayland-ivi-extension: https://review.tizen.org/gerrit/gitweb?p=profile%2Fivi%2Fwayland-ivi-extension.git;a=summary

  • ivi_controller to support getting of native_handle, wl_surface, created by wl_shell application
 * get_native_handle
 * native_handle

IVISurfaceCreator: additional tools provided by wayland-ivi-extension

 IVISurfaceCreator --help
 Usage: IVISurfaceCreator <Process ID> <Window Title> <IVI-Surface ID>

This is a reference implementation how to get wl_surface of wl_shell application and map the wl_surface to Global ID by using ivi_application protocol. After mapping wl_surface with Global ID, the surface can be controlled by using ivi_controller or ivi layout APIs.

  • Process ID: Process ID of wl_shell application
  • Window Title: title of window set by set_title. NULL is allowed. If NULL is set, it will use oldest wl_surface in the process. If several windows have the same title name in the process, it will use oldest wl_surface in the process as well.
  • IVI-Surface ID: Global ID will be mapped to a wl_surface.

"IVISurfaceCreator" is also used by hmi-controller.so: ivi-surface-creator-path=/usr/bin/IVISurfaceCreator in weston.ini. see below section. If a key "setid-window-titles" is added in [ivi-launcher], hmi-controller recognizes that the application is wl_shell ones, not ivi-application. In such a case, hmi-controller invokes "IVISurfaceCreator <process ID of the application> <value of setid-window-titles> <Global ID>" to map wl_surface to Global ID. A value of setid-window-titles can be blank, which will be regarded as NULL. If an application supports ivi-application protocol, setid-window-titles shall be removed from [ivi-launcher].

 [ivi-launcher]
 workspace-id=0
 icon=/usr/share/weston/icon_ivi_flower.png
 path=/usr/bin/ivi/weston-flower-ivi
 setid-window-titles=Flower

weston 1.5

https://bugs.tizen.org/jira/browse/TC-1208

https://review.tizen.org/gerrit/#/c/23487/

this worked for me

I build wl weston efl etc on ivi repos and it worked on dp

  • wayland
  • weston
  • efl
  • weston-ivi-shell
  • libwebsockets
  • wayland-ivi-extension
  • wayland-clients: which supports wl_shell or ivi_application as the first protocol to be bound. Weston 1.5 supports xdg-shell as the first protocol, which is not supported by ivi-shell. You can find the prebuilt version of it in TC-1208: weston-clients-1.4.0-0.i686.rpm pre-built without xdg-shell patches.

I had disabled vga too

 grep 'video=VGA-1:d' /boot/loader/entries/vmlinuz-3.14.2-7.1-x86-ivi.conf 
 options rootwait rootfstype=ext4  root=PARTUUID=BC2B8EA9-0DDE-4A4A-858D-DCF1CE1F64A6 video=VGA-1:d
bash-4.2# rpm -qf /etc/xdg/weston/weston.ini
weston-ivi-shell-config-0.1.5-20140626.1403784072.i686
bash-4.2# head /etc/xdg/weston/weston.ini
[core]
shell=ivi-shell.so

[output]
name=DP1
mode=1920x1080

[ivi-shell]
ivi-module=hmi-controller.so
ivi-shell-user-interface=/usr/libexec/weston-ivi-shell-user-interface


zypper search -s weston | grep '^i' 
i | weston                       | package    | 1.5.0-20140626.1403781986 | i686   | pcoval           
i | weston-clients               | package    | 1.5.0-20140626.1403781986 | i686   | pcoval           
i | weston-ivi                   | package    | 1-6.1                     | noarch | prerelease       
i | weston-ivi-shell             | package    | 0.1.5-20140626.1403784072 | i686   | pcoval           
i | weston-ivi-shell-clients     | package    | 0.1.4-20140625.1403712912 | i686   | (System Packages)
i | weston-ivi-shell-config      | package    | 0.1.5-20140626.1403784072 | i686   | pcoval           
i | weston-ivi-shell-devel       | package    | 0.1.5-20140626.1403784072 | i686   | pcoval    

 zypper search -s wayland | grep '^i' 
i | libwayland-client           | package    | 1.5.0-20140626.1403781950 | i686   | pcoval    
i | libwayland-cursor           | package    | 1.5.0-20140626.1403781950 | i686   | pcoval    
i | libwayland-egl              | package    | 10.1.3-4.1                | i686   | prerelease
i | libwayland-server           | package    | 1.5.0-20140626.1403781950 | i686   | pcoval    
i | wayland                     | pattern    |                           | noarch | ivi-daily 
i | wayland                     | pattern    |                           | noarch | prerelease

zypper search -s genivi | grep '^i' 
i | genivi-shell               | package    | 0.2.2-20140626.1403782466 | i686   | pcoval    
i | genivi-shell-devel         | package    | 0.2.2-20140626.1403782466 | i686   | pcoval    

Ask me for support --Pcoval (talk) 12:15, 26 June 2014 (UTC)

Weston 1.4


After having installed Weston, do the following :

zypper install weston-ivi-shell weston-ivi-shell-clients genivi-shell


Then rename or move the current "weston.ini" file :

mv /etc/xdg/weston/weston.ini /etc/xdg/weston.ini.old

Create a new one :

touch /etc/xdg/weston/weston.ini

and insert the following textinto it :

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

[ivi-shell]
cursor-theme=default
cursor-size=32

base-layer-id=1000
workspace-background-layer-id=2000
workspace-layer-id=3000
application-layer-id=4000

background-image=/usr/share/weston/background.png
background-id=1001
panel-image=/usr/share/weston/panel.png
panel-id=1002
tiling-image=/usr/share/weston/tiling.png
tiling-id=1003
sidebyside-image=/usr/share/weston/sidebyside.png
sidebyside-id=1004
fullscreen-image=/usr/share/weston/fullscreen.png
fullscreen-id=1005
random-image=/usr/share/weston/random.png
random-id=1006
home-image=/usr/share/weston/home.png
home-id=1007
workspace-background-color=0x99000000
workspace-background-id=2001

ivi-surface-creator-path=/usr/bin/IVISurfaceCreator

[input-method]
path=/usr/libexec/weston-keyboard

[ivi-launcher]
workspace-id=0
icon=/usr/share/weston/icon_ivi_flower.png
path=/usr/bin/ivi/weston-flower-ivi
setid-window-titles=Flower

[ivi-launcher]
workspace-id=0
icon=/usr/share/weston/icon_ivi_clickdot.png
path=/usr/bin/ivi/weston-clickdot-ivi
setid-window-titles=Wayland ClickDot

[ivi-launcher]
workspace-id=1
icon=/usr/share/weston/icon_ivi_simple-egl.png
path=/usr/bin/ivi/weston-simple-egl-ivi
setid-window-titles=simple-egl

[ivi-launcher]
workspace-id=1
icon=/usr/share/weston/icon_ivi_simple-shm.png
path=/usr/bin/ivi/weston-simple-shm-ivi
setid-window-titles=simple-shm

[ivi-launcher]
workspace-id=2
icon=/usr/share/weston/icon_ivi_smoke.png
path=/usr/bin/ivi/weston-smoke-ivi
setid-window-titles=smoke

[ivi-launcher]
workspace-id=3
icon=/usr/share/weston/icon_ivi_flower.png
path=/usr/bin/ivi/weston-flower-ivi
setid-window-titles=Flower

[ivi-launcher]
workspace-id=3
icon=/usr/share/weston/icon_ivi_clickdot.png
path=/usr/bin/ivi/weston-clickdot-ivi
setid-window-titles=Wayland ClickDot

[ivi-launcher]
workspace-id=3
icon=/usr/share/weston/icon_ivi_simple-egl.png
path=/usr/bin/ivi/weston-simple-egl-ivi
setid-window-titles=simple-egl

[ivi-launcher]
workspace-id=3
icon=/usr/share/weston/icon_ivi_simple-shm.png
path=/usr/bin/ivi/weston-simple-shm-ivi
setid-window-titles=simple-shm

[ivi-launcher]
workspace-id=3
icon=/usr/share/weston/icon_ivi_smoke.png
path=/usr/bin/ivi/clients/weston-smoke-ivi
setid-window-titles=smoke

(PS : this file comes from the "weston-ivi-shell" package, "ivi-shell/weston.ini.in" file)

Then, kill the "weston" process if is exists, and, as root, re-run it manually :

su root

(password is "tizen")

export XDG_RUNTIME_DIR=/run/user/0
weston

You should see such an output :

Weston IVI-Shell