OWB FAQ

  1. OWB runtime
    1. Howto run owb in haineko environment ?
    2. Howto run owb in framebuffer mode ?
    3. How can I change the default resolution ?
    4. How to enable verbose logs in debug mode ?
    5. How to launch owb with an user interface ?
    6. User interface is ugly, why ?
    7. OWB doesn't display my local html file
  2. haineko environment
    1. How can I install a package masked by ~x86 keyword ?
    2. How can I install a package masked by missing keyword ?
    3. How can I install a package masked by -x86 keyword ?
  3. owb in haineko environment
    1. Where are owb sources ?
    2. What about owb ebuild options ?
    3. How can I install owb dependencies but not owb ?
    4. How to compile owb in debug mode with emerge ?
  4. Doduo description
    1. what is WK directory in Concretization ?
    2. what about WebCore and JavaScriptCore modifications ?
    3. What do i need to implement if i want change the owbal platform graphics ?
    4. What is the coding style used ?
    5. Multi-window on OWB
    6. How to implement scrollbar ?
    7. How activate the body transparency ?

OWB runtime

Howto run owb in haineko environment ?

Inside haineko environment simply do:

export DISPLAY=:0

In a shell outside from haineko:

xhost +

Note: this is far from being a secure method

Howto run owb in framebuffer mode ?

You just have to correctly set SDL_VIDEODRIVER environment variable. For instance, for a framebuffer mode:

export SDL_VIDEODRIVER=fbcon

How can I change the default resolution ?

You can now change owb resolution at runtime with the following options:

owb --width 720 --height 576 --depth 16

For more info about available options:

owb --help

How to enable verbose logs in debug mode ?

For instance, if you want a verbose output for network stack:

MODULE_NETWORK=LEVEL_INFO owb www.gentoo.org

Below are the different log modules and their meaning:

  • MODULE_EVENTS: for loop event module.
  • MODULE_FACILITIES: currently it is only used for cookie management.
  • MODULE_FONTS: for font rendering module.
  • MODULE_GLUE: for BALGlue directory stuff.
  • MODULE_GRAPHICS: for graphic rendering module.
  • MODULE_IMAGEDECODERS: for image decoding module.
  • MODULE_NETWORK: for network stack.
  • MODULE_TYPES: currently it is only used for timers.
  • MODULE_WIDGETS: for widget and scrollview.

How to launch owb with an user interface ?

If you have installed owb with emerge facilities, simply do:

owb /usr/share/owb/UI/ff/navigation.html

If that's simply for a test and you did not do a make install after compilation:

./owb /path/to/sources/UI/ff/navigation.html

User interface is ugly, why ?

That is probably because you have compiled owb with GENERIC support for internationalization. As matter of fact, this support is still experimental and incomplete. So to get a nicer user interface you will have to recompile owb with ICU support for internationalization.

OWB doesn't display my local html file

OWB doesn't support relative paths for file argument. So you should replace:

./owb page.html

by

./owb /path/to/files/page.html

haineko environment

How can I install a package masked by ~x86 keyword ?

As root, simply edit /etc/portage/package.keywords file by adding a line which contains package-category/package-name you want to unmask.
For example:

odole ~ # emerge swfdec

These are the packages that would be merged, in order:

Calculating dependencies -
!!! All ebuilds that could satisfy "swfdec" have been masked.
!!! One of the following masked packages is required to complete your request:
- media-libs/swfdec-0.5.3 (masked by: ~x86 keyword)
- media-libs/swfdec-0.5.2 (masked by: ~x86 keyword)

For more information, see MASKED PACKAGES section in the emerge man page or
refer to the Gentoo Handbook.

odole ~ # echo "media-libs/swfdec" >> /etc/portage/package.keywords
odole ~ # emerge swfdec

These are the packages that would be merged, in order:

Calculating dependencies... done!
[ebuild  N    ] net-libs/libsoup-2.2.100  USE="-debug -doc -ssl" 497 kB
[ebuild  N    ] dev-libs/liboil-0.3.12  USE="-doc" 792 kB
[ebuild  N    ] media-libs/swfdec-0.5.3  USE="-ffmpeg -gnome -gstreamer -mad -oss" 1,468 kB

Total: 3 packages (3 new), Size of downloads: 2,756 kB

Would you like to merge these packages? [Yes/No] n

Quitting.

How can I install a package masked by missing keyword ?

See the example below:

odole ~ # emerge =x11-wm/enlightenment-0.16.9999

These are the packages that would be merged, in order:

Calculating dependencies -
!!! All ebuilds that could satisfy "=x11-wm/enlightenment-0.16.9999" have been masked.
!!! One of the following masked packages is required to complete your request:
- x11-wm/enlightenment-0.16.9999 (masked by: missing keyword)

