PDK

The Plug-In Development Kit (PDK), a relatively new webOS SDK component, lets developers use C/C++ to create standalone or hybrid apps (combined JavaScript and C/C++).

In webOS 2.0, hybrid apps exit beta, allowing you to distribute apps incorporating PDK Plug-ins. Using Plug-ins, you can more easily port app logic from other platforms while leveraging the Mojo Framework to give users a familiar interface and integrate seamlessly into webOS.

Even if you are not porting, Plug-ins give you the option of utilizing the PDK for graphics and performance intensive features as needed, while building the rest of your app in HTML/JavaScript/CSS - and enjoying the lightweight development process and rapid iteration that these web technologies enable.

New APIs

For webOS 2.0, three new PDL APIs (libpdl) have been added:

  1. PDL_Minimize—Cards (minimizes) the app at runtime. Has the same effect as tapping the button below the screen. Mojo apps can minimize a card at the app's top-level when the user makes a back-gesture. This gives PDK apps the same capability.

  2. PDL_GetHardwareID—Identifies the device the app is running on. Replaces the deprecated code(PDL_GetHardware) API which could only identify a Palm or Pixi device.

  3. PDL_GetParamJson—Takes the parameter passed to a service callback and returns a JSON-formatted string.

New library support

Plug-in Transparency

If you include the following param with your Plug-in's embedded object:

<param name="alphablend" value="true">

Your Plug-in object area will transparently blend with the colors and text your JavaScript app creates behind it. Whatever background area your Plug-in app does not write on top of will show through.

Touch Input

When handling touch input, you now get raw touch data; before, in 1.4.5, you would not get mousemove events until the user had moved their finger a sufficient distance from the initial touch area and the mouseup event on lifting the finger might not change match the actual finger position if the finger had not moved outside that drag radius.

Miscellaneous Additions, Updates and Fixes