The Web Browser Engine comes with a sample GF-based application called Wklauncher that demonstrates the Web Browser Engine API.
Because the Web Browser Engine library uses GF to render, you must ensure that io-display is running and properly configured to use the correct display resolution and color depth.
Wklauncher also requires a devi driver such as devi-hid in order to use keyboard or mouse input. For example:
devi-hid -P mouse kbd
The following procedure assumes that you are running the sample application from a self-hosted system. |
To run the Wklauncher sample:
export LD_LIBRARY_PATH=$QNX_TARGET/opt/webkit/x86/lib:$LD_LIBRARY_PATH
$QNX_TARGET/opt/webkit/x86/bin/wklauncher url
where url is the fully qualified URL of the page that you want to launch in the browser.
Ensure that you have provided a fully qualified URL. The Wklauncher sample does not assume the http:// prefix. |
The Wklauncher sample application does not provide a field to enter a URL. You can navigate using your favourite search engine on the Web. Remember that Wklauncher is only a basic sample application designed to show you how to create a browser-based application using the Web Browser Engine API. You can add a navigation bar, as well as other common browser features by using the Web Browser Engine API.
The Wklauncher application uses a hardware cursor to display and move the mouse pointer. On some websites, you may notice that mouse pointer responsiveness is less than ideal. In the interest of keeping Wklauncher event-handling simple, this issue has not been resolved.
One way to solve this issue is to use a separate process to display and move the hardware cursor. QNX Neutrino 6.4.1 provides an example application called gfi-demo that you can run as a separate process to display and move the mouse cursor. You may need to run it at a higher priority to ensure smooth movement when the Web Browser Engine is busy. In some cases you may also need to run devi-hid and or io-hid at a higher priority. The Wklauncher application has a -C command-line option to disable it from displaying the cursor.
The following example launches the Wklauncher sample using the gfi-demo application to render the cursor:
nice --1 gfi-demo & $QNX_TARGET/opt/webkit/x86/bin/wklauncher -C http://www.qnx.com