Previous Entry Share Next Entry
webOS and the Plugin Development Kit, Part 1
pokemon
unwiredben
So, I'm finishing my fourth week with the webOS developer relations team.  It's been a really fun and busy ride,  I've been asserting my presence on the developer forums and many questions have been answered.

However, I really need to be writing and making sample code.  This will help avoid questions and help a lot of people.  I'm going to be doing both of those here, with the final product getting polished and put up on the Palm Developer Site eventually.  Consider these posts a working draft.

Our Plugin Development Kit (PDK from here onward) is a set of tools and libraries for making native applications on webOS.  Most apps now are written like websites; they have HTML, JavaScript, CSS, and images, and they run inside the special version of WebKit we call LunaSysManager.  Native apps, in contrast, are actual compiled code.  They're originally written in C or C++, compiled down to ARM machine language, and run directly on the device.  WebKit is still there, but it mostly stays out of the way and just gives the PDK app a window to draw in.

We've got three APIs that are used for PDK apps.  The first is SDL (Simple Directmedia Library).  Our current release is based on SDL 1.2.  This API gives you drawing surfaces, 2D primitives, image loading, fonts, events, timers, network access, accelerometer (via joystick APIs), touch screen (via mouse APIs).  It's well described at the libsdl.org website.

The second API is PDL (Palm Direct Library, perhaps?).  This gives access to some system services like screen orientation, the location system and the device ID number.  It also has calls that allow your plugin to register methods that can be called from JavaScript.  The reference for this is online.

The final API is Open GL ES.  We support both version 1.1 and 2.0, although not both in the same program.  Open GL ES 1.1 has a fixed-function pipeline and works well for a lot of 2D and 3D applications, while ES 2.0 uses a programmable shader system which is more complicated for simple programs, but very powerful in its ability to shift vertex transformation and shading into the GPU.  I'm still learning the Open GL way, but I hope to blog about my experience getting some GL ES 2.0 sample code running on the device.

Next time, we explore some basic SDL-based sample code.

  • 1
As u mentioned in ur reply PDK and the WebOS emulator (http://developer.palm.com/distribution/viewtopic.php?f=70&t=5759)
to run combination development of HTML application and PDK plug-in on emulator , we require a different toolset for those binaries to work in emulator(x86, linux) can you please clarify that topic with an example

In theory, if you used x86 Linux cross compilation tools, you could run a hybrid app in the emulator -- we've just not tested that out, and I suspect there are issues in how IPC works on that platform.

  • 1
?

Log in

No account? Create an account