For more information, see MASKED PACKAGES section in the emerge man page or
refer to the Gentoo Handbook.

odole ~ # echo "=x11-wm/enlightenment-0.16.9999 **" >> /etc/portage/package.keywords
odole ~ # emerge =x11-wm/enlightenment-0.16.9999

These are the packages that would be merged, in order:

Calculating dependencies... done!
[ebuild  N    ] media-libs/imlib2-1.4.0  USE="mmx nls zlib -X -bzip2 -doc -gif -jpeg -mp3 -png -tiff" 934 kB
[ebuild  N    ] x11-misc/xbitmaps-1.0.1  USE="-debug" 0 kB
[ebuild  N    ] x11-proto/damageproto-1.1.0  USE="-debug" 0 kB
[ebuild  N    ] x11-libs/libXdamage-1.1.1  USE="-debug" 197 kB
[ebuild  N    ] x11-wm/enlightenment-0.16.9999  USE="nls -doc -esd -xcomposite -xinerama -xrandr" 0 kB

Total: 5 packages (5 new), Size of downloads: 1,130 kB

Would you like to merge these packages? [Yes/No] n

Quitting.

How can I install a package masked by -x86 keyword ?

In the same way as the previous examples, simply do as root:

echo "package-category/package-name *" >> /etc/portage/package.keywords

owb in haineko environment

Where are owb sources ?

owb sources are not by default in haineko environment. Nonetheless, if you did an emerge owb you will be able to find the owb source tarball in /usr/portage/distfiles/. If you did an emerge owb-svn, then subversion sources will be stored in /usr/local/src/owb-svn directory.
If you only want to retrieve sources, and do not want emerge to compile and install them, simply do:

emerge --fetchonly owb

What about owb ebuild options ?

www-client/owb-pleyo-1.0 USE="javascript* truetype* web-ui%* -debug -icu* -static*" Here are owb ebuild options which are available:

  • debug: if you really want a debug build from emerge, be sure that FEATURES flags has nostrip option!
  • icu: use ICU library for internationalization.
  • javascript: enable javascript support. Should always be enabled.
  • static: do a static link.
  • truetype: use freetype as font renderer.
  • web-ui: enable HTML user interface.

How can I install owb dependencies but not owb ?

Well this is quite simple thanks to emerge command:

emerge --onlydeps owb

How to compile owb in debug mode with emerge ?

Unfortunetaly adding debug to USE flag is not enough. As a matter of fact, emerge will regardless strip installed binaries and libraries. So the way to proceed is:

FEATURES="nostrip" USE="debug" emerge owb

Doduo description

what is WK directory in Concretization ?

it's the default implementation no dependant of platform but in concretization because you have the possibility to rewrite this part, for example you can implement String on std::string.

what about WebCore and JavaScriptCore modifications ?

Well you should as less as possible modify code inside WebCore or JavaScriptCore. The primary reason is that modifying code in WebCore or JavaScriptCore makes merge process harder.
Nonetheless sometimes you do not have the choice, and you must modify some code. A typical example is when you want to add a new platform or some specific tweaks for a new architecture. In this case, simply add filenames you modify inside BAL/scripts/generators/data/WebKitFiles.txt. Then for each merge prepareMerge.sh will take in account that the file has been modified and will try to do its best to merge modifications properly.
If you do not follow this process, you may loose your modifications.

What do i need to implement if i want change the owbal platform graphics ?

you need implement that :

  • new main with a new event loop
  • new events
  • new WebViewPrivate
  • new font Engine ( and font drawing )
  • new Graphics ( GraphicsContext and Image* is suffisant )
  • new Widgets ( Widget and ScrollView is suffisant )

What is the coding style used ?

we use the webkit coding style : http://webkit.org/coding/coding-style.html

Multi-window on OWB

On OWB you can create several WebView and set a surface by WebView ( you can set the same surface on all WebView ). Here an example of main on OWB SDL version and the result

How to implement scrollbar ?

In File BCPlatformScrollBar{Impl}.h/.cpp, you have severals methods to paint all scrollbar part : for example in BCPlatformScrollBarSDL.cpp :

  • paintButton : paint the button in each side of scrollbars
  • paintThumb : paint the thumb
  • paintTrack : paint the scrollbar background

all of this function is called in paint method, if you have a widget scrollbar, you can paint directly your widget in paint method.

how to move the thumb ?

there is 4 methods :

  • handleMouseMoveEvent : call when the mouse move on scrollbar, move the scrollbar if the left button is pressed
  • handleMouseOutEvent : call when the scrollbar lost the focus
  • handleMousePressEvent : call when there is a click on scrollbar
  • handleMouseReleaseEvent : call when there is a release of click on scrollbar

you can control the scrollbar with thoses methods.

How activate the body transparency ?

on WebView set transparency to true by default it's false.

webView->setTransparent(true);